html_url
stringlengths 51
51
| title
stringlengths 6
280
| comments
stringlengths 67
24.7k
| body
stringlengths 51
36.2k
β | comment_length
int64 16
1.45k
| text
stringlengths 159
38.3k
| embeddings
sequence |
---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/6060 | Dataset.map() execute twice when in PyTorch DDP mode | Thanks for help! I find the fingerprint between processes don't have same hash:
```
Rank 0: Gpu 0 cut_reorder_keys fingerprint c7f47f40e9a67657
Rank 0: Gpu 0 random_shift fingerprint 240a0ce79831e7d4
Rank 1: Gpu 1 cut_reorder_keys fingerprint 20edd3d9cf284001
Rank 1: Gpu 1 random_shift fingerprint 819f7c1c18e7733f
```
But my functions only process the example one by one and don't need rank or other arguments. After all it can work in the test for dataset and dataloader.
I'll try to set `new_fingerprint` to see if it works and figure out the reason of different hash. | ### Describe the bug
I use `torchrun --standalone --nproc_per_node=2 train.py` to start training. And write the code following the [docs](https://huggingface.co/docs/datasets/process#distributed-usage). The trick about using `torch.distributed.barrier()` to only execute map at the main process doesn't always work. When I am training model, it will map twice. When I am running a test for dataset and dataloader (just print the batches), it can work. Their code about loading dataset are same.
And on another server with 30 CPU cores, I use 2 GPUs and it can't work neither.
I have tried to use `rank` and `local_rank` to check, they all didn't make sense.
### Steps to reproduce the bug
use `torchrun --standalone --nproc_per_node=2 train.py` or `torchrun --standalone train.py` to run
This is my code:
```python
if args.distributed and world_size > 1:
if args.local_rank > 0:
print(f"Rank {args.rank}: Gpu {args.gpu} waiting for main process to perform the mapping", force=True)
torch.distributed.barrier()
print("Mapping dataset")
dataset = dataset.map(lambda x: cut_reorder_keys(x, num_stations_list=args.num_stations_list, is_pad=True, is_train=True), num_proc=8, desc="cut_reorder_keys")
dataset = dataset.map(lambda x: random_shift(x, shift_range=(-160, 0), feature_scale=16), num_proc=8, desc="random_shift")
dataset_test = dataset_test.map(lambda x: cut_reorder_keys(x, num_stations_list=args.num_stations_list, is_pad=True, is_train=False), num_proc=8, desc="cut_reorder_keys")
if args.local_rank == 0:
print("Mapping finished, loading results from main process")
torch.distributed.barrier()
```
### Expected behavior
Only the main process will execute `map`, while the sub process will load cache from disk.
### Environment info
server with 64 CPU cores (AMD Ryzen Threadripper PRO 5995WX 64-Cores) and 2 RTX 4090
- `python==3.9.16`
- `datasets==2.13.1`
- `torch==2.0.1+cu117`
- `22.04.1-Ubuntu`
server with 30 CPU cores (Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz) and 2 RTX 4090
- `python==3.9.0`
- `datasets==2.13.1`
- `torch==2.0.1+cu117`
- `Ubuntu 20.04` | 90 | Dataset.map() execute twice when in PyTorch DDP mode
### Describe the bug
I use `torchrun --standalone --nproc_per_node=2 train.py` to start training. And write the code following the [docs](https://huggingface.co/docs/datasets/process#distributed-usage). The trick about using `torch.distributed.barrier()` to only execute map at the main process doesn't always work. When I am training model, it will map twice. When I am running a test for dataset and dataloader (just print the batches), it can work. Their code about loading dataset are same.
And on another server with 30 CPU cores, I use 2 GPUs and it can't work neither.
I have tried to use `rank` and `local_rank` to check, they all didn't make sense.
### Steps to reproduce the bug
use `torchrun --standalone --nproc_per_node=2 train.py` or `torchrun --standalone train.py` to run
This is my code:
```python
if args.distributed and world_size > 1:
if args.local_rank > 0:
print(f"Rank {args.rank}: Gpu {args.gpu} waiting for main process to perform the mapping", force=True)
torch.distributed.barrier()
print("Mapping dataset")
dataset = dataset.map(lambda x: cut_reorder_keys(x, num_stations_list=args.num_stations_list, is_pad=True, is_train=True), num_proc=8, desc="cut_reorder_keys")
dataset = dataset.map(lambda x: random_shift(x, shift_range=(-160, 0), feature_scale=16), num_proc=8, desc="random_shift")
dataset_test = dataset_test.map(lambda x: cut_reorder_keys(x, num_stations_list=args.num_stations_list, is_pad=True, is_train=False), num_proc=8, desc="cut_reorder_keys")
if args.local_rank == 0:
print("Mapping finished, loading results from main process")
torch.distributed.barrier()
```
### Expected behavior
Only the main process will execute `map`, while the sub process will load cache from disk.
### Environment info
server with 64 CPU cores (AMD Ryzen Threadripper PRO 5995WX 64-Cores) and 2 RTX 4090
- `python==3.9.16`
- `datasets==2.13.1`
- `torch==2.0.1+cu117`
- `22.04.1-Ubuntu`
server with 30 CPU cores (Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz) and 2 RTX 4090
- `python==3.9.0`
- `datasets==2.13.1`
- `torch==2.0.1+cu117`
- `Ubuntu 20.04`
Thanks for help! I find the fingerprint between processes don't have same hash:
```
Rank 0: Gpu 0 cut_reorder_keys fingerprint c7f47f40e9a67657
Rank 0: Gpu 0 random_shift fingerprint 240a0ce79831e7d4
Rank 1: Gpu 1 cut_reorder_keys fingerprint 20edd3d9cf284001
Rank 1: Gpu 1 random_shift fingerprint 819f7c1c18e7733f
```
But my functions only process the example one by one and don't need rank or other arguments. After all it can work in the test for dataset and dataloader.
I'll try to set `new_fingerprint` to see if it works and figure out the reason of different hash. | [
0.13152281939983368,
-0.06774888932704926,
-0.09853803366422653,
0.108902208507061,
0.1256207972764969,
0.026704156771302223,
0.10870331525802612,
0.0030434331856667995,
0.069188691675663,
0.11580159515142441,
-0.012433238327503204,
0.06793954968452454,
-0.0646473616361618,
-0.09962357580661774,
0.0023863648530095816,
-0.006292522884905338,
-0.08150417357683182,
0.05621442571282387,
-0.13206368684768677,
-0.13458700478076935,
-0.08025521039962769,
0.053172770887613297,
0.11795970052480698,
-0.08204647153615952,
-0.018399212509393692,
-0.22990673780441284,
-0.05525677651166916,
0.12983107566833496,
0.07863687723875046,
-0.09341662377119064,
-0.059305302798748016,
-0.09993904829025269,
-0.027898479253053665,
0.26336655020713806,
0.000005065719051344786,
0.11245885491371155,
0.12105678021907806,
0.00404442148283124,
-0.022095073014497757,
-0.005284461192786694,
0.14608584344387054,
0.11029285192489624,
0.05658890679478645,
-0.0005747089744545519,
-0.08536376804113388,
-0.11124192923307419,
-0.06841187924146652,
0.0473904050886631,
0.15621142089366913,
0.03756670281291008,
-0.030862655490636826,
0.043965380638837814,
-0.20218153297901154,
-0.2170984297990799,
-0.10656391829252243,
-0.0493289940059185,
-0.052110910415649414,
0.07882988452911377,
-0.2015618085861206,
-0.07727459818124771,
-0.12201669812202454,
-0.061097946017980576,
0.07028234750032425,
0.12779417634010315,
-0.020037997514009476,
0.10498060286045074,
-0.11710798740386963,
-0.18419457972049713,
0.03765169903635979,
0.12530969083309174,
-0.3070676326751709,
-0.10157831758260727,
0.10048674792051315,
-0.0017105061560869217,
-0.14432178437709808,
0.004494428168982267,
-0.07335777580738068,
0.1647038757801056,
-0.03414123132824898,
0.01101517304778099,
-0.056228406727313995,
0.20153789222240448,
-0.008873985148966312,
-0.02286466211080551,
-0.2856725752353668,
0.16461563110351562,
-0.0019852719269692898,
0.10354942083358765,
-0.013173574581742287,
0.13600744307041168,
-0.007713688537478447,
-0.06863009929656982,
-0.019260045140981674,
-0.09368080645799637,
-0.13420288264751434,
0.09262342005968094,
0.034566041082143784,
-0.1411130279302597,
-0.04478203505277634,
-0.12801486253738403,
0.011017218232154846,
-0.02912750653922558,
0.022370947524905205,
0.04901275038719177,
0.00720716267824173,
-0.09226570278406143,
-0.018155356869101524,
-0.027573296800255775,
0.06286489218473434,
0.07543753832578659,
-0.07182701677083969,
0.09149019420146942,
0.09330534189939499,
0.021952105686068535,
0.1438290923833847,
-0.12100140005350113,
0.11168180406093597,
0.1434120535850525,
0.03653443232178688,
0.14767836034297943,
0.05242791399359703,
0.030310271307826042,
-0.011207353323698044,
0.15297827124595642,
0.14037805795669556,
0.01579398289322853,
-0.08177325129508972,
0.07924169301986694,
-0.12537404894828796,
0.03301417455077171,
-0.10460304468870163,
-0.14025628566741943,
-0.0035017223563045263,
0.0625053346157074,
-0.00808497704565525,
-0.13160638511180878,
-0.06843212246894836,
0.0528772808611393,
-0.11459614336490631,
-0.04734386131167412,
0.1672457605600357,
-0.19808179140090942,
0.1380912959575653,
0.12838219106197357,
0.10905227810144424,
0.1447795033454895,
0.1290893256664276,
0.1756397783756256,
-0.01771930605173111,
0.09979251772165298,
-0.006775463465601206,
0.11902843415737152,
-0.17271511256694794,
0.12274567782878876,
0.09868284314870834,
0.23586952686309814,
0.04360472783446312,
0.04143747314810753,
-0.11219904571771622,
0.017720390111207962,
0.10983027517795563,
-0.015407329425215721,
-0.1285831332206726,
-0.07985538989305496,
0.011327028274536133,
0.1223701611161232,
0.1002274751663208,
0.09034397453069687,
0.06439244002103806,
0.09918306022882462,
0.1342717558145523,
-0.10117297619581223,
-0.284202516078949,
-0.01550570409744978,
-0.20535384118556976,
0.10035223513841629,
-0.09627179056406021,
-0.0009952627588063478,
-0.16766147315502167,
0.01896226406097412,
-0.024054359644651413,
-0.003939724061638117,
-0.014637154527008533,
-0.15794692933559418,
0.21176330745220184,
-0.12867365777492523,
0.029865417629480362,
-0.08297936618328094,
-0.09062638878822327,
0.09013530611991882,
-0.12499265372753143,
0.09259187430143356,
0.11001545190811157,
0.07769495993852615,
-0.021081551909446716,
0.01325016189366579,
0.029019426554441452,
0.07149053364992142,
0.03703104332089424,
-0.11081496626138687,
-0.17013764381408691,
-0.06596642732620239,
-0.13755393028259277,
-0.03271523863077164,
0.023906756192445755,
0.00024166650837287307,
-0.14106933772563934,
0.19449137151241302,
0.0032709110528230667,
-0.012086933478713036,
-0.07707056403160095,
-0.013535712845623493,
0.112820103764534,
0.012838196940720081,
-0.20305205881595612,
-0.034456767141819,
-0.21453969180583954,
0.05228789895772934,
-0.1328064352273941,
0.048801764845848083,
-0.10931307822465897,
0.047773320227861404,
0.009895925410091877,
0.10041721910238266,
-0.04479939490556717,
0.02816522866487503,
0.024956639856100082,
-0.032462459057569504,
-0.018184343352913857,
-0.07444807142019272,
0.020635608583688736,
-0.03222772479057312,
0.17514824867248535,
0.09558555483818054,
0.0027514121029525995,
0.028791360557079315,
0.031367458403110504,
-0.2308746874332428,
0.13326649367809296,
0.10810031741857529,
-0.14162477850914001,
0.13277733325958252,
-0.14587394893169403,
-0.19644655287265778,
0.040964167565107346,
0.13295254111289978,
0.008758025243878365,
0.2260103076696396,
-0.11481306701898575,
-0.025288797914981842,
0.17372211813926697,
0.11320044845342636,
-0.04545274004340172,
0.13017110526561737,
-0.066783107817173,
-0.029272407293319702,
0.12646237015724182,
0.050946202129125595,
0.014585995115339756,
-0.06462449580430984,
0.1604483425617218,
0.09398829191923141,
0.01682354137301445,
0.005567032843828201,
0.0680566132068634,
-0.029098546132445335,
0.047764621675014496,
-0.032639339566230774,
-0.039784882217645645,
0.11283431947231293,
0.19423891603946686,
0.026154911145567894,
-0.14889825880527496,
-0.047779642045497894,
-0.027292780578136444,
-0.07505764067173004,
-0.015965325757861137,
-0.0743960291147232,
0.13057377934455872,
0.03635402023792267,
-0.07391157746315002,
0.14650863409042358,
0.2434941530227661,
-0.06046644225716591,
0.17426595091819763,
0.20637257397174835,
-0.0430690161883831,
0.06870366632938385,
-0.26430535316467285,
0.10344664007425308,
0.06402503699064255,
-0.16105537116527557,
-0.005277124233543873,
0.0503741018474102,
0.1202486976981163,
0.1411333680152893,
0.150601327419281,
-0.017789769917726517,
-0.06620518863201141,
0.04607781395316124,
0.0696905180811882,
0.11118987947702408,
0.0157045628875494,
-0.051251739263534546,
-0.02561436966061592,
0.024094607681035995,
0.17632392048835754,
0.11895864456892014,
-0.3794040381908417,
0.00327447522431612,
0.11374812573194504,
0.04578007012605667,
0.14659833908081055,
0.026537621393799782,
0.10642924904823303,
0.012539328075945377,
-0.02371593564748764,
-0.271228164434433,
0.203559011220932,
-0.04187122359871864,
0.05991626903414726,
0.16060447692871094,
-0.19473496079444885,
-0.06252184510231018,
-0.04845310002565384,
-0.038543928414583206,
0.052374668419361115,
0.09873147308826447,
0.02769342064857483,
-0.0943894237279892,
0.062034305185079575,
-0.03893885016441345,
-0.17478832602500916,
-0.023893047124147415,
-0.02677026018500328,
-0.18596641719341278,
-0.055166471749544144,
-0.03805762156844139,
0.17019835114479065,
0.08736421167850494,
-0.17209959030151367,
-0.02788095921278,
-0.1465180665254593,
-0.060540761798620224,
0.13074637949466705,
-0.07865949720144272,
-0.05706346780061722,
-0.11891688406467438,
0.16204458475112915,
0.07700642198324203,
0.12491218000650406,
0.018934760242700577,
-0.1399608552455902,
-0.07292424887418747,
0.078739233314991,
0.028886808082461357,
-0.16955752670764923,
0.12881121039390564,
-0.003962071146816015,
0.1032508909702301,
0.07088590413331985,
0.1489184945821762,
0.13919277489185333,
0.020958341658115387,
-0.06204763427376747,
0.03835053741931915,
-0.06569688022136688,
-0.008736902847886086,
-0.02817152999341488,
-0.32517850399017334,
0.04756338521838188,
-0.07208770513534546,
-0.13641808927059174,
-0.08008287101984024,
-0.06237035244703293,
-0.12896281480789185,
0.12782374024391174,
-0.10302529484033585,
0.163041353225708,
-0.039545271545648575,
0.10269784927368164,
-0.09037766605615616,
-0.08475088328123093,
-0.04478494077920914,
0.047289248555898666,
0.04945484548807144,
0.17846573889255524,
-0.10773426294326782,
-0.11295592784881592,
0.06916031241416931,
-0.028183920308947563,
0.03292591869831085,
0.019897885620594025,
-0.023337310180068016,
0.014155009761452675,
0.06889641284942627,
0.025407401844859123,
0.0828130915760994,
0.01884814165532589,
0.04231305047869682,
0.07997038960456848,
0.1694028675556183,
0.08587000519037247,
0.1525467187166214,
0.09504596889019012,
-0.04554278776049614,
-0.08611509203910828,
-0.0030310633592307568,
0.05408419296145439,
0.03796929493546486,
0.1320021152496338,
0.012878178618848324,
0.0889095887541771,
0.023981153964996338,
0.15157639980316162,
0.014984495006501675,
-0.005118073429912329,
-0.06263216584920883,
-0.07230106741189957,
-0.14164909720420837,
-0.17484644055366516,
-0.1218886449933052,
-0.07023046165704727,
0.08198167383670807,
0.06411400437355042,
-0.04692069813609123,
0.08406960219144821,
0.004073429852724075,
0.05998147651553154,
0.07525607198476791,
0.048767268657684326,
0.043085310608148575,
0.08345822989940643,
0.06498152762651443,
0.18240293860435486,
-0.0449250154197216,
0.14524230360984802,
-0.17012722790241241,
0.07398957014083862,
0.07340041548013687,
-0.0924551710486412,
0.031237056478857994,
0.06470835953950882,
-0.03819660842418671,
0.04292425140738487,
-0.14813178777694702,
0.001371788326650858,
0.0010946153197437525,
0.021100517362356186,
0.042547520250082016,
-0.10580869019031525,
0.006313300225883722,
-0.12950840592384338,
-0.22624650597572327,
0.004552736412733793,
-0.0025604211259633303,
0.11730118840932846,
-0.3070913255214691,
-0.01962602138519287,
-0.03410215303301811,
-0.2485123723745346,
-0.01820664294064045,
0.09264833480119705,
0.09118186682462692,
-0.09898113459348679,
-0.02063825912773609,
0.01399340108036995,
-0.00899188220500946,
0.11033165454864502,
0.10261865705251694,
-0.19737482070922852,
0.017665203660726547,
0.008884638547897339,
0.09955223649740219,
0.10529753565788269,
0.05539518594741821,
-0.034556277096271515,
-0.025773409754037857,
0.04884674772620201,
-0.17706836760044098,
0.04294922947883606,
0.16783246397972107,
-0.01417193841189146,
-0.02569657936692238,
-0.041431475430727005,
0.12396344542503357,
0.07160068303346634,
0.050225596874952316,
-0.17787502706050873,
0.18427243828773499,
-0.10241853445768356,
-0.04128805920481682,
-0.00010722713341237977,
-0.08020211011171341,
0.028783662244677544,
-0.06318105012178421,
0.0019611644092947245,
-0.14362174272537231,
-0.010406861081719398,
0.03600504249334335,
-0.05582861974835396,
0.08602549880743027,
-0.08688296377658844,
0.09484787285327911,
0.10634101182222366,
-0.2606382668018341,
-0.0032556643709540367,
-0.046569500118494034,
0.15403907001018524,
0.002961056074127555,
0.057492125779390335,
0.09083740413188934,
-0.079595185816288,
-0.1557788997888565,
0.21218346059322357,
-0.12492338567972183,
-0.02634619176387787,
0.10849972814321518,
0.10097746551036835,
0.10209939628839493,
0.04672064259648323,
0.05370241403579712,
-0.07581919431686401,
-0.20896917581558228,
0.05319030210375786,
-0.004333246499300003,
-0.04071406275033951,
-0.037320446223020554,
0.2709849774837494,
0.22421647608280182,
0.156451016664505,
-0.0042760539799928665,
0.17427025735378265,
-0.040959637612104416,
-0.05077593773603439,
0.032291196286678314,
0.23880499601364136,
-0.07801828533411026,
0.005241017788648605,
-0.024316899478435516,
0.11240094900131226,
-0.04786529392004013,
-0.009915392845869064,
0.025847291573882103,
0.0680791586637497,
-0.08615100383758545,
0.019957808777689934,
0.028235001489520073,
-0.17772336304187775,
-0.2159312665462494,
-0.10051727294921875,
0.23760688304901123,
0.2015708088874817,
0.07279007881879807,
0.14805634319782257,
-2.5013585267489374e-32,
-0.03930654376745224,
-0.009012755937874317,
-0.0281241275370121,
-0.1123025193810463,
-0.12829910218715668,
-0.03871111199259758,
-0.05297095328569412,
-0.12662968039512634,
0.027785692363977432,
-0.012306172400712967,
-0.20695553719997406,
0.02812258154153824,
0.09729152172803879,
-0.02588840387761593,
0.06543485820293427,
-0.082868792116642,
0.026989668607711792,
0.0028337016701698303,
-0.0986187532544136,
0.19179902970790863,
0.1895105093717575,
0.08483859896659851,
0.10446669161319733,
0.14259804785251617,
-0.07091380655765533,
-0.07531390339136124,
-0.1031971126794815,
-0.25515860319137573,
-0.15456907451152802,
0.027641143649816513,
-0.11427410691976547,
0.08170580863952637,
-0.0726809948682785,
-0.2962740361690521,
-0.20902638137340546,
0.020667582750320435,
-0.031148409470915794,
-0.17828649282455444,
-0.03435637429356575,
0.0031853942200541496,
-0.09147755056619644,
0.29074591398239136,
0.14768682420253754,
-0.02447880059480667,
-0.06364581733942032,
-0.018792925402522087,
-0.012233387678861618,
0.007012424524873495,
-0.08268257975578308,
-0.16375766694545746,
0.04304904490709305,
0.08412478864192963,
0.2715572118759155,
0.11813909560441971,
-0.018752820789813995,
-0.20204097032546997,
-0.03369453549385071,
0.03409584239125252,
-0.2596285343170166,
0.0482698492705822,
-0.027314746752381325,
0.09528228640556335,
-0.16844865679740906,
-0.08468019217252731,
0.15669184923171997,
-0.04104254022240639,
0.20455700159072876,
0.12395432591438293,
0.3318462371826172,
-0.0009353822097182274,
-0.10502275079488754,
0.22223486006259918,
-0.10783419758081436,
-0.1443076729774475,
-0.11016759276390076,
-0.09123507887125015,
-0.11654788255691528,
-0.1637304574251175,
-0.07933135330677032,
-0.14237968623638153,
0.018326381221413612,
-0.05436500534415245,
0.060220006853342056,
-0.015792643651366234,
0.08673673123121262,
0.0645342469215393,
0.02135474421083927,
0.10793179273605347,
-0.07665839791297913,
-0.025704585015773773,
0.04016994684934616,
0.15262471139431,
-0.01926196552813053,
-0.10076232254505157,
-0.08690119534730911,
-0.05327939987182617,
-0.027890250086784363,
0.06652846932411194,
-0.12404529005289078,
0.06969858705997467,
0.04319176450371742,
-0.024686401709914207,
-0.028209375217556953,
-0.06391103565692902,
0.05957407504320145,
0.09660068899393082,
0.03621137887239456,
0.08910433202981949,
-0.1381710022687912,
-0.03990533947944641,
-0.12275741994380951,
-0.12642742693424225,
0.10546854138374329,
0.18737295269966125,
0.15190288424491882,
-0.0681820809841156,
-0.02665342204272747,
0.09545906633138657,
0.1831379234790802,
0.1855727732181549,
0.035845182836055756,
-0.05180628225207329,
-0.018794285133481026,
0.08302091807126999,
-0.08237898349761963,
0.13031218945980072,
-0.35767048597335815,
-0.012458854354918003,
0.004328859504312277,
-0.18183036148548126,
-0.006671893876045942,
0.04522349312901497,
7.290560120054579e-7,
-0.21273452043533325,
0.024663880467414856,
-0.07509195804595947,
-0.019810328260064125,
-0.01549636572599411,
0.033909089863300323,
-0.11435296386480331,
0.195901557803154,
0.06078063324093819,
0.18151001632213593,
0.11966516077518463,
-0.10001189261674881,
0.09040730446577072,
-0.07152748852968216,
0.02919832058250904,
-0.24371477961540222,
-0.10237125307321548,
0.08842169493436813,
0.08980698138475418,
0.010462994687259197,
-0.09943997859954834,
0.04616127908229828,
0.08522842079401016,
0.012236245907843113,
0.09299018979072571,
-0.016261300072073936,
0.05413267761468887,
-0.014803330413997173,
0.11082319170236588,
-0.13952134549617767,
0.022339968010783195,
-0.010755712166428566,
0.03382766619324684,
0.11316033452749252,
-0.056844085454940796,
0.06278908252716064,
-0.02573617361485958,
-0.04408201202750206,
0.013421280309557915,
-0.07075658440589905,
0.20041894912719727,
0.02406865358352661,
-0.03337666019797325,
-0.2051939219236374,
0.07635599374771118,
0.1148572713136673,
-0.16569861769676208,
0.07979480177164078,
0.04664977639913559,
-0.05483320355415344,
0.03623246029019356,
0.10251116752624512,
0.025587933138012886,
0.2879941761493683,
0.05555843189358711,
-0.05505155771970749,
-0.014375966973602772,
-0.3677309453487396,
0.027410730719566345,
-0.1099427342414856,
-0.17704223096370697,
-0.16822530329227448,
0.033716753125190735,
-0.011225098744034767,
0.11242130398750305,
-0.14928096532821655,
-0.2675887644290924,
1.7132635012805505e-34,
-0.1920321136713028,
0.08470558375120163,
-0.10078071057796478,
-0.1916353553533554,
-0.05328024551272392,
-0.14315961301326752,
-0.017242804169654846,
-0.048845093697309494,
-0.11807519942522049,
-0.34477463364601135,
-0.18054291605949402
] |
https://github.com/huggingface/datasets/issues/6058 | laion-coco download error | This can also mean one of the files was not downloaded correctly.
We log an erroneous file's name before raising the reader's error, so this is how you can find the problematic file. Then, you should delete it and call `load_dataset` again.
(I checked all the uploaded files, and they seem to be valid Parquet files, so I don't think this is a bug on their side)
| ### Describe the bug
The full trace:
```
/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/load.py:1744: FutureWarning: 'ignore_verifications' was de
precated in favor of 'verification_mode' in version 2.9.1 and will be removed in 3.0.0.
You can remove this warning by passing 'verification_mode=no_checks' instead.
warnings.warn(
Downloading and preparing dataset parquet/laion--laion-coco to /home/bian/.cache/huggingface/datasets/laion___parquet/laion--
laion-coco-cb4205d7f1863066/0.0.0/bcacc8bdaa0614a5d73d0344c813275e590940c6ea8bc569da462847103a1afd...
Downloading data: 100%|β| 1.89G/1.89G [04:57<00:00,
Downloading data files: 100%|β| 1/1 [04:59<00:00, 2
Extracting data files: 100%|β| 1/1 [00:00<00:00, 13
Generating train split: 0 examples [00:00, ? examples/s]<_io.BufferedReader
name='/home/bian/.cache/huggingface/datasets/downlo
ads/26d7a016d25bbd9443115cfa3092136e8eb2f1f5bcd4154
0cb9234572927f04c'>
Traceback (most recent call last):
File "/home/bian/data/ZOC/download_laion_coco.py", line 4, in <module>
dataset = load_dataset("laion/laion-coco", ignore_verifications=True)
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/builder.py", line 1842, in _prepare_split_single
generator = self._generate_tables(**gen_kwargs)
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 67, in
_generate_tables
parquet_file = pq.ParquetFile(f)
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/pyarrow/parquet/core.py", line 323, in __init__
self.reader.open(
File "pyarrow/_parquet.pyx", line 1227, in pyarrow._parquet.ParquetReader.open
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file
.
```
I have carefully followed the instructions in #5264 but still get the same error.
Other helpful information:
```
ds = load_dataset("parquet", data_files=
...: "https://huggingface.co/datasets/laion/l
...: aion-coco/resolve/d22869de3ccd39dfec1507
...: f7ded32e4a518dad24/part-00000-2256f782-1
...: 26f-4dc6-b9c6-e6757637749d-c000.snappy.p
...: arquet")
Found cached dataset parquet (/home/bian/.cache/huggingface/datasets/parquet/default-a02eea00aeb08b0e/0.0.0/bb8ccf89d9ee38581ff5e51506d721a9b37f14df8090dc9b2d8fb4a40957833f)
100%|ββββββββββββββ| 1/1 [00:00<00:00, 4.55it/s]
```
### Steps to reproduce the bug
```
from datasets import load_dataset
dataset = load_dataset("laion/laion-coco", ignore_verifications=True/False)
```
### Expected behavior
Properly load Laion-coco dataset
### Environment info
datasets==2.11.0 torch==1.12.1 python 3.10 | 67 | laion-coco download error
### Describe the bug
The full trace:
```
/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/load.py:1744: FutureWarning: 'ignore_verifications' was de
precated in favor of 'verification_mode' in version 2.9.1 and will be removed in 3.0.0.
You can remove this warning by passing 'verification_mode=no_checks' instead.
warnings.warn(
Downloading and preparing dataset parquet/laion--laion-coco to /home/bian/.cache/huggingface/datasets/laion___parquet/laion--
laion-coco-cb4205d7f1863066/0.0.0/bcacc8bdaa0614a5d73d0344c813275e590940c6ea8bc569da462847103a1afd...
Downloading data: 100%|β| 1.89G/1.89G [04:57<00:00,
Downloading data files: 100%|β| 1/1 [04:59<00:00, 2
Extracting data files: 100%|β| 1/1 [00:00<00:00, 13
Generating train split: 0 examples [00:00, ? examples/s]<_io.BufferedReader
name='/home/bian/.cache/huggingface/datasets/downlo
ads/26d7a016d25bbd9443115cfa3092136e8eb2f1f5bcd4154
0cb9234572927f04c'>
Traceback (most recent call last):
File "/home/bian/data/ZOC/download_laion_coco.py", line 4, in <module>
dataset = load_dataset("laion/laion-coco", ignore_verifications=True)
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/load.py", line 1791, in load_dataset
builder_instance.download_and_prepare(
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/builder.py", line 891, in download_and_prepare
self._download_and_prepare(
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/builder.py", line 986, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/builder.py", line 1748, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/builder.py", line 1842, in _prepare_split_single
generator = self._generate_tables(**gen_kwargs)
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 67, in
_generate_tables
parquet_file = pq.ParquetFile(f)
File "/home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/pyarrow/parquet/core.py", line 323, in __init__
self.reader.open(
File "pyarrow/_parquet.pyx", line 1227, in pyarrow._parquet.ParquetReader.open
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file
.
```
I have carefully followed the instructions in #5264 but still get the same error.
Other helpful information:
```
ds = load_dataset("parquet", data_files=
...: "https://huggingface.co/datasets/laion/l
...: aion-coco/resolve/d22869de3ccd39dfec1507
...: f7ded32e4a518dad24/part-00000-2256f782-1
...: 26f-4dc6-b9c6-e6757637749d-c000.snappy.p
...: arquet")
Found cached dataset parquet (/home/bian/.cache/huggingface/datasets/parquet/default-a02eea00aeb08b0e/0.0.0/bb8ccf89d9ee38581ff5e51506d721a9b37f14df8090dc9b2d8fb4a40957833f)
100%|ββββββββββββββ| 1/1 [00:00<00:00, 4.55it/s]
```
### Steps to reproduce the bug
```
from datasets import load_dataset
dataset = load_dataset("laion/laion-coco", ignore_verifications=True/False)
```
### Expected behavior
Properly load Laion-coco dataset
### Environment info
datasets==2.11.0 torch==1.12.1 python 3.10
This can also mean one of the files was not downloaded correctly.
We log an erroneous file's name before raising the reader's error, so this is how you can find the problematic file. Then, you should delete it and call `load_dataset` again.
(I checked all the uploaded files, and they seem to be valid Parquet files, so I don't think this is a bug on their side)
| [
0.081344835460186,
0.1597602516412735,
-0.021920178085565567,
0.15518777072429657,
0.260034441947937,
0.024137603119015694,
0.057716481387615204,
-0.1319001317024231,
-0.14000791311264038,
-0.14709801971912384,
0.06153075024485588,
0.01907280832529068,
-0.038098905235528946,
0.09076563268899918,
-0.059208307415246964,
0.01609748601913452,
0.013086933642625809,
0.12460490316152573,
0.07877800613641739,
0.04691235348582268,
-0.09388864040374756,
0.10332798957824707,
0.12057564407587051,
-0.11010957509279251,
0.22580288350582123,
-0.23723606765270233,
-0.03772222250699997,
-0.02401716075837612,
-0.11169636249542236,
-0.24033603072166443,
0.3347042500972748,
-0.015379022806882858,
-0.10640696436166763,
0.1955762505531311,
0.000005590562977886293,
-0.10599489510059357,
0.2590801417827606,
0.08612979203462601,
-0.13777245581150055,
0.03962969407439232,
-0.05030258372426033,
-0.03108753077685833,
-0.0882609486579895,
-0.050913017243146896,
0.04990425705909729,
-0.002871086122468114,
-0.03615311160683632,
-0.08962138742208481,
0.13648918271064758,
0.052652373909950256,
0.03905664384365082,
-0.019111404195427895,
0.11641418933868408,
-0.18402419984340668,
0.05217047035694122,
-0.029467973858118057,
0.12651179730892181,
0.1483221799135208,
-0.19293703138828278,
-0.11793869733810425,
0.07105127722024918,
0.11625510454177856,
0.07433151453733444,
-0.12517395615577698,
-0.0724777951836586,
0.006329343654215336,
0.059892356395721436,
-0.29671168327331543,
-0.08383563905954361,
0.23708033561706543,
0.10212445259094238,
0.13668328523635864,
-0.25413617491722107,
-0.034871332347393036,
0.06048739701509476,
-0.33385685086250305,
0.06324159353971481,
0.1681186705827713,
0.03476254642009735,
-0.03302044793963432,
-0.14609672129154205,
-0.08185964077711105,
-0.052044693380594254,
0.022413285449147224,
-0.024950852617621422,
-0.10803643614053726,
-0.0933198556303978,
-0.006790999323129654,
0.037430036813020706,
-0.13431860506534576,
0.2813500761985779,
-0.09017926454544067,
-0.12716025114059448,
-0.1458376944065094,
0.10872264206409454,
0.006319645792245865,
0.22574761509895325,
0.038911961019039154,
0.030828583985567093,
-0.04030818119645119,
-0.022887036204338074,
-0.16167575120925903,
-0.0796351209282875,
-0.0028065848164260387,
0.07193653285503387,
0.06966856122016907,
0.004342579282820225,
0.0009475841070525348,
0.19844259321689606,
0.16745544970035553,
0.22266966104507446,
0.03157873824238777,
-0.09819874912500381,
0.12017298489809036,
-0.03481271490454674,
0.15251094102859497,
0.04369479417800903,
0.03341687098145485,
-0.005618720781058073,
0.025456808507442474,
0.1788683980703354,
0.15282966196537018,
-0.08299913257360458,
0.24326500296592712,
-0.17564910650253296,
-0.01455090381205082,
-0.010285278782248497,
0.14681340754032135,
0.04676374793052673,
-0.02114981971681118,
-0.007183877285569906,
0.12347284704446793,
-0.044806528836488724,
-0.12229762971401215,
0.08683615922927856,
-0.08560460805892944,
0.041738271713256836,
0.05438200756907463,
0.10475269705057144,
0.039173584431409836,
0.019762050360441208,
-0.2701994776725769,
-0.13013102114200592,
0.027581704780459404,
-0.06162705644965172,
-0.08639701455831528,
0.08986719697713852,
0.07531104236841202,
-0.03186545521020889,
-0.055565379559993744,
-0.14263798296451569,
0.12674206495285034,
-0.0380902998149395,
-0.096860870718956,
-0.2646860182285309,
0.05941291153430939,
0.07937847077846527,
-0.1246848851442337,
-0.0859992653131485,
0.03595581278204918,
-0.032950509339571,
0.12223366647958755,
0.06506392359733582,
-0.14171670377254486,
0.26096072793006897,
-0.006494523026049137,
0.037380363792181015,
-0.08085602521896362,
-0.11395690590143204,
-0.1847003847360611,
0.1590564250946045,
0.11810293793678284,
0.04473414644598961,
0.17248103022575378,
-0.10860100388526917,
0.029405754059553146,
-0.08857463300228119,
-0.06284453719854355,
-0.3011617958545685,
0.13267910480499268,
-0.02705942466855049,
0.08875226229429245,
-0.07262751460075378,
-0.042451802641153336,
-0.13583043217658997,
-0.0033333315514028072,
-0.023530486971139908,
-0.01443925965577364,
-0.018350403755903244,
-0.1843142807483673,
-0.07792690396308899,
-0.005686993710696697,
0.15479527413845062,
-0.07703757286071777,
0.04348592832684517,
-0.056251149624586105,
0.16960857808589935,
-0.047405507415533066,
0.042392946779727936,
-0.14795801043510437,
0.038182102143764496,
-0.10925694555044174,
0.018237095326185226,
0.07549623399972916,
0.004512924700975418,
-0.01527120266109705,
-0.15337398648262024,
0.031128542497754097,
0.07823724299669266,
-0.012037238106131554,
-0.272514283657074,
-0.09327664226293564,
0.03941347450017929,
0.0817672461271286,
0.043228693306446075,
0.06897091865539551,
-0.08983805775642395,
-0.01405807863920927,
-0.008915516547858715,
0.1620129495859146,
-0.06735847145318985,
0.20205473899841309,
-0.05388341099023819,
0.04138008877635002,
0.02393602766096592,
-0.024183817207813263,
0.034137483686208725,
-0.019651062786579132,
0.20001552999019623,
0.09561371058225632,
-0.065800741314888,
-0.17975901067256927,
0.11569765955209732,
-0.0013991770101711154,
-0.06879479438066483,
0.09710972011089325,
-0.11432244628667831,
-0.24099969863891602,
0.16227728128433228,
-0.03174404054880142,
-0.045362506061792374,
0.013620112091302872,
0.06364366412162781,
0.06886924803256989,
0.10777638107538223,
-0.12941966950893402,
-0.13278856873512268,
-0.06203671544790268,
-0.05585700646042824,
-0.20816992223262787,
0.18713787198066711,
0.09574727714061737,
-0.03342768922448158,
-0.05082700401544571,
0.009318635798990726,
0.024084437638521194,
-0.09631000459194183,
0.03960920870304108,
-0.17773981392383575,
-0.18325179815292358,
0.15256895124912262,
0.1014370545744896,
-0.021704182028770447,
0.09697319567203522,
0.34256255626678467,
0.08930056542158127,
0.055156439542770386,
0.14547361433506012,
0.16044209897518158,
0.047500744462013245,
-0.12131417542695999,
-0.15398229658603668,
-0.12870514392852783,
-0.05519843101501465,
-0.1449873447418213,
-0.12229934334754944,
0.2553403079509735,
0.053393684327602386,
0.08147700875997543,
0.1913464218378067,
-0.14106029272079468,
-0.025938158854842186,
0.06662857532501221,
-0.06998024880886078,
0.11567995697259903,
0.07627885788679123,
-0.02199595794081688,
-0.1235395222902298,
0.01891760155558586,
-0.012475957162678242,
-0.028658311814069748,
0.03823073208332062,
-0.008816972374916077,
-0.06996002048254013,
-0.07637584209442139,
-0.08373679220676422,
-0.2915981709957123,
-0.12687663733959198,
0.12979163229465485,
0.19328844547271729,
-0.014384588226675987,
-0.03593678027391434,
-0.002911236835643649,
0.025614667683839798,
0.21106499433517456,
-0.06764107197523117,
0.2754778563976288,
-0.0712539553642273,
0.08400656282901764,
-0.17466577887535095,
0.01299762912094593,
-0.12731587886810303,
0.07123139500617981,
-0.11453375965356827,
0.09386733174324036,
-0.14662185311317444,
0.22278501093387604,
-0.05036851391196251,
0.011619730852544308,
0.11963178962469101,
0.017838500440120697,
0.03785013407468796,
-0.09022335708141327,
0.14108708500862122,
-0.05608335882425308,
-0.03982758894562721,
-0.1346615105867386,
-0.13788048923015594,
-0.02630891464650631,
-0.03449654206633568,
-0.00010279323032591492,
0.07232227921485901,
-0.15730006992816925,
-0.07136911153793335,
-0.018182359635829926,
-0.06792759150266647,
-0.0571899339556694,
0.0030526884365826845,
0.307864248752594,
0.0650218054652214,
-0.020323527976870537,
-0.16630175709724426,
-0.12580381333827972,
0.116090789437294,
0.04757782071828842,
-0.07574915885925293,
-0.012913591228425503,
0.10811670124530792,
0.007824361324310303,
-0.13385209441184998,
-0.0643739253282547,
0.007438929285854101,
-0.03313928097486496,
0.00240131258033216,
-0.07441792637109756,
0.06388572603464127,
-0.07292692363262177,
0.11101579666137695,
0.04874258488416672,
0.05513237044215202,
0.11561470478773117,
0.05515119060873985,
-0.030861005187034607,
0.23817147314548492,
-0.22959043085575104,
0.16682253777980804,
0.007088485173881054,
0.14746035635471344,
-0.022990891709923744,
-0.1682845801115036,
-0.024050584062933922,
-0.13075469434261322,
-0.0646589994430542,
0.12047289311885834,
-0.016613835468888283,
-0.027565978467464447,
-0.12431733310222626,
-0.005712347570806742,
0.06361761689186096,
0.0939735695719719,
-0.036057356745004654,
-0.06940419226884842,
-0.010696113109588623,
0.16006341576576233,
0.051277417689561844,
0.06673669815063477,
-0.10093710571527481,
0.044881436973810196,
-0.0026459340006113052,
0.10815814137458801,
0.004668777342885733,
-0.03245599567890167,
-0.15994541347026825,
-0.06655208021402359,
-0.000545646355021745,
-0.13748799264431,
0.2187841832637787,
0.14317871630191803,
-0.03205322101712227,
-0.05526377633213997,
0.033137768507003784,
0.15717285871505737,
-0.0491100512444973,
0.09987854957580566,
-0.02020796202123165,
0.04941520467400551,
0.12657132744789124,
-0.04577787593007088,
-0.011038554832339287,
-0.08512364327907562,
0.18214735388755798,
0.1467253416776657,
-0.0055057876743376255,
0.1016739010810852,
0.037320684641599655,
0.06118228659033775,
0.018225787207484245,
-0.04723009094595909,
-0.014236132614314556,
-0.20711013674736023,
-0.14964361488819122,
-0.15639421343803406,
-0.10282563418149948,
0.2308865338563919,
-0.13014543056488037,
-0.09090319275856018,
0.19993090629577637,
-0.0451841801404953,
0.14854179322719574,
-0.01582673378288746,
0.02422933839261532,
-0.0928456112742424,
0.0395093597471714,
-0.03330818936228752,
0.10892358422279358,
0.011827916838228703,
0.37564727663993835,
0.011789319105446339,
-0.03626881539821625,
0.006734543479979038,
-0.24013635516166687,
-0.08315442502498627,
0.2180451899766922,
0.10749121755361557,
0.07909230887889862,
-0.07534945756196976,
-0.06748531013727188,
0.04994121938943863,
0.06842450797557831,
-0.13278520107269287,
-0.09610526263713837,
-0.158307746052742,
0.022867171093821526,
-0.26725247502326965,
0.006696237716823816,
-0.05455280840396881,
0.1962309330701828,
-0.020270749926567078,
-0.041414376348257065,
0.035934388637542725,
-0.1054789274930954,
-0.05295160040259361,
-0.1981278955936432,
-0.057497937232255936,
0.039706192910671234,
0.06250341236591339,
0.2589070498943329,
-0.21076032519340515,
0.056259747594594955,
0.124557264149189,
-0.1765807718038559,
0.14841604232788086,
-0.16796697676181793,
0.04036104306578636,
0.15590015053749084,
0.004646201618015766,
0.07956814765930176,
-0.07989969849586487,
-0.060301776975393295,
-0.026761597022414207,
0.2832937240600586,
-0.1306663304567337,
0.014372247271239758,
-0.1616106927394867,
-0.11963491886854172,
0.213972270488739,
0.045046366751194,
-0.010224452242255211,
-0.09836669266223907,
-0.14167888462543488,
0.12297580391168594,
-0.11332384496927261,
-0.012409170158207417,
-0.05421442911028862,
0.2818574011325836,
-0.13021984696388245,
0.024829210713505745,
0.007385358680039644,
0.13138259947299957,
0.13661262392997742,
0.06736598163843155,
0.05172078311443329,
0.005071017425507307,
-0.00274272239767015,
-0.05262801796197891,
0.030288944020867348,
0.09168580919504166,
-0.05557553470134735,
-0.023427212610840797,
-0.10106970369815826,
0.029298508539795876,
0.02245347946882248,
-0.07451963424682617,
0.09203816950321198,
-0.17058447003364563,
0.01112903282046318,
-0.0008936253725551069,
0.004204615950584412,
0.00897595752030611,
0.08368030935525894,
0.17872999608516693,
-0.18368476629257202,
-0.1271446943283081,
-0.08600275963544846,
-0.11060524731874466,
0.07108330726623535,
-0.12002112716436386,
0.0034970964770764112,
0.13138489425182343,
0.013161903247237206,
0.040358833968639374,
0.20460087060928345,
0.03061811812222004,
-0.049577873200178146,
-0.11362425982952118,
0.08028336614370346,
0.08099842071533203,
-0.08037443459033966,
-0.001089017721824348,
-0.022194862365722656,
-0.03780919685959816,
-0.2198859453201294,
0.04867943748831749,
0.14886468648910522,
0.2730709910392761,
0.2925267219543457,
-0.0012066913768649101,
-0.03409569337964058,
-0.07166951149702072,
-0.062257278710603714,
0.10151931643486023,
0.11511242389678955,
0.09112071245908737,
0.03277524188160896,
0.05860915780067444,
-2.3178246264616197e-32,
-0.12867549061775208,
-0.011414527893066406,
0.055288925766944885,
0.0737910196185112,
-0.22908902168273926,
0.06180057302117348,
-0.09055765718221664,
0.026214029639959335,
-0.05011387914419174,
-0.09003174304962158,
-0.004499454516917467,
-0.03612592816352844,
-0.004153508692979813,
0.04818957671523094,
0.14735785126686096,
0.0073541621677577496,
0.09049996733665466,
-0.009175218641757965,
0.03148861229419708,
0.008636445738375187,
0.06655251979827881,
-0.007389315869659185,
-0.1751980185508728,
0.02517825923860073,
0.07794836908578873,
0.07075051963329315,
-0.16094830632209778,
0.05066271498799324,
0.05234656110405922,
0.03923395648598671,
-0.18343225121498108,
-0.01669965498149395,
0.04691143333911896,
0.1129990741610527,
-0.2689302861690521,
-0.24220505356788635,
-0.24897131323814392,
-0.06111285090446472,
-0.08907420933246613,
0.19848187267780304,
0.0343242771923542,
0.037882596254348755,
0.04650277644395828,
-0.07708544284105301,
-0.03549112752079964,
0.12609809637069702,
0.05220421031117439,
-0.0784153938293457,
0.042665913701057434,
-0.02554907836019993,
-0.10693304240703583,
-0.1514502614736557,
-0.08062957227230072,
0.06966383010149002,
0.060086265206336975,
0.025876730680465698,
-0.06956504285335541,
0.23523639142513275,
-0.04775698110461235,
-0.09100298583507538,
0.10730410367250443,
-0.17939823865890503,
0.2428416758775711,
-0.09854243695735931,
-0.036544423550367355,
0.1811961680650711,
0.1610671728849411,
-0.10813981294631958,
-0.07059428840875626,
-0.09895796328783035,
-0.04398884251713753,
0.1255040019750595,
-0.011065484955906868,
-0.06487651914358139,
-0.1383695751428604,
-0.15631461143493652,
-0.041019655764102936,
-0.025427596643567085,
0.008066884241998196,
-0.06172652170062065,
0.10092607140541077,
0.00727717112749815,
0.0019413967384025455,
-0.08240696042776108,
-0.09095527976751328,
0.04740869253873825,
-0.14777535200119019,
0.0029449292924255133,
-0.0722542256116867,
-0.06755775213241577,
0.014746489934623241,
0.08576961606740952,
0.001956208376213908,
-0.17096978425979614,
-0.1232978031039238,
-0.10407218337059021,
0.008207462728023529,
0.013872014358639717,
-0.2028511017560959,
0.009422900155186653,
-0.159270778298378,
0.014496960677206516,
-0.054409198462963104,
-0.07022731006145477,
0.045421525835990906,
0.23981770873069763,
0.11562393605709076,
0.12057003378868103,
0.002158283954486251,
-0.08653333783149719,
-0.007363906130194664,
-0.02292645536363125,
0.22943313419818878,
0.20912106335163116,
0.1682622730731964,
0.05111924186348915,
0.03804909437894821,
-0.053846172988414764,
0.11402343958616257,
0.024590635672211647,
-0.18084914982318878,
0.07261839509010315,
-0.04141334071755409,
0.04386186599731445,
-0.10510879755020142,
0.04905231297016144,
-0.10141420364379883,
-0.06488490849733353,
-0.1286289393901825,
-0.020154638215899467,
0.17356713116168976,
-0.14638900756835938,
6.971127390897891e-7,
-0.24453136324882507,
0.14913862943649292,
0.1141887754201889,
-0.04490962252020836,
0.04717306047677994,
-0.09375955164432526,
-0.26135528087615967,
-0.11373576521873474,
-0.08678260445594788,
0.08711710572242737,
0.021500594913959503,
-0.11283393204212189,
-0.11525728553533554,
0.14275842905044556,
0.11077951639890671,
0.02200045809149742,
0.06161351874470711,
-0.10878296941518784,
-0.07883236557245255,
0.0055425167083740234,
0.0003737768274731934,
0.032252777367830276,
0.21102282404899597,
-0.0009137914166785777,
0.006811555474996567,
-0.09172668308019638,
-0.16910460591316223,
0.02355526201426983,
-0.031030502170324326,
-0.03115846961736679,
0.056949175894260406,
0.16938431560993195,
0.0077433218248188496,
0.1236104890704155,
0.03873233124613762,
-0.096138596534729,
-0.054869383573532104,
-0.005016488954424858,
0.044196054339408875,
0.056276168674230576,
0.0002357572957407683,
-0.020567534491419792,
0.004110915120691061,
0.078748919069767,
0.1495278775691986,
0.18965700268745422,
0.03491465374827385,
-0.003899405477568507,
0.031587205827236176,
0.09626691788434982,
-0.04459946230053902,
0.07735339552164078,
0.17247870564460754,
0.05392532795667648,
-0.08428095281124115,
-0.030971862375736237,
-0.025133734568953514,
0.04704885184764862,
0.14747044444084167,
-0.15422293543815613,
-0.13356664776802063,
-0.07450026273727417,
0.11233028024435043,
0.10756886005401611,
-0.01815246231853962,
-0.04769282788038254,
-0.12460390478372574,
-2.258886739054763e-35,
-0.01036278810352087,
0.08575569093227386,
0.05229755863547325,
-0.0644875168800354,
-0.049277037382125854,
-0.06274042278528214,
0.08169519156217575,
-0.18690265715122223,
0.02220170944929123,
0.0004069969290867448,
-0.09489715099334717
] |
https://github.com/huggingface/datasets/issues/6057 | Why is the speed difference of gen example so big? | Hi!
It's hard to explain this behavior without more information. Can you profile the slower version with the following code
```python
import cProfile, pstats
from datasets import load_dataset
with cProfile.Profile() as profiler:
ds = load_dataset(...)
stats = pstats.Stats(profiler).sort_stats("cumtime")
stats.print_stats()
```
and share the output? | ```python
def _generate_examples(self, metadata_path, images_dir, conditioning_images_dir):
with open(metadata_path, 'r') as file:
metadata = json.load(file)
for idx, item in enumerate(metadata):
image_path = item.get('image_path')
text_content = item.get('text_content')
image_data = open(image_path, "rb").read()
yield idx, {
"text": text_content,
"image": {
"path": image_path,
"bytes": image_data,
},
"conditioning_image": {
"path": image_path,
"bytes": image_data,
},
}
```
Hello,
I use the above function to deal with my local data set, but I am very surprised that the speed at which I generate example is very different. When I start a training task, **sometimes 1000examples/s, sometimes only 10examples/s.**
![image](https://github.com/huggingface/datasets/assets/46072190/cdc17661-8267-4fd8-b30c-b74d505efd9b)
I'm not saying that speed is changing all the time. I mean, the reading speed is different in different training, which will cause me to start training over and over again until the speed of this generation of examples is normal.
| 44 | Why is the speed difference of gen example so big?
```python
def _generate_examples(self, metadata_path, images_dir, conditioning_images_dir):
with open(metadata_path, 'r') as file:
metadata = json.load(file)
for idx, item in enumerate(metadata):
image_path = item.get('image_path')
text_content = item.get('text_content')
image_data = open(image_path, "rb").read()
yield idx, {
"text": text_content,
"image": {
"path": image_path,
"bytes": image_data,
},
"conditioning_image": {
"path": image_path,
"bytes": image_data,
},
}
```
Hello,
I use the above function to deal with my local data set, but I am very surprised that the speed at which I generate example is very different. When I start a training task, **sometimes 1000examples/s, sometimes only 10examples/s.**
![image](https://github.com/huggingface/datasets/assets/46072190/cdc17661-8267-4fd8-b30c-b74d505efd9b)
I'm not saying that speed is changing all the time. I mean, the reading speed is different in different training, which will cause me to start training over and over again until the speed of this generation of examples is normal.
Hi!
It's hard to explain this behavior without more information. Can you profile the slower version with the following code
```python
import cProfile, pstats
from datasets import load_dataset
with cProfile.Profile() as profiler:
ds = load_dataset(...)
stats = pstats.Stats(profiler).sort_stats("cumtime")
stats.print_stats()
```
and share the output? | [
0.03347160294651985,
-0.038688190281391144,
-0.09599947184324265,
0.18813858926296234,
0.021449360996484756,
-0.06790824979543686,
0.02205733209848404,
0.08497580885887146,
-0.1829366832971573,
0.07225446403026581,
0.13629233837127686,
-0.1566338688135147,
-0.020995311439037323,
-0.05542675405740738,
-0.15723653137683868,
-0.03450637310743332,
-0.0233902670443058,
-0.041973065584897995,
-0.020396793261170387,
-0.03338522091507912,
0.020526478067040443,
-0.08402499556541443,
-0.001893088803626597,
-0.1304067224264145,
-0.03312714770436287,
-0.07597076147794724,
-0.022843504324555397,
0.030697165057063103,
-0.07294123619794846,
-0.13388529419898987,
-0.08977970480918884,
0.023449411615729332,
-0.12025408446788788,
0.2545747756958008,
0.0000056394901548628695,
-0.050602640956640244,
0.19681879878044128,
0.1271601766347885,
-0.0875416025519371,
0.19598741829395294,
0.276333749294281,
0.04683714732527733,
-0.02096274308860302,
0.09141913056373596,
-0.01237794104963541,
0.011904465965926647,
-0.20004890859127045,
-0.10284686833620071,
-0.1129203513264656,
0.038376372307538986,
-0.03343600034713745,
0.19755303859710693,
-0.3477705419063568,
0.030275169759988785,
0.021907784044742584,
-0.03758374601602554,
-0.15196916460990906,
0.09591186046600342,
-0.08452555537223816,
0.09562242031097412,
0.11041932553052902,
-0.03174338489770889,
0.10144389420747757,
0.17165346443653107,
0.007996886037290096,
0.0694257840514183,
-0.029802881181240082,
-0.017505431547760963,
-0.07820435613393784,
0.20720027387142181,
-0.07878689467906952,
-0.016705181449651718,
-0.01992993988096714,
0.12876951694488525,
-0.11798503249883652,
-0.10075027495622635,
0.009731864556670189,
0.0934966653585434,
-0.15567070245742798,
-0.19717742502689362,
-0.1767684817314148,
0.19773976504802704,
-0.02697913907468319,
0.020004771649837494,
0.008871139958500862,
0.04178214073181152,
0.022553397342562675,
0.032586563378572464,
-0.0272088423371315,
0.0298331156373024,
0.06528659164905548,
-0.10672711580991745,
-0.04424551501870155,
0.09092243015766144,
-0.07849276810884476,
-0.03333256393671036,
-0.05106157436966896,
-0.2717509865760803,
0.07588749378919601,
0.05998585373163223,
0.05127238482236862,
0.06722612679004669,
0.09250845015048981,
-0.03752991557121277,
-0.05836227163672447,
-0.018592961132526398,
-0.07187654078006744,
-0.12668293714523315,
-0.02085573971271515,
0.05798960477113724,
-0.13435104489326477,
0.13448822498321533,
0.09056998789310455,
0.09685485810041428,
0.12323158979415894,
-0.13326898217201233,
-0.06600961834192276,
0.04872263967990875,
0.04201161861419678,
0.07983718812465668,
-0.0670304223895073,
0.02201126143336296,
-0.08602471649646759,
0.07024545967578888,
-0.13851135969161987,
0.009426362812519073,
-0.19776800274848938,
0.04585616663098335,
-0.11946199834346771,
0.184685617685318,
-0.07895825803279877,
-0.12372339516878128,
0.12790389358997345,
0.03410443291068077,
-0.01879711262881756,
-0.004333346150815487,
-0.0023883183021098375,
0.07958599179983139,
-0.09965743124485016,
-0.17248883843421936,
0.09678193181753159,
-0.15378092229366302,
-0.05140558257699013,
0.034596022218465805,
0.009284261614084244,
0.1821916103363037,
-0.10506021976470947,
0.05046657472848892,
-0.006922940257936716,
0.013474241830408573,
0.021524319425225258,
0.056668467819690704,
0.09476511180400848,
0.02658155746757984,
-0.02598627097904682,
0.07939838618040085,
-0.09281351417303085,
-0.0578131265938282,
-0.19101886451244354,
-0.03692566230893135,
0.01773662306368351,
-0.03224475309252739,
-0.08819635212421417,
-0.09025619924068451,
0.08494136482477188,
0.144029900431633,
0.0141283068805933,
0.1544007658958435,
0.05710166320204735,
0.1373443603515625,
0.41452255845069885,
0.054316721856594086,
-0.16176699101924896,
0.09632354229688644,
-0.02089395560324192,
0.08227995038032532,
-0.18760161101818085,
-0.06074487417936325,
0.001767912763170898,
0.07280223071575165,
-0.018097886815667152,
0.07214885205030441,
-0.009338858537375927,
-0.05152396112680435,
0.20175546407699585,
0.03515508025884628,
0.06340368092060089,
0.15371312201023102,
0.04986036568880081,
0.10925648361444473,
-0.0018660362111404538,
0.023352980613708496,
-0.023665884509682655,
-0.006456396542489529,
-0.11356175690889359,
-0.06862299144268036,
-0.13089875876903534,
-0.0476628802716732,
0.20669293403625488,
-0.13833953440189362,
-0.1829543560743332,
0.043394241482019424,
-0.05905580148100853,
0.09049289673566818,
-0.008237866684794426,
0.1756071001291275,
-0.01520988903939724,
0.2011343091726303,
-0.04494727775454521,
-0.1461445391178131,
0.03750617429614067,
0.0014672897523269057,
-0.022988945245742798,
0.044537387788295746,
-0.10376697778701782,
-0.1845603734254837,
-0.19738571345806122,
0.16066737473011017,
0.06775493919849396,
0.12978161871433258,
0.06403021514415741,
0.06360466778278351,
-0.04777134954929352,
0.05845915526151657,
0.003376580774784088,
0.028265928849577904,
-0.007491475902497768,
0.03929651528596878,
-0.07144628465175629,
-0.14755886793136597,
0.0753261148929596,
-0.12006385624408722,
0.06930522620677948,
0.021327782422304153,
0.1617545187473297,
0.1331498771905899,
-0.029085198417305946,
-0.2574942111968994,
0.057319074869155884,
0.11421855539083481,
-0.10617772489786148,
0.014418009668588638,
-0.013332324102520943,
-0.04931594803929329,
-0.021739456802606583,
0.03263187035918236,
0.038978300988674164,
0.12372478097677231,
0.1244824081659317,
-0.19700147211551666,
0.14152966439723969,
0.05954457446932793,
-0.004579236730933189,
0.04982404038310051,
-0.005002142395824194,
0.06375334411859512,
0.15053029358386993,
0.2351704090833664,
0.10436634719371796,
0.16202156245708466,
0.04710150137543678,
0.008353035897016525,
-0.0182377640157938,
0.03971279039978981,
-0.04301690310239792,
-0.11034512519836426,
-0.029100483283400536,
0.022868352010846138,
0.0950484648346901,
0.01526600867509842,
0.12595011293888092,
-0.03893303871154785,
-0.060199763625860214,
-0.07414017617702484,
-0.012186138890683651,
0.022978562861680984,
0.024882465600967407,
-0.12642869353294373,
0.044815704226493835,
0.00991606805473566,
0.0452653169631958,
-0.011505433358252048,
-0.00561925396323204,
0.09850780665874481,
0.16662411391735077,
0.1254669725894928,
-0.012620357796549797,
0.1428033709526062,
-0.08043849468231201,
0.130523219704628,
0.07693830877542496,
-0.023264504969120026,
-0.11834361404180527,
-0.11880291253328323,
0.0072295768186450005,
-0.02899935096502304,
0.20075133442878723,
-0.08123113214969635,
0.07677078992128372,
-0.0326237827539444,
-0.00043035141425207257,
0.17807167768478394,
-0.042705338448286057,
-0.018757538869976997,
0.07941517978906631,
0.15888281166553497,
-0.02763267420232296,
-0.08325643837451935,
-0.3190034031867981,
0.02642703801393509,
-0.005301381926983595,
-0.0806654542684555,
0.07731462270021439,
0.1493719071149826,
-0.03974271938204765,
0.06106272339820862,
-0.0633656457066536,
-0.048939794301986694,
0.13618314266204834,
-0.020137906074523926,
-0.01589009538292885,
-0.013696832582354546,
-0.1611734926700592,
-0.12192917615175247,
0.1253959685564041,
-0.04206475988030434,
-0.009821534156799316,
0.04721085727214813,
-0.017295071855187416,
0.21826648712158203,
0.019142616540193558,
0.11583512276411057,
-0.07001990079879761,
0.02307525835931301,
0.17030714452266693,
0.10274719446897507,
-0.09973850846290588,
-0.12979555130004883,
0.18249624967575073,
0.10535836964845657,
-0.006100069265812635,
-0.03945574536919594,
-0.13016311824321747,
0.07039494812488556,
0.1596348136663437,
-0.20024365186691284,
0.08296820521354675,
-0.23840808868408203,
0.15854348242282867,
0.012362855486571789,
0.0466192252933979,
0.104001984000206,
-0.13462713360786438,
-0.12574104964733124,
-0.11379250138998032,
-0.024665767326951027,
-0.11435066908597946,
-0.11119244247674942,
-0.10118887573480606,
-0.08140193670988083,
0.07270542532205582,
-0.06396373361349106,
0.09202203899621964,
0.21462216973304749,
-0.2688940763473511,
-0.008974623866379261,
-0.16110840439796448,
-0.05481180176138878,
-0.1754809021949768,
0.06140591576695442,
0.06039141118526459,
-0.13312889635562897,
-0.14466604590415955,
0.030290190130472183,
0.08553705364465714,
-0.004769927356392145,
0.04021197929978371,
0.009777242317795753,
-0.04984254762530327,
0.06621113419532776,
0.10750366747379303,
0.03677825629711151,
-0.17074590921401978,
0.021146493032574654,
0.2051348090171814,
-0.055802926421165466,
0.13387590646743774,
0.02175035886466503,
-0.16056981682777405,
-0.015401470474898815,
-0.04253915697336197,
-0.18605472147464752,
-0.0011711959959939122,
0.05786845088005066,
-0.19673696160316467,
0.1687944084405899,
0.15407028794288635,
0.000538246997166425,
0.10129489004611969,
0.235849067568779,
0.05600043386220932,
0.018757224082946777,
0.0016564857214689255,
0.05092805251479149,
0.0021801432594656944,
-0.10959352552890778,
0.010378341190516949,
-0.023674707859754562,
0.05785176530480385,
-0.013002175837755203,
0.12184374779462814,
0.3415527641773224,
0.06181374564766884,
-0.07645239681005478,
0.24929392337799072,
0.20770040154457092,
0.03249087929725647,
0.018862882629036903,
-0.02838307060301304,
-0.1021924838423729,
0.15597592294216156,
-0.1397472620010376,
-0.1232164278626442,
0.10611353814601898,
-0.060861919075250626,
-0.09675566107034683,
0.04465480521321297,
0.03954929858446121,
0.06463577598333359,
0.04299038276076317,
0.06953811645507812,
0.012927377596497536,
0.09918035566806793,
-0.0013838822487741709,
0.020172731950879097,
-0.1553402692079544,
0.2047782838344574,
0.046226389706134796,
0.04451236501336098,
-0.057420648634433746,
-0.047688424587249756,
-0.1521318405866623,
0.08671879023313522,
0.04051393270492554,
0.04257901757955551,
-0.21403853595256805,
-0.10249265283346176,
-0.12735402584075928,
0.023632105439901352,
0.13979968428611755,
-0.036653779447078705,
-0.2352534830570221,
-0.16899840533733368,
-0.05403153970837593,
0.15370137989521027,
-0.05281303450465202,
-0.017326995730400085,
-0.3059111535549164,
0.07950849086046219,
0.06858954578638077,
-0.20136214792728424,
-0.06571555882692337,
0.05040011927485466,
0.11563879996538162,
-0.06453093141317368,
-0.01204682420939207,
0.0378713496029377,
0.05570147559046745,
0.09728452563285828,
-0.11568325012922287,
-0.16761080920696259,
0.047228794544935226,
-0.05848793685436249,
0.177372545003891,
0.09277167916297913,
0.04452963545918465,
-0.04484441503882408,
0.022784944623708725,
0.04088783264160156,
-0.10058513283729553,
0.1361282914876938,
0.09444748610258102,
0.14558283984661102,
-0.15812042355537415,
0.13892166316509247,
0.09849394857883453,
0.1265031397342682,
-0.07833153009414673,
-0.07201862335205078,
-0.2804100811481476,
0.05507689341902733,
0.030073221772909164,
-0.16585767269134521,
0.09850199520587921,
0.005921478848904371,
0.023322075605392456,
-0.04856305196881294,
-0.14969144761562347,
-0.09678977727890015,
-0.06414485722780228,
0.056700557470321655,
-0.09490197896957397,
0.11514150351285934,
-0.08196838200092316,
0.08494257926940918,
0.10328426212072372,
-0.08572458475828171,
0.15638898313045502,
-0.03811347857117653,
0.10234561562538147,
-0.0044219642877578735,
-0.11560959368944168,
-0.03893650695681572,
0.004272296093404293,
-0.013623284175992012,
0.05228323116898537,
-0.06604620814323425,
-0.03533188998699188,
0.09012167900800705,
-0.13714666664600372,
0.14469367265701294,
-0.10823360085487366,
0.07840237766504288,
-0.0841735377907753,
0.006998051423579454,
0.07141240686178207,
-0.1772930920124054,
0.0481465607881546,
0.31045711040496826,
0.19111193716526031,
0.020267842337489128,
0.09074331074953079,
0.16848571598529816,
0.06577635556459427,
-0.10491059720516205,
0.20343440771102905,
0.17252598702907562,
-0.10701371729373932,
0.03586062788963318,
0.033449411392211914,
-0.003994971513748169,
-0.03819978982210159,
-0.020464297384023666,
0.021427825093269348,
0.04435674101114273,
-0.0953877866268158,
-0.011317926459014416,
-0.06433728337287903,
-0.19859473407268524,
-0.08656244724988937,
-0.09230584651231766,
0.09859946370124817,
-0.07704074680805206,
0.026843702420592308,
-0.031081488355994225,
-2.395817060333946e-32,
-0.05460107699036598,
-0.052944619208574295,
0.07608477771282196,
0.027497241273522377,
-0.07063446938991547,
0.08633042126893997,
-0.08852538466453552,
0.03714277967810631,
-0.027515213936567307,
0.05331800505518913,
-0.08410802483558655,
0.0629696249961853,
-0.02427005022764206,
0.09685637056827545,
-0.1525035947561264,
-0.03030441328883171,
0.10985858738422394,
-0.0997985303401947,
0.005859441589564085,
0.0020119831897318363,
0.1183166354894638,
0.13217732310295105,
-0.21613624691963196,
-0.13927026093006134,
-0.12410181015729904,
0.049729470163583755,
0.09966636449098587,
-0.3075283467769623,
0.036003515124320984,
-0.051546454429626465,
-0.07037915289402008,
0.07095899432897568,
-0.1926659643650055,
-0.07626623660326004,
-0.10805840790271759,
-0.17092272639274597,
0.00041512117604725063,
0.08267472684383392,
-0.11121812462806702,
0.19962356984615326,
-0.024579988792538643,
-0.05673488229513168,
0.09796526283025742,
-0.00029901089146733284,
0.002871672622859478,
-0.03412597253918648,
-0.0634777843952179,
0.00494582112878561,
-0.234229177236557,
-0.18716132640838623,
-0.163565993309021,
0.049626920372247696,
0.037240732461214066,
0.024633357301354408,
0.11503074318170547,
-0.28177663683891296,
-0.05468306690454483,
0.10366515815258026,
0.020298197865486145,
-0.11972741782665253,
0.14987555146217346,
0.09879686683416367,
-0.0666048526763916,
-0.03882163017988205,
0.006603332702070475,
-0.03256603702902794,
0.3071116805076599,
0.07683202624320984,
0.2049807459115982,
-0.041999492794275284,
0.11453872919082642,
0.07307451218366623,
-0.0033186275977641344,
-0.0644223690032959,
0.048223476856946945,
-0.04191124066710472,
-0.16672107577323914,
0.14850462973117828,
0.024454578757286072,
-0.19338476657867432,
0.07521852105855942,
-0.08425025641918182,
-0.13640913367271423,
0.10676419734954834,
-0.18679392337799072,
-0.02708611823618412,
-0.034566666930913925,
0.07509098947048187,
0.0004514624597504735,
-0.10676997154951096,
-0.04230561479926109,
0.03586570546030998,
-0.13409100472927094,
-0.08152931183576584,
-0.08097466826438904,
-0.07120823115110397,
-0.23644638061523438,
0.12205888330936432,
-0.05008234083652496,
-0.053760826587677,
-0.049101509153842926,
0.00007497348269680515,
0.02488252893090248,
0.04454931989312172,
0.24639257788658142,
0.00945799145847559,
0.09666415303945541,
-0.10560129582881927,
-0.12211251258850098,
-0.022872334346175194,
-0.09877817332744598,
0.029196519404649734,
-0.0015601558843627572,
-0.16808360815048218,
0.07148119807243347,
-0.13174735009670258,
-0.0618424266576767,
0.018978161737322807,
0.04532330483198166,
0.030131634324789047,
-0.08830318599939346,
-0.174597829580307,
-0.03102409839630127,
0.07678394764661789,
-0.09201454371213913,
0.07190875709056854,
-0.15417906641960144,
-0.05737180635333061,
-0.1580582559108734,
-0.05229988321661949,
-0.04218483716249466,
-0.04041037708520889,
7.390183895950031e-7,
-0.1433112770318985,
0.24246391654014587,
-0.047625552862882614,
0.07113576680421829,
0.027489248663187027,
0.15671777725219727,
-0.15644724667072296,
-0.08044365048408508,
-0.13247883319854736,
0.02868410013616085,
-0.017121700569987297,
0.09889699518680573,
0.1228879764676094,
0.005272907670587301,
0.2715318500995636,
-0.05490497499704361,
0.0945904329419136,
-0.037127453833818436,
-0.12887974083423615,
0.13013553619384766,
-0.09177514910697937,
-0.2109050154685974,
-0.1098865270614624,
-0.04152398928999901,
0.34406277537345886,
-0.013401434756815434,
0.13889166712760925,
0.005393775645643473,
0.21107420325279236,
0.08161626011133194,
0.0033331732265651226,
0.0782875269651413,
-0.05332989990711212,
0.07604683935642242,
-0.015096649527549744,
-0.09464023262262344,
-0.1400984674692154,
-0.0003065729106310755,
0.07396102696657181,
-0.0006884942995384336,
0.09541817009449005,
-0.03611812740564346,
0.12603895366191864,
-0.0001365441275993362,
0.07085660099983215,
0.16200828552246094,
-0.029286377131938934,
-0.02904810756444931,
0.008663112297654152,
0.05203026905655861,
-0.1323603242635727,
0.1565336138010025,
0.044120579957962036,
0.16107946634292603,
0.0911615714430809,
-0.2648012340068817,
-0.07759299129247665,
-0.2736627459526062,
0.06990835070610046,
-0.03526163846254349,
-0.005157841369509697,
-0.07593104243278503,
-0.10323309898376465,
0.09800713509321213,
0.12419488281011581,
0.055558208376169205,
-0.11238069087266922,
1.6507475204203297e-34,
-0.005124009680002928,
0.06110746040940285,
0.16074667870998383,
-0.20225319266319275,
0.07364428043365479,
-0.04905489459633827,
0.18892157077789307,
-0.07522286474704742,
-0.15117938816547394,
0.050749607384204865,
-0.0664861798286438
] |
https://github.com/huggingface/datasets/issues/6051 | Skipping shard in the remote repo and resume upload | Hi! `_select_contiguous` fetches a (zero-copy) slice of the dataset's Arrow table to build a shard, so I don't think this part is the problem. To me, the issue seems to be the step where we embed external image files' bytes (a lot of file reads). You can use `.map` with multiprocessing to perform this step before `push_to_hub` in a faster manner and cache it to disk:
```python
from datasets.table import embed_table_storage
# load_dataset(...)
format = dataset.format
dataset = dataset.with_format("arrow")
dataset = dataset.map(embed_table_storage, batched=True)
dataset = dataset.with_format(**format)
# push_to_hub(...)
```
(In Datasets 3.0, these external bytes will be written to an Arrow file when generating a dataset to avoid this "embed" step) | ### Describe the bug
For some reason when I try to resume the upload of my dataset, it is very slow to reach the index of the shard from which to resume the uploading.
From my understanding, the problem is in this part of the code:
arrow_dataset.py
```python
for index, shard in logging.tqdm(
enumerate(itertools.chain([first_shard], shards_iter)),
desc="Pushing dataset shards to the dataset hub",
total=num_shards,
disable=not logging.is_progress_bar_enabled(),
):
shard_path_in_repo = path_in_repo(index, shard)
# Upload a shard only if it doesn't already exist in the repository
if shard_path_in_repo not in data_files:
```
In particular, iterating the generator is slow during the call:
```python
self._select_contiguous(start, length, new_fingerprint=new_fingerprint)
```
I wonder if it is possible to avoid calling this function for shards that are already uploaded and just start from the correct shard index.
### Steps to reproduce the bug
1. Start the upload
```python
dataset = load_dataset("imagefolder", data_dir=DATA_DIR, split="train", drop_labels=True)
dataset.push_to_hub("repo/name")
```
2. Stop and restart the upload after hundreds of shards
### Expected behavior
Skip the uploaded shards faster.
### Environment info
- `datasets` version: 2.5.1
- Platform: Linux-4.18.0-193.el8.x86_64-x86_64-with-glibc2.17
- Python version: 3.8.16
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
| 111 | Skipping shard in the remote repo and resume upload
### Describe the bug
For some reason when I try to resume the upload of my dataset, it is very slow to reach the index of the shard from which to resume the uploading.
From my understanding, the problem is in this part of the code:
arrow_dataset.py
```python
for index, shard in logging.tqdm(
enumerate(itertools.chain([first_shard], shards_iter)),
desc="Pushing dataset shards to the dataset hub",
total=num_shards,
disable=not logging.is_progress_bar_enabled(),
):
shard_path_in_repo = path_in_repo(index, shard)
# Upload a shard only if it doesn't already exist in the repository
if shard_path_in_repo not in data_files:
```
In particular, iterating the generator is slow during the call:
```python
self._select_contiguous(start, length, new_fingerprint=new_fingerprint)
```
I wonder if it is possible to avoid calling this function for shards that are already uploaded and just start from the correct shard index.
### Steps to reproduce the bug
1. Start the upload
```python
dataset = load_dataset("imagefolder", data_dir=DATA_DIR, split="train", drop_labels=True)
dataset.push_to_hub("repo/name")
```
2. Stop and restart the upload after hundreds of shards
### Expected behavior
Skip the uploaded shards faster.
### Environment info
- `datasets` version: 2.5.1
- Platform: Linux-4.18.0-193.el8.x86_64-x86_64-with-glibc2.17
- Python version: 3.8.16
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
Hi! `_select_contiguous` fetches a (zero-copy) slice of the dataset's Arrow table to build a shard, so I don't think this part is the problem. To me, the issue seems to be the step where we embed external image files' bytes (a lot of file reads). You can use `.map` with multiprocessing to perform this step before `push_to_hub` in a faster manner and cache it to disk:
```python
from datasets.table import embed_table_storage
# load_dataset(...)
format = dataset.format
dataset = dataset.with_format("arrow")
dataset = dataset.map(embed_table_storage, batched=True)
dataset = dataset.with_format(**format)
# push_to_hub(...)
```
(In Datasets 3.0, these external bytes will be written to an Arrow file when generating a dataset to avoid this "embed" step) | [
-0.19209891557693481,
0.3705262839794159,
-0.11031512171030045,
-0.0403558611869812,
-0.027850164100527763,
0.001195711549371481,
0.1436619609594345,
-0.03951389342546463,
-0.2085927426815033,
0.08377373218536377,
0.11735177040100098,
0.020638562738895416,
-0.15090958774089813,
0.11485017836093903,
-0.048220667988061905,
0.05706985667347908,
-0.08640332520008087,
-0.00030692704604007304,
0.10017726570367813,
-0.15095040202140808,
-0.1384526938199997,
-0.0040506538935005665,
0.020306752994656563,
-0.07807327061891556,
0.016573762521147728,
-0.06471908837556839,
-0.07258410006761551,
0.16914889216423035,
0.07883086055517197,
-0.1200641319155693,
0.05242248624563217,
-0.015001586638391018,
-0.19002646207809448,
-0.03746854141354561,
0.0000052653094826382585,
0.13578416407108307,
0.13726593554019928,
0.009515056386590004,
0.034709632396698,
0.06559355556964874,
-0.0032649647910147905,
0.05222246050834656,
0.08031357824802399,
-0.05819893255829811,
0.08648999035358429,
0.19094887375831604,
-0.05443941801786423,
0.04006965085864067,
-0.10052735358476639,
-0.12221414595842361,
-0.05300239846110344,
0.18901340663433075,
-0.13388073444366455,
-0.04710102453827858,
0.03320809453725815,
0.04023613780736923,
-0.09794931858778,
-0.0487947016954422,
-0.078794926404953,
-0.10662984102964401,
-0.1387445628643036,
0.046855609863996506,
-0.05647670850157738,
0.031093567609786987,
0.07131362706422806,
0.07351928949356079,
-0.07779481261968613,
-0.11109644919633865,
0.0011617622803896666,
-0.020058494061231613,
-0.21855485439300537,
-0.039146680384874344,
0.003435470862314105,
-0.046069927513599396,
-0.10548514872789383,
-0.22235076129436493,
-0.0756746381521225,
-0.012910338118672371,
-0.07552926242351532,
0.0997367575764656,
-0.09131414443254471,
-0.0108456090092659,
-0.0547715499997139,
0.09394296258687973,
-0.1626732051372528,
-0.1354462206363678,
0.06317919492721558,
0.09084706753492355,
0.019762536510825157,
0.008160845376551151,
-0.0769582986831665,
0.001673176302574575,
-0.13677142560482025,
-0.0986487865447998,
-0.290505051612854,
-0.04628502577543259,
0.13769294321537018,
-0.10127224773168564,
0.015726689249277115,
0.02353053167462349,
-0.07497549057006836,
0.12932442128658295,
0.09081302583217621,
0.11853794008493423,
0.06254676729440689,
-0.08170430362224579,
0.01219550333917141,
-0.04228655993938446,
0.02782043069601059,
0.16997581720352173,
-0.036029715090990067,
0.17617343366146088,
0.031456757336854935,
0.020351940765976906,
0.13455025851726532,
-0.037089403718709946,
0.2975780665874481,
0.21373040974140167,
-0.036127686500549316,
0.09611406177282333,
0.07886181771755219,
0.12220776826143265,
-0.012695284560322762,
0.10940193384885788,
0.0116289546713233,
0.032756507396698,
-0.040861956775188446,
-0.04176315665245056,
-0.03963853791356087,
0.09857377409934998,
0.004984768573194742,
-0.030519865453243256,
0.1560063660144806,
-0.04986157640814781,
0.04603318125009537,
-0.026504000648856163,
0.04157121479511261,
-0.0015240024076774716,
0.269959956407547,
0.04238773137331009,
0.08752591162919998,
-0.05113880708813667,
0.13379286229610443,
0.05120081827044487,
-0.0055616856552660465,
0.16692452132701874,
0.0634545311331749,
0.013671983033418655,
-0.13749024271965027,
0.190303772687912,
-0.05233796313405037,
0.018231341615319252,
-0.153598353266716,
-0.004597347695380449,
-0.2090386301279068,
-0.014489848166704178,
-0.12548606097698212,
-0.18671558797359467,
-0.24302248656749725,
0.018449759110808372,
0.14495131373405457,
-0.07621246576309204,
-0.08804140985012054,
-0.07660967111587524,
0.030450958758592606,
0.023253275081515312,
0.0712740570306778,
0.11846328526735306,
-0.11141563951969147,
-0.09116748720407486,
0.09961078315973282,
-0.14969123899936676,
-0.06458303332328796,
-0.08344750106334686,
-0.015855157747864723,
0.318458616733551,
-0.046955786645412445,
0.06626462191343307,
-0.11192204803228378,
-0.0808977484703064,
-0.024273227900266647,
0.11333254724740982,
-0.15586179494857788,
0.0320587232708931,
0.07604362815618515,
-0.10929249227046967,
-0.004705215338617563,
0.19053325057029724,
-0.12191236019134521,
0.10101033747196198,
0.06129869818687439,
0.16226936876773834,
-0.11951272189617157,
0.22000889480113983,
-0.11003173142671585,
-0.05650261044502258,
0.03151997551321983,
0.0038550077006220818,
0.19941949844360352,
-0.045366887003183365,
0.04241254925727844,
-0.07441838085651398,
0.06160806864500046,
-0.07254225015640259,
0.11600378900766373,
0.039222247898578644,
-0.2183982878923416,
0.1974722295999527,
0.08294806629419327,
-0.19701257348060608,
-0.11447561532258987,
0.05992601811885834,
-0.03408645838499069,
0.0031845911871641874,
-0.12903262674808502,
0.07845253497362137,
0.01479258481413126,
-0.12727434933185577,
-0.15471391379833221,
0.061412304639816284,
-0.043197911232709885,
0.02613522671163082,
-0.07298693805932999,
0.07227037847042084,
-0.08935387432575226,
0.010387768037617207,
0.04486889764666557,
0.0651848241686821,
0.14945334196090698,
-0.19488586485385895,
-0.014234053902328014,
-0.036487750709056854,
0.15995188057422638,
0.10236702114343643,
-0.12554025650024414,
0.1212390661239624,
0.05732225999236107,
-0.14000974595546722,
0.004451577086001635,
-0.02119235135614872,
-0.07484902441501617,
-0.031078502535820007,
-0.005259504541754723,
0.10668158531188965,
0.004363174084573984,
0.0006714439950883389,
-0.049215082079172134,
0.18606989085674286,
0.0626804381608963,
-0.06066317856311798,
-0.04355921223759651,
0.12822210788726807,
-0.04310986399650574,
-0.03628658130764961,
0.12075530737638474,
0.12061510235071182,
0.1868274211883545,
0.07639805227518082,
-0.06647501140832901,
0.18985489010810852,
0.26138946413993835,
-0.03331023454666138,
0.02321680076420307,
0.1026216670870781,
-0.08172203600406647,
0.05612296238541603,
0.04811404272913933,
0.2030363380908966,
-0.0005275470903143287,
0.0503377839922905,
0.03815979138016701,
-0.0690813809633255,
-0.11042369902133942,
0.029565468430519104,
-0.13368603587150574,
0.0818689838051796,
0.06740980595350266,
-0.014390815049409866,
0.17924275994300842,
-0.1837553083896637,
-0.10651081055402756,
0.018546106293797493,
0.16993477940559387,
-0.09291362017393112,
0.1478836089372635,
0.006698708049952984,
-0.06621543318033218,
-0.006870129611343145,
0.026890534907579422,
-0.13521982729434967,
-0.1682773232460022,
-0.26202821731567383,
0.0027407852467149496,
0.044453177601099014,
0.12743431329727173,
-0.05891002342104912,
0.0933876782655716,
-0.18426363170146942,
-0.0793151929974556,
-0.17146353423595428,
-0.053735293447971344,
0.02609649859368801,
0.13529306650161743,
0.046697087585926056,
0.045445580035448074,
0.12013937532901764,
0.15288183093070984,
0.08138313889503479,
-0.1004336029291153,
-0.0989876538515091,
0.03894516080617905,
0.06858690828084946,
-0.09435397386550903,
-0.021953780204057693,
0.06089874356985092,
-0.13272735476493835,
-0.09589262306690216,
-0.02501574344933033,
-0.006839719135314226,
-0.03943854197859764,
-0.08423295617103577,
0.09632271528244019,
-0.09983975440263748,
0.15153272449970245,
-0.05964083969593048,
-0.0028052087873220444,
-0.04315785691142082,
0.11574440449476242,
-0.045992594212293625,
0.13948722183704376,
0.025412404909729958,
-0.0037012635730206966,
-0.10918847471475601,
0.05072673410177231,
0.001603405922651291,
-0.060080498456954956,
-0.05328028276562691,
-0.19888824224472046,
0.24435262382030487,
0.057853762060403824,
0.12912389636039734,
-0.04777967184782028,
-0.06209227442741394,
-0.05466564744710922,
0.13388711214065552,
-0.1899363249540329,
-0.07470829784870148,
-0.2030164897441864,
0.13818320631980896,
0.05120149254798889,
-0.10198657214641571,
0.009121735580265522,
-0.09248774498701096,
-0.08931073546409607,
-0.0873747393488884,
0.09805431962013245,
-0.16093376278877258,
0.11826828122138977,
-0.15770216286182404,
0.018157176673412323,
0.03869815170764923,
0.20196372270584106,
0.35965752601623535,
-0.07929152995347977,
0.047952499240636826,
-0.023275461047887802,
0.03291424363851547,
0.10088758170604706,
-0.018024928867816925,
-0.052551914006471634,
-0.12390617281198502,
0.026530161499977112,
-0.1507892608642578,
-0.05788435414433479,
0.019901292398571968,
-0.07322706282138824,
0.11532627046108246,
-0.21957078576087952,
0.1507657766342163,
-0.1549881398677826,
-0.0016960118664428592,
-0.06712102890014648,
0.000009839250196819194,
0.060155805200338364,
0.05436217412352562,
-0.020248740911483765,
0.03709875047206879,
0.03927383944392204,
0.04240532964468002,
0.17834287881851196,
-0.03607206046581268,
0.03354692831635475,
0.06746086478233337,
-0.13859397172927856,
-0.09270907938480377,
-0.002934188349172473,
0.037628501653671265,
0.07630947977304459,
-0.02675602026283741,
0.03894120454788208,
-0.004230300895869732,
0.13420923054218292,
-0.0299918744713068,
0.22453171014785767,
0.10210675746202469,
-0.17464733123779297,
-0.09620959311723709,
0.05021718889474869,
0.1539907157421112,
0.06939392536878586,
0.020290696993470192,
-0.023121247068047523,
0.07485665380954742,
0.020099863409996033,
0.17751628160476685,
0.06057275831699371,
-0.06522930413484573,
-0.17003710567951202,
-0.04040878266096115,
0.03245289996266365,
-0.23398299515247345,
-0.029729247093200684,
0.127744659781456,
-0.13998189568519592,
-0.03849829360842705,
0.08249784260988235,
-0.07783329486846924,
0.03398393467068672,
0.007133791223168373,
-0.09059057384729385,
-0.08608727157115936,
-0.004063517786562443,
0.2504713535308838,
-0.06927342712879181,
0.11449626833200455,
0.06889869272708893,
0.09883339703083038,
0.04031865671277046,
-0.06926006823778152,
-0.00797601044178009,
-0.23527143895626068,
0.08688384294509888,
0.20703056454658508,
-0.09763499349355698,
0.173378124833107,
-0.08137577772140503,
0.006523657590150833,
0.08390962332487106,
-0.1436469703912735,
0.07327031344175339,
-0.19316814839839935,
-0.11954019218683243,
0.13823451101779938,
-0.09412774443626404,
0.10289601981639862,
0.021097442135214806,
-0.0054905107244849205,
0.10097364336252213,
0.12121986597776413,
0.11464932560920715,
-0.15801317989826202,
-0.08868121355772018,
0.04875791072845459,
0.00941229797899723,
-0.18478237092494965,
0.16857601702213287,
0.06620331853628159,
-0.00481367064639926,
0.017253505066037178,
-0.12784340977668762,
-0.19689048826694489,
0.09335970878601074,
-0.057289473712444305,
-0.005953265354037285,
0.1077645868062973,
0.13330624997615814,
0.019609859213232994,
-0.05434320867061615,
-0.03093729354441166,
-0.05562864989042282,
0.0956222414970398,
0.03293090686202049,
0.10313412547111511,
0.021055353805422783,
-0.04341190680861473,
0.15488150715827942,
-0.07518178969621658,
0.0664139986038208,
-0.09376267343759537,
0.032566189765930176,
0.03317681699991226,
-0.04171053320169449,
-0.08232775330543518,
0.22623275220394135,
-0.03176544979214668,
-0.05965116620063782,
-0.19109752774238586,
-0.005390424747020006,
-0.03313170000910759,
0.18530286848545074,
0.1638496220111847,
-0.11197493970394135,
0.017567604780197144,
-0.044669922441244125,
0.039916492998600006,
-0.1486920714378357,
-0.045793984085321426,
-0.08092793077230453,
0.19627411663532257,
0.05754264071583748,
-0.03568219766020775,
-0.1790495663881302,
-0.26896050572395325,
-0.11774490773677826,
0.06735614687204361,
-0.008467386476695538,
0.03155058994889259,
0.06265653669834137,
0.00015696912305429578,
-0.0011649334337562323,
0.00196376396343112,
-0.09562202543020248,
0.09363295137882233,
0.14480240643024445,
-0.034065183252096176,
-0.028422631323337555,
0.07027529180049896,
-0.033736709505319595,
-0.01618439331650734,
-0.06951752305030823,
0.20694732666015625,
-0.047216497361660004,
0.05167149007320404,
-0.07771940529346466,
-0.040410056710243225,
-0.0058130063116550446,
0.08763949573040009,
-0.16960985958576202,
-0.06939942389726639,
0.0977543368935585,
0.13584201037883759,
-0.1799553781747818,
-0.28122103214263916,
0.0049833692610263824,
0.031192978844046593,
-0.284375935792923,
-0.05392252653837204,
-0.028810111805796623,
-0.11808539181947708,
-0.13408420979976654,
0.07033028453588486,
0.008791778236627579,
0.054520055651664734,
-0.030289215967059135,
-0.04302288219332695,
-2.55131380404942e-32,
0.03306260704994202,
-0.10281150043010712,
0.03738747909665108,
-0.06446974724531174,
-0.11232289671897888,
-0.20272968709468842,
-0.18362978100776672,
-0.028261225670576096,
0.10999436676502228,
0.025678925216197968,
-0.13841572403907776,
-0.009033581241965294,
0.05206695944070816,
0.09977561980485916,
0.09310707449913025,
0.15755000710487366,
0.14546507596969604,
0.005617501679807901,
-0.12414470314979553,
0.09188401699066162,
0.08859553933143616,
0.004217536188662052,
-0.08273947238922119,
0.28859472274780273,
-0.2629266083240509,
-0.033527079969644547,
-0.09277283400297165,
-0.16233114898204803,
-0.042405519634485245,
-0.2556889057159424,
-0.14905552566051483,
0.08486780524253845,
-0.05228336155414581,
-0.05120634660124779,
-0.09945756942033768,
-0.12254852801561356,
-0.1399882584810257,
0.036050450056791306,
-0.09280127286911011,
0.028114493936300278,
-0.015208671800792217,
0.0801813155412674,
0.05703204870223999,
-0.10309874266386032,
0.05242791026830673,
0.043637122958898544,
0.08514939248561859,
0.09398394078016281,
-0.2530978322029114,
0.03695717453956604,
-0.11306560039520264,
0.1278117448091507,
-0.11831096559762955,
0.028192957863211632,
0.04604368284344673,
0.0711778998374939,
0.18459780514240265,
-0.02302679419517517,
-0.23445239663124084,
-0.059010524302721024,
0.03808784484863281,
-0.06621655821800232,
-0.12983617186546326,
-0.04819146916270256,
0.03596198186278343,
-0.06757928431034088,
0.032857008278369904,
0.0033158152364194393,
0.29618552327156067,
-0.03858749940991402,
-0.05456092953681946,
-0.016465796157717705,
0.02525598555803299,
-0.20431409776210785,
0.038545601069927216,
-0.2619427740573883,
-0.09918036311864853,
-0.06251350790262222,
0.032149139791727066,
0.20967404544353485,
0.05264721438288689,
-0.09713982045650482,
0.03453858196735382,
0.07753340154886246,
0.003011569380760193,
0.049310747534036636,
0.08256921917200089,
-0.017062338069081306,
0.06690382957458496,
0.06301242858171463,
0.0768248438835144,
0.20437541604042053,
0.07135654240846634,
0.05782158300280571,
-0.00333403586409986,
0.05064724013209343,
0.011536032892763615,
0.06083587184548378,
-0.02548486553132534,
-0.06085873395204544,
0.17336638271808624,
-0.012303538620471954,
0.07449830323457718,
-0.054656919091939926,
0.15892988443374634,
-0.05235486850142479,
0.07233743369579315,
0.2241259664297104,
-0.11359678208827972,
-0.0664435476064682,
-0.17577259242534637,
-0.09939659386873245,
0.08532750606536865,
-0.011307011358439922,
0.07780446112155914,
0.0012117298319935799,
0.002371650654822588,
0.017070308327674866,
0.006339371204376221,
0.12455649673938751,
-0.11365805566310883,
0.07189808040857315,
-0.01318136602640152,
0.03914159536361694,
0.05352078378200531,
-0.04355156049132347,
-0.08925368636846542,
-0.061702221632003784,
-0.05095284432172775,
-0.037609778344631195,
0.021913830190896988,
-0.0059524402022361755,
7.6767048540205e-7,
-0.1918591558933258,
0.11032125353813171,
-0.09904608130455017,
-0.02810915745794773,
-0.03295399993658066,
-0.007344030775129795,
-0.1259411871433258,
0.22116036713123322,
0.009984632022678852,
0.1635899543762207,
0.21082918345928192,
0.026128197088837624,
0.017175927758216858,
0.07075320184230804,
-0.06507643312215805,
-0.07183048874139786,
-0.09400486946105957,
0.10587882995605469,
-0.03645812347531319,
-0.1307167112827301,
-0.030787844210863113,
-0.024602102115750313,
-0.15642033517360687,
-0.10054343193769455,
0.16693466901779175,
0.08390852808952332,
0.028954459354281425,
0.20451657474040985,
-0.015557046048343182,
0.0544862225651741,
-0.005859936587512493,
-0.07499067485332489,
-0.07374338060617447,
-0.12296085804700851,
-0.02855299599468708,
-0.025239247828722,
-0.0973927304148674,
-0.03659084811806679,
0.03133600577712059,
-0.08023548871278763,
0.050133585929870605,
-0.06589151918888092,
0.012192552909255028,
-0.03243570774793625,
0.1373668760061264,
-0.05052877962589264,
-0.1389721781015396,
0.1708613634109497,
0.01164177991449833,
-0.0026284679770469666,
0.16733510792255402,
0.17215028405189514,
-0.14063213765621185,
0.14536812901496887,
-0.037741489708423615,
0.0930546298623085,
0.1398402750492096,
-0.1900520622730255,
0.2277056723833084,
0.09064435958862305,
-0.06728363782167435,
-0.05498163774609566,
0.03299713879823685,
0.036385733634233475,
0.07227768003940582,
0.011903073638677597,
0.016230471432209015,
9.203756868784985e-35,
0.2237173616886139,
0.01836038939654827,
-0.0630970448255539,
0.01719919592142105,
-0.019539345055818558,
-0.10154668986797333,
-0.02660558559000492,
-0.013464746996760368,
0.034045517444610596,
-0.15053874254226685,
-0.1471683830022812
] |
https://github.com/huggingface/datasets/issues/6051 | Skipping shard in the remote repo and resume upload | Hi, thanks, this solution saves some time.
But can't we avoid embedding all external image files bytes with each push, skipping the images that have already been pushed into the repo?
Edit: Ok I missed the part of cache it manually on the disk the first time, this solves the problem. Thank you | ### Describe the bug
For some reason when I try to resume the upload of my dataset, it is very slow to reach the index of the shard from which to resume the uploading.
From my understanding, the problem is in this part of the code:
arrow_dataset.py
```python
for index, shard in logging.tqdm(
enumerate(itertools.chain([first_shard], shards_iter)),
desc="Pushing dataset shards to the dataset hub",
total=num_shards,
disable=not logging.is_progress_bar_enabled(),
):
shard_path_in_repo = path_in_repo(index, shard)
# Upload a shard only if it doesn't already exist in the repository
if shard_path_in_repo not in data_files:
```
In particular, iterating the generator is slow during the call:
```python
self._select_contiguous(start, length, new_fingerprint=new_fingerprint)
```
I wonder if it is possible to avoid calling this function for shards that are already uploaded and just start from the correct shard index.
### Steps to reproduce the bug
1. Start the upload
```python
dataset = load_dataset("imagefolder", data_dir=DATA_DIR, split="train", drop_labels=True)
dataset.push_to_hub("repo/name")
```
2. Stop and restart the upload after hundreds of shards
### Expected behavior
Skip the uploaded shards faster.
### Environment info
- `datasets` version: 2.5.1
- Platform: Linux-4.18.0-193.el8.x86_64-x86_64-with-glibc2.17
- Python version: 3.8.16
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
| 53 | Skipping shard in the remote repo and resume upload
### Describe the bug
For some reason when I try to resume the upload of my dataset, it is very slow to reach the index of the shard from which to resume the uploading.
From my understanding, the problem is in this part of the code:
arrow_dataset.py
```python
for index, shard in logging.tqdm(
enumerate(itertools.chain([first_shard], shards_iter)),
desc="Pushing dataset shards to the dataset hub",
total=num_shards,
disable=not logging.is_progress_bar_enabled(),
):
shard_path_in_repo = path_in_repo(index, shard)
# Upload a shard only if it doesn't already exist in the repository
if shard_path_in_repo not in data_files:
```
In particular, iterating the generator is slow during the call:
```python
self._select_contiguous(start, length, new_fingerprint=new_fingerprint)
```
I wonder if it is possible to avoid calling this function for shards that are already uploaded and just start from the correct shard index.
### Steps to reproduce the bug
1. Start the upload
```python
dataset = load_dataset("imagefolder", data_dir=DATA_DIR, split="train", drop_labels=True)
dataset.push_to_hub("repo/name")
```
2. Stop and restart the upload after hundreds of shards
### Expected behavior
Skip the uploaded shards faster.
### Environment info
- `datasets` version: 2.5.1
- Platform: Linux-4.18.0-193.el8.x86_64-x86_64-with-glibc2.17
- Python version: 3.8.16
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
Hi, thanks, this solution saves some time.
But can't we avoid embedding all external image files bytes with each push, skipping the images that have already been pushed into the repo?
Edit: Ok I missed the part of cache it manually on the disk the first time, this solves the problem. Thank you | [
-0.1746784746646881,
0.33432987332344055,
-0.10790702700614929,
0.003622489282861352,
-0.002237102948129177,
0.01934695988893509,
0.15188410878181458,
-0.032693758606910706,
-0.17021511495113373,
0.09213665872812271,
0.09227558225393295,
-0.0026505207642912865,
-0.152581125497818,
0.09369242936372757,
-0.0321095734834671,
0.05457158386707306,
-0.07599428296089172,
0.022101452574133873,
0.11828574538230896,
-0.15199130773544312,
-0.12194622308015823,
0.005993350874632597,
0.04267290607094765,
-0.10361295938491821,
0.008199572563171387,
-0.04941071569919586,
-0.06574307382106781,
0.1794205605983734,
0.10103864967823029,
-0.10767011344432831,
0.04877995327115059,
-0.017548125237226486,
-0.19374339282512665,
-0.01267415564507246,
0.000005423969014373142,
0.16040222346782684,
0.13114139437675476,
-0.008116720244288445,
0.04752890020608902,
0.06058643013238907,
-0.017248230054974556,
0.0584430955350399,
0.07551196962594986,
-0.06587077677249908,
0.0989912897348404,
0.19677989184856415,
-0.04206165671348572,
0.029205679893493652,
-0.055081501603126526,
-0.09943129867315292,
-0.049496643245220184,
0.1865549087524414,
-0.1370149701833725,
-0.0326029509305954,
0.07113393396139145,
0.057182736694812775,
-0.09884011000394821,
-0.05106096342206001,
-0.08999357372522354,
-0.09342795610427856,
-0.1464143991470337,
0.07828649133443832,
-0.06951111555099487,
0.0317060761153698,
0.11321432888507843,
0.08622733503580093,
-0.09143268316984177,
-0.12911657989025116,
-0.015010618604719639,
-0.023709479719400406,
-0.22345080971717834,
-0.05461389571428299,
0.012993299402296543,
-0.05036287009716034,
-0.11000026762485504,
-0.23221231997013092,
-0.09353454411029816,
-0.03271172195672989,
-0.06784795969724655,
0.08113828301429749,
-0.12535220384597778,
-0.00491687748581171,
-0.04675382748246193,
0.07483164221048355,
-0.14937753975391388,
-0.15633027255535126,
0.07905090600252151,
0.08869992196559906,
-0.0025275859516113997,
0.0027189927641302347,
-0.06269573420286179,
-0.024550456553697586,
-0.12007192522287369,
-0.06769991666078568,
-0.264526903629303,
-0.06067948043346405,
0.12289685755968094,
-0.10575210303068161,
0.026365311816334724,
0.0036236539017409086,
-0.08381669223308563,
0.11926402896642685,
0.08670982718467712,
0.13614922761917114,
0.02604813128709793,
-0.064271479845047,
0.0038318419829010963,
-0.07140424102544785,
0.0018340679816901684,
0.16506335139274597,
-0.03148864209651947,
0.14627566933631897,
0.027443241328001022,
0.021978994831442833,
0.13106682896614075,
-0.053276486694812775,
0.2747996151447296,
0.1901887059211731,
-0.03811439871788025,
0.08413920551538467,
0.08594879508018494,
0.1458013355731964,
-0.016024485230445862,
0.12298502773046494,
0.030136577785015106,
0.021538594737648964,
-0.05383019894361496,
-0.04331376403570175,
-0.05779415741562843,
0.10893447697162628,
0.009400373324751854,
-0.027895329520106316,
0.17317481338977814,
-0.04371942579746246,
0.057972438633441925,
-0.040344953536987305,
0.06238612160086632,
-0.01642589457333088,
0.2604847848415375,
0.036139193922281265,
0.09633737057447433,
-0.07177826017141342,
0.14719469845294952,
0.03472616896033287,
-0.013576855883002281,
0.13730333745479584,
0.07272887229919434,
0.02766609564423561,
-0.12962834537029266,
0.18495574593544006,
-0.04794996604323387,
0.02287202700972557,
-0.14490926265716553,
-0.004423257429152727,
-0.18991078436374664,
-0.018577788025140762,
-0.1287190020084381,
-0.18010690808296204,
-0.21820642054080963,
0.012569736689329147,
0.14176329970359802,
-0.09171613305807114,
-0.07199642807245255,
-0.050809796899557114,
0.027476470917463303,
0.04060428589582443,
0.09976321458816528,
0.10511616617441177,
-0.10161536931991577,
-0.09260466694831848,
0.07744479924440384,
-0.13903219997882843,
-0.07226258516311646,
-0.10798817873001099,
-0.03942108899354935,
0.32005566358566284,
-0.026753833517432213,
0.030019868165254593,
-0.10758280009031296,
-0.06889699399471283,
0.004462864715605974,
0.10163849592208862,
-0.13754014670848846,
0.05741025134921074,
0.10012379288673401,
-0.12716303765773773,
-0.01891428232192993,
0.20603564381599426,
-0.1372586488723755,
0.11734037846326828,
0.05948469415307045,
0.16067683696746826,
-0.11104652285575867,
0.2215036153793335,
-0.13220736384391785,
-0.04897897318005562,
0.038311541080474854,
0.006067095790058374,
0.16220229864120483,
-0.06711209565401077,
0.04429386556148529,
-0.050449490547180176,
0.06699035316705704,
-0.049721136689186096,
0.10536183416843414,
0.04766041412949562,
-0.2327130138874054,
0.19934068620204926,
0.08182944357395172,
-0.18049049377441406,
-0.12266071885824203,
0.06887372583150864,
-0.05182340741157532,
-0.030771328136324883,
-0.13498066365718842,
0.060281675308942795,
0.0005560285062529147,
-0.13686253130435944,
-0.1604590117931366,
0.04659661650657654,
-0.051897987723350525,
0.0454130657017231,
-0.05479783937335014,
0.06011154130101204,
-0.08690357953310013,
-0.00914254691451788,
0.03842061758041382,
0.06451692432165146,
0.15278594195842743,
-0.19902750849723816,
-0.015432734042406082,
-0.03397583216428757,
0.14499711990356445,
0.10838259756565094,
-0.13299398124217987,
0.10890364646911621,
0.07734087109565735,
-0.1539202332496643,
0.019997570663690567,
-0.0376797616481781,
-0.08123448491096497,
-0.05239153653383255,
-0.006350778508931398,
0.0936783105134964,
-0.022898348048329353,
-0.009634860791265965,
-0.016825096681714058,
0.1913844347000122,
0.04512299597263336,
-0.062203168869018555,
-0.02967057190835476,
0.12930411100387573,
-0.059028249233961105,
-0.022837577387690544,
0.12347902357578278,
0.11063024401664734,
0.21692803502082825,
0.10223511606454849,
-0.042028721421957016,
0.1698949635028839,
0.2491215318441391,
-0.009071730077266693,
0.0035789026878774166,
0.09381813555955887,
-0.07066438347101212,
0.04508494958281517,
0.05559125170111656,
0.22057996690273285,
-0.009845362044870853,
0.06646513938903809,
0.043275341391563416,
-0.04519550874829292,
-0.10771244764328003,
0.039853110909461975,
-0.13725830614566803,
0.06661766767501831,
0.08782396465539932,
-0.008686904795467854,
0.17217658460140228,
-0.181821808218956,
-0.10691835731267929,
-0.0037530502304434776,
0.17438319325447083,
-0.10211589932441711,
0.13760489225387573,
0.015304259955883026,
-0.069057397544384,
-0.037382036447525024,
0.025297468528151512,
-0.1141127273440361,
-0.18751704692840576,
-0.243826761841774,
0.003203046740964055,
0.021440833806991577,
0.14100125432014465,
-0.03445002809166908,
0.10306289792060852,
-0.16846807301044464,
-0.06177892908453941,
-0.1937524378299713,
-0.05603795498609543,
0.017278939485549927,
0.14002849161624908,
0.029851600527763367,
0.0790136530995369,
0.11211247742176056,
0.15405046939849854,
0.0757664144039154,
-0.10554225742816925,
-0.10988786071538925,
0.05424182489514351,
0.07551655173301697,
-0.11713755875825882,
-0.0060238526202738285,
0.050893012434244156,
-0.13162922859191895,
-0.09795057773590088,
-0.046256568282842636,
-0.02672039158642292,
-0.03383861109614372,
-0.07945287972688675,
0.07021550834178925,
-0.07890414446592331,
0.14255063235759735,
-0.04454905539751053,
0.001845411374233663,
-0.03350934013724327,
0.10213081538677216,
-0.07538401335477829,
0.15584754943847656,
0.03941759467124939,
0.014952244237065315,
-0.11303695291280746,
0.04316835105419159,
-0.004882840905338526,
-0.035684216767549515,
-0.050468187779188156,
-0.23086915910243988,
0.2511286735534668,
0.06371747702360153,
0.14376556873321533,
-0.018433256074786186,
-0.048097800463438034,
-0.0556892566382885,
0.15558411180973053,
-0.1941293627023697,
-0.11506914347410202,
-0.19522802531719208,
0.11689736694097519,
0.046140458434820175,
-0.07988867908716202,
-0.008603707887232304,
-0.09900587052106857,
-0.10190138220787048,
-0.09651853889226913,
0.109981469810009,
-0.16001951694488525,
0.08023769408464432,
-0.14547516405582428,
0.03832181170582771,
0.03757988288998604,
0.20138299465179443,
0.37071236968040466,
-0.09520839899778366,
0.029751082882285118,
-0.011902892030775547,
0.04442211613059044,
0.12712720036506653,
-0.011708282865583897,
-0.03964443877339363,
-0.10403385758399963,
0.0444161482155323,
-0.1348295956850052,
-0.05094778537750244,
0.032001178711652756,
-0.07486516237258911,
0.10250559449195862,
-0.16683533787727356,
0.11975423246622086,
-0.12636122107505798,
-0.015861470252275467,
-0.10096928477287292,
0.0013672037748619914,
0.051073409616947174,
0.04516897350549698,
-0.04366496950387955,
0.043586570769548416,
0.059154950082302094,
0.04679626598954201,
0.17694103717803955,
-0.024504313245415688,
0.0529232993721962,
0.06961383670568466,
-0.15011616051197052,
-0.10713072121143341,
-0.013954643160104752,
-0.0014897515065968037,
0.06652022898197174,
-0.007464409340173006,
0.028951164335012436,
-0.009736458770930767,
0.16912050545215607,
0.009852314367890358,
0.2315618097782135,
0.0856819748878479,
-0.1916545033454895,
-0.08219224214553833,
0.04400954768061638,
0.13820426166057587,
0.06937213987112045,
0.005624598823487759,
0.00549725815653801,
0.06652714312076569,
0.026712581515312195,
0.16359193623065948,
0.06393574923276901,
-0.07463964819908142,
-0.171932652592659,
-0.028889544308185577,
0.02448449842631817,
-0.21074753999710083,
-0.035960711538791656,
0.15078438818454742,
-0.14366471767425537,
-0.0516778789460659,
0.07725001871585846,
-0.08542058616876602,
0.040858782827854156,
0.007489609997719526,
-0.0898933932185173,
-0.06668632477521896,
0.020205458626151085,
0.21244272589683533,
-0.05598277226090431,
0.12922042608261108,
0.049632031470537186,
0.0871160626411438,
0.04044780507683754,
-0.08144458383321762,
-0.01032511331140995,
-0.2395900934934616,
0.05119137093424797,
0.2072630375623703,
-0.08553344756364822,
0.1509389877319336,
-0.07081208378076553,
0.006567356176674366,
0.10430783033370972,
-0.12457402795553207,
0.06910177320241928,
-0.19983407855033875,
-0.09380429238080978,
0.12252234667539597,
-0.08112632483243942,
0.11551739275455475,
0.02943362109363079,
-0.003096990752965212,
0.0714709609746933,
0.10089043527841568,
0.09006770700216293,
-0.14675387740135193,
-0.09171158075332642,
0.033154215663671494,
0.03529931977391243,
-0.17587535083293915,
0.19111260771751404,
0.09257087856531143,
-0.05392991378903389,
0.021357426419854164,
-0.13824409246444702,
-0.18338795006275177,
0.09183193743228912,
-0.07026471197605133,
-0.017781484872102737,
0.11571229249238968,
0.13622133433818817,
0.008596332743763924,
-0.05825404077768326,
0.0006046808557584882,
-0.04710160568356514,
0.09364767372608185,
0.0034229522570967674,
0.09671007841825485,
-0.026356976479291916,
-0.019494013860821724,
0.15482093393802643,
-0.05984430015087128,
0.04067319631576538,
-0.096302330493927,
0.038838569074869156,
0.03775782138109207,
-0.041891567409038544,
-0.09860154986381531,
0.22351884841918945,
-0.014330092817544937,
-0.0815303698182106,
-0.2007800042629242,
-0.028061188757419586,
0.00197616801597178,
0.1890670657157898,
0.14604689180850983,
-0.11479110270738602,
-0.0020206610206514597,
-0.02854861319065094,
0.036136142909526825,
-0.17862272262573242,
-0.02963833697140217,
-0.10197006165981293,
0.1838996708393097,
0.0628708079457283,
-0.044972293078899384,
-0.18121667206287384,
-0.26560673117637634,
-0.12633298337459564,
0.05639420077204704,
0.0026931925676763058,
0.03146425262093544,
0.060997504740953445,
-0.005279753357172012,
-0.004914268385618925,
0.0031205429695546627,
-0.08905813843011856,
0.08897774666547775,
0.11667528748512268,
-0.04566717520356178,
-0.028010401874780655,
0.07998001575469971,
-0.008089370094239712,
-0.056092482060194016,
-0.06374654918909073,
0.17927686870098114,
-0.03771187737584114,
0.029592245817184448,
-0.054837703704833984,
-0.04647423326969147,
0.003142262576147914,
0.061862971633672714,
-0.16242030262947083,
-0.04420651122927666,
0.10328785330057144,
0.1313677579164505,
-0.19925621151924133,
-0.3071500360965729,
0.016912341117858887,
0.03807864710688591,
-0.24724029004573822,
-0.060988012701272964,
-0.03736242279410362,
-0.12228745967149734,
-0.1481952965259552,
0.09716267883777618,
0.027993904426693916,
0.034305885434150696,
-0.02751501277089119,
-0.05141885578632355,
-2.6238911762578896e-32,
0.04058163985610008,
-0.12309643626213074,
0.05776849389076233,
-0.06515057384967804,
-0.06788608431816101,
-0.19762484729290009,
-0.16653741896152496,
-0.050214849412441254,
0.10556679964065552,
0.001308091334067285,
-0.13687320053577423,
-0.017566705122590065,
0.0538463369011879,
0.1029001995921135,
0.09013080596923828,
0.17363330721855164,
0.14912213385105133,
0.010525163263082504,
-0.11982394009828568,
0.10785752534866333,
0.08774857968091965,
-0.008247209712862968,
-0.061720456928014755,
0.34878847002983093,
-0.2596299946308136,
-0.03378123790025711,
-0.09931424260139465,
-0.145480677485466,
-0.03050113655626774,
-0.24599142372608185,
-0.1705743372440338,
0.07652155309915543,
-0.0611213780939579,
-0.030772102996706963,
-0.11494585871696472,
-0.10924873501062393,
-0.14458218216896057,
0.0021019349806010723,
-0.10650042444467545,
0.043123189359903336,
0.008741537109017372,
0.06990860402584076,
0.06110786646604538,
-0.12419029325246811,
0.05714421346783638,
0.05618071183562279,
0.08923668414354324,
0.10506696254014969,
-0.23395587503910065,
0.057899605482816696,
-0.1301395297050476,
0.1181761771440506,
-0.1077059656381607,
0.04164223372936249,
0.04532662779092789,
0.061968229711055756,
0.20277491211891174,
0.03525470942258835,
-0.24809466302394867,
-0.04942125454545021,
0.0016888182144612074,
-0.06745000928640366,
-0.11982878297567368,
-0.048081547021865845,
0.0300139170140028,
-0.07939282059669495,
0.007694154977798462,
-0.004560127388685942,
0.3092285990715027,
-0.03351598605513573,
-0.016014596447348595,
-0.030138995498418808,
0.031557485461235046,
-0.18079189956188202,
0.055917054414749146,
-0.25558793544769287,
-0.109861359000206,
-0.057807113975286484,
0.033612631261348724,
0.22872357070446014,
0.04026111587882042,
-0.07375019788742065,
0.0456254705786705,
0.07975207269191742,
0.013098064810037613,
0.06240716576576233,
0.08014778792858124,
-0.003352164290845394,
0.05545063689351082,
0.05709477514028549,
0.08840510994195938,
0.18789426982402802,
0.09816010296344757,
0.006778684910386801,
-0.00040938271558843553,
0.06361350417137146,
0.029048962518572807,
0.05769160017371178,
-0.021677469834685326,
-0.055895429104566574,
0.15823189914226532,
-0.026226229965686798,
0.09772961586713791,
-0.036455247551202774,
0.1514458805322647,
-0.06867346167564392,
0.08741229772567749,
0.19543364644050598,
-0.1272541731595993,
-0.05554160475730896,
-0.1963687539100647,
-0.1174803227186203,
0.09890127182006836,
-0.03640347346663475,
0.053107988089323044,
-0.003953202627599239,
-0.003458309918642044,
0.03186137601733208,
-0.005358904134482145,
0.10131444036960602,
-0.101460300385952,
0.05989580973982811,
-0.029976509511470795,
0.04376215487718582,
0.03251279518008232,
-0.030675029382109642,
-0.09149622172117233,
-0.0682985931634903,
-0.03754501789808273,
-0.033657629042863846,
0.011769596487283707,
-0.002805843949317932,
7.660494816263963e-7,
-0.20664899051189423,
0.0949477031826973,
-0.07269766926765442,
-0.0021489267237484455,
-0.047150786966085434,
-0.0060274661518633366,
-0.13237495720386505,
0.20848241448402405,
0.023409971967339516,
0.1262199431657791,
0.19956010580062866,
0.026992378756403923,
0.009274122305214405,
0.08077842742204666,
-0.06314752995967865,
-0.06449346989393234,
-0.07909974455833435,
0.08812720328569412,
-0.04622626304626465,
-0.11455472558736801,
-0.05815111845731735,
-0.0006792034255340695,
-0.133559912443161,
-0.082695871591568,
0.14953434467315674,
0.0960221141576767,
0.05084319785237312,
0.19782403111457825,
0.005787599366158247,
0.06281707435846329,
-0.004709663800895214,
-0.062159862369298935,
-0.07268866151571274,
-0.12768283486366272,
-0.028236528858542442,
-0.01880062185227871,
-0.10074183344841003,
-0.0755629688501358,
0.03611171990633011,
-0.1295657902956009,
0.03527867794036865,
-0.04954291507601738,
-0.015386485494673252,
-0.06362595409154892,
0.12599700689315796,
-0.004637835547327995,
-0.14839604496955872,
0.12205235660076141,
-0.00872104149311781,
-0.011523140594363213,
0.17020586133003235,
0.16482767462730408,
-0.11954985558986664,
0.161581888794899,
-0.02468152903020382,
0.06495754420757294,
0.12692104279994965,
-0.1898309588432312,
0.19601131975650787,
0.08945471793413162,
-0.07305025309324265,
-0.04317920655012131,
0.03799458593130112,
0.032543379813432693,
0.07301017642021179,
0.024628011509776115,
0.038604822009801865,
6.96226764701254e-35,
0.211070254445076,
-0.002966522239148617,
-0.03898730129003525,
0.02000022493302822,
-0.01788131147623062,
-0.06711852550506592,
-0.07036729156970978,
-0.009777289815247059,
0.050218261778354645,
-0.1627231389284134,
-0.14885415136814117
] |
https://github.com/huggingface/datasets/issues/6048 | when i use datasets.load_dataset, i encounter the http connect error! | The `audiofolder` loader is not available in version `2.3.2`, hence the error. Please run the `pip install -U datasets` command to update the `datasets` installation to make `load_dataset("audiofolder", ...)` work. | ### Describe the bug
`common_voice_test = load_dataset("audiofolder", data_dir="./dataset/",cache_dir="./cache",split=datasets.Split.TEST)`
when i run the code above, i got the error as below:
--------------------------------------------
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/2.3.2/datasets/audiofolder/audiofolder.py (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /huggingface/datasets/2.3.2/datasets/audiofolder/audiofolder.py (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f299ed082e0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))")))
--------------------------------------------------
My all data is on local machine, why does it need to connect the internet? how can i fix it, because my machine cannot connect the internet.
### Steps to reproduce the bug
1
### Expected behavior
no error when i use the load_dataset func
### Environment info
python=3.8.15 | 30 | when i use datasets.load_dataset, i encounter the http connect error!
### Describe the bug
`common_voice_test = load_dataset("audiofolder", data_dir="./dataset/",cache_dir="./cache",split=datasets.Split.TEST)`
when i run the code above, i got the error as below:
--------------------------------------------
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/2.3.2/datasets/audiofolder/audiofolder.py (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /huggingface/datasets/2.3.2/datasets/audiofolder/audiofolder.py (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f299ed082e0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))")))
--------------------------------------------------
My all data is on local machine, why does it need to connect the internet? how can i fix it, because my machine cannot connect the internet.
### Steps to reproduce the bug
1
### Expected behavior
no error when i use the load_dataset func
### Environment info
python=3.8.15
The `audiofolder` loader is not available in version `2.3.2`, hence the error. Please run the `pip install -U datasets` command to update the `datasets` installation to make `load_dataset("audiofolder", ...)` work. | [
-0.025847328826785088,
0.1988861858844757,
-0.005747166927903891,
0.00945088267326355,
0.29465049505233765,
0.013081756420433521,
0.12255475670099258,
-0.05158812925219536,
0.14548282325267792,
0.25280311703681946,
-0.08025017380714417,
-0.05837065726518631,
0.01935584284365177,
-0.0425555519759655,
0.005660709924995899,
-0.10001315921545029,
-0.07352098822593689,
0.003551419824361801,
0.031123902648687363,
0.06265010684728622,
0.002489185892045498,
0.07026240229606628,
0.051991451531648636,
-0.13082103431224823,
-0.07994429022073746,
-0.14069004356861115,
0.045961908996105194,
0.0714150220155716,
-0.010540531016886234,
-0.12628036737442017,
0.15346144139766693,
0.005490642972290516,
0.18673747777938843,
0.14784397184848785,
0.000005315144790074555,
0.004512303043156862,
0.19412773847579956,
0.035844482481479645,
-0.14686545729637146,
-0.2353300154209137,
-0.05022941157221794,
-0.0911833792924881,
-0.03208908438682556,
0.026505034416913986,
0.041043587028980255,
0.05657289922237396,
0.023705987259745598,
-0.06127113476395607,
0.11868157237768173,
0.11762349307537079,
-0.09638847410678864,
0.009078108705580235,
0.017979087308049202,
-0.040199123322963715,
-0.04877553507685661,
-0.025441773235797882,
0.01336958073079586,
0.2547871768474579,
-0.17361697554588318,
-0.19365525245666504,
0.038048796355724335,
-0.2305890917778015,
0.14010433852672577,
0.17998391389846802,
-0.06376102566719055,
0.025462498888373375,
-0.18436278402805328,
-0.1435135304927826,
-0.0678773820400238,
0.41600918769836426,
0.11350587755441666,
0.022122133523225784,
-0.10431337356567383,
-0.029295437037944794,
-0.09135092049837112,
0.01179373636841774,
-0.053320255130529404,
-0.10675443708896637,
-0.15393394231796265,
0.12185689806938171,
-0.1925579011440277,
-0.03624622896313667,
-0.11155310273170471,
0.1120491698384285,
-0.07866664230823517,
0.0020322673954069614,
-0.12808533012866974,
0.04056830331683159,
0.006263966206461191,
-0.07418759167194366,
0.0841507762670517,
0.02290159836411476,
-0.09612562507390976,
-0.015242189168930054,
-0.03284481167793274,
0.17752796411514282,
-0.14318126440048218,
0.031081639230251312,
-0.003626694204285741,
0.02417830564081669,
-0.1586431860923767,
-0.20848092436790466,
-0.01635010540485382,
0.211126908659935,
0.11538998037576675,
-0.19295115768909454,
-0.071071557700634,
-0.1561194360256195,
0.17866048216819763,
-0.007301600184291601,
0.022683167830109596,
0.15142811834812164,
-0.016958938911557198,
0.02004445716738701,
0.14062657952308655,
0.030457254499197006,
0.049722976982593536,
-0.03233132138848305,
0.07375688850879669,
0.09196691960096359,
0.07185911387205124,
0.04780236631631851,
-0.03826942667365074,
0.16251502931118011,
-0.06576171517372131,
-0.02041611634194851,
-0.08036407083272934,
0.06381203979253769,
-0.20677879452705383,
-0.09398505091667175,
0.007926968857645988,
-0.3049461245536804,
0.10164853185415268,
-0.1036081314086914,
0.16003413498401642,
-0.03725260868668556,
-0.07955464720726013,
-0.11875570565462112,
-0.016476213932037354,
0.024900441989302635,
0.17651420831680298,
-0.11369398236274719,
-0.11886034160852432,
0.10445749759674072,
0.217619389295578,
-0.03034978359937668,
-0.010834791697561741,
0.01587012968957424,
0.005234487354755402,
-0.04407724738121033,
-0.19862237572669983,
0.0059904376976192,
-0.17950217425823212,
0.225502148270607,
-0.027850832790136337,
0.03611033037304878,
-0.14002583920955658,
0.0967230498790741,
-0.2719389498233795,
-0.023771656677126884,
0.09572318941354752,
-0.14385993778705597,
0.044069383293390274,
-0.010721701197326183,
0.1882985681295395,
0.1655488759279251,
0.08425481617450714,
0.13735699653625488,
-0.049441225826740265,
-0.04331376031041145,
0.04329214245080948,
-0.001901172799989581,
-0.11907200515270233,
-0.009113172069191933,
-0.18648900091648102,
-0.049093663692474365,
0.13389287889003754,
0.03303976729512215,
-0.3983917832374573,
0.13144035637378693,
0.16313961148262024,
-0.050590381026268005,
-0.013486369512975216,
-0.008712626062333584,
0.12720488011837006,
-0.04903915524482727,
-0.05123664066195488,
0.08779622614383698,
-0.00833568349480629,
-0.004571870900690556,
-0.000817783351521939,
-0.00999655481427908,
-0.007252557203173637,
0.14732609689235687,
-0.004467824939638376,
-0.14180514216423035,
-0.0021542897447943687,
-0.04719228297472,
0.12661893665790558,
-0.16460256278514862,
-0.021415576338768005,
0.03871919959783554,
0.01985880546271801,
0.09384292364120483,
0.12298866361379623,
-0.11330842226743698,
-0.24494551122188568,
0.17598599195480347,
0.18440581858158112,
-0.12816916406154633,
-0.2700008153915405,
0.03183175250887871,
-0.08550109714269638,
-0.0315982960164547,
-0.13482734560966492,
0.10715041309595108,
-0.16907748579978943,
0.0458737351000309,
-0.0866992175579071,
0.1735035628080368,
-0.15699391067028046,
0.11300761997699738,
0.18331961333751678,
0.041227929294109344,
-0.06518368422985077,
0.11506234109401703,
-0.06251829117536545,
0.0723300501704216,
0.048751890659332275,
-0.1167953610420227,
-0.11074046045541763,
-0.08667707443237305,
0.025285430252552032,
0.17390835285186768,
-0.11239983886480331,
0.0793328732252121,
0.06693251430988312,
-0.007603448815643787,
0.05523305758833885,
-0.08446479588747025,
-0.04015961289405823,
0.029935039579868317,
-0.11201363801956177,
-0.20206418633460999,
-0.03313133865594864,
0.15359608829021454,
0.0428469218313694,
0.21011102199554443,
-0.09263243526220322,
-0.11551522463560104,
0.2219650149345398,
0.20065009593963623,
-0.0687771886587143,
0.10244901478290558,
0.08849209547042847,
-0.058157406747341156,
0.15914873778820038,
0.034213002771139145,
-0.11201377958059311,
-0.044357918202877045,
0.109066441655159,
0.03169490396976471,
0.04507479444146156,
0.10580360889434814,
0.14958369731903076,
-0.1872721165418625,
0.02058681659400463,
-0.0046737948432564735,
-0.06639836728572845,
0.037060413509607315,
0.024960028007626534,
0.04634879529476166,
-0.24561554193496704,
-0.21232764422893524,
0.045923542231321335,
-0.05930149182677269,
0.043953508138656616,
-0.09966755658388138,
0.09732518345117569,
0.0442918986082077,
-0.19190765917301178,
0.09270511567592621,
-0.0011567742330953479,
-0.14744636416435242,
0.03484860435128212,
0.008575634099543095,
-0.08900316059589386,
0.04540790989995003,
-0.03527582809329033,
-0.06702759861946106,
-0.01998875103890896,
0.01745608262717724,
0.015695594251155853,
-0.12340464442968369,
-0.10520942509174347,
0.03340878710150719,
0.014189991168677807,
-0.05715368688106537,
-0.043797433376312256,
-0.07627508044242859,
-0.04919644445180893,
0.057538554072380066,
0.18642090260982513,
0.029876669868826866,
0.18035908043384552,
0.019100887700915337,
0.08345567435026169,
0.20956073701381683,
-0.20338408648967743,
0.010303485207259655,
0.12742295861244202,
-0.004041848238557577,
0.12380369007587433,
0.2562900483608246,
0.12946747243404388,
0.0667751282453537,
-0.11188245564699173,
-0.1289069801568985,
0.1276831179857254,
0.09937972575426102,
-0.013577845878899097,
0.09215053170919418,
-0.07594285160303116,
0.010690882802009583,
0.011652534827589989,
-0.037419404834508896,
-0.1858372986316681,
-0.06171846762299538,
-0.045663584023714066,
-0.05496847257018089,
-0.1485828012228012,
0.04047844186425209,
0.026136405766010284,
0.007866994477808475,
0.08433400094509125,
-0.120670847594738,
-0.19103121757507324,
-0.20155902206897736,
0.17959745228290558,
0.09992949664592743,
-0.08427054435014725,
-0.05990581586956978,
-0.04645492881536484,
-0.017568781971931458,
0.06950804591178894,
-0.10098535567522049,
-0.02248690277338028,
-0.06661492586135864,
0.05215877667069435,
-0.07043367624282837,
0.14453718066215515,
0.03664567321538925,
-0.13029426336288452,
0.06023048609495163,
0.13197961449623108,
0.11545342206954956,
-0.02137487195432186,
0.2338895946741104,
-0.1602431833744049,
0.2226000726222992,
0.10812313109636307,
-0.06011757254600525,
0.1539985090494156,
-0.14630916714668274,
0.03718579187989235,
0.19502051174640656,
0.13850732147693634,
0.11253665387630463,
0.0760631188750267,
-0.02213015966117382,
0.01004922203719616,
-0.16538628935813904,
0.04882904887199402,
-0.04058009758591652,
0.08730567991733551,
-0.028252076357603073,
-0.11959710717201233,
-0.07052012532949448,
-0.03543012961745262,
-0.03424554318189621,
-0.03778640553355217,
-0.1377403885126114,
-0.01378658413887024,
0.13502739369869232,
0.012358381412923336,
-0.08702384680509567,
-0.06914804875850677,
0.01230650395154953,
-0.005995048210024834,
0.18651656806468964,
0.037356868386268616,
0.04329945147037506,
0.11969563364982605,
-0.08613033592700958,
0.15162654221057892,
-0.07467145472764969,
0.33543986082077026,
0.11378296464681625,
0.03834839165210724,
-0.02705894596874714,
0.1260506808757782,
-0.03615662828087807,
-0.1173785924911499,
0.07221759110689163,
0.05196550488471985,
0.022508209571242332,
0.00186576705891639,
0.036746129393577576,
-0.08434387296438217,
-0.06310585141181946,
0.04662918671965599,
-0.10282420367002487,
-0.01422469038516283,
-0.055404603481292725,
0.06695668399333954,
0.15336823463439941,
-0.10985920578241348,
-0.016268596053123474,
-0.10871543735265732,
-0.13810200989246368,
-0.09784332662820816,
0.0010936872567981482,
0.12499746680259705,
0.1774938702583313,
0.18387582898139954,
-0.01928265206515789,
0.15466777980327606,
-0.0004157254588790238,
0.07707658410072327,
-0.07938205450773239,
-0.006606307812035084,
-0.008518167771399021,
0.046755533665418625,
0.13621360063552856,
0.06161603331565857,
0.03554951772093773,
0.35125085711479187,
-0.17023034393787384,
-0.026205793023109436,
-0.03367358446121216,
-0.09855107963085175,
0.0009570556576363742,
0.09847672283649445,
0.030507395043969154,
-0.03760472312569618,
0.029131269082427025,
-0.12740139663219452,
0.008208345621824265,
-0.05534777417778969,
-0.08719529956579208,
-0.12274420261383057,
-0.07315616309642792,
-0.16344648599624634,
-0.021672101691365242,
-0.07025648653507233,
-0.018689418211579323,
0.07116708904504776,
-0.029573293402791023,
0.09063830226659775,
-0.03520189970731735,
-0.22330135107040405,
-0.08046913146972656,
0.034098006784915924,
0.03430009260773659,
-0.13954749703407288,
-0.007157708518207073,
0.0044776564463973045,
-0.243433877825737,
0.011276590637862682,
0.08592874556779861,
0.10413563251495361,
0.2010609209537506,
-0.09363702684640884,
-0.1265946626663208,
-0.006028193514794111,
0.11552949249744415,
0.00473205279558897,
-0.013836009427905083,
0.15837512910366058,
0.009735530242323875,
0.1062098816037178,
-0.03464283049106598,
0.1386512815952301,
-0.03728560358285904,
-0.10861358046531677,
0.1407613307237625,
0.021549617871642113,
-0.06244349852204323,
-0.1262044906616211,
0.04956434294581413,
0.0807495266199112,
-0.07205299288034439,
-0.01777443289756775,
-0.018589871004223824,
0.04536956176161766,
-0.1354396790266037,
-0.01628033258020878,
0.19673815369606018,
-0.004645057953894138,
0.04707418009638786,
-0.006786108482629061,
-0.1098145917057991,
0.056168798357248306,
0.008329847827553749,
0.14803113043308258,
-0.19382408261299133,
0.12215925008058548,
-0.012682055123150349,
-0.018784957006573677,
-0.09697232395410538,
0.06019626185297966,
0.06773209571838379,
-0.012370015494525433,
0.08063901960849762,
0.15822440385818481,
-0.08198805898427963,
-0.044306762516498566,
0.1120339184999466,
0.03388730064034462,
0.14188988506793976,
0.0396457239985466,
-0.08662141859531403,
0.04706856235861778,
-0.18412426114082336,
-0.008144372142851353,
0.12249026447534561,
0.04298066720366478,
-0.004500579554587603,
0.1621731072664261,
-0.029643716290593147,
0.03814168646931648,
0.08175697922706604,
0.28261250257492065,
0.07099935412406921,
0.09184432774782181,
0.20288042724132538,
0.07725530862808228,
-0.10329699516296387,
0.16143450140953064,
0.04813345521688461,
-0.01018083468079567,
-0.20911987125873566,
-0.13353168964385986,
0.038415201008319855,
0.18388041853904724,
0.2014152705669403,
-0.04016416147351265,
0.05804668366909027,
-0.111929751932621,
-0.03464775159955025,
0.0015498233260586858,
0.02105080708861351,
0.016326189041137695,
0.01860659569501877,
-0.08290621638298035,
-2.703003709309756e-32,
-0.02413170598447323,
-0.008946412242949009,
-0.0326448492705822,
0.00824709516018629,
-0.13707005977630615,
0.08811625093221664,
-0.040844351053237915,
-0.13364146649837494,
-0.13837724924087524,
-0.053242430090904236,
0.02097179926931858,
0.03571696579456329,
0.029516415670514107,
0.08534614741802216,
-0.19268666207790375,
-0.19802872836589813,
0.02700970135629177,
-0.10500948876142502,
0.0782909169793129,
0.039947446435689926,
-0.07207326591014862,
0.004997604992240667,
-0.012943112291395664,
-0.009644093923270702,
-0.10283094644546509,
-0.11189395934343338,
-0.14387913048267365,
-0.046575527638196945,
0.10023634880781174,
0.02192617580294609,
-0.049513109028339386,
0.20014718174934387,
0.08051540702581406,
-0.10159321874380112,
-0.14393115043640137,
0.06727409362792969,
-0.15948082506656647,
-0.035591959953308105,
0.04622827097773552,
0.038864362984895706,
0.0370660163462162,
0.13288357853889465,
0.10247501730918884,
-0.07318392395973206,
0.006023613270372152,
0.04957706853747368,
0.02644907683134079,
-0.02577965147793293,
-0.08937755227088928,
-0.19138029217720032,
0.03436056151986122,
0.11932995915412903,
-0.03487253561615944,
0.0008941185078583658,
0.14028355479240417,
-0.22233860194683075,
-0.10189275443553925,
0.04311982914805412,
-0.060060787945985794,
-0.05747886002063751,
0.08894558995962143,
-0.22473253309726715,
-0.05680684372782707,
0.019035115838050842,
0.0670325756072998,
-0.13640956580638885,
0.3442937135696411,
-0.0497707724571228,
-0.018695609644055367,
0.07730346918106079,
0.1066959798336029,
0.12158096581697464,
-0.0667240098118782,
-0.028912663459777832,
-0.08408339321613312,
-0.012625296600162983,
-0.015470331534743309,
-0.012440933845937252,
0.005708308890461922,
-0.1010415181517601,
-0.026553994044661522,
-0.0298976581543684,
-0.09345956146717072,
0.04738091677427292,
-0.0450199656188488,
0.023477325215935707,
-0.08685202896595001,
-0.017795711755752563,
-0.16202734410762787,
-0.10602536797523499,
0.08760268241167068,
-0.03479190170764923,
-0.10689029842615128,
-0.08901184797286987,
-0.1269683539867401,
0.10918132960796356,
0.06566330790519714,
-0.057471729815006256,
-0.05126706138253212,
-0.02867596223950386,
-0.031144723296165466,
-0.021855169907212257,
0.105414479970932,
0.12381815910339355,
0.08696546405553818,
-0.04488522559404373,
0.10727836191654205,
0.002446310129016638,
-0.13949501514434814,
-0.030830414965748787,
-0.05905960500240326,
0.08897698670625687,
0.1563572883605957,
0.18521693348884583,
0.20199960470199585,
0.057359516620635986,
-0.0668814554810524,
0.05001456290483475,
0.04552314430475235,
0.07368968427181244,
-0.27358531951904297,
0.00990607962012291,
-0.19731946289539337,
-0.09134012460708618,
0.021545041352510452,
0.026363801211118698,
-0.1518007069826126,
-0.008013629354536533,
0.05766485258936882,
-0.09864551573991776,
0.04789626970887184,
-0.06745050102472305,
7.17828754659422e-7,
-0.3548894226551056,
0.10793078690767288,
-0.05084836483001709,
0.033320847898721695,
0.06316280364990234,
-0.0786101445555687,
-0.2985854744911194,
0.13157352805137634,
-0.08944424986839294,
0.08490367978811264,
0.22898124158382416,
0.03882651403546333,
-0.01263223122805357,
0.10346579551696777,
-0.00719470577314496,
-0.06018543243408203,
-0.242729052901268,
-0.023855023086071014,
0.028106622397899628,
-0.09030398726463318,
0.06520494073629379,
0.15339982509613037,
0.06005198881030083,
-0.00007461025234078988,
0.04695376753807068,
-0.038029395043849945,
0.026472169905900955,
-0.048174336552619934,
-0.0077697099186480045,
-0.14500118792057037,
-0.04619401693344116,
0.2295304834842682,
-0.04694543778896332,
0.2826091945171356,
0.12109526246786118,
-0.06400707364082336,
-0.1542317122220993,
-0.14366039633750916,
0.06316152960062027,
-0.0438280925154686,
0.027027631178498268,
0.18538323044776917,
-0.07166898250579834,
0.03961748257279396,
0.19572187960147858,
0.1803336888551712,
-0.10999426990747452,
0.04557367041707039,
0.1632026880979538,
-0.023744206875562668,
0.07429149746894836,
0.010025275871157646,
0.05565623939037323,
-0.008250966668128967,
-0.08520201593637466,
-0.11825085431337357,
-0.04727670177817345,
-0.1912018060684204,
0.11604171246290207,
0.01530634704977274,
-0.10323149710893631,
-0.10994535684585571,
0.17925801873207092,
-0.04309287667274475,
0.01297659520059824,
0.004485027864575386,
-0.036705344915390015,
-3.541582458204308e-36,
-0.05349224805831909,
-0.1357295662164688,
0.04162358492612839,
-0.1505972445011139,
-0.03269466385245323,
-0.06563609093427658,
0.17296183109283447,
-0.0964411273598671,
0.0028869151137769222,
-0.17616476118564606,
0.02312876097857952
] |
https://github.com/huggingface/datasets/issues/6043 | Compression kwargs have no effect when saving datasets as csv | Hello @exs-avianello, I have reproduced the bug successfully and have understood the problem. But I am confused regarding this part of the statement, "`pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`".
Can you please elaborate on it?
Thanks! | ### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
| 38 | Compression kwargs have no effect when saving datasets as csv
### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
Hello @exs-avianello, I have reproduced the bug successfully and have understood the problem. But I am confused regarding this part of the statement, "`pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`".
Can you please elaborate on it?
Thanks! | [
-0.009990531951189041,
0.19225597381591797,
-0.011131750419735909,
-0.08513358235359192,
0.1797739416360855,
0.058586485683918,
0.1697831004858017,
0.2581753432750702,
-0.17667855322360992,
0.1386519968509674,
0.086033895611763,
0.06254947930574417,
0.029744837433099747,
-0.19461366534233093,
0.09581083059310913,
0.17749710381031036,
-0.07186859846115112,
0.020747920498251915,
-0.1233825609087944,
0.04109713062644005,
-0.18915942311286926,
0.051430847495794296,
0.13632559776306152,
0.1792028397321701,
0.028323421254754066,
0.026833483949303627,
-0.1740281730890274,
0.07822587341070175,
-0.040126655250787735,
-0.022578345611691475,
-0.01768680475652218,
0.07315005362033844,
0.011885504238307476,
0.08803213387727737,
0.00000464824461232638,
-0.026180507615208626,
0.10772448778152466,
0.04374757781624794,
-0.2029987871646881,
0.08363708108663559,
0.13522210717201233,
-0.0994839295744896,
0.09013216942548752,
-0.06773025542497635,
-0.05250081419944763,
-0.09427227824926376,
0.03967071697115898,
-0.0882103368639946,
0.17324893176555634,
-0.07479912787675858,
0.018494145944714546,
0.08082783222198486,
-0.1519545167684555,
-0.26033464074134827,
-0.043606050312519073,
0.11342333257198334,
-0.1539057046175003,
0.0183173306286335,
-0.2574746012687683,
0.017040841281414032,
-0.046840839087963104,
-0.09063258022069931,
-0.09516064822673798,
0.07483158260583878,
-0.1426406353712082,
-0.2754638195037842,
-0.10668125748634338,
-0.08961392939090729,
0.12159787863492966,
0.1359783560037613,
-0.06800597161054611,
-0.16521309316158295,
-0.0860113576054573,
0.15337727963924408,
0.0677029937505722,
-0.1481993943452835,
-0.18641065061092377,
0.2589268386363983,
-0.005056906957179308,
0.09924903512001038,
-0.13368737697601318,
0.1740209460258484,
-0.0163711104542017,
0.049947112798690796,
0.014874359592795372,
0.06800394505262375,
-0.22054193913936615,
0.053857650607824326,
0.0026913355104625225,
-0.14980722963809967,
-0.005199638660997152,
-0.16507655382156372,
-0.006398533470928669,
-0.10724783688783646,
0.11607818305492401,
-0.0034550391137599945,
-0.14988118410110474,
-0.004154226277023554,
0.12800292670726776,
-0.05744205042719841,
0.02994637005031109,
0.06923601031303406,
0.22921417653560638,
-0.06133265420794487,
-0.0010772706009447575,
0.03501690924167633,
0.05734855309128761,
0.01636282168328762,
0.16542987525463104,
0.06926870346069336,
-0.10388253629207611,
0.1625199317932129,
-0.1321713924407959,
-0.03463587909936905,
0.12947192788124084,
0.10807722061872482,
-0.026719791814684868,
0.007160374894738197,
0.0633159652352333,
0.04454325512051582,
0.10577402263879776,
0.06873569637537003,
-0.22496695816516876,
0.057616688311100006,
0.14274966716766357,
0.048516664654016495,
-0.13252860307693481,
0.20547395944595337,
0.17993766069412231,
0.20753571391105652,
-0.23239557445049286,
-0.025759052485227585,
0.023520300164818764,
0.11387021094560623,
0.15297453105449677,
-0.20649302005767822,
0.057156238704919815,
0.08458596467971802,
0.09709309041500092,
-0.01830895058810711,
-0.01735004596412182,
0.010502954944968224,
0.06537990272045135,
-0.019758347421884537,
-0.04270176216959953,
-0.02276998572051525,
0.1409914493560791,
-0.08338338881731033,
-0.03980276733636856,
0.04589078947901726,
-0.22619475424289703,
0.11304286122322083,
0.01935925893485546,
-0.005169338081032038,
-0.1273411065340042,
0.039621058851480484,
0.1503957360982895,
-0.042166817933321,
-0.08237871527671814,
-0.07765120267868042,
-0.041959866881370544,
-0.037791550159454346,
-0.042254600673913956,
-0.12250310182571411,
0.22955837845802307,
0.10741235315799713,
-0.08082562685012817,
-0.10189805179834366,
-0.18869301676750183,
-0.04964780807495117,
0.22384768724441528,
-0.004038403742015362,
-0.11220914870500565,
-0.22172890603542328,
-0.11691492795944214,
0.2126951515674591,
-0.016678255051374435,
0.25587743520736694,
-0.08877015113830566,
-0.05493226647377014,
0.10014435648918152,
0.08504927903413773,
0.3219318091869354,
-0.14752882719039917,
0.01284602377563715,
0.01738828606903553,
-0.0402187816798687,
0.11617301404476166,
-0.048830386251211166,
-0.11629655212163925,
-0.14492078125476837,
-0.10363338142633438,
0.22796674072742462,
-0.1445370614528656,
0.03137834370136261,
0.16791658103466034,
-0.03865694999694824,
-0.09346667677164078,
0.030963905155658722,
-0.2607634365558624,
0.09147261083126068,
-0.10273527354001999,
-0.09010373800992966,
-0.058596156537532806,
0.16976706683635712,
0.1570924073457718,
-0.03205941617488861,
-0.007127736695110798,
-0.03231319785118103,
-0.17666928470134735,
-0.1387147605419159,
-0.04211235046386719,
0.08233180642127991,
-0.06885895133018494,
-0.035606883466243744,
-0.08988042175769806,
0.006337183527648449,
0.07306679338216782,
0.024432994425296783,
0.12141302227973938,
-0.03355541452765465,
0.11518614739179611,
-0.07048412412405014,
0.07868849486112595,
0.1734081357717514,
0.05520724877715111,
0.0924164354801178,
-0.15009357035160065,
-0.10656413435935974,
0.09311661124229431,
-0.08591307699680328,
-0.1203480213880539,
0.11683319509029388,
-0.08996777981519699,
-0.05112924054265022,
-0.07353892922401428,
-0.005917902570217848,
-0.2556815445423126,
-0.06755730509757996,
0.11643288284540176,
0.027819154784083366,
0.21593119204044342,
-0.11478383094072342,
0.20945097506046295,
0.02648822031915188,
-0.03305584192276001,
-0.024381639435887337,
-0.060549456626176834,
-0.045970287173986435,
0.03412702679634094,
0.14765223860740662,
0.06781596690416336,
-0.13560310006141663,
-0.021683596074581146,
-0.1240406334400177,
-0.11616760492324829,
-0.008243349380791187,
0.0439249724149704,
0.055954430252313614,
-0.0335577018558979,
0.22745369374752045,
-0.0928681492805481,
-0.0624089278280735,
0.09572160243988037,
0.1173643097281456,
-0.1271103024482727,
0.0718584880232811,
0.02187119424343109,
0.014257806353271008,
0.020719226449728012,
0.0814272090792656,
-0.09347301721572876,
-0.07374529540538788,
-0.0531344898045063,
-0.06772057712078094,
-0.10043302178382874,
-0.05229772627353668,
0.1603095531463623,
-0.13223107159137726,
0.058154258877038956,
-0.09346690028905869,
0.3278358280658722,
0.0418800488114357,
-0.18241263926029205,
0.1226862221956253,
0.20671531558036804,
-0.15912452340126038,
-0.07816120237112045,
-0.14389488101005554,
0.10005147755146027,
0.026043934747576714,
-0.11847344040870667,
0.07612491399049759,
-0.20205995440483093,
-0.14983366429805756,
-0.010992896743118763,
-0.11743814498186111,
0.06127738952636719,
0.039336927235126495,
0.059993669390678406,
-0.04389101266860962,
0.13831353187561035,
0.027526265010237694,
0.03163547068834305,
-0.16457819938659668,
-0.08669894188642502,
0.0652916207909584,
0.09769406169652939,
0.005476471036672592,
0.08517404645681381,
0.030594736337661743,
-0.07031194865703583,
-0.07150249183177948,
0.09583980590105057,
-0.19134926795959473,
0.049734927713871,
-0.06061719357967377,
-0.27994322776794434,
0.271090030670166,
0.15172278881072998,
0.07243864983320236,
0.0829983726143837,
0.005065180826932192,
-0.07552556693553925,
0.03206151723861694,
0.13517774641513824,
-0.14170551300048828,
-0.08711963891983032,
-0.03500931337475777,
0.007614124566316605,
-0.010894223116338253,
0.18027426302433014,
0.029851477593183517,
-0.16934850811958313,
0.23966403305530548,
-0.002871768781915307,
-0.13118131458759308,
-0.15109601616859436,
0.20668645203113556,
-0.015230507589876652,
-0.08479536324739456,
-0.025951901450753212,
-0.051225531846284866,
-0.020030822604894638,
0.15997076034545898,
-0.11287299543619156,
0.2302347868680954,
-0.1911454200744629,
0.00365864927880466,
0.21122413873672485,
-0.11141999810934067,
0.032087989151477814,
-0.01803424023091793,
-0.14222201704978943,
0.17517338693141937,
-0.051335953176021576,
-0.1318078339099884,
0.055848587304353714,
0.07402899861335754,
0.222820445895195,
-0.04440000653266907,
0.1306522935628891,
-0.0436054989695549,
0.04714827984571457,
0.17124709486961365,
0.07085330784320831,
-0.02613224647939205,
0.22070080041885376,
0.049855221062898636,
-0.11581021547317505,
-0.13036909699440002,
-0.02765168994665146,
-0.09825371950864792,
0.0017739551840350032,
0.0334211140871048,
-0.06173485517501831,
0.09727003425359726,
-0.10827881097793579,
0.1466633379459381,
-0.006582499947398901,
0.09424585849046707,
-0.1473429948091507,
-0.09303951263427734,
-0.04708210751414299,
0.07353011518716812,
0.009339005686342716,
-0.06346061825752258,
-0.041222598403692245,
-0.0811832845211029,
0.22603721916675568,
0.195444718003273,
0.3011770248413086,
0.11002526432275772,
-0.03111736662685871,
0.019722888246178627,
-0.10495494306087494,
0.1813822090625763,
0.05998711287975311,
-0.035325873643159866,
0.1215619370341301,
0.24981042742729187,
0.061312444508075714,
0.005405872128903866,
-0.06914368271827698,
0.2749488949775696,
0.009044334292411804,
-0.005034263711422682,
-0.12798747420310974,
0.06356032937765121,
-0.04427460581064224,
-0.04948049038648605,
0.17548765242099762,
0.10091791301965714,
-0.09548663347959518,
0.026332786306738853,
0.12467392534017563,
0.1658509075641632,
0.04549788683652878,
0.0014320611953735352,
-0.11753483861684799,
-0.13635984063148499,
-0.09959563612937927,
0.029863879084587097,
0.004270320758223534,
-0.1929926872253418,
0.04689234122633934,
-0.06086057052016258,
-0.2164662778377533,
0.17330044507980347,
0.06732996553182602,
0.08896744251251221,
-0.08540218323469162,
0.024966498836874962,
-0.10018517822027206,
0.15378634631633759,
-0.2004103809595108,
0.1667693853378296,
-0.05963387340307236,
-0.25130271911621094,
-0.15409915149211884,
-0.0880822017788887,
0.06209729611873627,
0.10743653029203415,
-0.21341536939144135,
-0.010954312980175018,
-0.007776558864861727,
0.03917188569903374,
-0.20352962613105774,
-0.11675511300563812,
0.1145542562007904,
-0.26174136996269226,
-0.06381354480981827,
-0.039404772222042084,
-0.2255994975566864,
0.10185376554727554,
-0.016459640115499496,
0.11386574804782867,
-0.16593489050865173,
-0.11549840867519379,
-0.012453718110918999,
0.073398157954216,
-0.024985622614622116,
-0.05575423315167427,
0.08712787926197052,
-0.0499420240521431,
0.08028380572795868,
0.225400909781456,
-0.13030515611171722,
0.23537558317184448,
0.16623637080192566,
-0.22305555641651154,
0.12097019702196121,
-0.020112715661525726,
0.0722266361117363,
0.09894713014364243,
-0.07222733646631241,
-0.03217770531773567,
-0.07520505040884018,
-0.04729568213224411,
-0.047143615782260895,
0.1409653127193451,
0.08899249136447906,
-0.07774809002876282,
-0.20429418981075287,
0.23460789024829865,
0.09554308652877808,
-0.051911354064941406,
0.08948943763971329,
-0.15735889971256256,
-0.15774957835674286,
-0.09854637831449509,
0.024391967803239822,
0.1829768270254135,
0.07658637315034866,
0.11305837333202362,
-0.0721362978219986,
-0.045450784265995026,
-0.032462164759635925,
-0.08417950570583344,
0.008275190368294716,
0.10871470719575882,
0.02943289279937744,
0.03358381241559982,
-0.11588297039270401,
0.13504323363304138,
-0.005766323301941156,
-0.13279107213020325,
0.035452939569950104,
-0.02569495141506195,
0.210860475897789,
-0.10918563604354858,
0.13850019872188568,
0.03518878296017647,
0.09863890707492828,
0.015364033170044422,
-0.07801748067140579,
-0.16549982130527496,
-0.15857763588428497,
-0.10517210513353348,
-0.1748068928718567,
0.09549198299646378,
0.0328700952231884,
-0.11449059098958969,
0.07286261767148972,
0.17057998478412628,
-0.07353813201189041,
-0.19848443567752838,
-0.12314493954181671,
0.12166039645671844,
0.16076457500457764,
0.06302572786808014,
0.19772760570049286,
0.020135322585701942,
-0.14225101470947266,
-0.010044671595096588,
0.09629648923873901,
-0.07204057276248932,
0.04592762142419815,
0.05108937248587608,
-0.1224176213145256,
0.0019932989962399006,
-0.1779322773218155,
-0.10993286967277527,
0.08900748193264008,
0.11746756732463837,
-0.07207020372152328,
0.09857014566659927,
-0.07702454179525375,
0.0638979896903038,
0.059061963111162186,
0.047829799354076385,
0.06747225672006607,
-0.09405173361301422,
0.0007411211263388395,
-0.09046146273612976,
-2.2797093690730009e-32,
0.013086328282952309,
0.07962772995233536,
-0.04014865681529045,
0.013595841825008392,
-0.07260705530643463,
0.01353580690920353,
-0.06386638432741165,
0.003942264709621668,
-0.08028355240821838,
0.03068840317428112,
-0.21813704073429108,
-0.026156440377235413,
-0.03619004040956497,
-0.11669405549764633,
-0.04719865322113037,
-0.06188180670142174,
0.041928455233573914,
-0.15487772226333618,
0.008405579254031181,
0.14613381028175354,
0.04061782732605934,
-0.0691586434841156,
0.09291817247867584,
0.0371219702064991,
-0.01790001057088375,
-0.05920316278934479,
-0.29236865043640137,
-0.2732945382595062,
0.042702075093984604,
0.030171453952789307,
0.0027443175204098225,
0.07198578864336014,
0.02687644399702549,
-0.08859105408191681,
-0.05092877894639969,
0.022429021075367928,
-0.08807886391878128,
-0.02874535694718361,
0.012558535672724247,
-0.1832890510559082,
-0.038896504789590836,
-0.048874758183956146,
0.23491287231445312,
0.03129999339580536,
-0.031183995306491852,
-0.003095148131251335,
-0.21672946214675903,
-0.09924245625734329,
-0.01049130130559206,
-0.22463244199752808,
0.14002123475074768,
-0.0765976756811142,
-0.04501385986804962,
0.060838811099529266,
0.07253129780292511,
0.06654862314462662,
-0.1614547222852707,
0.2764158248901367,
0.0876375138759613,
0.20855076611042023,
0.02383982017636299,
0.13559307157993317,
0.1714121550321579,
-0.2783541679382324,
0.019024506211280823,
0.03418716415762901,
0.12222742289304733,
0.12779824435710907,
-0.06306810677051544,
0.09182249754667282,
0.019426077604293823,
-0.04670010879635811,
0.025310881435871124,
0.17346183955669403,
0.021880391985177994,
-0.15356038510799408,
-0.21554917097091675,
0.043064605444669724,
0.21018825471401215,
-0.14855612814426422,
-0.03185299411416054,
0.005231456831097603,
-0.0729512944817543,
0.006529903970658779,
-0.12315892428159714,
0.11536940187215805,
0.050613146275281906,
-0.03340891748666763,
-0.15190044045448303,
-0.0024481823202222586,
-0.02718195877969265,
0.029548650607466698,
-0.14093449711799622,
-0.034179676324129105,
0.05399855226278305,
0.08431311696767807,
-0.13421131670475006,
0.045255400240421295,
-0.04845903068780899,
-0.05095986649394035,
0.03472650423645973,
0.09430819749832153,
0.10240527987480164,
-0.138871967792511,
0.1624857634305954,
-0.06540171056985855,
0.3004911243915558,
0.10614771395921707,
-0.06795834004878998,
0.033609539270401,
0.07057877629995346,
0.20167481899261475,
0.2003679871559143,
-0.019622335210442543,
0.09315314888954163,
0.06168932467699051,
-0.004139142110943794,
-0.15225011110305786,
0.08031284809112549,
0.10109535604715347,
0.031875330954790115,
-0.02172389067709446,
0.06295304000377655,
0.029404563829302788,
-0.0006818727124482393,
-0.04444223269820213,
-0.050160929560661316,
-0.15903319418430328,
-0.037179913371801376,
-0.0537211149930954,
-0.17959463596343994,
-0.0017795376479625702,
6.938388423805009e-7,
-0.044774897396564484,
0.08737845718860626,
0.09340443462133408,
-0.09321776032447815,
-0.07317229360342026,
0.12322834879159927,
-0.1160091832280159,
0.013607797212898731,
-0.11100858449935913,
0.06764490902423859,
0.0660834014415741,
-0.06944992393255234,
-0.04232551530003548,
-0.08882428705692291,
0.05877998098731041,
0.05855587497353554,
0.007293929345905781,
0.05613930523395538,
-0.10899336636066437,
0.054294440895318985,
0.07771479338407516,
0.19096839427947998,
-0.004214915446937084,
0.02004912681877613,
0.052862100303173065,
-0.009293937124311924,
-0.02279203198850155,
-0.024147992953658104,
-0.047650519758462906,
0.0014570916537195444,
0.10353748500347137,
-0.1842612475156784,
-0.0007757561979815364,
0.1073855459690094,
-0.1565292626619339,
0.00023062198306433856,
-0.21224835515022278,
0.11035990715026855,
0.016983941197395325,
0.06122219190001488,
0.14522162079811096,
0.022811047732830048,
-0.123719722032547,
-0.033956777304410934,
0.1007104143500328,
0.1906300187110901,
-0.0829894095659256,
-0.000060769445553887635,
0.17970627546310425,
0.01095032412558794,
0.02538713440299034,
-0.0562967024743557,
0.16629880666732788,
-0.002475578337907791,
0.01522086001932621,
0.22818750143051147,
0.07344574481248856,
-0.20934680104255676,
0.1109122559428215,
-0.1290259212255478,
-0.029835544526576996,
-0.10700933635234833,
0.028852121904492378,
0.16457995772361755,
0.12543635070323944,
0.035713184624910355,
0.06169183552265167,
1.2434533067454222e-34,
-0.09037370979785919,
0.1047472208738327,
0.05578664690256119,
-0.24463330209255219,
-0.08306355029344559,
-0.13676337897777557,
0.10848026722669601,
0.042470578104257584,
-0.028008533641695976,
-0.1864505112171173,
-0.15666942298412323
] |
https://github.com/huggingface/datasets/issues/6043 | Compression kwargs have no effect when saving datasets as csv | Hi @aryanxk02 ! Sure, what I actually meant is that when passing a path-like `path_or_buf` here
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/arrow_dataset.py#L4708-L4714
it gets converted to a file object behind the scenes here
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/io/csv.py#L92-L94
and the eventual pandas `.to_csv()` calls that write to it always get `path_or_buf=None`, making pandas ignore the `compression` kwarg in the `to_csv_kwargs`
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/io/csv.py#L107-L109 | ### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
| 52 | Compression kwargs have no effect when saving datasets as csv
### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
Hi @aryanxk02 ! Sure, what I actually meant is that when passing a path-like `path_or_buf` here
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/arrow_dataset.py#L4708-L4714
it gets converted to a file object behind the scenes here
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/io/csv.py#L92-L94
and the eventual pandas `.to_csv()` calls that write to it always get `path_or_buf=None`, making pandas ignore the `compression` kwarg in the `to_csv_kwargs`
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/io/csv.py#L107-L109 | [
-0.009990531951189041,
0.19225597381591797,
-0.011131750419735909,
-0.08513358235359192,
0.1797739416360855,
0.058586485683918,
0.1697831004858017,
0.2581753432750702,
-0.17667855322360992,
0.1386519968509674,
0.086033895611763,
0.06254947930574417,
0.029744837433099747,
-0.19461366534233093,
0.09581083059310913,
0.17749710381031036,
-0.07186859846115112,
0.020747920498251915,
-0.1233825609087944,
0.04109713062644005,
-0.18915942311286926,
0.051430847495794296,
0.13632559776306152,
0.1792028397321701,
0.028323421254754066,
0.026833483949303627,
-0.1740281730890274,
0.07822587341070175,
-0.040126655250787735,
-0.022578345611691475,
-0.01768680475652218,
0.07315005362033844,
0.011885504238307476,
0.08803213387727737,
0.00000464824461232638,
-0.026180507615208626,
0.10772448778152466,
0.04374757781624794,
-0.2029987871646881,
0.08363708108663559,
0.13522210717201233,
-0.0994839295744896,
0.09013216942548752,
-0.06773025542497635,
-0.05250081419944763,
-0.09427227824926376,
0.03967071697115898,
-0.0882103368639946,
0.17324893176555634,
-0.07479912787675858,
0.018494145944714546,
0.08082783222198486,
-0.1519545167684555,
-0.26033464074134827,
-0.043606050312519073,
0.11342333257198334,
-0.1539057046175003,
0.0183173306286335,
-0.2574746012687683,
0.017040841281414032,
-0.046840839087963104,
-0.09063258022069931,
-0.09516064822673798,
0.07483158260583878,
-0.1426406353712082,
-0.2754638195037842,
-0.10668125748634338,
-0.08961392939090729,
0.12159787863492966,
0.1359783560037613,
-0.06800597161054611,
-0.16521309316158295,
-0.0860113576054573,
0.15337727963924408,
0.0677029937505722,
-0.1481993943452835,
-0.18641065061092377,
0.2589268386363983,
-0.005056906957179308,
0.09924903512001038,
-0.13368737697601318,
0.1740209460258484,
-0.0163711104542017,
0.049947112798690796,
0.014874359592795372,
0.06800394505262375,
-0.22054193913936615,
0.053857650607824326,
0.0026913355104625225,
-0.14980722963809967,
-0.005199638660997152,
-0.16507655382156372,
-0.006398533470928669,
-0.10724783688783646,
0.11607818305492401,
-0.0034550391137599945,
-0.14988118410110474,
-0.004154226277023554,
0.12800292670726776,
-0.05744205042719841,
0.02994637005031109,
0.06923601031303406,
0.22921417653560638,
-0.06133265420794487,
-0.0010772706009447575,
0.03501690924167633,
0.05734855309128761,
0.01636282168328762,
0.16542987525463104,
0.06926870346069336,
-0.10388253629207611,
0.1625199317932129,
-0.1321713924407959,
-0.03463587909936905,
0.12947192788124084,
0.10807722061872482,
-0.026719791814684868,
0.007160374894738197,
0.0633159652352333,
0.04454325512051582,
0.10577402263879776,
0.06873569637537003,
-0.22496695816516876,
0.057616688311100006,
0.14274966716766357,
0.048516664654016495,
-0.13252860307693481,
0.20547395944595337,
0.17993766069412231,
0.20753571391105652,
-0.23239557445049286,
-0.025759052485227585,
0.023520300164818764,
0.11387021094560623,
0.15297453105449677,
-0.20649302005767822,
0.057156238704919815,
0.08458596467971802,
0.09709309041500092,
-0.01830895058810711,
-0.01735004596412182,
0.010502954944968224,
0.06537990272045135,
-0.019758347421884537,
-0.04270176216959953,
-0.02276998572051525,
0.1409914493560791,
-0.08338338881731033,
-0.03980276733636856,
0.04589078947901726,
-0.22619475424289703,
0.11304286122322083,
0.01935925893485546,
-0.005169338081032038,
-0.1273411065340042,
0.039621058851480484,
0.1503957360982895,
-0.042166817933321,
-0.08237871527671814,
-0.07765120267868042,
-0.041959866881370544,
-0.037791550159454346,
-0.042254600673913956,
-0.12250310182571411,
0.22955837845802307,
0.10741235315799713,
-0.08082562685012817,
-0.10189805179834366,
-0.18869301676750183,
-0.04964780807495117,
0.22384768724441528,
-0.004038403742015362,
-0.11220914870500565,
-0.22172890603542328,
-0.11691492795944214,
0.2126951515674591,
-0.016678255051374435,
0.25587743520736694,
-0.08877015113830566,
-0.05493226647377014,
0.10014435648918152,
0.08504927903413773,
0.3219318091869354,
-0.14752882719039917,
0.01284602377563715,
0.01738828606903553,
-0.0402187816798687,
0.11617301404476166,
-0.048830386251211166,
-0.11629655212163925,
-0.14492078125476837,
-0.10363338142633438,
0.22796674072742462,
-0.1445370614528656,
0.03137834370136261,
0.16791658103466034,
-0.03865694999694824,
-0.09346667677164078,
0.030963905155658722,
-0.2607634365558624,
0.09147261083126068,
-0.10273527354001999,
-0.09010373800992966,
-0.058596156537532806,
0.16976706683635712,
0.1570924073457718,
-0.03205941617488861,
-0.007127736695110798,
-0.03231319785118103,
-0.17666928470134735,
-0.1387147605419159,
-0.04211235046386719,
0.08233180642127991,
-0.06885895133018494,
-0.035606883466243744,
-0.08988042175769806,
0.006337183527648449,
0.07306679338216782,
0.024432994425296783,
0.12141302227973938,
-0.03355541452765465,
0.11518614739179611,
-0.07048412412405014,
0.07868849486112595,
0.1734081357717514,
0.05520724877715111,
0.0924164354801178,
-0.15009357035160065,
-0.10656413435935974,
0.09311661124229431,
-0.08591307699680328,
-0.1203480213880539,
0.11683319509029388,
-0.08996777981519699,
-0.05112924054265022,
-0.07353892922401428,
-0.005917902570217848,
-0.2556815445423126,
-0.06755730509757996,
0.11643288284540176,
0.027819154784083366,
0.21593119204044342,
-0.11478383094072342,
0.20945097506046295,
0.02648822031915188,
-0.03305584192276001,
-0.024381639435887337,
-0.060549456626176834,
-0.045970287173986435,
0.03412702679634094,
0.14765223860740662,
0.06781596690416336,
-0.13560310006141663,
-0.021683596074581146,
-0.1240406334400177,
-0.11616760492324829,
-0.008243349380791187,
0.0439249724149704,
0.055954430252313614,
-0.0335577018558979,
0.22745369374752045,
-0.0928681492805481,
-0.0624089278280735,
0.09572160243988037,
0.1173643097281456,
-0.1271103024482727,
0.0718584880232811,
0.02187119424343109,
0.014257806353271008,
0.020719226449728012,
0.0814272090792656,
-0.09347301721572876,
-0.07374529540538788,
-0.0531344898045063,
-0.06772057712078094,
-0.10043302178382874,
-0.05229772627353668,
0.1603095531463623,
-0.13223107159137726,
0.058154258877038956,
-0.09346690028905869,
0.3278358280658722,
0.0418800488114357,
-0.18241263926029205,
0.1226862221956253,
0.20671531558036804,
-0.15912452340126038,
-0.07816120237112045,
-0.14389488101005554,
0.10005147755146027,
0.026043934747576714,
-0.11847344040870667,
0.07612491399049759,
-0.20205995440483093,
-0.14983366429805756,
-0.010992896743118763,
-0.11743814498186111,
0.06127738952636719,
0.039336927235126495,
0.059993669390678406,
-0.04389101266860962,
0.13831353187561035,
0.027526265010237694,
0.03163547068834305,
-0.16457819938659668,
-0.08669894188642502,
0.0652916207909584,
0.09769406169652939,
0.005476471036672592,
0.08517404645681381,
0.030594736337661743,
-0.07031194865703583,
-0.07150249183177948,
0.09583980590105057,
-0.19134926795959473,
0.049734927713871,
-0.06061719357967377,
-0.27994322776794434,
0.271090030670166,
0.15172278881072998,
0.07243864983320236,
0.0829983726143837,
0.005065180826932192,
-0.07552556693553925,
0.03206151723861694,
0.13517774641513824,
-0.14170551300048828,
-0.08711963891983032,
-0.03500931337475777,
0.007614124566316605,
-0.010894223116338253,
0.18027426302433014,
0.029851477593183517,
-0.16934850811958313,
0.23966403305530548,
-0.002871768781915307,
-0.13118131458759308,
-0.15109601616859436,
0.20668645203113556,
-0.015230507589876652,
-0.08479536324739456,
-0.025951901450753212,
-0.051225531846284866,
-0.020030822604894638,
0.15997076034545898,
-0.11287299543619156,
0.2302347868680954,
-0.1911454200744629,
0.00365864927880466,
0.21122413873672485,
-0.11141999810934067,
0.032087989151477814,
-0.01803424023091793,
-0.14222201704978943,
0.17517338693141937,
-0.051335953176021576,
-0.1318078339099884,
0.055848587304353714,
0.07402899861335754,
0.222820445895195,
-0.04440000653266907,
0.1306522935628891,
-0.0436054989695549,
0.04714827984571457,
0.17124709486961365,
0.07085330784320831,
-0.02613224647939205,
0.22070080041885376,
0.049855221062898636,
-0.11581021547317505,
-0.13036909699440002,
-0.02765168994665146,
-0.09825371950864792,
0.0017739551840350032,
0.0334211140871048,
-0.06173485517501831,
0.09727003425359726,
-0.10827881097793579,
0.1466633379459381,
-0.006582499947398901,
0.09424585849046707,
-0.1473429948091507,
-0.09303951263427734,
-0.04708210751414299,
0.07353011518716812,
0.009339005686342716,
-0.06346061825752258,
-0.041222598403692245,
-0.0811832845211029,
0.22603721916675568,
0.195444718003273,
0.3011770248413086,
0.11002526432275772,
-0.03111736662685871,
0.019722888246178627,
-0.10495494306087494,
0.1813822090625763,
0.05998711287975311,
-0.035325873643159866,
0.1215619370341301,
0.24981042742729187,
0.061312444508075714,
0.005405872128903866,
-0.06914368271827698,
0.2749488949775696,
0.009044334292411804,
-0.005034263711422682,
-0.12798747420310974,
0.06356032937765121,
-0.04427460581064224,
-0.04948049038648605,
0.17548765242099762,
0.10091791301965714,
-0.09548663347959518,
0.026332786306738853,
0.12467392534017563,
0.1658509075641632,
0.04549788683652878,
0.0014320611953735352,
-0.11753483861684799,
-0.13635984063148499,
-0.09959563612937927,
0.029863879084587097,
0.004270320758223534,
-0.1929926872253418,
0.04689234122633934,
-0.06086057052016258,
-0.2164662778377533,
0.17330044507980347,
0.06732996553182602,
0.08896744251251221,
-0.08540218323469162,
0.024966498836874962,
-0.10018517822027206,
0.15378634631633759,
-0.2004103809595108,
0.1667693853378296,
-0.05963387340307236,
-0.25130271911621094,
-0.15409915149211884,
-0.0880822017788887,
0.06209729611873627,
0.10743653029203415,
-0.21341536939144135,
-0.010954312980175018,
-0.007776558864861727,
0.03917188569903374,
-0.20352962613105774,
-0.11675511300563812,
0.1145542562007904,
-0.26174136996269226,
-0.06381354480981827,
-0.039404772222042084,
-0.2255994975566864,
0.10185376554727554,
-0.016459640115499496,
0.11386574804782867,
-0.16593489050865173,
-0.11549840867519379,
-0.012453718110918999,
0.073398157954216,
-0.024985622614622116,
-0.05575423315167427,
0.08712787926197052,
-0.0499420240521431,
0.08028380572795868,
0.225400909781456,
-0.13030515611171722,
0.23537558317184448,
0.16623637080192566,
-0.22305555641651154,
0.12097019702196121,
-0.020112715661525726,
0.0722266361117363,
0.09894713014364243,
-0.07222733646631241,
-0.03217770531773567,
-0.07520505040884018,
-0.04729568213224411,
-0.047143615782260895,
0.1409653127193451,
0.08899249136447906,
-0.07774809002876282,
-0.20429418981075287,
0.23460789024829865,
0.09554308652877808,
-0.051911354064941406,
0.08948943763971329,
-0.15735889971256256,
-0.15774957835674286,
-0.09854637831449509,
0.024391967803239822,
0.1829768270254135,
0.07658637315034866,
0.11305837333202362,
-0.0721362978219986,
-0.045450784265995026,
-0.032462164759635925,
-0.08417950570583344,
0.008275190368294716,
0.10871470719575882,
0.02943289279937744,
0.03358381241559982,
-0.11588297039270401,
0.13504323363304138,
-0.005766323301941156,
-0.13279107213020325,
0.035452939569950104,
-0.02569495141506195,
0.210860475897789,
-0.10918563604354858,
0.13850019872188568,
0.03518878296017647,
0.09863890707492828,
0.015364033170044422,
-0.07801748067140579,
-0.16549982130527496,
-0.15857763588428497,
-0.10517210513353348,
-0.1748068928718567,
0.09549198299646378,
0.0328700952231884,
-0.11449059098958969,
0.07286261767148972,
0.17057998478412628,
-0.07353813201189041,
-0.19848443567752838,
-0.12314493954181671,
0.12166039645671844,
0.16076457500457764,
0.06302572786808014,
0.19772760570049286,
0.020135322585701942,
-0.14225101470947266,
-0.010044671595096588,
0.09629648923873901,
-0.07204057276248932,
0.04592762142419815,
0.05108937248587608,
-0.1224176213145256,
0.0019932989962399006,
-0.1779322773218155,
-0.10993286967277527,
0.08900748193264008,
0.11746756732463837,
-0.07207020372152328,
0.09857014566659927,
-0.07702454179525375,
0.0638979896903038,
0.059061963111162186,
0.047829799354076385,
0.06747225672006607,
-0.09405173361301422,
0.0007411211263388395,
-0.09046146273612976,
-2.2797093690730009e-32,
0.013086328282952309,
0.07962772995233536,
-0.04014865681529045,
0.013595841825008392,
-0.07260705530643463,
0.01353580690920353,
-0.06386638432741165,
0.003942264709621668,
-0.08028355240821838,
0.03068840317428112,
-0.21813704073429108,
-0.026156440377235413,
-0.03619004040956497,
-0.11669405549764633,
-0.04719865322113037,
-0.06188180670142174,
0.041928455233573914,
-0.15487772226333618,
0.008405579254031181,
0.14613381028175354,
0.04061782732605934,
-0.0691586434841156,
0.09291817247867584,
0.0371219702064991,
-0.01790001057088375,
-0.05920316278934479,
-0.29236865043640137,
-0.2732945382595062,
0.042702075093984604,
0.030171453952789307,
0.0027443175204098225,
0.07198578864336014,
0.02687644399702549,
-0.08859105408191681,
-0.05092877894639969,
0.022429021075367928,
-0.08807886391878128,
-0.02874535694718361,
0.012558535672724247,
-0.1832890510559082,
-0.038896504789590836,
-0.048874758183956146,
0.23491287231445312,
0.03129999339580536,
-0.031183995306491852,
-0.003095148131251335,
-0.21672946214675903,
-0.09924245625734329,
-0.01049130130559206,
-0.22463244199752808,
0.14002123475074768,
-0.0765976756811142,
-0.04501385986804962,
0.060838811099529266,
0.07253129780292511,
0.06654862314462662,
-0.1614547222852707,
0.2764158248901367,
0.0876375138759613,
0.20855076611042023,
0.02383982017636299,
0.13559307157993317,
0.1714121550321579,
-0.2783541679382324,
0.019024506211280823,
0.03418716415762901,
0.12222742289304733,
0.12779824435710907,
-0.06306810677051544,
0.09182249754667282,
0.019426077604293823,
-0.04670010879635811,
0.025310881435871124,
0.17346183955669403,
0.021880391985177994,
-0.15356038510799408,
-0.21554917097091675,
0.043064605444669724,
0.21018825471401215,
-0.14855612814426422,
-0.03185299411416054,
0.005231456831097603,
-0.0729512944817543,
0.006529903970658779,
-0.12315892428159714,
0.11536940187215805,
0.050613146275281906,
-0.03340891748666763,
-0.15190044045448303,
-0.0024481823202222586,
-0.02718195877969265,
0.029548650607466698,
-0.14093449711799622,
-0.034179676324129105,
0.05399855226278305,
0.08431311696767807,
-0.13421131670475006,
0.045255400240421295,
-0.04845903068780899,
-0.05095986649394035,
0.03472650423645973,
0.09430819749832153,
0.10240527987480164,
-0.138871967792511,
0.1624857634305954,
-0.06540171056985855,
0.3004911243915558,
0.10614771395921707,
-0.06795834004878998,
0.033609539270401,
0.07057877629995346,
0.20167481899261475,
0.2003679871559143,
-0.019622335210442543,
0.09315314888954163,
0.06168932467699051,
-0.004139142110943794,
-0.15225011110305786,
0.08031284809112549,
0.10109535604715347,
0.031875330954790115,
-0.02172389067709446,
0.06295304000377655,
0.029404563829302788,
-0.0006818727124482393,
-0.04444223269820213,
-0.050160929560661316,
-0.15903319418430328,
-0.037179913371801376,
-0.0537211149930954,
-0.17959463596343994,
-0.0017795376479625702,
6.938388423805009e-7,
-0.044774897396564484,
0.08737845718860626,
0.09340443462133408,
-0.09321776032447815,
-0.07317229360342026,
0.12322834879159927,
-0.1160091832280159,
0.013607797212898731,
-0.11100858449935913,
0.06764490902423859,
0.0660834014415741,
-0.06944992393255234,
-0.04232551530003548,
-0.08882428705692291,
0.05877998098731041,
0.05855587497353554,
0.007293929345905781,
0.05613930523395538,
-0.10899336636066437,
0.054294440895318985,
0.07771479338407516,
0.19096839427947998,
-0.004214915446937084,
0.02004912681877613,
0.052862100303173065,
-0.009293937124311924,
-0.02279203198850155,
-0.024147992953658104,
-0.047650519758462906,
0.0014570916537195444,
0.10353748500347137,
-0.1842612475156784,
-0.0007757561979815364,
0.1073855459690094,
-0.1565292626619339,
0.00023062198306433856,
-0.21224835515022278,
0.11035990715026855,
0.016983941197395325,
0.06122219190001488,
0.14522162079811096,
0.022811047732830048,
-0.123719722032547,
-0.033956777304410934,
0.1007104143500328,
0.1906300187110901,
-0.0829894095659256,
-0.000060769445553887635,
0.17970627546310425,
0.01095032412558794,
0.02538713440299034,
-0.0562967024743557,
0.16629880666732788,
-0.002475578337907791,
0.01522086001932621,
0.22818750143051147,
0.07344574481248856,
-0.20934680104255676,
0.1109122559428215,
-0.1290259212255478,
-0.029835544526576996,
-0.10700933635234833,
0.028852121904492378,
0.16457995772361755,
0.12543635070323944,
0.035713184624910355,
0.06169183552265167,
1.2434533067454222e-34,
-0.09037370979785919,
0.1047472208738327,
0.05578664690256119,
-0.24463330209255219,
-0.08306355029344559,
-0.13676337897777557,
0.10848026722669601,
0.042470578104257584,
-0.028008533641695976,
-0.1864505112171173,
-0.15666942298412323
] |
https://github.com/huggingface/datasets/issues/6043 | Compression kwargs have no effect when saving datasets as csv | @exs-avianello When `path_or_buf` is set to None, the `to_csv()` method will return the CSV data as a string instead of saving it to a file. Hence the compression doesn't take place. I think setting `path_or_buf=self.path_or_buf` should work. What you say? | ### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
| 40 | Compression kwargs have no effect when saving datasets as csv
### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
@exs-avianello When `path_or_buf` is set to None, the `to_csv()` method will return the CSV data as a string instead of saving it to a file. Hence the compression doesn't take place. I think setting `path_or_buf=self.path_or_buf` should work. What you say? | [
-0.009990531951189041,
0.19225597381591797,
-0.011131750419735909,
-0.08513358235359192,
0.1797739416360855,
0.058586485683918,
0.1697831004858017,
0.2581753432750702,
-0.17667855322360992,
0.1386519968509674,
0.086033895611763,
0.06254947930574417,
0.029744837433099747,
-0.19461366534233093,
0.09581083059310913,
0.17749710381031036,
-0.07186859846115112,
0.020747920498251915,
-0.1233825609087944,
0.04109713062644005,
-0.18915942311286926,
0.051430847495794296,
0.13632559776306152,
0.1792028397321701,
0.028323421254754066,
0.026833483949303627,
-0.1740281730890274,
0.07822587341070175,
-0.040126655250787735,
-0.022578345611691475,
-0.01768680475652218,
0.07315005362033844,
0.011885504238307476,
0.08803213387727737,
0.00000464824461232638,
-0.026180507615208626,
0.10772448778152466,
0.04374757781624794,
-0.2029987871646881,
0.08363708108663559,
0.13522210717201233,
-0.0994839295744896,
0.09013216942548752,
-0.06773025542497635,
-0.05250081419944763,
-0.09427227824926376,
0.03967071697115898,
-0.0882103368639946,
0.17324893176555634,
-0.07479912787675858,
0.018494145944714546,
0.08082783222198486,
-0.1519545167684555,
-0.26033464074134827,
-0.043606050312519073,
0.11342333257198334,
-0.1539057046175003,
0.0183173306286335,
-0.2574746012687683,
0.017040841281414032,
-0.046840839087963104,
-0.09063258022069931,
-0.09516064822673798,
0.07483158260583878,
-0.1426406353712082,
-0.2754638195037842,
-0.10668125748634338,
-0.08961392939090729,
0.12159787863492966,
0.1359783560037613,
-0.06800597161054611,
-0.16521309316158295,
-0.0860113576054573,
0.15337727963924408,
0.0677029937505722,
-0.1481993943452835,
-0.18641065061092377,
0.2589268386363983,
-0.005056906957179308,
0.09924903512001038,
-0.13368737697601318,
0.1740209460258484,
-0.0163711104542017,
0.049947112798690796,
0.014874359592795372,
0.06800394505262375,
-0.22054193913936615,
0.053857650607824326,
0.0026913355104625225,
-0.14980722963809967,
-0.005199638660997152,
-0.16507655382156372,
-0.006398533470928669,
-0.10724783688783646,
0.11607818305492401,
-0.0034550391137599945,
-0.14988118410110474,
-0.004154226277023554,
0.12800292670726776,
-0.05744205042719841,
0.02994637005031109,
0.06923601031303406,
0.22921417653560638,
-0.06133265420794487,
-0.0010772706009447575,
0.03501690924167633,
0.05734855309128761,
0.01636282168328762,
0.16542987525463104,
0.06926870346069336,
-0.10388253629207611,
0.1625199317932129,
-0.1321713924407959,
-0.03463587909936905,
0.12947192788124084,
0.10807722061872482,
-0.026719791814684868,
0.007160374894738197,
0.0633159652352333,
0.04454325512051582,
0.10577402263879776,
0.06873569637537003,
-0.22496695816516876,
0.057616688311100006,
0.14274966716766357,
0.048516664654016495,
-0.13252860307693481,
0.20547395944595337,
0.17993766069412231,
0.20753571391105652,
-0.23239557445049286,
-0.025759052485227585,
0.023520300164818764,
0.11387021094560623,
0.15297453105449677,
-0.20649302005767822,
0.057156238704919815,
0.08458596467971802,
0.09709309041500092,
-0.01830895058810711,
-0.01735004596412182,
0.010502954944968224,
0.06537990272045135,
-0.019758347421884537,
-0.04270176216959953,
-0.02276998572051525,
0.1409914493560791,
-0.08338338881731033,
-0.03980276733636856,
0.04589078947901726,
-0.22619475424289703,
0.11304286122322083,
0.01935925893485546,
-0.005169338081032038,
-0.1273411065340042,
0.039621058851480484,
0.1503957360982895,
-0.042166817933321,
-0.08237871527671814,
-0.07765120267868042,
-0.041959866881370544,
-0.037791550159454346,
-0.042254600673913956,
-0.12250310182571411,
0.22955837845802307,
0.10741235315799713,
-0.08082562685012817,
-0.10189805179834366,
-0.18869301676750183,
-0.04964780807495117,
0.22384768724441528,
-0.004038403742015362,
-0.11220914870500565,
-0.22172890603542328,
-0.11691492795944214,
0.2126951515674591,
-0.016678255051374435,
0.25587743520736694,
-0.08877015113830566,
-0.05493226647377014,
0.10014435648918152,
0.08504927903413773,
0.3219318091869354,
-0.14752882719039917,
0.01284602377563715,
0.01738828606903553,
-0.0402187816798687,
0.11617301404476166,
-0.048830386251211166,
-0.11629655212163925,
-0.14492078125476837,
-0.10363338142633438,
0.22796674072742462,
-0.1445370614528656,
0.03137834370136261,
0.16791658103466034,
-0.03865694999694824,
-0.09346667677164078,
0.030963905155658722,
-0.2607634365558624,
0.09147261083126068,
-0.10273527354001999,
-0.09010373800992966,
-0.058596156537532806,
0.16976706683635712,
0.1570924073457718,
-0.03205941617488861,
-0.007127736695110798,
-0.03231319785118103,
-0.17666928470134735,
-0.1387147605419159,
-0.04211235046386719,
0.08233180642127991,
-0.06885895133018494,
-0.035606883466243744,
-0.08988042175769806,
0.006337183527648449,
0.07306679338216782,
0.024432994425296783,
0.12141302227973938,
-0.03355541452765465,
0.11518614739179611,
-0.07048412412405014,
0.07868849486112595,
0.1734081357717514,
0.05520724877715111,
0.0924164354801178,
-0.15009357035160065,
-0.10656413435935974,
0.09311661124229431,
-0.08591307699680328,
-0.1203480213880539,
0.11683319509029388,
-0.08996777981519699,
-0.05112924054265022,
-0.07353892922401428,
-0.005917902570217848,
-0.2556815445423126,
-0.06755730509757996,
0.11643288284540176,
0.027819154784083366,
0.21593119204044342,
-0.11478383094072342,
0.20945097506046295,
0.02648822031915188,
-0.03305584192276001,
-0.024381639435887337,
-0.060549456626176834,
-0.045970287173986435,
0.03412702679634094,
0.14765223860740662,
0.06781596690416336,
-0.13560310006141663,
-0.021683596074581146,
-0.1240406334400177,
-0.11616760492324829,
-0.008243349380791187,
0.0439249724149704,
0.055954430252313614,
-0.0335577018558979,
0.22745369374752045,
-0.0928681492805481,
-0.0624089278280735,
0.09572160243988037,
0.1173643097281456,
-0.1271103024482727,
0.0718584880232811,
0.02187119424343109,
0.014257806353271008,
0.020719226449728012,
0.0814272090792656,
-0.09347301721572876,
-0.07374529540538788,
-0.0531344898045063,
-0.06772057712078094,
-0.10043302178382874,
-0.05229772627353668,
0.1603095531463623,
-0.13223107159137726,
0.058154258877038956,
-0.09346690028905869,
0.3278358280658722,
0.0418800488114357,
-0.18241263926029205,
0.1226862221956253,
0.20671531558036804,
-0.15912452340126038,
-0.07816120237112045,
-0.14389488101005554,
0.10005147755146027,
0.026043934747576714,
-0.11847344040870667,
0.07612491399049759,
-0.20205995440483093,
-0.14983366429805756,
-0.010992896743118763,
-0.11743814498186111,
0.06127738952636719,
0.039336927235126495,
0.059993669390678406,
-0.04389101266860962,
0.13831353187561035,
0.027526265010237694,
0.03163547068834305,
-0.16457819938659668,
-0.08669894188642502,
0.0652916207909584,
0.09769406169652939,
0.005476471036672592,
0.08517404645681381,
0.030594736337661743,
-0.07031194865703583,
-0.07150249183177948,
0.09583980590105057,
-0.19134926795959473,
0.049734927713871,
-0.06061719357967377,
-0.27994322776794434,
0.271090030670166,
0.15172278881072998,
0.07243864983320236,
0.0829983726143837,
0.005065180826932192,
-0.07552556693553925,
0.03206151723861694,
0.13517774641513824,
-0.14170551300048828,
-0.08711963891983032,
-0.03500931337475777,
0.007614124566316605,
-0.010894223116338253,
0.18027426302433014,
0.029851477593183517,
-0.16934850811958313,
0.23966403305530548,
-0.002871768781915307,
-0.13118131458759308,
-0.15109601616859436,
0.20668645203113556,
-0.015230507589876652,
-0.08479536324739456,
-0.025951901450753212,
-0.051225531846284866,
-0.020030822604894638,
0.15997076034545898,
-0.11287299543619156,
0.2302347868680954,
-0.1911454200744629,
0.00365864927880466,
0.21122413873672485,
-0.11141999810934067,
0.032087989151477814,
-0.01803424023091793,
-0.14222201704978943,
0.17517338693141937,
-0.051335953176021576,
-0.1318078339099884,
0.055848587304353714,
0.07402899861335754,
0.222820445895195,
-0.04440000653266907,
0.1306522935628891,
-0.0436054989695549,
0.04714827984571457,
0.17124709486961365,
0.07085330784320831,
-0.02613224647939205,
0.22070080041885376,
0.049855221062898636,
-0.11581021547317505,
-0.13036909699440002,
-0.02765168994665146,
-0.09825371950864792,
0.0017739551840350032,
0.0334211140871048,
-0.06173485517501831,
0.09727003425359726,
-0.10827881097793579,
0.1466633379459381,
-0.006582499947398901,
0.09424585849046707,
-0.1473429948091507,
-0.09303951263427734,
-0.04708210751414299,
0.07353011518716812,
0.009339005686342716,
-0.06346061825752258,
-0.041222598403692245,
-0.0811832845211029,
0.22603721916675568,
0.195444718003273,
0.3011770248413086,
0.11002526432275772,
-0.03111736662685871,
0.019722888246178627,
-0.10495494306087494,
0.1813822090625763,
0.05998711287975311,
-0.035325873643159866,
0.1215619370341301,
0.24981042742729187,
0.061312444508075714,
0.005405872128903866,
-0.06914368271827698,
0.2749488949775696,
0.009044334292411804,
-0.005034263711422682,
-0.12798747420310974,
0.06356032937765121,
-0.04427460581064224,
-0.04948049038648605,
0.17548765242099762,
0.10091791301965714,
-0.09548663347959518,
0.026332786306738853,
0.12467392534017563,
0.1658509075641632,
0.04549788683652878,
0.0014320611953735352,
-0.11753483861684799,
-0.13635984063148499,
-0.09959563612937927,
0.029863879084587097,
0.004270320758223534,
-0.1929926872253418,
0.04689234122633934,
-0.06086057052016258,
-0.2164662778377533,
0.17330044507980347,
0.06732996553182602,
0.08896744251251221,
-0.08540218323469162,
0.024966498836874962,
-0.10018517822027206,
0.15378634631633759,
-0.2004103809595108,
0.1667693853378296,
-0.05963387340307236,
-0.25130271911621094,
-0.15409915149211884,
-0.0880822017788887,
0.06209729611873627,
0.10743653029203415,
-0.21341536939144135,
-0.010954312980175018,
-0.007776558864861727,
0.03917188569903374,
-0.20352962613105774,
-0.11675511300563812,
0.1145542562007904,
-0.26174136996269226,
-0.06381354480981827,
-0.039404772222042084,
-0.2255994975566864,
0.10185376554727554,
-0.016459640115499496,
0.11386574804782867,
-0.16593489050865173,
-0.11549840867519379,
-0.012453718110918999,
0.073398157954216,
-0.024985622614622116,
-0.05575423315167427,
0.08712787926197052,
-0.0499420240521431,
0.08028380572795868,
0.225400909781456,
-0.13030515611171722,
0.23537558317184448,
0.16623637080192566,
-0.22305555641651154,
0.12097019702196121,
-0.020112715661525726,
0.0722266361117363,
0.09894713014364243,
-0.07222733646631241,
-0.03217770531773567,
-0.07520505040884018,
-0.04729568213224411,
-0.047143615782260895,
0.1409653127193451,
0.08899249136447906,
-0.07774809002876282,
-0.20429418981075287,
0.23460789024829865,
0.09554308652877808,
-0.051911354064941406,
0.08948943763971329,
-0.15735889971256256,
-0.15774957835674286,
-0.09854637831449509,
0.024391967803239822,
0.1829768270254135,
0.07658637315034866,
0.11305837333202362,
-0.0721362978219986,
-0.045450784265995026,
-0.032462164759635925,
-0.08417950570583344,
0.008275190368294716,
0.10871470719575882,
0.02943289279937744,
0.03358381241559982,
-0.11588297039270401,
0.13504323363304138,
-0.005766323301941156,
-0.13279107213020325,
0.035452939569950104,
-0.02569495141506195,
0.210860475897789,
-0.10918563604354858,
0.13850019872188568,
0.03518878296017647,
0.09863890707492828,
0.015364033170044422,
-0.07801748067140579,
-0.16549982130527496,
-0.15857763588428497,
-0.10517210513353348,
-0.1748068928718567,
0.09549198299646378,
0.0328700952231884,
-0.11449059098958969,
0.07286261767148972,
0.17057998478412628,
-0.07353813201189041,
-0.19848443567752838,
-0.12314493954181671,
0.12166039645671844,
0.16076457500457764,
0.06302572786808014,
0.19772760570049286,
0.020135322585701942,
-0.14225101470947266,
-0.010044671595096588,
0.09629648923873901,
-0.07204057276248932,
0.04592762142419815,
0.05108937248587608,
-0.1224176213145256,
0.0019932989962399006,
-0.1779322773218155,
-0.10993286967277527,
0.08900748193264008,
0.11746756732463837,
-0.07207020372152328,
0.09857014566659927,
-0.07702454179525375,
0.0638979896903038,
0.059061963111162186,
0.047829799354076385,
0.06747225672006607,
-0.09405173361301422,
0.0007411211263388395,
-0.09046146273612976,
-2.2797093690730009e-32,
0.013086328282952309,
0.07962772995233536,
-0.04014865681529045,
0.013595841825008392,
-0.07260705530643463,
0.01353580690920353,
-0.06386638432741165,
0.003942264709621668,
-0.08028355240821838,
0.03068840317428112,
-0.21813704073429108,
-0.026156440377235413,
-0.03619004040956497,
-0.11669405549764633,
-0.04719865322113037,
-0.06188180670142174,
0.041928455233573914,
-0.15487772226333618,
0.008405579254031181,
0.14613381028175354,
0.04061782732605934,
-0.0691586434841156,
0.09291817247867584,
0.0371219702064991,
-0.01790001057088375,
-0.05920316278934479,
-0.29236865043640137,
-0.2732945382595062,
0.042702075093984604,
0.030171453952789307,
0.0027443175204098225,
0.07198578864336014,
0.02687644399702549,
-0.08859105408191681,
-0.05092877894639969,
0.022429021075367928,
-0.08807886391878128,
-0.02874535694718361,
0.012558535672724247,
-0.1832890510559082,
-0.038896504789590836,
-0.048874758183956146,
0.23491287231445312,
0.03129999339580536,
-0.031183995306491852,
-0.003095148131251335,
-0.21672946214675903,
-0.09924245625734329,
-0.01049130130559206,
-0.22463244199752808,
0.14002123475074768,
-0.0765976756811142,
-0.04501385986804962,
0.060838811099529266,
0.07253129780292511,
0.06654862314462662,
-0.1614547222852707,
0.2764158248901367,
0.0876375138759613,
0.20855076611042023,
0.02383982017636299,
0.13559307157993317,
0.1714121550321579,
-0.2783541679382324,
0.019024506211280823,
0.03418716415762901,
0.12222742289304733,
0.12779824435710907,
-0.06306810677051544,
0.09182249754667282,
0.019426077604293823,
-0.04670010879635811,
0.025310881435871124,
0.17346183955669403,
0.021880391985177994,
-0.15356038510799408,
-0.21554917097091675,
0.043064605444669724,
0.21018825471401215,
-0.14855612814426422,
-0.03185299411416054,
0.005231456831097603,
-0.0729512944817543,
0.006529903970658779,
-0.12315892428159714,
0.11536940187215805,
0.050613146275281906,
-0.03340891748666763,
-0.15190044045448303,
-0.0024481823202222586,
-0.02718195877969265,
0.029548650607466698,
-0.14093449711799622,
-0.034179676324129105,
0.05399855226278305,
0.08431311696767807,
-0.13421131670475006,
0.045255400240421295,
-0.04845903068780899,
-0.05095986649394035,
0.03472650423645973,
0.09430819749832153,
0.10240527987480164,
-0.138871967792511,
0.1624857634305954,
-0.06540171056985855,
0.3004911243915558,
0.10614771395921707,
-0.06795834004878998,
0.033609539270401,
0.07057877629995346,
0.20167481899261475,
0.2003679871559143,
-0.019622335210442543,
0.09315314888954163,
0.06168932467699051,
-0.004139142110943794,
-0.15225011110305786,
0.08031284809112549,
0.10109535604715347,
0.031875330954790115,
-0.02172389067709446,
0.06295304000377655,
0.029404563829302788,
-0.0006818727124482393,
-0.04444223269820213,
-0.050160929560661316,
-0.15903319418430328,
-0.037179913371801376,
-0.0537211149930954,
-0.17959463596343994,
-0.0017795376479625702,
6.938388423805009e-7,
-0.044774897396564484,
0.08737845718860626,
0.09340443462133408,
-0.09321776032447815,
-0.07317229360342026,
0.12322834879159927,
-0.1160091832280159,
0.013607797212898731,
-0.11100858449935913,
0.06764490902423859,
0.0660834014415741,
-0.06944992393255234,
-0.04232551530003548,
-0.08882428705692291,
0.05877998098731041,
0.05855587497353554,
0.007293929345905781,
0.05613930523395538,
-0.10899336636066437,
0.054294440895318985,
0.07771479338407516,
0.19096839427947998,
-0.004214915446937084,
0.02004912681877613,
0.052862100303173065,
-0.009293937124311924,
-0.02279203198850155,
-0.024147992953658104,
-0.047650519758462906,
0.0014570916537195444,
0.10353748500347137,
-0.1842612475156784,
-0.0007757561979815364,
0.1073855459690094,
-0.1565292626619339,
0.00023062198306433856,
-0.21224835515022278,
0.11035990715026855,
0.016983941197395325,
0.06122219190001488,
0.14522162079811096,
0.022811047732830048,
-0.123719722032547,
-0.033956777304410934,
0.1007104143500328,
0.1906300187110901,
-0.0829894095659256,
-0.000060769445553887635,
0.17970627546310425,
0.01095032412558794,
0.02538713440299034,
-0.0562967024743557,
0.16629880666732788,
-0.002475578337907791,
0.01522086001932621,
0.22818750143051147,
0.07344574481248856,
-0.20934680104255676,
0.1109122559428215,
-0.1290259212255478,
-0.029835544526576996,
-0.10700933635234833,
0.028852121904492378,
0.16457995772361755,
0.12543635070323944,
0.035713184624910355,
0.06169183552265167,
1.2434533067454222e-34,
-0.09037370979785919,
0.1047472208738327,
0.05578664690256119,
-0.24463330209255219,
-0.08306355029344559,
-0.13676337897777557,
0.10848026722669601,
0.042470578104257584,
-0.028008533641695976,
-0.1864505112171173,
-0.15666942298412323
] |
https://github.com/huggingface/datasets/issues/6038 | File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 992, in _download_and_prepare if str(split_generator.split_info.name).lower() == "all": AttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'? | Instead of writing the loading script, you can use the built-in loader to [load JSON files](https://huggingface.co/docs/datasets/loading#json):
```python
from datasets import load_dataset
ds = load_dataset("json", data_files={"train": os.path.join(data_dir["train"]), "dev": os.path.join(data_dir["dev"])})
``` | Hi, I use the code below to load local file
```
def _split_generators(self, dl_manager):
# TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
# If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
# urls = _URLS[self.config.name]
data_dir = dl_manager.download_and_extract(_URLs)
print(data_dir)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"filepath": os.path.join(data_dir["train"]),
"split": "train",
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"filepath": os.path.join(data_dir["dev"]),
"split": "dev",
},
),
]
```
and error occured
```
Traceback (most recent call last):
File "/home/zhizhou/data1/zhanghao/huggingface/FineTuning_Transformer/load_local_dataset.py", line 2, in <module>
dataset = load_dataset("./QA_script.py",data_files='/home/zhizhou/.cache/huggingface/datasets/conversatiom_corps/part_file.json')
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/load.py", line 1809, in load_dataset
builder_instance.download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 1670, in _download_and_prepare
super()._download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 992, in _download_and_prepare
if str(split_generator.split_info.name).lower() == "all":
AttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'?
```
Could you help me? | 29 | File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 992, in _download_and_prepare if str(split_generator.split_info.name).lower() == "all": AttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'?
Hi, I use the code below to load local file
```
def _split_generators(self, dl_manager):
# TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
# If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
# urls = _URLS[self.config.name]
data_dir = dl_manager.download_and_extract(_URLs)
print(data_dir)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"filepath": os.path.join(data_dir["train"]),
"split": "train",
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"filepath": os.path.join(data_dir["dev"]),
"split": "dev",
},
),
]
```
and error occured
```
Traceback (most recent call last):
File "/home/zhizhou/data1/zhanghao/huggingface/FineTuning_Transformer/load_local_dataset.py", line 2, in <module>
dataset = load_dataset("./QA_script.py",data_files='/home/zhizhou/.cache/huggingface/datasets/conversatiom_corps/part_file.json')
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/load.py", line 1809, in load_dataset
builder_instance.download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 1670, in _download_and_prepare
super()._download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 992, in _download_and_prepare
if str(split_generator.split_info.name).lower() == "all":
AttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'?
```
Could you help me?
Instead of writing the loading script, you can use the built-in loader to [load JSON files](https://huggingface.co/docs/datasets/loading#json):
```python
from datasets import load_dataset
ds = load_dataset("json", data_files={"train": os.path.join(data_dir["train"]), "dev": os.path.join(data_dir["dev"])})
``` | [
0.20868515968322754,
0.0824986919760704,
-0.11488836258649826,
0.06900978088378906,
0.2309713363647461,
0.0632329136133194,
0.28081077337265015,
0.03722427785396576,
0.10236091166734695,
-0.07844353467226028,
-0.035875752568244934,
-0.1182340681552887,
-0.06774486601352692,
0.1440669149160385,
-0.010059980675578117,
-0.07644693553447723,
-0.04004547744989395,
0.07609788328409195,
0.18831200897693634,
0.053874269127845764,
-0.10175838321447372,
0.05832215026021004,
0.08370663225650787,
-0.07907281816005707,
-0.007868261076509953,
-0.08752267807722092,
-0.033159736543893814,
0.11110875010490417,
0.02250359207391739,
-0.11324836313724518,
0.22540728747844696,
-0.00983198918402195,
0.07038836181163788,
0.18141718208789825,
0.000005761847205576487,
0.044146209955215454,
0.11538814753293991,
0.054705433547496796,
-0.09064102917909622,
-0.20967844128608704,
0.010176633484661579,
0.13982844352722168,
-0.018980693072080612,
0.008030220866203308,
-0.08922290802001953,
-0.14580556750297546,
-0.06638435274362564,
0.13191038370132446,
-0.02551214024424553,
0.27361923456192017,
0.045661915093660355,
-0.10221311450004578,
-0.0090388935059309,
-0.02435268647968769,
-0.09236493706703186,
-0.012022262439131737,
0.01904490403831005,
0.04468601942062378,
-0.18628503382205963,
-0.08333508670330048,
0.013310151174664497,
-0.0185004323720932,
0.05195489898324013,
0.06945176422595978,
0.09094559401273727,
0.02130822464823723,
-0.07082664221525192,
-0.17162548005580902,
-0.03986053168773651,
0.1572214663028717,
0.013641110621392727,
0.2283545285463333,
-0.13734392821788788,
-0.03688167408108711,
-0.02763255499303341,
-0.08141843974590302,
0.015377219766378403,
0.012968163006007671,
-0.21280114352703094,
0.072148896753788,
-0.04461969435214996,
-0.1764453947544098,
0.05427391827106476,
0.05416852980852127,
-0.2725381851196289,
-0.02832033857703209,
-0.21109579503536224,
-0.030889390036463737,
-0.01602340303361416,
-0.07481503486633301,
0.06468154489994049,
0.07493014633655548,
-0.1597566455602646,
-0.2759438753128052,
0.1283556967973709,
-0.07713661342859268,
-0.0411653146147728,
-0.22445237636566162,
-0.1972692608833313,
0.08614061027765274,
-0.06979084759950638,
-0.35839003324508667,
0.008004632778465748,
0.14010223746299744,
0.084223672747612,
0.06512745469808578,
-0.07974410057067871,
0.139545276761055,
-0.02319638431072235,
0.16462692618370056,
0.03821907564997673,
-0.04421527311205864,
-0.18978461623191833,
-0.06890463083982468,
0.13618934154510498,
-0.005181694403290749,
0.18593096733093262,
-0.05237160250544548,
-0.0887419804930687,
0.08501962572336197,
0.005437778774648905,
0.0821949765086174,
0.1949915736913681,
0.16942532360553741,
0.007215249817818403,
-0.10350126773118973,
0.05049736797809601,
0.09350059181451797,
0.004083907697349787,
-0.08856957405805588,
0.028448045253753662,
0.09105883538722992,
0.004766430240124464,
0.05499995872378349,
0.044627659022808075,
-0.03762371465563774,
0.0204620398581028,
-0.27484917640686035,
-0.04761512950062752,
0.004981283098459244,
0.09186941385269165,
-0.07928571105003357,
-0.18356482684612274,
0.028446754440665245,
0.04557247459888458,
0.15347833931446075,
0.0965503379702568,
-0.024591319262981415,
-0.07998312264680862,
-0.040063969790935516,
-0.19755984842777252,
0.01839308999478817,
-0.15065701305866241,
0.056315287947654724,
0.08249136060476303,
0.0303688682615757,
-0.005361488554626703,
-0.2222362756729126,
-0.06200011819601059,
-0.04368765279650688,
0.01687614805996418,
-0.12239068001508713,
0.025352563709020615,
-0.19907307624816895,
-0.05444818362593651,
0.022691797465085983,
0.08066899329423904,
0.017692940309643745,
-0.15023817121982574,
-0.0806751474738121,
0.03597300499677658,
-0.002968510380014777,
-0.12063215672969818,
0.12072301656007767,
-0.16191589832305908,
0.18710413575172424,
0.10696817934513092,
0.06093386188149452,
-0.1338699460029602,
0.009250041097402573,
0.02838420309126377,
0.029523251578211784,
0.005366081837564707,
-0.024618275463581085,
0.17071743309497833,
-0.03807852789759636,
-0.06544771790504456,
0.052502475678920746,
0.04393864795565605,
-0.09139546751976013,
0.02730552852153778,
0.13009323179721832,
-0.06057051941752434,
-0.0534195713698864,
0.15066125988960266,
-0.16138847172260284,
-0.08536048233509064,
-0.10380376875400543,
0.023353517055511475,
-0.14836518466472626,
0.15186184644699097,
-0.08697091042995453,
0.031135734170675278,
-0.06027042493224144,
-0.021011238917708397,
0.11392334848642349,
-0.015611374750733376,
0.10505795478820801,
-0.177917942404747,
-0.20583952963352203,
-0.20183143019676208,
-0.06922973692417145,
-0.14348028600215912,
0.015365944243967533,
-0.12025661766529083,
-0.06195889040827751,
0.018018141388893127,
0.07016781717538834,
-0.010070348158478737,
-0.023826636373996735,
-0.05988659709692001,
0.10686706751585007,
0.14372873306274414,
0.006069702561944723,
0.06237412616610527,
-0.016968006268143654,
-0.14207319915294647,
-0.02251221053302288,
0.12857863306999207,
0.058962635695934296,
-0.3105732798576355,
0.024669919162988663,
-0.10710295289754868,
0.07275013625621796,
0.11032877117395401,
-0.021451057866215706,
-0.14217783510684967,
-0.0869392529129982,
-0.11140458285808563,
-0.017696427181363106,
-0.13994358479976654,
-0.041571397334337234,
0.03291067108511925,
0.029356347396969795,
0.009190445765852928,
0.07505534589290619,
-0.11026211082935333,
0.0860503762960434,
0.007039086427539587,
-0.11516539752483368,
0.1280420571565628,
-0.005974364001303911,
-0.09375975281000137,
0.09524152427911758,
0.16203247010707855,
-0.07362162321805954,
-0.02077745646238327,
0.09257753193378448,
-0.08645126223564148,
-0.21237699687480927,
0.23355546593666077,
-0.09725235402584076,
-0.07727126777172089,
0.06442389637231827,
0.1583864688873291,
-0.04233402758836746,
-0.043663740158081055,
0.1356802135705948,
0.07883908599615097,
0.0002184177574235946,
0.04604560509324074,
-0.025409823283553123,
-0.12644165754318237,
-0.08814027160406113,
0.07311977446079254,
0.05812044069170952,
0.10994713008403778,
-0.0032873484306037426,
-0.023206835612654686,
0.027950547635555267,
-0.03243257477879524,
-0.09681686758995056,
0.13136324286460876,
-0.13150900602340698,
0.05980517342686653,
0.17225691676139832,
0.11884085834026337,
-0.05999879911541939,
-0.20628637075424194,
-0.000342252547852695,
0.015491156838834286,
0.050304561853408813,
0.05057204142212868,
-0.17042402923107147,
-0.05311089754104614,
0.03813624754548073,
0.12209928780794144,
0.004631174728274345,
-0.06653100997209549,
-0.18639329075813293,
-0.010718931443989277,
-0.005139694549143314,
0.007930687628686428,
-0.0007682055002078414,
0.1371837854385376,
0.08010042458772659,
0.09713190793991089,
-0.0023556353989988565,
0.04570324346423149,
-0.04010193422436714,
0.28038185834884644,
-0.0645645335316658,
0.15899482369422913,
0.05808299034833908,
-0.06071530655026436,
-0.1306641548871994,
0.007557050324976444,
-0.15698418021202087,
0.09121421724557877,
0.0650496855378151,
0.002012913813814521,
0.010344268754124641,
0.05621444061398506,
0.015034238807857037,
-0.09060586243867874,
-0.010354317724704742,
-0.35010620951652527,
-0.16059930622577667,
-0.03931291028857231,
-0.022596612572669983,
0.04759732261300087,
0.05336688831448555,
-0.13647732138633728,
-0.07138073444366455,
-0.017877286300063133,
-0.011885657906532288,
-0.11211103200912476,
-0.004955762065947056,
0.2969171404838562,
0.017603395506739616,
-0.11362206190824509,
0.07964890450239182,
-0.010660843923687935,
-0.03189174458384514,
0.015520365908741951,
-0.05387275665998459,
-0.0023775624576956034,
0.006575519219040871,
0.09535595774650574,
-0.18404552340507507,
0.08267245441675186,
0.17086073756217957,
0.030781347304582596,
-0.007638192735612392,
0.04382023215293884,
0.14830228686332703,
-0.20488464832305908,
-0.05746787041425705,
-0.06236974149942398,
-0.04840685799717903,
0.24227595329284668,
-0.08513080328702927,
0.08938869833946228,
0.05725490674376488,
-0.13061761856079102,
0.056514590978622437,
0.06980408728122711,
0.04320770874619484,
-0.03932863473892212,
-0.1644686609506607,
-0.041710373014211655,
-0.054192110896110535,
0.022148728370666504,
-0.07423008233308792,
0.06454488635063171,
0.07807805389165878,
-0.14747726917266846,
-0.22484146058559418,
0.1583940088748932,
-0.005949758924543858,
-0.021800590679049492,
-0.06610917299985886,
0.024871233850717545,
0.1292932629585266,
0.000021168911189306527,
0.05439832806587219,
-0.04832414537668228,
0.14027228951454163,
0.19792863726615906,
0.12473853677511215,
0.0003225930850021541,
0.17741984128952026,
-0.10946567356586456,
-0.1805742383003235,
-0.03957238048315048,
-0.11107788234949112,
0.06517545133829117,
0.20367202162742615,
0.037758100777864456,
-0.043906666338443756,
0.043536242097616196,
0.15768849849700928,
0.1692640632390976,
0.05687407776713371,
0.08470089733600616,
0.004447670187801123,
0.044882193207740784,
-0.11846695095300674,
0.0054723117500543594,
0.06084505468606949,
0.19121630489826202,
0.09901200234889984,
0.11758309602737427,
-0.06700795143842697,
0.22217167913913727,
0.1634087711572647,
-0.044986601918935776,
-0.12592047452926636,
-0.09135992079973221,
-0.05651000887155533,
-0.18007956445217133,
-0.16123045980930328,
0.05817057192325592,
0.20424021780490875,
-0.13097645342350006,
-0.0029273848049342632,
0.058887384831905365,
-0.07180380821228027,
-0.01638386957347393,
-0.03987301141023636,
0.04802825301885605,
-0.08841864764690399,
0.0316629558801651,
0.038537148386240005,
0.018222613260149956,
-0.0228593647480011,
0.37225326895713806,
-0.19752614200115204,
-0.1430201232433319,
0.09600737690925598,
-0.1945372074842453,
0.041361477226018906,
0.007682622876018286,
-0.08507250994443893,
-0.05098810791969299,
-0.021503975614905357,
-0.07206704467535019,
0.05325862020254135,
0.06600168347358704,
0.18290114402770996,
-0.19003240764141083,
-0.20611634850502014,
-0.12323720008134842,
-0.061012886464595795,
-0.031150024384260178,
0.021859928965568542,
0.14960768818855286,
-0.07132094353437424,
0.01107519119977951,
0.1779993325471878,
0.017494985833764076,
-0.06812622398138046,
-0.14945897459983826,
0.03329386189579964,
0.10608980059623718,
0.0008308951510116458,
0.1272856444120407,
-0.1228351816534996,
0.08356408029794693,
0.08331669121980667,
-0.041295696049928665,
0.14116623997688293,
0.0486471951007843,
0.09173183143138885,
0.1788136214017868,
-0.06633900105953217,
-0.07522150874137878,
-0.14067573845386505,
-0.037921540439128876,
-0.012522061355412006,
0.26038891077041626,
0.0700232982635498,
0.16441474854946136,
-0.10361696779727936,
-0.06668726354837418,
0.1886739879846573,
0.1062702164053917,
0.0026024430990219116,
-0.09117059409618378,
-0.0608874149620533,
0.183371439576149,
-0.06188911944627762,
0.039656851440668106,
0.10117095708847046,
0.178879514336586,
0.0198287982493639,
-0.0879337266087532,
0.2525092363357544,
0.16048875451087952,
0.026439039036631584,
0.11563566327095032,
0.07136877626180649,
-0.05172252282500267,
-0.015484131872653961,
-0.05374923348426819,
-0.148238867521286,
0.16390666365623474,
0.09450934082269669,
-0.14748458564281464,
-0.1760515719652176,
-0.1021159291267395,
-0.09809313714504242,
-0.029840311035513878,
-0.06694669276475906,
0.0445503406226635,
0.14649103581905365,
-0.034740593284368515,
-0.025355786085128784,
-0.06879007071256638,
0.19705434143543243,
0.03831605613231659,
-0.0076677328906953335,
0.037908200174570084,
0.0041685872711241245,
-0.039501164108514786,
-0.0597616508603096,
-0.12169884890317917,
-0.057442136108875275,
0.026766205206513405,
0.12336082011461258,
0.060338497161865234,
0.2502855956554413,
0.22999750077724457,
-0.03419108688831329,
-0.16336941719055176,
0.15941870212554932,
-0.02709363028407097,
-0.25896286964416504,
0.09687431901693344,
0.1300707310438156,
0.022951124235987663,
-0.13563568890094757,
-0.06927182525396347,
0.15000608563423157,
0.10187303274869919,
0.14910531044006348,
-0.18891629576683044,
0.010270446538925171,
-0.2011512964963913,
-0.08144336193799973,
-0.1432424783706665,
0.13522297143936157,
0.17173588275909424,
0.0028962951619178057,
0.0898498147726059,
-2.385275080058978e-32,
0.020849723368883133,
-0.08278121054172516,
-0.011925388127565384,
0.033888161182403564,
-0.09524787217378616,
0.0994100570678711,
0.029276473447680473,
-0.020004162564873695,
-0.14508505165576935,
-0.14259493350982666,
-0.08934953808784485,
-0.022927267476916313,
0.0008501792908646166,
0.04177788272500038,
0.01487160474061966,
-0.06535203009843826,
-0.03545302897691727,
-0.045238763093948364,
0.03662294149398804,
-0.143393874168396,
0.1411990374326706,
0.19340510666370392,
0.18759700655937195,
-0.06576278805732727,
-0.14823970198631287,
-0.11583676934242249,
-0.05579458922147751,
-0.06491932272911072,
0.08224926143884659,
-0.15151260793209076,
-0.013708973303437233,
-0.06344285607337952,
0.07888028025627136,
-0.0894898995757103,
-0.14035585522651672,
0.08703745901584625,
-0.12103951722383499,
-0.059185806661844254,
-0.09079623222351074,
0.06114552915096283,
0.07215651124715805,
0.0878491997718811,
-0.031899772584438324,
-0.10215453803539276,
0.0988602489233017,
0.10978122055530548,
0.02410414069890976,
-0.07063139230012894,
0.08366593718528748,
-0.06528744846582413,
0.1409241110086441,
0.12069980055093765,
-0.05681464821100235,
0.09000740945339203,
0.1264827847480774,
-0.0697023794054985,
0.15404033660888672,
0.1198430135846138,
-0.014399564824998379,
-0.001635728869587183,
0.23014362156391144,
-0.015524427406489849,
0.09632442146539688,
-0.03951437771320343,
0.15019634366035461,
0.049539919942617416,
0.1972438246011734,
0.039018016308546066,
0.05117424577474594,
-0.12447158992290497,
-0.00742267956957221,
0.06829779595136642,
-0.2829671800136566,
0.025854745879769325,
-0.020597226917743683,
-0.1500067114830017,
-0.16310235857963562,
0.03587186709046364,
0.13018034398555756,
-0.16154353320598602,
-0.0022624817211180925,
0.05157490447163582,
0.032659776508808136,
0.10789813101291656,
-0.06648202240467072,
0.033890701830387115,
-0.08763356506824493,
-0.02034185267984867,
-0.09762077033519745,
-0.006592255085706711,
-0.06390544027090073,
0.012609058991074562,
0.019637033343315125,
-0.03256373852491379,
0.010575040243566036,
0.035728950053453445,
0.010633199475705624,
0.04398570582270622,
-0.2856985628604889,
-0.07133863121271133,
-0.07184692472219467,
-0.03532109409570694,
0.08722902834415436,
-0.035976700484752655,
0.05616301670670509,
0.05242062732577324,
0.08582234382629395,
0.014895938336849213,
-0.14386779069900513,
-0.13560429215431213,
0.09100262820720673,
-0.04547318071126938,
0.1253613978624344,
0.21907666325569153,
0.048002660274505615,
0.1648470014333725,
-0.1376466006040573,
-0.06931554526090622,
0.20825056731700897,
0.07778928428888321,
-0.10365677624940872,
0.14504608511924744,
-0.16991883516311646,
-0.023478753864765167,
-0.012857045978307724,
-0.02411372773349285,
-0.17440849542617798,
-0.14482977986335754,
0.0350135900080204,
0.18890681862831116,
0.05790992081165314,
0.0051250820979475975,
7.093377689670888e-7,
-0.2732950747013092,
0.16806021332740784,
-0.022252459079027176,
-0.10761364549398422,
-0.22389592230319977,
0.025034207850694656,
-0.1321810781955719,
0.057570215314626694,
-0.02063869871199131,
0.01513085886836052,
0.19221259653568268,
-0.05451938882470131,
-0.14428560435771942,
-0.005236404947936535,
-0.020192181691527367,
0.11461824923753738,
-0.045411527156829834,
0.007745792157948017,
0.09663186222314835,
-0.028901079669594765,
0.08454873412847519,
0.07319338619709015,
0.15901021659374237,
-0.13228146731853485,
-0.018106454983353615,
-0.011155826039612293,
-0.2695562541484833,
-0.06932083517313004,
-0.010199940763413906,
0.05855090543627739,
-0.009085721336305141,
-0.019475681707262993,
-0.05703384429216385,
-0.027182631194591522,
0.0882718488574028,
-0.11555230617523193,
-0.03233921155333519,
0.031146734952926636,
0.1520206779241562,
0.22629213333129883,
0.15657663345336914,
-0.01273462362587452,
-0.025076569989323616,
-0.01667732000350952,
-0.013116776943206787,
0.2089688628911972,
-0.03262796625494957,
-0.05258088558912277,
-0.20951992273330688,
0.07679691910743713,
0.022347070276737213,
0.12999200820922852,
0.21025478839874268,
0.17561492323875427,
-0.16972798109054565,
-0.14237511157989502,
0.02355073019862175,
0.0047776959836483,
0.05802035331726074,
-0.034679096192121506,
-0.19195228815078735,
-0.02455464005470276,
0.059403881430625916,
-0.05935410410165787,
0.2440768927335739,
-0.04785658046603203,
-0.027600446715950966,
4.2851050917480746e-35,
-0.05242538824677467,
0.06877508014440536,
-0.04328153654932976,
0.001281512202695012,
-0.04142327606678009,
0.0009659998468123376,
0.06684382259845734,
-0.167121022939682,
0.004094678908586502,
-0.15154694020748138,
0.02717261016368866
] |
https://github.com/huggingface/datasets/issues/6037 | Documentation links to examples are broken | These docs are outdated (version 1.2.1 is over two years old). Please refer to [this](https://huggingface.co/docs/datasets/dataset_script) version instead.
Initially, we hosted datasets in this repo, but now you can find them [on the HF Hub](https://huggingface.co/datasets) (e.g. the [`ag_news`](https://huggingface.co/datasets/ag_news/blob/main/ag_news.py) script) | ### Describe the bug
The links at the bottom of [add_dataset](https://huggingface.co/docs/datasets/v1.2.1/add_dataset.html) to examples of specific datasets are all broken, for example
- text classification: [ag_news](https://github.com/huggingface/datasets/blob/master/datasets/ag_news/ag_news.py) (original data are in csv files)
### Steps to reproduce the bug
Click on links to examples from latest documentation
### Expected behavior
Links should be up to date - it might be more stable to link to https://huggingface.co/datasets/ag_news/blob/main/ag_news.py
### Environment info
dataset v1.2.1 | 38 | Documentation links to examples are broken
### Describe the bug
The links at the bottom of [add_dataset](https://huggingface.co/docs/datasets/v1.2.1/add_dataset.html) to examples of specific datasets are all broken, for example
- text classification: [ag_news](https://github.com/huggingface/datasets/blob/master/datasets/ag_news/ag_news.py) (original data are in csv files)
### Steps to reproduce the bug
Click on links to examples from latest documentation
### Expected behavior
Links should be up to date - it might be more stable to link to https://huggingface.co/datasets/ag_news/blob/main/ag_news.py
### Environment info
dataset v1.2.1
These docs are outdated (version 1.2.1 is over two years old). Please refer to [this](https://huggingface.co/docs/datasets/dataset_script) version instead.
Initially, we hosted datasets in this repo, but now you can find them [on the HF Hub](https://huggingface.co/datasets) (e.g. the [`ag_news`](https://huggingface.co/datasets/ag_news/blob/main/ag_news.py) script) | [
0.10770010948181152,
-0.055704545229673386,
-0.0051224264316260815,
0.08071216940879822,
0.1773478090763092,
0.09440560638904572,
0.06882821023464203,
-0.011243456974625587,
0.05130681023001671,
0.013463444076478481,
-0.04231639578938484,
0.026111172512173653,
0.01597541756927967,
0.045996397733688354,
0.219874307513237,
-0.09233447164297104,
-0.08983892947435379,
-0.006460251286625862,
-0.13899317383766174,
0.04388804733753204,
0.011176788248121738,
0.15707209706306458,
0.03451092168688774,
-0.014440341852605343,
-0.013122458942234516,
0.05473838001489639,
-0.1268715113401413,
-0.10109074413776398,
-0.008105730637907982,
-0.2827221751213074,
0.011673594824969769,
0.09874434024095535,
-0.02456885576248169,
-0.004890928976237774,
0.000005720106400985969,
-0.08554630726575851,
0.011424505151808262,
0.14169886708259583,
-0.08744236826896667,
0.04227236658334732,
0.01701374165713787,
-0.06021661311388016,
0.014160821214318275,
-0.05419901758432388,
-0.04084634780883789,
-0.08483907580375671,
-0.15014861524105072,
0.10226438194513321,
0.0106204180046916,
0.09362892806529999,
0.0994250476360321,
0.11367805302143097,
0.13034005463123322,
-0.1717396080493927,
0.1510852724313736,
0.15026435256004333,
-0.0068365661427378654,
0.01858656108379364,
-0.03751906752586365,
0.006923033855855465,
-0.021850472316145897,
0.14852237701416016,
0.20709528028964996,
0.0446312390267849,
-0.06216729059815407,
-0.05348329618573189,
-0.18936535716056824,
-0.18111193180084229,
0.020791202783584595,
0.2688184678554535,
0.19192183017730713,
0.07192343473434448,
-0.18902581930160522,
0.023022804409265518,
0.004535143729299307,
0.0515439547598362,
-0.06654226034879684,
0.030134527012705803,
0.06285879015922546,
0.0012702211970463395,
-0.1355658918619156,
-0.10073336958885193,
0.07321435958147049,
0.008555557578802109,
0.19063422083854675,
0.0430452786386013,
-0.27086198329925537,
-0.00923790130764246,
0.07552968710660934,
-0.1458938866853714,
0.1011967733502388,
0.08557818830013275,
-0.058898597955703735,
-0.015393202193081379,
0.3310435116291046,
0.09795617312192917,
-0.08483295142650604,
0.024440215900540352,
0.16566194593906403,
-0.03702666610479355,
0.006690558977425098,
-0.03477037698030472,
-0.11610051989555359,
-0.13651280105113983,
-0.07521204650402069,
-0.047638144344091415,
0.07175879925489426,
-0.12804464995861053,
0.26921772956848145,
0.24671229720115662,
0.1524062305688858,
-0.06935901194810867,
-0.11243850737810135,
-0.14738908410072327,
-0.09088070690631866,
0.01037081889808178,
0.013039418496191502,
0.06600949168205261,
0.06373639404773712,
0.27446308732032776,
0.11176133155822754,
0.04720176383852959,
-0.2607044577598572,
0.11206220090389252,
-0.02039085328578949,
-0.12035233527421951,
0.03563864529132843,
0.07304329425096512,
0.057601019740104675,
-0.11895090341567993,
-0.038577884435653687,
0.024322286248207092,
-0.09074656665325165,
0.022525615990161896,
0.05079040676355362,
0.0001762830070219934,
0.00290941190905869,
-0.14757613837718964,
0.11574159562587738,
-0.13714513182640076,
-0.013840197585523129,
-0.007911044172942638,
-0.2434350848197937,
-0.04062169790267944,
0.04364284873008728,
0.026835298165678978,
0.10878085345029831,
0.013540435582399368,
0.01909075863659382,
0.006806869525462389,
-0.3163665235042572,
0.16866181790828705,
-0.13018566370010376,
-0.12028155475854874,
0.06108023226261139,
0.0694815069437027,
-0.04224509000778198,
0.06197386607527733,
-0.24808822572231293,
-0.04504906386137009,
-0.001225435989908874,
0.060751184821128845,
0.12480119615793228,
-0.03153819963335991,
0.23505401611328125,
0.1478792279958725,
0.13990220427513123,
-0.020256895571947098,
-0.05997391790151596,
0.018320083618164062,
-0.06902799010276794,
0.06552662700414658,
-0.1414365917444229,
-0.10042105615139008,
-0.17574775218963623,
0.09276935458183289,
-0.007215307559818029,
-0.06496957689523697,
0.07716754823923111,
-0.10992082208395004,
0.0931936651468277,
-0.007336491718888283,
-0.2088148444890976,
-0.15456180274486542,
-0.09273286908864975,
0.07417804002761841,
-0.2404293566942215,
-0.01820984110236168,
0.011249775998294353,
-0.06336186081171036,
-0.1531444638967514,
0.012836018577218056,
-0.003333846339955926,
-0.0621505044400692,
0.051814477890729904,
-0.04237059876322746,
-0.004265730269253254,
-0.0888824388384819,
0.07981188595294952,
0.023868504911661148,
-0.007497101556509733,
0.14070509374141693,
0.025666000321507454,
0.12545037269592285,
0.09995150566101074,
0.020379381254315376,
-0.15115246176719666,
0.03401130437850952,
0.1079179123044014,
-0.04402313381433487,
-0.16909490525722504,
-0.032879602164030075,
-0.08804807811975479,
0.014353690668940544,
-0.08472853899002075,
-0.1070452407002449,
-0.08362102508544922,
-0.11797698587179184,
0.024048607796430588,
0.24619035422801971,
0.006352192256599665,
0.08955130726099014,
-0.04637867212295532,
0.08603018522262573,
-0.04562487080693245,
0.1072414368391037,
-0.0642959251999855,
-0.061095740646123886,
0.1565351039171219,
0.10486213862895966,
-0.08464014530181885,
-0.07517212629318237,
0.22699113190174103,
0.16886982321739197,
-0.06558647751808167,
0.31425073742866516,
0.07928241044282913,
-0.24322444200515747,
0.1905844360589981,
-0.07830461859703064,
-0.05748988687992096,
0.010239946655929089,
-0.10249354690313339,
0.10734705626964569,
-0.005118168890476227,
-0.11053721606731415,
-0.19273394346237183,
-0.06826398521661758,
0.052103765308856964,
0.12615258991718292,
0.22415262460708618,
0.11151907593011856,
-0.2486129105091095,
-0.07006523013114929,
-0.05215836316347122,
-0.11229300498962402,
0.08310045301914215,
-0.03833746910095215,
-0.1968122273683548,
0.002132037654519081,
0.13653020560741425,
-0.13918234407901764,
0.0036393923219293356,
0.037624530494213104,
-0.009535571560263634,
0.04594564437866211,
0.034472569823265076,
0.05291111767292023,
-0.02897423505783081,
0.06386399269104004,
0.050560276955366135,
-0.04760994017124176,
-0.1422244757413864,
-0.09627576172351837,
0.02408231608569622,
-0.009131915867328644,
0.016759218648076057,
0.12331576645374298,
-0.0320020467042923,
-0.016789782792329788,
-0.12050759047269821,
0.08613210916519165,
-0.10922183096408844,
-0.0445052795112133,
0.012109413743019104,
0.02354470081627369,
-0.29578840732574463,
-0.07784609496593475,
-0.17424233257770538,
0.00538196787238121,
-0.021587306633591652,
-0.010067570954561234,
-0.09012793749570847,
-0.06560803204774857,
-0.15908962488174438,
-0.018297545611858368,
-0.009142606519162655,
-0.0012365283910185099,
-0.04658278450369835,
0.37538227438926697,
-0.011885219253599644,
0.1456538885831833,
-0.08500483632087708,
0.030267102643847466,
-0.09600508958101273,
0.063411645591259,
-0.09054526686668396,
0.06531080603599548,
-0.06574468314647675,
-0.30027490854263306,
-0.08013034611940384,
-0.0015842783031985164,
0.14010582864284515,
0.12465684860944748,
-0.013606815598905087,
-0.07123913615942001,
-0.03298328071832657,
-0.10654082894325256,
0.0992874726653099,
-0.012765638530254364,
0.20816151797771454,
0.0061846403405070305,
-0.17822107672691345,
-0.003222203813493252,
-0.0013792221434414387,
-0.12910479307174683,
-0.14931096136569977,
0.021000204607844353,
0.009792167693376541,
-0.06848224997520447,
-0.023183254525065422,
0.15181387960910797,
0.08507677167654037,
-0.07733461260795593,
-0.04493933916091919,
-0.057039156556129456,
0.0656047835946083,
-0.12778563797473907,
0.16040030121803284,
0.040743350982666016,
-0.015635892748832703,
0.022672848775982857,
0.043603383004665375,
0.026467017829418182,
0.037444308400154114,
-0.12516209483146667,
-0.00592485535889864,
-0.01942850835621357,
0.018449414521455765,
0.014146167784929276,
0.16964004933834076,
0.009592622518539429,
0.04769175499677658,
-0.22771359980106354,
0.025525694712996483,
-0.13827058672904968,
-0.050677016377449036,
-0.04074399918317795,
-0.04432789981365204,
0.004293890669941902,
-0.028985532000660896,
0.12207823246717453,
0.06048279255628586,
-0.03462749719619751,
-0.09699752926826477,
-0.00867235753685236,
0.025934305042028427,
0.14565010368824005,
0.06270868331193924,
-0.04024432972073555,
-0.09532303363084793,
0.024423200637102127,
0.1265278458595276,
0.12069542706012726,
0.19552232325077057,
0.15210160613059998,
-0.014562206342816353,
-0.0026957353111356497,
0.11326824873685837,
-0.17547845840454102,
-0.0894140899181366,
-0.2413964867591858,
0.020589599385857582,
0.002352516632527113,
0.06027131527662277,
0.0292056817561388,
0.1660790890455246,
0.09614552557468414,
-0.07976575940847397,
0.13813942670822144,
0.016462374478578568,
-0.1423342078924179,
-0.13956964015960693,
-0.18496455252170563,
-0.05760663375258446,
-0.05221259221434593,
0.13511712849140167,
0.027975305914878845,
0.07342515140771866,
0.06407355517148972,
0.12901107966899872,
0.01854586787521839,
-0.09135653078556061,
0.009901564568281174,
0.015172048471868038,
0.024748263880610466,
-0.005002990365028381,
0.03976482152938843,
0.012551377527415752,
0.014931857585906982,
0.18547506630420685,
0.00914513599127531,
-0.010682623833417892,
-0.03296554088592529,
0.22397497296333313,
-0.10186325758695602,
0.16596990823745728,
0.105229452252388,
-0.05283233895897865,
-0.02116760052740574,
-0.12924343347549438,
-0.1801842600107193,
0.08782391995191574,
-0.044513702392578125,
-0.025769781321287155,
-0.06905034929513931,
0.0900912806391716,
-0.07348465919494629,
0.1036868765950203,
-0.12035862356424332,
-0.019689887762069702,
0.12489764392375946,
0.01460643857717514,
0.17153312265872955,
0.20048211514949799,
-0.023005792871117592,
0.15736983716487885,
-0.2257423847913742,
-0.22299668192863464,
-0.08574362844228745,
-0.2608482837677002,
0.017709149047732353,
0.34064871072769165,
-0.15580499172210693,
-0.0022090182173997164,
0.053963545709848404,
0.00039498330443166196,
-0.09432363510131836,
0.07537303119897842,
-0.051424331963062286,
-0.06399840116500854,
-0.07552418857812881,
-0.04068709537386894,
-0.10781759768724442,
0.08424601703882217,
-0.010192892514169216,
0.23419541120529175,
0.07448060065507889,
0.00013097301416564733,
-0.09194979816675186,
-0.0932910367846489,
-0.049295663833618164,
-0.06921771168708801,
-0.01603231579065323,
-0.023133354261517525,
-0.06920003890991211,
0.35489577054977417,
-0.15219801664352417,
0.10728289932012558,
0.035486940294504166,
-0.031977199018001556,
0.09728064388036728,
-0.050942130386829376,
0.038874488323926926,
0.06430864334106445,
0.09814681857824326,
-0.034635283052921295,
-0.09976070374250412,
0.09996142238378525,
-0.16876651346683502,
0.14252424240112305,
0.07339014112949371,
-0.03320997580885887,
-0.08878524601459503,
-0.010945306159555912,
0.0979510247707367,
0.1632034331560135,
-0.09274615347385406,
-0.06835611909627914,
0.021614473313093185,
0.13702455163002014,
-0.007096100598573685,
0.10097496956586838,
0.08643657714128494,
0.1554139107465744,
0.07340404391288757,
-0.06801816076040268,
0.05082416161894798,
0.1738446056842804,
0.049301017075777054,
0.09470092505216599,
-0.06192193180322647,
0.06687326729297638,
-0.18405121564865112,
-0.12644313275814056,
-0.20146307349205017,
0.16527071595191956,
-0.11483126878738403,
0.12163285166025162,
-0.17816407978534698,
0.10008997470140457,
0.08003352582454681,
-0.05483056604862213,
-0.07623415440320969,
-0.04715070500969887,
-0.13226322829723358,
-0.060842860490083694,
0.1131201833486557,
0.10116187483072281,
0.017768215388059616,
-0.11530743539333344,
-0.08431810885667801,
-0.014434928074479103,
0.1022811010479927,
-0.09110192209482193,
0.1575906127691269,
-0.02731735073029995,
-0.0011101672425866127,
0.24105305969715118,
-0.12144888192415237,
0.015966400504112244,
0.23597948253154755,
0.19193671643733978,
-0.13128453493118286,
-0.02405325323343277,
0.04078035056591034,
0.12935344874858856,
-0.06018076464533806,
0.019133541733026505,
-0.07440630346536636,
0.003677275963127613,
-0.21359188854694366,
-0.01406051404774189,
0.09883628785610199,
0.11446896195411682,
0.12052357941865921,
0.006232534535229206,
0.02173430100083351,
-0.025078965350985527,
-0.13792164623737335,
0.07835550606250763,
0.06343856453895569,
-0.03955993801355362,
-0.010763382539153099,
-0.06594891846179962,
-2.420397675767197e-32,
-0.024039102718234062,
0.14671050012111664,
-0.09171540290117264,
-0.027224190533161163,
-0.17263975739479065,
0.11425801366567612,
-0.007938765920698643,
-0.0729958638548851,
-0.19993939995765686,
-0.00017809003475122154,
0.13323862850666046,
0.04592932388186455,
0.007364099379628897,
0.0061413198709487915,
-0.08023806661367416,
-0.02480318583548069,
-0.13574831187725067,
-0.13295355439186096,
-0.06614496558904648,
0.146328866481781,
0.08395250141620636,
-0.08410552889108658,
0.023923467844724655,
-0.19619494676589966,
0.031797684729099274,
0.17590469121932983,
-0.23058238625526428,
0.060552265495061874,
0.10818076878786087,
0.13814981281757355,
-0.12315535545349121,
0.04951243847608566,
-0.0684472918510437,
-0.04499826580286026,
-0.042067863047122955,
0.03438947722315788,
-0.1360766589641571,
-0.09628192335367203,
-0.15134872496128082,
0.05560581386089325,
-0.04188494756817818,
0.18973340094089508,
-0.04403045400977135,
-0.08637571334838867,
0.04273218289017677,
0.06786490976810455,
-0.0709763914346695,
0.11580117791891098,
-0.021844513714313507,
-0.07616884261369705,
-0.09000419825315475,
0.20735988020896912,
-0.08214621990919113,
0.16016072034835815,
0.0850246399641037,
-0.07962580025196075,
0.027577973902225494,
0.1344454139471054,
0.022742221131920815,
-0.12334044277667999,
0.07291078567504883,
-0.05323092266917229,
0.082342229783535,
-0.10665642470121384,
0.04819783940911293,
0.032568223774433136,
0.12144578248262405,
0.06761147826910019,
-0.04404469579458237,
-0.026538241654634476,
0.15280011296272278,
0.017999548465013504,
0.0329708494246006,
-0.0007098564528860152,
-0.1924690455198288,
0.06704748421907425,
-0.09427374601364136,
-0.0690678209066391,
0.12980209290981293,
0.038321759551763535,
0.08453133702278137,
0.06766075640916824,
0.03314107283949852,
-0.07605133205652237,
-0.14085189998149872,
0.09389324486255646,
-0.03333244100213051,
-0.04413183778524399,
-0.12520568072795868,
-0.04319190979003906,
-0.01893719471991062,
0.1909603625535965,
-0.24137002229690552,
0.06879726052284241,
-0.11805915832519531,
0.24648968875408173,
-0.08637308329343796,
0.17253126204013824,
0.10825613141059875,
-0.034571316093206406,
-0.18046270310878754,
0.018244504928588867,
0.09952279180288315,
0.19439242780208588,
0.055919282138347626,
-0.09103125333786011,
0.24865233898162842,
0.10712701827287674,
-0.21096308529376984,
-0.010261869989335537,
0.058280885219573975,
0.09912407398223877,
0.12226904183626175,
-0.07916641980409622,
0.01370513066649437,
-0.09091196209192276,
-0.060301102697849274,
0.02209283784031868,
0.0015393203357234597,
0.07830111682415009,
-0.1789989173412323,
0.03813662752509117,
-0.29356658458709717,
-0.035494670271873474,
0.08226059377193451,
0.12217961996793747,
-0.040188226848840714,
-0.05294898524880409,
0.09086690843105316,
-0.07349042594432831,
0.08957932144403458,
-0.10494832694530487,
7.287288212864951e-7,
0.021549042314291,
0.15593840181827545,
0.06370122730731964,
-0.060950350016355515,
0.0482032485306263,
-0.07322893291711807,
-0.04480591043829918,
-0.02904428169131279,
-0.08587151020765305,
0.1280764639377594,
-0.05106135457754135,
-0.02480248175561428,
-0.0415315143764019,
-0.03529004752635956,
0.001442217850126326,
-0.1308957040309906,
-0.2106121927499771,
-0.12643440067768097,
-0.101258285343647,
-0.03337516263127327,
-0.08396963030099869,
0.1492411494255066,
0.028773827478289604,
0.14219790697097778,
0.002948484383523464,
-0.11968694627285004,
-0.07187233865261078,
-0.06764388084411621,
0.2064194679260254,
-0.04099080339074135,
-0.058665357530117035,
-0.015848860144615173,
0.017653388902544975,
-0.006972902920097113,
-0.04456638917326927,
-0.09326979517936707,
-0.2780986428260803,
-0.119879812002182,
0.004434532951563597,
0.15215256810188293,
0.02491574175655842,
-0.06728826463222504,
0.06667318940162659,
-0.23536328971385956,
0.0899210199713707,
0.006623443216085434,
-0.09284994006156921,
0.1735975593328476,
-0.10254928469657898,
0.03147291764616966,
0.08037349581718445,
0.03661050647497177,
0.07592213153839111,
0.1470555067062378,
-0.14441126585006714,
-0.10195528715848923,
0.04358888790011406,
-0.08809816092252731,
0.1928802728652954,
-0.03158612549304962,
0.1446579247713089,
-0.18076243996620178,
0.11933965981006622,
0.19313950836658478,
-0.013212377205491066,
-0.06899771094322205,
-0.1267610341310501,
1.721237692206319e-34,
0.06948061287403107,
-0.007255158387124538,
0.033146850764751434,
-0.11921308934688568,
0.10393446683883667,
-0.026718467473983765,
0.25320151448249817,
0.07230556011199951,
-0.03366200253367424,
-0.13799281418323517,
-0.00853811390697956
] |
https://github.com/huggingface/datasets/issues/6034 | load_dataset hangs on WSL | Even if a dataset is cached, we still make requests to check whether the cache is up-to-date. [This](https://huggingface.co/docs/datasets/v2.13.1/en/loading#offline) section in the docs explains how to avoid them and directly load the cached version. | ### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information. | 33 | load_dataset hangs on WSL
### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information.
Even if a dataset is cached, we still make requests to check whether the cache is up-to-date. [This](https://huggingface.co/docs/datasets/v2.13.1/en/loading#offline) section in the docs explains how to avoid them and directly load the cached version. | [
-0.10918344557285309,
0.1387549340724945,
0.006365554872900248,
-0.030440397560596466,
0.11271821707487106,
0.04075578972697258,
-0.003956666681915522,
-0.03406578302383423,
0.18446770310401917,
0.22332149744033813,
0.06053413450717926,
-0.0626814141869545,
0.0962948277592659,
-0.12768839299678802,
-0.07419124245643616,
0.09436982870101929,
-0.10032554715871811,
0.051894113421440125,
0.03916050121188164,
-0.09931424260139465,
-0.12120835483074188,
-0.010515565052628517,
0.061232514679431915,
-0.1199674904346466,
0.07429096102714539,
-0.021822238340973854,
-0.01647244207561016,
0.03267531841993332,
-0.096100814640522,
-0.06804555654525757,
0.06509989500045776,
0.02855261042714119,
-0.06454300135374069,
0.2164987027645111,
0.000005732276804337744,
-0.09671501815319061,
0.12858690321445465,
0.16093745827674866,
-0.09575623273849487,
-0.11732549220323563,
0.08521302044391632,
-0.12314914166927338,
-0.03414540737867355,
-0.023196794092655182,
-0.0696631595492363,
-0.07280604541301727,
-0.017820317298173904,
-0.16884133219718933,
0.07983359694480896,
-0.07466486096382141,
-0.053557898849248886,
0.06562267988920212,
-0.13168825209140778,
-0.17958080768585205,
0.09426645189523697,
-0.010973425582051277,
-0.01004970632493496,
0.045628197491168976,
-0.04078831896185875,
-0.15422463417053223,
-0.08511125296354294,
-0.047111812978982925,
0.020150136202573776,
0.006916848011314869,
-0.12480467557907104,
0.08950580656528473,
-0.16117271780967712,
-0.06763732433319092,
0.14634135365486145,
0.2051609605550766,
-0.025705402716994286,
0.12203405797481537,
-0.03313140198588371,
0.011632048524916172,
-0.07807426154613495,
-0.010013739578425884,
0.09257131069898605,
0.05151993781328201,
-0.1608944684267044,
0.09203558415174484,
0.027226638048887253,
0.015839533880352974,
-0.036337677389383316,
0.03898565471172333,
-0.24794568121433258,
0.04946496710181236,
-0.04837924987077713,
0.07693693786859512,
0.10886254161596298,
0.020346269011497498,
0.10797329246997833,
0.09170529246330261,
-0.11645302921533585,
-0.11746981739997864,
-0.05516890808939934,
0.15672671794891357,
0.04150272160768509,
0.06079091876745224,
-0.02550036832690239,
-0.0960172563791275,
-0.06392759829759598,
-0.017471522092819214,
0.06394024938344955,
0.07352709770202637,
0.025691621005535126,
-0.07318639010190964,
0.04714765399694443,
-0.2387240082025528,
-0.00026319408789277077,
0.1287500411272049,
-0.1030435860157013,
0.22454944252967834,
-0.2659853398799896,
-0.04417642578482628,
0.10294801741838455,
-0.05040762573480606,
0.1884044110774994,
0.04627034813165665,
0.09401720762252808,
0.11563880741596222,
0.03170645609498024,
0.17869232594966888,
0.08270430564880371,
0.3084324598312378,
-0.033983319997787476,
0.10886162519454956,
-0.06523795425891876,
-0.06150616705417633,
-0.152115598320961,
-0.005124036222696304,
-0.07633569836616516,
-0.129097580909729,
-0.05071643739938736,
-0.1198301687836647,
0.11537549644708633,
-0.0012276597553864121,
-0.13956259191036224,
-0.055080488324165344,
0.020082835108041763,
-0.08881209045648575,
0.07192860543727875,
-0.049402642995119095,
0.05171879008412361,
0.08761506527662277,
0.1521967053413391,
0.12967520952224731,
-0.014825605787336826,
0.02350088208913803,
0.00840255431830883,
-0.021372510120272636,
-0.14132195711135864,
0.255948543548584,
-0.17002153396606445,
0.01635335013270378,
-0.17418017983436584,
-0.030984966084361076,
-0.02384326420724392,
-0.13923141360282898,
-0.205190971493721,
-0.016541704535484314,
0.11351562291383743,
-0.0924283117055893,
-0.012278386391699314,
-0.002520386828109622,
0.33624327182769775,
0.20178145170211792,
0.12422283738851547,
0.11281641572713852,
-0.07939586788415909,
0.1620367169380188,
-0.024835599586367607,
-0.12859849631786346,
-0.04231472685933113,
-0.032732490450143814,
-0.11484391242265701,
0.10445331782102585,
-0.10039713978767395,
0.025948138907551765,
-0.27586615085601807,
0.16301995515823364,
0.1662253588438034,
0.014968210831284523,
-0.07730775326490402,
-0.1208871454000473,
0.05237051844596863,
0.020728781819343567,
-0.0835212916135788,
-0.041750628501176834,
-0.08231590688228607,
-0.1324956715106964,
0.04497978463768959,
-0.028646353632211685,
0.03272852301597595,
0.16182012856006622,
-0.01999913528561592,
-0.1764758974313736,
0.004738667048513889,
0.05959318205714226,
0.14159080386161804,
-0.24846240878105164,
-0.10640010982751846,
-0.05256609246134758,
0.003764583496376872,
0.1315874457359314,
0.08939451724290848,
-0.0268244668841362,
-0.28505223989486694,
0.2196509689092636,
0.08985935151576996,
-0.16451577842235565,
-0.12234193831682205,
0.030089473351836205,
-0.035516731441020966,
0.10504008084535599,
-0.2642083466053009,
-0.10579602420330048,
-0.20078694820404053,
0.012398561462759972,
-0.15836003422737122,
0.1580415815114975,
-0.19565410912036896,
0.0590415857732296,
-0.033795978873968124,
0.09912727028131485,
-0.13926182687282562,
-0.010678913444280624,
0.10407795757055283,
0.07061087340116501,
-0.028136584907770157,
-0.017170937731862068,
-0.16067969799041748,
-0.04471632465720177,
0.16229328513145447,
-0.03219231218099594,
-0.03092428669333458,
0.10031486302614212,
-0.011772681027650833,
0.003155558370053768,
0.07812826335430145,
0.026281950995326042,
-0.1403495967388153,
0.0067916978150606155,
-0.04998087137937546,
-0.15372610092163086,
-0.021100405603647232,
0.06268616765737534,
-0.012267952784895897,
0.21057774126529694,
-0.1794867366552353,
0.06120219826698303,
0.33475515246391296,
0.0627686008810997,
-0.09649214893579483,
0.07339776307344437,
0.15472851693630219,
-0.08612842857837677,
0.18115931749343872,
0.08260524272918701,
-0.008682867512106895,
-0.0840291678905487,
0.2827170789241791,
-0.07426601648330688,
0.05241740122437477,
-0.03011193685233593,
0.1092161163687706,
0.045835599303245544,
0.03470813110470772,
-0.06862137466669083,
-0.04064192250370979,
0.09442809969186783,
-0.00007958044443512335,
-0.061771925538778305,
-0.06202947720885277,
-0.11516886949539185,
0.05695909261703491,
0.02054482139647007,
-0.14034812152385712,
-0.09220745414495468,
-0.008867592550814152,
-0.025850381702184677,
-0.10750823467969894,
0.14669638872146606,
0.07750557363033295,
-0.1323293149471283,
0.1486704796552658,
0.10403285175561905,
-0.056514494121074677,
0.002258198568597436,
0.04030196741223335,
-0.032350193709135056,
0.08763314038515091,
-0.06871570646762848,
-0.08368107676506042,
-0.02414626069366932,
0.010269897058606148,
0.03970713913440704,
0.1459616720676422,
0.09335315972566605,
0.030383769422769547,
-0.0876292958855629,
-0.06707475334405899,
0.028526758775115013,
0.04715545475482941,
0.11780478060245514,
0.06733372807502747,
0.024494754150509834,
0.07280018925666809,
0.05033112317323685,
-0.17603585124015808,
0.09856543689966202,
-0.020327406004071236,
-0.10146603733301163,
0.09442181140184402,
-0.0151902437210083,
0.04603782296180725,
0.009448656812310219,
-0.12448733299970627,
-0.1807572841644287,
0.2032211273908615,
0.011115333065390587,
-0.055189479142427444,
0.16031111776828766,
-0.14638690650463104,
-0.09836944937705994,
0.025486264377832413,
-0.005195255856961012,
-0.11058814823627472,
-0.008569947443902493,
-0.03672352433204651,
0.004063971806317568,
-0.15085309743881226,
0.08611973375082016,
0.08687791973352432,
-0.050503261387348175,
0.01320615690201521,
-0.16168394684791565,
-0.055767763406038284,
-0.08537634462118149,
0.300199955701828,
0.08084520697593689,
-0.11289367079734802,
0.058461710810661316,
-0.05626773461699486,
-0.06626345962285995,
0.044896114617586136,
-0.09574068337678909,
0.12949956953525543,
-0.18152055144309998,
0.03650088980793953,
0.026820819824934006,
-0.04424406215548515,
0.005371890030801296,
-0.06144407019019127,
-0.026830708608031273,
0.06406886130571365,
0.05308859050273895,
-0.1034313514828682,
0.1620226502418518,
-0.0008312662248499691,
0.05521705374121666,
-0.05161399766802788,
-0.0335485078394413,
0.07029496133327484,
0.036087412387132645,
-0.1116345226764679,
0.025788767263293266,
0.14466449618339539,
-0.02098107896745205,
-0.11289791762828827,
-0.13977007567882538,
-0.02865922823548317,
-0.024876581504940987,
-0.02685142494738102,
0.02004675753414631,
0.14050811529159546,
-0.10219288617372513,
0.028194181621074677,
-0.20799048244953156,
0.21839648485183716,
0.0139389019459486,
0.11356918513774872,
-0.13978208601474762,
-0.10320435464382172,
0.011410008184611797,
0.10861701518297195,
0.03358826786279678,
-0.08147276192903519,
-0.017467180266976357,
-0.07226382941007614,
-0.030290480703115463,
-0.06060964986681938,
0.12537574768066406,
0.1436498761177063,
-0.07036300003528595,
-0.0672362893819809,
-0.04467099905014038,
0.1644359529018402,
-0.005893124267458916,
-0.018326500430703163,
0.13452240824699402,
0.005980009213089943,
0.06782454252243042,
0.07317806035280228,
0.2270413041114807,
0.11849110573530197,
-0.006733687128871679,
0.08097502589225769,
-0.06295304745435715,
0.10333120077848434,
-0.09702950716018677,
0.12179970741271973,
0.054271284490823746,
-0.15451660752296448,
-0.07716608792543411,
0.12643517553806305,
0.1317264288663864,
-0.015566231682896614,
-0.014320097863674164,
-0.1665230691432953,
-0.15272332727909088,
-0.09811732172966003,
-0.10258954018354416,
0.014229124411940575,
0.18219803273677826,
0.011128962971270084,
0.04575040191411972,
0.006196947768330574,
-0.047382477670907974,
0.16922633349895477,
0.06529897451400757,
-0.15130005776882172,
0.014060264453291893,
0.18617592751979828,
0.0887937992811203,
0.11201512068510056,
-0.05602960288524628,
0.2943723201751709,
-0.043112535029649734,
0.06087535247206688,
0.19488398730754852,
-0.19188819825649261,
-0.09816274791955948,
-0.053241193294525146,
-0.02979515865445137,
0.03211580589413643,
-0.0407002717256546,
-0.10394734144210815,
-0.09083497524261475,
-0.02341102994978428,
-0.059176817536354065,
0.07475278526544571,
0.017498767003417015,
-0.0756075531244278,
-0.17429901659488678,
0.03029940277338028,
-0.037916399538517,
0.21192243695259094,
-0.12739117443561554,
0.09172461926937103,
0.13232822716236115,
-0.0992504358291626,
-0.04520140215754509,
-0.10828559100627899,
0.011266052722930908,
-0.012245247140526772,
0.04365011304616928,
0.09397481381893158,
-0.10972822457551956,
-0.04148286208510399,
0.041137222200632095,
0.008861064910888672,
0.0412457250058651,
-0.05431913956999779,
0.1282341033220291,
0.022599713876843452,
0.1074807345867157,
0.050820574164390564,
0.07166162133216858,
0.041007522493600845,
-0.048839978873729706,
0.19758328795433044,
0.09855564683675766,
0.04125766456127167,
-0.3169330656528473,
-0.024145739153027534,
0.12888669967651367,
0.045345667749643326,
-0.13039866089820862,
-0.12689673900604248,
0.05104527249932289,
0.09547832608222961,
0.053041134029626846,
0.11935323476791382,
-0.05489816889166832,
0.09926654398441315,
0.0055250730365514755,
-0.13367609679698944,
0.0011656155111268163,
0.027739670127630234,
0.07139921188354492,
-0.005614584311842918,
-0.09530727565288544,
0.11412336677312851,
-0.012689853087067604,
0.170487180352211,
-0.021648919209837914,
0.023143885657191277,
-0.07153699547052383,
0.0003815590462181717,
0.06302686035633087,
0.09084104746580124,
-0.018309522420167923,
-0.06301183998584747,
-0.07423326373100281,
0.14364010095596313,
0.15489114820957184,
-0.07059288024902344,
0.01942998729646206,
0.0172746479511261,
0.09596292674541473,
0.08835512399673462,
-0.0908222496509552,
0.08084997534751892,
-0.020603708922863007,
0.1180482879281044,
0.10094355046749115,
-0.05623354762792587,
0.02492126077413559,
0.20625774562358856,
-0.0966157540678978,
0.034901127219200134,
0.07053358852863312,
0.28736522793769836,
0.11734072864055634,
-0.1588878184556961,
0.07970328629016876,
0.13847589492797852,
-0.14864705502986908,
-0.03547367453575134,
0.12249749153852463,
-0.06295616179704666,
-0.05145058035850525,
-0.08704884350299835,
0.0934838056564331,
-0.024820789694786072,
0.09791865944862366,
0.09268941730260849,
-0.006389677990227938,
-0.02503075636923313,
-0.1257130205631256,
0.022547442466020584,
0.0785820260643959,
-0.047318242490291595,
-0.018878675997257233,
-0.028732987120747566,
-2.3712537834423697e-32,
-0.13179942965507507,
-0.15661321580410004,
-0.018630826845765114,
-0.07324454933404922,
-0.18750309944152832,
-0.011770026758313179,
-0.0698728933930397,
-0.0568244494497776,
-0.12479309737682343,
-0.06762190163135529,
-0.07957654446363449,
0.004227518104016781,
0.04398658126592636,
0.03789723291993141,
-0.12212688475847244,
-0.06422189623117447,
-0.029795577749609947,
-0.03926103189587593,
-0.13746391236782074,
0.0929037407040596,
-0.04040098562836647,
-0.028689952567219734,
-0.28114837408065796,
-0.05564428120851517,
0.12766535580158234,
-0.15155652165412903,
0.10121428221464157,
-0.17757616937160492,
0.047777120023965836,
0.01574600115418434,
-0.11050783842802048,
0.116646409034729,
-0.04690602049231529,
0.009494383819401264,
-0.02768498659133911,
-0.1564924269914627,
-0.14028839766979218,
0.0782286673784256,
0.15004868805408478,
-0.02298048324882984,
0.018813692033290863,
0.0012690392322838306,
0.08257141709327698,
0.0062941899523139,
-0.017366711050271988,
0.0015756343491375446,
0.09707214683294296,
0.0200602188706398,
-0.11212801933288574,
-0.05268198251724243,
-0.08477738499641418,
0.04245750606060028,
0.032684020698070526,
-0.03179607912898064,
-0.03838484361767769,
-0.06827309727668762,
0.08376890420913696,
0.10836602002382278,
-0.0473971962928772,
-0.17075635492801666,
-0.06183333694934845,
0.019648876041173935,
-0.0578342080116272,
-0.16980886459350586,
0.1243891492486,
-0.09987034648656845,
0.3890830874443054,
-0.030851982533931732,
0.04751918464899063,
-0.02212425135076046,
0.25337257981300354,
0.18737173080444336,
-0.12422988563776016,
-0.1164807379245758,
-0.02662544883787632,
-0.10266009718179703,
-0.09090081602334976,
0.015500402078032494,
0.01888360269367695,
-0.02815571427345276,
0.030521266162395477,
-0.10902746766805649,
-0.006591102574020624,
0.12939736247062683,
-0.11171910166740417,
0.003508642315864563,
0.036596331745386124,
0.05448686331510544,
-0.188889741897583,
-0.04536761716008186,
0.07538574188947678,
-0.005756061989814043,
-0.04394124448299408,
-0.047419849783182144,
0.0076903956942260265,
-0.07670359313488007,
-0.06724490225315094,
0.07323987782001495,
-0.07463822513818741,
0.1793716549873352,
-0.01673753932118416,
-0.10545306652784348,
-0.00573223689571023,
-0.06090518459677696,
0.08811473101377487,
0.05709066987037659,
-0.046821363270282745,
0.007625624071806669,
-0.09945100545883179,
-0.05645858123898506,
-0.11748120933771133,
0.10490628331899643,
0.03790164366364479,
0.12184517085552216,
0.282196044921875,
0.059702709317207336,
-0.05984218046069145,
0.005551488138735294,
0.08337530493736267,
0.11782418191432953,
-0.15355542302131653,
-0.06117304414510727,
0.06996999680995941,
0.024728769436478615,
-0.04530816897749901,
0.22679701447486877,
-0.250333696603775,
-0.04574672132730484,
0.01738356426358223,
-0.09026847034692764,
0.0188499353826046,
-0.22351720929145813,
7.726405328867259e-7,
-0.27632054686546326,
0.2667350471019745,
-0.010414536111056805,
0.11239759624004364,
-0.02285880595445633,
-0.07065670937299728,
-0.2289140373468399,
0.06394542753696442,
-0.05947532132267952,
0.11068432033061981,
0.08299313485622406,
0.0545295886695385,
-0.020490195602178574,
0.02641901932656765,
0.0935969352722168,
-0.09951216727495193,
-0.02607298456132412,
-0.010588395409286022,
-0.08146310597658157,
-0.013332884758710861,
0.08899203687906265,
0.1402178406715393,
-0.15904775261878967,
-0.012556479312479496,
0.14238066971302032,
-0.1534082293510437,
0.09813786298036575,
-0.0701877623796463,
-0.018314478918910027,
-0.08799894899129868,
-0.09904715418815613,
0.10694080591201782,
-0.0363108329474926,
0.16333159804344177,
0.092808797955513,
-0.0617978535592556,
-0.21634365618228912,
-0.19131331145763397,
0.1939709335565567,
-0.06224677711725235,
0.06498610973358154,
0.01935630664229393,
0.09997206926345825,
0.056814149022102356,
0.19712860882282257,
-0.017057927325367928,
-0.2061314433813095,
0.057772547006607056,
0.12276004254817963,
0.037455517798662186,
-0.05887484923005104,
0.22366420924663544,
0.054399099200963974,
0.10907333344221115,
0.011301972903311253,
-0.14775493741035461,
0.09403441101312637,
-0.21832169592380524,
-0.10856355726718903,
-0.09961067885160446,
-0.05349874496459961,
-0.09215671569108963,
0.15424630045890808,
-0.07850009202957153,
0.19920454919338226,
-0.045191358774900436,
0.00830077100545168,
2.625687496929839e-34,
0.04989982768893242,
-0.09763944149017334,
0.06271561235189438,
-0.039497096091508865,
-0.06095053628087044,
-0.18570367991924286,
-0.032607752829790115,
-0.07301484048366547,
0.09651829302310944,
-0.19714966416358948,
-0.04685013368725777
] |
https://github.com/huggingface/datasets/issues/6034 | load_dataset hangs on WSL | Thanks - that works! However it doesn't resolve the original issue (but I am not sure if it is a WSL problem) | ### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information. | 22 | load_dataset hangs on WSL
### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information.
Thanks - that works! However it doesn't resolve the original issue (but I am not sure if it is a WSL problem) | [
-0.11878927797079086,
0.1519126296043396,
0.013627782464027405,
-0.0442514643073082,
0.11842986196279526,
0.019337361678481102,
-0.014376743696630001,
-0.05756952986121178,
0.17012609541416168,
0.22577352821826935,
0.04922768473625183,
-0.054629527032375336,
0.08182559162378311,
-0.12811700999736786,
-0.06781379878520966,
0.10924781858921051,
-0.08029701560735703,
0.06315146386623383,
0.06044822931289673,
-0.09829457849264145,
-0.13099786639213562,
-0.029910990968346596,
0.05614051595330238,
-0.13069193065166473,
0.10429021716117859,
-0.026584599167108536,
-0.02896924689412117,
0.021249866113066673,
-0.08613330125808716,
-0.07429620623588562,
0.06944198161363602,
0.016048211604356766,
-0.05244143679738045,
0.20139572024345398,
0.000005671744474966545,
-0.09919900447130203,
0.13540716469287872,
0.15530012547969818,
-0.08063148707151413,
-0.13152845203876495,
0.06473761796951294,
-0.11073998361825943,
-0.028593074530363083,
-0.025242416188120842,
-0.06304009258747101,
-0.09540414810180664,
-0.016831237822771072,
-0.1471526324748993,
0.07147251814603806,
-0.07544700056314468,
-0.050088293850421906,
0.05207498371601105,
-0.13285593688488007,
-0.1788700819015503,
0.10227371007204056,
-0.028858356177806854,
-0.006971619091928005,
0.04422803968191147,
-0.009081023745238781,
-0.15465356409549713,
-0.08506294339895248,
-0.06808488070964813,
0.013278210535645485,
-0.004493909887969494,
-0.1324390023946762,
0.07152316719293594,
-0.12779593467712402,
-0.057261981070041656,
0.14969971776008606,
0.1856914758682251,
-0.01120604295283556,
0.09688796103000641,
-0.05096320062875748,
0.03248382732272148,
-0.060876138508319855,
-0.014723473228514194,
0.0824655145406723,
0.07503678649663925,
-0.15168780088424683,
0.09647920727729797,
0.04866701364517212,
0.028679875656962395,
-0.05353838950395584,
0.05705871060490608,
-0.247172549366951,
0.0652070939540863,
-0.02620493620634079,
0.08836489915847778,
0.08848263323307037,
0.027993520721793175,
0.12037649750709534,
0.08182244002819061,
-0.13039374351501465,
-0.12345454096794128,
-0.07333085685968399,
0.15458334982395172,
0.03319234773516655,
0.05256844684481621,
-0.024242330342531204,
-0.0980767011642456,
-0.0797407254576683,
-0.021717257797718048,
0.08270230889320374,
0.06386221200227737,
0.030270680785179138,
-0.06110317260026932,
0.03904034569859505,
-0.21665169298648834,
-0.009289237670600414,
0.11045224219560623,
-0.10267864912748337,
0.22396300733089447,
-0.27067479491233826,
-0.04291996732354164,
0.10527710616588593,
-0.0411808043718338,
0.18838723003864288,
0.04162687063217163,
0.0870012417435646,
0.10452961921691895,
0.0020288764499127865,
0.18867945671081543,
0.10235077142715454,
0.3081727623939514,
-0.027597863227128983,
0.1237189769744873,
-0.0660865381360054,
-0.02724773809313774,
-0.16238030791282654,
0.03209361433982849,
-0.08996042609214783,
-0.12595278024673462,
-0.06125714257359505,
-0.11946634948253632,
0.10832183063030243,
0.03258558362722397,
-0.13817156851291656,
-0.03765597566962242,
0.005361351650208235,
-0.08626926690340042,
0.07459105551242828,
-0.041805658489465714,
0.07105253636837006,
0.10237499326467514,
0.15476447343826294,
0.15175597369670868,
-0.019737115129828453,
0.00853357370942831,
0.0035523681435734034,
-0.0059297592379152775,
-0.14373469352722168,
0.25316792726516724,
-0.17539145052433014,
0.024423949420452118,
-0.17047350108623505,
-0.026114393025636673,
0.005239772144705057,
-0.1507800966501236,
-0.17585721611976624,
-0.0046247150748968124,
0.1050257682800293,
-0.1243860274553299,
-0.01753460429608822,
-0.016043122857809067,
0.31319889426231384,
0.18501710891723633,
0.14328008890151978,
0.10276320576667786,
-0.10467270761728287,
0.1738457828760147,
0.007450330536812544,
-0.11443615704774857,
-0.03827318921685219,
-0.041031982749700546,
-0.09972838312387466,
0.12217839062213898,
-0.09726154804229736,
0.02464527077972889,
-0.2766706943511963,
0.1568482518196106,
0.17300289869308472,
0.008299565874040127,
-0.0922040343284607,
-0.09593784809112549,
0.06750486046075821,
0.01784171722829342,
-0.06758177280426025,
-0.04751972109079361,
-0.07843656837940216,
-0.12950772047042847,
0.0561009906232357,
-0.01912546344101429,
0.02922932617366314,
0.16351166367530823,
-0.016180485486984253,
-0.1797834187746048,
-0.0123593145981431,
0.09101607650518417,
0.1404428482055664,
-0.25124871730804443,
-0.0956563726067543,
-0.07419175654649734,
0.018389206379652023,
0.10725871473550797,
0.08525707572698593,
-0.002538720378652215,
-0.2421393245458603,
0.21905836462974548,
0.08788606524467468,
-0.16618956625461578,
-0.1024869754910469,
0.02203899435698986,
-0.030377408489584923,
0.1265130192041397,
-0.2742634117603302,
-0.10412628203630447,
-0.21457897126674652,
0.007255085743963718,
-0.17502760887145996,
0.13009846210479736,
-0.18924003839492798,
0.03853703290224075,
-0.06247180327773094,
0.08368492126464844,
-0.10111123323440552,
-0.011082274839282036,
0.08814968913793564,
0.05795840546488762,
-0.042229704558849335,
-0.009258516132831573,
-0.13568982481956482,
-0.018680589273571968,
0.1614912748336792,
-0.033402979373931885,
-0.01868167333304882,
0.11445746570825577,
-0.03515636548399925,
0.011136235669255257,
0.08927754312753677,
-0.014702972956001759,
-0.11182350665330887,
0.02310299314558506,
-0.04359285905957222,
-0.1734929382801056,
-0.000828934833407402,
0.05928301066160202,
0.01448900531977415,
0.2191074788570404,
-0.16585586965084076,
0.062047213315963745,
0.32380765676498413,
0.050355106592178345,
-0.09144297242164612,
0.09271878749132156,
0.15198232233524323,
-0.10381986200809479,
0.1706780344247818,
0.06741540133953094,
0.0031932753045111895,
-0.07006801664829254,
0.27190399169921875,
-0.08114916831254959,
0.05332464724779129,
-0.01127434428781271,
0.09661275893449783,
0.03978091478347778,
0.06450431793928146,
-0.05644693598151207,
-0.032627783715724945,
0.08240979164838791,
0.004045661073178053,
-0.06708362698554993,
-0.05406602472066879,
-0.11861828714609146,
0.06282565742731094,
0.024535195901989937,
-0.17273510992527008,
-0.09776459634304047,
0.005587346851825714,
-0.03577059879899025,
-0.10004667192697525,
0.15225444734096527,
0.06001017987728119,
-0.12217177450656891,
0.14359277486801147,
0.10888698697090149,
-0.049319177865982056,
0.012054352089762688,
0.05079703405499458,
-0.011935043148696423,
0.12278987467288971,
-0.06925137341022491,
-0.08798263221979141,
-0.03690876439213753,
-0.0006355023360811174,
0.05316649749875069,
0.13700896501541138,
0.07737350463867188,
0.02305300533771515,
-0.10111784189939499,
-0.06451339274644852,
0.038382671773433685,
0.06338278949260712,
0.12855857610702515,
0.07583636045455933,
0.020481927320361137,
0.08039785921573639,
0.051755391061306,
-0.160086527466774,
0.12386050075292587,
-0.010498395189642906,
-0.10948550701141357,
0.11017568409442902,
-0.030645199120044708,
0.036507196724414825,
0.0075567616149783134,
-0.10685297846794128,
-0.18712183833122253,
0.20515455305576324,
0.005372623912990093,
-0.05722112953662872,
0.16191637516021729,
-0.17258162796497345,
-0.10107357054948807,
0.028225770220160484,
-0.01161320973187685,
-0.12873433530330658,
-0.0011726582888513803,
-0.06531594693660736,
0.030346030369400978,
-0.16461922228336334,
0.04680493474006653,
0.08811682462692261,
-0.050716057419776917,
0.0318765789270401,
-0.1774415820837021,
-0.04227582365274429,
-0.04495937377214432,
0.303803950548172,
0.07965531945228577,
-0.12730136513710022,
0.05521569773554802,
-0.0694797933101654,
-0.07356581836938858,
0.039916593581438065,
-0.08543550223112106,
0.16863606870174408,
-0.1870095580816269,
0.032704416662454605,
0.036360085010528564,
-0.046613939106464386,
0.009933870285749435,
-0.05623422935605049,
-0.023277677595615387,
0.053349852561950684,
0.07202702760696411,
-0.08347797393798828,
0.1775713413953781,
-0.007152594160288572,
0.030892912298440933,
-0.04798760265111923,
-0.03977460786700249,
0.06493464857339859,
0.04485344886779785,
-0.12729907035827637,
0.027708202600479126,
0.14407669007778168,
-0.03938349708914757,
-0.09215641021728516,
-0.14034995436668396,
-0.012691847048699856,
-0.03162267804145813,
-0.01885717548429966,
0.025598959997296333,
0.15063874423503876,
-0.12445584684610367,
0.03128083050251007,
-0.2223179042339325,
0.20935802161693573,
0.015689482912421227,
0.12275737524032593,
-0.11970502138137817,
-0.1145678386092186,
0.01343004871159792,
0.07973387092351913,
0.025815926492214203,
-0.10213147103786469,
-0.0264027900993824,
-0.06869340687990189,
-0.05344703420996666,
-0.06832526624202728,
0.12566950917243958,
0.1330789178609848,
-0.05506689101457596,
-0.05813692510128021,
-0.045547712594270706,
0.1480674147605896,
-0.018021780997514725,
-0.04239169880747795,
0.13013507425785065,
-0.0036558303982019424,
0.04852240905165672,
0.06203301250934601,
0.22997114062309265,
0.12525083124637604,
0.004511919338256121,
0.10646209865808487,
-0.06194477155804634,
0.08213700354099274,
-0.08013176172971725,
0.09732943773269653,
0.06128672510385513,
-0.16093392670154572,
-0.0603003166615963,
0.12900471687316895,
0.13491855561733246,
-0.005649969447404146,
-0.016001151874661446,
-0.16320419311523438,
-0.1788792610168457,
-0.10630814731121063,
-0.10649467259645462,
0.019983284175395966,
0.17662440240383148,
-0.004259820561856031,
0.036592449992895126,
0.0018098150612786412,
-0.032003987580537796,
0.16309906542301178,
0.058683812618255615,
-0.15093757212162018,
0.01064527127891779,
0.19101271033287048,
0.05507848784327507,
0.08552836626768112,
-0.03485896810889244,
0.29160037636756897,
-0.02762812003493309,
0.08676188439130783,
0.20568062365055084,
-0.2118314802646637,
-0.0831167921423912,
-0.0823318138718605,
-0.032262980937957764,
0.054562896490097046,
-0.06317906826734543,
-0.11652335524559021,
-0.10374489426612854,
-0.027581777423620224,
-0.05568617954850197,
0.05226554721593857,
0.015466823242604733,
-0.07463104277849197,
-0.18086859583854675,
0.02629752829670906,
-0.04191179573535919,
0.222018763422966,
-0.16138535737991333,
0.08721082657575607,
0.1229896992444992,
-0.09276297688484192,
-0.0495028980076313,
-0.12278953194618225,
0.019528457894921303,
-0.021414639428257942,
0.028376728296279907,
0.062157485634088516,
-0.10886110365390778,
-0.04749578610062599,
0.024391131475567818,
0.014974696561694145,
0.04099203273653984,
-0.05546053126454353,
0.12361525744199753,
0.03915857896208763,
0.10855744034051895,
0.02808094024658203,
0.07375480979681015,
0.034966763108968735,
-0.02985028177499771,
0.1950225532054901,
0.07935033738613129,
0.04036732763051987,
-0.30167335271835327,
-0.027799829840660095,
0.13416074216365814,
0.03445981442928314,
-0.12184209376573563,
-0.1085796058177948,
0.035581089556217194,
0.0858495756983757,
0.04436444118618965,
0.12551578879356384,
-0.05451982095837593,
0.10666220635175705,
-0.026013752445578575,
-0.15999795496463776,
0.01857816055417061,
0.04573909938335419,
0.05941702425479889,
0.0027253697626292706,
-0.08519089221954346,
0.1349697858095169,
-0.016844050958752632,
0.1925704926252365,
0.0029175032395869493,
0.025767112150788307,
-0.08806309103965759,
-0.007928546518087387,
0.05971848592162132,
0.08343623578548431,
-0.014554177410900593,
-0.05528192222118378,
-0.08524905890226364,
0.1443282812833786,
0.2064514011144638,
-0.04790389537811279,
0.012209299020469189,
-0.000040675313357496634,
0.07774650305509567,
0.08664313703775406,
-0.09248150140047073,
0.08371470868587494,
-0.018580609932541847,
0.14387544989585876,
0.09988924860954285,
-0.05796497315168381,
0.026106450706720352,
0.21256393194198608,
-0.08269763737916946,
0.054298654198646545,
0.087001733481884,
0.2784995138645172,
0.11564359813928604,
-0.16104792058467865,
0.09427117556333542,
0.1367388814687729,
-0.1672309935092926,
-0.04590507969260216,
0.14476604759693146,
-0.05514097958803177,
-0.045297469943761826,
-0.08790836483240128,
0.09001266211271286,
-0.01837119832634926,
0.08990856260061264,
0.08403494954109192,
0.005107419565320015,
-0.02725795842707157,
-0.1384960561990738,
0.02375008352100849,
0.04796849936246872,
-0.0550096370279789,
-0.018142959102988243,
-0.043035008013248444,
-2.339582292211371e-32,
-0.15093590319156647,
-0.16842041909694672,
-0.0001296062982873991,
-0.09894031286239624,
-0.1707204282283783,
-0.020473865792155266,
-0.06653137505054474,
-0.07429803907871246,
-0.1308448165655136,
-0.038313739001750946,
-0.06997817009687424,
0.006634988822042942,
0.041796039789915085,
0.032878562808036804,
-0.10545401275157928,
-0.04771437123417854,
-0.009122034534811974,
-0.0324590802192688,
-0.13292740285396576,
0.0755765363574028,
-0.0491471029818058,
-0.030515138059854507,
-0.257918119430542,
-0.04906579107046127,
0.11977378278970718,
-0.15535148978233337,
0.12090830504894257,
-0.19089843332767487,
0.05665008723735809,
0.011210186406970024,
-0.10333792120218277,
0.13485626876354218,
-0.03944706544280052,
0.019425930455327034,
-0.037020377814769745,
-0.16085007786750793,
-0.13039188086986542,
0.07910317182540894,
0.1668546497821808,
-0.02489762008190155,
-0.02953062579035759,
-0.010401112958788872,
0.10374913364648819,
0.023355670273303986,
-0.01777014508843422,
0.018483107909560204,
0.10049144923686981,
0.03322349116206169,
-0.11574555933475494,
-0.04539335519075394,
-0.10618891566991806,
0.042133234441280365,
0.03640788421034813,
-0.04476877301931381,
-0.05385000258684158,
-0.07993627339601517,
0.07783349603414536,
0.09504755586385727,
-0.04225516691803932,
-0.15794405341148376,
-0.04051075130701065,
0.006884054746478796,
-0.05292912572622299,
-0.17519491910934448,
0.10235259681940079,
-0.09255682677030563,
0.38229796290397644,
-0.025341007858514786,
0.07098422199487686,
-0.0064473762176930904,
0.23683087527751923,
0.19952933490276337,
-0.13206931948661804,
-0.1385246366262436,
-0.04089360684156418,
-0.10744110494852066,
-0.10787840932607651,
0.026820644736289978,
-0.009552210569381714,
0.0025802929885685444,
0.012412913143634796,
-0.11066442728042603,
-0.022042589262127876,
0.13435174524784088,
-0.12437108904123306,
-0.006999924313277006,
0.06178472936153412,
0.04864627122879028,
-0.17109864950180054,
-0.05828772857785225,
0.09780795872211456,
-0.01954181306064129,
-0.03292149677872658,
-0.051623813807964325,
0.01914350502192974,
-0.06920651346445084,
-0.07398451119661331,
0.052644774317741394,
-0.0894153043627739,
0.17261119186878204,
-0.017188483849167824,
-0.07519981265068054,
-0.030840851366519928,
-0.08571553230285645,
0.08837220072746277,
0.06482823193073273,
-0.05941367149353027,
0.014663166366517544,
-0.07443371415138245,
-0.05511725693941116,
-0.12141713500022888,
0.07828160375356674,
0.03913512080907822,
0.11606910079717636,
0.2807474732398987,
0.05997217074036598,
-0.05397278815507889,
0.011121280491352081,
0.08989657461643219,
0.10751311480998993,
-0.12676763534545898,
-0.05395713821053505,
0.07738468050956726,
0.010086805559694767,
-0.03997701406478882,
0.2235412746667862,
-0.24330483376979828,
-0.03922727704048157,
0.019785813987255096,
-0.08361636847257614,
0.023314522579312325,
-0.2442893534898758,
7.748371899651829e-7,
-0.2913408577442169,
0.2625366449356079,
-0.023073196411132812,
0.14524541795253754,
-0.032696232199668884,
-0.06986433267593384,
-0.2290625423192978,
0.07227244973182678,
-0.08156706392765045,
0.1185724213719368,
0.07668393850326538,
0.055983416736125946,
-0.029391726478934288,
0.019759908318519592,
0.0897490605711937,
-0.08944810181856155,
-0.032105702906847,
0.008760664612054825,
-0.06870587170124054,
-0.024960951879620552,
0.09307176619768143,
0.13554444909095764,
-0.16778115928173065,
-0.024783536791801453,
0.12606194615364075,
-0.17713065445423126,
0.10789647698402405,
-0.08010056614875793,
-0.05465177446603775,
-0.058580152690410614,
-0.10444653034210205,
0.12021828442811966,
-0.02709713578224182,
0.1616954207420349,
0.09412362426519394,
-0.04417409375309944,
-0.2021564394235611,
-0.20848844945430756,
0.1931520402431488,
-0.07013797014951706,
0.04370865225791931,
0.013341359794139862,
0.10126347094774246,
0.10105705261230469,
0.1774110347032547,
-0.014185331761837006,
-0.20867294073104858,
0.04818913713097572,
0.14679676294326782,
0.03622041270136833,
-0.06271699070930481,
0.2250557690858841,
0.048710525035858154,
0.08606221526861191,
-0.006093533709645271,
-0.15943332016468048,
0.08863934874534607,
-0.21841207146644592,
-0.11245597898960114,
-0.09218779951334,
-0.053437355905771255,
-0.06703978031873703,
0.15685516595840454,
-0.12433864921331406,
0.22762596607208252,
-0.026846708729863167,
0.022915231063961983,
2.6175320456935287e-34,
0.052358269691467285,
-0.10625369846820831,
0.06717822700738907,
-0.0018444127636030316,
-0.05219715088605881,
-0.20611175894737244,
-0.058903615921735764,
-0.07920028269290924,
0.10156716406345367,
-0.19345086812973022,
-0.058562230318784714
] |
https://github.com/huggingface/datasets/issues/6034 | load_dataset hangs on WSL | We use `requests` to make HTTP requests (and `aiohttp` in the streaming mode), so I don't think we can provide much help regarding the socket issue (it probably has something to do with WSL). | ### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information. | 34 | load_dataset hangs on WSL
### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information.
We use `requests` to make HTTP requests (and `aiohttp` in the streaming mode), so I don't think we can provide much help regarding the socket issue (it probably has something to do with WSL). | [
-0.11593020707368851,
0.14030204713344574,
0.015247680246829987,
-0.052721355110406876,
0.10631536692380905,
0.026772530749440193,
-0.04306059330701828,
-0.05744186043739319,
0.1592906415462494,
0.23294474184513092,
0.04686923697590828,
-0.056177884340286255,
0.08536304533481598,
-0.1421087384223938,
-0.07570315152406693,
0.0963272675871849,
-0.07376902550458908,
0.0785752609372139,
0.059263139963150024,
-0.10397667437791824,
-0.12617985904216766,
-0.043585117906332016,
0.058777157217264175,
-0.129374161362648,
0.12708307802677155,
-0.02943808026611805,
-0.023135492578148842,
0.03148144856095314,
-0.09961748123168945,
-0.07406878471374512,
0.06751064956188202,
0.020428400486707687,
-0.04465256631374359,
0.20131182670593262,
0.0000057014608501049224,
-0.08251973241567612,
0.13555146753787994,
0.15214568376541138,
-0.1029462069272995,
-0.12466660887002945,
0.04466083645820618,
-0.12412706762552261,
-0.027324136346578598,
-0.021789362654089928,
-0.054916027933359146,
-0.08769350498914719,
-0.01358117163181305,
-0.15734916925430298,
0.08412140607833862,
-0.06599743664264679,
-0.06309151649475098,
0.06236964091658592,
-0.14393383264541626,
-0.16345643997192383,
0.1100834310054779,
-0.016900399699807167,
-0.011397233232855797,
0.04426657035946846,
0.008679859340190887,
-0.1267652064561844,
-0.0823107361793518,
-0.06193377822637558,
0.018387440592050552,
-0.01841040700674057,
-0.13816921412944794,
0.058826036751270294,
-0.13822704553604126,
-0.06478512287139893,
0.13427387177944183,
0.1887502521276474,
-0.016897663474082947,
0.09878962486982346,
-0.05126026272773743,
0.03340303525328636,
-0.07046906650066376,
-0.023697899654507637,
0.051830098032951355,
0.07895568758249283,
-0.14963790774345398,
0.10023371130228043,
0.033584486693143845,
0.029129138216376305,
-0.06772814691066742,
0.061714883893728256,
-0.22837641835212708,
0.05322401970624924,
-0.016692010685801506,
0.08984877914190292,
0.09020272642374039,
0.04103811830282211,
0.11827576160430908,
0.07295538485050201,
-0.11829613149166107,
-0.1231546550989151,
-0.0738535150885582,
0.15373313426971436,
0.04444704204797745,
0.052037809044122696,
-0.024813860654830933,
-0.08788418769836426,
-0.04768013209104538,
-0.014200380071997643,
0.060392651706933975,
0.04943663626909256,
0.04475988447666168,
-0.07062613219022751,
0.047136031091213226,
-0.22275757789611816,
-0.006500525400042534,
0.11398181319236755,
-0.08874902874231339,
0.2300143539905548,
-0.24205586314201355,
-0.02472766675055027,
0.090516097843647,
-0.03893063962459564,
0.19328293204307556,
0.0461503304541111,
0.0979420617222786,
0.08608309179544449,
-0.00661217188462615,
0.17934158444404602,
0.08444912731647491,
0.29553356766700745,
-0.038868166506290436,
0.12276264280080795,
-0.05940011888742447,
-0.03736879676580429,
-0.158863365650177,
0.013462616130709648,
-0.08933325856924057,
-0.1349332332611084,
-0.04013849049806595,
-0.12186460196971893,
0.09078294038772583,
0.0036169495433568954,
-0.14068713784217834,
-0.033773910254240036,
0.003737768856808543,
-0.07323563098907471,
0.0906890481710434,
-0.034493084996938705,
0.07473321259021759,
0.12119010835886002,
0.16433651745319366,
0.13222171366214752,
-0.02124887891113758,
0.020308731123805046,
0.0022014842834323645,
-0.012537896633148193,
-0.1364518254995346,
0.26765894889831543,
-0.1636008322238922,
0.02399289608001709,
-0.1892167180776596,
-0.031147370114922523,
-0.015486654825508595,
-0.14681749045848846,
-0.1978844553232193,
0.00846649706363678,
0.12041094154119492,
-0.12959769368171692,
0.006551037076860666,
-0.01410222053527832,
0.30934402346611023,
0.17976114153862,
0.1489247977733612,
0.10219397395849228,
-0.10426247119903564,
0.156675785779953,
-0.004202705342322588,
-0.1186646893620491,
-0.0306923259049654,
-0.03429810330271721,
-0.09778416901826859,
0.12881509959697723,
-0.09673289209604263,
0.027710525318980217,
-0.28418493270874023,
0.17824113368988037,
0.17589369416236877,
-0.004156122915446758,
-0.07884926348924637,
-0.0894833356142044,
0.0663473829627037,
0.025317756459116936,
-0.05657839775085449,
-0.05881780385971069,
-0.07520552724599838,
-0.1279832124710083,
0.043656524270772934,
-0.03079948201775551,
0.0153499785810709,
0.15843522548675537,
-0.0070873647928237915,
-0.1805327832698822,
-0.015358303673565388,
0.045580025762319565,
0.15468378365039825,
-0.2571158707141876,
-0.09408885985612869,
-0.06733189523220062,
0.020721854642033577,
0.11067423969507217,
0.07709882408380508,
-0.009559640660881996,
-0.2344495803117752,
0.20932865142822266,
0.09253309667110443,
-0.14696620404720306,
-0.11174233257770538,
0.016560148447752,
-0.03762155398726463,
0.1274908035993576,
-0.27965936064720154,
-0.07570372521877289,
-0.2230318933725357,
0.0004838923050556332,
-0.1718892753124237,
0.1408480852842331,
-0.1936713606119156,
0.051826152950525284,
-0.07594791054725647,
0.08627166599035263,
-0.10225473344326019,
-0.007211009506136179,
0.10097505897283554,
0.07514263689517975,
-0.04596855863928795,
-0.013361973688006401,
-0.12334298342466354,
-0.004423897247761488,
0.16163840889930725,
-0.03320492431521416,
-0.029722440987825394,
0.10916486382484436,
-0.014197581447660923,
0.010776950977742672,
0.09735114872455597,
-0.004371733870357275,
-0.11053681373596191,
0.037319060415029526,
-0.042368367314338684,
-0.17797134816646576,
0.024679096415638924,
0.04003441706299782,
0.020764479413628578,
0.2090304046869278,
-0.1651526689529419,
0.06951242685317993,
0.3155514597892761,
0.05150505155324936,
-0.09724783152341843,
0.10440196096897125,
0.13873648643493652,
-0.10399767756462097,
0.1552301049232483,
0.06424917280673981,
0.008745018392801285,
-0.08289234340190887,
0.26166996359825134,
-0.09297706186771393,
0.04943559691309929,
0.005409363657236099,
0.08965864777565002,
0.04208546504378319,
0.0660763755440712,
-0.045609042048454285,
-0.023774147033691406,
0.07330245524644852,
0.010951032862067223,
-0.07065100967884064,
-0.049369122833013535,
-0.12773238122463226,
0.05264702066779137,
0.03479001298546791,
-0.17979742586612701,
-0.11433077603578568,
-0.0027611905243247747,
-0.038861509412527084,
-0.0997147262096405,
0.149657741189003,
0.041541289538145065,
-0.1099904254078865,
0.13265419006347656,
0.10966799408197403,
-0.04774874821305275,
0.0019991432782262564,
0.059284161776304245,
-0.014620112255215645,
0.11740705370903015,
-0.08588694781064987,
-0.09352482855319977,
-0.05213507264852524,
0.00721479719504714,
0.028638096526265144,
0.11361341923475266,
0.08908220380544662,
0.039719972759485245,
-0.10776011645793915,
-0.07369530200958252,
0.036001674830913544,
0.042192328721284866,
0.13794070482254028,
0.06198638305068016,
0.01811416633427143,
0.07896102964878082,
0.04077654331922531,
-0.15755470097064972,
0.13147114217281342,
-0.008280829526484013,
-0.09932953864336014,
0.10857070237398148,
-0.04221954941749573,
0.04198651388287544,
0.02540561929345131,
-0.11988281458616257,
-0.16831359267234802,
0.20090900361537933,
0.015967588871717453,
-0.060912732034921646,
0.16384130716323853,
-0.17502513527870178,
-0.09145426750183105,
0.04327136278152466,
-0.017916623502969742,
-0.11482924222946167,
-0.004759564530104399,
-0.04239002987742424,
0.012282663024961948,
-0.16646918654441833,
0.05499202385544777,
0.10239234566688538,
-0.04629726707935333,
0.04810270294547081,
-0.16930623352527618,
-0.039635948836803436,
-0.04194006323814392,
0.29828378558158875,
0.08562851697206497,
-0.12356274574995041,
0.03275327384471893,
-0.06653017550706863,
-0.07452192157506943,
0.05420428141951561,
-0.09459482878446579,
0.1494404375553131,
-0.1904309242963791,
0.0263382401317358,
0.0382622554898262,
-0.0441494956612587,
0.006008210126310587,
-0.057539813220500946,
-0.020261337980628014,
0.05137409642338753,
0.06732884794473648,
-0.07417089492082596,
0.18076004087924957,
-0.006807013880461454,
0.045788105577230453,
-0.05683784931898117,
-0.056274957954883575,
0.05725684016942978,
0.04308133199810982,
-0.11044953018426895,
0.03781094402074814,
0.1509009152650833,
-0.05525203049182892,
-0.07896561175584793,
-0.12580041587352753,
-0.03726198896765709,
-0.020904069766402245,
-0.010810092091560364,
0.02124938555061817,
0.1652270406484604,
-0.11518653482198715,
0.03668259456753731,
-0.20824070274829865,
0.21952973306179047,
0.01988660916686058,
0.1145106852054596,
-0.1169847622513771,
-0.113099604845047,
0.005602810066193342,
0.09353157132863998,
0.01725277304649353,
-0.1006266325712204,
-0.04027579352259636,
-0.06555725634098053,
-0.04950476437807083,
-0.07175227999687195,
0.14018432796001434,
0.13191048800945282,
-0.05806104466319084,
-0.05125390365719795,
-0.01649668626487255,
0.14437784254550934,
0.0004172670014668256,
-0.03369910269975662,
0.13975080847740173,
0.0036377916112542152,
0.026162417605519295,
0.03520030528306961,
0.2192203551530838,
0.12102781981229782,
0.016609350219368935,
0.10086648911237717,
-0.05467656999826431,
0.08624344319105148,
-0.06635123491287231,
0.12179244309663773,
0.060493335127830505,
-0.1767948418855667,
-0.052692923694849014,
0.11563893407583237,
0.12882861495018005,
-0.005124258808791637,
-0.007416699547320604,
-0.1675400584936142,
-0.1898154616355896,
-0.09851410984992981,
-0.10406471788883209,
0.016249192878603935,
0.17777012288570404,
0.00692583154886961,
0.04392147436738014,
0.00417226692661643,
-0.02478940039873123,
0.16120697557926178,
0.0701826885342598,
-0.14301618933677673,
0.001103433663956821,
0.18610666692256927,
0.04714539647102356,
0.07601408660411835,
-0.02148091234266758,
0.2897898852825165,
-0.017631003633141518,
0.07538578659296036,
0.1998058706521988,
-0.19235573709011078,
-0.09163064509630203,
-0.09710849076509476,
-0.022830957546830177,
0.05661119893193245,
-0.04267514869570732,
-0.10338810086250305,
-0.09094839543104172,
-0.0397036075592041,
-0.04766948148608208,
0.02187282219529152,
0.002859069500118494,
-0.09644867479801178,
-0.15168027579784393,
0.02085951901972294,
-0.0411187969148159,
0.21515299379825592,
-0.14593124389648438,
0.08441425114870071,
0.12111303210258484,
-0.0899936854839325,
-0.04907498136162758,
-0.1259545236825943,
0.01810404844582081,
-0.026425747200846672,
0.014920802786946297,
0.08804266899824142,
-0.11925674229860306,
-0.0605694055557251,
0.03684127703309059,
0.03780248016119003,
0.04868646338582039,
-0.050187744200229645,
0.1075085699558258,
0.025234734639525414,
0.11288458108901978,
0.04102853313088417,
0.08400443196296692,
0.04469631239771843,
-0.02794031798839569,
0.21132683753967285,
0.06744362413883209,
0.03392065688967705,
-0.30786439776420593,
-0.01486721821129322,
0.11494066566228867,
0.01935434527695179,
-0.1141618937253952,
-0.1241011917591095,
0.018222814425826073,
0.09692718088626862,
0.042974479496479034,
0.1232043206691742,
-0.039676595479249954,
0.10420726239681244,
-0.03251701593399048,
-0.153587207198143,
0.031040819361805916,
0.03207653760910034,
0.0635383352637291,
-0.009536253288388252,
-0.08605965971946716,
0.1388363391160965,
-0.012735850177705288,
0.19385267794132233,
0.013514712452888489,
0.03621895611286163,
-0.10056481510400772,
0.002704702550545335,
0.05197703838348389,
0.09071984142065048,
-0.0077831256203353405,
-0.05208248272538185,
-0.07810697704553604,
0.1501152217388153,
0.1828608214855194,
-0.06616128981113434,
0.018275924026966095,
-0.00005278094613458961,
0.07965603470802307,
0.09435392916202545,
-0.10119642317295074,
0.1004767194390297,
-0.026333890855312347,
0.15649797022342682,
0.10390704870223999,
-0.047466255724430084,
0.018049633130431175,
0.2238345742225647,
-0.08147895336151123,
0.03578661382198334,
0.08029013127088547,
0.2873552739620209,
0.1111910492181778,
-0.1606968492269516,
0.0837302953004837,
0.12107283622026443,
-0.15923884510993958,
-0.05022863671183586,
0.14728932082653046,
-0.057856183499097824,
-0.049823857843875885,
-0.10249755531549454,
0.07325706630945206,
-0.00807326938956976,
0.10447323322296143,
0.08986975997686386,
0.004248498007655144,
-0.03583195060491562,
-0.1266411542892456,
0.02136160619556904,
0.04568040743470192,
-0.07088872045278549,
-0.011339018121361732,
-0.027035586535930634,
-2.3273747833780815e-32,
-0.1507028490304947,
-0.13806742429733276,
-0.01003177184611559,
-0.09828215837478638,
-0.17827542126178741,
-0.01809527724981308,
-0.07384214550256729,
-0.07680585235357285,
-0.1255248636007309,
-0.03897350654006004,
-0.05783050134778023,
-0.0029653122182935476,
0.04467806592583656,
0.03924914076924324,
-0.12279871106147766,
-0.07332566380500793,
-0.02040610834956169,
-0.03970060870051384,
-0.12821587920188904,
0.07762351632118225,
-0.06458821892738342,
-0.04111163318157196,
-0.26820558309555054,
-0.037720937281847,
0.12833303213119507,
-0.15643782913684845,
0.13357648253440857,
-0.19721141457557678,
0.06791216135025024,
0.013804914429783821,
-0.09842588752508163,
0.13699091970920563,
-0.04304594546556473,
0.0252500232309103,
-0.03801627829670906,
-0.14027664065361023,
-0.13164734840393066,
0.09304191172122955,
0.1693686842918396,
-0.008863796480000019,
-0.01820453815162182,
-0.0031937574967741966,
0.10211315006017685,
0.026401035487651825,
-0.031880129128694534,
0.010003968141973019,
0.0882493108510971,
0.047849539667367935,
-0.11762640625238419,
-0.023631218820810318,
-0.09392879903316498,
0.04043538495898247,
0.019873838871717453,
-0.05694267898797989,
-0.03757386654615402,
-0.07401924580335617,
0.08081839233636856,
0.10429934412240982,
-0.027209995314478874,
-0.1574116349220276,
-0.0664229765534401,
0.006033315788954496,
-0.060435593128204346,
-0.1979505717754364,
0.09710517525672913,
-0.07850456982851028,
0.3790741562843323,
-0.044222548604011536,
0.05944142863154411,
-0.008750148117542267,
0.24068783223628998,
0.18198958039283752,
-0.1509452611207962,
-0.13512994349002838,
-0.05114440619945526,
-0.1030949279665947,
-0.08663246780633926,
0.030963091179728508,
0.01056847907602787,
-0.014831284061074257,
0.02146024815738201,
-0.11076129972934723,
-0.023531638085842133,
0.13622929155826569,
-0.11074110120534897,
-0.0387299507856369,
0.05892840027809143,
0.05115358531475067,
-0.1605992615222931,
-0.06120018661022186,
0.08907417953014374,
-0.03892191872000694,
-0.030505791306495667,
-0.06663107126951218,
0.006759542040526867,
-0.09694484621286392,
-0.08791564404964447,
0.058660607784986496,
-0.08896543830633163,
0.17116904258728027,
-0.007756275124847889,
-0.08129320293664932,
-0.03465871512889862,
-0.10285116732120514,
0.07293502241373062,
0.0601140521466732,
-0.05242367833852768,
0.019092878326773643,
-0.0711306631565094,
-0.05203281715512276,
-0.11053407937288284,
0.0818917378783226,
0.04967916011810303,
0.11831102520227432,
0.29577213525772095,
0.058191120624542236,
-0.05759884789586067,
-0.001720314146950841,
0.08433625102043152,
0.10492750257253647,
-0.12180152535438538,
-0.06208065152168274,
0.07183309644460678,
0.0038940354716032743,
-0.04452795535326004,
0.20819763839244843,
-0.23196536302566528,
-0.020927084609866142,
0.015638070181012154,
-0.08159052580595016,
0.022833792492747307,
-0.2516372501850128,
7.809953785908874e-7,
-0.28155288100242615,
0.2745692729949951,
-0.013640612363815308,
0.12468679249286652,
-0.04166211187839508,
-0.06911198049783707,
-0.24087382853031158,
0.07841362059116364,
-0.095159612596035,
0.11265698820352554,
0.08935271203517914,
0.05599357560276985,
-0.022465156391263008,
0.0016293746884912252,
0.07947750389575958,
-0.09073437005281448,
-0.045874420553445816,
0.01938474178314209,
-0.07890793681144714,
-0.028748946264386177,
0.09500030428171158,
0.14568494260311127,
-0.17125266790390015,
-0.02502511814236641,
0.13526706397533417,
-0.17154061794281006,
0.11230140179395676,
-0.07965007424354553,
-0.059103235602378845,
-0.04410521686077118,
-0.12177873402833939,
0.12486665695905685,
-0.02598869428038597,
0.15909670293331146,
0.08679009228944778,
-0.060511477291584015,
-0.18089191615581512,
-0.21576036512851715,
0.18400752544403076,
-0.08395714312791824,
0.034417927265167236,
0.019179346039891243,
0.11280396580696106,
0.08247295767068863,
0.18081879615783691,
0.014990918338298798,
-0.21579284965991974,
0.05462709069252014,
0.1346830427646637,
0.03063030354678631,
-0.0583546906709671,
0.23051372170448303,
0.05238298326730728,
0.09039203822612762,
-0.01774577982723713,
-0.15469659864902496,
0.08912986516952515,
-0.2304706871509552,
-0.12095335870981216,
-0.11258353292942047,
-0.05485891178250313,
-0.0649222657084465,
0.16003291308879852,
-0.11015919595956802,
0.22064948081970215,
-0.018679453060030937,
0.023006249219179153,
2.5465117535059674e-34,
0.05761483684182167,
-0.0971013605594635,
0.06975159794092178,
0.003849532688036561,
-0.05829485133290291,
-0.20320981740951538,
-0.06619828939437866,
-0.08888940513134003,
0.10140534490346909,
-0.16313959658145905,
-0.03914201632142067
] |
https://github.com/huggingface/datasets/issues/6032 | DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info | `HfApi` comes from the `huggingface_hub` package. You can use [this](https://huggingface.co/docs/huggingface_hub/v0.16.3/en/package_reference/utilities#huggingface_hub.configure_http_backend) utility to change the `huggingface_hub`'s `Session` proxies (see the example).
We plan to implement https://github.com/huggingface/datasets/issues/5080 and make this behavior more consistent eventually. | ### Describe the bug
```python
download_config = DownloadConfig(proxies={'https': '<my proxy>'})
builder = load_dataset_builder(..., download_config=download_config)
```
But, when getting the dataset_info from HfApi, the http requests not using the proxies.
### Steps to reproduce the bug
1. Setup proxies in DownloadConfig.
2. Call `load_dataset_build` with download_config.
3. Inspect the call stack in HfApi.dataset_info.
![image](https://github.com/huggingface/datasets/assets/138426806/33e538a8-2e22-4e63-b634-343febe5324b)
### Expected behavior
DownloadConfig.proxies works for getting dataset_info.
### Environment info
https://github.com/huggingface/datasets/commit/406b2212263c0d33f267e35b917f410ff6b3bc00
Python 3.11.4 | 32 | DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info
### Describe the bug
```python
download_config = DownloadConfig(proxies={'https': '<my proxy>'})
builder = load_dataset_builder(..., download_config=download_config)
```
But, when getting the dataset_info from HfApi, the http requests not using the proxies.
### Steps to reproduce the bug
1. Setup proxies in DownloadConfig.
2. Call `load_dataset_build` with download_config.
3. Inspect the call stack in HfApi.dataset_info.
![image](https://github.com/huggingface/datasets/assets/138426806/33e538a8-2e22-4e63-b634-343febe5324b)
### Expected behavior
DownloadConfig.proxies works for getting dataset_info.
### Environment info
https://github.com/huggingface/datasets/commit/406b2212263c0d33f267e35b917f410ff6b3bc00
Python 3.11.4
`HfApi` comes from the `huggingface_hub` package. You can use [this](https://huggingface.co/docs/huggingface_hub/v0.16.3/en/package_reference/utilities#huggingface_hub.configure_http_backend) utility to change the `huggingface_hub`'s `Session` proxies (see the example).
We plan to implement https://github.com/huggingface/datasets/issues/5080 and make this behavior more consistent eventually. | [
0.003998477943241596,
-0.0426352396607399,
0.013480798341333866,
0.08590560406446457,
0.23163187503814697,
0.003392897080630064,
0.1443208009004593,
-0.004219875205308199,
-0.008093651384115219,
0.14585581421852112,
-0.1938551515340805,
-0.12390312552452087,
0.06743712723255157,
-0.01019971538335085,
0.09965790063142776,
0.030358226969838142,
-0.05306508392095566,
0.08590918779373169,
-0.17989856004714966,
-0.017310289666056633,
-0.016836032271385193,
0.15690727531909943,
0.09748831391334534,
-0.14668744802474976,
0.10003452003002167,
0.07014397531747818,
-0.04024743288755417,
0.05642993748188019,
-0.0247030146420002,
-0.023911019787192345,
0.3299349546432495,
0.20028811693191528,
0.00516725005581975,
0.049398161470890045,
0.00000552417532162508,
0.09402062743902206,
0.12276487797498703,
0.017737213522195816,
0.0045119887217879295,
0.02714136429131031,
-0.04966381937265396,
0.032644711434841156,
0.03923991322517395,
-0.005817099940031767,
-0.10279911756515503,
0.11683601140975952,
-0.11985272169113159,
-0.020433977246284485,
-0.03343940153717995,
-0.1179787740111351,
-0.010062486864626408,
0.22746087610721588,
0.010579651221632957,
-0.07448380440473557,
-0.007166546769440174,
0.12199001014232635,
-0.003989717923104763,
0.06416929513216019,
-0.07086039334535599,
-0.04977113753557205,
0.15483324229717255,
0.01416084822267294,
0.09635177999734879,
0.20016007125377655,
0.10494031012058258,
-0.09744105488061905,
-0.10274659097194672,
-0.18066465854644775,
0.06831027567386627,
0.2700154185295105,
0.061822209507226944,
-0.10070022195577621,
-0.17497973144054413,
0.10427204519510269,
-0.013479706831276417,
0.018335312604904175,
-0.0175849050283432,
0.050718195736408234,
-0.10423994809389114,
0.037223897874355316,
-0.07565786689519882,
-0.18018220365047455,
-0.024059046059846878,
0.09927388280630112,
0.0029936458449810743,
0.02007104828953743,
-0.010818098671734333,
0.059165384620428085,
0.0010608778102323413,
-0.041287537664175034,
0.13477565348148346,
-0.09171820431947708,
-0.045239511877298355,
0.00010185683640884236,
0.06614790111780167,
0.08085841685533524,
0.08472822606563568,
0.14693592488765717,
0.060905296355485916,
0.1411859691143036,
-0.06597704440355301,
0.011149153113365173,
-0.15653711557388306,
0.11324302107095718,
-0.007432899437844753,
-0.10952629894018173,
-0.06142638996243477,
-0.1487082839012146,
0.15172353386878967,
0.1451348215341568,
0.14831846952438354,
-0.06233181804418564,
0.025242002680897713,
0.1856261044740677,
-0.1230941116809845,
-0.04495269060134888,
0.0030768385622650385,
0.0784297063946724,
-0.11129729449748993,
-0.06230068951845169,
0.12641803920269012,
0.1136329248547554,
-0.03025755286216736,
0.2348911017179489,
-0.09216827899217606,
-0.07754725962877274,
-0.08123910427093506,
0.011319706216454506,
-0.09727250039577484,
-0.006888913456350565,
-0.05643406882882118,
-0.00976484827697277,
0.03434302657842636,
-0.022742265835404396,
0.14180873334407806,
-0.009112696163356304,
0.10542593896389008,
-0.19893230497837067,
0.08245071768760681,
-0.10706927627325058,
0.07898172736167908,
-0.028170276433229446,
-0.05808580294251442,
0.06465627998113632,
0.21473060548305511,
-0.010613656602799892,
-0.0313345231115818,
0.012612493708729744,
0.01544911041855812,
-0.024000227451324463,
0.020092077553272247,
0.047660380601882935,
-0.1592281460762024,
-0.059317056089639664,
-0.13830171525478363,
0.036031343042850494,
-0.030930910259485245,
0.06518066674470901,
-0.15282386541366577,
0.034183308482170105,
0.17422984540462494,
-0.011083979159593582,
0.016367768868803978,
-0.07973706722259521,
0.4376997947692871,
0.22672487795352936,
0.12921670079231262,
-0.11044400185346603,
0.13109400868415833,
-0.28329214453697205,
0.11416685581207275,
-0.14746937155723572,
-0.020616285502910614,
-0.15721367299556732,
-0.19761300086975098,
0.07031510770320892,
-0.048423584550619125,
-0.06347846239805222,
-0.15680062770843506,
0.11004064232110977,
0.08748115599155426,
0.024881476536393166,
0.09080935269594193,
-0.024439217522740364,
-0.014344378374516964,
-0.023574424907565117,
-0.08795294165611267,
0.0571226067841053,
-0.03090936504304409,
0.058290671557188034,
-0.017658986151218414,
-0.11317668110132217,
-0.02889079600572586,
-0.03123384527862072,
-0.1001005619764328,
0.07074414938688278,
-0.028879232704639435,
-0.1437099575996399,
0.23937049508094788,
0.026327189058065414,
0.1458335816860199,
-0.0124881686642766,
-0.06201415881514549,
0.10272818803787231,
0.06992445886135101,
-0.0178117286413908,
-0.10014668107032776,
0.19541053473949432,
-0.014133243821561337,
-0.07535979151725769,
-0.33614015579223633,
0.055707208812236786,
-0.14541521668434143,
0.04693704470992088,
-0.21959513425827026,
-0.1748811900615692,
-0.10081662237644196,
0.013107093051075935,
0.02086760848760605,
0.22237715125083923,
-0.03596392273902893,
0.3981001675128937,
0.2108423113822937,
0.025441588833928108,
0.032948173582553864,
0.15887746214866638,
0.15653714537620544,
-0.031132735311985016,
0.05055113136768341,
0.021258804947137833,
-0.009433753788471222,
-0.06396182626485825,
0.0804780051112175,
0.27247220277786255,
-0.14660166203975677,
0.22810254991054535,
0.0060650743544101715,
-0.2042139619588852,
0.09978034347295761,
-0.05683465674519539,
0.034488048404455185,
-0.028373438864946365,
0.0004907933762297034,
0.17531649768352509,
0.07775358855724335,
-0.1163773238658905,
-0.03807069733738899,
-0.00805663876235485,
-0.033098798245191574,
-0.016333261504769325,
0.23085883259773254,
0.03925875946879387,
-0.07610516995191574,
0.12768499553203583,
-0.008310828357934952,
-0.03457614406943321,
0.2708623707294464,
0.010027289390563965,
-0.15166793763637543,
-0.02481546439230442,
0.19737480580806732,
0.040822211652994156,
0.0016889655962586403,
0.16737572848796844,
0.06156644970178604,
-0.09852533787488937,
0.1553063690662384,
0.06815554201602936,
-0.009574665687978268,
-0.06539931148290634,
0.011325942352414131,
0.07872577756643295,
-0.09636756777763367,
-0.0842052772641182,
0.08813519775867462,
-0.009931182488799095,
-0.028324807062745094,
0.02668515220284462,
0.059856440871953964,
0.04707521200180054,
-0.0858403742313385,
0.06002326309680939,
-0.02620796672999859,
-0.1197735071182251,
0.07628532499074936,
-0.006970828399062157,
-0.10064636170864105,
0.034606046974658966,
-0.09522504359483719,
-0.012694566510617733,
0.020811324939131737,
-0.09897658228874207,
-0.07060737907886505,
-0.04690020903944969,
0.04389603063464165,
-0.23065973818302155,
-0.08157028257846832,
-0.0241324994713068,
0.1375138908624649,
0.1627771258354187,
-0.037743326276540756,
0.053725432604551315,
-0.03261477127671242,
-0.154767245054245,
-0.08537674695253372,
0.05982944369316101,
0.08978984504938126,
-0.15291328728199005,
-0.052098002284765244,
-0.15848363935947418,
0.08357201516628265,
-0.018067315220832825,
0.15880601108074188,
0.051061563193798065,
-0.07098282873630524,
-0.012982243672013283,
-0.043118931353092194,
0.061371706426143646,
0.18420441448688507,
0.05041686072945595,
0.057172685861587524,
-0.0006719780503772199,
-0.12199573218822479,
0.20065945386886597,
0.11184228956699371,
0.02722557820379734,
-0.15986111760139465,
-0.1256217658519745,
0.011491003446280956,
-0.1495683342218399,
0.10588213056325912,
-0.14333006739616394,
0.05421975627541542,
-0.19625653326511383,
-0.04540500044822693,
0.04727938398718834,
-0.024236319586634636,
-0.2711784541606903,
0.08949348330497742,
-0.11158652603626251,
0.028831182047724724,
0.058663517236709595,
-0.0633697509765625,
0.08821311593055725,
0.17818601429462433,
-0.1778179556131363,
-0.04719695821404457,
0.011360198259353638,
-0.02320418506860733,
0.0016349657671526074,
0.19753184914588928,
0.04637063294649124,
-0.2754429876804352,
-0.11729507893323898,
-0.03867683559656143,
-0.05770222842693329,
-0.007005403749644756,
0.03186383843421936,
0.009708268567919731,
0.1007198840379715,
-0.04769065976142883,
0.04658704623579979,
0.0041491747833788395,
-0.13047286868095398,
-0.09528879076242447,
0.10152417421340942,
0.10788503289222717,
0.06673584878444672,
0.016944976523518562,
-0.13221342861652374,
-0.08231092989444733,
0.04658619686961174,
0.04054350405931473,
-0.03808412328362465,
0.06360553205013275,
0.2134394645690918,
-0.020257068797945976,
0.05134811997413635,
0.07071542739868164,
-0.11997086554765701,
-0.059632670134305954,
-0.2071870118379593,
-0.05564308166503906,
0.022502398118376732,
0.24137245118618011,
-0.10976356267929077,
0.009907691739499569,
0.03797469288110733,
0.15688978135585785,
0.05804300308227539,
0.006822077091783285,
-0.10870490223169327,
0.03331480920314789,
-0.2874544858932495,
0.1649780124425888,
0.13060541450977325,
0.1247195154428482,
0.03810572624206543,
0.03299364075064659,
0.06521221995353699,
-0.013865921646356583,
0.22321249544620514,
0.06081882119178772,
-0.0497649721801281,
0.0023148157633841038,
-0.015010702423751354,
-0.1481027603149414,
-0.0895446166396141,
0.1752283126115799,
0.07081472873687744,
0.004905251320451498,
-0.009673326276242733,
-0.10002832114696503,
0.005265647545456886,
-0.03081917203962803,
-0.0630713552236557,
0.11952220648527145,
-0.08747202157974243,
-0.013683289289474487,
-0.2544495761394501,
-0.11635951697826385,
-0.0839804857969284,
-0.09359250962734222,
0.12038150429725647,
0.012043449096381664,
-0.08158397674560547,
0.10671254247426987,
-0.07418230921030045,
-0.002984818071126938,
0.003792849835008383,
0.004732294473797083,
-0.015619003213942051,
0.19534599781036377,
0.006485250778496265,
0.06087225675582886,
0.06595499813556671,
0.309548020362854,
-0.13280807435512543,
-0.3135280907154083,
-0.11183872818946838,
-0.23022469878196716,
0.03229863569140434,
-0.06361915916204453,
0.006190950516611338,
0.019373610615730286,
-0.018994823098182678,
0.07553985714912415,
-0.010767334140837193,
0.15073978900909424,
-0.013188627548515797,
0.0036402111873030663,
-0.053830500692129135,
-0.06933221966028214,
0.08810396492481232,
-0.07083173841238022,
-0.03343577682971954,
0.13841454684734344,
0.08053582906723022,
0.05304399132728577,
-0.02977396920323372,
-0.11795692890882492,
-0.11532317101955414,
-0.0761696845293045,
0.02726033329963684,
-0.05362728610634804,
-0.14386707544326782,
0.2378593385219574,
-0.09686043113470078,
-0.04212399572134018,
0.14213430881500244,
0.03121235966682434,
0.0577157661318779,
-0.11727368086576462,
-0.07538224756717682,
0.054963935166597366,
0.16320517659187317,
-0.009519773535430431,
-0.09421837329864502,
-0.0607006810605526,
-0.0744827538728714,
0.30607154965400696,
-0.2381335198879242,
-0.10077220946550369,
-0.1432434469461441,
0.0615835003554821,
0.11065487563610077,
0.06454989314079285,
-0.03783995658159256,
-0.1527949571609497,
0.06818754971027374,
0.03401072323322296,
-0.07239048182964325,
0.06469513475894928,
0.01063225045800209,
-0.048358235508203506,
0.1801096349954605,
0.11339366436004639,
0.042085882276296616,
-0.10150887817144394,
0.15881744027137756,
-0.07386786490678787,
-0.1358778178691864,
0.0566125251352787,
-0.224907785654068,
0.05129724368453026,
-0.07036367058753967,
0.08293938636779785,
-0.1300879567861557,
0.11305899918079376,
-0.17862318456172943,
-0.07336653769016266,
0.12487935274839401,
-0.06086045503616333,
0.1771639883518219,
0.028339272364974022,
-0.19867901504039764,
-0.044420670717954636,
0.05784611031413078,
-0.0580909289419651,
0.011476428247988224,
0.03458937630057335,
-0.026362482458353043,
0.1692832112312317,
-0.09384491294622421,
0.03565322235226631,
0.13551613688468933,
-0.033211857080459595,
-0.06411071866750717,
0.04800782352685928,
-0.20339645445346832,
-0.018122809007763863,
0.14342288672924042,
0.17146141827106476,
0.057900410145521164,
-0.09225519001483917,
-0.09717647731304169,
-0.14395609498023987,
0.11374184489250183,
0.09013763815164566,
0.08010534197092056,
0.05009010434150696,
-0.1907251477241516,
-0.24100558459758759,
-0.09111447632312775,
-0.006593771744519472,
0.14130845665931702,
0.03149275481700897,
-0.08580344915390015,
-0.13195697963237762,
-0.19843921065330505,
0.05142996832728386,
0.11529836058616638,
0.0805816501379013,
0.14669424295425415,
-0.011658316478133202,
-2.4574485230211463e-32,
0.03734322637319565,
-0.013150637969374657,
-0.10161223262548447,
0.019050540402531624,
-0.10124821215867996,
0.09821989387273788,
0.012436684221029282,
-0.0011355936294421554,
-0.09124617278575897,
-0.19501015543937683,
-0.05688760057091713,
-0.1085880845785141,
0.0512273944914341,
-0.011119652539491653,
-0.2593870759010315,
-0.011558198370039463,
-0.13294857740402222,
-0.15692175924777985,
0.0010870224796235561,
0.1161278560757637,
0.06290823221206665,
-0.16812609136104584,
-0.08875304460525513,
0.0107748843729496,
-0.011544572189450264,
-0.1478390097618103,
-0.05902465432882309,
-0.030669286847114563,
0.07187601923942566,
0.0733124241232872,
-0.06231621652841568,
0.10318837314844131,
-0.11431319266557693,
-0.024088159203529358,
-0.08645836263895035,
-0.09854397922754288,
-0.15946891903877258,
0.00037893548142164946,
-0.12881235778331757,
0.03730934485793114,
-0.008345422334969044,
0.03367350250482559,
-0.1896776258945465,
0.10090010613203049,
0.010480735450983047,
-0.0017588906921446323,
0.005737432278692722,
0.041181910783052444,
0.038504548370838165,
-0.03342676907777786,
-0.08562418818473816,
0.04712133854627609,
-0.03691168129444122,
0.1143084168434143,
0.08417375385761261,
0.12311629205942154,
0.02912810817360878,
0.170650914311409,
-0.01114867627620697,
-0.0887361392378807,
-0.03994433954358101,
-0.22194990515708923,
0.24319443106651306,
0.13139182329177856,
0.13090677559375763,
-0.13771702349185944,
0.2950526177883148,
0.1143425703048706,
-0.08371558040380478,
-0.116428904235363,
0.1171528697013855,
0.19451166689395905,
-0.012947444804012775,
-0.04692652449011803,
-0.22300168871879578,
-0.18870972096920013,
-0.006284355651587248,
-0.08784160763025284,
0.09882370382547379,
-0.05485892295837402,
0.18151476979255676,
-0.18909244239330292,
0.1008448600769043,
-0.05859961733222008,
-0.19202251732349396,
0.05534171685576439,
0.004994847346097231,
-0.00013479386689141393,
-0.10958337038755417,
-0.06895885616540909,
-0.12146800011396408,
0.031033869832754135,
-0.11536593735218048,
0.008842608891427517,
-0.10765963792800903,
0.12051796168088913,
-0.1494600623846054,
-0.0021478242706507444,
-0.0012116516008973122,
0.058879751712083817,
-0.14804014563560486,
-0.08120648562908173,
0.12947800755500793,
-0.010100200772285461,
-0.0424506776034832,
-0.009461289271712303,
0.04133002087473869,
-0.1349995881319046,
-0.1098983958363533,
0.06756837666034698,
-0.008178455755114555,
0.21711139380931854,
0.1510733962059021,
-0.05373474955558777,
0.15317033231258392,
0.0493825264275074,
-0.09737736731767654,
-0.01902526244521141,
0.019691692665219307,
0.1651054173707962,
-0.16279754042625427,
0.07859159260988235,
-0.1976652294397354,
0.18771611154079437,
0.046074725687503815,
-0.006042622961103916,
-0.13782867789268494,
-0.08872371166944504,
0.04274950549006462,
-0.08822976797819138,
0.036180220544338226,
-0.2339753955602646,
7.186408197412675e-7,
-0.22057223320007324,
0.13505229353904724,
-0.0294115599244833,
-0.12054301798343658,
-0.08203747123479843,
-0.005487700458616018,
-0.1918012946844101,
0.04478243738412857,
-0.034506868571043015,
0.08734172582626343,
-0.05754733085632324,
0.17174002528190613,
-0.22978197038173676,
-0.05827632546424866,
0.12290854752063751,
-0.007097416091710329,
-0.04290876165032387,
-0.0926809310913086,
-0.08285469561815262,
-0.1138889342546463,
-0.18456916511058807,
0.10567094385623932,
0.14813469350337982,
0.04002964124083519,
0.11852136999368668,
0.019082769751548767,
0.01978270150721073,
0.04638182371854782,
0.05594666302204132,
0.07532656937837601,
-0.05347631126642227,
0.12337630987167358,
-0.0401264950633049,
0.1878841519355774,
0.08378619700670242,
-0.07425972819328308,
-0.12108707427978516,
0.046735987067222595,
0.034694600850343704,
-0.07466199994087219,
0.08095669001340866,
0.03428648039698601,
0.13214749097824097,
-0.12829403579235077,
0.041780102998018265,
0.10038245469331741,
-0.05894559994339943,
0.00034249990130774677,
-0.07336287200450897,
-0.07662269473075867,
0.026968469843268394,
-0.012185021303594112,
0.03179981932044029,
0.07109629362821579,
-0.15729443728923798,
-0.07863813638687134,
-0.00395014975219965,
-0.0787288248538971,
0.2018904685974121,
-0.0024484347086399794,
0.09730669111013412,
-0.19205062091350555,
-0.02848912961781025,
-0.00434356601908803,
-0.032965417951345444,
0.10453347116708755,
0.0895005539059639,
4.5096104504447823e-35,
-0.15028008818626404,
-0.019212186336517334,
-0.04447522014379501,
-0.0993095338344574,
0.13188929855823517,
-0.1889444887638092,
0.08484937995672226,
0.11905618757009506,
0.038544587790966034,
0.00024977585417218506,
0.016605684533715248
] |
https://github.com/huggingface/datasets/issues/6032 | DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info | @mariosasko are you saying if I do the following:
```
def backend_factory() -> requests.Session:
session = requests.Session()
session.proxies = {
"https": "127.0.0.1:8887",
"http": "127.0.0.1:8887",
}
session.verify = "/etc/ssl/certs/ca-certificates.crt"
return session
# Set it as the default session factory
configure_http_backend(backend_factory=backend_factory)
```
which works nicely with transformer library:
```
def download_gpt_2_model():
tokenizer = GPT2Tokenizer.from_pretrained(
"gpt2", force_download=True, resume_download=False
)
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors="pt")
print(encoded_input)
model = GPT2Model.from_pretrained(
"gpt2", force_download=True, resume_download=False
)
output = model(**encoded_input)
```
should work for datasets library as well ?
In my case if I just do:
```
def download_sts12_sts_dataset():
dataset = load_dataset(
"mteb/sts12-sts",
download_mode="force_redownload",
verification_mode="basic_checks",
revision="main",
)
```
I am getting:
`ConnectionError: Couldn't reach https://huggingface.co/datasets/mteb/sts12-sts/resolve/main/dataset_infos.json (ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /datasets/mteb/sts12-sts/resolve/main/dataset_infos.json (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f429e87a3a0>, 'Connection to huggingface.co timed out. (connect timeout=100)'))")))`
which is typical when the proxy server is not defined. Looks like what is set in configure_http_backend(backend_factory=backend_factory) is ignore.
If I use env variable instead, it is working
```
def download_sts12_sts_dataset():
os.environ["https_proxy"] = "127.0.0.1:8887"
os.environ["http_proxy"] = "127.0.0.1:8887"
os.environ["REQUESTS_CA_BUNDLE"] = "/etc/ssl/certs/ca-certificates.crt"
dataset = load_dataset(
"mteb/sts12-sts",
download_mode="force_redownload",
verification_mode="basic_checks",
revision="main",
)
```
Should I add something ?
I am using `huggingface_hub 0.15.1`, `datasets 2.13.0`, `transformers 4.30.2` | ### Describe the bug
```python
download_config = DownloadConfig(proxies={'https': '<my proxy>'})
builder = load_dataset_builder(..., download_config=download_config)
```
But, when getting the dataset_info from HfApi, the http requests not using the proxies.
### Steps to reproduce the bug
1. Setup proxies in DownloadConfig.
2. Call `load_dataset_build` with download_config.
3. Inspect the call stack in HfApi.dataset_info.
![image](https://github.com/huggingface/datasets/assets/138426806/33e538a8-2e22-4e63-b634-343febe5324b)
### Expected behavior
DownloadConfig.proxies works for getting dataset_info.
### Environment info
https://github.com/huggingface/datasets/commit/406b2212263c0d33f267e35b917f410ff6b3bc00
Python 3.11.4 | 199 | DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info
### Describe the bug
```python
download_config = DownloadConfig(proxies={'https': '<my proxy>'})
builder = load_dataset_builder(..., download_config=download_config)
```
But, when getting the dataset_info from HfApi, the http requests not using the proxies.
### Steps to reproduce the bug
1. Setup proxies in DownloadConfig.
2. Call `load_dataset_build` with download_config.
3. Inspect the call stack in HfApi.dataset_info.
![image](https://github.com/huggingface/datasets/assets/138426806/33e538a8-2e22-4e63-b634-343febe5324b)
### Expected behavior
DownloadConfig.proxies works for getting dataset_info.
### Environment info
https://github.com/huggingface/datasets/commit/406b2212263c0d33f267e35b917f410ff6b3bc00
Python 3.11.4
@mariosasko are you saying if I do the following:
```
def backend_factory() -> requests.Session:
session = requests.Session()
session.proxies = {
"https": "127.0.0.1:8887",
"http": "127.0.0.1:8887",
}
session.verify = "/etc/ssl/certs/ca-certificates.crt"
return session
# Set it as the default session factory
configure_http_backend(backend_factory=backend_factory)
```
which works nicely with transformer library:
```
def download_gpt_2_model():
tokenizer = GPT2Tokenizer.from_pretrained(
"gpt2", force_download=True, resume_download=False
)
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors="pt")
print(encoded_input)
model = GPT2Model.from_pretrained(
"gpt2", force_download=True, resume_download=False
)
output = model(**encoded_input)
```
should work for datasets library as well ?
In my case if I just do:
```
def download_sts12_sts_dataset():
dataset = load_dataset(
"mteb/sts12-sts",
download_mode="force_redownload",
verification_mode="basic_checks",
revision="main",
)
```
I am getting:
`ConnectionError: Couldn't reach https://huggingface.co/datasets/mteb/sts12-sts/resolve/main/dataset_infos.json (ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /datasets/mteb/sts12-sts/resolve/main/dataset_infos.json (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f429e87a3a0>, 'Connection to huggingface.co timed out. (connect timeout=100)'))")))`
which is typical when the proxy server is not defined. Looks like what is set in configure_http_backend(backend_factory=backend_factory) is ignore.
If I use env variable instead, it is working
```
def download_sts12_sts_dataset():
os.environ["https_proxy"] = "127.0.0.1:8887"
os.environ["http_proxy"] = "127.0.0.1:8887"
os.environ["REQUESTS_CA_BUNDLE"] = "/etc/ssl/certs/ca-certificates.crt"
dataset = load_dataset(
"mteb/sts12-sts",
download_mode="force_redownload",
verification_mode="basic_checks",
revision="main",
)
```
Should I add something ?
I am using `huggingface_hub 0.15.1`, `datasets 2.13.0`, `transformers 4.30.2` | [
-0.020367858931422234,
0.10389825701713562,
-0.01189255528151989,
0.07335267215967178,
0.21962915360927582,
-0.019307123497128487,
0.1643337905406952,
-0.03806951642036438,
-0.08235877007246017,
0.13244733214378357,
-0.1358402967453003,
-0.14262589812278748,
0.09408798068761826,
-0.04573040455579758,
0.13018658757209778,
0.04995067045092583,
-0.05844304338097572,
0.12678246200084686,
-0.12365706264972687,
-0.007635566405951977,
-0.06674877554178238,
0.12928465008735657,
0.10860872268676758,
-0.14105723798274994,
0.15222421288490295,
0.0724724605679512,
-0.012146258726716042,
-0.013344383798539639,
0.07087395340204239,
0.009035084396600723,
0.2853379547595978,
0.22952786087989807,
0.027143608778715134,
0.03085540421307087,
0.000005187331225897651,
0.1034134179353714,
0.1691039800643921,
0.01085936650633812,
-0.014129330404102802,
0.049124736338853836,
-0.07425684481859207,
0.03448580577969551,
-0.027355261147022247,
-0.006004194729030132,
-0.14968109130859375,
0.10370641201734543,
-0.14568103849887848,
-0.03293321654200554,
0.0016631899634376168,
-0.163511723279953,
-0.028151847422122955,
0.09529934078454971,
0.05134723335504532,
-0.07315763086080551,
0.07399018108844757,
0.08632557094097137,
0.028531942516565323,
0.027497606351971626,
-0.09199729561805725,
-0.1010683998465538,
0.20113413035869598,
-0.045881275087594986,
0.08552705496549606,
0.19150321185588837,
-0.03881536424160004,
-0.11035662144422531,
-0.13274510204792023,
-0.22588779032230377,
0.08313899487257004,
0.30039316415786743,
0.10690554976463318,
-0.11764387041330338,
-0.22554802894592285,
0.13952869176864624,
-0.00026427654665894806,
-0.023969562724232674,
-0.01370163168758154,
0.11499418318271637,
-0.1329425722360611,
0.08012749999761581,
-0.06092904135584831,
-0.1561923623085022,
-0.043177276849746704,
0.11186547577381134,
-0.029628926888108253,
0.017231937497854233,
0.05804956331849098,
0.06507468968629837,
-0.0390903539955616,
-0.030693471431732178,
0.10110513120889664,
-0.06032365933060646,
-0.02327730506658554,
-0.01245098002254963,
0.08832535147666931,
0.11177783459424973,
0.10061715543270111,
0.09929835051298141,
0.03816840425133705,
0.2046622633934021,
-0.08824266493320465,
0.024765094742178917,
-0.10696146637201309,
0.06513430178165436,
-0.031193291768431664,
-0.10750965774059296,
-0.12653633952140808,
-0.03455581143498421,
0.1744280308485031,
0.07534973323345184,
0.104448102414608,
-0.017945682629942894,
-0.055382613092660904,
0.16702499985694885,
-0.042908184230327606,
-0.01979469507932663,
0.006848276127129793,
0.07079347223043442,
-0.10416289418935776,
-0.05713968351483345,
0.16377311944961548,
0.10682915896177292,
-0.08319972455501556,
0.20863988995552063,
-0.10116105526685715,
-0.07000771164894104,
-0.07721555978059769,
0.05112211033701897,
-0.12326616048812866,
-0.05947360023856163,
-0.04542958363890648,
-0.029220957309007645,
0.015277691185474396,
0.002915839431807399,
0.1019640564918518,
0.0725385844707489,
0.1070740595459938,
-0.16561225056648254,
0.06771740317344666,
-0.09440137445926666,
0.12883752584457397,
-0.07403846830129623,
-0.03258812800049782,
0.11600475013256073,
0.23245015740394592,
0.0073775663040578365,
-0.09117910265922546,
0.030968835577368736,
-0.011330008506774902,
0.07229400426149368,
0.0005444257403723896,
0.12053981423377991,
-0.1743273288011551,
0.015556616708636284,
-0.12616345286369324,
0.04083402827382088,
0.001676453510299325,
0.06956131011247635,
-0.022660916671156883,
0.025192255154252052,
0.1258033812046051,
-0.07249550521373749,
0.10505488514900208,
-0.11559192091226578,
0.44524890184402466,
0.27985090017318726,
0.08508370816707611,
-0.08804603666067123,
0.1493108868598938,
-0.28739142417907715,
0.1595006287097931,
-0.08868210017681122,
-0.035831891000270844,
-0.1241922602057457,
-0.17335855960845947,
0.0367901585996151,
0.011332396417856216,
-0.042267315089702606,
-0.19265669584274292,
0.12037516385316849,
0.10064644366502762,
-0.00903979130089283,
0.07097874581813812,
0.0006990220281295478,
0.10279722511768341,
-0.017813876271247864,
-0.08649113029241562,
0.06984907388687134,
-0.029511749744415283,
0.06593488901853561,
0.0030785936396569014,
-0.13146880269050598,
0.013924075290560722,
-0.05211803317070007,
-0.06068550795316696,
0.08873756974935532,
-0.08924068510532379,
-0.0937705710530281,
0.21892820298671722,
-0.0018214820884168148,
0.10016348212957382,
-0.09108765423297882,
-0.07879562675952911,
0.07955619692802429,
0.08488079160451889,
0.11688322573900223,
-0.06925532966852188,
0.1536678969860077,
-0.06708475202322006,
-0.055223286151885986,
-0.35562434792518616,
0.07287541031837463,
-0.17437784373760223,
0.007927126251161098,
-0.23718392848968506,
-0.14324264228343964,
-0.07878284901380539,
0.05717778950929642,
-0.019421851262450218,
0.23293739557266235,
-0.0018266848055645823,
0.3369358777999878,
0.19804160296916962,
0.025669025257229805,
0.15552324056625366,
0.13253137469291687,
0.10781611502170563,
-0.01863955520093441,
0.048869989812374115,
0.0010143551044166088,
0.02687157690525055,
-0.0664675310254097,
0.09826947748661041,
0.3160599172115326,
-0.09431901574134827,
0.24121709167957306,
-0.06245875358581543,
-0.1505478173494339,
0.051376763731241226,
-0.11002122610807419,
0.04417210444808006,
0.007815402001142502,
0.03743615746498108,
0.10569766908884048,
0.0907423347234726,
-0.13681235909461975,
0.08614297956228256,
-0.05613153055310249,
-0.043317876756191254,
-0.038881123065948486,
0.24936094880104065,
0.01990910992026329,
-0.10176897794008255,
0.19704845547676086,
-0.07258199155330658,
-0.06763755530118942,
0.2506001889705658,
0.00390035193413496,
-0.10416170209646225,
-0.026190442964434624,
0.20594008266925812,
0.011214165017008781,
0.07867306470870972,
0.16049721837043762,
0.08000413328409195,
-0.11827266216278076,
0.17993617057800293,
0.10471837222576141,
0.007298145908862352,
-0.06994236260652542,
-0.011996566317975521,
0.09735347330570221,
-0.14962367713451385,
-0.133677676320076,
0.10603508353233337,
-0.05598601698875427,
-0.07280372828245163,
-0.033321313560009,
0.08409172296524048,
0.10621379315853119,
-0.0014174359384924173,
0.06331319361925125,
0.01549004390835762,
-0.05793267488479614,
0.08633137494325638,
0.004487801343202591,
-0.09500999748706818,
0.090009406208992,
-0.15693922340869904,
0.038175810128450394,
0.0649053230881691,
-0.07556916028261185,
-0.05974128469824791,
-0.09763815999031067,
0.06159093976020813,
-0.2557423412799835,
-0.1638914793729782,
-0.03571111708879471,
0.13334552943706512,
0.1255146712064743,
-0.024954646825790405,
0.04307812079787254,
0.01598004810512066,
-0.13768237829208374,
-0.032678697258234024,
-0.03803076222538948,
0.12898652255535126,
-0.1334228664636612,
-0.09149550646543503,
-0.1366439014673233,
0.08147818595170975,
-0.011125683784484863,
0.11475266516208649,
0.0077913240529596806,
-0.08970682322978973,
0.04378766939043999,
-0.008498508483171463,
0.05286812782287598,
0.14361907541751862,
0.05145864561200142,
0.06401429325342178,
-0.06270069628953934,
-0.18913835287094116,
0.18889474868774414,
0.06389615684747696,
-0.04216109588742256,
-0.13797031342983246,
-0.11250818520784378,
-0.06882891803979874,
-0.08402486145496368,
0.0814603641629219,
-0.14462539553642273,
0.035142719745635986,
-0.22774003446102142,
0.023593325167894363,
0.0034161568619310856,
-0.028096791356801987,
-0.24151451885700226,
0.14157089591026306,
-0.1009187176823616,
0.044801101088523865,
0.06275711953639984,
-0.10773513466119766,
0.15883328020572662,
0.16341324150562286,
-0.17894531786441803,
-0.03355799615383148,
0.023002639412879944,
-0.12324988096952438,
0.004047255031764507,
0.1327877938747406,
0.12072744220495224,
-0.2887946367263794,
-0.10276510566473007,
-0.06968484073877335,
-0.0866406038403511,
0.038711853325366974,
0.01524760015308857,
0.03167222440242767,
0.07840403914451599,
-0.03788650035858154,
0.04634350910782814,
0.02312532812356949,
-0.1365797221660614,
-0.13420718908309937,
0.042640578001737595,
0.10850433260202408,
0.008231409825384617,
0.1356564164161682,
-0.066011942923069,
-0.09062330424785614,
0.01145963929593563,
0.00010640171240083873,
-0.02002236619591713,
0.007655366323888302,
0.09385452419519424,
-0.04645392671227455,
0.08309554308652878,
-0.00022128138516563922,
-0.10660295933485031,
-0.09482687711715698,
-0.19479408860206604,
-0.07834295183420181,
0.04526246339082718,
0.18996284902095795,
-0.1004987582564354,
0.03602946549654007,
0.02827199175953865,
0.08403151482343674,
0.11727675795555115,
-0.02864743210375309,
-0.17167550325393677,
0.06129086762666702,
-0.19932277500629425,
0.24272207915782928,
0.11322776228189468,
0.1470113843679428,
-0.0046923840418457985,
0.03998617082834244,
0.0290379635989666,
-0.06584779173135757,
0.24236921966075897,
0.0540136843919754,
-0.02995017170906067,
0.0959201380610466,
-0.04750679433345795,
-0.04531709477305412,
-0.15267060697078705,
0.16721639037132263,
0.002217810368165374,
-0.00495360791683197,
-0.03419305756688118,
-0.15885552763938904,
0.09134336560964584,
0.005162105429917574,
-0.0663670226931572,
0.11356455832719803,
-0.06998828798532486,
-0.0423816442489624,
-0.2986255884170532,
-0.16699092090129852,
-0.05595093593001366,
-0.055716224014759064,
0.12544730305671692,
-0.04626871272921562,
-0.12619617581367493,
0.11859001219272614,
-0.05809468775987625,
-0.03714379668235779,
-0.007818715646862984,
0.013908655382692814,
-0.038838546723127365,
0.1773267686367035,
-0.02512432634830475,
0.01968056708574295,
0.05541063845157623,
0.3388642370700836,
-0.09923501312732697,
-0.2274399995803833,
-0.030753977596759796,
-0.2476082593202591,
0.022888869047164917,
-0.13734720647335052,
0.00795778539031744,
0.005253613460808992,
-0.0495404377579689,
0.06250236183404922,
-0.018404316157102585,
0.10933423042297363,
-0.05398987978696823,
-0.0313640721142292,
-0.12312354892492294,
-0.15724796056747437,
0.10135314613580704,
-0.07463844120502472,
-0.040159571915864944,
0.1334468275308609,
-0.03861115127801895,
0.08837175369262695,
-0.022301383316516876,
-0.09699158370494843,
-0.1042863130569458,
-0.07413787394762039,
0.04706914350390434,
0.00821119174361229,
-0.031606029719114304,
0.22346249222755432,
-0.12859657406806946,
-0.10090281069278717,
0.09734593331813812,
0.06052643805742264,
0.025676419958472252,
-0.13268695771694183,
-0.07150077074766159,
0.07028582692146301,
0.10722959786653519,
-0.0433787927031517,
-0.05674399062991142,
-0.06497935950756073,
-0.005312058143317699,
0.2674548625946045,
-0.12740182876586914,
-0.017528517171740532,
-0.0018323070835322142,
0.07402802258729935,
0.12113084644079208,
0.031840428709983826,
-0.0003995810984633863,
-0.14581520855426788,
0.03411208838224411,
0.07395939528942108,
-0.10725915431976318,
0.11079907417297363,
-0.05687824264168739,
-0.0336732380092144,
0.09143843501806259,
0.04278896749019623,
0.053209010511636734,
-0.12021242827177048,
0.19695429503917694,
-0.08015317469835281,
-0.15478520095348358,
0.1257549375295639,
-0.23879565298557281,
0.09664199501276016,
-0.004328803159296513,
0.11226941645145416,
-0.12561434507369995,
0.09139082580804825,
-0.17510153353214264,
-0.036880530416965485,
0.18449681997299194,
-0.10161062330007553,
0.1378600299358368,
-0.02275112085044384,
-0.13577726483345032,
-0.050947099924087524,
0.05053360387682915,
-0.06775598973035812,
-0.038661763072013855,
0.03272088244557381,
-0.03556564822793007,
0.1740870624780655,
-0.0784899890422821,
0.059011753648519516,
0.09941072762012482,
-0.0360105074942112,
-0.06686713546514511,
0.04561087489128113,
-0.19526182115077972,
0.001278046634979546,
0.18034976720809937,
0.1287805438041687,
0.07291527837514877,
-0.13897988200187683,
-0.08995049446821213,
-0.19475194811820984,
0.12013223022222519,
0.11885234713554382,
0.08950085192918777,
0.05593658611178398,
-0.2079695463180542,
-0.2523190379142761,
-0.11628417670726776,
0.08977088332176208,
0.11774929612874985,
0.026332294568419456,
-0.0067923953756690025,
-0.16840507090091705,
-0.2593403458595276,
0.040113452821969986,
0.003255235031247139,
0.11591460555791855,
0.1344764083623886,
-0.04011007025837898,
-2.3846297336603765e-32,
0.019746892154216766,
0.0324438214302063,
-0.07225865870714188,
0.08644251525402069,
-0.10732915997505188,
0.055083636194467545,
0.030721373856067657,
-0.03411156311631203,
-0.08454462885856628,
-0.15634667873382568,
-0.021324660629034042,
-0.08005381375551224,
0.05646757408976555,
-0.0009151857229880989,
-0.23049968481063843,
-0.026290394365787506,
-0.113383948802948,
-0.1519019901752472,
-0.016321444883942604,
0.07545100897550583,
-0.00995488278567791,
-0.19753025472164154,
-0.01568342000246048,
0.003050990402698517,
-0.029574871063232422,
-0.2350815385580063,
-0.06978880614042282,
-0.07665938138961792,
0.023883817717432976,
0.1255858987569809,
-0.015048449859023094,
0.1675684154033661,
-0.08621570467948914,
-0.09238278120756149,
-0.10519448667764664,
-0.11079490184783936,
-0.09138575196266174,
0.012509346939623356,
-0.20712704956531525,
0.06766139715909958,
-0.05898645147681236,
-0.014947456307709217,
-0.17383445799350739,
0.05801042914390564,
-0.02577800489962101,
0.042659059166908264,
0.025067966431379318,
0.04542836919426918,
0.07156255096197128,
-0.00919837411493063,
-0.09587407112121582,
0.005076670553535223,
-0.028117656707763672,
0.11044783890247345,
0.06726989895105362,
0.11111000925302505,
0.02008700929582119,
0.1778794229030609,
-0.08681770414113998,
-0.06325457245111465,
0.06599292904138565,
-0.24512408673763275,
0.23300716280937195,
0.11817906051874161,
0.09581972658634186,
-0.2388206422328949,
0.35111185908317566,
0.1337147206068039,
-0.08697760105133057,
-0.08701127022504807,
0.07446238398551941,
0.20636020600795746,
-0.024497579783201218,
-0.07113970071077347,
-0.18833127617835999,
-0.2101973444223404,
0.013939134776592255,
-0.08142638206481934,
-0.01553131453692913,
0.0371558777987957,
0.1392269730567932,
-0.17038163542747498,
0.12124763429164886,
-0.05595659837126732,
-0.22104524075984955,
0.022483425214886665,
0.0242395531386137,
0.05636974796652794,
-0.10235028713941574,
-0.07450249791145325,
-0.053706537932157516,
-0.001885953708551824,
-0.14164452254772186,
-0.047858115285634995,
-0.08762962371110916,
0.08655208349227905,
-0.21840986609458923,
-0.013764324598014355,
-0.02256634831428528,
0.05068553239107132,
-0.11130745708942413,
-0.11917255818843842,
0.1356102079153061,
-0.01650097407400608,
-0.05522499606013298,
0.03261016681790352,
0.0461801253259182,
-0.18007348477840424,
-0.1264164298772812,
0.10586024075746536,
-0.06976664066314697,
0.19837158918380737,
0.1496717929840088,
-0.05551616847515106,
0.18246521055698395,
0.062116529792547226,
-0.0805865228176117,
0.0063436562195420265,
0.013516542501747608,
0.15092182159423828,
-0.17258569598197937,
0.08761801570653915,
-0.1388406604528427,
0.17943592369556427,
0.050886835902929306,
0.025598201900720596,
-0.09466394037008286,
-0.1510956585407257,
0.07999985665082932,
-0.04668942466378212,
0.06065189465880394,
-0.20156769454479218,
7.15274723006587e-7,
-0.24863658845424652,
0.07763317227363586,
-0.044840820133686066,
-0.09105084836483002,
-0.0902705118060112,
0.03293851763010025,
-0.20540323853492737,
0.08690477162599564,
-0.07411497086286545,
0.03861130028963089,
-0.03300778567790985,
0.19777052104473114,
-0.23046517372131348,
-0.03219619020819664,
0.13410721719264984,
-0.019410794600844383,
-0.02884548529982567,
-0.036642029881477356,
-0.11885695904493332,
-0.11701224744319916,
-0.2054249793291092,
0.1224130243062973,
0.15488013625144958,
0.041534796357154846,
0.0807049423456192,
0.049155812710523605,
0.009991305880248547,
0.014259930700063705,
0.024676617234945297,
0.10935118794441223,
-0.017116259783506393,
0.2471913993358612,
-0.0472787506878376,
0.22670488059520721,
0.14285340905189514,
-0.04410494118928909,
-0.1285775601863861,
0.017035676166415215,
0.05732062831521034,
-0.11260299384593964,
0.059532828629016876,
0.06987182050943375,
0.16674862802028656,
-0.04710008203983307,
0.0350612998008728,
0.10133841633796692,
-0.04371918365359306,
-0.05919315665960312,
-0.08736585080623627,
-0.05275287106633186,
0.09449395537376404,
0.022316429764032364,
0.01229159627109766,
0.011720862239599228,
-0.18588711321353912,
-0.05042959749698639,
-0.08467927575111389,
-0.12022724747657776,
0.23603111505508423,
-0.058293286710977554,
0.05218392238020897,
-0.14957572519779205,
-0.004126834217458963,
-0.08169029653072357,
0.05493636429309845,
0.15674182772636414,
0.10479980707168579,
-1.4694557562210605e-35,
-0.11991320550441742,
-0.010592633858323097,
0.01583547703921795,
-0.06734908372163773,
0.18557463586330414,
-0.19428609311580658,
0.07227721810340881,
0.0903390571475029,
0.00842192955315113,
0.009037910029292107,
-0.054783280938863754
] |
https://github.com/huggingface/datasets/issues/6032 | DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info | `huggingface_hub.configure_http_backend` works for `transformers` because they only use the `huggingface_hub` lib for downloads. Our download logic is a bit more complex (e.g., we also support downloading non-Hub files), so we are not aligned with them yet. In the meantime, it's best to use the env vars. | ### Describe the bug
```python
download_config = DownloadConfig(proxies={'https': '<my proxy>'})
builder = load_dataset_builder(..., download_config=download_config)
```
But, when getting the dataset_info from HfApi, the http requests not using the proxies.
### Steps to reproduce the bug
1. Setup proxies in DownloadConfig.
2. Call `load_dataset_build` with download_config.
3. Inspect the call stack in HfApi.dataset_info.
![image](https://github.com/huggingface/datasets/assets/138426806/33e538a8-2e22-4e63-b634-343febe5324b)
### Expected behavior
DownloadConfig.proxies works for getting dataset_info.
### Environment info
https://github.com/huggingface/datasets/commit/406b2212263c0d33f267e35b917f410ff6b3bc00
Python 3.11.4 | 46 | DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info
### Describe the bug
```python
download_config = DownloadConfig(proxies={'https': '<my proxy>'})
builder = load_dataset_builder(..., download_config=download_config)
```
But, when getting the dataset_info from HfApi, the http requests not using the proxies.
### Steps to reproduce the bug
1. Setup proxies in DownloadConfig.
2. Call `load_dataset_build` with download_config.
3. Inspect the call stack in HfApi.dataset_info.
![image](https://github.com/huggingface/datasets/assets/138426806/33e538a8-2e22-4e63-b634-343febe5324b)
### Expected behavior
DownloadConfig.proxies works for getting dataset_info.
### Environment info
https://github.com/huggingface/datasets/commit/406b2212263c0d33f267e35b917f410ff6b3bc00
Python 3.11.4
`huggingface_hub.configure_http_backend` works for `transformers` because they only use the `huggingface_hub` lib for downloads. Our download logic is a bit more complex (e.g., we also support downloading non-Hub files), so we are not aligned with them yet. In the meantime, it's best to use the env vars. | [
0.0011402791133150458,
0.026102861389517784,
-0.02005450800061226,
0.059409789741039276,
0.24642100930213928,
0.012556255795061588,
0.1337306946516037,
-0.006732315290719271,
-0.014675873331725597,
0.15608692169189453,
-0.1673956960439682,
-0.12079071998596191,
0.058982446789741516,
-0.02257286198437214,
0.10438049584627151,
0.05105413496494293,
-0.07901354134082794,
0.05866849049925804,
-0.1654457449913025,
-0.028951453045010567,
-0.03993278369307518,
0.16409316658973694,
0.10524097830057144,
-0.12310760468244553,
0.11648909002542496,
0.06994929164648056,
-0.036346688866615295,
0.052070047706365585,
-0.03948875889182091,
0.016891589388251305,
0.3581383228302002,
0.1912859082221985,
0.017101610079407692,
0.025148428976535797,
0.000005466621587402187,
0.09462275356054306,
0.14538651704788208,
0.0015749582089483738,
0.011628015898168087,
0.007571852765977383,
-0.03597471863031387,
0.019498636946082115,
0.02394861727952957,
0.00936688482761383,
-0.07501062750816345,
0.12446454167366028,
-0.10879689455032349,
-0.008210403844714165,
-0.047025274485349655,
-0.12899132072925568,
0.003674727864563465,
0.22098538279533386,
-0.033785320818424225,
-0.07706268876791,
-0.025012783706188202,
0.13448816537857056,
0.00022890356194693595,
0.060066163539886475,
-0.1068883091211319,
-0.05911312997341156,
0.14794670045375824,
0.002846671501174569,
0.10276973992586136,
0.21680106222629547,
0.05920194089412689,
-0.09084347635507584,
-0.09890373051166534,
-0.1857653707265854,
0.028803452849388123,
0.3044559061527252,
0.053406525403261185,
-0.09060853719711304,
-0.17848911881446838,
0.11886133253574371,
-0.032112330198287964,
0.026768391951918602,
0.016069766134023666,
0.065970778465271,
-0.11566383391618729,
0.04003134369850159,
-0.09859117120504379,
-0.1937154233455658,
-0.028119755908846855,
0.10680194199085236,
-0.020131396129727364,
0.02968927100300789,
0.005268258973956108,
0.056856315582990646,
0.008421042934060097,
-0.06411653012037277,
0.16466590762138367,
-0.10765588283538818,
-0.044490959495306015,
-0.004931547679007053,
0.09681733697652817,
0.07283826172351837,
0.1018437072634697,
0.13012894988059998,
0.06754365563392639,
0.1646929830312729,
-0.07798083126544952,
0.00045974922250024974,
-0.16480639576911926,
0.12237667292356491,
0.01903706043958664,
-0.08955497294664383,
-0.08992746472358704,
-0.09793136268854141,
0.15378601849079132,
0.11494139581918716,
0.15210461616516113,
-0.05132734403014183,
0.028956376016139984,
0.1705375760793686,
-0.11685475707054138,
-0.013800869695842266,
0.012320390902459621,
0.07486113905906677,
-0.12005151808261871,
-0.07801510393619537,
0.15447969734668732,
0.12461580336093903,
-0.021310538053512573,
0.22560498118400574,
-0.09351161867380142,
-0.04401349276304245,
-0.1029934361577034,
0.032047614455223083,
-0.10398972034454346,
0.005600243341177702,
-0.06672253459692001,
-0.010807246901094913,
0.01874980889260769,
-0.04439256340265274,
0.17602567374706268,
0.06052210554480553,
0.10173188894987106,
-0.2379155457019806,
0.12344073504209518,
-0.08239482343196869,
0.08857384324073792,
-0.035879138857126236,
-0.031232871115207672,
0.07399624586105347,
0.19907625019550323,
0.022352108731865883,
-0.03614824265241623,
-0.02080751396715641,
0.004785457625985146,
0.013659249991178513,
0.037866219878196716,
0.01782504841685295,
-0.16071999073028564,
-0.03726891800761223,
-0.14176645874977112,
0.03168388083577156,
-0.0456649512052536,
0.054367341101169586,
-0.14549383521080017,
0.021883651614189148,
0.1800522655248642,
-0.04873855039477348,
0.03498672693967819,
-0.07006022334098816,
0.4427059590816498,
0.2403908371925354,
0.13066717982292175,
-0.09604134410619736,
0.10834654420614243,
-0.2825736105442047,
0.1508561223745346,
-0.13667166233062744,
-0.052473604679107666,
-0.1614920198917389,
-0.20582008361816406,
0.05807051062583923,
-0.011514941230416298,
-0.06713101267814636,
-0.1940411627292633,
0.12677352130413055,
0.1043013483285904,
0.010689893737435341,
0.10673104971647263,
-0.024719618260860443,
0.01450599730014801,
-0.027791110798716545,
-0.1583455353975296,
0.13195757567882538,
-0.021679503843188286,
0.05337230861186981,
-0.033498380333185196,
-0.1254088580608368,
-0.049919936805963516,
-0.043472547084093094,
-0.07954856008291245,
0.08225937932729721,
-0.04708464443683624,
-0.09458497911691666,
0.21050669252872467,
0.00873067881911993,
0.15376190841197968,
-0.008245318196713924,
-0.09760751575231552,
0.08333989977836609,
0.0803479477763176,
0.016549931839108467,
-0.09746658802032471,
0.1737716943025589,
-0.03805910423398018,
-0.07107600569725037,
-0.3692920506000519,
0.08152341842651367,
-0.13419604301452637,
0.02906530350446701,
-0.19888916611671448,
-0.19351425766944885,
-0.09384478628635406,
0.022348949685692787,
0.0001276875991607085,
0.20759472250938416,
-0.017251934856176376,
0.36786821484565735,
0.20653919875621796,
0.03435107320547104,
0.05022018030285835,
0.17858409881591797,
0.1514066457748413,
-0.028489423915743828,
0.04953555390238762,
0.006839573383331299,
-0.029390687122941017,
-0.07952359318733215,
0.07686793804168701,
0.26869896054267883,
-0.14366139471530914,
0.2240312248468399,
0.0157516710460186,
-0.15586046874523163,
0.09984486550092697,
-0.1001342236995697,
0.06915506720542908,
0.010545775294303894,
0.01948321983218193,
0.18501518666744232,
0.06845531612634659,
-0.10672139376401901,
-0.0356866754591465,
-0.01253467332571745,
-0.018323462456464767,
-0.016375062987208366,
0.2630137503147125,
0.02473083697259426,
-0.0779312327504158,
0.12988589704036713,
-0.008113110437989235,
-0.013088462874293327,
0.21387851238250732,
0.03609263524413109,
-0.12122384458780289,
-0.012042039074003696,
0.220289409160614,
0.06479918211698532,
0.03570583835244179,
0.17297901213169098,
0.07252147048711777,
-0.09317751228809357,
0.11090052872896194,
0.09776464849710464,
-0.024352096021175385,
-0.08566431701183319,
0.013829793781042099,
0.07349579781293869,
-0.11523888260126114,
-0.08397616446018219,
0.0981355831027031,
-0.01250848826020956,
-0.05688631534576416,
0.009453891776502132,
0.06850366294384003,
0.041817184537649155,
-0.10553590208292007,
0.011677533388137817,
-0.011887992732226849,
-0.12037848681211472,
0.07759345322847366,
0.014327512122690678,
-0.10030300915241241,
0.0376945398747921,
-0.10213671624660492,
-0.09041323512792587,
0.039238594472408295,
-0.0769072100520134,
-0.06643276661634445,
-0.043413225561380386,
0.018926605582237244,
-0.20503020286560059,
-0.0985126867890358,
-0.08586758375167847,
0.13239216804504395,
0.1475832611322403,
-0.008755167946219444,
0.018398508429527283,
-0.0278482586145401,
-0.1464615911245346,
-0.09878060221672058,
0.019442973658442497,
0.06786848604679108,
-0.13490433990955353,
-0.03762880340218544,
-0.15921160578727722,
0.09086839854717255,
-0.028987476602196693,
0.14213953912258148,
0.0498216487467289,
-0.05899432301521301,
-0.021609198302030563,
-0.042666565626859665,
0.03295319154858589,
0.19632640480995178,
0.03582175448536873,
0.07696662843227386,
0.01006282214075327,
-0.10971715301275253,
0.17065559327602386,
0.1044524684548378,
0.0231596902012825,
-0.15574917197227478,
-0.13656646013259888,
-0.034266144037246704,
-0.14471307396888733,
0.08555286377668381,
-0.12480723857879639,
0.03240088000893593,
-0.21581387519836426,
0.005211163777858019,
0.03511136770248413,
-0.02613138034939766,
-0.23880578577518463,
0.12465940415859222,
-0.09931454062461853,
0.02526753954589367,
0.05448707193136215,
-0.07246612012386322,
0.08670775592327118,
0.1538441926240921,
-0.1664758026599884,
-0.03337360545992851,
0.016093764454126358,
-0.04441700130701065,
-0.010580911301076412,
0.18928295373916626,
0.014467442408204079,
-0.23988127708435059,
-0.0927327573299408,
-0.04372253268957138,
-0.0477762296795845,
-0.009817307814955711,
0.036353472620248795,
0.030111536383628845,
0.08022753149271011,
-0.05628718063235283,
0.033168159425258636,
-0.000038050173316150904,
-0.11986725777387619,
-0.07135973870754242,
0.12201694399118423,
0.13242462277412415,
0.07564135640859604,
0.029051313176751137,
-0.09951116144657135,
-0.08829057961702347,
0.03620504215359688,
0.004166887607425451,
-0.0416632741689682,
0.0665733590722084,
0.19164593517780304,
-0.023239722475409508,
0.06278085708618164,
0.09710739552974701,
-0.12168440967798233,
-0.051755912601947784,
-0.18231827020645142,
-0.09134312719106674,
0.02992907166481018,
0.24287626147270203,
-0.11903546750545502,
0.013049350120127201,
0.06402422487735748,
0.1401968151330948,
0.046047281473875046,
-0.014586427249014378,
-0.08609843999147415,
0.021827613934874535,
-0.27677685022354126,
0.18098361790180206,
0.10029660165309906,
0.12726765871047974,
0.04947163164615631,
0.03426569700241089,
0.03695669397711754,
-0.004625941161066294,
0.23807252943515778,
0.05846599489450455,
-0.06181732937693596,
0.025855451822280884,
-0.04583362117409706,
-0.13876326382160187,
-0.11935803294181824,
0.1791956126689911,
0.0253458134829998,
-0.03838495537638664,
-0.05370337888598442,
-0.08502397686243057,
0.03184838593006134,
0.01770782843232155,
-0.08015890419483185,
0.09621377289295197,
-0.0998413935303688,
-0.02286604791879654,
-0.31320270895957947,
-0.11807697266340256,
-0.08498558402061462,
-0.0793333351612091,
0.1311149001121521,
0.01015518605709076,
-0.08908681571483612,
0.11046116799116135,
-0.0698309987783432,
-0.003309996332973242,
-0.014264441095292568,
-0.0017994171939790249,
-0.0170842744410038,
0.18406511843204498,
0.002114440081641078,
0.0631522610783577,
0.026929382234811783,
0.3541901111602783,
-0.1260233074426651,
-0.35019731521606445,
-0.08558518439531326,
-0.22724181413650513,
0.03492795303463936,
-0.07519808411598206,
0.003992081619799137,
-0.02293807454407215,
-0.023775404319167137,
0.05534755811095238,
-0.02370430715382099,
0.15696442127227783,
-0.023878157138824463,
-0.0177824217826128,
-0.062306031584739685,
-0.09605211019515991,
0.1062294989824295,
-0.05248882248997688,
-0.05777810886502266,
0.15221956372261047,
0.00828058272600174,
0.058054257184267044,
-0.001567420782521367,
-0.11836722493171692,
-0.11407549679279327,
-0.08761432766914368,
0.018902868032455444,
-0.04447270929813385,
-0.11306928843259811,
0.21860551834106445,
-0.1268160492181778,
-0.05011970177292824,
0.12649264931678772,
0.0030516793485730886,
0.04840116947889328,
-0.11879360675811768,
-0.09333395957946777,
0.03003242053091526,
0.16731174290180206,
-0.0025623454712331295,
-0.09269095212221146,
-0.07230092585086823,
-0.06731730699539185,
0.2960159480571747,
-0.22049590945243835,
-0.10170722752809525,
-0.10623066127300262,
0.08841171860694885,
0.12176469713449478,
0.06171222776174545,
-0.04072071984410286,
-0.13703222572803497,
0.06145686283707619,
0.021518832072615623,
-0.09674907475709915,
0.10389389842748642,
0.03088800236582756,
-0.029035115614533424,
0.162185400724411,
0.11261001974344254,
0.03197964280843735,
-0.10975771397352219,
0.19953320920467377,
-0.06324982643127441,
-0.14942656457424164,
0.0799672082066536,
-0.22615675628185272,
0.0182246882468462,
-0.05428006500005722,
0.08257788419723511,
-0.13719983398914337,
0.12348364293575287,
-0.1900271326303482,
-0.08009219914674759,
0.10916359722614288,
-0.0359572172164917,
0.14058279991149902,
-0.002232707105576992,
-0.16751527786254883,
-0.021485760807991028,
0.04971884563565254,
-0.02675783447921276,
0.007338814903050661,
0.02674645557999611,
-0.02823161706328392,
0.17368829250335693,
-0.09811315685510635,
0.03782859444618225,
0.13906410336494446,
-0.06178467720746994,
-0.07043900340795517,
0.0024855693336576223,
-0.19139429926872253,
0.01820855215191841,
0.16598466038703918,
0.1277845948934555,
0.07361342012882233,
-0.08942272514104843,
-0.1070082038640976,
-0.1648430973291397,
0.10295940190553665,
0.10982540249824524,
0.09796836227178574,
0.00994101446121931,
-0.207085981965065,
-0.20998576283454895,
-0.09841610491275787,
0.004145537968724966,
0.12093310803174973,
0.019116675481200218,
-0.07735133171081543,
-0.11391308158636093,
-0.22762098908424377,
0.057306766510009766,
0.07970531284809113,
0.05933253839612007,
0.14250600337982178,
-0.0348723866045475,
-2.4380646211760868e-32,
0.04303956404328346,
-0.01339463796466589,
-0.07019410282373428,
-0.0012616669991984963,
-0.11758790165185928,
0.07974539697170258,
0.047147978097200394,
-0.0029149868059903383,
-0.13848848640918732,
-0.19329117238521576,
-0.06267308443784714,
-0.09053666144609451,
0.0390620231628418,
0.026401018723845482,
-0.23825174570083618,
-0.012467759661376476,
-0.1348000168800354,
-0.15649209916591644,
-0.027345404028892517,
0.08075079321861267,
0.07610362023115158,
-0.16531787812709808,
-0.03774254024028778,
0.011128095909953117,
-0.07202178239822388,
-0.16190727055072784,
-0.07037553191184998,
-0.04938520863652229,
0.07633452117443085,
0.08999878913164139,
-0.029341885820031166,
0.1413956731557846,
-0.1027933657169342,
-0.01576358824968338,
-0.10563433170318604,
-0.1301824003458023,
-0.1486586481332779,
0.010812884196639061,
-0.1396428942680359,
0.03501255437731743,
-0.016244765371084213,
0.0118219880387187,
-0.16528819501399994,
0.13083171844482422,
0.03523360565304756,
0.006038418039679527,
0.02088274620473385,
0.04724510386586189,
0.027325065806508064,
-0.021502137184143066,
-0.0662262812256813,
0.03200837969779968,
-0.055769626051187515,
0.14160755276679993,
0.0811118483543396,
0.15190769731998444,
0.04250789433717728,
0.21110354363918304,
-0.029449936002492905,
-0.09946376085281372,
-0.002680482342839241,
-0.22037656605243683,
0.267638623714447,
0.15732741355895996,
0.14074097573757172,
-0.15207785367965698,
0.3106403350830078,
0.10071432590484619,
-0.10212286561727524,
-0.10698948800563812,
0.12371990084648132,
0.19828574359416962,
-0.026330815628170967,
-0.027067095041275024,
-0.22090692818164825,
-0.19551874697208405,
0.001005674945190549,
-0.07354766875505447,
0.04581335186958313,
-0.036766573786735535,
0.18445153534412384,
-0.1803516149520874,
0.10786516964435577,
-0.033914607018232346,
-0.23082828521728516,
0.04871257394552231,
0.01128946989774704,
0.012304151430726051,
-0.10574286431074142,
-0.08217465877532959,
-0.10928536206483841,
-0.00008864911796990782,
-0.1010391041636467,
0.010245876386761665,
-0.08747140318155289,
0.1553698629140854,
-0.19521580636501312,
-0.010794051922857761,
-0.0040158662013709545,
0.05703850835561752,
-0.12784771621227264,
-0.06148757040500641,
0.14082272350788116,
0.009424302726984024,
-0.059272293001413345,
-0.015436675399541855,
0.028834691271185875,
-0.1582101285457611,
-0.1274080127477646,
0.043918512761592865,
-0.015261316671967506,
0.22048859298229218,
0.1440044492483139,
-0.0509597510099411,
0.17431896924972534,
0.07703662663698196,
-0.09633820503950119,
-0.059789061546325684,
0.0032596117816865444,
0.14678482711315155,
-0.13497093319892883,
0.10275719314813614,
-0.1491771787405014,
0.19759659469127655,
0.053044456988573074,
-0.02035904861986637,
-0.11178439855575562,
-0.0911802351474762,
0.07488036155700684,
-0.07898059487342834,
0.041370365768671036,
-0.20677080750465393,
7.152004855015548e-7,
-0.21824924647808075,
0.11105932295322418,
-0.0015178554458543658,
-0.09626828879117966,
-0.10459259152412415,
0.009396358393132687,
-0.1948193907737732,
0.05017748475074768,
-0.024774756282567978,
0.06003478169441223,
-0.022712433710694313,
0.18176592886447906,
-0.23836827278137207,
-0.0451805554330349,
0.11421875655651093,
0.022681824862957,
-0.02144523151218891,
-0.051970452070236206,
-0.07874316722154617,
-0.12801039218902588,
-0.14134393632411957,
0.10126300901174545,
0.13823913037776947,
0.038869909942150116,
0.08623319119215012,
0.06035010516643524,
0.03268470987677574,
0.054609354585409164,
0.06992612779140472,
0.07775313407182693,
-0.04111269861459732,
0.12100929021835327,
-0.04364199563860893,
0.20680108666419983,
0.10001643002033234,
-0.07462038844823837,
-0.11563287675380707,
0.03920300677418709,
0.04439835995435715,
-0.09591298550367355,
0.0628269836306572,
0.04074702039361,
0.12637118995189667,
-0.06445121765136719,
0.02130035310983658,
0.09025650471448898,
-0.08204461634159088,
-0.01277237106114626,
-0.07688778638839722,
-0.07149964570999146,
-0.00942738726735115,
-0.009214079938828945,
0.01222144067287445,
0.04350363835692406,
-0.16405655443668365,
-0.08110535889863968,
-0.015696393325924873,
-0.09294595569372177,
0.2244255393743515,
0.014399523846805096,
0.06596074998378754,
-0.18918803334236145,
-0.050141382962465286,
-0.0435304194688797,
-0.0050530401058495045,
0.12147118151187897,
0.10582607239484787,
3.6826091356539575e-35,
-0.15140260756015778,
-0.04176155850291252,
-0.05974937975406647,
-0.08000025153160095,
0.12987899780273438,
-0.19589200615882874,
0.11770450323820114,
0.061211515218019485,
0.034854840487241745,
-0.015341809019446373,
0.01991621032357216
] |
https://github.com/huggingface/datasets/issues/6032 | DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info | @mariosasko I fully understand that the logic for dataset is different. I see 2 issues with the current implementation of the env variables:
- having the same https_proxy/http_prox/no_proxy env variables for all tools is not good in some case. For example I have 2 differents proxy server. In 2019 we had discussion with the Tensorflow teams and they recommended to do the following: TFDS_HTTP_PROXY, TFDS_HTTPS_PROXY ...
- with recent version of requests, it is not possible to deactivate TLS interception (verify=false) by using env variable. This is useful to debug things and in some case TLS is not working and you need to ignore verifying the SSL certificate (probably not recommended)
One of the best way is to able to pass our requests.Session() directly
```
import openai
session = requests.Session()
session.cert = CERT
session.verify = False
openai.requestssession = session
```
My 2 cents in this discussion | ### Describe the bug
```python
download_config = DownloadConfig(proxies={'https': '<my proxy>'})
builder = load_dataset_builder(..., download_config=download_config)
```
But, when getting the dataset_info from HfApi, the http requests not using the proxies.
### Steps to reproduce the bug
1. Setup proxies in DownloadConfig.
2. Call `load_dataset_build` with download_config.
3. Inspect the call stack in HfApi.dataset_info.
![image](https://github.com/huggingface/datasets/assets/138426806/33e538a8-2e22-4e63-b634-343febe5324b)
### Expected behavior
DownloadConfig.proxies works for getting dataset_info.
### Environment info
https://github.com/huggingface/datasets/commit/406b2212263c0d33f267e35b917f410ff6b3bc00
Python 3.11.4 | 146 | DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info
### Describe the bug
```python
download_config = DownloadConfig(proxies={'https': '<my proxy>'})
builder = load_dataset_builder(..., download_config=download_config)
```
But, when getting the dataset_info from HfApi, the http requests not using the proxies.
### Steps to reproduce the bug
1. Setup proxies in DownloadConfig.
2. Call `load_dataset_build` with download_config.
3. Inspect the call stack in HfApi.dataset_info.
![image](https://github.com/huggingface/datasets/assets/138426806/33e538a8-2e22-4e63-b634-343febe5324b)
### Expected behavior
DownloadConfig.proxies works for getting dataset_info.
### Environment info
https://github.com/huggingface/datasets/commit/406b2212263c0d33f267e35b917f410ff6b3bc00
Python 3.11.4
@mariosasko I fully understand that the logic for dataset is different. I see 2 issues with the current implementation of the env variables:
- having the same https_proxy/http_prox/no_proxy env variables for all tools is not good in some case. For example I have 2 differents proxy server. In 2019 we had discussion with the Tensorflow teams and they recommended to do the following: TFDS_HTTP_PROXY, TFDS_HTTPS_PROXY ...
- with recent version of requests, it is not possible to deactivate TLS interception (verify=false) by using env variable. This is useful to debug things and in some case TLS is not working and you need to ignore verifying the SSL certificate (probably not recommended)
One of the best way is to able to pass our requests.Session() directly
```
import openai
session = requests.Session()
session.cert = CERT
session.verify = False
openai.requestssession = session
```
My 2 cents in this discussion | [
-0.037193864583969116,
0.07260485738515854,
-0.01841154135763645,
0.06415712833404541,
0.20200344920158386,
-0.019887736067175865,
0.15590539574623108,
-0.030527561902999878,
-0.0623374842107296,
0.11162462830543518,
-0.1408446878194809,
-0.12885160744190216,
0.11151237040758133,
-0.02507050707936287,
0.05920756980776787,
0.008297521620988846,
-0.03374176472425461,
0.1112026795744896,
-0.14496828615665436,
-0.0005377114866860211,
-0.08259929716587067,
0.09175778925418854,
0.12996166944503784,
-0.15427720546722412,
0.2612835168838501,
0.036542605608701706,
-0.05220708250999451,
-0.030029218643903732,
0.08575724065303802,
0.04553382098674774,
0.3064229190349579,
0.20238275825977325,
0.08344242721796036,
0.07966556400060654,
0.000005411104211816564,
0.11339148133993149,
0.09405195713043213,
0.016582829877734184,
-0.04488622769713402,
0.023921780288219452,
-0.0687965676188469,
-0.031213214620947838,
-0.003596291644498706,
0.005768605507910252,
-0.09763722866773605,
0.07455490529537201,
-0.08683943003416061,
-0.10531606525182724,
-0.043573204427957535,
-0.07819147408008575,
0.006648748181760311,
0.11263801902532578,
-0.0007801663596183062,
0.0071458290331065655,
0.03167710080742836,
0.05474124103784561,
0.03401742875576019,
-0.002952480223029852,
-0.10186590999364853,
-0.09920535236597061,
0.20299482345581055,
-0.040321819484233856,
0.08128151297569275,
0.17204664647579193,
0.01948051154613495,
-0.10676486790180206,
-0.05115652084350586,
-0.19006359577178955,
0.06766136735677719,
0.29764702916145325,
0.13002663850784302,
-0.06464513391256332,
-0.1949186474084854,
0.10934200882911682,
-0.025242675095796585,
-0.030177688226103783,
0.010604641400277615,
0.12347185611724854,
-0.07167781889438629,
0.03221234679222107,
-0.09039302170276642,
-0.11955881863832474,
-0.12681815028190613,
0.20165157318115234,
-0.03355561941862106,
-0.008561711758375168,
0.07645001262426376,
0.06956042349338531,
-0.029952947050333023,
-0.0100925387814641,
0.1579555720090866,
-0.10864166170358658,
-0.03801145404577255,
0.018256627023220062,
0.016942854970693588,
0.09132993221282959,
0.057915929704904556,
0.030946554616093636,
0.02372168004512787,
0.07911714911460876,
-0.023076524958014488,
0.004533104598522186,
-0.06090988218784332,
0.10510546714067459,
0.02002960629761219,
-0.11373864859342575,
-0.12950538098812103,
-0.07507423311471939,
0.19140656292438507,
0.0692986398935318,
0.11539878696203232,
0.04193728417158127,
0.02576243132352829,
0.15443891286849976,
-0.10644690692424774,
0.018121765926480293,
-0.003914871718734503,
0.1061893031001091,
-0.13287952542304993,
-0.038411013782024384,
0.04847538471221924,
0.12021053582429886,
-0.0699210986495018,
0.236410990357399,
-0.15100054442882538,
-0.026452085003256798,
-0.07579418271780014,
0.03541857749223709,
-0.1491486132144928,
-0.04575648531317711,
-0.025160202756524086,
-0.021870220080018044,
0.04977348819375038,
-0.03282622620463371,
0.08073080331087112,
0.0746958926320076,
0.101169653236866,
-0.15803222358226776,
0.035123296082019806,
-0.11386280506849289,
0.17996221780776978,
-0.07363806664943695,
-0.023364488035440445,
0.12852396070957184,
0.2219526469707489,
-0.03536617383360863,
-0.1216423362493515,
-0.007379892747849226,
-0.012242921628057957,
0.12978555262088776,
0.004996557720005512,
0.02071879804134369,
-0.2303127646446228,
0.016479838639497757,
-0.16190758347511292,
0.06279836595058441,
-0.022345630452036858,
0.07765660434961319,
-0.0683840662240982,
0.03996918350458145,
0.1215263083577156,
-0.11071982979774475,
0.05222262814640999,
-0.12233255803585052,
0.41072720289230347,
0.23564110696315765,
0.05166590213775635,
-0.060371119529008865,
0.144949272274971,
-0.27728182077407837,
0.07056411355733871,
-0.11719737201929092,
-0.0012657607439905405,
-0.11422117054462433,
-0.15053586661815643,
-0.053087685257196426,
0.009349985048174858,
-0.11175064742565155,
-0.20969827473163605,
0.15936343371868134,
0.1307971179485321,
-0.0248875692486763,
0.0450734905898571,
0.06880034506320953,
0.03978540375828743,
0.02128051221370697,
-0.12305021286010742,
0.05394076555967331,
-0.03186799958348274,
0.06119159981608391,
-0.022440942004323006,
-0.15597285330295563,
0.02314593642950058,
0.0006732376641593874,
-0.07164046913385391,
0.0065824007615447044,
-0.10803312808275223,
-0.14325407147407532,
0.2481735497713089,
-0.003463792847469449,
0.041943397372961044,
-0.07364733517169952,
-0.023846052587032318,
0.09628084301948547,
0.029004381969571114,
0.132349893450737,
-0.08529773354530334,
0.15208134055137634,
-0.05736590921878815,
-0.018711600452661514,
-0.3764122426509857,
0.06231488659977913,
-0.1074252650141716,
0.00006514502456411719,
-0.2700181007385254,
-0.1604563593864441,
-0.09684059768915176,
0.03701561689376831,
-0.004179998300969601,
0.21674488484859467,
-0.018467282876372337,
0.31853848695755005,
0.16347509622573853,
-0.03360766917467117,
0.15026995539665222,
0.12741035223007202,
0.13597840070724487,
0.04931950196623802,
0.10617765784263611,
0.012920723296701908,
-0.04105643928050995,
-0.07077821344137192,
0.04685337841510773,
0.34965112805366516,
-0.10151346027851105,
0.1786465346813202,
-0.0367869958281517,
-0.10490203648805618,
0.04963650181889534,
-0.1204223707318306,
0.07150503247976303,
0.005219713319092989,
0.022120840847492218,
0.13686718046665192,
0.051282767206430435,
-0.04176759347319603,
0.04741142690181732,
-0.029327547177672386,
-0.07019759714603424,
-0.0731094628572464,
0.2281934767961502,
-0.03371450677514076,
-0.0913054347038269,
0.18093425035476685,
-0.05662289261817932,
-0.039420560002326965,
0.21426695585250854,
-0.031474631279706955,
-0.1330556869506836,
0.00875850860029459,
0.1808898150920868,
0.02959970384836197,
0.1099170669913292,
0.17981156706809998,
0.1196623295545578,
-0.11697288602590561,
0.16111302375793457,
0.07823760062456131,
0.020317163318395615,
-0.058073919266462326,
-0.03853727877140045,
0.09230313450098038,
-0.15980491042137146,
-0.15852093696594238,
0.12598593533039093,
0.013054968789219856,
-0.019054410979151726,
-0.034394536167383194,
0.0931081473827362,
0.09097811579704285,
-0.01754048466682434,
0.022322358563542366,
0.025804461911320686,
-0.017890367656946182,
0.10287242382764816,
0.018802877515554428,
-0.11582908779382706,
0.005192497279495001,
-0.12430688738822937,
0.08261905610561371,
0.03810171037912369,
-0.08717165887355804,
-0.010492373257875443,
-0.03360943868756294,
-0.01389779057353735,
-0.21196582913398743,
-0.18696048855781555,
-0.016514062881469727,
0.14729523658752441,
0.14217203855514526,
0.03556472435593605,
0.016083471477031708,
-0.033380407840013504,
-0.13740691542625427,
0.010276777669787407,
-0.02644115313887596,
0.16187313199043274,
-0.0972878634929657,
-0.0874164029955864,
-0.16789203882217407,
0.05188976228237152,
-0.046443816274404526,
0.15904228389263153,
0.02914099395275116,
-0.12622042000293732,
0.05993945151567459,
-0.024853259325027466,
0.04973693564534187,
0.15239271521568298,
0.07114437967538834,
0.06714687496423721,
-0.06195715814828873,
-0.21128840744495392,
0.1982610523700714,
0.04882124811410904,
-0.10496818274259567,
-0.20409844815731049,
-0.10737929493188858,
-0.06574872881174088,
-0.1374662071466446,
0.08111483603715897,
-0.08229187875986099,
0.07990716397762299,
-0.22410425543785095,
0.005498425103724003,
0.056436456739902496,
-0.009157312102615833,
-0.24643811583518982,
0.10737291723489761,
-0.08064770698547363,
0.015493695624172688,
0.08701669424772263,
-0.08179304003715515,
0.12438022345304489,
0.1535433679819107,
-0.21344618499279022,
-0.07980470359325409,
-0.0071452283300459385,
-0.08811356872320175,
-0.048524074256420135,
0.12402597069740295,
0.059325914829969406,
-0.2858979403972626,
-0.06844495981931686,
-0.011951160617172718,
-0.08500179648399353,
0.07185618579387665,
0.026270931586623192,
0.08362625539302826,
0.06602107733488083,
0.009582901373505592,
0.07532855123281479,
0.031848181039094925,
-0.13919883966445923,
-0.12866252660751343,
-0.00854425597935915,
0.14269395172595978,
-0.008852990344166756,
0.1616382747888565,
0.008738416247069836,
-0.10023210942745209,
-0.039565134793519974,
0.018877441063523293,
-0.014453927055001259,
0.04741588234901428,
0.1752338409423828,
-0.08709442615509033,
0.14016151428222656,
0.033140119165182114,
-0.17338857054710388,
-0.05095026642084122,
-0.22162120044231415,
-0.07597379386425018,
0.03145939111709595,
0.17257723212242126,
-0.09303745627403259,
0.05176246166229248,
0.02198326587677002,
0.07941442728042603,
0.07408381253480911,
-0.014404295943677425,
-0.1290229707956314,
0.0464726947247982,
-0.16460342705249786,
0.2614682912826538,
0.13958482444286346,
0.14989088475704193,
0.030165428295731544,
0.07478135079145432,
0.024786075577139854,
-0.012197617441415787,
0.2472337931394577,
-0.008770999498665333,
-0.06016945466399193,
0.050357528030872345,
0.0035768079105764627,
-0.08595116436481476,
-0.1406456083059311,
0.1575433760881424,
0.0034021171741187572,
0.02091774344444275,
-0.012168853543698788,
-0.16157911717891693,
0.05002382770180702,
0.0055953990668058395,
-0.028723588213324547,
0.11190995573997498,
-0.11121012270450592,
-0.01057873573154211,
-0.30493658781051636,
-0.10359150916337967,
-0.08133705705404282,
-0.06547663360834122,
0.0961916521191597,
-0.05512170493602753,
-0.12652689218521118,
0.13420842587947845,
-0.04086900129914284,
-0.012416362762451172,
-0.024054918438196182,
-0.039981428533792496,
0.021928781643509865,
0.2408592849969864,
-0.030016092583537102,
-0.012870647013187408,
0.11958789825439453,
0.33702409267425537,
-0.14138875901699066,
-0.2561681270599365,
-0.10083701461553574,
-0.27927541732788086,
0.0457962267100811,
-0.08640864491462708,
0.012934553436934948,
-0.033335186541080475,
-0.03180700168013573,
0.10126998275518417,
0.014986930415034294,
0.09857398271560669,
-0.08259904384613037,
0.029403558000922203,
-0.054213907569646835,
-0.16645373404026031,
0.08699005842208862,
-0.08017098158597946,
-0.04849991947412491,
0.10110491514205933,
-0.05197666585445404,
0.08848841488361359,
-0.042535144835710526,
-0.07576784491539001,
-0.11646673828363419,
-0.1091284304857254,
0.060794614255428314,
-0.012464234605431557,
-0.01867028884589672,
0.16816948354244232,
-0.1433316320180893,
-0.09671880304813385,
0.09106197208166122,
0.02275356836616993,
0.0641721561551094,
-0.13196469843387604,
-0.10508778691291809,
0.012230419553816319,
0.14877630770206451,
-0.02834293618798256,
0.018011976033449173,
-0.12470022588968277,
0.032786522060632706,
0.2997092306613922,
-0.14629986882209778,
-0.024691447615623474,
-0.033732444047927856,
0.03624190762639046,
0.10399280488491058,
0.03368278220295906,
-0.003336552996188402,
-0.16969841718673706,
0.020635491237044334,
0.03983521834015846,
-0.02507214993238449,
0.09832457453012466,
-0.026618072763085365,
0.04214874282479286,
0.05886926129460335,
0.06896238774061203,
0.09494651854038239,
-0.0679965391755104,
0.1818288266658783,
-0.07981200516223907,
-0.1006154716014862,
0.10358007252216339,
-0.176366925239563,
0.07426296919584274,
0.026769466698169708,
0.08479301631450653,
-0.10177046060562134,
0.06554324924945831,
-0.20163218677043915,
-0.08481606841087341,
0.13741526007652283,
-0.1050829291343689,
0.08256042003631592,
-0.01935083046555519,
-0.10668374598026276,
0.05984286963939667,
0.024589695036411285,
-0.10966651141643524,
0.01062941737473011,
0.0246108528226614,
-0.027980441227555275,
0.1796894520521164,
-0.04157459735870361,
0.06361056119203568,
0.08182012289762497,
-0.07398585230112076,
-0.03088790737092495,
0.030090395361185074,
-0.22146068513393402,
0.0011623427271842957,
0.18987058103084564,
0.1858595758676529,
0.0767403095960617,
-0.12159775197505951,
-0.06396327912807465,
-0.21057724952697754,
0.17757576704025269,
0.048658568412065506,
0.08719125390052795,
0.05866735801100731,
-0.1921800822019577,
-0.24575203657150269,
-0.1379111260175705,
0.06724350899457932,
0.15723352134227753,
0.027750562876462936,
-0.03753407672047615,
-0.1376834660768509,
-0.2267932891845703,
0.058433860540390015,
0.021931450814008713,
0.14869298040866852,
0.13388678431510925,
-0.033725056797266006,
-2.326607626377376e-32,
0.016186080873012543,
0.0397828109562397,
-0.07128603756427765,
0.038436949253082275,
-0.0760379508137703,
0.09212103486061096,
0.02121102064847946,
-0.0073856692761182785,
-0.07134228199720383,
-0.15212473273277283,
-0.010628441348671913,
-0.09041408449411392,
0.08820769935846329,
0.016275586560368538,
-0.23729553818702698,
-0.08159301429986954,
-0.14997431635856628,
-0.17653900384902954,
0.06675955653190613,
0.04725723713636398,
0.024692652747035027,
-0.19535081088542938,
-0.020387059077620506,
-0.03499830886721611,
-0.042072322219610214,
-0.196890726685524,
-0.02728908695280552,
-0.034457575529813766,
0.015425135381519794,
0.07286927103996277,
0.04554148018360138,
0.08489738404750824,
-0.09057135879993439,
-0.10685890167951584,
-0.11023624241352081,
-0.14123831689357758,
-0.10683449357748032,
-0.010552526451647282,
-0.12911854684352875,
0.07292906194925308,
-0.12651143968105316,
-0.08592140674591064,
-0.19098277390003204,
0.0769347995519638,
-0.015566048212349415,
-0.0038644152227789164,
0.03149726614356041,
0.06733306497335434,
0.06480639427900314,
-0.038339272141456604,
-0.0980149656534195,
0.042949363589286804,
-0.04904211312532425,
0.06529847532510757,
0.1005813479423523,
0.10517492145299911,
-0.003834216622635722,
0.1387321650981903,
-0.06939046829938889,
-0.024288654327392578,
0.039339616894721985,
-0.3001071512699127,
0.18756744265556335,
0.04857175797224045,
0.03733252361416817,
-0.1961718648672104,
0.3309389650821686,
0.07669392973184586,
-0.09567967057228088,
-0.06296186149120331,
0.06235462427139282,
0.17332780361175537,
-0.0370379276573658,
-0.0651896744966507,
-0.22617985308170319,
-0.23162183165550232,
-0.0025440154131501913,
-0.054211489856243134,
0.023580249398946762,
0.029053863137960434,
0.11733540147542953,
-0.15456229448318481,
0.06459737569093704,
-0.03527924045920372,
-0.20374524593353271,
0.031071195378899574,
0.01848553866147995,
0.072084441781044,
-0.04725530743598938,
-0.08513899892568588,
-0.09702892601490021,
-0.10443075746297836,
-0.030229954048991203,
-0.05835990980267525,
-0.017018098384141922,
0.07427724450826645,
-0.16029490530490875,
-0.038147322833538055,
0.01723499223589897,
0.03686370700597763,
-0.10040213167667389,
-0.09801548719406128,
0.15827268362045288,
-0.0613037645816803,
-0.0582488588988781,
0.011308040469884872,
0.020740097388625145,
-0.14107035100460052,
-0.10083531588315964,
0.12487170845270157,
-0.04977332428097725,
0.1348850429058075,
0.1153041273355484,
-0.05539090931415558,
0.17133520543575287,
0.0633273795247078,
-0.04222134128212929,
0.01498495228588581,
0.038013000041246414,
0.14734676480293274,
-0.18368078768253326,
0.08659107983112335,
-0.12018333375453949,
0.15819847583770752,
0.1209539845585823,
-0.00003616768299252726,
-0.03922533243894577,
-0.14311178028583527,
0.09712006151676178,
-0.018916912376880646,
0.12362965196371078,
-0.21908371150493622,
7.204532153082255e-7,
-0.2845505177974701,
0.1135609894990921,
-0.0639084205031395,
-0.022985288873314857,
-0.10678073018789291,
0.0817844495177269,
-0.1858747899532318,
0.02145252376794815,
-0.0972851812839508,
0.06292141228914261,
-0.007811087649315596,
0.14618514478206635,
-0.22223275899887085,
-0.01080943550914526,
0.13040494918823242,
-0.02274123951792717,
-0.021561594679951668,
-0.05357317253947258,
-0.0936841070652008,
-0.1848655492067337,
-0.21595478057861328,
0.13537879288196564,
0.2002469003200531,
0.003775820368900895,
0.09374900162220001,
0.030993321910500526,
0.0073485588654875755,
0.012286415323615074,
0.037425603717565536,
0.09260154515504837,
-0.04432458057999611,
0.20380009710788727,
-0.07279542833566666,
0.2401806116104126,
0.10036179423332214,
-0.05890310928225517,
-0.09967916458845139,
0.06264244019985199,
0.08445249497890472,
-0.015189644880592823,
0.0621478408575058,
0.04148893058300018,
0.15512175858020782,
-0.06489669531583786,
0.06553266197443008,
0.15392065048217773,
-0.05287807807326317,
-0.10551059991121292,
-0.04230421781539917,
-0.030987249687314034,
0.09135846048593521,
0.04343891888856888,
-0.0032677368726581335,
-0.015096462331712246,
-0.16868790984153748,
-0.033169813454151154,
-0.09365159273147583,
-0.1200433149933815,
0.25131291151046753,
-0.06598976254463196,
0.0897613987326622,
-0.15527483820915222,
-0.0029185221064835787,
-0.09224351495504379,
0.15589144825935364,
0.11025694757699966,
0.08119513839483261,
-7.776230186757446e-36,
-0.1503467559814453,
-0.0765451192855835,
-0.08501290529966354,
-0.04256176948547363,
0.15358127653598785,
-0.1915615200996399,
0.07378823310136795,
0.07355403900146484,
-0.005977900233119726,
0.01565939001739025,
0.008247862569987774
] |
https://github.com/huggingface/datasets/issues/6025 | Using a dataset for a use other than it was intended for. | I've opened a PR with a fix. In the meantime, you can avoid the error by deleting `task_templates` with `dataset.info.task_templates = None` before the `interleave_datasets` call.
` | ### Describe the bug
Hi, I want to use the rotten tomatoes dataset but for a task other than classification, but when I interleave the dataset, it throws ```'ValueError: Column label is not present in features.'```. It seems that the label_col must be there in the dataset for some reason?
Here is the full stacktrace
```
File "/home/suryahari/Vornoi/tryage-handoff-other-datasets.py", line 276, in create_dataloaders
dataset = interleave_datasets(dsfold, stopping_strategy="all_exhausted")
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/combine.py", line 134, in interleave_datasets
return _interleave_iterable_datasets(
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1833, in _interleave_iterable_datasets
info = DatasetInfo.from_merge([d.info for d in datasets])
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in from_merge
dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None]
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in <listcomp>
dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None]
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 378, in copy
return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})
File "<string>", line 20, in __init__
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 208, in __post_init__
self.task_templates = [
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 209, in <listcomp>
template.align_with_features(self.features) for template in (self.task_templates)
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/tasks/text_classification.py", line 20, in align_with_features
raise ValueError(f"Column {self.label_column} is not present in features.")
ValueError: Column label is not present in features.
```
### Steps to reproduce the bug
Delete the column `labels` from the `rotten_tomatoes` dataset. Try to interleave it with other datasets.
### Expected behavior
Should let me use the dataset with just the `text` field
### Environment info
latest datasets library? I don't think this was an issue in earlier versions. | 27 | Using a dataset for a use other than it was intended for.
### Describe the bug
Hi, I want to use the rotten tomatoes dataset but for a task other than classification, but when I interleave the dataset, it throws ```'ValueError: Column label is not present in features.'```. It seems that the label_col must be there in the dataset for some reason?
Here is the full stacktrace
```
File "/home/suryahari/Vornoi/tryage-handoff-other-datasets.py", line 276, in create_dataloaders
dataset = interleave_datasets(dsfold, stopping_strategy="all_exhausted")
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/combine.py", line 134, in interleave_datasets
return _interleave_iterable_datasets(
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1833, in _interleave_iterable_datasets
info = DatasetInfo.from_merge([d.info for d in datasets])
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in from_merge
dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None]
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in <listcomp>
dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None]
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 378, in copy
return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})
File "<string>", line 20, in __init__
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 208, in __post_init__
self.task_templates = [
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 209, in <listcomp>
template.align_with_features(self.features) for template in (self.task_templates)
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/tasks/text_classification.py", line 20, in align_with_features
raise ValueError(f"Column {self.label_column} is not present in features.")
ValueError: Column label is not present in features.
```
### Steps to reproduce the bug
Delete the column `labels` from the `rotten_tomatoes` dataset. Try to interleave it with other datasets.
### Expected behavior
Should let me use the dataset with just the `text` field
### Environment info
latest datasets library? I don't think this was an issue in earlier versions.
I've opened a PR with a fix. In the meantime, you can avoid the error by deleting `task_templates` with `dataset.info.task_templates = None` before the `interleave_datasets` call.
` | [
0.14547865092754364,
0.253295361995697,
-0.02905864268541336,
0.16201938688755035,
0.11313032358884811,
0.07867736369371414,
0.21318453550338745,
0.014824717305600643,
0.13006019592285156,
0.10779253393411636,
-0.1659073531627655,
-0.04546206071972847,
0.014295702800154686,
0.07762133330106735,
-0.03613511472940445,
-0.11257652193307877,
-0.17236264050006866,
0.02181188389658928,
-0.07350794970989227,
0.005769220180809498,
-0.02570307068526745,
0.03549889847636223,
0.04184011369943619,
0.07851916551589966,
-0.29710590839385986,
-0.051766883581876755,
-0.027645625174045563,
0.14295841753482819,
0.14058436453342438,
0.06875117123126984,
0.18044942617416382,
-0.03211445361375809,
0.07401185482740402,
0.004900937434285879,
0.0000057694719544088,
0.08884094655513763,
0.09258737415075302,
-0.054215747863054276,
-0.08314238488674164,
-0.13754571974277496,
0.21861106157302856,
0.08988258987665176,
-0.12654241919517517,
-0.16135895252227783,
-0.024621684104204178,
-0.03441816195845604,
-0.03579225391149521,
-0.10515373200178146,
0.16597428917884827,
-0.06174999475479126,
-0.0426328182220459,
0.057173822075128555,
-0.12733151018619537,
-0.04390203207731247,
0.12662263214588165,
0.03318371996283531,
0.04289045184850693,
0.12835007905960083,
-0.04238811880350113,
-0.07472831755876541,
0.07929634302854538,
-0.0044770133681595325,
0.030079824849963188,
0.06665904819965363,
0.05102038383483887,
0.0056315320543944836,
-0.08202745020389557,
-0.1316574662923813,
0.05579058825969696,
0.1398923397064209,
0.13487553596496582,
-0.0207904614508152,
-0.0013576960191130638,
-0.013083589263260365,
0.0051690200343728065,
-0.15847912430763245,
-0.1738339513540268,
-0.03425546735525131,
0.01662207767367363,
-0.0077453539706766605,
-0.08452865481376648,
0.0750841498374939,
-0.005803922191262245,
0.08731285482645035,
0.04219173640012741,
-0.06123250722885132,
-0.11403661221265793,
0.12213964760303497,
-0.09322065860033035,
-0.0911397635936737,
0.10026439279317856,
0.07504583150148392,
-0.07550771534442902,
-0.11926524341106415,
0.06264182180166245,
0.049562275409698486,
-0.14435535669326782,
-0.08153680711984634,
-0.053712379187345505,
0.06741105765104294,
-0.02154037170112133,
-0.03847072273492813,
-0.08464554697275162,
0.09766997396945953,
0.1451205015182495,
0.10771273821592331,
-0.0463230274617672,
0.18557392060756683,
-0.04028280824422836,
-0.030497079715132713,
-0.235164612531662,
0.04839155822992325,
-0.020697742700576782,
0.09454653412103653,
0.22666621208190918,
0.18648603558540344,
0.03330991044640541,
0.16917255520820618,
-0.15345226228237152,
0.011951811611652374,
0.03428392484784126,
0.04129088670015335,
0.04341166839003563,
0.036090828478336334,
0.022334497421979904,
-0.01855318993330002,
-0.02366190403699875,
0.17108891904354095,
0.19336192309856415,
-0.04807508364319801,
-0.02942694164812565,
0.012294256128370762,
0.029518194496631622,
-0.14829756319522858,
0.061961136758327484,
0.16534411907196045,
-0.021210787817835808,
-0.010435265488922596,
-0.1378406584262848,
-0.08998700231313705,
-0.031237738206982613,
-0.1341271698474884,
-0.032721083611249924,
0.01803136058151722,
0.20676907896995544,
-0.013149271719157696,
0.18625563383102417,
-0.011751102283596992,
-0.12398143112659454,
0.10271310806274414,
-0.09466774016618729,
0.1768312156200409,
-0.1618017703294754,
0.023208826780319214,
-0.1179599016904831,
0.021669503301382065,
0.05704676732420921,
0.026593079790472984,
-0.030945923179388046,
0.10208427160978317,
0.0555594339966774,
-0.018903056159615517,
0.017469486221671104,
-0.1561327427625656,
-0.018437929451465607,
0.16103507578372955,
-0.1702008694410324,
-0.02572624757885933,
-0.010867390781641006,
-0.16186092793941498,
0.018698768690228462,
0.007617623079568148,
-0.04041081666946411,
0.01989218033850193,
0.0670146644115448,
0.017392246052622795,
-0.020771699026226997,
0.05893014371395111,
-0.1727319061756134,
0.01959313079714775,
0.0012478668941184878,
-0.03878842294216156,
0.09740009903907776,
0.11726615577936172,
0.16779014468193054,
0.004117249045521021,
-0.10164961963891983,
0.008881579153239727,
-0.01796199381351471,
-0.08127935230731964,
-0.10115735232830048,
0.014253956265747547,
-0.029701625928282738,
0.18221502006053925,
0.04714994132518768,
0.14898334443569183,
-0.027410484850406647,
-0.0468822680413723,
-0.019174767658114433,
-0.1293732225894928,
0.11647243797779083,
-0.13871726393699646,
-0.015588137321174145,
0.19099198281764984,
-0.04425165057182312,
0.025267736986279488,
0.04947433993220329,
0.03390500321984291,
0.1383666694164276,
-0.1555458903312683,
0.056300271302461624,
-0.12731575965881348,
-0.1042429506778717,
-0.10891090333461761,
0.023382121697068214,
-0.05745221674442291,
-0.11267674714326859,
-0.020915476605296135,
-0.13391371071338654,
0.03568853810429573,
-0.019792739301919937,
-0.028799446299672127,
-0.05431719496846199,
-0.029983537271618843,
0.1279744654893875,
0.08124105632305145,
-0.04564214497804642,
0.0440978929400444,
-0.04119930788874626,
0.15847162902355194,
0.024152087047696114,
-0.1182035431265831,
0.11377093940973282,
0.12254571169614792,
-0.17270822823047638,
-0.0539337657392025,
0.060198791325092316,
-0.07414186000823975,
-0.03096640296280384,
0.02901313453912735,
0.07170017808675766,
0.020281590521335602,
-0.1628664880990982,
-0.031647779047489166,
-0.04085352271795273,
0.15096785128116608,
-0.12307838350534439,
0.17381492257118225,
0.022382458671927452,
-0.011198950000107288,
0.19723758101463318,
-0.011773857288062572,
-0.06449047476053238,
-0.08088147640228271,
-0.0014258414739742875,
-0.13294190168380737,
-0.02128118835389614,
0.18787826597690582,
0.03816434368491173,
0.005230186972767115,
0.07883487641811371,
0.12194550782442093,
0.11182650178670883,
0.012657162733376026,
0.09483501315116882,
0.0414443239569664,
-0.01980569027364254,
0.06933277100324631,
0.028650280088186264,
0.19825895130634308,
0.0335126593708992,
-0.05608763173222542,
-0.03779216855764389,
-0.14656971395015717,
-0.0025651634205132723,
0.09469062834978104,
0.03166153281927109,
-0.1356150209903717,
-0.008251894265413284,
0.1540185511112213,
0.0651250034570694,
0.12396524101495743,
0.05371332913637161,
-0.11258116364479065,
0.09950020164251328,
0.1280956268310547,
-0.11230458319187164,
-0.027579033747315407,
0.0479198694229126,
-0.03527946397662163,
0.0963161513209343,
-0.0786202996969223,
-0.0534077025949955,
-0.17506925761699677,
-0.05808641016483307,
0.02922639437019825,
-0.016816770657896996,
-0.03901736065745354,
-0.24099838733673096,
-0.1119520366191864,
0.017460040748119354,
-0.03989950940012932,
0.17947924137115479,
0.10111530125141144,
0.013582584448158741,
-0.17631185054779053,
0.06629957258701324,
-0.0055711581371724606,
-0.33965033292770386,
-0.0110721904784441,
0.14742149412631989,
0.01184387318789959,
-0.0013858213787898421,
0.15163134038448334,
-0.06543916463851929,
0.03685250133275986,
-0.06302905082702637,
-0.116837278008461,
0.07628252357244492,
0.040948286652565,
-0.011215823702514172,
0.12061253190040588,
-0.02919592149555683,
0.006470921449363232,
-0.08524378389120102,
0.011097806505858898,
-0.13490313291549683,
-0.14463815093040466,
0.06322304159402847,
-0.03475586324930191,
-0.1740255057811737,
0.08972976356744766,
0.024043403565883636,
-0.052972763776779175,
0.22909362614154816,
-0.10226817429065704,
-0.193489208817482,
0.013319079764187336,
0.2553195357322693,
0.037363771349191666,
-0.06411977857351303,
-0.006455485243350267,
-0.09310884773731232,
-0.08398500829935074,
-0.043968964368104935,
-0.2143826186656952,
0.17200855910778046,
0.03346942737698555,
-0.0362897664308548,
0.02773522399365902,
0.04318227991461754,
0.0846252292394638,
-0.03075811080634594,
0.02404017560184002,
0.11437032371759415,
0.07073236256837845,
-0.04339686781167984,
0.13636556267738342,
-0.1725165843963623,
0.0886826440691948,
0.06506205350160599,
-0.06901729851961136,
0.12948301434516907,
-0.24075330793857574,
0.060157570987939835,
0.1966080218553543,
0.004414605442434549,
0.19600331783294678,
0.1413208246231079,
-0.14247895777225494,
-0.046153485774993896,
-0.2904373109340668,
0.09614501148462296,
-0.11710556596517563,
-0.09140020608901978,
-0.016918916255235672,
-0.08014240115880966,
-0.018579872325062752,
0.08169302344322205,
-0.021876618266105652,
-0.0929902195930481,
-0.1564968377351761,
-0.07176477462053299,
0.12524458765983582,
0.015749385580420494,
-0.010015658102929592,
-0.07939527183771133,
-0.0789128765463829,
-0.15970592200756073,
0.09587040543556213,
-0.06775859743356705,
0.022349106147885323,
0.001499365083873272,
0.02927420474588871,
0.041314736008644104,
-0.13208022713661194,
0.01748349331319332,
-0.045407574623823166,
-0.0377555675804615,
-0.05596703663468361,
0.04666120186448097,
0.12932859361171722,
-0.004784488119184971,
-0.05439816042780876,
0.21381674706935883,
0.037064239382743835,
0.06427053362131119,
0.08445601165294647,
-0.04005906358361244,
-0.2131194770336151,
0.11078553646802902,
-0.03199905529618263,
-0.03607907146215439,
0.0729544386267662,
0.16455194354057312,
-0.037272389978170395,
-0.1599690318107605,
-0.07159379124641418,
-0.12079186737537384,
-0.004088864661753178,
-0.0984337255358696,
-0.015791529789566994,
0.1398167759180069,
0.14460821449756622,
0.021601518616080284,
-0.029330268502235413,
-0.09023519605398178,
0.11387883126735687,
0.03492840752005577,
0.02167166769504547,
0.05210879072546959,
0.0711054801940918,
0.10172677785158157,
-0.16892743110656738,
-0.021624073386192322,
0.0034677155781537294,
0.3837694525718689,
-0.20426057279109955,
-0.14457178115844727,
-0.05014564469456673,
-0.06575588136911392,
0.09591875225305557,
0.1929958015680313,
0.011532901786267757,
0.054904453456401825,
-0.17231884598731995,
-0.08431006968021393,
0.0037784308660775423,
-0.11126590520143509,
0.02986080013215542,
-0.2306915819644928,
-0.05248986929655075,
-0.11807123571634293,
-0.02469756081700325,
0.07505039870738983,
-0.03061479888856411,
-0.0041330838575959206,
-0.0790976956486702,
-0.04311979189515114,
-0.03773362934589386,
0.023182127624750137,
-0.06700141727924347,
0.028141934424638748,
0.08774150162935257,
-0.14676176011562347,
0.108178049325943,
0.23298345506191254,
-0.0670471265912056,
-0.15447594225406647,
-0.10912152379751205,
-0.01740632764995098,
0.04674891382455826,
0.0456438846886158,
-0.06076723709702492,
0.08850765228271484,
0.025101780891418457,
-0.12883105874061584,
-0.18278037011623383,
0.12858380377292633,
-0.02024311013519764,
0.013226276263594627,
0.09124361723661423,
0.03312600031495094,
-0.09004040062427521,
-0.0030374338384717703,
0.1979266107082367,
-0.017878536134958267,
0.01121313963085413,
-0.047294363379478455,
-0.09379710257053375,
0.08785074949264526,
-0.03181200101971626,
-0.043351951986551285,
0.12995217740535736,
0.002048153430223465,
-0.007267963606864214,
0.045811835676431656,
0.11860979348421097,
-0.01866704411804676,
0.03702278062701225,
0.14232932031154633,
0.07599081099033356,
0.021192356944084167,
0.08292557299137115,
0.07750802487134933,
-0.08584294468164444,
0.06245281919836998,
-0.06613727658987045,
-0.017463117837905884,
-0.006087168585509062,
0.27243438363075256,
0.23469847440719604,
0.131476491689682,
-0.14145579934120178,
-0.006697278004139662,
-0.015274148434400558,
-0.20946092903614044,
-0.03866890072822571,
-0.11796960234642029,
0.018408818170428276,
-0.05473030358552933,
-0.10126187652349472,
0.018481355160474777,
-0.05914215371012688,
-0.05551409721374512,
0.005545078311115503,
-0.032690856605768204,
-0.11095907539129257,
-0.010177120566368103,
0.1422663927078247,
0.16709591448307037,
0.0030658585019409657,
0.015851054340600967,
-0.0028611053712666035,
-0.06117664650082588,
0.21692271530628204,
-0.05119819566607475,
-0.1397392302751541,
0.12617500126361847,
0.06911610811948776,
-0.07605551183223724,
-0.39539092779159546,
-0.022298751398921013,
0.09666159003973007,
0.16567331552505493,
0.06399275362491608,
-0.14335891604423523,
-0.07373733073472977,
0.018942149356007576,
-0.015222963877022266,
-0.04491913691163063,
-0.044071298092603683,
0.0997459888458252,
-0.18248659372329712,
-0.020728010684251785,
-2.7687270678321684e-32,
-0.11003286391496658,
-0.0633363276720047,
-0.04257921874523163,
0.087403304874897,
-0.12075040489435196,
0.09417276829481125,
0.057683784514665604,
-0.159788116812706,
0.12920203804969788,
0.04889761283993721,
-0.010699624195694923,
-0.05191981792449951,
0.05522513762116432,
0.040132373571395874,
-0.171734020113945,
-0.16707709431648254,
-0.08069578558206558,
-0.06536633521318436,
0.03036610037088394,
-0.05153612047433853,
0.0951271653175354,
0.11688197404146194,
0.14280784130096436,
-0.2574710249900818,
-0.14294645190238953,
-0.06651273369789124,
-0.03967185690999031,
-0.1750219315290451,
-0.04332493618130684,
-0.023559225723147392,
-0.026779405772686005,
0.1752193570137024,
0.14789968729019165,
0.027723267674446106,
-0.031365279108285904,
0.18684251606464386,
-0.0951688289642334,
0.06509393453598022,
0.06835515797138214,
0.0841984674334526,
0.07708147913217545,
-0.011928757652640343,
0.10346361249685287,
-0.051719460636377335,
0.0376562736928463,
0.008069691248238087,
-0.10448076575994492,
-0.11100973933935165,
0.07150449603796005,
0.023221755400300026,
0.0797824114561081,
-0.08137688785791397,
0.1493942141532898,
0.031623851507902145,
0.32550159096717834,
-0.013993978500366211,
0.031144574284553528,
0.07253442704677582,
-0.09893007576465607,
0.01598699577152729,
-0.008817959576845169,
-0.03114759735763073,
0.09458673745393753,
0.02568342536687851,
0.07769393920898438,
-0.013478199951350689,
0.1457463502883911,
0.022614866495132446,
0.06362294405698776,
-0.13659562170505524,
0.05564238503575325,
0.04392120614647865,
-0.010606292635202408,
0.15794937312602997,
-0.11674681305885315,
-0.19531415402889252,
-0.08173034340143204,
-0.01547970436513424,
-0.18645457923412323,
-0.09007658064365387,
-0.009190648794174194,
-0.056054625660181046,
-0.09277047961950302,
-0.01008023414760828,
0.0802479013800621,
0.057268962264060974,
-0.06751178205013275,
-0.018893327564001083,
0.006167321465909481,
-0.1009323000907898,
0.02451585792005062,
0.06465175002813339,
-0.09187643229961395,
0.019947359338402748,
-0.07378925383090973,
0.013027270324528217,
-0.09209218621253967,
0.1361760050058365,
-0.02989727072417736,
-0.0851946622133255,
-0.1510564237833023,
0.1283169388771057,
0.2391798049211502,
0.11894044280052185,
0.16076141595840454,
-0.06791292130947113,
0.20488645136356354,
-0.012648288160562515,
-0.0780022069811821,
-0.09076900035142899,
-0.05700521543622017,
0.15577389299869537,
0.2464672327041626,
0.006817247718572617,
0.124849334359169,
0.08382555097341537,
-0.07287421822547913,
0.03580041602253914,
-0.012188751250505447,
0.08430609852075577,
-0.09763257950544357,
0.06613654643297195,
-0.08421371132135391,
-0.12098520994186401,
-0.00742315873503685,
0.041556067764759064,
-0.04306431859731674,
-0.14674174785614014,
0.027458786964416504,
-0.06110697612166405,
0.036772385239601135,
-0.08050934970378876,
7.854016530473018e-7,
-0.20296815037727356,
0.014596063643693924,
-0.05691041797399521,
-0.16228164732456207,
-0.059721410274505615,
0.18144500255584717,
-0.18442101776599884,
0.06516599655151367,
-0.10272729396820068,
-0.08284609764814377,
0.2031313180923462,
-0.15389947593212128,
0.07005038857460022,
-0.09376735240221024,
-0.1811612993478775,
-0.04268745332956314,
-0.04048933833837509,
-0.05997411534190178,
-0.058168958872556686,
-0.005954019725322723,
0.12598437070846558,
0.039412226527929306,
0.14090028405189514,
-0.09585989266633987,
0.028348354622721672,
0.013540862128138542,
-0.0684145987033844,
0.02092946693301201,
-0.1578391194343567,
-0.04252007231116295,
0.18234564363956451,
0.02417716570198536,
-0.0514993779361248,
0.2559434473514557,
0.04267920181155205,
-0.1311074197292328,
-0.05121040344238281,
-0.2068987786769867,
-0.04812302440404892,
-0.08361546695232391,
0.023082010447978973,
-0.03582073003053665,
-0.12117278575897217,
0.09307131171226501,
0.1445387303829193,
0.13273660838603973,
-0.00779174268245697,
-0.03384387865662575,
-0.08817526698112488,
0.07830334454774857,
0.06905962526798248,
0.08536297082901001,
-0.058569200336933136,
-0.08736724406480789,
-0.03574920445680618,
0.014276191592216492,
0.019111057743430138,
-0.14172939956188202,
0.2594221830368042,
0.32262948155403137,
-0.2099601924419403,
-0.05436660721898079,
0.012134933844208717,
-0.03569287061691284,
0.12717492878437042,
-0.028745127841830254,
0.09886042773723602,
1.7444654146608194e-34,
-0.04352559521794319,
-0.010377014987170696,
-0.073968306183815,
-0.16298379004001617,
0.023975519463419914,
-0.04066091775894165,
-0.014851788990199566,
-0.06371568888425827,
-0.020630016922950745,
-0.028572307899594307,
0.06952188163995743
] |
https://github.com/huggingface/datasets/issues/6020 | Inconsistent "The features can't be aligned" error when combining map, multiprocessing, and variable length outputs | This scenario currently requires explicitly passing the target features (to avoid the error):
```python
import datasets
...
features = dataset.features
features["output"] = = [{"test": datasets.Value("int64")}]
test2 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=32, features=features)
``` | ### Describe the bug
I'm using a dataset with map and multiprocessing to run a function that returned a variable length list of outputs. This output list may be empty. Normally this is handled fine, but there is an edge case that crops up when using multiprocessing. In some cases, an empty list result ends up in a dataset shard consisting of a single item. This results in a `The features can't be aligned` error that is difficult to debug because it depends on the number of processes/shards used.
I've reproduced a minimal example below. My current workaround is to fill empty results with a dummy value that I filter after, but this was a weird error that took a while to track down.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_list([{'idx':i} for i in range(60)])
def test_func(row, idx):
if idx==58:
return {'output': []}
else:
return {'output' : [{'test':1}, {'test':2}]}
# this works fine
test1 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=4)
# this fails
test2 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=32)
>ValueError: The features can't be aligned because the key output of features {'idx': Value(dtype='int64', id=None), 'output': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None)} has unexpected type - Sequence(feature=Value(dtype='null', id=None), length=-1, id=None) (expected either [{'test': Value(dtype='int64', id=None)}] or Value("null").
```
The error occurs during the check
```python
_check_if_features_can_be_aligned([dset.features for dset in dsets])
```
When the multiprocessing splitting lines up just right with the empty return value, one of the `dset` in `dsets` will have a single item with an empty list value, causing the error.
### Expected behavior
Expected behavior is the result would be the same regardless of the `num_proc` value used.
### Environment info
Datasets version 2.11.0
Python 3.9.16 | 36 | Inconsistent "The features can't be aligned" error when combining map, multiprocessing, and variable length outputs
### Describe the bug
I'm using a dataset with map and multiprocessing to run a function that returned a variable length list of outputs. This output list may be empty. Normally this is handled fine, but there is an edge case that crops up when using multiprocessing. In some cases, an empty list result ends up in a dataset shard consisting of a single item. This results in a `The features can't be aligned` error that is difficult to debug because it depends on the number of processes/shards used.
I've reproduced a minimal example below. My current workaround is to fill empty results with a dummy value that I filter after, but this was a weird error that took a while to track down.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_list([{'idx':i} for i in range(60)])
def test_func(row, idx):
if idx==58:
return {'output': []}
else:
return {'output' : [{'test':1}, {'test':2}]}
# this works fine
test1 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=4)
# this fails
test2 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=32)
>ValueError: The features can't be aligned because the key output of features {'idx': Value(dtype='int64', id=None), 'output': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None)} has unexpected type - Sequence(feature=Value(dtype='null', id=None), length=-1, id=None) (expected either [{'test': Value(dtype='int64', id=None)}] or Value("null").
```
The error occurs during the check
```python
_check_if_features_can_be_aligned([dset.features for dset in dsets])
```
When the multiprocessing splitting lines up just right with the empty return value, one of the `dset` in `dsets` will have a single item with an empty list value, causing the error.
### Expected behavior
Expected behavior is the result would be the same regardless of the `num_proc` value used.
### Environment info
Datasets version 2.11.0
Python 3.9.16
This scenario currently requires explicitly passing the target features (to avoid the error):
```python
import datasets
...
features = dataset.features
features["output"] = = [{"test": datasets.Value("int64")}]
test2 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=32, features=features)
``` | [
0.009292694739997387,
0.08728902041912079,
-0.10788501799106598,
-0.04953227937221527,
0.09799681603908539,
-0.08858276158571243,
0.2091011255979538,
0.028355663642287254,
-0.049665603786706924,
0.04622790589928627,
0.09990586340427399,
-0.22229821979999542,
0.15582691133022308,
0.015195420011878014,
0.05566002056002617,
0.061384376138448715,
0.0317121185362339,
-0.03305266425013542,
0.019292769953608513,
0.019635766744613647,
-0.16740311682224274,
0.05044146999716759,
-0.030542269349098206,
-0.10135438293218613,
-0.14675116539001465,
-0.17747604846954346,
-0.1752554327249527,
0.04566717520356178,
0.06622849404811859,
0.05596962198615074,
0.07523688673973083,
-0.09315671771764755,
-0.2923623323440552,
0.27517035603523254,
0.0000049393565859645605,
-0.01538744568824768,
0.19754397869110107,
-0.05663420259952545,
0.1756010800600052,
-0.042137593030929565,
-0.030189691111445427,
-0.12894494831562042,
0.0229798574000597,
0.03385062888264656,
-0.08430338650941849,
0.015437114052474499,
-0.03818589076399803,
-0.04691300913691521,
0.0016885054064914584,
0.0477687306702137,
-0.12262958288192749,
0.11428336799144745,
-0.04779819771647453,
-0.06701288372278214,
0.025585288181900978,
0.037682097405195236,
0.050584495067596436,
-0.19318747520446777,
-0.13608764111995697,
-0.09645500034093857,
0.19476474821567535,
-0.13605304062366486,
-0.04934244230389595,
0.027128608897328377,
-0.32747113704681396,
0.11458664387464523,
0.00014271502732299268,
-0.22307121753692627,
-0.1103893294930458,
0.07282529771327972,
-0.269601434469223,
0.13642051815986633,
-0.13367921113967896,
-0.0004104308900423348,
0.029221154749393463,
-0.08083941787481308,
0.06291571259498596,
0.1709282398223877,
-0.04686698317527771,
0.03936328738927841,
-0.014078747481107712,
0.14048178493976593,
0.03316284716129303,
-0.11080031096935272,
-0.25505271553993225,
0.037254832684993744,
0.014739518985152245,
0.02628622204065323,
-0.0620386004447937,
-0.10370778292417526,
-0.13807077705860138,
-0.03148168697953224,
-0.20048227906227112,
-0.04878314957022667,
-0.07861991226673126,
-0.0347771942615509,
-0.042787909507751465,
-0.1497001200914383,
0.14035040140151978,
-0.07135229557752609,
-0.2283591628074646,
0.012254665605723858,
0.07015985250473022,
-0.016836021095514297,
-0.03504324331879616,
0.06691354513168335,
0.06067018583416939,
0.007000962737947702,
0.004576890263706446,
-0.04995286837220192,
-0.0004920189967378974,
0.01732126623392105,
0.06362871080636978,
-0.07933860272169113,
0.0931321531534195,
-0.1776581108570099,
0.10571947693824768,
0.1976458877325058,
-0.09302006661891937,
0.32193025946617126,
-0.18042659759521484,
0.1082691177725792,
-0.1299939602613449,
0.002015430713072419,
0.18588434159755707,
0.18535590171813965,
-0.01855803094804287,
0.12989191710948944,
-0.07024957239627838,
0.04549495503306389,
-0.12180548161268234,
0.07276855409145355,
-0.05687567964196205,
-0.053172413259744644,
0.038071341812610626,
0.0311090387403965,
0.02993112802505493,
-0.009434127248823643,
0.13431958854198456,
-0.16003473103046417,
-0.03672116622328758,
-0.1768425703048706,
0.1579626351594925,
0.09696265310049057,
0.21667218208312988,
0.13231857120990753,
0.02056986279785633,
-0.02488895133137703,
0.041821807622909546,
-0.03807814046740532,
-0.11307540535926819,
0.0199012141674757,
0.007794467266649008,
0.05436582863330841,
-0.26165029406547546,
0.10369059443473816,
0.09792402386665344,
-0.02314167283475399,
-0.0821680873632431,
-0.12115303426980972,
0.030533745884895325,
0.004312777891755104,
-0.14013102650642395,
-0.16615253686904907,
-0.02536938153207302,
0.089643195271492,
0.03175858408212662,
0.07803034037351608,
0.011221510358154774,
0.07396866381168365,
0.18740051984786987,
-0.03094579093158245,
0.11366891860961914,
-0.1228671595454216,
-0.006913376972079277,
0.1352129429578781,
-0.23647794127464294,
0.07352187484502792,
-0.26001328229904175,
0.04652582108974457,
-0.027637114748358727,
0.04567313939332962,
-0.04503853619098663,
-0.2615194320678711,
0.03625235706567764,
0.0871117040514946,
0.022312665358185768,
0.11158642172813416,
-0.14832410216331482,
0.039872363209724426,
-0.19683323800563812,
0.10837626457214355,
0.07209008187055588,
-0.2053220272064209,
0.006253052037209272,
-0.1596618890762329,
-0.05019674450159073,
-0.06087702512741089,
-0.08528683334589005,
-0.0632055476307869,
-0.09908699244260788,
-0.03955718129873276,
0.10712990909814835,
0.03952794522047043,
0.015107512474060059,
-0.14675407111644745,
-0.39873525500297546,
0.12136862426996231,
0.025376807898283005,
-0.14726373553276062,
-0.08664459735155106,
0.07407689839601517,
-0.024648474529385567,
0.10939157009124756,
-0.16888217628002167,
0.05804295837879181,
-0.04323286563158035,
-0.06986436247825623,
-0.1437903195619583,
-0.0246436670422554,
0.03489448130130768,
0.10379502922296524,
0.014827919192612171,
-0.03060027025640011,
0.12789785861968994,
0.10505026578903198,
-0.04208974167704582,
-0.02181236818432808,
0.07984558492898941,
0.1474309265613556,
0.0008590427460148931,
-0.06813129037618637,
0.19610458612442017,
0.08121132105588913,
0.04835936427116394,
-0.03887108713388443,
-0.0868900716304779,
-0.11192016303539276,
0.13227619230747223,
0.036838870495557785,
-0.16337540745735168,
0.21281924843788147,
-0.17466497421264648,
-0.14690656960010529,
-0.027741294354200363,
-0.0018887141486629844,
-0.05694875866174698,
0.21412084996700287,
0.02866438589990139,
-0.01624806970357895,
0.07253777980804443,
0.07506977766752243,
-0.11737104505300522,
0.08169057220220566,
0.05088945850729942,
-0.12049306929111481,
-0.07028057426214218,
0.018390262499451637,
0.009259789250791073,
-0.030803406611084938,
0.3322668969631195,
-0.06449110805988312,
-0.004046058282256126,
-0.1289697289466858,
0.05168774724006653,
0.006141343619674444,
-0.03519755229353905,
0.025201622396707535,
0.15498577058315277,
0.04728944972157478,
0.14376822113990784,
-0.12374996393918991,
0.014054344967007637,
-0.01067938283085823,
-0.0563121922314167,
-0.1515587866306305,
-0.13576291501522064,
0.15133436024188995,
0.10466647148132324,
0.20513498783111572,
-0.031702183187007904,
0.03393912687897682,
0.15225835144519806,
-0.12972210347652435,
-0.10018930584192276,
0.19530722498893738,
-0.15358485281467438,
0.17146797478199005,
-0.19411872327327728,
0.042291246354579926,
-0.007107691373676062,
-0.17494896054267883,
-0.06855694949626923,
0.010300819762051105,
0.022244952619075775,
-0.07116947323083878,
-0.047019388526678085,
-0.20419098436832428,
-0.0018568267114460468,
-0.059481289237737656,
-0.10425987839698792,
0.16228288412094116,
0.020905127748847008,
-0.0683731734752655,
-0.025203153491020203,
0.010347463190555573,
0.11603435128927231,
0.18259572982788086,
-0.22734041512012482,
0.024311520159244537,
-0.17695976793766022,
-0.10636238008737564,
-0.022081200033426285,
0.17760422825813293,
0.19191552698612213,
0.0760469064116478,
-0.05286025628447533,
-0.2850359082221985,
0.29926541447639465,
-0.0689101293683052,
-0.1778699904680252,
0.12008725106716156,
0.02533089742064476,
-0.09863149374723434,
-0.04715478792786598,
0.0034550835844129324,
-0.022543471306562424,
-0.09988883137702942,
-0.01720220409333706,
-0.017661988735198975,
0.1012221947312355,
0.07075716555118561,
0.000268136675003916,
-0.19615371525287628,
0.12248755991458893,
-0.14910420775413513,
-0.10157199203968048,
0.24031713604927063,
0.06439939886331558,
0.032565683126449585,
-0.0704253539443016,
-0.07591496407985687,
-0.10335724800825119,
-0.14966799318790436,
0.3041670024394989,
0.02051648497581482,
0.02159648947417736,
-0.11115412414073944,
0.020941635593771935,
0.11904186755418777,
-0.05852755159139633,
-0.00659917900338769,
0.04797545075416565,
-0.011911438778042793,
-0.20870603621006012,
0.0076926699839532375,
-0.08170246332883835,
0.1558256447315216,
-0.10431394726037979,
0.061695490032434464,
0.014030592516064644,
-0.0326290987432003,
0.11639440059661865,
0.13024894893169403,
-0.03184613212943077,
-0.031542252749204636,
0.08323216438293457,
-0.18638181686401367,
-0.10987529158592224,
-0.10048119723796844,
0.02941691130399704,
-0.04133148863911629,
0.0019868244417011738,
-0.10970040410757065,
0.012566708028316498,
-0.007417968474328518,
0.16809463500976562,
-0.03926911577582359,
0.08074083179235458,
-0.05303329601883888,
0.047914087772369385,
-0.021717779338359833,
0.021948693320155144,
0.08616046607494354,
0.10129021853208542,
0.022462688386440277,
0.14984822273254395,
-0.0018356044311076403,
-0.09268280863761902,
-0.012295408174395561,
0.23123754560947418,
0.03909221664071083,
-0.043138932436704636,
-0.07017255574464798,
0.05932409688830376,
-0.05712452158331871,
0.23620595037937164,
0.07605575770139694,
-0.019563939422369003,
-0.05402449890971184,
0.12629619240760803,
0.10485395044088364,
-0.22850944101810455,
0.08223681896924973,
0.17351005971431732,
0.015709644183516502,
0.12137405574321747,
0.00787033699452877,
0.20011398196220398,
0.07385101914405823,
0.10547343641519547,
0.16960084438323975,
0.028451967984437943,
0.10821086168289185,
-0.00381031003780663,
0.007266447879374027,
0.02237061969935894,
-0.01105436310172081,
0.08601000159978867,
-0.15443216264247894,
-0.039365947246551514,
-0.2553517520427704,
0.12102344632148743,
0.13498906791210175,
-0.021805044263601303,
-0.14361511170864105,
-0.034128714352846146,
-0.18026724457740784,
0.13064877688884735,
-0.15250934660434723,
0.11449917405843735,
-0.04302823543548584,
0.22408731281757355,
-0.029317747801542282,
0.07948552072048187,
-0.0896168127655983,
0.1895691305398941,
-0.09290248155593872,
0.05874010920524597,
0.10644489526748657,
-0.33006909489631653,
0.08293174207210541,
0.09249210357666016,
0.01198592595756054,
-0.051397744566202164,
-0.17434710264205933,
-0.03687874972820282,
0.08306063711643219,
0.062328606843948364,
0.19158367812633514,
0.025569185614585876,
0.08522271364927292,
0.09644123166799545,
-0.35395127534866333,
0.09993951767683029,
0.05308089032769203,
0.07663661986589432,
-0.11921750009059906,
0.0030740820802748203,
0.08708737790584564,
0.06277266889810562,
-0.01651940867304802,
0.0034579739440232515,
0.00700873788446188,
0.21624918282032013,
0.15526747703552246,
0.14572231471538544,
0.105957992374897,
0.021883100271224976,
0.11900060623884201,
-0.15958121418952942,
0.05780543386936188,
-0.008438080549240112,
-0.01722368411719799,
-0.007712623570114374,
-0.04436618089675903,
0.15197397768497467,
0.04841301590204239,
-0.10487590730190277,
-0.0311187244951725,
0.09754502028226852,
-0.0877600684762001,
-0.006101629231125116,
-0.06363587081432343,
0.133300319314003,
0.27657637000083923,
-0.06645189970731735,
-0.04033825919032097,
-0.0031695172656327486,
-0.009770147502422333,
-0.06428012996912003,
0.03672641143202782,
0.05657947435975075,
0.0355956144630909,
0.10164386034011841,
0.012872506864368916,
-0.02797100692987442,
-0.09665520489215851,
-0.1854027658700943,
-0.10351014882326126,
0.0832972601056099,
0.06781892478466034,
0.004743380006402731,
0.06080039590597153,
-0.04697074741125107,
-0.031211188063025475,
0.027141623198986053,
0.10835687071084976,
0.10182031244039536,
-0.05546749755740166,
-0.09925577789545059,
0.05877823010087013,
-0.07948867976665497,
-0.05870592221617699,
-0.10541844367980957,
-0.21462970972061157,
-0.09388313442468643,
0.009859327226877213,
0.19724033772945404,
0.023704353719949722,
0.09896200895309448,
-0.02611745335161686,
0.082644522190094,
0.01555935200303793,
0.07849527895450592,
-0.12081296741962433,
0.04012821987271309,
-0.08756355941295624,
0.05636703222990036,
0.08694760501384735,
0.1328582912683487,
0.04113942012190819,
0.10572495311498642,
-0.1287044882774353,
-0.12142667174339294,
0.0043928599916398525,
0.1563359498977661,
-0.02545771934092045,
-0.0036548904608935118,
-0.2561779320240021,
-0.12781532108783722,
-0.04587574675679207,
-0.002143237739801407,
0.0793437585234642,
0.11186573654413223,
-0.03193196281790733,
-0.022398516535758972,
0.0566241592168808,
-0.1003236323595047,
-0.05454622209072113,
0.08794429153203964,
-0.03209109604358673,
-0.03100968338549137,
-0.14689530432224274,
-0.1390821784734726,
-2.1496081522494856e-32,
0.06806765496730804,
0.06005726382136345,
-0.10407675802707672,
-0.12501490116119385,
-0.13097262382507324,
0.03172052651643753,
-0.10143402218818665,
-0.05405063554644585,
0.17018331587314606,
0.011641166172921658,
-0.01585562899708748,
-0.04465899243950844,
0.055011045187711716,
0.04144727811217308,
0.04341224581003189,
-0.02517598681151867,
0.13263395428657532,
0.18630079925060272,
-0.01706639491021633,
-0.010856456123292446,
0.13895782828330994,
-0.032112233340740204,
-0.05497238412499428,
0.047354742884635925,
0.25763705372810364,
0.0699208527803421,
0.07216902077198029,
-0.16343796253204346,
0.06617828458547592,
-0.136509969830513,
-0.012952106073498726,
0.2463279813528061,
-0.01297788042575121,
-0.0000630589056527242,
-0.08045226335525513,
-0.24654649198055267,
0.026763897389173508,
-0.05501715466380119,
0.02159661427140236,
-0.012138964608311653,
-0.04181918874382973,
0.05982077121734619,
0.08497478067874908,
0.03000164031982422,
0.006972478237003088,
-0.06296204775571823,
0.06146548315882683,
0.17515407502651215,
-0.12698139250278473,
-0.055190324783325195,
0.035478003323078156,
-0.08404100686311722,
0.03574712574481964,
0.10309389978647232,
-0.11156768351793289,
-0.07497601211071014,
0.15956467390060425,
0.06133974716067314,
-0.17834575474262238,
-0.03783471882343292,
0.10001207143068314,
0.038378629833459854,
0.2509024441242218,
0.03644431382417679,
-0.04820866882801056,
0.07328783720731735,
0.2771359086036682,
0.03433170169591904,
0.14721819758415222,
0.03134293481707573,
-0.16543740034103394,
0.0615929439663887,
-0.07641813158988953,
-0.05791003257036209,
-0.028835387900471687,
0.16517582535743713,
-0.023098593577742577,
0.10361538827419281,
-0.08387488126754761,
-0.1642310619354248,
-0.03562672436237335,
-0.020475590601563454,
-0.012253466993570328,
0.04756452143192291,
-0.016031630337238312,
0.039914943277835846,
0.014135624282062054,
-0.01272289827466011,
-0.03997292369604111,
-0.054661825299263,
0.04788943752646446,
0.4405107796192169,
-0.04484806954860687,
-0.09134482592344284,
-0.11362854391336441,
0.11617793887853622,
-0.1546875238418579,
0.14525261521339417,
-0.16749964654445648,
-0.008242614567279816,
0.12312231957912445,
-0.1873558610677719,
0.020295897498726845,
0.13826152682304382,
0.1391218900680542,
0.08888282626867294,
0.08126553893089294,
0.06086185947060585,
-0.06957673281431198,
-0.06389452517032623,
-0.17428357899188995,
0.03302915394306183,
-0.13167454302310944,
0.01882065460085869,
0.20644666254520416,
0.008430133573710918,
0.0070112585090100765,
-0.15097598731517792,
0.08975547552108765,
0.1307457834482193,
0.05019553750753403,
-0.01683201640844345,
-0.19102415442466736,
-0.06908021122217178,
0.11605198681354523,
-0.04803038388490677,
0.006244741380214691,
-0.1844017207622528,
0.042985573410987854,
-0.08654158562421799,
0.08597531169652939,
-0.046626340597867966,
7.383690672213561e-7,
-0.10494392365217209,
-0.040340159088373184,
0.0767732784152031,
-0.05389634147286415,
-0.11833472549915314,
0.17604708671569824,
-0.09801243245601654,
0.1767881214618683,
-0.194616436958313,
0.23119044303894043,
0.0648559182882309,
-0.06258842349052429,
0.10043735802173615,
-0.00352212181314826,
0.18750795722007751,
-0.19150395691394806,
-0.01671523228287697,
0.133250430226326,
-0.22387614846229553,
0.08312511444091797,
0.06943748891353607,
-0.059093721210956573,
0.08021753281354904,
-0.05343153327703476,
0.12979762256145477,
-0.05908649042248726,
-0.14221180975437164,
0.08487191796302795,
-0.005995242856442928,
0.03849126398563385,
0.08860781043767929,
-0.2127581089735031,
0.18158984184265137,
0.16394314169883728,
-0.1681893765926361,
0.06390397995710373,
-0.15598735213279724,
0.05888456106185913,
0.009321540594100952,
-0.019357379525899887,
-0.1759181022644043,
-0.04258815944194794,
0.09906508028507233,
0.062111228704452515,
0.0801861584186554,
0.016068946570158005,
-0.09963326901197433,
0.16793465614318848,
-0.06377346068620682,
0.17304307222366333,
-0.0330788679420948,
0.18991991877555847,
0.17346744239330292,
0.34144794940948486,
0.009559256955981255,
-0.13778026401996613,
0.06049298867583275,
-0.1970454752445221,
-0.025365645065903664,
-0.08443745225667953,
-0.13726584613323212,
-0.10424111783504486,
-0.09856358170509338,
0.044037044048309326,
0.15879122912883759,
-0.17899134755134583,
-0.2824258506298065,
2.2961821958924474e-34,
-0.030507970601320267,
0.00031472239061258733,
0.02365374006330967,
-0.23333071172237396,
-0.13957859575748444,
-0.08156786113977432,
0.002575508551672101,
0.12001679837703705,
-0.08945033699274063,
-0.04182729870080948,
-0.11112280189990997
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | Hi ! The huggingface/dataset-viewer code was not maintained anymore because we switched to a new dataset viewer that is deployed available for each dataset the Hugging Face website.
What are you using this old repository for ? |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 37 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
Hi ! The huggingface/dataset-viewer code was not maintained anymore because we switched to a new dataset viewer that is deployed available for each dataset the Hugging Face website.
What are you using this old repository for ? | [
-0.044395171105861664,
0.07241008430719376,
-0.07144127041101456,
0.15286171436309814,
0.17480458319187164,
0.09523565322160721,
0.15399660170078278,
-0.02890591509640217,
0.10387402772903442,
0.1659018099308014,
-0.1368281990289688,
-0.0012318220688030124,
0.013825668022036552,
0.131914421916008,
0.05369128659367561,
-0.1637100726366043,
-0.05512189120054245,
-0.07077660411596298,
-0.10308918356895447,
-0.014514784328639507,
0.14017966389656067,
0.039120908826589584,
0.17699001729488373,
-0.04128291457891464,
0.002916091587394476,
-0.03737843036651611,
-0.08798685669898987,
0.1025366336107254,
0.04093305766582489,
-0.120261549949646,
0.17848747968673706,
0.21065771579742432,
0.15682503581047058,
0.16874760389328003,
0.000005845646228408441,
0.06233934313058853,
0.015320013277232647,
0.1679709255695343,
-0.11960417777299881,
-0.06074807047843933,
0.14861321449279785,
-0.14589910209178925,
0.020627502351999283,
-0.06839749962091446,
-0.032838642597198486,
-0.14607322216033936,
0.016191516071558,
-0.03869807720184326,
0.13921235501766205,
0.1433553546667099,
0.03512509912252426,
0.11403674632310867,
0.02726266346871853,
-0.15308959782123566,
0.07370682060718536,
0.16607515513896942,
-0.007287556305527687,
0.15474195778369904,
-0.17720921337604523,
0.01576344110071659,
0.06625258922576904,
0.1050570160150528,
0.007631469052284956,
-0.05658361688256264,
0.017135150730609894,
0.06564991176128387,
-0.17072811722755432,
-0.13155999779701233,
0.031624935567379,
0.14020533859729767,
0.18777011334896088,
0.01595349796116352,
-0.0931890532374382,
0.11997213959693909,
-0.11243734508752823,
0.0580945760011673,
-0.10661934316158295,
-0.04265828803181648,
0.019931048154830933,
0.05322777107357979,
-0.20790959894657135,
-0.19388440251350403,
-0.0872267484664917,
-0.14544351398944855,
0.04640684276819229,
0.008845573291182518,
-0.1066046953201294,
-0.016131462529301643,
-0.11327795684337616,
-0.16294579207897186,
0.16989512741565704,
0.001397755229845643,
0.016378140076994896,
0.006217769347131252,
0.09461288154125214,
0.04174349084496498,
-0.06716729700565338,
-0.06770923733711243,
0.07051430642604828,
0.09836577624082565,
0.018766969442367554,
-0.029754245653748512,
-0.12868666648864746,
0.011962727643549442,
0.17441511154174805,
-0.011959259398281574,
0.1182672306895256,
-0.10458402335643768,
0.15110810101032257,
0.2752220630645752,
0.011035976000130177,
0.047352056950330734,
-0.020035097375512123,
-0.11145913600921631,
-0.08353545516729355,
0.08786661922931671,
0.1241081953048706,
0.03792758285999298,
0.1012539193034172,
-0.008557534776628017,
0.2767498791217804,
0.05404304340481758,
-0.022461092099547386,
0.2351214736700058,
-0.011144641786813736,
-0.02846325747668743,
0.06471751630306244,
-0.03434334322810173,
0.031001346185803413,
-0.18752215802669525,
-0.05402775853872299,
0.000767100602388382,
-0.0008182633318938315,
-0.024379931390285492,
0.08128044009208679,
-0.06474711745977402,
-0.051000356674194336,
-0.06058315187692642,
0.06023518741130829,
0.0072485473938286304,
0.09430745244026184,
0.07502632588148117,
-0.2748076617717743,
-0.022912118583917618,
0.0850590169429779,
-0.013688241131603718,
-0.0685127004981041,
0.06367524713277817,
-0.04225601255893707,
0.07657800614833832,
-0.17822176218032837,
0.2084147036075592,
-0.2675299048423767,
0.11907680332660675,
0.02833130769431591,
0.0383497029542923,
0.07398336380720139,
-0.04537435248494148,
-0.376798540353775,
-0.09443600475788116,
0.11134281754493713,
0.023580053821206093,
0.08348656445741653,
-0.054786283522844315,
0.07623535394668579,
0.18622639775276184,
0.06913470476865768,
0.14321115612983704,
-0.06677436828613281,
-0.0746263936161995,
-0.0004339334846008569,
-0.0012713680043816566,
-0.11551164835691452,
-0.1873442381620407,
-0.03993852064013481,
0.13691331446170807,
-0.013565235771238804,
-0.052876442670822144,
-0.19759970903396606,
0.03565889596939087,
-0.012159655801951885,
-0.21992769837379456,
0.010514294728636742,
-0.055938612669706345,
0.07937286049127579,
-0.14609988033771515,
-0.24509747326374054,
0.06181023269891739,
-0.03717810660600662,
0.09033609181642532,
-0.12212549149990082,
-0.0040510306134819984,
0.05821603536605835,
0.17287442088127136,
-0.08510801941156387,
-0.12154570966959,
0.11678732186555862,
-0.22214695811271667,
0.01730121299624443,
-0.20033641159534454,
-0.08327597379684448,
-0.05528012663125992,
0.06705475598573685,
0.19645234942436218,
-0.05408623442053795,
-0.04155224189162254,
-0.0824093148112297,
0.08516352623701096,
0.07811052352190018,
-0.2570801377296448,
-0.11675859987735748,
-0.06004316732287407,
-0.0994361862540245,
0.026211418211460114,
-0.030386827886104584,
-0.04893447458744049,
-0.11668901890516281,
0.0775308609008789,
-0.017457451671361923,
0.23993374407291412,
-0.03969188034534454,
0.150625541806221,
0.07979600131511688,
-0.041885264217853546,
-0.06544845551252365,
0.04962528869509697,
-0.06095825880765915,
-0.019866373389959335,
0.14660367369651794,
-0.03097507357597351,
-0.026208745315670967,
-0.008255267515778542,
0.06737121194601059,
0.1291223019361496,
-0.06729567050933838,
0.06350362300872803,
0.14207039773464203,
-0.04529067128896713,
0.09531497955322266,
-0.13379211723804474,
-0.04212288185954094,
-0.04388486221432686,
-0.15851883590221405,
0.15725664794445038,
0.0061245751567184925,
0.13568510115146637,
-0.13321876525878906,
0.015792641788721085,
-0.008049285039305687,
0.04591471329331398,
0.09818984568119049,
0.12937480211257935,
-0.05387764051556587,
0.06362240016460419,
0.009930740110576153,
0.04776252433657646,
-0.05389007180929184,
0.08643775433301926,
-0.17990101873874664,
0.0699361115694046,
0.07320436090230942,
0.0868903324007988,
-0.12243852764368057,
-0.05234246328473091,
0.09508299082517624,
-0.011393430642783642,
0.10767177492380142,
-0.0030521417502313852,
-0.019740533083677292,
0.06924691796302795,
-0.025724617764353752,
0.05759859085083008,
0.021012496203184128,
-0.10718836635351181,
0.0651453360915184,
-0.1364613026380539,
0.0796598345041275,
-0.10422100126743317,
-0.10078515857458115,
0.07008829712867737,
-0.1320473998785019,
0.12451110035181046,
0.05612734705209732,
-0.04148870334029198,
0.15453462302684784,
0.03483758866786957,
-0.012458469718694687,
-0.017779165878891945,
-0.15644897520542145,
0.06184437870979309,
-0.055590659379959106,
0.09055540710687637,
0.012353166937828064,
-0.23613430559635162,
-0.07315544039011002,
0.04538467153906822,
0.004999885801225901,
-0.011983768083155155,
-0.06700985878705978,
0.06671402603387833,
-0.09596183151006699,
0.07305227965116501,
0.09953635185956955,
0.036538515239953995,
-0.02094307355582714,
0.028441045433282852,
0.041105419397354126,
0.03888123109936714,
-0.04049777612090111,
-0.17848621308803558,
0.11159614473581314,
-0.14768315851688385,
0.07980386167764664,
0.03756089136004448,
0.1783858984708786,
-0.0385909304022789,
-0.020392337813973427,
-0.08067891001701355,
0.07373499870300293,
0.18018394708633423,
0.0014337096363306046,
-0.08569355309009552,
0.06131552904844284,
0.0461408905684948,
-0.0836571604013443,
0.1579839140176773,
-0.1932416707277298,
-0.12444693595170975,
0.1598469316959381,
-0.16575482487678528,
-0.17135043442249298,
-0.005596303381025791,
0.030648496001958847,
-0.12586940824985504,
0.08462656289339066,
-0.0832994133234024,
-0.05700381472706795,
-0.20680861175060272,
0.12246065586805344,
-0.04933461546897888,
-0.06362303346395493,
0.07648516446352005,
0.06350050866603851,
0.09911677241325378,
0.04799962043762207,
-0.14734427630901337,
-0.0046683549880981445,
-0.03741014003753662,
0.051693808287382126,
-0.028652481734752655,
0.014960580505430698,
0.023912901058793068,
0.04817868769168854,
-0.04409840703010559,
0.08401361107826233,
-0.18484899401664734,
-0.18425549566745758,
0.13267835974693298,
-0.2621423304080963,
0.027261434122920036,
-0.07316675037145615,
0.021047554910182953,
0.05825023725628853,
0.04040039703249931,
-0.021692587062716484,
0.10381578654050827,
0.13718214631080627,
0.21787585318088531,
0.061364538967609406,
-0.29935410618782043,
-0.1447809934616089,
-0.07194589823484421,
0.14787055552005768,
-0.06790141016244888,
0.021762600168585777,
-0.009164074435830116,
0.019607840105891228,
-0.22852005064487457,
0.0759051963686943,
-0.06715355813503265,
-0.025256697088479996,
-0.2246808558702469,
0.0015242262743413448,
0.062166083604097366,
0.12291479110717773,
0.045637715607881546,
-0.06709805876016617,
0.18028247356414795,
0.006492545362561941,
0.07751572132110596,
-0.10697825253009796,
-0.05508588254451752,
0.05859944224357605,
-0.06515882909297943,
0.07407383620738983,
0.015155930072069168,
-0.02384602278470993,
0.1123511865735054,
0.1355583667755127,
0.1607092022895813,
-0.010092981159687042,
0.2266101837158203,
0.02400391735136509,
0.1497790813446045,
0.02430647797882557,
-0.08655355125665665,
0.12391148507595062,
0.1220739334821701,
0.19594191014766693,
-0.07583727687597275,
-0.014809836633503437,
0.01284791063517332,
0.009680468589067459,
-0.14929307997226715,
0.11945383250713348,
-0.06542761623859406,
-0.15037620067596436,
-0.07497836649417877,
0.11235211789608002,
-0.10998142510652542,
-0.0010968471178784966,
-0.19836147129535675,
0.036923106759786606,
0.03435223549604416,
0.04242265596985817,
-0.030116284266114235,
-0.1477731615304947,
0.12448445707559586,
0.07486912608146667,
-0.0019510147394612432,
0.19205577671527863,
0.19314903020858765,
0.06531752645969391,
0.21392863988876343,
0.11026599258184433,
-0.05448900908231735,
0.20950835943222046,
-0.10919417440891266,
-0.08412636071443558,
-0.10844963043928146,
0.06329847872257233,
0.03620287403464317,
0.15472590923309326,
0.06463134288787842,
-0.04028194770216942,
-0.009931398555636406,
-0.0552893728017807,
-0.09060883522033691,
-0.008326882496476173,
-0.035097215324640274,
-0.12018116563558578,
-0.11917054653167725,
-0.23972007632255554,
-0.11778824031352997,
0.10230521857738495,
-0.017177339643239975,
0.053330350667238235,
0.0013651892077177763,
0.020440204069018364,
-0.0647207498550415,
-0.16894538700580597,
-0.03156320005655289,
-0.03917194902896881,
0.02335602231323719,
-0.0707821473479271,
0.06287408620119095,
0.16005229949951172,
-0.18613550066947937,
-0.0050191013142466545,
-0.1412050426006317,
-0.0260460264980793,
0.06612882763147354,
-0.07066766172647476,
0.007110764272511005,
0.026468586176633835,
0.11495954543352127,
-0.1054585725069046,
0.00599333830177784,
-0.10909803211688995,
-0.02626584842801094,
0.28536397218704224,
0.17511965334415436,
0.20053058862686157,
-0.1744636595249176,
0.017185311764478683,
0.16010300815105438,
0.013182724826037884,
-0.0043922835029661655,
-0.2881712317466736,
0.07577617466449738,
0.057663578540086746,
-0.11458709836006165,
-0.051011133939027786,
0.022640738636255264,
0.045286327600479126,
0.004600317683070898,
-0.07338328659534454,
0.2735041677951813,
0.04949008300900459,
0.009033224545419216,
0.10476720333099365,
-0.021630963310599327,
0.18721561133861542,
-0.06822860985994339,
-0.11097833514213562,
-0.21526354551315308,
0.04979882389307022,
-0.13497351109981537,
-0.04539266973733902,
-0.09847445040941238,
0.25944823026657104,
0.03375444561243057,
-0.03918671980500221,
-0.20056286454200745,
0.09825311601161957,
0.08875283598899841,
-0.29349765181541443,
0.14878742396831512,
-0.013106763362884521,
0.039533622562885284,
0.019558245316147804,
-0.11258005350828171,
0.06360193341970444,
-0.0002901988918893039,
-0.15597650408744812,
0.19519704580307007,
0.05015105381608009,
0.011556094512343407,
0.028930529952049255,
0.028689276427030563,
-0.12225341796875,
0.052238013595342636,
0.0951216071844101,
-0.09317139536142349,
-0.029275987297296524,
0.12649425864219666,
0.20480066537857056,
-0.21966567635536194,
0.033552903681993484,
-0.04761297628283501,
0.12589332461357117,
-0.09655295312404633,
-0.11650912463665009,
0.11911503225564957,
-0.004344063811004162,
0.1389778107404709,
0.027495792135596275,
-0.04158885404467583,
-0.18186457455158234,
-0.07496480643749237,
0.03795713186264038,
0.07520598918199539,
0.06639011204242706,
-0.16914263367652893,
-0.022943012416362762,
-2.6716820745849205e-32,
0.020188409835100174,
0.10752049088478088,
-0.10482414066791534,
0.08407849818468094,
-0.21048253774642944,
0.011396792717278004,
-0.08748097717761993,
-0.10865896195173264,
-0.0830501914024353,
-0.15810152888298035,
-0.016857007518410683,
0.10445575416088104,
0.09055548161268234,
0.04622294008731842,
-0.09022188186645508,
-0.08167825639247894,
-0.08570338040590286,
-0.10663586109876633,
0.04058072715997696,
0.023389963433146477,
0.03620971739292145,
0.017710255458950996,
-0.03306848183274269,
-0.0807582437992096,
0.017898542806506157,
-0.0816369280219078,
-0.07101690769195557,
0.11384844779968262,
0.06709235906600952,
0.05558870732784271,
-0.06320876628160477,
-0.005524006672203541,
-0.012021000497043133,
0.10934089869260788,
0.008867057040333748,
0.027374185621738434,
-0.1379903256893158,
-0.07069286704063416,
-0.0808437168598175,
0.004116302356123924,
0.023524006828665733,
0.07880870997905731,
0.04563017934560776,
-0.21686215698719025,
0.02232467569410801,
0.029287362471222878,
0.02228173241019249,
0.021292706951498985,
0.09459512680768967,
0.047978390008211136,
-0.05869865417480469,
0.05760940536856651,
-0.04134904965758324,
0.045798152685165405,
0.12600505352020264,
0.02589583955705166,
0.08980558067560196,
0.05163690447807312,
0.021707355976104736,
-0.007024733349680901,
0.14739440381526947,
-0.05644791200757027,
-0.044274430721998215,
0.06337185949087143,
0.2867688834667206,
-0.01067032665014267,
0.16177614033222198,
-0.16742461919784546,
0.013520688749849796,
-0.06314685940742493,
0.005122447852045298,
0.10504578053951263,
-0.008318061009049416,
0.06232918053865433,
-0.17823711037635803,
-0.0585000105202198,
-0.17019177973270416,
0.011754868552088737,
0.07035372406244278,
0.010792379267513752,
-0.049805376678705215,
0.01343836821615696,
0.15611208975315094,
0.05342152342200279,
0.11892229318618774,
0.1299312263727188,
-0.18277563154697418,
-0.07703164219856262,
-0.044688090682029724,
0.02822262980043888,
-0.015373547561466694,
0.05337333306670189,
-0.16286975145339966,
-0.11185218393802643,
-0.1333981305360794,
0.0231659896671772,
0.050838109105825424,
0.0951630026102066,
0.054606612771749496,
-0.1566203385591507,
0.053032875061035156,
0.0652918666601181,
0.1650545746088028,
0.07232461124658585,
0.0953676775097847,
-0.08178611844778061,
0.14192253351211548,
0.11487720161676407,
-0.23034663498401642,
-0.03614426031708717,
-0.010206025093793869,
0.02719515562057495,
0.07617835700511932,
-0.010726836510002613,
0.041813116520643234,
0.001088841469027102,
-0.05141068994998932,
-0.1300845593214035,
0.08323882520198822,
0.14325855672359467,
-0.3695220947265625,
0.04537150263786316,
-0.15260274708271027,
0.010362344793975353,
-0.05922747775912285,
0.03602438047528267,
-0.02607547678053379,
-0.06186563894152641,
0.13006745278835297,
0.0011858732905238867,
-0.022382566705346107,
-0.1010013297200203,
7.45308341265627e-7,
-0.04023322835564613,
0.1457459032535553,
0.02361002005636692,
0.04393288120627403,
0.002253348473459482,
-0.09859544783830643,
-0.2803506851196289,
0.11269623786211014,
0.0068007539957761765,
0.11426033824682236,
0.11910965293645859,
-0.07635689526796341,
0.0357838049530983,
-0.04273213818669319,
0.07834947854280472,
-0.06613054871559143,
-0.08602957427501678,
-0.0779745951294899,
-0.11166962236166,
0.10433913767337799,
0.14842072129249573,
0.09989865869283676,
0.05590426176786423,
0.002608222421258688,
0.06878572702407837,
-0.02341684326529503,
-0.053742676973342896,
-0.20145000517368317,
0.1752992570400238,
-0.10719972103834152,
-0.09718849509954453,
0.002144889673218131,
-0.03456295654177666,
-0.026313969865441322,
0.08804567903280258,
-0.21925272047519684,
-0.20990395545959473,
-0.07285619527101517,
-0.002519270870834589,
0.11776968836784363,
0.18415063619613647,
-0.08576484769582748,
-0.14934764802455902,
-0.18792571127414703,
0.1590670645236969,
0.005915522575378418,
-0.09683871269226074,
0.07662119716405869,
-0.14056576788425446,
-0.05202643945813179,
0.012233622372150421,
0.05009998381137848,
0.07169736921787262,
0.10687662661075592,
-0.001316651701927185,
-0.1132679134607315,
-0.12130548804998398,
-0.012459849007427692,
0.14906415343284607,
-0.14784908294677734,
-0.10118410736322403,
-0.09043702483177185,
-0.029506394639611244,
0.06484100222587585,
-0.05022064223885536,
-0.07108903676271439,
0.05510389059782028,
7.634190090258396e-35,
-0.016696138307452202,
0.04989763721823692,
0.06218057870864868,
-0.12967810034751892,
0.13603776693344116,
-0.09740644693374634,
0.181205153465271,
-0.025385353714227676,
-0.04270947724580765,
-0.12479879707098007,
-0.0935237780213356
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | I think these parts are outdated:
* https://github.com/huggingface/datasets-viewer/blob/8efad8eae313a891f713469983bf4c744786f26e/run.py#L126-L131
* https://github.com/huggingface/datasets-viewer/blob/8efad8eae313a891f713469983bf4c744786f26e/run.py#L145-L150
To make the viewer work, the first one should be replaced with the following:
```python
dataset_module = datasets.load.dataset_module_factory(path)
builder_cls = datasets.load.import_main_class(dataset_module.module_path)
confs = builder_cls.BUILDER_CONFIGS
```
And the second one:
```python
dataset_module = datasets.load.dataset_module_factory(path)
builder_cls = datasets.load.import_main_class(dataset_module.module_path)
if conf:
builder_instance = builder_cls(name=conf, cache_dir=path if path_to_datasets is not None else None)
else:
builder_instance = builder_cls(cache_dir=path if path_to_datasets is not None else None)
```
But as @lhoestq suggested, it's better to use the `datasets-server` API nowadays to [fetch the rows](https://huggingface.co/docs/datasets-server/rows). |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 87 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
I think these parts are outdated:
* https://github.com/huggingface/datasets-viewer/blob/8efad8eae313a891f713469983bf4c744786f26e/run.py#L126-L131
* https://github.com/huggingface/datasets-viewer/blob/8efad8eae313a891f713469983bf4c744786f26e/run.py#L145-L150
To make the viewer work, the first one should be replaced with the following:
```python
dataset_module = datasets.load.dataset_module_factory(path)
builder_cls = datasets.load.import_main_class(dataset_module.module_path)
confs = builder_cls.BUILDER_CONFIGS
```
And the second one:
```python
dataset_module = datasets.load.dataset_module_factory(path)
builder_cls = datasets.load.import_main_class(dataset_module.module_path)
if conf:
builder_instance = builder_cls(name=conf, cache_dir=path if path_to_datasets is not None else None)
else:
builder_instance = builder_cls(cache_dir=path if path_to_datasets is not None else None)
```
But as @lhoestq suggested, it's better to use the `datasets-server` API nowadays to [fetch the rows](https://huggingface.co/docs/datasets-server/rows). | [
-0.04891602694988251,
0.12562252581119537,
-0.1030048280954361,
0.18203099071979523,
0.17893671989440918,
0.060974884778261185,
0.1923028975725174,
-0.021689672023057938,
0.07197578251361847,
0.11407952010631561,
-0.1546126902103424,
-0.012612042017281055,
-0.004206797573715448,
0.13980181515216827,
0.04659959301352501,
-0.1532468944787979,
-0.05134124681353569,
-0.07854288071393967,
-0.05452730879187584,
-0.012025781907141209,
0.0737677738070488,
0.025609798729419708,
0.17028170824050903,
-0.0881359651684761,
0.007356367073953152,
-0.01938372477889061,
-0.10100951045751572,
0.09654462337493896,
0.04094894975423813,
-0.149730384349823,
0.16322650015354156,
0.25672444701194763,
0.130740687251091,
0.2303009033203125,
0.000005757870439992985,
0.056271061301231384,
0.06569487601518631,
0.1813926249742508,
-0.1349201500415802,
-0.042536381632089615,
0.0982784777879715,
-0.1343555450439453,
0.029708001762628555,
-0.0905352458357811,
-0.04396321624517441,
-0.1870546191930771,
-0.07014210522174835,
-0.022387424483895302,
0.18055222928524017,
0.12672027945518494,
0.05386026203632355,
0.10608412325382233,
0.03222918510437012,
-0.14840641617774963,
0.07705172896385193,
0.12098781764507294,
-0.006202926859259605,
0.1739656925201416,
-0.16956207156181335,
0.03921880945563316,
0.052003759890794754,
0.11142118275165558,
0.0054399906657636166,
-0.08873579651117325,
0.1023644357919693,
0.03715897351503372,
-0.1299428641796112,
-0.17417298257350922,
-0.0071187689900398254,
0.1587413102388382,
0.14839544892311096,
-0.015232833102345467,
-0.11263352632522583,
0.10652211308479309,
-0.1087707132101059,
-0.009139502421021461,
-0.1142447292804718,
-0.005319806281477213,
0.030780373141169548,
0.018901441246271133,
-0.18373152613639832,
-0.20853671431541443,
-0.08812964707612991,
-0.1578490138053894,
0.0607747882604599,
0.02747390605509281,
-0.09986356645822525,
0.0044362968765199184,
-0.14233525097370148,
-0.1512535959482193,
0.24398308992385864,
-0.06577639281749725,
0.04443962126970291,
-0.0004918526974506676,
0.1040174812078476,
0.028490552678704262,
-0.07319000363349915,
-0.03556320443749428,
0.03582524135708809,
0.10550912469625473,
-0.06197599321603775,
-0.03162359818816185,
-0.09965765476226807,
0.05734340474009514,
0.1262747049331665,
-0.045184630900621414,
0.11143577843904495,
-0.01169274840503931,
0.10718865692615509,
0.2743311822414398,
-0.030204489827156067,
0.0533444844186306,
-0.00605359859764576,
-0.168937548995018,
-0.08360569924116135,
0.13475343585014343,
0.094396211206913,
0.07141133397817612,
0.10518541932106018,
0.03764234483242035,
0.240983247756958,
0.05210953950881958,
-0.005933605600148439,
0.2224409580230713,
-0.009137559682130814,
-0.036255497485399246,
0.0645236223936081,
-0.02957821637392044,
0.06311314553022385,
-0.18296192586421967,
-0.07582348585128784,
0.030656326562166214,
0.0443907268345356,
-0.030904874205589294,
0.07659123092889786,
-0.03734845295548439,
-0.0360918864607811,
-0.09982742369174957,
0.07193227112293243,
0.0060536814853549,
0.09241694211959839,
0.05944308638572693,
-0.30608803033828735,
-0.08008772879838943,
0.04347454011440277,
0.008384216576814651,
-0.005349789280444384,
0.0585758201777935,
-0.08457274734973907,
0.05900606885552406,
-0.19415509700775146,
0.190578892827034,
-0.26179373264312744,
0.15427234768867493,
0.004297328647226095,
0.12209878116846085,
0.09049758315086365,
-0.05761287361383438,
-0.32623663544654846,
-0.08456598967313766,
0.12410984933376312,
0.017205046489834785,
0.08052514493465424,
-0.12745401263237,
0.09302718192338943,
0.2145887017250061,
0.09900851547718048,
0.14084464311599731,
-0.05908407270908356,
-0.056821536272764206,
-0.02502274326980114,
-0.0482143759727478,
-0.11022178828716278,
-0.15204483270645142,
-0.04442906379699707,
0.07196798920631409,
-0.013878648169338703,
-0.12235169112682343,
-0.1817578673362732,
0.029959628358483315,
0.03300774097442627,
-0.17956554889678955,
0.005132315680384636,
-0.05790179967880249,
0.08012372255325317,
-0.13628603518009186,
-0.24443916976451874,
0.12135084718465805,
-0.008165007457137108,
0.07333238422870636,
-0.12371151149272919,
0.017020590603351593,
0.06412138044834137,
0.16564065217971802,
-0.08151255548000336,
-0.15169832110404968,
0.07892676442861557,
-0.1963045299053192,
0.015922505408525467,
-0.2178257256746292,
-0.07236209511756897,
-0.019767863675951958,
0.09233544021844864,
0.19516944885253906,
-0.03166428953409195,
-0.03571627289056778,
-0.10073688626289368,
0.08687525242567062,
0.034612592309713364,
-0.20845116674900055,
-0.12935759127140045,
-0.05661234259605408,
-0.02994704432785511,
0.03524956852197647,
-0.05197884142398834,
-0.05430643633008003,
-0.08256440609693527,
0.056625962257385254,
0.004243441391736269,
0.19786545634269714,
0.0019655136857181787,
0.12772054970264435,
0.038928352296352386,
0.016488203778862953,
-0.012505392543971539,
0.05585167184472084,
-0.09102693945169449,
-0.02412446215748787,
0.12218756973743439,
-0.028623271733522415,
-0.04853985458612442,
-0.02623959630727768,
0.024890374392271042,
0.1253257542848587,
-0.06321149319410324,
0.06938011199235916,
0.06807807832956314,
-0.08825813233852386,
0.09470505267381668,
-0.08574136346578598,
-0.0625424012541771,
-0.07715173810720444,
-0.1303248554468155,
0.11901460587978363,
-0.036521002650260925,
0.18442338705062866,
-0.131123349070549,
0.02595473825931549,
-0.0233926959335804,
0.025784451514482498,
0.08664010465145111,
0.13365823030471802,
-0.08609161525964737,
0.09288003295660019,
-0.009321234188973904,
0.05443268269300461,
-0.017792684957385063,
0.10894790291786194,
-0.1684493124485016,
0.02820863202214241,
0.07777716219425201,
0.13410505652427673,
-0.12831059098243713,
-0.09268037974834442,
0.1428489089012146,
0.003012242494150996,
0.13093498349189758,
0.056696195155382156,
-0.0005463426350615919,
0.01724625937640667,
-0.02001960203051567,
0.062477730214595795,
0.048492446541786194,
-0.13321202993392944,
0.07908590883016586,
-0.08122988790273666,
0.07521659135818481,
-0.06873122602701187,
-0.1291915625333786,
0.07950543612241745,
-0.11317606270313263,
0.10822378844022751,
0.06856919825077057,
-0.02231760323047638,
0.16635224223136902,
0.018762851133942604,
-0.03075270727276802,
-0.02350301668047905,
-0.1539352536201477,
-0.0038496628403663635,
-0.03232704848051071,
0.09718537330627441,
0.028060484677553177,
-0.24298900365829468,
-0.09889499843120575,
0.08507547527551651,
0.0024362453259527683,
-0.004541150759905577,
-0.09522353112697601,
0.06206798925995827,
-0.03744575381278992,
0.09217951446771622,
0.1147414892911911,
0.03091086633503437,
-0.0025283400900661945,
0.022615691646933556,
0.08891334384679794,
0.11843684315681458,
-0.030500417575240135,
-0.1635493040084839,
0.09367074072360992,
-0.16570048034191132,
0.06349533796310425,
0.07273249328136444,
0.15996408462524414,
-0.0719776526093483,
-0.025290416553616524,
-0.12382026761770248,
0.11847750842571259,
0.22928541898727417,
0.001228132052347064,
-0.15781639516353607,
0.05305822938680649,
0.00740945665165782,
-0.09933001548051834,
0.1454830914735794,
-0.21436937153339386,
-0.18111932277679443,
0.08876150101423264,
-0.11738187074661255,
-0.14828266203403473,
0.028423098847270012,
0.012678139843046665,
-0.1719692349433899,
0.11904094368219376,
-0.023229528218507767,
-0.025648098438978195,
-0.2092757374048233,
0.12374613434076309,
-0.07609660923480988,
-0.07699421793222427,
0.07688787579536438,
0.01834116503596306,
0.1575937271118164,
0.03829071298241615,
-0.13881893455982208,
-0.025360053405165672,
-0.07759515941143036,
0.10033352673053741,
-0.0066939159296453,
0.07027612626552582,
-0.05865316838026047,
0.07004200667142868,
-0.016448237001895905,
0.088031105697155,
-0.1484391987323761,
-0.1779162734746933,
0.1342948079109192,
-0.2791089713573456,
0.06667574495077133,
-0.03142901510000229,
0.028663739562034607,
0.0828288197517395,
0.10074429214000702,
-0.030681811273097992,
0.07314379513263702,
0.16618062555789948,
0.19766955077648163,
0.04357084631919861,
-0.33149591088294983,
-0.14004650712013245,
-0.05200808495283127,
0.13970915973186493,
-0.05554809048771858,
0.019428981468081474,
0.053229134529829025,
-0.0012835526140406728,
-0.22203806042671204,
0.0709204152226448,
-0.10330721735954285,
-0.023557525128126144,
-0.23441703617572784,
-0.011175299994647503,
0.021529357880353928,
0.1042904481291771,
0.026037439703941345,
-0.03257690742611885,
0.1518559455871582,
0.0066202240996062756,
0.09134954959154129,
-0.09347174316644669,
-0.006275363266468048,
0.06382866203784943,
-0.1077001690864563,
0.06996344029903412,
-0.012676119804382324,
-0.054709292948246,
0.13777296245098114,
0.11554264277219772,
0.14348775148391724,
-0.05253210663795471,
0.18454307317733765,
-0.008119061589241028,
0.1270546317100525,
0.05575588718056679,
-0.10668907314538956,
0.09108660370111465,
0.08245120942592621,
0.18115274608135223,
-0.037643950432538986,
-0.0009890965884551406,
-0.012990686111152172,
-0.007514146622270346,
-0.18988589942455292,
0.12922172248363495,
-0.04496708884835243,
-0.16362935304641724,
-0.10636865347623825,
0.10746484249830246,
-0.10643623769283295,
-0.05305284261703491,
-0.22367894649505615,
0.06722613424062729,
0.07038114964962006,
0.013333041220903397,
-0.039773426949977875,
-0.11669953167438507,
0.15157657861709595,
0.07265501469373703,
-0.010680317878723145,
0.206619992852211,
0.17972815036773682,
0.1424814611673355,
0.17750830948352814,
0.0783831849694252,
-0.07473386824131012,
0.2299330085515976,
-0.10665850341320038,
-0.08649449795484543,
-0.1366768330335617,
0.0490928553044796,
0.01589932106435299,
0.20805370807647705,
0.009411981329321861,
0.03946267440915108,
-0.061512429267168045,
-0.03996437415480614,
-0.08537732809782028,
-0.04102633148431778,
0.004272258374840021,
-0.1453220695257187,
-0.11942131072282791,
-0.2508678436279297,
-0.07935351133346558,
0.1306173950433731,
-0.017220987007021904,
0.0857730433344841,
-0.05609923228621483,
-0.004226960241794586,
-0.05035156384110451,
-0.14498156309127808,
-0.029009677469730377,
-0.00697798328474164,
0.009170751087367535,
-0.055531762540340424,
0.07878156751394272,
0.14665977656841278,
-0.20896703004837036,
0.005498088430613279,
-0.15256167948246002,
-0.0026451933663338423,
0.0918981060385704,
-0.07372817397117615,
-0.003922128584235907,
0.056280702352523804,
0.09046478569507599,
-0.12160562723875046,
-0.0006591947749257088,
-0.14277243614196777,
-0.03044419176876545,
0.3067282438278198,
0.134724959731102,
0.1953267604112625,
-0.16802087426185608,
0.009985390119254589,
0.17509904503822327,
0.05377498269081116,
-0.04363960772752762,
-0.2576216459274292,
0.0507955364882946,
0.07637786120176315,
-0.1415620744228363,
0.00946182943880558,
0.046593353152275085,
0.06022327393293381,
0.04505254700779915,
-0.047226205468177795,
0.3438045382499695,
0.007709924131631851,
0.021133117377758026,
0.08697706460952759,
-0.04065019264817238,
0.18309003114700317,
-0.09276031702756882,
-0.10458192229270935,
-0.21291963756084442,
0.030121924355626106,
-0.13553225994110107,
-0.05614619329571724,
-0.11071477085351944,
0.19955310225486755,
0.03830283135175705,
-0.09188609570264816,
-0.20467831194400787,
0.07908980548381805,
0.1244797632098198,
-0.27767542004585266,
0.1213536486029625,
0.019423941150307655,
0.023491311818361282,
0.02604696899652481,
-0.10960739850997925,
0.07393307238817215,
-0.020381126552820206,
-0.08770196884870529,
0.1807347536087036,
0.07707051932811737,
0.040758755058050156,
0.013832606375217438,
0.05867909640073776,
-0.10360671579837799,
0.0411960706114769,
0.13867639005184174,
-0.11923250555992126,
-0.047646332532167435,
0.1306500881910324,
0.16736313700675964,
-0.18341776728630066,
0.03791674226522446,
-0.02372361160814762,
0.10477270185947418,
-0.07483376562595367,
-0.11321696639060974,
0.1415989100933075,
0.05602584779262543,
0.13362999260425568,
-0.00617374898865819,
-0.07245854288339615,
-0.13292190432548523,
-0.0637717917561531,
0.049721356481313705,
0.10138671100139618,
0.062326669692993164,
-0.1513998657464981,
-0.0046698483638465405,
-2.689716802788824e-32,
0.015423363074660301,
0.08605597168207169,
-0.10641498863697052,
0.08616769313812256,
-0.20589467883110046,
-0.0028711361810564995,
-0.07586542516946793,
-0.14680348336696625,
-0.1591382771730423,
-0.1791996955871582,
0.0031864263582974672,
0.07497075945138931,
0.0828755721449852,
0.025038661435246468,
-0.12049168348312378,
-0.056882865726947784,
-0.09502285718917847,
-0.05447667837142944,
0.008555692620575428,
0.05507504194974899,
0.06756345927715302,
0.029425684362649918,
0.035117946565151215,
-0.1274285912513733,
-0.007309737149626017,
-0.09137719869613647,
-0.049339208751916885,
0.12084595859050751,
0.03760658577084541,
0.08361439406871796,
-0.05618797987699509,
0.012033546343445778,
-0.0037080752663314342,
0.1290464997291565,
-0.016585176810622215,
-0.02143724262714386,
-0.1307053118944168,
-0.06928164511919022,
-0.12854695320129395,
0.053800590336322784,
0.032562628388404846,
0.10861659049987793,
0.1044410988688469,
-0.21621756255626678,
0.08941452205181122,
-0.00869984645396471,
0.0023048478178679943,
0.048061951994895935,
0.07155579328536987,
0.09673970937728882,
-0.11024213582277298,
0.07101722806692123,
-0.03956826403737068,
0.08427656441926956,
0.11087255924940109,
-0.02342565357685089,
0.09921853244304657,
0.09171231836080551,
-0.042897243052721024,
0.0043206592090427876,
0.16316907107830048,
-0.016516266390681267,
-0.009403998963534832,
0.007570886518806219,
0.29719656705856323,
-0.02624351903796196,
0.19694116711616516,
-0.1364554613828659,
0.01967504248023033,
-0.07304586470127106,
-0.040523167699575424,
0.13787683844566345,
0.026911165565252304,
0.08650211989879608,
-0.13973379135131836,
-0.07089787721633911,
-0.19652040302753448,
0.016929205507040024,
0.051571037620306015,
0.05114879086613655,
-0.09398943930864334,
0.016581891104578972,
0.1363838016986847,
0.07193666696548462,
0.08890222758054733,
0.09831622987985611,
-0.1352068930864334,
-0.05107053369283676,
-0.041942622512578964,
0.009472851641476154,
-0.03271575644612312,
0.062388721853494644,
-0.1466381698846817,
-0.09258285164833069,
-0.13250663876533508,
-0.0016107496339827776,
0.07302100211381912,
0.11433155089616776,
0.061089642345905304,
-0.1118190810084343,
0.06260591745376587,
0.04530978947877884,
0.1618267148733139,
0.06922110170125961,
0.09886395186185837,
-0.0812637060880661,
0.1429048478603363,
0.11027266830205917,
-0.22209572792053223,
-0.037259962409734726,
-0.021200018003582954,
-0.002860141219571233,
0.0670914575457573,
-0.030281241983175278,
0.034423552453517914,
-0.010039870627224445,
-0.0848684310913086,
-0.12600867450237274,
0.08496018499135971,
0.12523682415485382,
-0.3478597402572632,
0.07178905606269836,
-0.12072068452835083,
-0.01972011849284172,
-0.05639994144439697,
0.032004665583372116,
0.011429200880229473,
-0.06754123419523239,
0.17108328640460968,
0.05746900290250778,
-0.014424426481127739,
-0.10326526314020157,
7.373516268671665e-7,
0.008058995008468628,
0.11401522904634476,
0.018540041521191597,
0.08035662770271301,
-0.03102540597319603,
-0.07012610137462616,
-0.28640908002853394,
0.07361919432878494,
0.04255848377943039,
0.145355686545372,
0.08274036645889282,
-0.10463813692331314,
0.0071834539994597435,
-0.011755100451409817,
0.07503508031368256,
-0.04338579624891281,
-0.03459746018052101,
-0.05964774265885353,
-0.09448830038309097,
0.06792160123586655,
0.1588800549507141,
0.08565577864646912,
0.0578494668006897,
0.010608657263219357,
0.059605810791254044,
-0.034683957695961,
-0.05506346747279167,
-0.20301982760429382,
0.22001515328884125,
-0.029274147003889084,
-0.08095438033342361,
-0.00120373978279531,
-0.03826523944735527,
0.00368532189168036,
0.06562044471502304,
-0.2173307240009308,
-0.19271643459796906,
-0.10005558282136917,
0.017218727618455887,
0.13356776535511017,
0.13830390572547913,
-0.10676098614931107,
-0.12326301634311676,
-0.21610099077224731,
0.1021609753370285,
0.03314012661576271,
-0.08101486414670944,
0.03436021879315376,
-0.12570320069789886,
0.004117587581276894,
0.02176528424024582,
0.11862027645111084,
0.06682652980089188,
0.07168249040842056,
-0.024810094386339188,
-0.07129528373479843,
-0.16264532506465912,
-0.0239177867770195,
0.11670713871717453,
-0.17450371384620667,
-0.12630975246429443,
-0.15304188430309296,
-0.01998896338045597,
0.013558841310441494,
-0.023913351818919182,
-0.07941015064716339,
0.009187606163322926,
1.0971062115723408e-34,
-0.05846152454614639,
0.05211219564080238,
0.10479618608951569,
-0.07739363610744476,
0.08278639614582062,
-0.11255339533090591,
0.16568486392498016,
-0.0790453553199768,
-0.01809321530163288,
-0.13350734114646912,
-0.08433833718299866
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | > The dataset viewer on the Hugging Face website is incredibly useful
@mariosasko i think @lilyorlilypad wants to run the new dataset-viewer, not the old one |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 26 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
> The dataset viewer on the Hugging Face website is incredibly useful
@mariosasko i think @lilyorlilypad wants to run the new dataset-viewer, not the old one | [
-0.050824735313653946,
0.08091042190790176,
-0.10323423147201538,
0.17144805192947388,
0.17821058630943298,
0.06693217158317566,
0.15109390020370483,
-0.04163874685764313,
0.11168600618839264,
0.14258207380771637,
-0.13262443244457245,
0.008046329952776432,
-0.010505392216145992,
0.1643332988023758,
0.05612172931432724,
-0.1625119000673294,
-0.04810237139463425,
-0.08550554513931274,
-0.08747950941324234,
-0.026412125676870346,
0.1465257704257965,
0.030950728803873062,
0.17985697090625763,
-0.050947558134794235,
0.016638850793242455,
-0.006327739916741848,
-0.09110140800476074,
0.08215396851301193,
0.031934354454278946,
-0.12042714655399323,
0.14982523024082184,
0.23958656191825867,
0.1611655354499817,
0.19962725043296814,
0.000005829421297676163,
0.06396649777889252,
0.03200731426477432,
0.17315194010734558,
-0.09399474412202835,
-0.05494891479611397,
0.14052629470825195,
-0.13600851595401764,
0.01780358888208866,
-0.07809031754732132,
-0.026959963142871857,
-0.146629199385643,
-0.0076466999016702175,
-0.038785435259342194,
0.16487228870391846,
0.14377015829086304,
0.04269559681415558,
0.11097481101751328,
0.02569521963596344,
-0.1603219211101532,
0.08837325125932693,
0.16650836169719696,
-0.02233317866921425,
0.1731424778699875,
-0.1795222908258438,
0.007256747223436832,
0.06575474143028259,
0.09576860070228577,
0.006838299799710512,
-0.07832340151071548,
0.02047511748969555,
0.07450239360332489,
-0.16374275088310242,
-0.14379674196243286,
0.015156476758420467,
0.1495761126279831,
0.1845409870147705,
0.00942232832312584,
-0.08116789907217026,
0.13052266836166382,
-0.10884840041399002,
0.060912925750017166,
-0.11892993003129959,
-0.03354761749505997,
0.01919502019882202,
0.03735566511750221,
-0.20051060616970062,
-0.21393612027168274,
-0.10193974524736404,
-0.14807631075382233,
0.07281801104545593,
0.0008476165821775794,
-0.09393928945064545,
-0.021167227998375893,
-0.1340084969997406,
-0.16400422155857086,
0.20137347280979156,
-0.010096468031406403,
0.025292588397860527,
0.006210171151906252,
0.08690408617258072,
0.02221071347594261,
-0.08702552318572998,
-0.06426402181386948,
0.05055360496044159,
0.09539692848920822,
0.01881510205566883,
-0.025643179193139076,
-0.1288602203130722,
0.007877557538449764,
0.1696152538061142,
-0.008000067435204983,
0.10859186947345734,
-0.08335922658443451,
0.15058636665344238,
0.2900221645832062,
0.005512924399226904,
0.05790649726986885,
0.002185543766245246,
-0.12963640689849854,
-0.10149221867322922,
0.10131033509969711,
0.09671054035425186,
0.041173696517944336,
0.10643882304430008,
-0.02786700613796711,
0.2780391275882721,
0.044424623250961304,
-0.012842638418078423,
0.2319820523262024,
-0.009320012293756008,
-0.03395096957683563,
0.07426241785287857,
-0.012418495491147041,
0.036821041256189346,
-0.17824040353298187,
-0.054002873599529266,
0.03879178687930107,
0.005046387203037739,
-0.01024328451603651,
0.08505306392908096,
-0.060515426099300385,
-0.06619767099618912,
-0.049880750477313995,
0.07751709967851639,
0.023956146091222763,
0.08776350319385529,
0.08939656615257263,
-0.27389559149742126,
-0.04992939159274101,
0.07718511670827866,
-0.02672591432929039,
-0.06205472722649574,
0.0702422708272934,
-0.053236957639455795,
0.09971138834953308,
-0.1572287678718567,
0.24149517714977264,
-0.2524191737174988,
0.12973976135253906,
0.02414092980325222,
0.05340173467993736,
0.06830838322639465,
-0.03744608536362648,
-0.35008513927459717,
-0.08698762208223343,
0.11573847383260727,
0.03588193282485008,
0.0901271179318428,
-0.08112886548042297,
0.06213683634996414,
0.19573673605918884,
0.05931630730628967,
0.13765662908554077,
-0.0810675173997879,
-0.057524170726537704,
-0.014360634610056877,
0.006890620570629835,
-0.12914934754371643,
-0.18211041390895844,
-0.011637745425105095,
0.15044154226779938,
-0.016684040427207947,
-0.06042724847793579,
-0.1764349490404129,
0.028352010995149612,
0.0003552878915797919,
-0.23367537558078766,
0.0210990272462368,
-0.06585826724767685,
0.09960345178842545,
-0.1456749588251114,
-0.2662137746810913,
0.1059509813785553,
-0.023026959970593452,
0.11262012273073196,
-0.12547890841960907,
0.009509741328656673,
0.05809444189071655,
0.1743261069059372,
-0.07778631895780563,
-0.12376704066991806,
0.09986358135938644,
-0.21834824979305267,
0.01978258788585663,
-0.21009142696857452,
-0.09268592298030853,
-0.06885575503110886,
0.08462505042552948,
0.17584733664989471,
-0.05706344172358513,
-0.03899110481142998,
-0.06959474086761475,
0.06366955488920212,
0.06685204803943634,
-0.23813648521900177,
-0.08932086825370789,
-0.056744858622550964,
-0.09296095371246338,
0.027767794206738472,
-0.0017313224961981177,
-0.047434963285923004,
-0.10437892377376556,
0.07988271117210388,
-0.018494708463549614,
0.2211577147245407,
-0.04321517050266266,
0.14688055217266083,
0.06283754855394363,
-0.03413042053580284,
-0.04691486433148384,
0.0412847101688385,
-0.059593573212623596,
-0.027647051960229874,
0.141469344496727,
-0.04164426028728485,
-0.040637146681547165,
-0.02261987328529358,
0.05242488905787468,
0.1092839241027832,
-0.06156755983829498,
0.07425294071435928,
0.13321135938167572,
-0.05702552944421768,
0.08708400279283524,
-0.12788207828998566,
-0.0572100430727005,
-0.046838704496622086,
-0.16029055416584015,
0.1611446887254715,
0.011782443150877953,
0.16293209791183472,
-0.15801994502544403,
-0.011066368781030178,
-0.004491661675274372,
0.03311632573604584,
0.0848562940955162,
0.10664813220500946,
-0.05652088671922684,
0.08444947004318237,
0.02165571041405201,
0.06452932953834534,
-0.06226305663585663,
0.05704207345843315,
-0.18024899065494537,
0.04334898293018341,
0.05658340081572533,
0.08865446597337723,
-0.11653868108987808,
-0.07150085270404816,
0.10801957547664642,
0.028062116354703903,
0.10623632371425629,
0.0025979606434702873,
0.002416272647678852,
0.05938000977039337,
-0.017003456130623817,
0.060998689383268356,
0.040155984461307526,
-0.12237348407506943,
0.062323179095983505,
-0.1393030434846878,
0.0693257749080658,
-0.08621934056282043,
-0.118332639336586,
0.06979848444461823,
-0.13433676958084106,
0.11929484456777573,
0.08227954804897308,
-0.04250824823975563,
0.13686029613018036,
0.016453158110380173,
0.0004426050581969321,
-0.009897825308144093,
-0.14232055842876434,
0.03595283254981041,
-0.03934815153479576,
0.08873714506626129,
0.026550140231847763,
-0.24835316836833954,
-0.08189460635185242,
0.043808985501527786,
0.005083850119262934,
-0.018681833520531654,
-0.09254533052444458,
0.0877336636185646,
-0.08513592183589935,
0.06961438804864883,
0.12530001997947693,
0.04992278292775154,
-0.010811378248035908,
0.04634954780340195,
0.055112894624471664,
0.07038933038711548,
-0.011997418478131294,
-0.16016778349876404,
0.10308748483657837,
-0.15922193229198456,
0.09991393983364105,
0.0396023690700531,
0.17100612819194794,
-0.0542648620903492,
-0.03572734072804451,
-0.08725977689027786,
0.06347114592790604,
0.17348513007164001,
-0.010366873815655708,
-0.12265793234109879,
0.07003599405288696,
0.03460376709699631,
-0.09168743342161179,
0.13829390704631805,
-0.20655027031898499,
-0.12955805659294128,
0.15605543553829193,
-0.16123735904693604,
-0.16209103167057037,
-0.03217475488781929,
0.023549096658825874,
-0.13858382403850555,
0.10500702261924744,
-0.07832057029008865,
-0.04350847378373146,
-0.1910291612148285,
0.12870562076568604,
-0.06024220585823059,
-0.05700196325778961,
0.08988876640796661,
0.03801631182432175,
0.09772272408008575,
0.05602497234940529,
-0.15194566547870636,
0.024716101586818695,
-0.05551452934741974,
0.07951480150222778,
-0.02276669628918171,
0.025787334889173508,
0.015891974791884422,
0.05268758907914162,
-0.04412298649549484,
0.08060719817876816,
-0.15331150591373444,
-0.18627890944480896,
0.14491987228393555,
-0.2751193940639496,
0.017974242568016052,
-0.07532480359077454,
0.03466277942061424,
0.06011703982949257,
0.04403400793671608,
-0.02599882148206234,
0.0957697257399559,
0.1351943165063858,
0.21533609926700592,
0.07763579487800598,
-0.31872859597206116,
-0.12723056972026825,
-0.06862068176269531,
0.14500920474529266,
-0.08226564526557922,
0.021822098642587662,
-0.012376942671835423,
0.030638575553894043,
-0.22838109731674194,
0.07304638624191284,
-0.0635603591799736,
-0.01791621930897236,
-0.21701735258102417,
-0.0113564757630229,
0.03714491426944733,
0.1016424149274826,
0.027637174353003502,
-0.054989416152238846,
0.16494350135326385,
-0.005051118321716785,
0.060141656547784805,
-0.1252218633890152,
-0.05485520511865616,
0.054758891463279724,
-0.06696409732103348,
0.056836869567632675,
0.017024267464876175,
-0.047267694026231766,
0.11453071981668472,
0.13329775631427765,
0.1686490774154663,
-0.031687185168266296,
0.21552565693855286,
0.009443772956728935,
0.12037934362888336,
0.021945973858237267,
-0.08720481395721436,
0.13059742748737335,
0.1167801171541214,
0.18250611424446106,
-0.06903009116649628,
-0.01028518471866846,
0.029897570610046387,
-0.01448885165154934,
-0.1302526593208313,
0.09227601438760757,
-0.05495576933026314,
-0.1626916527748108,
-0.09190081804990768,
0.12305311858654022,
-0.1187603697180748,
-0.01262467261403799,
-0.1923155039548874,
0.04258676618337631,
0.038932520896196365,
0.030811024829745293,
-0.02723458595573902,
-0.13568547368049622,
0.13684657216072083,
0.07271837443113327,
0.00036406435538083315,
0.19822226464748383,
0.18960943818092346,
0.07853000611066818,
0.189732164144516,
0.08156388252973557,
-0.06449376791715622,
0.1990879774093628,
-0.11195037513971329,
-0.07171259820461273,
-0.1279507428407669,
0.0686192587018013,
0.04473961889743805,
0.16964921355247498,
0.0609293058514595,
-0.049153950065374374,
-0.01858874224126339,
-0.03680634871125221,
-0.073908731341362,
-0.014959162101149559,
-0.00006841011781943962,
-0.12415499985218048,
-0.11824730783700943,
-0.24710556864738464,
-0.0995786041021347,
0.12124166637659073,
-0.023497477173805237,
0.06752640753984451,
-0.01788504049181938,
0.009416353888809681,
-0.07556886970996857,
-0.16025462746620178,
-0.030283570289611816,
-0.054069407284259796,
0.010822099633514881,
-0.08088287711143494,
0.07392419874668121,
0.16195927560329437,
-0.20095719397068024,
-0.01148956548422575,
-0.17188109457492828,
-0.04725369065999985,
0.08037176728248596,
-0.07358191907405853,
0.015355383977293968,
0.04761125147342682,
0.10579615086317062,
-0.12605880200862885,
0.006505858618766069,
-0.13060574233531952,
-0.014427821151912212,
0.2940106987953186,
0.18413586914539337,
0.1857568472623825,
-0.1556955873966217,
0.023654749616980553,
0.16435255110263824,
-0.004008806776255369,
-0.0009679101058281958,
-0.30074384808540344,
0.060786087065935135,
0.04871287941932678,
-0.11030063033103943,
-0.04824892431497574,
0.051437992602586746,
0.04545045644044876,
-0.01352704782038927,
-0.0923258513212204,
0.2944876551628113,
0.057353872805833817,
0.011022748425602913,
0.09654451906681061,
-0.0138916140422225,
0.19843465089797974,
-0.0736730694770813,
-0.13913850486278534,
-0.21211689710617065,
0.04581510275602341,
-0.144451305270195,
-0.052937209606170654,
-0.09449666738510132,
0.25286775827407837,
0.04492109268903732,
-0.07175265997648239,
-0.2190062552690506,
0.07587019354104996,
0.10244494676589966,
-0.31406909227371216,
0.14377084374427795,
-0.006422089878469706,
0.027132194489240646,
0.0142068425193429,
-0.10139802098274231,
0.07254953682422638,
-0.03599049523472786,
-0.1259865015745163,
0.20600759983062744,
0.06235043331980705,
0.003494818229228258,
-0.01075703278183937,
0.049883127212524414,
-0.12709970772266388,
0.03503766655921936,
0.08779968321323395,
-0.12745365500450134,
-0.023631472140550613,
0.144332155585289,
0.1990225464105606,
-0.20933610200881958,
0.05178834870457649,
-0.04589921608567238,
0.12879358232021332,
-0.08804497122764587,
-0.1318560689687729,
0.12231199443340302,
0.013134576380252838,
0.1313396543264389,
0.02062993124127388,
-0.036011580377817154,
-0.16644975543022156,
-0.05634400248527527,
0.04300682991743088,
0.06891018152236938,
0.05718812718987465,
-0.1783311367034912,
-0.0172987449914217,
-2.652215300388128e-32,
0.04490116983652115,
0.1142093762755394,
-0.11718720942735672,
0.08586721867322922,
-0.18767161667346954,
-0.005225054454058409,
-0.0780809298157692,
-0.11932943016290665,
-0.06866423785686493,
-0.14282454550266266,
-0.014198068529367447,
0.11444921046495438,
0.0917210653424263,
0.051432691514492035,
-0.07751990109682083,
-0.07938835024833679,
-0.06925342977046967,
-0.10352854430675507,
0.029700998216867447,
0.026638492941856384,
0.043834391981363297,
-0.0032817774917930365,
-0.02866506204009056,
-0.07739795744419098,
0.0024875705130398273,
-0.08206982910633087,
-0.06138015165925026,
0.11931821703910828,
0.064918152987957,
0.07740841805934906,
-0.051733992993831635,
0.01873493567109108,
-0.009524544700980186,
0.12243665009737015,
-0.009682098403573036,
0.023309702053666115,
-0.1023821234703064,
-0.07681766897439957,
-0.10588572174310684,
-0.004888607654720545,
0.011554541066288948,
0.08419156819581985,
0.08610817044973373,
-0.21817930042743683,
0.0483502633869648,
0.032424941658973694,
0.007270117290318012,
0.04354056343436241,
0.09813104569911957,
0.039898164570331573,
-0.09574197977781296,
0.061751171946525574,
-0.03686666116118431,
0.04323798045516014,
0.11801715195178986,
0.01832752302289009,
0.07601076364517212,
0.031033413484692574,
0.020993398502469063,
0.0050423829816281796,
0.18549489974975586,
-0.05290942266583443,
-0.04115159809589386,
0.059195201843976974,
0.2807670831680298,
-0.02388421632349491,
0.18108898401260376,
-0.16571494936943054,
0.009703745134174824,
-0.06337927281856537,
-0.03715480864048004,
0.12134332954883575,
-0.00006299218512140214,
0.06792837381362915,
-0.16072815656661987,
-0.044132307171821594,
-0.18180200457572937,
0.03362491354346275,
0.0831579938530922,
0.01083363313227892,
-0.08272943645715714,
0.0028107869438827038,
0.1585209220647812,
0.05227433145046234,
0.14084388315677643,
0.11510365456342697,
-0.1710580587387085,
-0.07829347997903824,
-0.02708168514072895,
0.022001948207616806,
-0.005661038216203451,
0.08662702888250351,
-0.14659960567951202,
-0.12213287502527237,
-0.12625117599964142,
-0.007734735030680895,
0.04442266374826431,
0.0950186625123024,
0.066141776740551,
-0.16571404039859772,
0.05555717274546623,
0.08451424539089203,
0.15650242567062378,
0.06364832818508148,
0.08768834918737411,
-0.05296041816473007,
0.1516067534685135,
0.12258227169513702,
-0.2395775467157364,
-0.022087963297963142,
-0.0008076429949142039,
0.027362575754523277,
0.07967676222324371,
-0.002557008061558008,
0.043855875730514526,
-0.01793602667748928,
-0.054037630558013916,
-0.09809713810682297,
0.0989915058016777,
0.13966676592826843,
-0.37360307574272156,
0.04867592081427574,
-0.14416123926639557,
0.02100672945380211,
-0.06390812993049622,
0.01276103500276804,
-0.00016094339662231505,
-0.05346294492483139,
0.13854873180389404,
0.00408566789701581,
-0.019503843039274216,
-0.12165539711713791,
7.40227221740497e-7,
-0.022742275148630142,
0.11410009860992432,
0.007910452783107758,
0.0615866556763649,
0.002555675571784377,
-0.08745459467172623,
-0.2824257016181946,
0.11914390325546265,
0.002306698588654399,
0.1361345797777176,
0.07448354363441467,
-0.10400732606649399,
0.054896000772714615,
-0.0360976867377758,
0.07047820836305618,
-0.0628805160522461,
-0.06592115759849548,
-0.03911895304918289,
-0.10021306574344635,
0.08078465610742569,
0.16269730031490326,
0.10751137137413025,
0.06346362829208374,
0.007793412543833256,
0.05468335375189781,
-0.02127554640173912,
-0.045343589037656784,
-0.20217610895633698,
0.17448922991752625,
-0.08137331157922745,
-0.07693138718605042,
-0.01856161653995514,
-0.030911223962903023,
0.001009443192742765,
0.059104811400175095,
-0.2007582038640976,
-0.2118435949087143,
-0.07357831299304962,
-0.015942266210913658,
0.14702564477920532,
0.18622004985809326,
-0.10523585975170135,
-0.15955489873886108,
-0.18138429522514343,
0.14572632312774658,
-0.03137299790978432,
-0.10089127719402313,
0.06839995831251144,
-0.1136896163225174,
-0.05107992887496948,
0.01771662011742592,
0.05265684425830841,
0.07689071446657181,
0.08299928158521652,
-0.0034656685311347246,
-0.10138675570487976,
-0.13145075738430023,
0.008070447482168674,
0.11698292195796967,
-0.1475004404783249,
-0.0864071175456047,
-0.1099424734711647,
-0.01623879000544548,
0.03592852130532265,
-0.03763267770409584,
-0.0792543888092041,
0.056231025606393814,
1.0209532335045093e-34,
-0.034272450953722,
0.05721953511238098,
0.08002925664186478,
-0.11389167606830597,
0.1237787976861,
-0.12171795219182968,
0.17436546087265015,
-0.04087919369339943,
-0.050232093781232834,
-0.12089533358812332,
-0.09208403527736664
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | > wants to run the new dataset-viewer, not the old one
Thanks for the clarification for me. I do want to run the new dataset-viewer. |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 25 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
> wants to run the new dataset-viewer, not the old one
Thanks for the clarification for me. I do want to run the new dataset-viewer. | [
-0.05899687111377716,
0.07605558633804321,
-0.08072003722190857,
0.1612721085548401,
0.17775121331214905,
0.08573813736438751,
0.1333513706922531,
-0.03801948204636574,
0.12203966826200485,
0.15143613517284393,
-0.1250167340040207,
0.014583282172679901,
-0.012774737551808357,
0.15839096903800964,
0.06908365339040756,
-0.17623937129974365,
-0.05650879442691803,
-0.0753217339515686,
-0.09748081117868423,
-0.016600949689745903,
0.14218595623970032,
0.04283227026462555,
0.18011075258255005,
-0.03632625564932823,
0.01133196521550417,
-0.0087632080540061,
-0.08576630800962448,
0.08627402782440186,
0.03455245494842529,
-0.11567602306604385,
0.16033092141151428,
0.22171583771705627,
0.17124280333518982,
0.18452849984169006,
0.000006011139248585096,
0.07254014164209366,
0.02479691617190838,
0.16109983623027802,
-0.10545240342617035,
-0.05146196484565735,
0.15204043686389923,
-0.13537882268428802,
0.019840728491544724,
-0.0827871710062027,
-0.03257112205028534,
-0.1308990865945816,
-0.010978658683598042,
-0.03098093532025814,
0.14709539711475372,
0.1298762857913971,
0.0403924435377121,
0.10242953896522522,
0.004055659752339125,
-0.16415461897850037,
0.06432843208312988,
0.1601882427930832,
-0.03308049216866493,
0.1621471643447876,
-0.18164777755737305,
0.0183237474411726,
0.04771232604980469,
0.08589204400777817,
0.008184864185750484,
-0.05156116560101509,
0.022349609062075615,
0.06194533035159111,
-0.1624634712934494,
-0.13508367538452148,
0.021701667457818985,
0.13773521780967712,
0.17880167067050934,
0.000488507910631597,
-0.08774998784065247,
0.1142020970582962,
-0.08341521769762039,
0.05259927734732628,
-0.10896416753530502,
-0.045739591121673584,
0.014173579402267933,
0.054927028715610504,
-0.1764994114637375,
-0.2125072032213211,
-0.0947137400507927,
-0.14920258522033691,
0.04759316146373749,
-0.007488643750548363,
-0.09259792417287827,
-0.037298791110515594,
-0.12262247502803802,
-0.16787084937095642,
0.1775754988193512,
0.01825953833758831,
0.01835162378847599,
0.001582376891747117,
0.09049194306135178,
0.04126940667629242,
-0.0727793350815773,
-0.058912575244903564,
0.06217465177178383,
0.09257450699806213,
0.02892347425222397,
-0.021828625351190567,
-0.11265186220407486,
0.01341206394135952,
0.16624681651592255,
-0.01903907209634781,
0.11067793518304825,
-0.08956020325422287,
0.15086911618709564,
0.2921290397644043,
-0.01365719549357891,
0.06371335685253143,
-0.016937991604208946,
-0.1436876356601715,
-0.09056691825389862,
0.09697210043668747,
0.10343261808156967,
0.04954339936375618,
0.09575538337230682,
-0.022856824100017548,
0.2818659543991089,
0.05246831849217415,
-0.018444212153553963,
0.22576768696308136,
-0.004342115018516779,
-0.04408879950642586,
0.06939022988080978,
-0.02535582333803177,
0.034810736775398254,
-0.194038987159729,
-0.05773922801017761,
0.024442704394459724,
-0.013820081017911434,
-0.0015051583759486675,
0.08488259464502335,
-0.06795134395360947,
-0.05520219728350639,
-0.07461519539356232,
0.0695880576968193,
0.007788254879415035,
0.0850449949502945,
0.09873194247484207,
-0.28318139910697937,
-0.04282241314649582,
0.0948316901922226,
-0.026371031999588013,
-0.055149078369140625,
0.07203103601932526,
-0.048070598393678665,
0.08417139202356339,
-0.16691917181015015,
0.22268518805503845,
-0.2570098638534546,
0.11833416670560837,
0.011099996976554394,
0.04861301928758621,
0.050527703016996384,
-0.04550229385495186,
-0.3616190254688263,
-0.08872409164905548,
0.10015498101711273,
0.02214699424803257,
0.07232469320297241,
-0.0660032331943512,
0.08230962604284286,
0.19199727475643158,
0.06878548860549927,
0.13431531190872192,
-0.08062398433685303,
-0.05230394005775452,
-0.021992409601807594,
-0.004668680485337973,
-0.12186982482671738,
-0.17571309208869934,
-0.040681496262550354,
0.14485029876232147,
-0.015032288618385792,
-0.04542393982410431,
-0.1885470449924469,
0.03799460083246231,
-0.0032302020117640495,
-0.2355348765850067,
0.018080998212099075,
-0.06872770190238953,
0.08544610440731049,
-0.14287227392196655,
-0.257968544960022,
0.08490940928459167,
-0.03522926941514015,
0.09133122116327286,
-0.10740392655134201,
0.009671646170318127,
0.05201385170221329,
0.17592576146125793,
-0.08215868473052979,
-0.11809276044368744,
0.10725659132003784,
-0.20785191655158997,
0.019601019099354744,
-0.2130982130765915,
-0.08706201612949371,
-0.061553504317998886,
0.09452098608016968,
0.1784658432006836,
-0.04129699245095253,
-0.04270583763718605,
-0.0614536851644516,
0.06939166784286499,
0.06885460019111633,
-0.24095769226551056,
-0.08357085287570953,
-0.05522800236940384,
-0.0961889997124672,
0.020127465948462486,
-0.029992925003170967,
-0.059207551181316376,
-0.1006549745798111,
0.07022189348936081,
-0.02227712795138359,
0.21018889546394348,
-0.03649377450346947,
0.13422386348247528,
0.07753286510705948,
-0.026872551068663597,
-0.06437947601079941,
0.024467121809720993,
-0.07046026736497879,
-0.0246807299554348,
0.15900088846683502,
-0.04302067682147026,
-0.02988268993794918,
-0.01004409696906805,
0.07440227270126343,
0.11143846809864044,
-0.0672852024435997,
0.06565292924642563,
0.14298246800899506,
-0.04786066710948944,
0.09037771075963974,
-0.12425827980041504,
-0.057809993624687195,
-0.041720449924468994,
-0.16082614660263062,
0.16121043264865875,
-0.0019193347543478012,
0.16281883418560028,
-0.14724871516227722,
0.005904478952288628,
-0.001846707658842206,
0.03657425940036774,
0.10400285571813583,
0.11661625653505325,
-0.055871859192848206,
0.0734066590666771,
0.025308936834335327,
0.04730026423931122,
-0.05537950620055199,
0.04797763749957085,
-0.1756097823381424,
0.04139846935868263,
0.07588639855384827,
0.09819802641868591,
-0.11458801478147507,
-0.06987360864877701,
0.10079639405012131,
0.020030204206705093,
0.08911820501089096,
-0.0028778966516256332,
0.004727564752101898,
0.06551351398229599,
-0.01679716818034649,
0.05037110298871994,
0.030893489718437195,
-0.11396217346191406,
0.04933195561170578,
-0.14554858207702637,
0.08262163400650024,
-0.08918260037899017,
-0.11310598999261856,
0.06814388930797577,
-0.1550169140100479,
0.13274283707141876,
0.07630416005849838,
-0.03839292749762535,
0.13951346278190613,
0.009564659558236599,
-0.010933425277471542,
0.006795571651309729,
-0.14200034737586975,
0.03874960541725159,
-0.03773104026913643,
0.08214283734560013,
0.031304147094488144,
-0.22240737080574036,
-0.05818153917789459,
0.04573843255639076,
0.004821388982236385,
-0.010142944753170013,
-0.06772782653570175,
0.07391081750392914,
-0.09029771387577057,
0.08068948239088058,
0.11486894637346268,
0.04345262795686722,
-0.023380856961011887,
0.036703307181596756,
0.054760318249464035,
0.04430219531059265,
-0.03236158564686775,
-0.16612716019153595,
0.09607984870672226,
-0.13922525942325592,
0.07386588305234909,
0.04722560942173004,
0.16834191977977753,
-0.06128941848874092,
-0.037384033203125,
-0.08408298343420029,
0.07067440450191498,
0.16769766807556152,
-0.004136221017688513,
-0.09810889512300491,
0.06880883127450943,
0.03908722475171089,
-0.08321963250637054,
0.16261079907417297,
-0.19793376326560974,
-0.1309431493282318,
0.16315202414989471,
-0.16338512301445007,
-0.1655082255601883,
-0.02626049518585205,
0.03197256103157997,
-0.12972941994667053,
0.09371627867221832,
-0.0736747533082962,
-0.053750429302453995,
-0.2013777643442154,
0.13802649080753326,
-0.07534907013177872,
-0.06446921080350876,
0.09095431864261627,
0.03793015703558922,
0.09210057556629181,
0.039582230150699615,
-0.13700303435325623,
0.018630433827638626,
-0.04587271437048912,
0.054891638457775116,
-0.014015145599842072,
0.022156603634357452,
0.012421049177646637,
0.04793009161949158,
-0.039426688104867935,
0.07512637972831726,
-0.1749284714460373,
-0.17154061794281006,
0.1444064974784851,
-0.2556670010089874,
0.018623845651745796,
-0.06719007343053818,
0.030722444877028465,
0.044592391699552536,
0.031085599213838577,
-0.02370094135403633,
0.09884017705917358,
0.12591460347175598,
0.19851048290729523,
0.06816566735506058,
-0.3119780421257019,
-0.1335911899805069,
-0.0678391307592392,
0.14428956806659698,
-0.057165566831827164,
0.02423441782593727,
-0.002834026701748371,
0.024141715839505196,
-0.22429324686527252,
0.07824286073446274,
-0.07011005282402039,
-0.011530986987054348,
-0.22955770790576935,
-0.006492213811725378,
0.045781899243593216,
0.12396573275327682,
0.0354887917637825,
-0.05449150502681732,
0.18231073021888733,
-0.000860557600390166,
0.08441036194562912,
-0.10786782950162888,
-0.047647248953580856,
0.059283383190631866,
-0.0704234167933464,
0.05151507258415222,
0.0020812859293073416,
-0.020359165966510773,
0.10342895984649658,
0.1453542709350586,
0.16334933042526245,
-0.005300926510244608,
0.21869902312755585,
0.014795521274209023,
0.12974444031715393,
0.025448206812143326,
-0.09428346902132034,
0.10482747852802277,
0.12921872735023499,
0.2054314762353897,
-0.07742616534233093,
-0.03577253222465515,
0.022475779056549072,
0.0052961548790335655,
-0.14856867492198944,
0.10996872186660767,
-0.06147017702460289,
-0.16220718622207642,
-0.08965969830751419,
0.11911742389202118,
-0.12248312681913376,
0.0002887122973334044,
-0.18417395651340485,
0.04172803834080696,
0.036055807024240494,
0.035894930362701416,
-0.039364613592624664,
-0.14661826193332672,
0.1312446892261505,
0.0791078507900238,
0.004422030411660671,
0.1976652592420578,
0.19408342242240906,
0.0681912824511528,
0.1927708238363266,
0.09762895107269287,
-0.07284661382436752,
0.20937304198741913,
-0.09487013518810272,
-0.08511076867580414,
-0.11129909008741379,
0.06931421160697937,
0.022169217467308044,
0.15831945836544037,
0.06077509745955467,
-0.036701902747154236,
-0.027082176879048347,
-0.05738946050405502,
-0.09063588827848434,
-0.015746945515275,
-0.01896284520626068,
-0.11060138046741486,
-0.12780117988586426,
-0.23587657511234283,
-0.10028209537267685,
0.11625754088163376,
-0.019559236243367195,
0.07643396407365799,
0.011070110835134983,
0.01446118950843811,
-0.06818648427724838,
-0.14879745244979858,
-0.03238103166222572,
-0.039733901619911194,
-0.0023745112121105194,
-0.07009291648864746,
0.06800539046525955,
0.15110160410404205,
-0.1873164176940918,
-0.006201205775141716,
-0.1453351229429245,
-0.0395638532936573,
0.07340336591005325,
-0.06709118187427521,
0.024722518399357796,
0.042954809963703156,
0.0987192913889885,
-0.12403100728988647,
0.003529768902808428,
-0.1394178420305252,
-0.008086895570158958,
0.3015437126159668,
0.18318848311901093,
0.18692466616630554,
-0.15616057813167572,
0.017759233713150024,
0.15690205991268158,
0.00343124708160758,
-0.0016097892075777054,
-0.3020537793636322,
0.07676906883716583,
0.06572514772415161,
-0.12562407553195953,
-0.05278204008936882,
0.018847215920686722,
0.0398118831217289,
-0.0022718997206538916,
-0.08524880558252335,
0.2858516573905945,
0.0537530779838562,
-0.003464137902483344,
0.10185793042182922,
-0.016649562865495682,
0.204835444688797,
-0.08728712797164917,
-0.1266433298587799,
-0.21582327783107758,
0.056322820484638214,
-0.12812095880508423,
-0.05741610750555992,
-0.08377007395029068,
0.25531205534935,
0.04563300684094429,
-0.05139830335974693,
-0.20876085758209229,
0.0937313586473465,
0.12005706876516342,
-0.31208959221839905,
0.12408521771430969,
-0.014777581207454205,
0.03443336486816406,
0.017728904262185097,
-0.10161720216274261,
0.0629444345831871,
-0.02668711170554161,
-0.13241685926914215,
0.20645414292812347,
0.05398932099342346,
0.007826791144907475,
-0.002059424761682749,
0.027551760897040367,
-0.11421505361795425,
0.03474442660808563,
0.09730170667171478,
-0.09614350646734238,
-0.04007645323872566,
0.12754873931407928,
0.21469110250473022,
-0.21794725954532623,
0.031612612307071686,
-0.02300216071307659,
0.11595717072486877,
-0.09149205684661865,
-0.13937564194202423,
0.12198255211114883,
-0.007054976187646389,
0.11838182061910629,
0.023569388315081596,
-0.052596256136894226,
-0.17412088811397552,
-0.06733742356300354,
0.035531677305698395,
0.07648002356290817,
0.07440804690122604,
-0.1711062788963318,
-0.007029821630567312,
-2.663235266053499e-32,
0.02873152494430542,
0.12435019761323929,
-0.10330554097890854,
0.09157003462314606,
-0.18184830248355865,
-0.015931280329823494,
-0.08440762013196945,
-0.09671792387962341,
-0.06558878719806671,
-0.14613746106624603,
-0.01650657132267952,
0.09569644927978516,
0.0914684608578682,
0.039231132715940475,
-0.08434443175792694,
-0.06401033699512482,
-0.0683223232626915,
-0.10316282510757446,
0.028353605419397354,
0.011459920555353165,
0.035407908260822296,
0.0010631679324433208,
-0.035632211714982986,
-0.08308559656143188,
0.0016555099282413721,
-0.09160850197076797,
-0.06697539240121841,
0.10736478865146637,
0.042093075811862946,
0.07693731784820557,
-0.05297834053635597,
0.0044455258175730705,
-0.004221348557621241,
0.12289167940616608,
0.01732024736702442,
0.01944364234805107,
-0.12337566912174225,
-0.06559112668037415,
-0.09142196923494339,
0.005690889898687601,
0.009338989853858948,
0.08463536202907562,
0.060243040323257446,
-0.20679016411304474,
0.041316013783216476,
0.03526631370186806,
0.010948517359793186,
0.026785317808389664,
0.09352491050958633,
0.05694463476538658,
-0.08532147854566574,
0.06844833493232727,
-0.034793462604284286,
0.010848794132471085,
0.1203145757317543,
0.020773375406861305,
0.07682348787784576,
0.026772409677505493,
0.01874612830579281,
-0.005864458158612251,
0.15864725410938263,
-0.06336527317762375,
-0.040597546845674515,
0.05305169150233269,
0.2700144946575165,
-0.021159682422876358,
0.17396816611289978,
-0.15754607319831848,
0.013953149318695068,
-0.07016140222549438,
-0.007448316551744938,
0.10609764605760574,
0.011286776512861252,
0.06676196306943893,
-0.16027814149856567,
-0.05955604091286659,
-0.1687730848789215,
0.01545773260295391,
0.0825117751955986,
-0.005902603268623352,
-0.06737010926008224,
0.012732123956084251,
0.14659862220287323,
0.061653006821870804,
0.1305040717124939,
0.11014663428068161,
-0.17376960813999176,
-0.07597000896930695,
-0.03497670963406563,
0.034998420625925064,
-0.027331458404660225,
0.07960618287324905,
-0.1493101418018341,
-0.10606260597705841,
-0.10650680959224701,
-0.007354961708188057,
0.05208582058548927,
0.09618540853261948,
0.05638226494193077,
-0.1552451103925705,
0.034159205853939056,
0.05249311402440071,
0.15907461941242218,
0.055411770939826965,
0.08673162758350372,
-0.06219637393951416,
0.14366206526756287,
0.10795524716377258,
-0.23252618312835693,
-0.040779463946819305,
-0.010782632976770401,
0.024282842874526978,
0.09301488101482391,
-0.013007552362978458,
0.04934203624725342,
-0.019984573125839233,
-0.05440620705485344,
-0.1220177486538887,
0.089274100959301,
0.14595693349838257,
-0.36216774582862854,
0.04382761940360069,
-0.13476400077342987,
0.017251240089535713,
-0.05916154012084007,
0.02114291675388813,
-0.01928422786295414,
-0.08271268755197525,
0.14035241305828094,
-0.012999271042644978,
-0.029510026797652245,
-0.12299298495054245,
7.513494324484782e-7,
-0.03545155003666878,
0.1274714469909668,
0.017288751900196075,
0.05112018436193466,
-0.005336398258805275,
-0.09203050285577774,
-0.25478506088256836,
0.13096708059310913,
0.028141221031546593,
0.11809039860963821,
0.09960664063692093,
-0.08590047806501389,
0.041956208646297455,
-0.029899757355451584,
0.05389489606022835,
-0.048823557794094086,
-0.07503543049097061,
-0.03289495036005974,
-0.09644583612680435,
0.09823711216449738,
0.15209771692752838,
0.12220560014247894,
0.05790186673402786,
0.0030525182373821735,
0.053657062351703644,
-0.03085726872086525,
-0.042181313037872314,
-0.17806392908096313,
0.15431945025920868,
-0.09876526892185211,
-0.08929409831762314,
-0.0007143726106733084,
-0.03249474614858627,
0.0009686536504887044,
0.06435886025428772,
-0.21293626725673676,
-0.19870209693908691,
-0.07601995021104813,
-0.021122677251696587,
0.14250312745571136,
0.20227406919002533,
-0.08949944376945496,
-0.14491599798202515,
-0.17775708436965942,
0.1406414806842804,
-0.005248422734439373,
-0.09925702959299088,
0.059399716556072235,
-0.1429852992296219,
-0.04002208635210991,
0.029652632772922516,
0.05565164238214493,
0.08967167884111404,
0.09190652519464493,
0.0016302193980664015,
-0.10630408674478531,
-0.12597468495368958,
0.012440623715519905,
0.12515325844287872,
-0.14985015988349915,
-0.08919084817171097,
-0.08419717848300934,
-0.02860240638256073,
0.04550283029675484,
-0.040959399193525314,
-0.07432208955287933,
0.05261337384581566,
9.574268899949954e-35,
-0.02153225615620613,
0.06287822127342224,
0.06610407680273056,
-0.10970694571733475,
0.13321158289909363,
-0.10313472896814346,
0.17108005285263062,
-0.03425480052828789,
-0.03462783247232437,
-0.12398476898670197,
-0.09524589776992798
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | It should be possible to run it locally using the HF datasets-server API (docs [here](https://huggingface.co/docs/datasets-server)) but the front end part is not open source (yet ?)
The back-end is open source though if you're interested: https://github.com/huggingface/datasets-server
It automatically converts datasets on HF to Parquet, which is the format we use to power the viewer. |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 54 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
It should be possible to run it locally using the HF datasets-server API (docs [here](https://huggingface.co/docs/datasets-server)) but the front end part is not open source (yet ?)
The back-end is open source though if you're interested: https://github.com/huggingface/datasets-server
It automatically converts datasets on HF to Parquet, which is the format we use to power the viewer. | [
-0.05005543678998947,
0.05805506557226181,
-0.06805897504091263,
0.1418362855911255,
0.1299707293510437,
0.01768534816801548,
0.13034503161907196,
-0.030685925856232643,
0.0900641605257988,
0.12283122539520264,
-0.1271456927061081,
0.04530409350991249,
-0.032938260585069656,
0.2106531262397766,
0.018696334213018417,
-0.18498218059539795,
-0.09752833843231201,
-0.0313686840236187,
-0.09788443893194199,
-0.023679330945014954,
0.12373711168766022,
0.07365843653678894,
0.17955400049686432,
-0.04702339693903923,
0.06374581158161163,
-0.026086343452334404,
-0.13199946284294128,
0.11980776488780975,
0.07672061026096344,
-0.08517027646303177,
0.10931730270385742,
0.23979534208774567,
0.12284452468156815,
0.259735643863678,
0.000005679489731846843,
-0.0075286924839019775,
-0.02688225544989109,
0.15542176365852356,
-0.10221309214830399,
-0.07443194836378098,
0.1499301791191101,
-0.13345825672149658,
-0.004383558873087168,
-0.07725656777620316,
-0.031740136444568634,
-0.14289037883281708,
-0.03242930769920349,
-0.049601513892412186,
0.20885668694972992,
0.07560949772596359,
0.03004106879234314,
0.0704299658536911,
0.06053365767002106,
-0.10614142566919327,
0.03389180079102516,
0.16807086765766144,
-0.032521456480026245,
0.1366640031337738,
-0.16942298412322998,
0.028594864532351494,
0.044953603297472,
0.056691065430641174,
0.02983265556395054,
-0.03011973202228546,
0.0777505412697792,
0.05181846022605896,
-0.1972099393606186,
-0.12293939292430878,
-0.0023020170629024506,
0.14310483634471893,
0.16192494332790375,
-0.030843297019600868,
-0.10523921251296997,
0.10636463761329651,
-0.10820645093917847,
0.0331270694732666,
-0.10409189015626907,
0.025017382577061653,
0.0496530756354332,
0.06772924214601517,
-0.12270940840244293,
-0.22390252351760864,
-0.13026811182498932,
-0.14168681204319,
0.0856071263551712,
0.05203571915626526,
-0.07469172030687332,
-0.01893104985356331,
-0.13066913187503815,
-0.1817089021205902,
0.1801171600818634,
-0.02527216263115406,
0.05826878175139427,
0.022189639508724213,
0.09410834312438965,
-0.003591858083382249,
-0.08955440670251846,
-0.06556545197963715,
0.08773075044155121,
0.04244440048933029,
-0.028644472360610962,
0.012572776526212692,
-0.17901134490966797,
0.018666010349988937,
0.1840750128030777,
-0.08021027594804764,
0.09262450039386749,
-0.037530120462179184,
0.16548049449920654,
0.25962182879447937,
0.005907483398914337,
0.09449893981218338,
-0.009129174053668976,
-0.10566366463899612,
-0.13286437094211578,
0.06863503158092499,
0.10087090730667114,
0.04880237951874733,
0.11196798831224442,
0.055616095662117004,
0.29735374450683594,
0.03800895810127258,
-0.020034054294228554,
0.18539845943450928,
-0.014308547601103783,
-0.020684123039245605,
0.061639394611120224,
-0.05578816682100296,
0.013348697684705257,
-0.23829330503940582,
-0.02378963492810726,
0.03328715264797211,
0.017380204051733017,
-0.005662763025611639,
0.0687270313501358,
-0.0672411099076271,
-0.07035013288259506,
-0.038291025906801224,
0.07030138373374939,
-0.032758358865976334,
0.12103766202926636,
0.09547311812639236,
-0.2624336779117584,
-0.06891317665576935,
0.08742458373308182,
-0.050203192979097366,
-0.048971597105264664,
0.09018846601247787,
-0.07786707580089569,
0.08756407350301743,
-0.13711662590503693,
0.20193378627300262,
-0.32372474670410156,
0.09558045864105225,
0.04730162024497986,
0.05818707123398781,
0.03369493782520294,
-0.053298354148864746,
-0.36494606733322144,
-0.0692216083407402,
0.10665193200111389,
0.02141898311674595,
0.0535566583275795,
-0.05262433737516403,
0.09609311074018478,
0.2164519727230072,
0.06544487923383713,
0.17297479510307312,
-0.03460066020488739,
-0.030600501224398613,
0.027981335297226906,
0.030316708609461784,
-0.08208975940942764,
-0.18894889950752258,
-0.05763985216617584,
0.14361058175563812,
-0.007043748628348112,
-0.06478849053382874,
-0.16422733664512634,
0.09380532801151276,
-0.02130027487874031,
-0.24525536596775055,
0.012762805446982384,
-0.10097948461771011,
0.12440695613622665,
-0.13644318282604218,
-0.22466394305229187,
0.12006768584251404,
-0.0029204601887613535,
0.1299005150794983,
-0.11557219922542572,
0.0036516794934868813,
-0.011072683148086071,
0.16140282154083252,
-0.03762643039226532,
-0.1180475503206253,
0.1003989577293396,
-0.1624314934015274,
0.08463204652070999,
-0.20248377323150635,
-0.06229427456855774,
-0.05841831490397453,
0.1002325713634491,
0.1905442476272583,
0.010756605304777622,
-0.005865843500941992,
-0.04769451171159744,
0.029216740280389786,
0.06518765538930893,
-0.25012803077697754,
-0.12348867207765579,
-0.018604138866066933,
-0.08813406527042389,
0.019278407096862793,
-0.017060227692127228,
-0.028725629672408104,
-0.07351554930210114,
0.004029469098895788,
-0.06161036714911461,
0.1801282912492752,
-0.021028535440564156,
0.17860162258148193,
0.08543160557746887,
-0.06446069478988647,
0.024618783965706825,
0.08081814646720886,
-0.06265806406736374,
-0.023937439545989037,
0.15093392133712769,
-0.0570913590490818,
-0.023282762616872787,
-0.0189655888825655,
0.060593411326408386,
0.12660089135169983,
-0.08538275212049484,
0.14175842702388763,
0.16189728677272797,
-0.04704150930047035,
0.08325738459825516,
-0.13999055325984955,
-0.01336152944713831,
-0.054204024374485016,
-0.17705336213111877,
0.17109882831573486,
0.0014110810589045286,
0.1491055190563202,
-0.12594008445739746,
0.015666840597987175,
-0.022863641381263733,
0.04504430666565895,
0.09978651255369186,
0.11078280210494995,
-0.0493929386138916,
0.06819827854633331,
0.027560457587242126,
-0.09077060967683792,
-0.06959564238786697,
0.08036895096302032,
-0.2578773498535156,
0.08040796965360641,
0.05071970075368881,
0.07036740332841873,
-0.11596586555242538,
-0.11327914148569107,
0.12663809955120087,
-0.02131248079240322,
0.15087221562862396,
-0.01225269865244627,
-0.0073300921358168125,
0.01821964420378208,
-0.0060689556412398815,
0.11800995469093323,
0.05403878539800644,
-0.12467881292104721,
0.05321293696761131,
-0.14068357646465302,
0.10255562514066696,
-0.07966981083154678,
-0.1074526309967041,
0.09167072176933289,
-0.12685908377170563,
0.10456373542547226,
0.1383175551891327,
-0.04840144142508507,
0.12452321499586105,
0.01451915968209505,
-0.07203095406293869,
0.05470246449112892,
-0.13068948686122894,
0.03923467546701431,
-0.05244476720690727,
0.06271639466285706,
0.06789436936378479,
-0.21734550595283508,
-0.07948716729879379,
-0.029978107661008835,
-0.023229988291859627,
0.019006378948688507,
-0.0940767154097557,
0.038111668080091476,
-0.0952647253870964,
0.07115570455789566,
0.11815865337848663,
0.04140549525618553,
-0.045459896326065063,
0.0058449674397706985,
0.06609170138835907,
0.07817438244819641,
-0.02359938994050026,
-0.22148549556732178,
0.08636130392551422,
-0.1066957488656044,
0.09258236736059189,
-0.0032685291953384876,
0.16982164978981018,
-0.05595804378390312,
-0.0817924216389656,
-0.05365113541483879,
0.03774742782115936,
0.16987642645835876,
0.04065267741680145,
-0.08796022832393646,
0.04236189275979996,
-0.005250205751508474,
-0.0961601585149765,
0.14701180160045624,
-0.22204038500785828,
-0.19868357479572296,
0.14103853702545166,
-0.1285003125667572,
-0.12250523269176483,
-0.07700230926275253,
0.01567738875746727,
-0.09837698936462402,
0.10110718011856079,
-0.05768880993127823,
-0.056630488485097885,
-0.20438015460968018,
0.16580769419670105,
-0.11290442198514938,
-0.05380411446094513,
0.09059027582406998,
0.06591697782278061,
0.099696584045887,
0.028260868042707443,
-0.13440851867198944,
0.013846348971128464,
-0.019038090482354164,
0.05881114304065704,
0.010462803766131401,
-0.0006307011935859919,
0.03590863570570946,
0.0203961543738842,
-0.03365053981542587,
0.041094958782196045,
-0.1432991623878479,
-0.19099600613117218,
0.14189113676548004,
-0.2789836823940277,
0.0691232979297638,
-0.06012880802154541,
0.07009044289588928,
0.09699700027704239,
0.00959105882793665,
-0.0011467187432572246,
0.0742119625210762,
0.13889005780220032,
0.1461324393749237,
0.060007281601428986,
-0.30032217502593994,
-0.1488228142261505,
-0.07636146992444992,
0.11574597656726837,
-0.043003056198358536,
0.022505419328808784,
-0.05431262403726578,
0.050727926194667816,
-0.261264443397522,
0.07159648835659027,
-0.09706065058708191,
-0.010269200429320335,
-0.24827620387077332,
-0.006979094818234444,
0.07741494476795197,
0.10187067836523056,
0.02753065712749958,
-0.08754485100507736,
0.17185023427009583,
-0.03594779968261719,
0.1271878182888031,
-0.11286313831806183,
-0.05229145660996437,
0.09606067091226578,
-0.08021695166826248,
0.05873116850852966,
-0.028447642922401428,
-0.07717657089233398,
0.10607104748487473,
0.11608670651912689,
0.17513784766197205,
-0.08161976933479309,
0.19411344826221466,
0.004036376252770424,
0.10186754167079926,
-0.023993181064724922,
-0.09307470172643661,
0.11748950183391571,
0.1141379326581955,
0.2008122056722641,
-0.09247490763664246,
0.01564849726855755,
0.09420786052942276,
-0.05036340281367302,
-0.19539393484592438,
0.07380466163158417,
-0.07974296808242798,
-0.1613442450761795,
-0.08414807915687561,
0.17034010589122772,
-0.10551254451274872,
-0.015383357182145119,
-0.19031712412834167,
0.06896264106035233,
0.04539521411061287,
0.07064832001924515,
-0.0034361202269792557,
-0.09156407415866852,
0.19399403035640717,
0.11281769722700119,
-0.013811768032610416,
0.22653593122959137,
0.17592687904834747,
0.0863858014345169,
0.14392825961112976,
0.12586790323257446,
-0.04777686670422554,
0.2334289699792862,
-0.10286574065685272,
-0.11986041814088821,
-0.07362588495016098,
0.07582118362188339,
0.0407688207924366,
0.15887276828289032,
0.07635637372732162,
-0.03718962147831917,
-0.012296277098357677,
-0.006372098345309496,
-0.0761476457118988,
-0.01405789703130722,
-0.04367061331868172,
-0.13589799404144287,
-0.13007745146751404,
-0.2294457107782364,
-0.06582950055599213,
0.11269601434469223,
-0.051843319088220596,
0.04602227732539177,
0.07542183995246887,
0.08905079215765,
-0.05090421065688133,
-0.09609706699848175,
-0.01890651509165764,
-0.071589894592762,
0.02383420616388321,
-0.08346028625965118,
-0.01327995490282774,
0.18344372510910034,
-0.262975811958313,
-0.005116486921906471,
-0.17992202937602997,
-0.006762316450476646,
0.06805802136659622,
-0.07929112762212753,
-0.0000636433032923378,
0.0023904636036604643,
0.08533727377653122,
-0.09911499917507172,
0.06956510245800018,
-0.1075747087597847,
-0.01668136939406395,
0.3500572144985199,
0.18188413977622986,
0.1478191465139389,
-0.16269885003566742,
0.05541684105992317,
0.1819838434457779,
0.012999162077903748,
0.005935332737863064,
-0.2811749279499054,
0.10735110938549042,
0.06908644735813141,
-0.13497842848300934,
-0.01962224394083023,
0.05526893958449364,
0.07513029873371124,
0.004272973630577326,
-0.10676314681768417,
0.28757739067077637,
0.009057917632162571,
0.01666443422436714,
0.0956578329205513,
-0.049157895147800446,
0.17631137371063232,
-0.09476584941148758,
-0.13691382110118866,
-0.2006516009569168,
0.05851173400878906,
-0.17931362986564636,
-0.0426546148955822,
-0.06814514100551605,
0.22438988089561462,
0.06323228031396866,
-0.07079719007015228,
-0.19805890321731567,
0.08931832015514374,
0.08916516602039337,
-0.2886364758014679,
0.17626158893108368,
0.019820738583803177,
0.0440157912671566,
0.0016102255322039127,
-0.10649619996547699,
0.04214388504624367,
-0.04033214598894119,
-0.17661510407924652,
0.21750877797603607,
0.05559159442782402,
-0.025429965928196907,
-0.052603863179683685,
-0.005941951647400856,
-0.05605293810367584,
0.0036358614452183247,
0.12973162531852722,
-0.1192195788025856,
-0.0390038937330246,
0.1083277016878128,
0.1848398745059967,
-0.14066945016384125,
0.010595064610242844,
-0.05145179480314255,
0.09478364884853363,
-0.07994820922613144,
-0.18706607818603516,
0.15181253850460052,
0.0018243718659505248,
0.16013486683368683,
0.038601353764534,
-0.05315643921494484,
-0.15961621701717377,
-0.13191339373588562,
0.012437884695827961,
0.1383846253156662,
0.02836664393544197,
-0.17448867857456207,
0.010177789255976677,
-2.6687606772495394e-32,
0.015687385573983192,
0.1006670668721199,
-0.11621743440628052,
0.14661630988121033,
-0.19006501138210297,
-0.05036548152565956,
-0.04722809046506882,
-0.1655573844909668,
-0.039183348417282104,
-0.11235971003770828,
0.029399385675787926,
0.11535218358039856,
0.12292357534170151,
0.05095943808555603,
-0.06394194066524506,
-0.09312448650598526,
-0.059507936239242554,
-0.127450093626976,
-0.019828099757432938,
0.029036203399300575,
0.06750590354204178,
-0.00609176279976964,
-0.041593506932258606,
-0.023671336472034454,
-0.013075877912342548,
-0.14838354289531708,
-0.10330607742071152,
0.17846044898033142,
0.009952769614756107,
0.03806868940591812,
-0.06774510443210602,
0.060367077589035034,
-0.014244199730455875,
0.08672646433115005,
0.03655451536178589,
0.024169836193323135,
-0.1431901454925537,
-0.01692766137421131,
-0.1301897168159485,
0.029352832585573196,
0.0030494178645312786,
0.09484367072582245,
0.11925792694091797,
-0.17709656059741974,
0.0013926635729148984,
0.041657596826553345,
-0.011582735925912857,
0.08174343407154083,
0.10572497546672821,
0.08982597291469574,
-0.08529035747051239,
0.06806513667106628,
-0.04796450957655907,
0.04588698968291283,
0.11056812107563019,
-0.049383871257305145,
0.08407582342624664,
0.06679394841194153,
-0.03696567937731743,
-0.023036601021885872,
0.13322845101356506,
-0.12671147286891937,
-0.009653663262724876,
0.02941896952688694,
0.28393200039863586,
-0.01818172261118889,
0.20204272866249084,
-0.14414313435554504,
-0.01602442003786564,
-0.004444926977157593,
-0.003916331101208925,
0.12294139713048935,
0.03323271498084068,
0.02751168981194496,
-0.12544779479503632,
-0.005042895209044218,
-0.1904538869857788,
0.02025149203836918,
0.07966458052396774,
0.024565568193793297,
-0.11256469041109085,
0.0032178873661905527,
0.1700102984905243,
0.08071285486221313,
0.11583156138658524,
0.09575509279966354,
-0.14358317852020264,
-0.0706794261932373,
-0.07686199247837067,
-0.008155454881489277,
-0.006227443460375071,
0.1049608662724495,
-0.12981125712394714,
-0.08234870433807373,
-0.09235075861215591,
0.0021899081766605377,
0.06963281333446503,
0.10555845499038696,
0.052224621176719666,
-0.18846990168094635,
0.01102481409907341,
0.0833386778831482,
0.10038302838802338,
0.032866474241018295,
0.06914909929037094,
-0.0730256587266922,
0.15569055080413818,
0.10067083686590195,
-0.2568759024143219,
-0.005053181666880846,
0.003951664082705975,
0.03892669454216957,
0.1174076572060585,
0.002047362271696329,
0.09300179779529572,
-0.04741446301341057,
0.002443639561533928,
-0.12447796016931534,
0.10264074802398682,
0.12487531453371048,
-0.36192265152931213,
0.07374740391969681,
-0.14657928049564362,
-0.01753581501543522,
-0.04977912828326225,
0.03718024119734764,
-0.011354365386068821,
-0.05677102878689766,
0.11553686857223511,
0.004287366289645433,
-0.01074102520942688,
-0.08109047263860703,
7.357100457738852e-7,
-0.01581488735973835,
0.08996084332466125,
-0.01685180887579918,
0.02746756561100483,
0.016690121963620186,
-0.09380973875522614,
-0.29002219438552856,
0.13489791750907898,
-0.009818446822464466,
0.11461708694696426,
0.07688413560390472,
-0.08065466582775116,
0.06938518583774567,
0.0020039451774209738,
0.007906854152679443,
-0.09309935569763184,
-0.1311127096414566,
-0.019727647304534912,
-0.13218994438648224,
0.12839443981647491,
0.1590748429298401,
0.0569416843354702,
0.05623369291424751,
-0.010511791333556175,
0.08197199553251266,
0.007966495119035244,
-0.03704960644245148,
-0.14741526544094086,
0.13243965804576874,
-0.07640034705400467,
-0.1474880427122116,
-0.017343072220683098,
-0.0435882993042469,
-0.02236011251807213,
0.07950624078512192,
-0.18194690346717834,
-0.19150401651859283,
-0.06414102017879486,
0.028789322823286057,
0.10923504084348679,
0.16924351453781128,
-0.13835366070270538,
-0.12583129107952118,
-0.23810777068138123,
0.15804535150527954,
-0.012041040696203709,
-0.12902036309242249,
0.09887029975652695,
-0.09582534432411194,
-0.027317052707076073,
0.05622851848602295,
0.01755773462355137,
0.08774534612894058,
0.07533954828977585,
0.004840334877371788,
-0.12353254109621048,
-0.1050473153591156,
0.00264171720482409,
0.1240336000919342,
-0.17339260876178741,
-0.08706764876842499,
-0.15156298875808716,
-0.014345841482281685,
0.0713440552353859,
-0.07549825310707092,
-0.04925060644745827,
0.039207302033901215,
9.689896103303225e-35,
-0.022607281804084778,
0.08716980367898941,
0.06893211603164673,
-0.05762535333633423,
0.0991436168551445,
-0.11135692149400711,
0.1775994896888733,
0.0029652973171323538,
-0.07605035603046417,
-0.1360873132944107,
-0.08149121701717377
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | the new frontend would probably be hard to open source, as is, as it's quite intertwined with the Hub's code.
However, at some point it would be amazing to have a community-driven open source implementation of a frontend to datasets-server! |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 40 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
the new frontend would probably be hard to open source, as is, as it's quite intertwined with the Hub's code.
However, at some point it would be amazing to have a community-driven open source implementation of a frontend to datasets-server! | [
-0.054085589945316315,
0.05205724015831947,
-0.08122223615646362,
0.16040480136871338,
0.18844208121299744,
0.038408320397138596,
0.1305377334356308,
-0.04666566476225853,
0.13880984485149384,
0.1487341970205307,
-0.13315123319625854,
0.0013734017265960574,
-0.03257105126976967,
0.20543153584003448,
0.0016775376861914992,
-0.14462633430957794,
-0.08989434689283371,
-0.06979037821292877,
-0.09107829630374908,
-0.02217528223991394,
0.15556758642196655,
0.06425163149833679,
0.15504305064678192,
-0.026680009439587593,
0.002085648477077484,
0.004615802317857742,
-0.07895787060260773,
0.10237623006105423,
0.024956965819001198,
-0.07392538338899612,
0.11816250532865524,
0.22644323110580444,
0.0845717042684555,
0.21353885531425476,
0.000005947163572272984,
0.037016790360212326,
-0.021607495844364166,
0.13938632607460022,
-0.10309025645256042,
-0.03867205232381821,
0.1198493093252182,
-0.10853337496519089,
-0.003078178269788623,
-0.06908777356147766,
-0.02580380067229271,
-0.10593924671411514,
-0.002539528999477625,
-0.048394277691841125,
0.16259364783763885,
0.07538338750600815,
0.028821581974625587,
0.11213551461696625,
0.004715112503618002,
-0.11542840301990509,
0.009565572254359722,
0.21117009222507477,
-0.048728667199611664,
0.13116978108882904,
-0.15933850407600403,
-0.02507556416094303,
0.040649060159921646,
0.08253917843103409,
0.014575864188373089,
-0.08445802330970764,
0.06220505014061928,
0.08653293550014496,
-0.20644521713256836,
-0.12748102843761444,
-0.006924578454345465,
0.13438987731933594,
0.14316058158874512,
-0.0362154059112072,
-0.08636195957660675,
0.09058532863855362,
-0.11198964715003967,
0.05563997104763985,
-0.10403528064489365,
-0.02049900032579899,
0.00584382563829422,
0.05474056303501129,
-0.14531999826431274,
-0.22185491025447845,
-0.13632376492023468,
-0.14406593143939972,
0.0646863579750061,
0.026376713067293167,
-0.05571077764034271,
-0.030746998265385628,
-0.13412846624851227,
-0.1493573635816574,
0.2073540985584259,
-0.04726560041308403,
0.05724930763244629,
0.01829465664923191,
0.08623310178518295,
-0.013813517987728119,
-0.08812867850065231,
-0.0661826953291893,
0.07802636176347733,
0.10685016959905624,
0.035778965801000595,
0.01955360732972622,
-0.19165074825286865,
0.02930915355682373,
0.17037340998649597,
-0.05121413990855217,
0.09953225404024124,
-0.04339458420872688,
0.1704695224761963,
0.26470932364463806,
0.014655130915343761,
0.05526549741625786,
0.022703805938363075,
-0.11678052693605423,
-0.12289901077747345,
0.09543109685182571,
0.06483276188373566,
0.056544240564107895,
0.13412272930145264,
0.00018919249123428017,
0.322857141494751,
0.07514108717441559,
-0.020568469539284706,
0.1781681925058365,
0.014197262935340405,
0.019339140504598618,
0.07999814301729202,
-0.0353412888944149,
-0.003191085299476981,
-0.18637573719024658,
-0.04230079427361488,
0.053419701755046844,
0.020945146679878235,
0.00226387195289135,
0.09938947856426239,
-0.04702890291810036,
-0.05700712651014328,
-0.035833265632390976,
0.07958988100290298,
-0.03768647834658623,
0.08140408992767334,
0.17276805639266968,
-0.2763165533542633,
-0.04097137600183487,
0.10025693476200104,
-0.0376436710357666,
-0.061149775981903076,
0.0768282487988472,
-0.07273893803358078,
0.08832154422998428,
-0.07957855612039566,
0.20039701461791992,
-0.28623804450035095,
0.10406704992055893,
0.010541968047618866,
0.022369368001818657,
0.06501983851194382,
-0.054810233414173126,
-0.3379639685153961,
-0.05036067217588425,
0.14255723357200623,
0.049906887114048004,
0.04772213101387024,
-0.05336938053369522,
0.08496640622615814,
0.21135401725769043,
0.09629255533218384,
0.1507672667503357,
-0.0465519055724144,
-0.005098200403153896,
-0.0397389680147171,
0.014368160627782345,
-0.09915556013584137,
-0.1714874505996704,
0.0011937121162191033,
0.1473771184682846,
-0.00028193186153657734,
-0.0865166112780571,
-0.13807611167430878,
0.03908582404255867,
-0.012489204294979572,
-0.26799824833869934,
0.014709020033478737,
-0.026672421023249626,
0.08179257810115814,
-0.09912799298763275,
-0.2277616262435913,
0.15088729560375214,
-0.04380950704216957,
0.15076544880867004,
-0.11950048059225082,
-0.01881517842411995,
-0.007308693137019873,
0.19535396993160248,
-0.061200402677059174,
-0.12274269014596939,
0.0935450866818428,
-0.1967119574546814,
0.021591264754533768,
-0.23388329148292542,
-0.03817132115364075,
-0.06038707494735718,
0.07424881309270859,
0.1559487283229828,
0.006393888965249062,
-0.05107293650507927,
-0.04202454909682274,
0.03766839578747749,
0.056775160133838654,
-0.2520075738430023,
-0.05069788545370102,
-0.01837003417313099,
-0.09010441601276398,
0.009474302642047405,
-0.005692810285836458,
-0.009561772458255291,
-0.09938456863164902,
0.04623490944504738,
-0.04475536197423935,
0.17031842470169067,
-0.04779454320669174,
0.17896495759487152,
0.0865340381860733,
-0.07355635613203049,
-0.021264666691422462,
0.04040607064962387,
-0.08909472078084946,
-0.012485692277550697,
0.1745767742395401,
-0.06432139873504639,
-0.03579020872712135,
0.003093546722084284,
0.05035277083516121,
0.12529945373535156,
-0.07712983340024948,
0.1253640055656433,
0.20791542530059814,
-0.02695772424340248,
0.1355660855770111,
-0.11630271375179291,
-0.0516827292740345,
-0.05016208440065384,
-0.19531463086605072,
0.16890966892242432,
0.016021233052015305,
0.1851213276386261,
-0.14966514706611633,
0.01372318435460329,
-0.025664115324616432,
0.08215595781803131,
0.09108280390501022,
0.14493902027606964,
-0.06521249562501907,
0.0673183798789978,
0.035246167331933975,
0.020057540386915207,
-0.11194218695163727,
0.057187117636203766,
-0.18355484306812286,
0.041983410716056824,
0.005971998907625675,
0.11176740378141403,
-0.1079331710934639,
-0.09523730725049973,
0.11341604590415955,
0.00961175374686718,
0.1171770915389061,
-0.05453759804368019,
0.01017007976770401,
0.01906547322869301,
-0.022505229339003563,
0.0777631551027298,
0.0726427435874939,
-0.1224486455321312,
0.06751656532287598,
-0.14223557710647583,
0.06661731004714966,
-0.0850549265742302,
-0.12317226082086563,
0.07634598016738892,
-0.14979512989521027,
0.09718956798315048,
0.08254637569189072,
-0.045656654983758926,
0.10928572714328766,
0.006861416157335043,
-0.016369447112083435,
0.06567396223545074,
-0.09363867342472076,
-0.016813814640045166,
-0.04176848754286766,
0.07411268353462219,
0.07252063602209091,
-0.19969788193702698,
-0.05926232412457466,
0.018804848194122314,
-0.005740940570831299,
0.02437271736562252,
-0.047861017286777496,
0.08885620534420013,
-0.10558290034532547,
0.03518684580922127,
0.18842409551143646,
0.033512599766254425,
-0.028191659599542618,
-0.022186890244483948,
0.07095617800951004,
0.07053348422050476,
-0.0023727372754365206,
-0.16252002120018005,
0.10100042819976807,
-0.12280391901731491,
0.0918823704123497,
0.028954509645700455,
0.16229572892189026,
-0.027549361810088158,
-0.08208353817462921,
-0.09614943712949753,
0.04937734827399254,
0.1978496015071869,
0.004093927331268787,
-0.06382650882005692,
0.07018092274665833,
-0.01123621966689825,
-0.07608142495155334,
0.19191974401474,
-0.20150354504585266,
-0.1772293746471405,
0.13134704530239105,
-0.2084493637084961,
-0.1287282109260559,
-0.05220846086740494,
0.04040364548563957,
-0.1326480507850647,
0.09376323223114014,
-0.0692613422870636,
-0.06077456846833229,
-0.193914994597435,
0.12134463340044022,
-0.10811227560043335,
-0.06480046361684799,
0.10352339595556259,
0.06745626777410507,
0.05335952714085579,
0.022258806973695755,
-0.0976899191737175,
-0.01462454441934824,
-0.01043523196130991,
0.04683215916156769,
-0.007742678746581078,
-0.006896065082401037,
0.01013907790184021,
0.0686420425772667,
-0.03339093551039696,
0.04930805787444115,
-0.15196549892425537,
-0.22701361775398254,
0.1616038829088211,
-0.28854966163635254,
-0.0011440288508310914,
-0.1379677802324295,
0.05579748377203941,
0.03784972429275513,
0.02127138338983059,
0.0284243356436491,
0.09780146181583405,
0.13414381444454193,
0.15171565115451813,
0.05565336346626282,
-0.2925419807434082,
-0.12331102043390274,
-0.05193069204688072,
0.1265368014574051,
-0.049914587289094925,
0.05727557837963104,
0.013945001177489758,
0.05554014816880226,
-0.19437424838542938,
0.06364404410123825,
-0.06421048939228058,
-0.03919825702905655,
-0.21569496393203735,
-0.03276214003562927,
0.043113190680742264,
0.10605942457914352,
0.009478339925408363,
-0.08031608164310455,
0.1437990367412567,
-0.025724418461322784,
0.07004735618829727,
-0.13625892996788025,
-0.05592690408229828,
0.058543719351291656,
-0.0427684485912323,
0.027726031839847565,
0.016574665904045105,
-0.09894657135009766,
0.11674720048904419,
0.13551758229732513,
0.16075225174427032,
-0.06057273596525192,
0.22030487656593323,
0.0026246237102895975,
0.104328453540802,
-0.011690028943121433,
-0.07414167374372482,
0.055485621094703674,
0.12923723459243774,
0.2094971239566803,
-0.09871967136859894,
-0.04160073772072792,
0.01986406370997429,
-0.03461908921599388,
-0.14492416381835938,
0.05335162952542305,
-0.11703632026910782,
-0.18773318827152252,
-0.08986099809408188,
0.14632590115070343,
-0.12416566908359528,
0.01631084643304348,
-0.21640363335609436,
0.037925925105810165,
0.044115643948316574,
0.07782430946826935,
-0.03533622995018959,
-0.10173694044351578,
0.1351422667503357,
0.0930754765868187,
0.012766451574862003,
0.19547559320926666,
0.18654751777648926,
0.04298483207821846,
0.1382731795310974,
0.11668001860380173,
-0.12430629134178162,
0.16586537659168243,
-0.06926926970481873,
-0.07427266240119934,
-0.09954317659139633,
0.08929704874753952,
0.0358436144888401,
0.12298475950956345,
0.09708051383495331,
-0.06154405698180199,
-0.051330793648958206,
-0.039919983595609665,
-0.07394038140773773,
0.014422394335269928,
-0.028931867331266403,
-0.11321216076612473,
-0.13575810194015503,
-0.19707702100276947,
-0.05677419900894165,
0.10819245874881744,
-0.02478605881333351,
0.0855005532503128,
0.04309456795454025,
0.05367886275053024,
-0.05701018124818802,
-0.13507439196109772,
-0.02761472389101982,
-0.10447744280099869,
0.019836073741316795,
-0.0978633314371109,
0.0799747183918953,
0.1793806552886963,
-0.21638552844524384,
-0.0003499795275274664,
-0.1660502403974533,
-0.04187050461769104,
0.08151207864284515,
-0.07605686783790588,
-0.0178823284804821,
-0.009646139107644558,
0.12183786928653717,
-0.11800595372915268,
0.06902392208576202,
-0.12210048735141754,
-0.009274542331695557,
0.35491371154785156,
0.2061852514743805,
0.15822184085845947,
-0.13836811482906342,
0.01997346431016922,
0.15337267518043518,
-0.00677147414535284,
0.015016959980130196,
-0.27565518021583557,
0.0708669051527977,
0.04313815012574196,
-0.1308416724205017,
-0.05349138006567955,
0.07685684412717819,
0.02861277014017105,
0.009945434518158436,
-0.07237570732831955,
0.26935845613479614,
0.011650076135993004,
0.018244845792651176,
0.09702835232019424,
-0.05355242267251015,
0.19371260702610016,
-0.10116764903068542,
-0.1445917785167694,
-0.19977957010269165,
0.053714606910943985,
-0.19052764773368835,
-0.06442848592996597,
-0.05524998530745506,
0.23195180296897888,
0.07409216463565826,
-0.07010051608085632,
-0.2664756178855896,
0.0643414631485939,
0.11479127407073975,
-0.33312076330184937,
0.11487819999456406,
-0.004279163666069508,
0.004558301996439695,
-0.0007775361300446093,
-0.09098733216524124,
0.08048716187477112,
-0.028756121173501015,
-0.1515737622976303,
0.22071610391139984,
0.06566380709409714,
-0.00981714017689228,
-0.04100904241204262,
0.01632377691566944,
-0.09462116658687592,
-0.03311174362897873,
0.07119130343198776,
-0.09427209943532944,
-0.051633402705192566,
0.1380264014005661,
0.19006215035915375,
-0.1814243495464325,
-0.011849567294120789,
-0.007665084674954414,
0.06738635897636414,
-0.1150805875658989,
-0.17370200157165527,
0.14712589979171753,
-0.015608061105012894,
0.13444018363952637,
0.04636130481958389,
-0.03924327716231346,
-0.14326095581054688,
-0.04820050299167633,
0.06589282304048538,
0.0866023376584053,
0.015615563839673996,
-0.1857624053955078,
0.026777680963277817,
-2.6913557357874577e-32,
0.0502278171479702,
0.1169399842619896,
-0.09719838947057724,
0.07200073450803757,
-0.1872674524784088,
-0.026424745097756386,
-0.02439800463616848,
-0.10221120715141296,
-0.03034089505672455,
-0.12032323330640793,
-0.017005883157253265,
0.10444417595863342,
0.09422354400157928,
0.058779072016477585,
-0.07497256994247437,
-0.04617300629615784,
-0.0335245281457901,
-0.12063570320606232,
-0.03641796112060547,
0.028306137770414352,
0.07337692379951477,
-0.04011177271604538,
-0.03216809779405594,
-0.05940527096390724,
0.015521264635026455,
-0.10810474306344986,
-0.038587216287851334,
0.1767863929271698,
0.040241677314043045,
0.09417113661766052,
-0.05812249332666397,
0.0813603326678276,
-0.014827894046902657,
0.09966821223497391,
0.03399364650249481,
-0.002209967467933893,
-0.09767300635576248,
-0.05899612978100777,
-0.08042851835489273,
-0.022793572396039963,
0.01628991961479187,
0.1204724982380867,
0.10348739475011826,
-0.17120616137981415,
0.07015562802553177,
0.003822693135589361,
0.005796108860522509,
0.0932195633649826,
0.11371543258428574,
0.0623251348733902,
-0.07950494438409805,
0.06716350466012955,
-0.03661623224616051,
0.019520143046975136,
0.11382658779621124,
-0.006538159679621458,
0.07585358619689941,
0.03164863958954811,
0.019837867468595505,
-0.032893452793359756,
0.12855494022369385,
-0.08269995450973511,
-0.02488826960325241,
0.04222043603658676,
0.2704980671405792,
-0.007273553404957056,
0.18395684659481049,
-0.1319175660610199,
-0.0036930241622030735,
-0.06258898228406906,
-0.007946867495775223,
0.1093323677778244,
0.033248137682676315,
0.07075026631355286,
-0.15377232432365417,
-0.04370718076825142,
-0.16700515151023865,
0.033386439085006714,
0.042283810675144196,
0.0009155048173852265,
-0.10283908247947693,
-0.009876273572444916,
0.15858691930770874,
0.07274439930915833,
0.09968962520360947,
0.09098700433969498,
-0.16271014511585236,
-0.040890809148550034,
-0.02722047083079815,
0.02920127660036087,
-0.01798236183822155,
0.03600762411952019,
-0.1461416482925415,
-0.08965598046779633,
-0.07609951496124268,
-0.0046896059066057205,
0.06732625514268875,
0.11140831559896469,
0.0748070701956749,
-0.19663287699222565,
0.009505458176136017,
0.09784945845603943,
0.10712511837482452,
0.025818949565291405,
0.06577767431735992,
-0.05714091286063194,
0.11769761145114899,
0.12146557122468948,
-0.2484389990568161,
0.007543360814452171,
-0.0033678854815661907,
0.028385093435645103,
0.10770358145236969,
-0.05478191003203392,
0.058505233377218246,
-0.03652077913284302,
-0.011944313533604145,
-0.13807475566864014,
0.09509498625993729,
0.15912099182605743,
-0.35339775681495667,
0.03063276596367359,
-0.13987721502780914,
0.035917844623327255,
-0.09046225994825363,
0.01181653793901205,
0.007345298305153847,
-0.03855924680829048,
0.09951562434434891,
-0.04239925742149353,
-0.033518753945827484,
-0.12269526720046997,
7.491072437915136e-7,
0.0017094910144805908,
0.051461391150951385,
0.022466346621513367,
0.03707146272063255,
0.01593424752354622,
-0.07645589858293533,
-0.2521650493144989,
0.16500219702720642,
0.00008156265539582819,
0.11021676659584045,
0.07935626059770584,
-0.09293666481971741,
0.06043071672320366,
-0.03422563523054123,
0.0256050955504179,
-0.047330599278211594,
-0.08556903153657913,
0.018532345071434975,
-0.13603360950946808,
0.0990389883518219,
0.13127054274082184,
0.04966247081756592,
0.0644858330488205,
-0.010529402643442154,
0.0722920298576355,
0.00642205448821187,
-0.021178796887397766,
-0.16752173006534576,
0.160380020737648,
-0.07974391430616379,
-0.08033330738544464,
-0.016209961846470833,
-0.05632827430963516,
-0.02418697625398636,
0.06432361900806427,
-0.16487522423267365,
-0.22040332853794098,
-0.12651598453521729,
-0.00461631640791893,
0.08945828676223755,
0.18989057838916779,
-0.13851666450500488,
-0.1514553427696228,
-0.21520964801311493,
0.1428089588880539,
-0.01591605693101883,
-0.1097726821899414,
0.07358912378549576,
-0.0916496068239212,
-0.054485760629177094,
0.0405864417552948,
0.04521756246685982,
0.04371750354766846,
0.06384562700986862,
0.01510460302233696,
-0.08976902067661285,
-0.13072681427001953,
-0.0023291222751140594,
0.11588036268949509,
-0.14387354254722595,
-0.067136250436306,
-0.11882148683071136,
-0.004911300726234913,
0.04821787029504776,
-0.031241515651345253,
-0.034163523465394974,
0.04090593755245209,
1.322443083289574e-34,
-0.018178416416049004,
0.05309879034757614,
0.11394600570201874,
-0.08813925832509995,
0.1395515501499176,
-0.11089436709880829,
0.1619347631931305,
-0.048071373254060745,
-0.043656643480062485,
-0.10435421764850616,
-0.0937240794301033
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | For the frontend viewer, see https://github.com/huggingface/datasets/issues/6139.
Also mentioned in https://github.com/huggingface/datasets-server/issues/213 and https://github.com/huggingface/datasets-server/issues/441
Closing as a duplicate of https://github.com/huggingface/datasets/issues/6139 |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 18 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
For the frontend viewer, see https://github.com/huggingface/datasets/issues/6139.
Also mentioned in https://github.com/huggingface/datasets-server/issues/213 and https://github.com/huggingface/datasets-server/issues/441
Closing as a duplicate of https://github.com/huggingface/datasets/issues/6139 | [
-0.044422850012779236,
0.025929255411028862,
-0.09753502905368805,
0.1632564663887024,
0.1912587583065033,
0.07289566099643707,
0.14216484129428864,
-0.048543017357587814,
0.10695482045412064,
0.15494775772094727,
-0.17471817135810852,
0.02946075052022934,
0.016684748232364655,
0.1466035544872284,
0.04797877371311188,
-0.1577252298593521,
-0.05809340998530388,
-0.08240335434675217,
-0.0994095653295517,
-0.027237433940172195,
0.12330075353384018,
0.046952489763498306,
0.18532636761665344,
-0.02703428454697132,
-0.0017697862349450588,
-0.016039734706282616,
-0.0910119041800499,
0.08086492866277695,
0.04480377957224846,
-0.09970814734697342,
0.15830883383750916,
0.2398068755865097,
0.12790809571743011,
0.19666825234889984,
0.000005778087142971344,
0.05782081559300423,
0.015738923102617264,
0.16280117630958557,
-0.1226174607872963,
-0.06244427338242531,
0.11170357465744019,
-0.12270696461200714,
0.027003200724720955,
-0.07185783237218857,
-0.026269592344760895,
-0.15603961050510406,
-0.03897373378276825,
-0.048296015709638596,
0.14699415862560272,
0.10779871791601181,
0.03803250938653946,
0.11975657939910889,
0.04800712317228317,
-0.14896449446678162,
0.04313923418521881,
0.18245656788349152,
-0.022795626893639565,
0.17132143676280975,
-0.17129923403263092,
0.04495949298143387,
0.05838624760508537,
0.10850044339895248,
0.008593779988586903,
-0.061271462589502335,
0.03208208084106445,
0.06237291544675827,
-0.15707188844680786,
-0.1305847465991974,
0.01933271996676922,
0.15500374138355255,
0.14030586183071136,
0.0005007362342439592,
-0.09844496101140976,
0.10373390465974808,
-0.1010381281375885,
0.04330795258283615,
-0.08971583843231201,
-0.016590753570199013,
0.009334123693406582,
0.05199800804257393,
-0.18062329292297363,
-0.19770769774913788,
-0.11116458475589752,
-0.15076859295368195,
0.10379637777805328,
-0.01680002175271511,
-0.10277823358774185,
-0.008924300782382488,
-0.13601471483707428,
-0.17086346447467804,
0.18398027122020721,
-0.0409252792596817,
0.03737209364771843,
0.013086500577628613,
0.08862197399139404,
0.02058006078004837,
-0.062432512640953064,
-0.06967595964670181,
0.052271582186222076,
0.0651475042104721,
0.01120639219880104,
-0.010810714215040207,
-0.12300309538841248,
0.022393181920051575,
0.14207424223423004,
-0.004027208779007196,
0.12197021394968033,
-0.0624418742954731,
0.14042340219020844,
0.25970107316970825,
0.0050589414313435555,
0.0511072538793087,
-0.002870517550036311,
-0.13620275259017944,
-0.11243826150894165,
0.09629297256469727,
0.10339407622814178,
0.051408007740974426,
0.10684435814619064,
-0.008643819019198418,
0.25763627886772156,
0.027000080794095993,
-0.04401896893978119,
0.23013967275619507,
0.017384547740221024,
-0.0344650000333786,
0.0735601857304573,
-0.029747918248176575,
0.04811541736125946,
-0.17119620740413666,
-0.05675816908478737,
0.03061169758439064,
0.020673496648669243,
-0.022125327959656715,
0.07223643362522125,
-0.08114564418792725,
-0.0559394396841526,
-0.06556345522403717,
0.06232718378305435,
-0.02077644132077694,
0.09764497727155685,
0.11996739357709885,
-0.278674453496933,
-0.023232771083712578,
0.12510071694850922,
-0.011223061941564083,
-0.03313099965453148,
0.05115990713238716,
-0.048818785697221756,
0.06452970951795578,
-0.15547384321689606,
0.1885124146938324,
-0.2730332612991333,
0.11925259232521057,
0.022523313760757446,
0.08888993412256241,
0.08364202082157135,
-0.0538751445710659,
-0.3445788025856018,
-0.05972946062684059,
0.10529786348342896,
0.031680043786764145,
0.062373086810112,
-0.0863678902387619,
0.09328407049179077,
0.1796809881925583,
0.0821789875626564,
0.1316683292388916,
-0.0607825443148613,
-0.058447644114494324,
-0.00825654249638319,
0.0034651048481464386,
-0.11358492821455002,
-0.15880024433135986,
-0.040222153067588806,
0.13045240938663483,
-0.05771660804748535,
-0.04086312651634216,
-0.16973426938056946,
0.06021583825349808,
0.0019273123471066356,
-0.223300501704216,
0.018632549792528152,
-0.06775935739278793,
0.06269511580467224,
-0.1335042119026184,
-0.23213732242584229,
0.06376761943101883,
-0.028445715084671974,
0.08700083941221237,
-0.12187907099723816,
-0.010036260820925236,
0.019554028287529945,
0.1650254726409912,
-0.10579240322113037,
-0.12751084566116333,
0.09106531739234924,
-0.22303545475006104,
-0.013084089383482933,
-0.2010054737329483,
-0.07811588793992996,
-0.03591936081647873,
0.07238292694091797,
0.18679451942443848,
-0.02773382142186165,
-0.013868738897144794,
-0.09028477221727371,
0.08625631779432297,
0.04407011345028877,
-0.2688004672527313,
-0.136532723903656,
-0.06093040481209755,
-0.07468308508396149,
0.02046026661992073,
-0.05020560324192047,
-0.047858502715826035,
-0.11061734706163406,
0.049123626202344894,
-0.016167862340807915,
0.21333454549312592,
-0.03207172825932503,
0.15902219712734222,
0.07774098962545395,
-0.044537968933582306,
-0.051976244896650314,
0.03169865533709526,
-0.07737135887145996,
-0.017347116023302078,
0.1776474416255951,
-0.03894001245498657,
-0.04394308105111122,
-0.0176085215061903,
0.04315866157412529,
0.1175803542137146,
-0.09679275751113892,
0.10514820367097855,
0.15370748937129974,
-0.08385036140680313,
0.09446754306554794,
-0.0883222445845604,
-0.06413997709751129,
-0.0460076630115509,
-0.15363790094852448,
0.15503352880477905,
-0.05125273019075394,
0.16654963791370392,
-0.16576506197452545,
0.02070803940296173,
-0.02347600646317005,
0.04871664568781853,
0.07962318509817123,
0.138910174369812,
-0.08258204162120819,
0.055467184633016586,
0.034717708826065063,
0.005685916170477867,
-0.04163743183016777,
0.11971866339445114,
-0.20487341284751892,
0.04769955575466156,
0.03909911587834358,
0.10739017277956009,
-0.13920144736766815,
-0.08302605152130127,
0.1021817997097969,
0.03048892132937908,
0.14227555692195892,
-0.011910445988178253,
0.0070781949907541275,
0.053986091166734695,
-0.03072448819875717,
0.05400479957461357,
0.06673169881105423,
-0.11969401687383652,
0.06690017879009247,
-0.11943768709897995,
0.07000290602445602,
-0.08090842515230179,
-0.13095484673976898,
0.08929149806499481,
-0.14729031920433044,
0.1249006986618042,
0.08164172619581223,
-0.045220717787742615,
0.13779838383197784,
0.011009441688656807,
-0.02855355478823185,
0.00372688309289515,
-0.1242532879114151,
0.021062782034277916,
-0.03484795242547989,
0.08537031710147858,
0.029708826914429665,
-0.26484963297843933,
-0.07166415452957153,
0.05242852121591568,
0.051962483674287796,
0.008469357155263424,
-0.08211299031972885,
0.06661748886108398,
-0.07622740417718887,
0.07344286888837814,
0.10472658276557922,
0.03379672393202782,
-0.029113855212926865,
0.03004404716193676,
0.08182097226381302,
0.07373984903097153,
0.008374636992812157,
-0.15853622555732727,
0.0961543470621109,
-0.16026709973812103,
0.09766743332147598,
0.030631933361291885,
0.16285060346126556,
-0.05003971979022026,
-0.06827032566070557,
-0.1098124235868454,
0.08806001394987106,
0.21059679985046387,
-0.010932070203125477,
-0.08997983485460281,
0.054370250552892685,
0.018901744857430458,
-0.09423688799142838,
0.13664531707763672,
-0.18251927196979523,
-0.1597367376089096,
0.15414318442344666,
-0.18375293910503387,
-0.15210627019405365,
-0.03589770570397377,
0.03895479068160057,
-0.13209210336208344,
0.07325293123722076,
-0.05294641852378845,
-0.04647747054696083,
-0.21736344695091248,
0.13113407790660858,
-0.07639595866203308,
-0.06963864713907242,
0.0757124125957489,
0.06694365292787552,
0.11719104647636414,
0.05458853021264076,
-0.1262269914150238,
0.006665441207587719,
-0.006871967110782862,
0.03512654826045036,
-0.027600470930337906,
0.029224831610918045,
0.004598903004080057,
0.04220978170633316,
-0.036044422537088394,
0.074111208319664,
-0.16708321869373322,
-0.17835722863674164,
0.118010513484478,
-0.2752205729484558,
0.008604719303548336,
-0.07161563634872437,
0.039074208587408066,
0.05204356461763382,
0.07010198384523392,
-0.006489256396889687,
0.07693659514188766,
0.15283456444740295,
0.20406094193458557,
0.0454099215567112,
-0.3305823802947998,
-0.11086376756429672,
-0.06987331807613373,
0.15537205338478088,
-0.03620711714029312,
0.0333772674202919,
0.044821999967098236,
0.02709019184112549,
-0.2199520468711853,
0.053251367062330246,
-0.1087353304028511,
-0.021059434860944748,
-0.23376800119876862,
-0.002096077660098672,
0.05103689804673195,
0.11604423820972443,
0.05240388587117195,
-0.04842344671487808,
0.15168394148349762,
0.02412922866642475,
0.08336859941482544,
-0.1057223454117775,
-0.02434787154197693,
0.036483459174633026,
-0.07408730685710907,
0.06024865806102753,
-0.003220336278900504,
-0.048584043979644775,
0.08910876512527466,
0.15087006986141205,
0.172646626830101,
-0.023740284144878387,
0.19882093369960785,
0.01196620799601078,
0.12072921544313431,
0.011027100495994091,
-0.09927434474229813,
0.08343377709388733,
0.10850857198238373,
0.20817607641220093,
-0.054110556840896606,
0.018125656992197037,
0.03346143290400505,
-0.016086656600236893,
-0.1722327023744583,
0.07095775008201599,
-0.0868888571858406,
-0.1692730039358139,
-0.1239505335688591,
0.10669941455125809,
-0.11325353384017944,
-0.021172702312469482,
-0.2196996659040451,
0.058624267578125,
0.03148946538567543,
0.05184576287865639,
-0.035337962210178375,
-0.10649587959051132,
0.14753411710262299,
0.0911840870976448,
-0.005495377350598574,
0.20197737216949463,
0.19911660254001617,
0.10109297186136246,
0.1966926008462906,
0.12222980707883835,
-0.07802411913871765,
0.21799293160438538,
-0.11234806478023529,
-0.07677731662988663,
-0.0965532585978508,
0.037292178720235825,
0.030748095363378525,
0.16353687644004822,
0.07483168691396713,
0.0030926207546144724,
-0.023310258984565735,
-0.06734777241945267,
-0.0651988834142685,
0.0021337494254112244,
-0.02344757691025734,
-0.12645618617534637,
-0.12178171426057816,
-0.2286062240600586,
-0.10393291711807251,
0.13379020988941193,
-0.030083725228905678,
0.09486459195613861,
0.018679821863770485,
0.037349823862314224,
-0.07837021350860596,
-0.1487245410680771,
-0.02667655237019062,
-0.06516186147928238,
0.020538968965411186,
-0.08932673931121826,
0.0512675940990448,
0.16518794000148773,
-0.1856851726770401,
-0.02990371361374855,
-0.12394104152917862,
-0.019609473645687103,
0.09515176713466644,
-0.08534812927246094,
-0.006859233137220144,
0.05437199026346207,
0.10443080961704254,
-0.11584624648094177,
0.04388704150915146,
-0.12237408012151718,
-0.02654865011572838,
0.31474924087524414,
0.17410460114479065,
0.1983904242515564,
-0.15955156087875366,
0.008169103413820267,
0.15437805652618408,
0.03999406844377518,
-0.01617957279086113,
-0.28847888112068176,
0.07920732349157333,
0.05465495586395264,
-0.1205669716000557,
-0.061818309128284454,
0.062062207609415054,
0.05701722577214241,
-0.000497712753713131,
-0.08414274454116821,
0.3100772798061371,
0.023770863190293312,
0.005573052912950516,
0.09240560978651047,
-0.04117390885949135,
0.18634553253650665,
-0.08100762218236923,
-0.10377668589353561,
-0.22859424352645874,
0.06005004048347473,
-0.13769958913326263,
-0.049450986087322235,
-0.07842322438955307,
0.2261551171541214,
0.03920069336891174,
-0.0640096664428711,
-0.2261667400598526,
0.10640492290258408,
0.07977329194545746,
-0.3151828944683075,
0.14733684062957764,
-0.007128419820219278,
0.03133191168308258,
0.020653126761317253,
-0.11989666521549225,
0.08890579640865326,
-0.018730532377958298,
-0.10127213597297668,
0.20544585585594177,
0.058775730431079865,
0.005483899265527725,
-0.002380293793976307,
0.04392533376812935,
-0.14125937223434448,
0.010372858494520187,
0.09367116540670395,
-0.1104978695511818,
-0.04936061426997185,
0.10583218932151794,
0.1901315450668335,
-0.18961049616336823,
0.03738423064351082,
-0.03895540535449982,
0.1287296563386917,
-0.10256828367710114,
-0.15593969821929932,
0.14427940547466278,
-0.006293257232755423,
0.14332027733325958,
0.026098715141415596,
-0.0645347312092781,
-0.16100648045539856,
-0.05185248702764511,
0.062002040445804596,
0.10199618339538574,
0.07403256744146347,
-0.1721702516078949,
0.006037589628249407,
-2.635553549585985e-32,
0.03615092113614082,
0.09243237972259521,
-0.11773845553398132,
0.11039488017559052,
-0.20670954883098602,
0.026532547548413277,
-0.0953611433506012,
-0.10865841805934906,
-0.08358316868543625,
-0.14374089241027832,
-0.006253993138670921,
0.08916245400905609,
0.09364003688097,
0.037357132881879807,
-0.09497369080781937,
-0.06325138360261917,
-0.07832030206918716,
-0.10806712508201599,
0.019252119585871696,
0.04595993459224701,
0.05511455982923508,
0.013340683653950691,
-0.06451768428087234,
-0.10677748173475266,
0.019217398017644882,
-0.07447633892297745,
-0.07266028970479965,
0.12531234323978424,
0.06849516183137894,
0.0792553648352623,
-0.08133533596992493,
0.013033170253038406,
-0.013201158493757248,
0.10787032544612885,
0.010838295333087444,
0.030482925474643707,
-0.1294933259487152,
-0.10213499516248703,
-0.09500918537378311,
0.0269306693226099,
0.008046836592257023,
0.11814077943563461,
0.07183828204870224,
-0.22012613713741302,
0.07252998650074005,
0.02413608320057392,
0.014909392222762108,
0.07892106473445892,
0.09626784920692444,
0.03525647893548012,
-0.08470658957958221,
0.06903769820928574,
-0.0423094779253006,
0.04387153312563896,
0.12493748962879181,
0.013902802020311356,
0.09883332252502441,
0.056327659636735916,
-0.0013100028736516833,
-0.00704939104616642,
0.13368111848831177,
-0.05059795454144478,
-0.0242074653506279,
0.024576503783464432,
0.29096555709838867,
-0.02320428006350994,
0.16962368786334991,
-0.15024951100349426,
-0.006446518003940582,
-0.07967931777238846,
-0.01839730702340603,
0.13206139206886292,
0.03744247183203697,
0.06001139432191849,
-0.1615353673696518,
-0.05778816342353821,
-0.1738482564687729,
0.039161037653684616,
0.09723613411188126,
-0.005751312710344791,
-0.06360626220703125,
0.011201359331607819,
0.14569973945617676,
0.051845308393239975,
0.12147026509046555,
0.11240194737911224,
-0.14464958012104034,
-0.06206834316253662,
-0.045944999903440475,
0.006753771565854549,
-0.002498818328604102,
0.0681435689330101,
-0.14913620054721832,
-0.1018299087882042,
-0.13761462271213531,
0.01060523372143507,
0.10256968438625336,
0.11228330433368683,
0.06924278289079666,
-0.15350012481212616,
0.0602729395031929,
0.052256010472774506,
0.1582011580467224,
0.06439156830310822,
0.08383142203092575,
-0.04550417140126228,
0.1602460741996765,
0.12005314230918884,
-0.23165734112262726,
-0.043654877692461014,
0.005680807400494814,
0.04050489887595177,
0.08598367124795914,
-0.006405030842870474,
0.057725243270397186,
-0.028749868273735046,
-0.049495819956064224,
-0.1575281322002411,
0.08744040131568909,
0.17186295986175537,
-0.3583182990550995,
0.047810886055231094,
-0.17527011036872864,
0.018659375607967377,
-0.04256651923060417,
0.02293071523308754,
-0.008719511330127716,
-0.06173524633049965,
0.10985326021909714,
0.00937687885016203,
-0.02661043591797352,
-0.14470796287059784,
7.392378620352247e-7,
-0.004273883067071438,
0.1199461966753006,
0.0029900087974965572,
0.04130629077553749,
0.00959098245948553,
-0.09671621024608612,
-0.2933587431907654,
0.1146950051188469,
0.026702914386987686,
0.16681809723377228,
0.10075949877500534,
-0.07470466941595078,
0.03664504736661911,
-0.03625641018152237,
0.03982609882950783,
-0.07293008267879486,
-0.0913243368268013,
-0.04417051747441292,
-0.11117646098136902,
0.11613612622022629,
0.1325530707836151,
0.08459652215242386,
0.05782642960548401,
0.005333335604518652,
0.06529894471168518,
-0.025458768010139465,
-0.0487765297293663,
-0.20211248099803925,
0.2048441618680954,
-0.05796993896365166,
-0.07285051792860031,
-0.01555085089057684,
-0.024270271882414818,
0.008305216208100319,
0.07385861873626709,
-0.19110718369483948,
-0.2081131786108017,
-0.08968967199325562,
0.007527026813477278,
0.11391724646091461,
0.18959206342697144,
-0.1135697215795517,
-0.13918538391590118,
-0.246410071849823,
0.1461777538061142,
-0.0026167414616793394,
-0.1205124631524086,
0.07051125913858414,
-0.11687082052230835,
-0.030200380831956863,
0.024907156825065613,
0.07380149513483047,
0.04850311204791069,
0.11381345242261887,
-0.0036981015000492334,
-0.09927881509065628,
-0.1410902887582779,
-0.004372382070869207,
0.1363314390182495,
-0.1609245240688324,
-0.09518580883741379,
-0.11953385919332504,
-0.03243231028318405,
0.05083736777305603,
-0.04224025085568428,
-0.0656151995062828,
0.020435543730854988,
1.011561446901172e-34,
-0.027951058000326157,
0.06867244839668274,
0.08223120868206024,
-0.11209069937467575,
0.11625644564628601,
-0.09057420492172241,
0.18995565176010132,
-0.025572631508111954,
-0.04897431284189224,
-0.1046716645359993,
-0.10202893614768982
] |
https://github.com/huggingface/datasets/issues/6013 | [FR] `map` should reuse unchanged columns from the previous dataset to avoid disk usage | You can use the `remove_columns` parameter in `map` to avoid duplicating the columns (and save disk space) and then concatenate the original dataset with the map result:
```python
from datasets import concatenate_datasets
# dummy example
ds_new = ds.map(lambda x: {"new_col": x["col"] + 2}, remove_columns=ds.column_names)
ds_combined = concatenate_datasets([ds, ds_new], axis=1)
```
Doing this automatically is hard to implement efficiently unless we know ahead of time which existing columns will be modified by a `map` transform. We have this info when `input_columns` are specified, so I think this is the only case we can optimize. | ### Feature request
Currently adding a new column with `map` will cause all the data in the dataset to be duplicated and stored/cached on the disk again. It should reuse unchanged columns.
### Motivation
This allows having datasets with different columns but sharing some basic columns. Currently, these datasets would become too expensive to store and one would need some kind of on-the-fly join; which also doesn't seem implemented.
### Your contribution
_ | 93 | [FR] `map` should reuse unchanged columns from the previous dataset to avoid disk usage
### Feature request
Currently adding a new column with `map` will cause all the data in the dataset to be duplicated and stored/cached on the disk again. It should reuse unchanged columns.
### Motivation
This allows having datasets with different columns but sharing some basic columns. Currently, these datasets would become too expensive to store and one would need some kind of on-the-fly join; which also doesn't seem implemented.
### Your contribution
_
You can use the `remove_columns` parameter in `map` to avoid duplicating the columns (and save disk space) and then concatenate the original dataset with the map result:
```python
from datasets import concatenate_datasets
# dummy example
ds_new = ds.map(lambda x: {"new_col": x["col"] + 2}, remove_columns=ds.column_names)
ds_combined = concatenate_datasets([ds, ds_new], axis=1)
```
Doing this automatically is hard to implement efficiently unless we know ahead of time which existing columns will be modified by a `map` transform. We have this info when `input_columns` are specified, so I think this is the only case we can optimize. | [
-0.09349559247493744,
0.2257966846227646,
-0.1600642055273056,
-0.04920801892876625,
0.13615857064723969,
0.09087289124727249,
0.0579940564930439,
-0.04155126214027405,
0.06289560347795486,
0.15837466716766357,
-0.015043551102280617,
0.22044071555137634,
0.01673678681254387,
0.07187025994062424,
-0.06786983460187912,
-0.17813625931739807,
0.09349074959754944,
0.15456727147102356,
-0.3499671220779419,
0.03500620275735855,
-0.12409838289022446,
-0.012449556030333042,
0.03258945420384407,
-0.1855786293745041,
0.16272257268428802,
-0.0038829112891107798,
-0.14660261571407318,
-0.03284329175949097,
0.0580952912569046,
0.10291319340467453,
-0.07027249783277512,
0.09923753887414932,
0.001128288684412837,
0.10029847919940948,
0.0000054830343287903816,
0.06595670431852341,
0.03419259563088417,
-0.006165195256471634,
0.05002696439623833,
-0.043191418051719666,
0.07513641566038132,
0.01703101582825184,
0.04196285828948021,
-0.054879866540431976,
-0.10957834869623184,
-0.09803116321563721,
0.07268809527158737,
-0.10449302196502686,
0.2075360268354416,
-0.10514853894710541,
-0.0681433230638504,
-0.2095208466053009,
-0.1364109218120575,
-0.03930247202515602,
0.07304144650697708,
0.05364430695772171,
-0.004879537038505077,
-0.06600158661603928,
-0.16470186412334442,
-0.19231706857681274,
-0.07514270395040512,
0.11938869208097458,
-0.02431233786046505,
-0.014913399703800678,
0.034450579434633255,
0.05044183507561684,
0.04685283824801445,
-0.0024819239042699337,
0.016476057469844818,
0.05510773882269859,
0.007797879632562399,
-0.07290584594011307,
0.08006240427494049,
0.13491028547286987,
-0.06570534408092499,
-0.07839962840080261,
-0.17009936273097992,
-0.13632027804851532,
0.048404548317193985,
0.030723098665475845,
-0.18506741523742676,
-0.0583358108997345,
0.026477552950382233,
-0.04785732179880142,
-0.21423667669296265,
-0.12054303288459778,
0.123117595911026,
0.16074953973293304,
-0.11921201646327972,
-0.03408021107316017,
0.03745006024837494,
-0.041185855865478516,
-0.15653549134731293,
0.183514803647995,
-0.1752583086490631,
0.02320428192615509,
-0.11126019805669785,
-0.2151140719652176,
0.08230482041835785,
-0.11387602984905243,
0.10976175963878632,
0.0672232136130333,
-0.009571144357323647,
-0.03696927800774574,
-0.048622891306877136,
-0.011168376542627811,
-0.0733524039387703,
-0.01190878078341484,
0.008474885486066341,
-0.03660372644662857,
-0.03740807995200157,
-0.049720145761966705,
0.07588313519954681,
0.0183380376547575,
0.17623111605644226,
-0.003195002907887101,
0.12385372072458267,
0.2518519163131714,
-0.02494172751903534,
0.14926868677139282,
0.18266689777374268,
0.05700213089585304,
-0.06583728641271591,
0.11393635720014572,
0.0747247114777565,
0.09852835536003113,
-0.03632709011435509,
-0.01773647964000702,
0.08973497152328491,
0.0318421795964241,
-0.02114805206656456,
0.01097811758518219,
0.0458618700504303,
0.06602200120687485,
0.048116762191057205,
0.11843125522136688,
-0.05699079856276512,
0.022750265896320343,
-0.13596472144126892,
0.056186649948358536,
0.15885116159915924,
-0.07159598171710968,
-0.03020375967025757,
-0.03940138220787048,
0.07434040307998657,
-0.05589062348008156,
0.06452582031488419,
0.04125666990876198,
-0.2301521897315979,
0.21674318611621857,
-0.14926089346408844,
0.18706856667995453,
-0.1974286437034607,
0.2098146229982376,
0.030571436509490013,
0.05564930662512779,
0.04014783725142479,
-0.09309092164039612,
-0.16843120753765106,
-0.10864213854074478,
0.046106912195682526,
-0.11142090708017349,
-0.11943680047988892,
-0.2200394868850708,
0.004358361009508371,
0.1286165714263916,
0.01843184418976307,
0.056232333183288574,
-0.1814846694469452,
-0.015189346857368946,
-0.06875220686197281,
0.013840257190167904,
-0.05824804678559303,
-0.02239174023270607,
0.02580915577709675,
0.10753253847360611,
0.11194261908531189,
0.18419024348258972,
-0.0956253632903099,
0.1650487184524536,
-0.006047087721526623,
0.07025735825300217,
-0.00836862251162529,
0.014321942813694477,
0.31504103541374207,
0.06775340437889099,
-0.08524729311466217,
0.09064462035894394,
-0.0955885723233223,
-0.002162129385396838,
-0.030330590903759003,
0.025328557938337326,
0.0330263152718544,
0.035382792353630066,
-0.09841080009937286,
0.13626576960086823,
0.11213906854391098,
0.06284409761428833,
0.06312644481658936,
-0.20841817557811737,
-0.008206830359995365,
-0.07847155630588531,
0.007102517876774073,
-0.04826328158378601,
-0.13338978588581085,
0.023486703634262085,
-0.24800355732440948,
-0.04336157441139221,
0.1933337301015854,
-0.15069451928138733,
0.09458981454372406,
-0.027367236092686653,
0.08647878468036652,
-0.03831540793180466,
0.03247687965631485,
-0.024108339101076126,
-0.1018340066075325,
0.05044841393828392,
-0.11360494047403336,
-0.01952747069299221,
-0.00640035280957818,
-0.03344031050801277,
0.09221239387989044,
0.0429009385406971,
0.03742733970284462,
0.08425671607255936,
0.05108920857310295,
0.08682142198085785,
0.007969370111823082,
0.020365586504340172,
0.06616063416004181,
-0.05483347177505493,
0.19859370589256287,
-0.06612324714660645,
-0.10538318008184433,
0.17805346846580505,
0.06898698210716248,
-0.03297607600688934,
0.08122450858354568,
0.06750154495239258,
-0.10527981072664261,
-0.00902182050049305,
-0.0744083896279335,
-0.033942095935344696,
-0.0068658203817903996,
-0.017547959461808205,
0.04146261140704155,
0.03522076457738876,
0.06270532310009003,
-0.10609214007854462,
0.008647291921079159,
0.04350455850362778,
-0.0242653526365757,
-0.09914322942495346,
-0.13638617098331451,
-0.007321123965084553,
-0.0322285071015358,
0.23331193625926971,
0.1270264983177185,
0.13555602729320526,
0.1744297295808792,
-0.05535757914185524,
-0.0677124634385109,
-0.027546731755137444,
0.07469211518764496,
-0.03553580120205879,
-0.02774273045361042,
0.25936073064804077,
0.09893764555454254,
0.12634502351284027,
0.18823419511318207,
0.09862270206212997,
-0.005436453502625227,
0.09950026869773865,
0.06055472418665886,
-0.2138134241104126,
0.009052155539393425,
0.1020110696554184,
-0.04661857336759567,
0.2050946205854416,
-0.04417884349822998,
-0.026096802204847336,
0.18857832252979279,
-0.05523192510008812,
0.15137431025505066,
0.005522551480680704,
-0.14497283101081848,
-0.05881296843290329,
-0.035259779542684555,
0.04357152432203293,
0.006641241256147623,
-0.1283963918685913,
0.09412458539009094,
-0.036777421832084656,
0.06436990201473236,
0.07797003537416458,
-0.08249808847904205,
-0.0909050852060318,
-0.009534094482660294,
-0.22827556729316711,
0.04440150782465935,
-0.11888448894023895,
0.07405561208724976,
-0.03117295913398266,
-0.019026879221200943,
-0.17240868508815765,
0.05887316167354584,
0.15348324179649353,
-0.1061926856637001,
-0.3005668818950653,
-0.10374398529529572,
-0.03576916828751564,
0.019373595714569092,
-0.11180217564105988,
0.012956461869180202,
0.00191891985014081,
-0.09970033168792725,
-0.10568569600582123,
-0.0384305939078331,
-0.08165644109249115,
-0.05032012239098549,
0.003956224769353867,
-0.02777020074427128,
0.1107054054737091,
-0.020056815817952156,
-0.012885783798992634,
0.014436664991080761,
-0.07337074726819992,
0.0598912313580513,
-0.1124701052904129,
-0.022583963349461555,
-0.06294121593236923,
0.03566861152648926,
-0.0390375480055809,
0.14583706855773926,
-0.017889564856886864,
-0.1008455753326416,
-0.032447174191474915,
0.07791828364133835,
0.1434585601091385,
0.09386434406042099,
0.015876594930887222,
-0.15633365511894226,
-0.0060893394984304905,
0.19200031459331512,
-0.11854296922683716,
-0.03424903377890587,
-0.15753336250782013,
-0.0319799929857254,
-0.07029794156551361,
-0.002459221286699176,
0.08557109534740448,
0.11550936847925186,
-0.037413090467453,
0.1138017401099205,
-0.058425456285476685,
-0.17925600707530975,
0.2804659903049469,
-0.23304040729999542,
0.12041112035512924,
0.14355231821537018,
0.14199747145175934,
0.018228651955723763,
0.015999173745512962,
-0.03640628606081009,
0.02576519176363945,
0.02865026704967022,
0.0997147411108017,
0.08313437551259995,
-0.08863282203674316,
-0.21328435838222504,
-0.07387682050466537,
-0.05599028989672661,
-0.17599475383758545,
-0.124046690762043,
-0.08924652636051178,
0.08655981719493866,
0.02375006303191185,
0.11522975564002991,
0.026856379583477974,
0.12388906627893448,
-0.28427404165267944,
-0.04978543147444725,
0.056486763060092926,
0.00765011552721262,
-0.03148311376571655,
-0.07026596367359161,
-0.08154729008674622,
-0.2732885479927063,
0.062272489070892334,
-0.03932037577033043,
0.02977190911769867,
0.12464538961648941,
-0.1448529064655304,
-0.05636893957853317,
0.01160334050655365,
-0.1250508576631546,
0.07256802916526794,
-0.09348826855421066,
-0.10366315394639969,
0.02044130489230156,
0.0828472152352333,
0.004451971501111984,
-0.16335782408714294,
0.040681399405002594,
-0.06562420725822449,
-0.06249042600393295,
0.16182678937911987,
0.09938184916973114,
-0.09028822183609009,
0.0052374014630913734,
0.3047424852848053,
-0.1062101498246193,
-0.06121068820357323,
0.14703035354614258,
-0.010989914648234844,
-0.0380297526717186,
-0.047735974192619324,
0.14886242151260376,
-0.10790474712848663,
-0.14427396655082703,
-0.13800330460071564,
-0.039346855133771896,
0.048584118485450745,
0.07503797113895416,
0.009176081977784634,
-0.004820876754820347,
0.03750278800725937,
0.18183475732803345,
0.1008308157324791,
0.18061606585979462,
0.17152462899684906,
0.1279267966747284,
-0.018772173672914505,
-0.03626994043588638,
-0.15467120707035065,
0.12179309129714966,
-0.2305857241153717,
0.08139195293188095,
-0.03295066952705383,
0.00853889249265194,
0.045212190598249435,
0.13871444761753082,
0.03821417689323425,
0.10781371593475342,
-0.10461015999317169,
-0.07373292744159698,
-0.13916167616844177,
-0.1438928097486496,
0.005020791664719582,
0.04741879552602768,
0.04574742540717125,
-0.0751391276717186,
0.011762440204620361,
0.31126073002815247,
-0.036017660051584244,
0.14373859763145447,
-0.27269574999809265,
-0.0764143094420433,
0.20526531338691711,
0.09192010760307312,
-0.036743730306625366,
-0.03626088425517082,
0.08955347537994385,
0.05646313354372978,
-0.04058394208550453,
0.10053148120641708,
-0.0027557117864489555,
0.05567799136042595,
-0.12453288584947586,
-0.12457972764968872,
0.056607622653245926,
0.005936531815677881,
0.12243327498435974,
0.02738293819129467,
-0.03194991126656532,
-0.17311899363994598,
0.022643476724624634,
0.2347719520330429,
0.11664766818284988,
0.024156883358955383,
0.03803266957402229,
-0.0839303657412529,
0.06138988956809044,
0.05077864229679108,
0.1254788637161255,
-0.14738671481609344,
0.013702361844480038,
0.014846374280750751,
-0.003221157705411315,
-0.2757968306541443,
0.14074279367923737,
-0.08493492007255554,
0.12467402964830399,
0.1791936606168747,
-0.15053631365299225,
0.1623612642288208,
-0.003751991782337427,
0.04599567502737045,
-0.04046046361327171,
0.03175785019993782,
0.16676774621009827,
-0.07439713925123215,
0.12598207592964172,
0.12073326110839844,
-0.09762940555810928,
0.02343766577541828,
-0.14368769526481628,
0.24311691522598267,
-0.09408816695213318,
-0.09999577701091766,
-0.002698909491300583,
-0.0541418194770813,
-0.28480836749076843,
0.08123525977134705,
-0.004249403718858957,
-0.09304869920015335,
-0.04186476022005081,
0.036937959492206573,
-0.06140259653329849,
-0.04266144335269928,
-0.036496229469776154,
-0.08005059510469437,
-0.08145587146282196,
0.12736862897872925,
-0.23786808550357819,
-0.04201223701238632,
-0.06663601845502853,
0.08292929828166962,
0.10473796725273132,
-0.041211266070604324,
0.03930637240409851,
-0.13415032625198364,
-0.014843816868960857,
-0.10812298953533173,
0.1732916682958603,
-0.017727358266711235,
-0.05557253584265709,
0.10802291333675385,
-0.2708384394645691,
-0.03387425094842911,
-0.08561312407255173,
-0.0777127742767334,
-0.011901753954589367,
0.3070008456707001,
-0.07172947376966476,
-0.006458379328250885,
-0.1233118325471878,
0.088382288813591,
0.17465192079544067,
0.028284355998039246,
0.11443877965211868,
-0.05444058030843735,
-0.24322815239429474,
0.03847566992044449,
-2.546701458090381e-32,
0.17885564267635345,
0.0440826341509819,
0.005316606722772121,
0.07194618880748749,
-0.2487986832857132,
-0.02441183663904667,
-0.1591101586818695,
-0.023292461410164833,
0.03996489569544792,
-0.10177914053201675,
-0.06454493850469589,
0.07128200680017471,
0.10008341819047928,
-0.053890544921159744,
-0.03811388835310936,
-0.020681483671069145,
0.22317232191562653,
0.08292883634567261,
0.01664695143699646,
0.031536661088466644,
0.1636582911014557,
0.030995534732937813,
0.01733950898051262,
-0.10947099328041077,
-0.15410150587558746,
-0.05116754770278931,
-0.1036197692155838,
0.03967233747243881,
-0.08296221494674683,
-0.10955865681171417,
0.03298582509160042,
0.07184401899576187,
0.012899307534098625,
-0.08320417255163193,
-0.1764277219772339,
-0.07369782030582428,
-0.2890560030937195,
-0.0031315048690885305,
-0.07959704101085663,
-0.030983345583081245,
-0.01620434783399105,
0.12171556055545807,
-0.01239563338458538,
-0.1149778962135315,
-0.12039504945278168,
-0.010066435672342777,
-0.05074913799762726,
-0.020184284076094627,
-0.07727812975645065,
0.15332181751728058,
0.03083837404847145,
0.02604745887219906,
0.07782255858182907,
0.06549134850502014,
-0.010463640093803406,
-0.009080089628696442,
0.01370120607316494,
0.05481504648923874,
-0.14836303889751434,
0.16566815972328186,
0.24538597464561462,
-0.09642604738473892,
0.1037893295288086,
-0.05159807577729225,
0.2266891449689865,
0.15577368438243866,
0.18988355994224548,
-0.004391300491988659,
-0.027048220857977867,
-0.008313336409628391,
0.017066538333892822,
-0.14376920461654663,
-0.11254197359085083,
0.17831699550151825,
0.02004360593855381,
-0.12045923620462418,
0.03414735943078995,
0.1762867569923401,
-0.016106370836496353,
0.06100519001483917,
-0.22116561233997345,
0.07773851603269577,
0.1061142310500145,
-0.09311315417289734,
-0.036318711936473846,
0.18403808772563934,
0.03100769594311714,
0.1612330824136734,
0.044460151344537735,
-0.019882146269083023,
-0.1862216740846634,
0.3878629803657532,
0.018133103847503662,
-0.06447520852088928,
0.045363228768110275,
0.09670610725879669,
-0.1350666582584381,
0.05647171288728714,
-0.10847046971321106,
-0.12693779170513153,
0.07510031014680862,
-0.05204359441995621,
-0.00015964127669576555,
-0.05864166095852852,
0.06453053653240204,
0.11865754425525665,
0.14404723048210144,
0.14908795058727264,
-0.1304682344198227,
0.04829125106334686,
0.05322374030947685,
-0.1574093997478485,
0.0824071392416954,
0.03635011985898018,
0.012758053839206696,
0.017870178446173668,
0.16884100437164307,
0.08777492493391037,
0.07722484320402145,
0.12254821509122849,
-0.08949639648199081,
-0.09955476969480515,
0.15913471579551697,
-0.018332356587052345,
0.05670534446835518,
-0.028719253838062286,
-0.06975696980953217,
-0.3021816313266754,
0.18101456761360168,
-0.11449169367551804,
-0.02463734894990921,
-0.11483564227819443,
7.400804520329984e-7,
-0.10220331698656082,
-0.0695340484380722,
0.06299600005149841,
-0.23301942646503448,
-0.16414906084537506,
0.055490653961896896,
-0.1825280487537384,
-0.009994901716709137,
-0.16944964230060577,
0.11305081844329834,
0.08897405117750168,
-0.1472863405942917,
0.019679546356201172,
0.0690014660358429,
0.08490173518657684,
-0.11388960480690002,
-0.1817445456981659,
-0.04875078797340393,
-0.09303443133831024,
0.034583114087581635,
-0.0019236805383116007,
0.07972048968076706,
0.08142155408859253,
-0.10759511590003967,
0.05282445251941681,
0.18692703545093536,
-0.13018661737442017,
-0.05550894886255264,
0.26534539461135864,
-0.026505328714847565,
0.04796880856156349,
0.06281451135873795,
0.03540360555052757,
-0.18271368741989136,
-0.15205973386764526,
-0.09482154250144958,
-0.006172070745378733,
0.11846927553415298,
-0.01799781620502472,
0.00631686020642519,
0.13392117619514465,
-0.11955276876688004,
-0.0704125314950943,
-0.007743696682155132,
-0.04076339676976204,
-0.11286399513483047,
-0.035195283591747284,
-0.044714294373989105,
-0.11192215234041214,
0.15253925323486328,
0.12371495366096497,
0.13203449547290802,
-0.016935601830482483,
0.14102604985237122,
-0.04287119209766388,
0.13696196675300598,
0.13712160289287567,
-0.1345672309398651,
0.053018469363451004,
0.0005334815359674394,
-0.07967164367437363,
0.0730266124010086,
-0.04848554730415344,
-0.03846780210733414,
0.19175341725349426,
-0.12215741723775864,
-0.018006406724452972,
4.97651674919421e-35,
-0.10232710093259811,
0.09617398679256439,
0.09394990652799606,
-0.12585024535655975,
-0.12538504600524902,
-0.1450844556093216,
0.03614978492259979,
0.02655935473740101,
-0.03409278392791748,
-0.06692836433649063,
-0.2613069713115692
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | You can use `with_transform` to get a new dataset object.
Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex. | ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 35 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
You can use `with_transform` to get a new dataset object.
Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex. | [
-0.1498679667711258,
0.08251898735761642,
-0.08622687309980392,
-0.10276614129543304,
-0.006229856982827187,
0.028182726353406906,
0.13021275401115417,
-0.03609417378902435,
-0.040753621608018875,
-0.07332360744476318,
-0.03520536050200462,
0.2128094583749771,
0.009884508326649666,
0.2069295346736908,
-0.02147187665104866,
-0.2720259428024292,
0.04670203477144241,
0.008320062421262264,
-0.27344509959220886,
-0.01633058674633503,
-0.1056855320930481,
0.011960797943174839,
0.08268586546182632,
-0.10438127815723419,
-0.02367798611521721,
0.06425683200359344,
-0.11140286177396774,
0.03931595757603645,
0.03520335257053375,
-0.011170454323291779,
-0.002972933230921626,
0.14154520630836487,
-0.06268762052059174,
-0.0030530248768627644,
0.000005954046173428651,
0.052090853452682495,
0.07804088294506073,
0.07515266537666321,
0.10694999992847443,
-0.0977662205696106,
-0.07579139620065689,
-0.14352594316005707,
0.07613712549209595,
0.005701068323105574,
-0.2137124389410019,
-0.022915823385119438,
0.16072489321231842,
-0.12482631206512451,
0.12957236170768738,
-0.07087520509958267,
-0.08869053423404694,
-0.16995280981063843,
-0.1549975723028183,
-0.1080533042550087,
0.057278819382190704,
0.08317878097295761,
0.03167460113763809,
-0.07513409852981567,
-0.1720409244298935,
-0.023751121014356613,
-0.09627418965101242,
0.035898853093385696,
0.028234349563717842,
-0.09435299038887024,
0.17100293934345245,
-0.054865363985300064,
-0.20804527401924133,
-0.14684249460697174,
0.03447164222598076,
0.07888102531433105,
-0.03506865352392197,
0.007064559031277895,
0.026129281148314476,
0.08714849501848221,
-0.06065965071320534,
-0.0005171652883291245,
-0.15629051625728607,
-0.05354724079370499,
0.058259543031454086,
0.029376523569226265,
-0.16423462331295013,
0.02893495187163353,
0.07392006367444992,
-0.06559831649065018,
-0.25385549664497375,
-0.07504630088806152,
0.04221202805638313,
0.1472250074148178,
-0.06687738746404648,
0.005647644866257906,
0.07504134625196457,
-0.028886662796139717,
-0.11568251997232437,
0.12725283205509186,
-0.09023021161556244,
-0.08187495172023773,
-0.08196289837360382,
-0.036178503185510635,
0.13299386203289032,
0.007801811210811138,
0.05885715037584305,
0.07879305630922318,
-0.1576448529958725,
0.02583668939769268,
-0.05407069995999336,
-0.0810074582695961,
-0.13438639044761658,
-0.01918037235736847,
0.0693451315164566,
-0.08913164585828781,
-0.01774980127811432,
0.04051610454916954,
0.03546411544084549,
-0.04284955933690071,
0.08059246838092804,
-0.026036055758595467,
0.07228873670101166,
0.10816524177789688,
-0.01797519624233246,
0.023121768608689308,
0.15595762431621552,
0.04705888405442238,
-0.08525265008211136,
0.08390545845031738,
0.04792846739292145,
0.19200822710990906,
0.061729565262794495,
-0.023014172911643982,
0.05948329716920853,
0.04712000861763954,
-0.043357476592063904,
-0.0075157405808568,
0.11156000196933746,
-0.02253922075033188,
0.12417270243167877,
0.11805601418018341,
-0.07700613886117935,
0.05968314781785011,
-0.01994931511580944,
0.0016264518490061164,
0.2150966227054596,
0.0003083772608079016,
-0.047257259488105774,
-0.15115125477313995,
0.028801387175917625,
0.013326216489076614,
0.08865347504615784,
0.1334119290113449,
-0.15326328575611115,
0.1430548131465912,
-0.15984734892845154,
0.11863334476947784,
-0.14679177105426788,
0.05912954732775688,
-0.08328069001436234,
0.08931035548448563,
-0.0800856351852417,
0.03891808167099953,
-0.18571753799915314,
-0.14837178587913513,
0.08976168930530548,
-0.13635003566741943,
-0.14205166697502136,
-0.06162978336215019,
0.008340435102581978,
-0.01124342530965805,
0.10900984704494476,
0.002405816223472357,
-0.13596868515014648,
-0.08947644382715225,
-0.20613303780555725,
0.028359323740005493,
-0.02932942472398281,
0.03466804698109627,
0.040169138461351395,
0.1356220245361328,
-0.022176431491971016,
0.20728757977485657,
-0.061746250838041306,
0.011423008516430855,
-0.03522837162017822,
-0.07011940330266953,
-0.11282160878181458,
0.10926896333694458,
0.16272194683551788,
-0.01790638640522957,
-0.15611886978149414,
0.17004570364952087,
-0.16204559803009033,
-0.06709256768226624,
-0.015362408012151718,
0.0914003774523735,
0.011169778183102608,
-0.05603787302970886,
-0.03305482864379883,
0.12900325655937195,
-0.003983990289270878,
0.09604038298130035,
-0.02931680530309677,
-0.08617385476827621,
-0.07241953909397125,
-0.005595861934125423,
-0.1912173181772232,
-0.1420379877090454,
-0.0750088021159172,
-0.05717957019805908,
-0.27592194080352783,
-0.06627689301967621,
0.12849228084087372,
-0.01379195787012577,
0.021079441532492638,
0.03318175673484802,
0.15113301575183868,
0.04164079204201698,
-0.04796649143099785,
0.18518051505088806,
-0.029350509867072105,
-0.04994146153330803,
-0.09464910626411438,
0.04676586017012596,
-0.020326431840658188,
-0.039370134472846985,
0.10910052806138992,
0.0005257964949123561,
-0.02565493993461132,
0.1209595575928688,
0.2194938212633133,
0.07778235524892807,
0.03633126989006996,
-0.04986407235264778,
0.03024599328637123,
-0.0010909367119893432,
0.21726995706558228,
-0.10551382601261139,
-0.09859047085046768,
0.07720537483692169,
0.0679839476943016,
0.0464976467192173,
0.06137362867593765,
-0.15661603212356567,
-0.041128840297460556,
0.030925586819648743,
-0.13998053967952728,
0.006781391799449921,
-0.031921640038490295,
-0.04175463691353798,
-0.17526571452617645,
0.05317134037613869,
0.0488220676779747,
-0.09062959253787994,
0.10583077371120453,
-0.009326007217168808,
-0.07588128000497818,
-0.014005331322550774,
-0.07861783355474472,
-0.018830036744475365,
-0.05278872698545456,
0.1052473783493042,
0.15580220520496368,
0.06408537924289703,
0.07131561636924744,
-0.1379537433385849,
-0.13073578476905823,
0.0022862465120851994,
0.15397486090660095,
0.0063350205309689045,
-0.07087875157594681,
0.12392792105674744,
-0.02556813508272171,
0.05693969875574112,
0.17883233726024628,
0.0794486552476883,
0.1735805869102478,
0.08711927384138107,
0.029151417315006256,
-0.23609118163585663,
0.08916930109262466,
0.0744447112083435,
0.07026785612106323,
0.050854019820690155,
-0.07172058522701263,
-0.03292720019817352,
0.13492132723331451,
-0.03727861866354942,
0.06508069485425949,
0.028132067993283272,
-0.04409956559538841,
-0.03260049596428871,
-0.09311199188232422,
-0.1574174016714096,
0.07727199792861938,
-0.11386675387620926,
0.02491896040737629,
-0.052115362137556076,
-0.021926335990428925,
0.04945726320147514,
-0.07623632252216339,
0.0832371860742569,
-0.0110978027805686,
-0.030337026342749596,
-0.0956634134054184,
0.029271919280290604,
0.05500919744372368,
-0.02581040747463703,
-0.1513189673423767,
-0.10850295424461365,
-0.010071247816085815,
0.12694860994815826,
-0.019820429384708405,
-0.22046995162963867,
-0.08675620704889297,
-0.009631647728383541,
-0.008483055047690868,
-0.08003024756908417,
0.030133647844195366,
-0.05054882913827896,
0.00830058939754963,
-0.17655742168426514,
0.01197507232427597,
0.018166517838835716,
0.032178621739149094,
-0.1112779825925827,
0.006557254120707512,
0.04529259726405144,
-0.013408631086349487,
0.050994906574487686,
-0.07065321505069733,
-0.026912542060017586,
0.1077921912074089,
-0.0583682581782341,
-0.0017790708225220442,
-0.08622942864894867,
0.006457229610532522,
0.010656171478331089,
0.11254216730594635,
-0.01664401777088642,
-0.09027571231126785,
-0.06654519587755203,
0.06024288013577461,
0.009550011716783047,
-0.04923728108406067,
-0.11407624930143356,
-0.14574897289276123,
-0.01646989956498146,
0.1679455190896988,
0.0017880983650684357,
0.12370821088552475,
-0.14430473744869232,
0.05140938237309456,
-0.04006855934858322,
-0.09010264277458191,
0.21002984046936035,
-0.019902996718883514,
-0.0672522708773613,
0.05049144849181175,
-0.04579102620482445,
-0.05351189151406288,
0.13478507101535797,
-0.1362653523683548,
0.1151423528790474,
0.06873510777950287,
0.147422656416893,
0.06990613043308258,
-0.015285645611584187,
-0.05174005404114723,
-0.0397847518324852,
0.08257236331701279,
0.04403218626976013,
-0.029463864862918854,
-0.18338878452777863,
-0.12191257625818253,
-0.021119020879268646,
-0.04734819754958153,
0.03456313535571098,
-0.05626312270760536,
-0.23984190821647644,
0.17143699526786804,
-0.22017842531204224,
0.1423221230506897,
0.08280336111783981,
0.19136261940002441,
-0.268767386674881,
-0.015752648934721947,
-0.003657545428723097,
0.0756186693906784,
-0.06547152251005173,
-0.07738862186670303,
0.037138696759939194,
-0.1756649613380432,
0.16974569857120514,
-0.03767331689596176,
0.000562407833058387,
-0.04085061326622963,
-0.16485081613063812,
0.08797402679920197,
0.004365720320492983,
-0.1998588889837265,
-0.05837492272257805,
-0.05928371846675873,
-0.1214313730597496,
0.06335638463497162,
0.11783301830291748,
0.00523451529443264,
-0.02752523310482502,
-0.07698992639780045,
-0.17846986651420593,
0.036630257964134216,
0.17838013172149658,
0.08736825734376907,
0.021558275446295738,
0.16244761645793915,
0.17872734367847443,
-0.11821135878562927,
-0.11279281973838806,
0.09123536199331284,
-0.06236160546541214,
-0.06683948636054993,
-0.049051955342292786,
0.199921652674675,
-0.08223754167556763,
0.013749491423368454,
-0.1473294347524643,
0.10505737364292145,
-0.03859052434563637,
0.13549882173538208,
-0.08056125789880753,
0.00023080772371031344,
0.09422113001346588,
0.0813727080821991,
-0.004639959428459406,
0.10614989697933197,
0.1804349422454834,
0.18658733367919922,
0.03365624323487282,
-0.046776432543992996,
-0.213299959897995,
0.16668011248111725,
-0.20396682620048523,
-0.06252071261405945,
-0.08857766538858414,
-0.021797768771648407,
0.03231428936123848,
0.29786592721939087,
0.07526781409978867,
-0.017682446166872978,
0.11546801030635834,
0.0031670674216002226,
-0.10264348238706589,
-0.03539208695292473,
0.04852081090211868,
0.016432473435997963,
-0.029389692470431328,
-0.04298390448093414,
0.08258379995822906,
0.13796138763427734,
-0.0261863861232996,
0.026063168421387672,
-0.2058415710926056,
-0.13302752375602722,
0.23943199217319489,
0.16327279806137085,
0.018738066777586937,
0.042935002595186234,
0.04960443079471588,
0.04665732383728027,
0.055341336876153946,
0.2954201102256775,
-0.10761569440364838,
0.02678360976278782,
-0.010758035816252232,
-0.1776501089334488,
0.045033544301986694,
0.07215220481157303,
-0.055198028683662415,
0.10174710303544998,
-0.0508154071867466,
0.07135341316461563,
-0.023343531414866447,
-0.012482905760407448,
-0.0018120902823284268,
0.039299122989177704,
0.18666666746139526,
-0.03669004142284393,
0.03908037021756172,
0.11702527850866318,
0.06459135562181473,
-0.0633305013179779,
-0.00393086951225996,
-0.15592364966869354,
0.054294295608997345,
-0.05454366281628609,
0.15569771826267242,
0.0017379244090989232,
-0.000553010671865195,
0.2333064079284668,
-0.08960796892642975,
0.15106013417243958,
-0.04044158011674881,
-0.10975714772939682,
-0.02176686003804207,
-0.1179741770029068,
0.09854664653539658,
-0.050508901476860046,
0.03221186622977257,
0.07180369645357132,
-0.022334333509206772,
-0.07649524509906769,
0.02574232406914234,
0.1637152135372162,
0.04330291599035263,
-0.12477373331785202,
0.10645771771669388,
-0.09090102463960648,
-0.2045697420835495,
0.06223554536700249,
-0.17410297691822052,
-0.14966584742069244,
-0.11934702843427658,
0.17052370309829712,
-0.04740459844470024,
0.05427100881934166,
0.05110681802034378,
0.02329707145690918,
-0.08219239860773087,
0.043766994029283524,
-0.025451086461544037,
-0.07708586752414703,
0.008957061916589737,
0.005393052939325571,
0.14096517860889435,
-0.030177727341651917,
-0.03923444077372551,
0.11069227010011673,
-0.00889330543577671,
-0.019866518676280975,
0.13882893323898315,
0.0978260412812233,
-0.17068111896514893,
0.10407618433237076,
-0.21998624503612518,
0.007253831718116999,
-0.10993348062038422,
-0.07553105801343918,
-0.059415679425001144,
0.1250813752412796,
-0.1017041876912117,
-0.02369844913482666,
-0.0869593620300293,
-0.00089162343647331,
0.05135005712509155,
-0.0003456892154645175,
0.162703275680542,
0.11235296726226807,
-0.17313632369041443,
0.11897981911897659,
-2.823200651543624e-32,
0.04062005132436752,
0.01794019341468811,
-0.0737655907869339,
0.03275713324546814,
-0.24620844423770905,
-0.07012654840946198,
-0.019640307873487473,
0.0031810023356229067,
0.0022074743174016476,
-0.05771679803729057,
-0.054087430238723755,
0.0013702259166166186,
0.11777525395154953,
0.07052800059318542,
0.045634131878614426,
-0.0719636008143425,
0.13507325947284698,
0.12912648916244507,
-0.10939840227365494,
0.012130551040172577,
0.12141792476177216,
-0.021909287199378014,
0.06071052700281143,
-0.08234527707099915,
-0.22931167483329773,
-0.0068019842728972435,
-0.04304793104529381,
0.1035652682185173,
-0.004039465449750423,
-0.04450169950723648,
0.08520869165658951,
-0.011210966855287552,
0.02328493632376194,
-0.0003121921035926789,
-0.04830484092235565,
-0.013895540498197079,
-0.39662036299705505,
-0.02374883182346821,
-0.06989068537950516,
0.10367389768362045,
-0.011198882944881916,
0.2118738293647766,
-0.006958360783755779,
-0.020426781848073006,
0.07006904482841492,
-0.20318365097045898,
0.026224911212921143,
0.08903968334197998,
-0.08779045194387436,
0.04060906916856766,
-0.13686645030975342,
0.039218589663505554,
0.01418824028223753,
0.06039575859904289,
-0.048936404287815094,
0.09148750454187393,
-0.006804364733397961,
-0.002271304838359356,
-0.20348823070526123,
-0.06913822144269943,
0.010027209296822548,
0.00048761029029265046,
0.11640390008687973,
-0.01412797998636961,
0.16046373546123505,
0.11400895565748215,
0.10091808438301086,
-0.0692712664604187,
-0.014298413880169392,
0.10003109276294708,
0.03741472214460373,
0.10623674094676971,
0.06460195779800415,
0.04349081590771675,
0.03739231452345848,
-0.04387018084526062,
-0.03643641993403435,
0.14931051433086395,
-0.060670170933008194,
0.008236097171902657,
-0.11842627823352814,
-0.002056603552773595,
0.17342370748519897,
-0.022127926349639893,
-0.022634057328104973,
0.14614522457122803,
0.005213209893554449,
0.07776520401239395,
0.034340750426054,
0.005806467961519957,
-0.16542020440101624,
0.39950841665267944,
0.09974676370620728,
0.08187218755483627,
0.01799691654741764,
0.10373284667730331,
-0.024045556783676147,
0.16624560952186584,
-0.11435335874557495,
-0.0884050652384758,
0.15699367225170135,
-0.040081702172756195,
0.06520269066095352,
0.10228215157985687,
0.1387087106704712,
0.017995426431298256,
0.05023467540740967,
0.132517009973526,
-0.2240300327539444,
-0.01144345197826624,
0.026649512350559235,
0.018388038501143456,
0.056958168745040894,
0.051248494535684586,
0.12741152942180634,
-0.023287903517484665,
0.14267496764659882,
0.07660514861345291,
0.041785821318626404,
0.07196366041898727,
-0.10774805396795273,
0.09471383690834045,
0.135231152176857,
0.048715222626924515,
-0.07589985430240631,
-0.0925588309764862,
-0.07445532083511353,
-0.1424136757850647,
0.16959822177886963,
-0.19709135591983795,
-0.047416020184755325,
-0.04872136563062668,
7.884298156568548e-7,
-0.0075123668648302555,
0.014672815799713135,
0.014600462280213833,
-0.03319847583770752,
-0.15668997168540955,
0.07664947956800461,
0.03427716717123985,
0.04348903149366379,
0.013850651681423187,
0.18384625017642975,
0.07581193000078201,
-0.19491882622241974,
0.08695691078901291,
0.1331033557653427,
0.02504551224410534,
-0.19160397350788116,
-0.1280616670846939,
-0.04459809139370918,
-0.09433065354824066,
0.03340957686305046,
0.003236986929550767,
0.17197127640247345,
0.02250213921070099,
-0.03352789580821991,
0.09108152240514755,
-0.00461820000782609,
-0.053540389984846115,
0.01693188026547432,
0.23735970258712769,
-0.004030057229101658,
-0.10194862633943558,
-0.021072352305054665,
0.1422221064567566,
-0.09661366790533066,
-0.16766215860843658,
-0.026564814150333405,
0.130992591381073,
0.016202731058001518,
-0.10035130381584167,
0.10574208945035934,
0.000686073093675077,
-0.09754471480846405,
-0.02295622043311596,
-0.1127508208155632,
0.050193604081869125,
-0.17575247585773468,
-0.10321494191884995,
0.1778493970632553,
-0.19497579336166382,
0.1379736363887787,
-0.0272653978317976,
0.0071070753037929535,
0.02467367798089981,
0.29478245973587036,
0.09472138434648514,
0.08239906281232834,
0.022538725286722183,
-0.154945507645607,
0.08124780654907227,
-0.18114370107650757,
-0.1256377100944519,
0.06458339840173721,
-0.06226154416799545,
0.1025976687669754,
0.03536339849233627,
0.07448017597198486,
-0.13032442331314087,
2.4466170037938913e-34,
-0.03422687202692032,
0.012125927023589611,
0.04630192369222641,
0.0025233044289052486,
-0.03902207687497139,
-0.10405170917510986,
0.15951187908649445,
0.0987112894654274,
-0.09995327889919281,
-0.17731229960918427,
-0.24833783507347107
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | > You can use `with_transform` to get a new dataset object.
>
> Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex.
I read about IterableDataset, and it seems to have lazy mapping. But I can't figure out how to convert an IterableDataset into a normal one when needed.
`with_transform` still does not chain AFAIU. | ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 71 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
> You can use `with_transform` to get a new dataset object.
>
> Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex.
I read about IterableDataset, and it seems to have lazy mapping. But I can't figure out how to convert an IterableDataset into a normal one when needed.
`with_transform` still does not chain AFAIU. | [
-0.14712174236774445,
0.1170932874083519,
-0.09103724360466003,
-0.14180581271648407,
-0.025860317051410675,
0.04525553435087204,
0.14727137982845306,
-0.008561636321246624,
-0.06643423438072205,
-0.06879863888025284,
-0.05903104320168495,
0.17819978296756744,
-0.012677079066634178,
0.17016655206680298,
-0.03946831822395325,
-0.24444596469402313,
0.021906493231654167,
-0.007257708813995123,
-0.30191126465797424,
-0.00003926034696632996,
-0.09052404016256332,
0.04075823724269867,
0.08617017418146133,
-0.10409222543239594,
-0.03336407244205475,
0.07606147974729538,
-0.09229980409145355,
0.020885884761810303,
0.014054844155907631,
-0.024589693173766136,
-0.01476000715047121,
0.1379152536392212,
-0.06312600523233414,
-0.006612685509026051,
0.000005906222213525325,
0.07801469415426254,
0.08446253091096878,
0.06701391935348511,
0.1004742980003357,
-0.0623844675719738,
-0.05066966265439987,
-0.16389021277427673,
0.08435709774494171,
-0.0005156003753654659,
-0.22075727581977844,
-0.05568306893110275,
0.14037711918354034,
-0.1604246348142624,
0.15280213952064514,
-0.0958278477191925,
-0.10387644916772842,
-0.18034900724887848,
-0.16540345549583435,
-0.10196534544229507,
-0.006491709500551224,
0.06709056347608566,
0.021847577765583992,
-0.04224955663084984,
-0.19729793071746826,
0.007127915974706411,
-0.07447769492864609,
0.03362438455224037,
0.0259469635784626,
-0.10948116332292557,
0.1513725370168686,
-0.07207034528255463,
-0.17581503093242645,
-0.1683799773454666,
0.010390466079115868,
0.0594111792743206,
-0.030356094241142273,
-0.006951245944947004,
0.003962747287005186,
0.07201026380062103,
-0.06620115786790848,
0.02060909941792488,
-0.14239099621772766,
-0.037823572754859924,
0.0461413711309433,
0.03696766868233681,
-0.14565707743167877,
0.0633387640118599,
0.07730486243963242,
-0.07031718641519547,
-0.2457914650440216,
-0.08141057938337326,
0.007739177439361811,
0.1356363445520401,
-0.1034015342593193,
-0.008758674375712872,
0.1175343319773674,
-0.07543860375881195,
-0.13121484220027924,
0.1388961523771286,
-0.08960720151662827,
-0.07381393760442734,
-0.058140262961387634,
-0.046658605337142944,
0.10368434339761734,
0.030957238748669624,
0.076551653444767,
0.034367237240076065,
-0.12373495101928711,
0.002912747673690319,
0.0011610375950112939,
-0.11461029201745987,
-0.18046478927135468,
0.007054292131215334,
0.011155561544001102,
-0.06465040892362595,
-0.02236010879278183,
0.047565944492816925,
0.06290644407272339,
-0.07149369269609451,
0.1167621985077858,
0.0039831409230828285,
0.07655429095029831,
0.13082994520664215,
-0.015275973826646805,
-0.00015552272088825703,
0.12153259664773941,
-0.003937212750315666,
-0.06332789361476898,
0.026010671630501747,
0.09280460327863693,
0.1796840876340866,
0.06244942173361778,
-0.025226261466741562,
0.06318561732769012,
0.07101873308420181,
-0.04154854267835617,
0.003199487691745162,
0.08988460153341293,
-0.01582646369934082,
0.1382914036512375,
0.12008378654718399,
-0.10595396906137466,
0.03754972666501999,
-0.0028518475592136383,
0.028484972193837166,
0.21693682670593262,
-0.020066076889634132,
0.012083068490028381,
-0.14448483288288116,
0.03190961852669716,
0.03425874933600426,
0.07523923367261887,
0.08941569924354553,
-0.1996341347694397,
0.12819042801856995,
-0.15257807075977325,
0.13304241001605988,
-0.09905131161212921,
0.06937393546104431,
-0.09274766594171524,
0.0866728127002716,
-0.04127209633588791,
0.032434701919555664,
-0.18618005514144897,
-0.15642981231212616,
0.09802334755659103,
-0.16253472864627838,
-0.11656754463911057,
-0.06853975355625153,
0.011276469565927982,
0.003673289669677615,
0.09845682978630066,
0.005906287580728531,
-0.10122022032737732,
-0.09364668279886246,
-0.17101289331912994,
0.026720376685261726,
-0.03964637592434883,
0.078894704580307,
0.004196898080408573,
0.1315043419599533,
-0.007633541245013475,
0.24517692625522614,
-0.09027012437582016,
0.039490003138780594,
-0.00193138443864882,
-0.024338003247976303,
-0.06525366753339767,
0.09610584378242493,
0.13976091146469116,
-0.04871191829442978,
-0.15846092998981476,
0.138596311211586,
-0.17041142284870148,
-0.07177858799695969,
-0.005157968029379845,
0.10779224336147308,
0.02970261313021183,
-0.05021383613348007,
-0.027739617973566055,
0.12226977199316025,
-0.041152093559503555,
0.0986766591668129,
-0.020034832879900932,
-0.09523221105337143,
-0.08052466064691544,
-0.011345447972416878,
-0.12987838685512543,
-0.16759507358074188,
-0.06601230055093765,
-0.061999693512916565,
-0.22375696897506714,
-0.06565181910991669,
0.18496063351631165,
-0.022044142708182335,
-0.020462779328227043,
0.021525913849473,
0.10513222217559814,
0.045674167573451996,
-0.06264808028936386,
0.19274456799030304,
-0.04673496261239052,
-0.03153495863080025,
-0.06309816241264343,
0.04086508974432945,
-0.004871794022619724,
-0.011016984470188618,
0.07896138727664948,
-0.03297419100999832,
-0.01653454080224037,
0.11980482190847397,
0.22217807173728943,
0.06650650501251221,
0.057375092059373856,
-0.054388269782066345,
0.021587613970041275,
-0.0020323796197772026,
0.2513156831264496,
-0.13761569559574127,
-0.09829342365264893,
0.06899821013212204,
0.03987766429781914,
0.07117843627929688,
0.05096128210425377,
-0.12825225293636322,
-0.05701589584350586,
0.009186207316815853,
-0.13474048674106598,
-0.02389402873814106,
-0.03619534149765968,
-0.0170272383838892,
-0.2322121560573578,
0.06816689670085907,
0.04242478683590889,
-0.10310884565114975,
0.12101711332798004,
-0.03237535431981087,
-0.08909577876329422,
0.028898056596517563,
-0.11316610127687454,
-0.045632027089595795,
-0.02682778239250183,
0.06162003055214882,
0.20343172550201416,
0.08718013018369675,
0.10182788223028183,
-0.08718396723270416,
-0.15211524069309235,
-0.02182910218834877,
0.13995173573493958,
0.011135104112327099,
-0.08752191811800003,
0.14836521446704865,
-0.027960453182458878,
0.039087582379579544,
0.18743091821670532,
0.08820479363203049,
0.18690572679042816,
0.08801637589931488,
0.03504345938563347,
-0.21195480227470398,
0.08396963030099869,
0.11170287430286407,
0.07709192484617233,
0.03846408426761627,
-0.07528461515903473,
-0.06061679497361183,
0.16297297179698944,
-0.05022416263818741,
0.07612452656030655,
0.04209559038281441,
-0.02870066650211811,
-0.06326635181903839,
-0.11173884570598602,
-0.15012042224407196,
0.13566286861896515,
-0.10353299975395203,
0.005819879937916994,
-0.019916022196412086,
0.013463739305734634,
0.04415019974112511,
-0.058142293244600296,
0.07477803528308868,
-0.016605567187070847,
-0.033898528665304184,
-0.09838852286338806,
0.014565158635377884,
0.07225517183542252,
-0.019214436411857605,
-0.11079293489456177,
-0.15190930664539337,
0.022397836670279503,
0.15561170876026154,
-0.03336925804615021,
-0.21039332449436188,
-0.09201478958129883,
0.0025074754375964403,
-0.03197537735104561,
-0.13627873361110687,
0.060757387429475784,
-0.0280431117862463,
0.022899698466062546,
-0.1978612244129181,
0.013608640991151333,
0.021329715847969055,
0.0500921830534935,
-0.09793682396411896,
-0.028724217787384987,
0.007184956222772598,
0.013714843429625034,
0.016565563157200813,
-0.043068308383226395,
-0.03391166403889656,
0.13732637465000153,
-0.022305484861135483,
-0.015189873985946178,
-0.03791099041700363,
0.02643655799329281,
0.014128623530268669,
0.1364903748035431,
-0.06635476648807526,
-0.07222754508256912,
-0.03683622181415558,
0.055652182549238205,
0.035720858722925186,
-0.058946263045072556,
-0.0929766297340393,
-0.11673244833946228,
-0.02861689031124115,
0.14236587285995483,
-0.006024382077157497,
0.13940554857254028,
-0.1382785439491272,
0.07253311574459076,
-0.06014534458518028,
-0.13050556182861328,
0.1944817751646042,
0.01110500656068325,
-0.08464027941226959,
0.06226939335465431,
-0.032444700598716736,
-0.0887625440955162,
0.09760847687721252,
-0.15354248881340027,
0.18107415735721588,
0.05656701326370239,
0.16412024199962616,
0.09431622922420502,
0.004609393421560526,
-0.01909865438938141,
-0.02839282713830471,
0.10897382348775864,
0.0069905235432088375,
0.0009623618680052459,
-0.20654194056987762,
-0.12289367616176605,
-0.03577473387122154,
-0.05459114536643028,
0.018480921164155006,
-0.08028010278940201,
-0.2578160762786865,
0.15478086471557617,
-0.20680949091911316,
0.14598996937274933,
0.05798373371362686,
0.19024823606014252,
-0.2529081404209137,
-0.028320392593741417,
-0.02241586521267891,
0.04091336205601692,
-0.0841507762670517,
-0.04717675969004631,
0.053411200642585754,
-0.1923690140247345,
0.15780740976333618,
-0.021267181262373924,
0.024156447499990463,
-0.01254372950643301,
-0.19981881976127625,
0.06759291142225266,
0.01998775638639927,
-0.16553044319152832,
-0.04117440804839134,
-0.06271370500326157,
-0.0978497788310051,
0.048736922442913055,
0.15807616710662842,
-0.02390643022954464,
0.01723463088274002,
-0.059999190270900726,
-0.17185811698436737,
0.08603496849536896,
0.17381341755390167,
0.050219472497701645,
0.04966498911380768,
0.1720879226922989,
0.19627024233341217,
-0.12537606060504913,
-0.12297820299863815,
0.03610295057296753,
-0.05453847721219063,
-0.06379744410514832,
-0.032383993268013,
0.21920910477638245,
-0.10333230346441269,
0.007397851906716824,
-0.11391408741474152,
0.10170256346464157,
0.010238951072096825,
0.14653004705905914,
-0.03498133644461632,
-0.03808489814400673,
0.0998467430472374,
0.07966149598360062,
0.0077343834564089775,
0.10291661322116852,
0.19895046949386597,
0.19851712882518768,
0.07336947321891785,
-0.0277093593031168,
-0.1894374042749405,
0.19098471105098724,
-0.17036636173725128,
-0.023072972893714905,
-0.0817275121808052,
-0.02516034059226513,
0.004073410294950008,
0.3675750195980072,
0.056336525827646255,
-0.02554502710700035,
0.1385718286037445,
-0.03241769224405289,
-0.1015959307551384,
-0.0509607307612896,
0.06394724547863007,
-0.02619996853172779,
-0.06963831186294556,
-0.07375077903270721,
0.026852639392018318,
0.14253707230091095,
-0.010469106025993824,
0.057374533265829086,
-0.16980502009391785,
-0.14109757542610168,
0.22570772469043732,
0.12740448117256165,
0.009195241145789623,
0.08322010189294815,
0.06485934555530548,
0.020362302660942078,
0.08197981864213943,
0.2497912347316742,
-0.09449654072523117,
0.02065887860953808,
-0.01577191986143589,
-0.2068098932504654,
0.03994370624423027,
0.09103255718946457,
-0.05972454324364662,
0.1264827400445938,
-0.03901682421565056,
0.043751310557127,
0.003966581542044878,
-0.04396669939160347,
0.004257407505065203,
0.03590530529618263,
0.1588170975446701,
-0.05348683521151543,
0.04606747254729271,
0.16061002016067505,
0.07254474610090256,
-0.06444748491048813,
0.03780577704310417,
-0.1841416209936142,
0.052870236337184906,
-0.019357973709702492,
0.10038928687572479,
-0.013951086439192295,
0.01336750853806734,
0.18347203731536865,
-0.09946881234645844,
0.09864470362663269,
-0.0012193192960694432,
-0.18322782218456268,
0.00872606597840786,
-0.09633608907461166,
0.07562518119812012,
-0.0009458528365939856,
0.05285385251045227,
0.057821109890937805,
-0.06620871275663376,
-0.06182561069726944,
-0.00017506632138974965,
0.1834820806980133,
0.05890549346804619,
-0.09217727929353714,
0.1456732302904129,
-0.08421291410923004,
-0.17978984117507935,
0.07455096393823624,
-0.1761823147535324,
-0.16841934621334076,
-0.13974076509475708,
0.18251147866249084,
-0.05542747676372528,
0.04626135900616646,
0.08776924014091492,
0.020359298214316368,
-0.07560309022665024,
0.04682447016239166,
-0.0010573712643235922,
-0.059647053480148315,
0.023419059813022614,
0.017589304596185684,
0.15573100745677948,
0.0014273906126618385,
-0.05497884750366211,
0.11265720427036285,
0.009074402041733265,
0.0018758234800770879,
0.09653906524181366,
0.050090447068214417,
-0.17292822897434235,
0.10782013833522797,
-0.18964439630508423,
0.060463789850473404,
-0.10495217889547348,
-0.05814017727971077,
-0.08869966864585876,
0.1396656334400177,
-0.13551735877990723,
-0.056341104209423065,
-0.03836898133158684,
0.02092919312417507,
0.0725143700838089,
0.020521825179457664,
0.15073418617248535,
0.06631357222795486,
-0.16821715235710144,
0.08972904086112976,
-2.820356249088222e-32,
0.044551264494657516,
0.04779326170682907,
-0.09946548193693161,
0.06046421453356743,
-0.19570378959178925,
-0.058541975915431976,
-0.026346517726778984,
-0.02070324309170246,
0.027350666001439095,
-0.04931311309337616,
-0.08198316395282745,
0.033755652606487274,
0.11583980917930603,
0.0817747563123703,
-0.010019538924098015,
-0.04026523977518082,
0.12470413744449615,
0.098246268928051,
-0.1014905497431755,
0.012843208387494087,
0.09571552276611328,
-0.03847501799464226,
0.07183900475502014,
-0.08971065282821655,
-0.22450584173202515,
-0.03541478514671326,
-0.04504583403468132,
0.08222932368516922,
-0.06206101179122925,
-0.06928464025259018,
0.08652817457914352,
0.02566167712211609,
0.03251063823699951,
0.0012901457957923412,
-0.045328956097364426,
0.03464571014046669,
-0.42886781692504883,
0.019371964037418365,
-0.0480041466653347,
0.12031096965074539,
0.005899567622691393,
0.20226459205150604,
0.032059893012046814,
-0.03268621861934662,
0.07612578570842743,
-0.1951017826795578,
-0.033566366881132126,
0.0946132093667984,
-0.07637482136487961,
-0.007214903365820646,
-0.1309412121772766,
0.02110426500439644,
0.024320293217897415,
0.054297395050525665,
-0.041242893785238266,
0.09740249812602997,
-0.031950581818819046,
0.009893480688333511,
-0.22075527906417847,
-0.08284494280815125,
-0.009904375299811363,
0.0356515496969223,
0.09600381553173065,
-0.014570207335054874,
0.17913633584976196,
0.060471490025520325,
0.06918544322252274,
-0.04656868427991867,
-0.04426124691963196,
0.11218629777431488,
-0.006256089545786381,
0.0710645243525505,
0.06478608399629593,
0.013433242216706276,
0.004121614154428244,
-0.006052535958588123,
-0.03543567657470703,
0.14613524079322815,
-0.12768547236919403,
0.052944887429475784,
-0.08977711200714111,
0.02125859074294567,
0.15186628699302673,
-0.024940894916653633,
0.025188064202666283,
0.14521397650241852,
0.011130189523100853,
0.05302171781659126,
0.036403339356184006,
-0.0004189216415397823,
-0.18957696855068207,
0.39594516158103943,
0.07224533706903458,
0.11324754357337952,
-0.01667875610291958,
0.13627396523952484,
-0.02769402228295803,
0.17073433101177216,
-0.11239995062351227,
-0.08663210272789001,
0.10954014956951141,
-0.048832397907972336,
0.07184934616088867,
0.14310045540332794,
0.164737731218338,
0.015241001732647419,
0.044066421687603,
0.13959357142448425,
-0.19756191968917847,
-0.010269366204738617,
0.02010207436978817,
0.017865678295493126,
0.015643546357750893,
0.005423252005130053,
0.12548844516277313,
-0.010733104310929775,
0.15528267621994019,
0.09865951538085938,
0.03993082419037819,
0.02587171643972397,
-0.08008401840925217,
0.07709706574678421,
0.12434662878513336,
0.06787481158971786,
-0.06391610205173492,
-0.12026572972536087,
-0.027564767748117447,
-0.17009226977825165,
0.18609438836574554,
-0.19672749936580658,
-0.04144526273012161,
-0.05910172685980797,
7.794545808792464e-7,
-0.023847052827477455,
-0.00427300576120615,
0.008289040997624397,
-0.05428306385874748,
-0.1637643575668335,
0.06998137384653091,
0.04761411249637604,
0.01410744246095419,
0.049514759331941605,
0.17760422825813293,
0.08791103214025497,
-0.18016906082630157,
0.07294221967458725,
0.10328397154808044,
0.057278893887996674,
-0.20337194204330444,
-0.1580531746149063,
0.03323887288570404,
-0.05254161357879639,
0.0032321421895176172,
0.04894155263900757,
0.18133214116096497,
-0.009123028255999088,
-0.03403017669916153,
0.0683789774775505,
-0.00871624518185854,
-0.0445818193256855,
0.05563483014702797,
0.20611326396465302,
0.004717263393104076,
-0.13335171341896057,
-0.04601021856069565,
0.13090422749519348,
-0.0766778364777565,
-0.17638340592384338,
-0.013200514949858189,
0.104706771671772,
0.019900575280189514,
-0.10396651923656464,
0.14099879562854767,
0.016956284642219543,
-0.10878786444664001,
-0.002149099251255393,
-0.07780525088310242,
0.08427539467811584,
-0.1677035391330719,
-0.10536554455757141,
0.19101649522781372,
-0.20814219117164612,
0.1394050419330597,
-0.05402341112494469,
0.05635600537061691,
0.010494181886315346,
0.287098228931427,
0.07088129967451096,
0.09516673535108566,
0.017106639221310616,
-0.17162148654460907,
0.0484754778444767,
-0.18269579112529755,
-0.1353853940963745,
0.1149059310555458,
-0.07500921934843063,
0.086738221347332,
0.007205782923847437,
0.09129481017589569,
-0.1392785906791687,
2.1196879180124716e-34,
-0.0528634712100029,
0.016158530488610268,
0.030575962737202644,
0.01278041023761034,
-0.04520340636372566,
-0.1422467976808548,
0.12761341035366058,
0.11855778098106384,
-0.12166110426187515,
-0.18373234570026398,
-0.2380911260843277
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | > I read about IterableDataset, and it seems to have lazy mapping. But I can't figure out how to convert an IterableDataset into a normal one when needed.
You must cache an `IterableDataset` to disk to load it as a `Dataset`. One way to do this is with `Dataset.from_generator`:
```python
from functools import partial
from datasets import Dataset
def gen_from_iterable_dataset(iterable_ds)
yield from iterable_ds
ds = Dataset.from_generator(partial(gen_from_iterable_dataset, iterable_ds), features=iterable_ds.features})
```
> with_transform still does not chain AFAIU.
Yes, not supported yet - the solution is to combine the transforms into a single one. | ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 92 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
> I read about IterableDataset, and it seems to have lazy mapping. But I can't figure out how to convert an IterableDataset into a normal one when needed.
You must cache an `IterableDataset` to disk to load it as a `Dataset`. One way to do this is with `Dataset.from_generator`:
```python
from functools import partial
from datasets import Dataset
def gen_from_iterable_dataset(iterable_ds)
yield from iterable_ds
ds = Dataset.from_generator(partial(gen_from_iterable_dataset, iterable_ds), features=iterable_ds.features})
```
> with_transform still does not chain AFAIU.
Yes, not supported yet - the solution is to combine the transforms into a single one. | [
-0.09785404056310654,
0.16540248692035675,
-0.08946223556995392,
-0.15656912326812744,
-0.049981068819761276,
0.11013875901699066,
0.13729669153690338,
-0.020897042006254196,
-0.03660088777542114,
-0.058005958795547485,
-0.06317903101444244,
0.12494439631700516,
0.0040638442151248455,
0.10607551038265228,
-0.05483391135931015,
-0.21281738579273224,
0.021771572530269623,
0.012858682312071323,
-0.3370996117591858,
0.029318947345018387,
-0.12303239852190018,
0.051418237388134,
0.12764310836791992,
-0.11532837152481079,
-0.06940588355064392,
0.026006046682596207,
-0.06357578933238983,
0.046902380883693695,
0.038761965930461884,
0.029155276715755463,
-0.043942809104919434,
0.13142336905002594,
-0.08038745820522308,
-0.014383655972778797,
0.000005895168214919977,
0.09051210433244705,
0.14426951110363007,
0.04324476420879364,
0.10267424583435059,
-0.055957943201065063,
-0.0010139329824596643,
-0.12003205716609955,
0.0836607962846756,
-0.006504586897790432,
-0.2603057622909546,
-0.09740246087312698,
0.09864813089370728,
-0.17096494138240814,
0.19463016092777252,
-0.06326954811811447,
-0.13212738931179047,
-0.2515222430229187,
-0.15481045842170715,
-0.04762398451566696,
-0.03627176582813263,
0.008333317935466766,
0.023058267310261726,
-0.06475482136011124,
-0.2137753814458847,
-0.08340542018413544,
-0.021078048273921013,
0.022447660565376282,
0.010836693458259106,
-0.1075795590877533,
0.14171840250492096,
-0.062434203922748566,
-0.10140442103147507,
-0.17968608438968658,
-0.003530875314027071,
0.029125826433300972,
-0.016744261607527733,
-0.021147027611732483,
-0.018366383388638496,
0.07072944194078445,
-0.07501004636287689,
0.01314057968556881,
-0.12422259151935577,
-0.025781802833080292,
0.0044075422920286655,
0.04686737805604935,
-0.1617693454027176,
0.04284864664077759,
0.06350835412740707,
-0.08931279927492142,
-0.26759403944015503,
-0.08960453420877457,
-0.007246688939630985,
0.16689172387123108,
-0.15870271623134613,
0.01492320653051138,
0.17662319540977478,
-0.05466875061392784,
-0.13602714240550995,
0.13482041656970978,
-0.07970616221427917,
-0.031120287254452705,
-0.04749056696891785,
-0.05421924591064453,
0.08159912377595901,
0.05800336226820946,
0.03961607813835144,
-0.040703848004341125,
-0.11374461650848389,
-0.003062958363443613,
-0.02724470943212509,
-0.05302686244249344,
-0.21407923102378845,
0.005782716441899538,
-0.06884349137544632,
-0.07637747377157211,
-0.08502992242574692,
0.04911167174577713,
0.04911850765347481,
-0.09076432883739471,
0.2312680333852768,
-0.019256679341197014,
0.06741245836019516,
0.14088959991931915,
0.017431829124689102,
0.027776770293712616,
0.1189127191901207,
-0.004447123501449823,
-0.09314752370119095,
-0.0009115507709793746,
0.15694288909435272,
0.17303653061389923,
0.05730564519762993,
-0.004235584754496813,
0.07095270603895187,
0.017007170245051384,
-0.053881868720054626,
0.009795557707548141,
0.08369774371385574,
0.008830288425087929,
0.09730623662471771,
0.11966178566217422,
-0.10884331166744232,
0.0034565278328955173,
-0.014839946292340755,
0.039290186017751694,
0.2124289870262146,
-0.054221317172050476,
0.04237346723675728,
-0.0862930566072464,
0.05952407047152519,
0.05125498026609421,
0.07146277278661728,
0.040474314242601395,
-0.18666958808898926,
0.11749260872602463,
-0.13972385227680206,
0.12375662475824356,
-0.04246675595641136,
0.08525887876749039,
-0.07435332983732224,
0.11199156939983368,
-0.004657380748540163,
0.01994468830525875,
-0.1200115829706192,
-0.11114364117383957,
0.04135209321975708,
-0.17196939885616302,
-0.1259695291519165,
-0.07610786706209183,
0.018813367933034897,
0.004796690307557583,
0.12319425493478775,
0.02073880471289158,
-0.059659503400325775,
-0.05959729105234146,
-0.0646376758813858,
0.034016549587249756,
-0.0011489598546177149,
0.05921488627791405,
-0.016814978793263435,
0.08686573803424835,
0.02030600979924202,
0.21449331939220428,
-0.07723432779312134,
0.0723738819360733,
0.008883190341293812,
0.04058711603283882,
-0.011814719066023827,
0.03166204318404198,
0.12742748856544495,
-0.06982912868261337,
-0.1380997598171234,
0.11945232003927231,
-0.14763455092906952,
-0.0543755404651165,
-0.026625702157616615,
0.13088837265968323,
0.08742229640483856,
-0.04511266201734543,
-0.010675723664462566,
0.10567966103553772,
-0.0855279192328453,
0.0823090672492981,
-0.04080415517091751,
-0.09086893498897552,
-0.062058284878730774,
-0.02808290533721447,
-0.11794087290763855,
-0.10489891469478607,
-0.08805342018604279,
-0.020178603008389473,
-0.20129188895225525,
-0.00955910049378872,
0.14599132537841797,
-0.019664309918880463,
-0.12426947057247162,
0.005393467377871275,
0.019665034487843513,
0.06379961967468262,
-0.08899521082639694,
0.158539816737175,
-0.07625702768564224,
0.018282650038599968,
-0.039435796439647675,
-0.0298940297216177,
0.04582136496901512,
0.04937400296330452,
0.13132593035697937,
-0.011994073167443275,
-0.04524645581841469,
0.14459370076656342,
0.21857835352420807,
0.038223735988140106,
0.03824285417795181,
-0.08039592951536179,
0.03230473771691322,
-0.004613241646438837,
0.262062132358551,
-0.14519406855106354,
-0.09845656901597977,
0.04102037847042084,
-0.008591869845986366,
0.04144833981990814,
0.017017826437950134,
-0.11170439422130585,
-0.0703292042016983,
0.0060467952862381935,
-0.10497608035802841,
-0.06344147771596909,
-0.043938443064689636,
-0.04068515822291374,
-0.23463045060634613,
0.08805765956640244,
-0.01248423382639885,
-0.060750775039196014,
0.14035356044769287,
-0.058549534529447556,
-0.049311503767967224,
0.06268393993377686,
-0.13597722351551056,
-0.06769892573356628,
0.0024931328371167183,
0.10861770808696747,
0.2048245370388031,
0.1322566568851471,
0.07663121819496155,
-0.04505037143826485,
-0.14328037202358246,
-0.05897181108593941,
0.09568960964679718,
-0.018031811341643333,
-0.12056689709424973,
0.18177735805511475,
-0.04163310304284096,
0.03016754426062107,
0.21249687671661377,
0.10027136653661728,
0.13273420929908752,
0.08055015653371811,
0.052336014807224274,
-0.17494238913059235,
0.07682150602340698,
0.13965971767902374,
0.06674444675445557,
0.023304451256990433,
-0.05127689242362976,
-0.03916469216346741,
0.20674195885658264,
-0.05249396339058876,
0.10429680347442627,
0.09050148725509644,
-0.024306515231728554,
-0.05384446308016777,
-0.12813246250152588,
-0.14060072600841522,
0.13193736970424652,
-0.11420945823192596,
-0.0012223697267472744,
-0.01483518909662962,
0.046028874814510345,
0.08658324182033539,
-0.018525993451476097,
0.0006360162515193224,
0.04575660824775696,
-0.10804770886898041,
-0.06036253646016121,
-0.00706632761284709,
0.07350152730941772,
-0.012865899130702019,
-0.06421441584825516,
-0.09736468642950058,
0.04476074129343033,
0.13576070964336395,
-0.10346271097660065,
-0.2128114253282547,
-0.06490092724561691,
-0.0064572724513709545,
-0.07014206796884537,
-0.10893303900957108,
0.05094242841005325,
-0.013713568449020386,
0.04078288376331329,
-0.24731814861297607,
0.00998767651617527,
-0.02114742249250412,
0.10080572217702866,
-0.09018725156784058,
-0.059950970113277435,
-0.007882364094257355,
0.05153006687760353,
0.035559311509132385,
-0.0030051604844629765,
-0.05435597151517868,
0.1574976146221161,
0.0075810374692082405,
-0.01851293444633484,
0.006158868782222271,
0.031009875237941742,
-0.04427744448184967,
0.1752990186214447,
-0.0797252506017685,
-0.07249096035957336,
-0.014820246957242489,
0.08065611869096756,
0.13328415155410767,
-0.051998645067214966,
-0.06267333030700684,
-0.1496502012014389,
-0.030405418947339058,
0.13245156407356262,
0.00038432024302892387,
0.16896238923072815,
-0.20293177664279938,
0.09065712988376617,
-0.09388178586959839,
-0.158285453915596,
0.15930838882923126,
0.026340890675783157,
-0.09828619658946991,
0.06522078812122345,
-0.00020049804879818112,
-0.14083078503608704,
0.09660579264163971,
-0.08643757551908493,
0.21916264295578003,
0.048596613109111786,
0.1541757434606552,
0.10449565947055817,
0.006643048487603664,
-0.019796187058091164,
-0.032403893768787384,
0.1416201889514923,
-0.029130125418305397,
0.002283217152580619,
-0.19946171343326569,
-0.12412340193986893,
-0.043609775602817535,
-0.09191117435693741,
-0.04820225387811661,
-0.11206937581300735,
-0.2455783486366272,
0.12343839555978775,
-0.18590259552001953,
0.12568828463554382,
0.0045739347115159035,
0.18650013208389282,
-0.258826345205307,
-0.037477217614650726,
0.03480621427297592,
0.05192266032099724,
-0.10817508399486542,
0.025900116190314293,
0.050641078501939774,
-0.19521518051624298,
0.1846923530101776,
0.006644111592322588,
0.036284077912569046,
0.040552910417318344,
-0.1882631480693817,
0.056552547961473465,
0.020462267100811005,
-0.1510676145553589,
-0.05607198551297188,
-0.051248032599687576,
-0.12327071279287338,
0.03518873080611229,
0.20977157354354858,
-0.038997355848550797,
0.019312074407935143,
0.023971982300281525,
-0.1944619119167328,
0.09435014426708221,
0.13729070127010345,
0.10001572221517563,
0.061633866280317307,
0.10423458367586136,
0.17574332654476166,
-0.09434368461370468,
-0.12166659533977509,
-0.005256106145679951,
-0.010413596406579018,
-0.026426853612065315,
0.0005204686895012856,
0.17761345207691193,
-0.11567480117082596,
-0.022616541013121605,
-0.11798152327537537,
0.12155620753765106,
0.06729786843061447,
0.10637321323156357,
-0.014617876149713993,
-0.05615506321191788,
0.0905771479010582,
0.09487750381231308,
0.025079216808080673,
0.1295328587293625,
0.20436963438987732,
0.19687071442604065,
0.06675985455513,
0.0319603830575943,
-0.23931469023227692,
0.2247789353132248,
-0.13745050132274628,
-0.04341943562030792,
-0.10994277894496918,
-0.0012870057253167033,
-0.07293164730072021,
0.31802573800086975,
0.016185367479920387,
-0.039545074105262756,
0.14089180529117584,
-0.0661427229642868,
-0.07950174063444138,
-0.01538232434540987,
0.055668905377388,
-0.06955861300230026,
-0.04324724152684212,
-0.12611345946788788,
0.016648942604660988,
0.14570696651935577,
-0.02986910566687584,
0.10200569033622742,
-0.1968616545200348,
-0.10741449892520905,
0.20121608674526215,
0.09845465421676636,
-0.016384659335017204,
0.08450913429260254,
0.10530686378479004,
0.038994092494249344,
0.15731693804264069,
0.2814609408378601,
-0.11317741870880127,
0.005884457845240831,
0.010237825103104115,
-0.25158676505088806,
0.026340892538428307,
0.0977923795580864,
-0.05710695683956146,
0.14318516850471497,
0.0030476441606879234,
0.037342678755521774,
0.009649517014622688,
-0.0547245629131794,
0.03934726491570473,
-0.028110316023230553,
0.09161557257175446,
-0.05873829498887062,
0.06309711933135986,
0.16222985088825226,
0.10192835330963135,
-0.042049750685691833,
0.05239120125770569,
-0.22290663421154022,
0.04575268179178238,
-0.008528824895620346,
0.05232740566134453,
0.022647839039564133,
0.00792925525456667,
0.14289452135562897,
-0.12312156707048416,
0.05264158919453621,
-0.010964472778141499,
-0.19470371305942535,
0.027601758018136024,
-0.09722620248794556,
0.05610736459493637,
0.0606016106903553,
0.05611294135451317,
0.0727597177028656,
-0.1339503824710846,
-0.042687930166721344,
-0.06082405149936676,
0.15938802063465118,
0.09894941747188568,
-0.03565247356891632,
0.11199591308832169,
-0.06582947075366974,
-0.16851602494716644,
0.08039749413728714,
-0.17925116419792175,
-0.12664666771888733,
-0.10072011500597,
0.17817501723766327,
-0.06340586394071579,
0.024576041847467422,
0.09558310359716415,
0.024173464626073837,
-0.06447006016969681,
0.019257817417383194,
-0.06822085380554199,
-0.05175935477018356,
0.03668900206685066,
0.0638287365436554,
0.17863094806671143,
-0.0018068173667415977,
-0.0017166163306683302,
0.10287705808877945,
0.021817928180098534,
0.000172192623722367,
0.02665501832962036,
0.05399053916335106,
-0.16900508105754852,
0.13554883003234863,
-0.17749916017055511,
0.07012246549129486,
-0.11884456872940063,
-0.10467305034399033,
-0.09029845148324966,
0.18015268445014954,
-0.16080008447170258,
-0.01631612703204155,
-0.01512314286082983,
0.01077196653932333,
0.02979319542646408,
0.012474732473492622,
0.19230350852012634,
0.05092271417379379,
-0.1338878720998764,
0.06086042895913124,
-2.7582695762136656e-32,
0.034564532339572906,
0.047068092972040176,
-0.08517526835203171,
0.03388587757945061,
-0.15267568826675415,
-0.03409087657928467,
-0.016279080882668495,
-0.021820049732923508,
0.039342690259218216,
-0.04808976873755455,
-0.15611784160137177,
0.047976914793252945,
0.08630017936229706,
0.0592472143471241,
-0.11393488198518753,
-0.01032356545329094,
0.12241741269826889,
0.09467917680740356,
-0.06965784728527069,
0.072177954018116,
0.11206899583339691,
-0.03777878358960152,
0.08678670227527618,
-0.05830268934369087,
-0.22687746584415436,
-0.0817941203713417,
-0.06380008906126022,
0.021589014679193497,
-0.10336193442344666,
-0.0916537418961525,
0.036443401128053665,
0.061822257936000824,
-0.0034326964523643255,
-0.10436026751995087,
-0.0938674658536911,
0.09247973561286926,
-0.3925923705101013,
0.055300723761320114,
-0.03223022073507309,
0.11261256784200668,
0.00008365476969629526,
0.1758098304271698,
0.1083233505487442,
-0.03683416172862053,
0.04799199476838112,
-0.15919816493988037,
-0.04968390613794327,
0.09978275746107101,
-0.11765727400779724,
-0.08567977696657181,
-0.14133992791175842,
0.013451378792524338,
0.03059033490717411,
0.026345841586589813,
-0.07842382043600082,
0.04370422288775444,
-0.07960803806781769,
0.07729609310626984,
-0.180292546749115,
-0.06524211913347244,
0.011168738827109337,
0.0640205666422844,
0.10523372143507004,
-0.060593828558921814,
0.20245404541492462,
0.020844418555498123,
0.09690753370523453,
0.00032848212867975235,
-0.04645084962248802,
0.04243868589401245,
-0.04209795594215393,
-0.003910251427441835,
0.021703235805034637,
-0.06279802322387695,
-0.007028262596577406,
0.008541692979633808,
-0.05849035829305649,
0.09013960510492325,
-0.1964486539363861,
0.1317494511604309,
-0.08245949447154999,
0.02793305739760399,
0.18836499750614166,
0.004802884068340063,
0.025316312909126282,
0.19352766871452332,
0.061674948781728745,
0.058037374168634415,
-0.024300813674926758,
0.004190697800368071,
-0.20380663871765137,
0.33901116251945496,
0.04152175039052963,
0.09104892611503601,
-0.022056778892874718,
0.17502105236053467,
-0.004494608845561743,
0.14177405834197998,
-0.10427861660718918,
-0.055320415645837784,
0.1121642142534256,
-0.0695129781961441,
0.04480418935418129,
0.13147275149822235,
0.18313094973564148,
0.023934075608849525,
0.043891169130802155,
0.06003729626536369,
-0.1358669251203537,
-0.0024888692423701286,
-0.015326937660574913,
-0.01591894030570984,
-0.05564969405531883,
-0.02984010986983776,
0.1419851928949356,
-0.007656209170818329,
0.15564872324466705,
0.09730717539787292,
0.011385098099708557,
0.048189613968133926,
-0.023562615737318993,
0.058385323733091354,
0.10030468553304672,
0.08436073362827301,
-0.033540695905685425,
-0.07845974713563919,
-0.06132512539625168,
-0.19282026588916779,
0.16206826269626617,
-0.12877462804317474,
0.0008919534157030284,
-0.007768125273287296,
7.766206522319408e-7,
-0.04465456306934357,
-0.027782555669546127,
0.006675373762845993,
-0.028021031990647316,
-0.16821134090423584,
0.053215060383081436,
0.0498737134039402,
0.019908113405108452,
0.06049486994743347,
0.16106101870536804,
0.09628388285636902,
-0.14717702567577362,
0.037797681987285614,
0.06656422466039658,
0.07514190673828125,
-0.17316508293151855,
-0.14280155301094055,
0.04083084315061569,
-0.004275523126125336,
0.03773944824934006,
0.0690942332148552,
0.12921056151390076,
-0.06868135929107666,
-0.058757416903972626,
0.058903805911540985,
0.0241837278008461,
-0.0508195199072361,
0.11703341454267502,
0.15955179929733276,
0.034400396049022675,
-0.05888650566339493,
-0.0624404139816761,
0.17455609142780304,
-0.0607556514441967,
-0.16128945350646973,
0.04373480752110481,
0.056007955223321915,
0.004589560907334089,
-0.07638423144817352,
0.11361891776323318,
0.043058112263679504,
-0.08062553405761719,
0.012615928426384926,
-0.01613823138177395,
0.056815143674612045,
-0.1816437840461731,
-0.06252066791057587,
0.16277138888835907,
-0.20532912015914917,
0.13450181484222412,
-0.07219171524047852,
0.11608218401670456,
0.08533221483230591,
0.28558549284935,
0.021193373948335648,
0.06648075580596924,
0.01452341116964817,
-0.19890107214450836,
0.06883476674556732,
-0.13545168936252594,
-0.18542243540287018,
0.12967492640018463,
-0.08007090538740158,
0.07170718908309937,
0.003850177861750126,
0.093504399061203,
-0.1476651132106781,
1.6413140634606107e-34,
-0.1004280149936676,
0.04399438574910164,
-0.003709204262122512,
0.028140448033809662,
-0.06576618552207947,
-0.18177436292171478,
0.088901087641716,
0.1077399030327797,
-0.09241156280040741,
-0.21229369938373566,
-0.21313871443271637
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | I wonder if it would be beneficial to have a dedicated method to do that ? Maybe a `.save_to_disk()` so that the user can reload the resulting dataset later ? | ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 30 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
I wonder if it would be beneficial to have a dedicated method to do that ? Maybe a `.save_to_disk()` so that the user can reload the resulting dataset later ? | [
-0.1403181105852127,
0.12803617119789124,
-0.07057185471057892,
-0.1598414033651352,
-0.03690205514431,
0.03266153484582901,
0.1429044008255005,
-0.005563430488109589,
-0.05194782465696335,
-0.09912627190351486,
-0.014834804460406303,
0.20085816085338593,
-0.029170721769332886,
0.21174226701259613,
-0.03178582340478897,
-0.2402397245168686,
0.056841325014829636,
0.059089295566082,
-0.24106094241142273,
-0.020589251071214676,
-0.11842582374811172,
0.004315579775720835,
0.09598413109779358,
-0.04671202600002289,
-0.007996410131454468,
0.051831115037202835,
-0.11251688748598099,
0.029739467427134514,
0.027895493432879448,
0.021112628281116486,
-0.03817746788263321,
0.14571237564086914,
-0.07740635424852371,
-0.05740101635456085,
0.000005920595867792144,
0.06813877075910568,
0.03612302616238594,
0.049434855580329895,
0.1180095374584198,
-0.056299932301044464,
-0.033573463559150696,
-0.18171030282974243,
0.07615824043750763,
-0.033857524394989014,
-0.2206445038318634,
-0.018029561266303062,
0.17748868465423584,
-0.1753419041633606,
0.16547952592372894,
-0.07967835664749146,
-0.09485185891389847,
-0.20705141127109528,
-0.17706367373466492,
-0.05805489793419838,
0.025638863444328308,
0.07867781817913055,
0.02311786822974682,
-0.08056611567735672,
-0.17137330770492554,
-0.07786194980144501,
-0.08361347019672394,
0.02969525195658207,
0.013897468335926533,
-0.08600563555955887,
0.1921052187681198,
-0.09424392133951187,
-0.16231964528560638,
-0.17939543724060059,
0.03578154742717743,
0.03954120725393295,
-0.10721709579229355,
0.0007307978230528533,
0.03189169988036156,
0.051576972007751465,
-0.05261971056461334,
0.011632335372269154,
-0.18683697283267975,
0.0046441699378192425,
0.05775924772024155,
0.0010321943555027246,
-0.1953587532043457,
-0.029094435274600983,
0.07934579998254776,
-0.05925586819648743,
-0.2269013226032257,
-0.09196420758962631,
0.0353858582675457,
0.12441331148147583,
-0.10334505140781403,
0.04972949996590614,
0.0923134833574295,
-0.05703652277588844,
-0.09710528701543808,
0.17535842955112457,
-0.09471398591995239,
-0.09128497540950775,
-0.07237724214792252,
-0.013288659043610096,
0.12462762743234634,
0.025420501828193665,
0.10082722455263138,
0.06804392486810684,
-0.11852769553661346,
0.009405281394720078,
-0.07055336236953735,
-0.07715968787670135,
-0.17405596375465393,
0.01956399343907833,
0.08930113166570663,
-0.09332101792097092,
-0.05635720491409302,
0.04172038286924362,
0.0660233348608017,
-0.044878650456666946,
0.15697553753852844,
-0.01676373928785324,
0.006984483450651169,
0.1639862209558487,
-0.008723966777324677,
0.009668939746916294,
0.11323241144418716,
0.07521418482065201,
-0.09009930491447449,
0.06234029307961464,
0.07823754101991653,
0.2288447767496109,
0.06625750660896301,
-0.026788292452692986,
0.077154740691185,
0.1185559555888176,
-0.032851431518793106,
0.021171724423766136,
0.12990586459636688,
0.04709835723042488,
0.1308434009552002,
0.13079534471035004,
-0.0886346846818924,
0.043975189328193665,
-0.03548313304781914,
-0.0014216047711670399,
0.20770005881786346,
-0.01048124860972166,
-0.014664620161056519,
-0.15914030373096466,
0.012485372833907604,
0.024548036977648735,
0.07933174073696136,
0.1223289966583252,
-0.15530738234519958,
0.17289279401302338,
-0.18243475258350372,
0.10998306423425674,
-0.08709675818681717,
0.06713022291660309,
-0.0873015820980072,
0.08868110924959183,
-0.12963677942752838,
0.005416456144303083,
-0.14131084084510803,
-0.13953723013401031,
0.0891156941652298,
-0.17485465109348297,
-0.09523013979196548,
-0.08974196761846542,
-0.01655077189207077,
-0.04687898978590965,
0.1462245136499405,
-0.008790073916316032,
-0.17607401311397552,
-0.053343161940574646,
-0.20470157265663147,
-0.021656684577465057,
-0.0282759889960289,
0.036141909658908844,
0.02610175497829914,
0.12969791889190674,
0.009712101891636848,
0.217783123254776,
-0.01880721189081669,
0.02154879830777645,
-0.021427201107144356,
-0.04395373538136482,
-0.05627797544002533,
0.13175705075263977,
0.18554987013339996,
-0.016273165121674538,
-0.13010598719120026,
0.18027403950691223,
-0.11689772456884384,
-0.0457468181848526,
0.0010698519181460142,
0.08082699030637741,
0.039334896951913834,
-0.03206126391887665,
0.003938246052712202,
0.14934982359409332,
0.004564583767205477,
0.12846192717552185,
-0.02031669206917286,
-0.10169961303472519,
-0.024357901886105537,
0.0034166614059358835,
-0.2201663702726364,
-0.1726887971162796,
-0.08266463130712509,
-0.009129676967859268,
-0.21019044518470764,
-0.07739948481321335,
0.07245698571205139,
-0.04318664222955704,
0.027708228677511215,
0.04046744108200073,
0.1121940091252327,
0.04032980650663376,
-0.0681261345744133,
0.1480952352285385,
-0.016894899308681488,
-0.02377151884138584,
-0.03687805309891701,
0.01416771486401558,
0.019413763657212257,
-0.018993442878127098,
0.14380678534507751,
-0.03259425610303879,
-0.01546172983944416,
0.1262236386537552,
0.216944620013237,
0.06627446413040161,
0.029959240928292274,
-0.057815469801425934,
0.008787502534687519,
0.017331110313534737,
0.23921337723731995,
-0.07244555652141571,
-0.08825404942035675,
0.023191874846816063,
0.024372031912207603,
0.11913437396287918,
0.060269374400377274,
-0.13197293877601624,
-0.022154320031404495,
0.032548870891332626,
-0.09935152530670166,
-0.023090556263923645,
-0.03462463244795799,
-0.061766598373651505,
-0.18147970736026764,
0.033270157873630524,
0.038295794278383255,
-0.07154848426580429,
0.10271011292934418,
0.005364218261092901,
-0.05918778106570244,
0.042864732444286346,
-0.09761779010295868,
0.012912789359688759,
-0.025645973160862923,
0.09005896002054214,
0.16160301864147186,
0.06104089692234993,
0.059317462146282196,
-0.1012473925948143,
-0.09537695348262787,
-0.0025856243446469307,
0.17436234652996063,
0.01715455763041973,
-0.10647568851709366,
0.14057892560958862,
-0.042935460805892944,
0.023257698863744736,
0.13035929203033447,
0.07442719489336014,
0.17513501644134521,
0.09231844544410706,
-0.00944259949028492,
-0.2000172883272171,
0.13146398961544037,
0.09232942014932632,
0.09632811695337296,
0.053097549825906754,
-0.040127597749233246,
-0.05484071001410484,
0.12518452107906342,
-0.07463712245225906,
0.11637164652347565,
0.0652693435549736,
-0.0007789560477249324,
0.004453851375728846,
-0.1331014186143875,
-0.2082965075969696,
0.09434633702039719,
-0.10620070993900299,
0.0435507707297802,
-0.042913056910037994,
0.010181923396885395,
0.049461886286735535,
-0.10050073266029358,
0.07441246509552002,
-0.023382706567645073,
-0.03255840390920639,
-0.06477346271276474,
0.046799447387456894,
0.08836822211742401,
-0.03187253326177597,
-0.18206077814102173,
-0.13490968942642212,
0.010479232296347618,
0.10294236242771149,
-0.003995978273451328,
-0.2142857164144516,
-0.13070136308670044,
-0.03924856707453728,
-0.010903553105890751,
-0.1229579746723175,
0.029498102143406868,
-0.03087753616273403,
-0.0025973219890147448,
-0.20469652116298676,
-0.006815633270889521,
0.018580392003059387,
0.1019558385014534,
-0.1260777711868286,
0.037068262696266174,
0.033761657774448395,
-0.01294694747775793,
0.06916190683841705,
-0.09542160481214523,
-0.025806378573179245,
0.08482259511947632,
0.00539458217099309,
-0.008035877719521523,
-0.09214362502098083,
0.02221638336777687,
-0.0516461506485939,
0.15215575695037842,
-0.038708850741386414,
-0.06551038473844528,
-0.05829542502760887,
0.04841609671711922,
0.029551254585385323,
-0.002789661753922701,
-0.12942352890968323,
-0.14684458076953888,
-0.030863847583532333,
0.14691351354122162,
-0.001837238552980125,
0.13699692487716675,
-0.19477620720863342,
0.06130598112940788,
-0.04745999723672867,
-0.09211084246635437,
0.19651997089385986,
-0.01232973113656044,
-0.07930263131856918,
0.04499625414609909,
-0.04113694652915001,
-0.042798228561878204,
0.12885254621505737,
-0.1269235759973526,
0.104316346347332,
0.05429079383611679,
0.16601407527923584,
0.04764531925320625,
-0.0247561763972044,
-0.036370765417814255,
0.0033747723791748285,
0.05738671123981476,
0.00211131083779037,
0.0033995467238128185,
-0.1444416046142578,
-0.16988421976566315,
-0.034017957746982574,
-0.09375139325857162,
-0.0020854766480624676,
-0.04930122569203377,
-0.2666182518005371,
0.15501701831817627,
-0.20870046317577362,
0.17606526613235474,
0.06008419394493103,
0.19096778333187103,
-0.23349596560001373,
-0.02130780927836895,
-0.015986748039722443,
0.0833435207605362,
-0.12047018110752106,
-0.048694219440221786,
0.042692653834819794,
-0.17326350510120392,
0.1709688901901245,
-0.033420316874980927,
0.08274722844362259,
-0.021961580961942673,
-0.1312597692012787,
0.06640178710222244,
0.025897648185491562,
-0.17437271773815155,
-0.05024975910782814,
-0.10627233237028122,
-0.13060356676578522,
0.0415319986641407,
0.11110816895961761,
0.03743677958846092,
-0.06508460640907288,
-0.026982523500919342,
-0.2107425481081009,
0.029288114979863167,
0.14862418174743652,
0.09504802525043488,
-0.01875610649585724,
0.11926159262657166,
0.20387503504753113,
-0.1260913908481598,
-0.08297213912010193,
0.05371402949094772,
-0.055770911276340485,
-0.061081212013959885,
-0.018051153048872948,
0.15452395379543304,
-0.0725056454539299,
-0.03117542341351509,
-0.16110074520111084,
0.06354766339063644,
-0.039195068180561066,
0.11312506347894669,
-0.08754782378673553,
0.029578473418951035,
0.06152350455522537,
0.055732611566782,
-0.012147349305450916,
0.08645714074373245,
0.13948756456375122,
0.19074833393096924,
-0.0057925088331103325,
-0.05133919045329094,
-0.22800593078136444,
0.13440366089344025,
-0.1982390284538269,
0.018428079783916473,
-0.0634978711605072,
-0.03692297637462616,
0.04062022268772125,
0.22859376668930054,
0.04885076358914375,
-0.055137794464826584,
0.14898687601089478,
-0.026872871443629265,
-0.13460440933704376,
-0.07061993330717087,
0.03462482988834381,
-0.07602740079164505,
-0.023959551006555557,
-0.04585782811045647,
0.07553093135356903,
0.12030738592147827,
-0.0347617045044899,
-0.00491899810731411,
-0.2054072767496109,
-0.13127082586288452,
0.26952606439590454,
0.1396600753068924,
0.009733971208333969,
0.04560237005352974,
0.06092163547873497,
0.06298281252384186,
0.1032068207859993,
0.24815373122692108,
-0.14405766129493713,
0.05835612863302231,
-0.06782995909452438,
-0.16678789258003235,
0.049927953630685806,
0.058178529143333435,
-0.07104302197694778,
0.10198821127414703,
-0.040032315999269485,
0.07224373519420624,
-0.018286969512701035,
-0.05882402881979942,
-0.03206764906644821,
-0.027240179479122162,
0.16918829083442688,
-0.028688620775938034,
0.01782318763434887,
0.15892210602760315,
0.029073510318994522,
-0.058406852185726166,
0.005761257838457823,
-0.16848617792129517,
0.013057478703558445,
-0.06918302923440933,
0.15654128789901733,
0.007007019594311714,
0.00722500728443265,
0.23947025835514069,
-0.1502457857131958,
0.15574102103710175,
-0.1008203849196434,
-0.1264433115720749,
-0.017756929621100426,
-0.10772614181041718,
0.05498524382710457,
-0.05740411579608917,
0.02093694917857647,
0.0913793295621872,
-0.02189691737294197,
-0.07032462954521179,
0.028032921254634857,
0.16347472369670868,
0.0667538270354271,
-0.11861000955104828,
0.06566815078258514,
-0.1284179985523224,
-0.22173795104026794,
0.06445440649986267,
-0.17334651947021484,
-0.0753069743514061,
-0.1043756902217865,
0.17038019001483917,
-0.0838702917098999,
0.01617966592311859,
0.07693358510732651,
0.007879087701439857,
-0.048466362059116364,
0.080002062022686,
-0.10626523941755295,
-0.09315479546785355,
0.003666905453428626,
0.056956544518470764,
0.10891362279653549,
-0.009398036636412144,
-0.03799663856625557,
0.07686515897512436,
-0.03512630984187126,
-0.049029771238565445,
0.15492571890354156,
0.011195025406777859,
-0.15582658350467682,
0.11300256848335266,
-0.22686097025871277,
0.0009331456967629492,
-0.1149669736623764,
-0.07050415873527527,
-0.04327423498034477,
0.13285021483898163,
-0.15229356288909912,
-0.019492710009217262,
-0.06622720509767532,
0.007571418769657612,
0.05479050800204277,
-0.008783778175711632,
0.18223519623279572,
0.09029875695705414,
-0.18360301852226257,
0.13301508128643036,
-2.764443566417772e-32,
0.04405174031853676,
-0.008888564072549343,
-0.056685175746679306,
-0.020458092913031578,
-0.19236285984516144,
-0.120391845703125,
0.029060300439596176,
0.02010241709649563,
0.018693746998906136,
-0.020987575873732567,
-0.04885668307542801,
0.02464923821389675,
0.0979861170053482,
0.07454733550548553,
0.05368410050868988,
-0.04247758165001869,
0.14246639609336853,
0.11146336793899536,
-0.08909860253334045,
0.029798733070492744,
0.13823510706424713,
-0.017813699319958687,
0.06240970641374588,
-0.0537899024784565,
-0.24380239844322205,
-0.036419108510017395,
-0.039310023188591,
0.09225449711084366,
-0.042041223496198654,
-0.03969965875148773,
0.09752894937992096,
-0.007314124144613743,
-0.018894093111157417,
-0.02963695116341114,
-0.04488204047083855,
0.018906494602560997,
-0.3770105242729187,
0.039574842900037766,
-0.07046405971050262,
0.08178723603487015,
-0.02249269001185894,
0.21581268310546875,
0.03464098647236824,
-0.015423196367919445,
0.08384808897972107,
-0.22108039259910583,
0.03767956420779228,
0.13475191593170166,
-0.08415990322828293,
0.05229084938764572,
-0.17442277073860168,
0.011766578070819378,
-0.010962067171931267,
0.06179998815059662,
-0.058165036141872406,
0.12735004723072052,
-0.016915999352931976,
-0.009475886821746826,
-0.2513695955276489,
-0.08982456475496292,
0.011715574190020561,
-0.021628709509968758,
0.10479339957237244,
-0.03035888448357582,
0.1032666489481926,
0.1063658818602562,
0.08299604058265686,
-0.05676287040114403,
-0.01750347577035427,
0.08920206874608994,
0.02077212557196617,
0.06371801346540451,
0.10329265147447586,
0.006060014478862286,
0.008930986747145653,
-0.005639778915792704,
-0.0164443701505661,
0.11113519966602325,
-0.08241090923547745,
0.03493671491742134,
-0.07184197753667831,
-0.02142762392759323,
0.18240711092948914,
-0.008926520124077797,
0.006989941466599703,
0.19226372241973877,
0.010751857422292233,
0.057120583951473236,
0.0181045550853014,
0.026834478601813316,
-0.12732772529125214,
0.3866228461265564,
0.10303450375795364,
0.0972077026963234,
0.06474288552999496,
0.07004678249359131,
-0.03219893202185631,
0.16758131980895996,
-0.09771508723497391,
-0.09103232622146606,
0.19401909410953522,
-0.0016938992775976658,
0.05434180051088333,
0.04777131602168083,
0.15780435502529144,
0.0073334346525371075,
0.017544467002153397,
0.09184236079454422,
-0.19981606304645538,
-0.0321996845304966,
0.03461864963173866,
0.032121118158102036,
0.03873022645711899,
0.030051590874791145,
0.12641893327236176,
0.026218079030513763,
0.12766790390014648,
0.09324030578136444,
0.006335312966257334,
0.06731896847486496,
-0.0752599686384201,
0.09139256179332733,
0.1448737233877182,
0.06360837072134018,
-0.060338180512189865,
-0.08135753124952316,
-0.04564686492085457,
-0.11811061203479767,
0.1482054442167282,
-0.1691482663154602,
-0.0633111298084259,
-0.032817400991916656,
7.888667141742189e-7,
0.012403386645019054,
0.029364097863435745,
-0.010466213338077068,
-0.06077313423156738,
-0.19004479050636292,
0.09854625165462494,
0.054153043776750565,
0.012146783992648125,
0.057691480964422226,
0.12123388051986694,
0.04286212474107742,
-0.2320111095905304,
0.11379743367433548,
0.1458652764558792,
0.013523510657250881,
-0.1852940171957016,
-0.15626168251037598,
-0.0331026129424572,
-0.0397239588201046,
0.05682939663529396,
0.03697521612048149,
0.13072507083415985,
0.016892045736312866,
-0.04083999991416931,
0.10554927587509155,
0.01355034951120615,
-0.029073556885123253,
0.054780758917331696,
0.2354709953069687,
-0.04314538091421127,
-0.06789178401231766,
-0.024032047018408775,
0.1542239636182785,
-0.1254505068063736,
-0.2042880654335022,
-0.007548369467258453,
0.13579781353473663,
0.013742394745349884,
-0.05255758389830589,
0.062468625605106354,
-0.00990208238363266,
-0.0556035116314888,
0.013690211810171604,
-0.08775545656681061,
0.02013811282813549,
-0.19923081994056702,
-0.06768859922885895,
0.19087077677249908,
-0.18043334782123566,
0.12464630603790283,
0.008360068313777447,
0.02300560101866722,
0.0518302358686924,
0.29341113567352295,
0.08375998586416245,
0.1315704733133316,
0.02004263736307621,
-0.17294372618198395,
0.07188714295625687,
-0.12033072859048843,
-0.12753891944885254,
0.11872578412294388,
-0.056656405329704285,
0.011944775469601154,
0.08720193058252335,
0.047448668628931046,
-0.11988022178411484,
2.422116211773901e-34,
-0.0503215417265892,
0.021116245537996292,
0.06705295294523239,
0.017254581674933434,
-0.007573676761239767,
-0.04585578292608261,
0.12613192200660706,
0.07602602988481522,
-0.06645854562520981,
-0.17648175358772278,
-0.23583537340164185
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | > ```python
> from functools import partial
> from datasets import Dataset
>
> def gen_from_iterable_dataset(iterable_ds)
> yield from iterable_ds
>
> ds = Dataset.from_generator(partial(gen_from_iterable_dataset, iterable_ds), features=iterable_ds.features})
> ```
@mariosasko With these complex mapping functions, what hash will be used to cache this dataset?
| ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 44 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
> ```python
> from functools import partial
> from datasets import Dataset
>
> def gen_from_iterable_dataset(iterable_ds)
> yield from iterable_ds
>
> ds = Dataset.from_generator(partial(gen_from_iterable_dataset, iterable_ds), features=iterable_ds.features})
> ```
@mariosasko With these complex mapping functions, what hash will be used to cache this dataset?
| [
-0.07511769235134125,
0.051644355058670044,
-0.042787883430719376,
-0.14113749563694,
-0.08118866384029388,
0.12775297462940216,
0.09305016696453094,
-0.016741007566452026,
0.018080860376358032,
-0.08637569099664688,
0.019832611083984375,
0.052428171038627625,
-0.038880523294210434,
0.13279050588607788,
-0.012140355072915554,
-0.18134602904319763,
0.05040073022246361,
0.09605671465396881,
-0.27719646692276,
-0.008190789259970188,
-0.13505221903324127,
0.02741575613617897,
0.14234422147274017,
-0.10851266980171204,
-0.05802661180496216,
0.03922484815120697,
-0.09507790952920914,
0.03887133300304413,
0.03987479209899902,
0.04942375794053078,
-0.06349897384643555,
0.09931395202875137,
-0.1302485466003418,
-0.05602709949016571,
0.000006058495273464359,
0.11090824007987976,
0.07619385421276093,
0.06040250137448311,
0.12250925600528717,
-0.07004343718290329,
-0.010383669286966324,
-0.11929995566606522,
0.030351068824529648,
-0.008319658227264881,
-0.1967376470565796,
-0.030788108706474304,
0.12818114459514618,
-0.169363871216774,
0.14886178076267242,
-0.06606567651033401,
-0.07915333658456802,
-0.25649774074554443,
-0.15766097605228424,
-0.013047433458268642,
0.03704013675451279,
-0.017840323969721794,
-0.013622786849737167,
-0.0151425302028656,
-0.26530420780181885,
-0.07001261413097382,
0.009594257920980453,
0.026765719056129456,
0.02788676507771015,
-0.06835973262786865,
0.21149320900440216,
-0.03792796656489372,
-0.08289317786693573,
-0.1799827665090561,
0.05787443742156029,
0.0010170625755563378,
-0.10379239171743393,
-0.050994306802749634,
0.027955394238233566,
0.10013188421726227,
-0.11685595661401749,
-0.003678681794553995,
-0.09752042591571808,
-0.019983870908617973,
0.10328777134418488,
0.006078519858419895,
-0.22674086689949036,
0.018456973135471344,
0.08841291815042496,
-0.06016375496983528,
-0.1634349524974823,
-0.19146551191806793,
0.08206961303949356,
0.1121019721031189,
-0.16327625513076782,
0.012159389443695545,
0.061866458505392075,
-0.08466056734323502,
-0.09757736325263977,
0.10785409063100815,
-0.097514308989048,
-0.04818244278430939,
-0.040967971086502075,
-0.06503493338823318,
0.11108696460723877,
-0.06579051911830902,
0.0794857069849968,
0.040033627301454544,
-0.07276643067598343,
0.04760744795203209,
-0.11375594884157181,
-0.09627289324998856,
-0.1465177834033966,
-0.03490353003144264,
-0.04838816449046135,
-0.12994886934757233,
-0.0910232663154602,
0.0031806526239961386,
0.0630156546831131,
-0.0021389725152403116,
0.2470090687274933,
-0.044291481375694275,
-0.011089198291301727,
0.13452641665935516,
0.03519945964217186,
0.0799260139465332,
0.06565757840871811,
0.024419715628027916,
-0.02363712526857853,
0.055276405066251755,
0.07717715948820114,
0.16009439527988434,
-0.00922973919659853,
-0.07726877182722092,
0.07507138699293137,
0.05725409835577011,
-0.10371217131614685,
0.024167194962501526,
0.09780816733837128,
0.01429473701864481,
0.09340039640665054,
0.08325204998254776,
-0.07209353148937225,
-0.001930517377331853,
0.03157821670174599,
0.025895634666085243,
0.22661219537258148,
-0.03216104209423065,
0.03013569861650467,
-0.1026039868593216,
0.03786340728402138,
0.01352580077946186,
0.06449365615844727,
0.13134868443012238,
-0.12763845920562744,
0.17044228315353394,
-0.13387392461299896,
0.0741703137755394,
0.036330293864011765,
0.03190809488296509,
-0.07516839355230331,
0.07429662346839905,
0.10355408489704132,
-0.019323749467730522,
-0.12532377243041992,
-0.036914724856615067,
0.044538721442222595,
-0.2106456160545349,
-0.14605407416820526,
-0.1270962506532669,
-0.044994428753852844,
-0.01723017916083336,
0.1932680755853653,
0.031934261322021484,
-0.008946152403950691,
-0.07466040551662445,
-0.19378794729709625,
0.020838452503085136,
-0.015936490148305893,
0.002327964873984456,
0.02837674878537655,
0.11607715487480164,
0.06966439634561539,
0.13368235528469086,
-0.07781478762626648,
0.027495309710502625,
-0.024003658443689346,
-0.014842676930129528,
-0.010809189639985561,
0.08414037525653839,
0.13498015701770782,
-0.08342152088880539,
-0.060426849871873856,
0.08773471415042877,
-0.137180894613266,
-0.03336217999458313,
-0.047381699085235596,
0.10190629959106445,
0.03285171836614609,
-0.03305330500006676,
0.018965773284435272,
0.07435102760791779,
-0.0007718725828453898,
0.1286526620388031,
-0.06033334881067276,
-0.07708346843719482,
-0.04163675755262375,
0.0009977859444916248,
-0.15839163959026337,
-0.08311068266630173,
-0.03764502331614494,
0.04750367999076843,
-0.2058587372303009,
0.032083600759506226,
0.09236977994441986,
-0.05117466300725937,
-0.04421691223978996,
0.05076256021857262,
0.10850802809000015,
0.051589593291282654,
-0.10347554087638855,
0.1951967030763626,
-0.04583832621574402,
-0.0393318235874176,
-0.05065976455807686,
-0.05504731088876724,
0.0743170902132988,
0.050069086253643036,
0.11079756915569305,
-0.06454408913850784,
-0.05426842346787453,
0.10911720246076584,
0.20222806930541992,
0.07194354385137558,
0.0210652444511652,
-0.06743893027305603,
0.041179075837135315,
0.013959250412881374,
0.2340889275074005,
-0.10066292434930801,
-0.1277913749217987,
0.011331841349601746,
0.005405398551374674,
0.18538406491279602,
0.04517972096800804,
-0.11386087536811829,
0.03050488792359829,
0.0003758844977710396,
-0.07353919744491577,
-0.07462745159864426,
0.0031219245865941048,
-0.0672750324010849,
-0.17170341312885284,
0.0138534652069211,
0.011839590966701508,
-0.06888080388307571,
0.05390018969774246,
-0.05410604551434517,
-0.007221000734716654,
-0.01345282793045044,
-0.09845905005931854,
-0.09008365124464035,
0.00020301113545428962,
0.1334633082151413,
0.19818566739559174,
0.09650220721960068,
0.10756712406873703,
-0.06802854686975479,
-0.1236773431301117,
-0.05462568998336792,
0.0809171050786972,
-0.03344789147377014,
-0.17602857947349548,
0.1999139040708542,
-0.02059870772063732,
-0.010691323317587376,
0.1910487413406372,
0.13549238443374634,
0.1390424370765686,
0.13903672993183136,
0.01091643888503313,
-0.17814843356609344,
0.1017991304397583,
0.059352487325668335,
0.0790654718875885,
-0.008845250122249126,
0.015713104978203773,
-0.019927196204662323,
0.21484173834323883,
-0.06767482310533524,
0.09742889553308487,
0.08563551306724548,
-0.018207840621471405,
0.04849798604846001,
-0.10073716938495636,
-0.1991814225912094,
0.09973468631505966,
-0.13647331297397614,
0.015226169489324093,
-0.07082952558994293,
0.014715956524014473,
0.0195809043943882,
-0.08885595947504044,
-0.08443580567836761,
0.04571257531642914,
-0.14083325862884521,
-0.0037656440399587154,
-0.007088119629770517,
0.055302590131759644,
-0.06102742254734039,
-0.15291082859039307,
-0.08951665461063385,
0.029113618656992912,
0.028394661843776703,
-0.08484063297510147,
-0.19840547442436218,
-0.09610451757907867,
-0.031580839306116104,
-0.06539619714021683,
-0.12070148438215256,
0.06401632726192474,
-0.0384131483733654,
-0.00779366958886385,
-0.19509229063987732,
0.03439300134778023,
-0.009371664375066757,
0.056210316717624664,
-0.07621752470731735,
-0.03615369647741318,
-0.017545059323310852,
0.07264336943626404,
0.02834533527493477,
-0.005919905845075846,
-0.01251739077270031,
0.0687028244137764,
0.039786938577890396,
0.040894657373428345,
-0.012064262293279171,
0.03277350217103958,
-0.0477861724793911,
0.17219361662864685,
-0.03888460993766785,
-0.10402488708496094,
-0.16748179495334625,
0.11102686077356339,
0.0723971575498581,
-0.02417825348675251,
-0.03693436086177826,
-0.15344993770122528,
-0.05847620964050293,
0.22391299903392792,
0.04300716519355774,
0.15029212832450867,
-0.15783309936523438,
0.06290119886398315,
-0.011439505964517593,
-0.16456849873065948,
0.1304842084646225,
0.0746748223900795,
-0.06999514997005463,
0.009091171436011791,
-0.04512716457247734,
-0.046055641025304794,
0.12249919027090073,
-0.020838739350438118,
0.15479819476604462,
0.0718318521976471,
0.20180915296077728,
0.12289393693208694,
0.013462292030453682,
-0.03759663179516792,
-0.00808005966246128,
0.11516144871711731,
-0.028739288449287415,
0.02421228401362896,
-0.06551261991262436,
-0.15793223679065704,
-0.0063560474663972855,
-0.07540828734636307,
-0.005680179223418236,
-0.06064566597342491,
-0.25930169224739075,
0.12994717061519623,
-0.15220680832862854,
0.09652738273143768,
0.023355232551693916,
0.19717496633529663,
-0.3299889862537384,
0.00467101251706481,
0.01494775153696537,
0.04784455895423889,
-0.19106659293174744,
-0.022913768887519836,
0.052950069308280945,
-0.15401040017604828,
0.12138038128614426,
0.013241847045719624,
0.05141060799360275,
0.04567775875329971,
-0.0869622603058815,
0.024038903415203094,
0.05066661536693573,
-0.18547125160694122,
-0.10571357607841492,
-0.08951617777347565,
-0.10268635302782059,
0.037463173270225525,
0.19945544004440308,
-0.023471450433135033,
0.016638319939374924,
-0.021209504455327988,
-0.22766824066638947,
0.09973708540201187,
0.12586405873298645,
0.16450555622577667,
0.0958854928612709,
0.13595975935459137,
0.130218505859375,
-0.07717492431402206,
-0.12898553907871246,
-0.02328519895672798,
-0.06154263764619827,
-0.027324486523866653,
0.007972987368702888,
0.14391367137432098,
-0.09198130667209625,
-0.009039925411343575,
-0.17843976616859436,
0.0631483867764473,
-0.005135098472237587,
0.17775315046310425,
-0.010554347187280655,
0.0002475158835295588,
0.0337996669113636,
0.12008355557918549,
0.003801525104790926,
0.12652869522571564,
0.12241028994321823,
0.20111702382564545,
0.06913994997739792,
-0.03495865687727928,
-0.3125399947166443,
0.1646556854248047,
-0.1356523036956787,
-0.031149109825491905,
-0.09576352685689926,
-0.015138326212763786,
-0.031583961099386215,
0.2060093879699707,
0.052180565893650055,
-0.10413321107625961,
0.15933997929096222,
-0.08893200010061264,
-0.0479225292801857,
-0.03285922855138779,
0.0044332887046039104,
-0.02640535496175289,
-0.04309817776083946,
-0.10971642285585403,
-0.01000748947262764,
0.12749910354614258,
-0.048520248383283615,
0.07540321350097656,
-0.23382622003555298,
-0.11975575983524323,
0.24534817039966583,
0.18112118542194366,
-0.010171621106564999,
0.043323200196027756,
0.04057079926133156,
-0.007579592987895012,
0.12461020052433014,
0.20124533772468567,
-0.09103794395923615,
0.04728677123785019,
-0.10772496461868286,
-0.25239861011505127,
0.05736739560961723,
0.07976974546909332,
0.00004959603393217549,
0.10287276655435562,
0.0705467164516449,
0.042897388339042664,
-0.03583601489663124,
0.01974179595708847,
0.01518298964947462,
-0.015430965460836887,
0.12928643822669983,
-0.016694530844688416,
0.06436854600906372,
0.17390890419483185,
0.1440429389476776,
-0.07674654573202133,
-0.016722911968827248,
-0.18179820477962494,
-0.04043927416205406,
-0.01705915294587612,
0.07595301419496536,
0.0125120235607028,
0.07520319521427155,
0.1894146353006363,
-0.05338788405060768,
0.0613241083920002,
-0.07071921229362488,
-0.16310180723667145,
0.012546899728477001,
-0.15901553630828857,
0.04917372763156891,
-0.018853314220905304,
0.030243931338191032,
0.06116139516234398,
-0.008048132061958313,
-0.04735517501831055,
-0.09673883020877838,
0.17151497304439545,
0.03333764895796776,
-0.07176554203033447,
0.10314501076936722,
-0.11436658352613449,
-0.19075529277324677,
0.026528511196374893,
-0.23945321142673492,
-0.0351252444088459,
-0.12397579848766327,
0.15994925796985626,
-0.08857585489749908,
0.05254020914435387,
0.05082448571920395,
0.022993942722678185,
-0.033577870577573776,
0.032786525785923004,
-0.13928353786468506,
-0.06638561189174652,
0.0358210988342762,
0.04594038054347038,
0.14624127745628357,
0.009158546105027199,
0.02318955771625042,
0.07917872071266174,
-0.03036545030772686,
-0.05976591259241104,
0.056589189916849136,
0.015751216560602188,
-0.06118813902139664,
0.05592917650938034,
-0.1926513910293579,
-0.009821657091379166,
-0.10395833104848862,
-0.1361711174249649,
-0.042537469416856766,
0.16309641301631927,
-0.11245281994342804,
-0.01972041465342045,
-0.056815117597579956,
0.015465487726032734,
-0.0169244222342968,
0.0262768417596817,
0.1902841329574585,
-0.011320671066641808,
-0.09537332504987717,
0.09035409986972809,
-2.790205112863218e-32,
0.04030796140432358,
-0.02033655345439911,
-0.09409128874540329,
-0.04453714191913605,
-0.16544626653194427,
-0.06268185377120972,
-0.014695990830659866,
0.0036314723547548056,
0.0017655391711741686,
-0.10769734531641006,
-0.05854572728276253,
0.047594908624887466,
0.09603216499090195,
0.07451330870389938,
0.0065161618404090405,
-0.02167452871799469,
0.12467999011278152,
0.09889920055866241,
-0.06948178261518478,
0.015225411392748356,
0.19675356149673462,
-0.06702335178852081,
0.08938269317150116,
-0.0497257374227047,
-0.22434283792972565,
-0.06093832850456238,
-0.04600413516163826,
0.039308346807956696,
-0.10649819672107697,
-0.0944402739405632,
0.04936691373586655,
0.017367910593748093,
-0.037108007818460464,
-0.054342325776815414,
-0.05540649965405464,
0.011424547992646694,
-0.3613780736923218,
0.05659442022442818,
-0.012743803672492504,
0.13372179865837097,
0.02660388872027397,
0.09002262353897095,
0.035613540560007095,
-0.018566209822893143,
0.004651830531656742,
-0.15266238152980804,
-0.06760675460100174,
0.0849647969007492,
-0.10780014097690582,
0.00010726437176344916,
-0.14211136102676392,
0.02894492819905281,
-0.018590547144412994,
0.09001462906599045,
-0.08436481654644012,
0.05168358236551285,
-0.005219081416726112,
0.05772273987531662,
-0.21287322044372559,
-0.06862746179103851,
-0.0058294618502259254,
0.024710802361369133,
0.0867898166179657,
0.021009674295783043,
0.17555838823318481,
0.05647529661655426,
0.17915651202201843,
-0.035170409828424454,
-0.00037137235631234944,
0.11684539914131165,
-0.035517387092113495,
-0.005172861739993095,
0.06050851568579674,
-0.01759376935660839,
0.06513296812772751,
0.019155021756887436,
-0.04057544469833374,
0.0885491669178009,
-0.0856769010424614,
0.15240038931369781,
-0.06407561898231506,
-0.00442750658839941,
0.15485090017318726,
0.036129314452409744,
-0.026478596031665802,
0.17743507027626038,
0.011872661300003529,
0.024587927386164665,
-0.019852755591273308,
0.0479782335460186,
-0.16187717020511627,
0.46469318866729736,
0.06833308935165405,
0.08326900005340576,
0.08818385004997253,
0.10808936506509781,
0.016561822965741158,
0.13195137679576874,
-0.11399184167385101,
-0.07592032104730606,
0.15117329359054565,
-0.06892899423837662,
0.01620461232960224,
-0.013687637634575367,
0.10317257046699524,
-0.0007428113603964448,
0.008668276481330395,
0.08966577053070068,
-0.10320166498422623,
0.002102773869410157,
-0.002406428335234523,
-0.010432902723550797,
-0.05315770208835602,
-0.014369165524840355,
0.13749778270721436,
0.034174829721450806,
0.12265381217002869,
0.04396563395857811,
-0.007969658821821213,
0.09642641246318817,
0.05022912099957466,
0.06280351430177689,
0.143914595246315,
0.09829551726579666,
-0.01173347420990467,
-0.025856370106339455,
-0.07751259952783585,
-0.24717052280902863,
0.1757538765668869,
-0.08688321709632874,
0.0027333467733114958,
0.032373588532209396,
7.979535325830511e-7,
0.020884428173303604,
0.04214946925640106,
-0.029317546635866165,
-0.01778429001569748,
-0.15968914330005646,
0.07903533428907394,
0.09402216970920563,
0.051248446106910706,
-0.029976069927215576,
0.19066308438777924,
0.03540849685668945,
-0.17334356904029846,
0.09762131422758102,
0.06710122525691986,
0.038417600095272064,
-0.11248178780078888,
-0.1318594068288803,
-0.0503542497754097,
0.008049379102885723,
0.07858802378177643,
-0.022813471034169197,
0.13002628087997437,
-0.011832594871520996,
-0.01594921015202999,
0.0855303406715393,
0.039046745747327805,
-0.0020249260123819113,
0.026827998459339142,
0.14216023683547974,
-0.03926653414964676,
-0.11092327535152435,
-0.03248264640569687,
0.18033663928508759,
-0.13512574136257172,
-0.16979533433914185,
0.010794034227728844,
0.09387722611427307,
0.024901337921619415,
-0.03560687229037285,
0.025682682171463966,
-0.04850419610738754,
-0.06715358793735504,
-0.02202719822525978,
0.0172031968832016,
0.08177493512630463,
-0.10109215974807739,
-0.09127140790224075,
0.13495182991027832,
-0.1922210305929184,
0.09821496158838272,
-0.030965030193328857,
0.13706254959106445,
0.04095599427819252,
0.32568877935409546,
0.0602065734565258,
0.03761313110589981,
0.06500516086816788,
-0.13086844980716705,
0.024990977719426155,
-0.10319767892360687,
-0.16590997576713562,
0.130100816488266,
-0.06470286846160889,
0.05527392029762268,
0.06152311712503433,
0.0715467631816864,
-0.17907172441482544,
2.4669861168417337e-34,
-0.053316518664360046,
0.027379149571061134,
0.038855161517858505,
0.025987757369875908,
-0.06777175515890121,
-0.10389671474695206,
0.024362415075302124,
0.024434175342321396,
-0.09040287882089615,
-0.24163947999477386,
-0.23734039068222046
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | The params passed to `Dataset.from_generator` will be used to compute the hash (`partial` encapsulates the `iterable_ds` value, so changing it will also change the hash) | ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 25 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
The params passed to `Dataset.from_generator` will be used to compute the hash (`partial` encapsulates the `iterable_ds` value, so changing it will also change the hash) | [
-0.18020664155483246,
0.05747051164507866,
-0.08117455989122391,
-0.15144112706184387,
-0.059746984392404556,
0.08348698914051056,
0.12636452913284302,
-0.02366773970425129,
-0.03618738427758217,
-0.08774612843990326,
0.014921366237103939,
0.18293265998363495,
-0.06924169510602951,
0.2261125147342682,
-0.011096825823187828,
-0.25036972761154175,
0.08094077557325363,
0.07571238279342651,
-0.2736000418663025,
-0.03701680153608322,
-0.13284961879253387,
0.013312202878296375,
0.09362711757421494,
-0.11677031964063644,
-0.025418682023882866,
0.04878028482198715,
-0.13843666017055511,
0.02832956612110138,
0.056119155138731,
0.021497948095202446,
-0.06671474874019623,
0.12321927398443222,
-0.08398742973804474,
-0.08517003804445267,
0.000005946043529547751,
0.08620241284370422,
0.1239229068160057,
0.05798421800136566,
0.1274196207523346,
-0.0685594230890274,
-0.07522732764482498,
-0.14402078092098236,
0.04884127527475357,
-0.019368615001440048,
-0.21031519770622253,
-0.030459513887763023,
0.13008645176887512,
-0.1366480588912964,
0.1388748288154602,
-0.04463742673397064,
-0.0781078040599823,
-0.19444099068641663,
-0.14049385488033295,
-0.09083115309476852,
0.08563266694545746,
0.018788088113069534,
0.014471440576016903,
0.0020614489912986755,
-0.23516111075878143,
-0.015479658730328083,
-0.04505952447652817,
0.04387027025222778,
0.008067291229963303,
-0.07466134428977966,
0.2030271291732788,
-0.060111209750175476,
-0.11886170506477356,
-0.15268097817897797,
0.05054309591650963,
0.019763797521591187,
-0.10552550852298737,
-0.0420396625995636,
0.02225055918097496,
0.06666024029254913,
-0.08921157568693161,
-0.02712426520884037,
-0.1130194291472435,
-0.02361958660185337,
0.09948393702507019,
0.010859617963433266,
-0.18708224594593048,
0.05320256948471069,
0.0926513820886612,
-0.04669100418686867,
-0.16241784393787384,
-0.14910753071308136,
0.11028725653886795,
0.11628095805644989,
-0.13718940317630768,
0.013601460494101048,
0.09594730287790298,
-0.05611858144402504,
-0.11221791803836823,
0.1033361405134201,
-0.09800798445940018,
-0.06976374983787537,
-0.04073605686426163,
-0.10979535430669785,
0.1514405757188797,
-0.02162627875804901,
0.06919656693935394,
0.023755013942718506,
-0.1367114931344986,
0.02328859083354473,
-0.08098314702510834,
-0.13994772732257843,
-0.1561863124370575,
0.033554960042238235,
0.010067775845527649,
-0.11901318281888962,
-0.04639950394630432,
0.021788544952869415,
0.03077992983162403,
-0.06058145686984062,
0.1726774424314499,
-0.03757375106215477,
0.008935170248150826,
0.15460550785064697,
0.028067871928215027,
0.03879674896597862,
0.07385410368442535,
0.02717760019004345,
-0.04443557560443878,
0.056127212941646576,
0.06481491029262543,
0.16090434789657593,
0.003898120718076825,
-0.04272739961743355,
0.06353156268596649,
0.10303150862455368,
-0.07597807049751282,
0.05317190662026405,
0.09542953968048096,
-0.00338917737826705,
0.10756999254226685,
0.06511645764112473,
-0.07145198434591293,
0.019488221034407616,
0.03666218742728233,
0.025244107469916344,
0.22034507989883423,
0.018613705411553383,
-0.010568050667643547,
-0.14288313686847687,
0.03537849709391594,
-0.00018351397011429071,
0.05995845049619675,
0.10416310280561447,
-0.1687510907649994,
0.1611325591802597,
-0.16010399162769318,
0.13943733274936676,
-0.0849987044930458,
0.03678864985704422,
-0.0797058716416359,
0.05305447056889534,
-0.006210945080965757,
-0.013495227321982384,
-0.16455937922000885,
-0.05141769349575043,
0.08333977311849594,
-0.2005184441804886,
-0.13548120856285095,
-0.10747364163398743,
-0.024768438190221786,
-0.031204577535390854,
0.11366168409585953,
-0.03172631934285164,
-0.06593312323093414,
-0.10368921607732773,
-0.19762283563613892,
0.014236748218536377,
-0.009523528628051281,
0.020899562165141106,
0.03874814510345459,
0.11819175630807877,
0.05716423690319061,
0.20715846121311188,
-0.03230731189250946,
0.021329177543520927,
-0.048934776335954666,
-0.06729623675346375,
-0.06701986491680145,
0.10309535264968872,
0.11456239223480225,
-0.033125702291727066,
-0.10623083263635635,
0.1002679094672203,
-0.15653684735298157,
-0.06246372312307358,
-0.019748179242014885,
0.10905300825834274,
-0.018960122019052505,
-0.03261983022093773,
0.031567592173814774,
0.1299067735671997,
0.004079252481460571,
0.12587876617908478,
-0.0198704544454813,
-0.09771166741847992,
-0.035367418080568314,
-0.007928133010864258,
-0.1655603051185608,
-0.15101350843906403,
-0.012366220355033875,
-0.016819285228848457,
-0.19000829756259918,
0.008189382962882519,
0.11021271347999573,
-0.015781177207827568,
0.005471744108945131,
0.052606116980314255,
0.1319916695356369,
0.05573838949203491,
-0.07636147737503052,
0.22331318259239197,
-0.027317019179463387,
-0.02451149746775627,
-0.09122229367494583,
-0.0011951582273468375,
0.03303408995270729,
-0.05943207070231438,
0.08862000703811646,
-0.062162965536117554,
-0.0658552423119545,
0.1333923041820526,
0.20054414868354797,
0.07137484103441238,
0.03743330389261246,
-0.05050560086965561,
0.0402391143143177,
0.009396804496645927,
0.26131096482276917,
-0.1051633283495903,
-0.112916499376297,
0.029943162575364113,
0.03962494432926178,
0.14290302991867065,
0.07107509672641754,
-0.1785411685705185,
-0.02539762668311596,
0.04352867230772972,
-0.09414634853601456,
-0.027212124317884445,
0.03018530085682869,
-0.056552156805992126,
-0.2509631812572479,
0.006705676205456257,
0.03929459676146507,
-0.060955923050642014,
0.054694950580596924,
-0.04775967076420784,
-0.039379626512527466,
-0.002396597061306238,
-0.07960168272256851,
-0.07976806163787842,
-0.04300735145807266,
0.09576345235109329,
0.18345177173614502,
0.10565464198589325,
0.08888456970453262,
-0.1432163268327713,
-0.15875719487667084,
-0.04246522858738899,
0.1037042960524559,
-0.008051973767578602,
-0.12819981575012207,
0.20372670888900757,
-0.053437698632478714,
0.013534707948565483,
0.182969331741333,
0.12083783745765686,
0.18539196252822876,
0.12282540649175644,
0.011957447975873947,
-0.20943276584148407,
0.11541971564292908,
0.11483174562454224,
0.047967955470085144,
0.014832788147032261,
-0.015816684812307358,
-0.03513099253177643,
0.18734988570213318,
-0.06377707421779633,
0.03948346897959709,
0.03139772266149521,
-0.030070308595895767,
0.03975795581936836,
-0.10063905268907547,
-0.1714887022972107,
0.09918003529310226,
-0.09895322471857071,
-0.004385287873446941,
-0.06062303110957146,
0.025658903643488884,
-0.012362552806735039,
-0.09641901403665543,
-0.012472453527152538,
0.07356838136911392,
-0.11725068837404251,
-0.05988086014986038,
-0.003365815617144108,
0.047151606529951096,
-0.03683466464281082,
-0.16568408906459808,
-0.09093087166547775,
0.0012202016077935696,
0.03725261986255646,
-0.050219204276800156,
-0.17499543726444244,
-0.10549819469451904,
-0.0022237503435462713,
-0.05425255000591278,
-0.13208815455436707,
0.06135919690132141,
-0.07513430714607239,
-0.009960230439901352,
-0.17477190494537354,
0.008967631496489048,
0.018572039902210236,
0.0605890117585659,
-0.09419680386781693,
-0.011069122701883316,
0.030908364802598953,
0.053201623260974884,
0.03967674821615219,
-0.048718154430389404,
-0.01029239036142826,
0.0993364229798317,
0.011276034638285637,
0.06563238799571991,
-0.038046546280384064,
0.05158798024058342,
-0.02833288535475731,
0.1555064618587494,
-0.038851361721754074,
-0.07422146201133728,
-0.10226637870073318,
0.09841014444828033,
0.03457978740334511,
-0.038179147988557816,
-0.07365413755178452,
-0.15786361694335938,
-0.07391244918107986,
0.21750520169734955,
0.06534475088119507,
0.14155204594135284,
-0.14781366288661957,
0.02674451842904091,
-0.037267375737428665,
-0.17108434438705444,
0.13023829460144043,
0.09015875309705734,
-0.07837466895580292,
-0.011064752005040646,
-0.05704342946410179,
-0.0070158326998353004,
0.10050921887159348,
-0.08920247852802277,
0.1391097754240036,
0.12247518450021744,
0.1859104484319687,
0.10037395358085632,
-0.004492476582527161,
-0.05503693222999573,
-0.01696988195180893,
0.09056024998426437,
-0.025504516437649727,
0.06772763282060623,
-0.10642964392900467,
-0.12334128469228745,
0.07457803934812546,
-0.052044130861759186,
-0.0020077205263078213,
-0.06526758521795273,
-0.26403671503067017,
0.1813773512840271,
-0.21400333940982819,
0.12495269626379013,
0.053791534155607224,
0.2085859477519989,
-0.3272098898887634,
0.01887437514960766,
0.01652967743575573,
0.0699533149600029,
-0.13820990920066833,
-0.04894987866282463,
0.05892609432339668,
-0.16837625205516815,
0.1338971108198166,
-0.01595442183315754,
0.011806047521531582,
-0.020834991708397865,
-0.11071610450744629,
0.03674709051847458,
0.05604396015405655,
-0.19499078392982483,
-0.07623802125453949,
-0.10983196645975113,
-0.12627971172332764,
0.06846733391284943,
0.1903476119041443,
-0.03571997582912445,
0.02249845117330551,
-0.04918888211250305,
-0.17912720143795013,
0.07893399894237518,
0.155581995844841,
0.14011703431606293,
0.024997005239129066,
0.14940306544303894,
0.134153351187706,
-0.11626233905553818,
-0.11485718190670013,
0.05715283378958702,
-0.09393159300088882,
-0.038264188915491104,
-0.016789061948657036,
0.17141681909561157,
-0.12388163805007935,
-0.01728888973593712,
-0.1407831758260727,
0.0647517591714859,
0.00952228344976902,
0.16746270656585693,
-0.07475874572992325,
0.014366830699145794,
0.06484659016132355,
0.11078189313411713,
-0.0051903254352509975,
0.1366230845451355,
0.13368777930736542,
0.18690767884254456,
0.06426669657230377,
-0.051613468676805496,
-0.23048420250415802,
0.1503363698720932,
-0.17615976929664612,
-0.030976302921772003,
-0.09439314156770706,
-0.0481744259595871,
0.019283734261989594,
0.23396584391593933,
0.018156686797738075,
-0.11094419658184052,
0.11214612424373627,
-0.07679374516010284,
-0.09049543738365173,
-0.020362241193652153,
0.007666495628654957,
-0.013398675248026848,
-0.07476169615983963,
-0.07672489434480667,
0.01640256680548191,
0.12421327084302902,
-0.03554205223917961,
0.04973315820097923,
-0.1885509490966797,
-0.11940845102071762,
0.2632693648338318,
0.18312539160251617,
0.01068146526813507,
0.07312462478876114,
-0.009702072478830814,
0.0413520410656929,
0.10664781928062439,
0.23702649772167206,
-0.07147785276174545,
0.015495514497160912,
-0.06294292211532593,
-0.23742857575416565,
0.0544402040541172,
0.0726446881890297,
-0.026454199105501175,
0.1637606918811798,
0.029204195365309715,
0.05943514406681061,
-0.05441441014409065,
-0.05833642929792404,
0.012331198900938034,
0.0670926421880722,
0.1723252683877945,
-0.008171874098479748,
0.08675407618284225,
0.12799501419067383,
0.11737953871488571,
-0.0998186245560646,
0.0025345811154693365,
-0.18351854383945465,
-0.0042805140838027,
-0.0088502811267972,
0.11849178373813629,
0.023966675624251366,
0.08132453262805939,
0.18919390439987183,
-0.03825131803750992,
0.0508977435529232,
-0.057229455560445786,
-0.12083468586206436,
0.03351253271102905,
-0.14658522605895996,
0.04512765631079674,
-0.02447875775396824,
0.012247869744896889,
0.046870529651641846,
0.005368963349610567,
-0.0630313977599144,
-0.04988595098257065,
0.1918175220489502,
0.04225090891122818,
-0.11626911163330078,
0.10190355032682419,
-0.11725014448165894,
-0.2132410854101181,
0.00859513133764267,
-0.21123965084552765,
-0.06511151045560837,
-0.07726621627807617,
0.17795808613300323,
-0.08260762691497803,
0.056456174701452255,
0.06913810223340988,
0.0013839516323059797,
-0.05306006968021393,
0.01503536757081747,
-0.0832977220416069,
-0.06410872936248779,
0.04881245642900467,
0.05808492749929428,
0.13163232803344727,
-0.0033313632011413574,
0.010423140600323677,
0.0945759043097496,
-0.04211156815290451,
-0.05648668855428696,
0.06960117816925049,
0.04604283347725868,
-0.09008026123046875,
0.0511530376970768,
-0.19359782338142395,
0.020598923787474632,
-0.10473381727933884,
-0.09178284555673599,
-0.036966968327760696,
0.18160632252693176,
-0.11774632334709167,
-0.020345643162727356,
-0.06442444026470184,
0.0018059996655210853,
0.005562143865972757,
0.009789077565073967,
0.13371290266513824,
0.014348994009196758,
-0.14809143543243408,
0.1018470749258995,
-2.7742865683643824e-32,
0.04541247710585594,
0.004858872853219509,
-0.10809197276830673,
-0.04741515964269638,
-0.19383515417575836,
-0.11043783277273178,
-0.03435758873820305,
0.016264935955405235,
0.033318087458610535,
-0.05750715360045433,
-0.05435312166810036,
0.034327395260334015,
0.11724122613668442,
0.06080476939678192,
0.0589425154030323,
-0.02693908102810383,
0.14973068237304688,
0.12462103366851807,
-0.07479077577590942,
0.00815292913466692,
0.13257244229316711,
-0.0484028123319149,
0.08391720801591873,
-0.05666869133710861,
-0.20762158930301666,
-0.022329440340399742,
-0.08489344269037247,
0.041302669793367386,
-0.04612816125154495,
-0.060600362718105316,
0.07659528404474258,
0.002634169766679406,
-0.0264362134039402,
-0.005049869418144226,
-0.047790464013814926,
0.0008627836359664798,
-0.4126877188682556,
0.03069857880473137,
-0.02760884165763855,
0.08012647926807404,
0.017414163798093796,
0.17580623924732208,
0.004889933858066797,
-0.04785264655947685,
0.05971190705895424,
-0.15102341771125793,
-0.016514215618371964,
0.10589081048965454,
-0.103064626455307,
-0.025829056277871132,
-0.11525806784629822,
0.03616206720471382,
-0.01852313056588173,
0.05223694071173668,
-0.10498811304569244,
0.08254717290401459,
0.02498839795589447,
-0.027876492589712143,
-0.20313598215579987,
-0.045530375093221664,
0.02957340143620968,
0.022573955357074738,
0.08973617106676102,
0.012232025153934956,
0.10032404214143753,
0.08813735097646713,
0.13362754881381989,
-0.0647655725479126,
0.03185836225748062,
0.12229488790035248,
-0.0034318396355956793,
0.06068712845444679,
0.06366099417209625,
0.0026445803232491016,
0.03976358845829964,
0.010195254348218441,
-0.03437280282378197,
0.15326833724975586,
-0.07083176076412201,
0.10426490753889084,
-0.06254048645496368,
-0.010189894586801529,
0.13779650628566742,
0.02016855590045452,
-0.024787375703454018,
0.14870302379131317,
-0.0016028361860662699,
-0.008907767944037914,
0.03340288624167442,
0.017516596242785454,
-0.19079388678073883,
0.43724706768989563,
0.05702575296163559,
0.06280481070280075,
0.06914836913347244,
0.10396447777748108,
-0.026223428547382355,
0.12083099037408829,
-0.11650370806455612,
-0.08580905944108963,
0.17579367756843567,
-0.0683036670088768,
0.029924534261226654,
0.02502431906759739,
0.12475002557039261,
0.007634792011231184,
-0.0006883472087793052,
0.08316575735807419,
-0.15208569169044495,
-0.012870173901319504,
0.033649906516075134,
0.008255432359874249,
-0.026339028030633926,
0.02949797548353672,
0.1685473769903183,
-0.012192809022963047,
0.13566213846206665,
0.020883413031697273,
0.014893093146383762,
0.08886761218309402,
0.018555087968707085,
0.12319246679544449,
0.1326405555009842,
0.10252202302217484,
-0.043157998472452164,
-0.06407681107521057,
-0.07331137359142303,
-0.26526638865470886,
0.21329331398010254,
-0.12910355627536774,
-0.004276201594620943,
-0.012328529730439186,
7.914199500191899e-7,
0.030554743483662605,
0.017886649817228317,
-0.018367230892181396,
0.019500017166137695,
-0.16362114250659943,
0.08669335395097733,
0.1097923144698143,
0.05893338471651077,
-0.0049804504960775375,
0.18705399334430695,
0.0699639767408371,
-0.20910947024822235,
0.08532673120498657,
0.09559468179941177,
0.020123815163969994,
-0.14149457216262817,
-0.11462289839982986,
-0.0030735840555280447,
-0.011381285265088081,
0.1102379783987999,
0.007733751088380814,
0.14364327490329742,
-0.025283725932240486,
-0.035897258669137955,
0.0972367599606514,
-0.015999015420675278,
-0.017825642600655556,
0.02506282739341259,
0.1578119844198227,
0.006849230732768774,
-0.09654514491558075,
-0.04299917072057724,
0.16620928049087524,
-0.12359650433063507,
-0.17990723252296448,
0.006586540024727583,
0.1247948408126831,
0.04913555830717087,
-0.05894279479980469,
0.0845128744840622,
-0.08507619798183441,
-0.09722374379634857,
0.028555978089571,
-0.01350338477641344,
0.04361531883478165,
-0.15395867824554443,
-0.11571958661079407,
0.15878801047801971,
-0.24509957432746887,
0.14068935811519623,
-0.04513172805309296,
0.040234532207250595,
0.021671297028660774,
0.2713715136051178,
0.0721973329782486,
0.056752633303403854,
0.07074875384569168,
-0.1658904105424881,
0.0369175486266613,
-0.11904837936162949,
-0.1517821103334427,
0.13507303595542908,
-0.06363999843597412,
0.08588924258947372,
0.075145423412323,
0.08926396071910858,
-0.15538835525512695,
2.4246694681558333e-34,
0.015298258513212204,
0.04382319748401642,
0.028627807274460793,
0.01120356097817421,
-0.03176213800907135,
-0.11086331307888031,
0.07267507910728455,
0.09109870344400406,
-0.06779938191175461,
-0.20252351462841034,
-0.26403123140335083
] |
https://github.com/huggingface/datasets/issues/6011 | Documentation: wiki_dpr Dataset has no metric_type for Faiss Index | Hi! You can do `ds.get_index("embeddings").faiss_index.metric_type` to get the metric type and then match the result with the FAISS metric [enum](https://github.com/facebookresearch/faiss/blob/43d86e30736ede853c384b24667fc3ab897d6ba9/faiss/MetricType.h#L22-L36) (should be L2). | ### Describe the bug
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
### Steps to reproduce the bug
System: Python 3.9.16, Transformers 4.30.2, WSL
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
```py
from transformers import DPRQuestionEncoder, DPRContextEncoder, DPRQuestionEncoderTokenizer, DPRContextEncoderTokenizer
tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-multiset-base")
encoder = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-multiset-base")
def encode_question(query, tokenizer=tokenizer, encoder=encoder):
inputs = tokenizer(query, return_tensors='pt')
question_embedding = encoder(**inputs)[0].detach().numpy()
return question_embedding
def get_knn(query, k=5, tokenizer=tokenizer, encoder=encoder, verbose=False):
enc_question = encode_question(query, tokenizer, encoder)
topk_results = ds.get_nearest_examples(index_name='embeddings',
query=enc_question,
k=k)
a = torch.tensor(enc_question[0]).reshape(768)
b = torch.tensor(topk_results.examples['embeddings'][0])
print(a.shape, b.shape)
print(torch.dot(a, b))
print((a-b).pow(2).sum())
return topk_results
```
The [FAISS documentation](https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances) suggests the metric is usually L2 distance (without the square root) or the inner product. I compute both for the sample query:
```py
query = """ it catapulted into popular culture along with a line of action figures and other toys by Bandai.[2] By 2001, the media franchise had generated over $6 billion in toy sales.
Despite initial criticism that its action violence targeted child audiences, the franchise has been commercially successful."""
get_knn(query,k=5)
```
Here, I get dot product of 80.6020 and L2 distance of 77.6616 and
```py
NearestExamplesResults(scores=array([76.20431 , 75.312416, 74.945404, 74.866394, 74.68506 ],
dtype=float32), examples={'id': ['3081096', '2004811', '8908258', '9594124', '286575'], 'text': ['actors, resulting in the "Power Rangers" franchise which has continued since then into sequel TV series (with "Power Rangers Beast Morphers" set to premiere in 2019), comic books, video games, and three feature films, with a further cinematic universe planned. Following from the success of "Power Rangers", Saban acquired the rights to more of Toei\'s library, creating "VR Troopers" and "Big Bad Beetleborgs" from several Metal Hero Series shows and "Masked Rider" from Kamen Rider Series footage. DIC Entertainment joined this boom by acquiring the rights to "Gridman the Hyper Agent" and turning it into "Superhuman Samurai Syber-Squad". In 2002,',
```
Doing `k=1` indicates the higher the outputted number, the better the match, so the metric should not be L2 distance. However, my manually computed inner product (80.6) has a discrepancy with the reported (76.2). Perhaps, this has to do with me using the `compressed` embeddings?
### Expected behavior
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # METRIC_INNER_PRODUCT
```
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.18.0-477.13.1.el8_8.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1 | 23 | Documentation: wiki_dpr Dataset has no metric_type for Faiss Index
### Describe the bug
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
### Steps to reproduce the bug
System: Python 3.9.16, Transformers 4.30.2, WSL
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
```py
from transformers import DPRQuestionEncoder, DPRContextEncoder, DPRQuestionEncoderTokenizer, DPRContextEncoderTokenizer
tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-multiset-base")
encoder = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-multiset-base")
def encode_question(query, tokenizer=tokenizer, encoder=encoder):
inputs = tokenizer(query, return_tensors='pt')
question_embedding = encoder(**inputs)[0].detach().numpy()
return question_embedding
def get_knn(query, k=5, tokenizer=tokenizer, encoder=encoder, verbose=False):
enc_question = encode_question(query, tokenizer, encoder)
topk_results = ds.get_nearest_examples(index_name='embeddings',
query=enc_question,
k=k)
a = torch.tensor(enc_question[0]).reshape(768)
b = torch.tensor(topk_results.examples['embeddings'][0])
print(a.shape, b.shape)
print(torch.dot(a, b))
print((a-b).pow(2).sum())
return topk_results
```
The [FAISS documentation](https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances) suggests the metric is usually L2 distance (without the square root) or the inner product. I compute both for the sample query:
```py
query = """ it catapulted into popular culture along with a line of action figures and other toys by Bandai.[2] By 2001, the media franchise had generated over $6 billion in toy sales.
Despite initial criticism that its action violence targeted child audiences, the franchise has been commercially successful."""
get_knn(query,k=5)
```
Here, I get dot product of 80.6020 and L2 distance of 77.6616 and
```py
NearestExamplesResults(scores=array([76.20431 , 75.312416, 74.945404, 74.866394, 74.68506 ],
dtype=float32), examples={'id': ['3081096', '2004811', '8908258', '9594124', '286575'], 'text': ['actors, resulting in the "Power Rangers" franchise which has continued since then into sequel TV series (with "Power Rangers Beast Morphers" set to premiere in 2019), comic books, video games, and three feature films, with a further cinematic universe planned. Following from the success of "Power Rangers", Saban acquired the rights to more of Toei\'s library, creating "VR Troopers" and "Big Bad Beetleborgs" from several Metal Hero Series shows and "Masked Rider" from Kamen Rider Series footage. DIC Entertainment joined this boom by acquiring the rights to "Gridman the Hyper Agent" and turning it into "Superhuman Samurai Syber-Squad". In 2002,',
```
Doing `k=1` indicates the higher the outputted number, the better the match, so the metric should not be L2 distance. However, my manually computed inner product (80.6) has a discrepancy with the reported (76.2). Perhaps, this has to do with me using the `compressed` embeddings?
### Expected behavior
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # METRIC_INNER_PRODUCT
```
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.18.0-477.13.1.el8_8.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
Hi! You can do `ds.get_index("embeddings").faiss_index.metric_type` to get the metric type and then match the result with the FAISS metric [enum](https://github.com/facebookresearch/faiss/blob/43d86e30736ede853c384b24667fc3ab897d6ba9/faiss/MetricType.h#L22-L36) (should be L2). | [
-0.04333037883043289,
0.03350655362010002,
-0.04414021223783493,
0.07036974281072617,
0.15826138854026794,
0.15786686539649963,
0.07466624677181244,
0.15670742094516754,
0.019119132310152054,
0.05456371232867241,
0.1923138052225113,
-0.04362834617495537,
0.11219283193349838,
-0.0607433095574379,
0.11039718985557556,
0.014666449278593063,
0.023578975349664688,
0.009282102808356285,
-0.0031787627376616,
0.024025730788707733,
-0.2207687646150589,
0.04873232915997505,
-0.07162352651357651,
0.1205337718129158,
-0.03598659858107567,
-0.1674753725528717,
-0.05046302452683449,
-0.010497042909264565,
-0.09801404178142548,
-0.12641920149326324,
0.1683051884174347,
0.038662105798721313,
0.10426084697246552,
0.020686564967036247,
0.000006169661901367363,
-0.03563978150486946,
0.0006603144574910402,
0.018923018127679825,
0.07788223773241043,
-0.05418820679187775,
0.004766338039189577,
-0.02745662070810795,
0.18600647151470184,
-0.03373909741640091,
-0.044391799718141556,
-0.16652396321296692,
-0.09396202862262726,
0.23047055304050446,
-0.04127928614616394,
0.1879824995994568,
0.028035469353199005,
-0.06406016647815704,
0.04336247593164444,
-0.08885573595762253,
-0.029971148818731308,
0.002961685648187995,
0.017672358080744743,
0.0352340042591095,
-0.19477052986621857,
-0.04293176904320717,
0.034380316734313965,
0.012394028715789318,
0.05921598896384239,
0.009005403146147728,
-0.10597758740186691,
-0.09696124494075775,
-0.012566037476062775,
-0.28114137053489685,
0.07944270223379135,
-0.04128644987940788,
0.16034884750843048,
0.1462295949459076,
0.053005099296569824,
0.0569554902613163,
0.008748026564717293,
-0.0897776186466217,
0.06707314401865005,
-0.1386651247739792,
-0.008374539203941822,
-0.026934409514069557,
-0.17912423610687256,
0.038478780537843704,
0.02152470126748085,
-0.03117983788251877,
0.009516103193163872,
0.2816121280193329,
-0.0408344566822052,
-0.001094299484975636,
-0.0038809634279459715,
-0.003088429570198059,
0.1433459371328354,
-0.07118120789527893,
-0.15776459872722626,
-0.18186534941196442,
0.1440364271402359,
-0.13177208602428436,
-0.025838730856776237,
-0.061566248536109924,
0.0788688212633133,
-0.07921592891216278,
-0.1583794802427292,
-0.034984342753887177,
0.01277143508195877,
-0.02123003639280796,
-0.001397584448568523,
0.18794368207454681,
-0.01219183485955,
0.11798913031816483,
-0.005419897381216288,
0.06484059244394302,
-0.026647450402379036,
0.1122938022017479,
-0.27311211824417114,
-0.058040935546159744,
0.11750583350658417,
-0.09368963539600372,
0.048746880143880844,
0.03101794794201851,
-0.08715977519750595,
0.03349950164556503,
0.2466726303100586,
0.04661528393626213,
-0.07988766580820084,
0.04016629606485367,
-0.15346026420593262,
0.07346739619970322,
0.07770130038261414,
0.05734046921133995,
-0.06838351488113403,
0.14470605552196503,
-0.09643014520406723,
0.007868913933634758,
-0.05130987614393234,
-0.1415187567472458,
0.03924553096294403,
-0.03269520774483681,
0.0766783133149147,
-0.16977651417255402,
0.2159917950630188,
0.06030606850981712,
0.007221120875328779,
0.13418501615524292,
-0.08456632494926453,
0.16902711987495422,
0.03583765774965286,
0.13213695585727692,
0.18529225885868073,
0.0284079872071743,
-0.08885212242603302,
0.086096853017807,
-0.17685261368751526,
-0.0038183594588190317,
-0.14312350749969482,
0.12308281660079956,
-0.037829164415597916,
0.041972581297159195,
0.05284719541668892,
0.09843757003545761,
-0.15675102174282074,
-0.026102783158421516,
0.13706837594509125,
0.016786852851510048,
-0.004883359652012587,
-0.0668124333024025,
0.14404639601707458,
-0.032471079379320145,
0.047027338296175,
0.027425432577729225,
0.003762130858376622,
0.06838597357273102,
-0.003330109640955925,
-0.1012093797326088,
-0.1118849441409111,
-0.012439514510333538,
-0.08450599759817123,
0.27232450246810913,
0.13069088757038116,
-0.11784999072551727,
-0.0522497184574604,
-0.01583975739777088,
0.013544736430048943,
-0.08346214890480042,
-0.01813202165067196,
-0.0839621052145958,
0.10090217739343643,
0.16674567759037018,
-0.004989121574908495,
0.16615594923496246,
-0.003129376797005534,
-0.11222977191209793,
-0.06891494244337082,
-0.019488340243697166,
-0.08714412152767181,
-0.1479348987340927,
0.01615007594227791,
0.04059998691082001,
-0.038752343505620956,
0.11865177005529404,
-0.00453572440892458,
-0.11672079563140869,
0.03098401427268982,
-0.07750354707241058,
-0.050695765763521194,
0.07595950365066528,
0.14496085047721863,
-0.05530109629034996,
-0.03551303967833519,
0.14260147511959076,
-0.1908246874809265,
-0.04449606314301491,
-0.1586824506521225,
-0.024477478116750717,
0.16246213018894196,
0.04790116101503372,
-0.0968962237238884,
-0.018697015941143036,
0.11793848872184753,
-0.17701219022274017,
-0.06713251024484634,
0.1987604796886444,
-0.06115772947669029,
-0.32980531454086304,
-0.049638379365205765,
-0.009313137270510197,
0.11544566601514816,
-0.05687687546014786,
-0.03315473720431328,
0.04144006595015526,
-0.13581998646259308,
0.22294123470783234,
0.050885159522295,
0.03262413665652275,
0.03030359372496605,
0.050509974360466,
-0.009602529928088188,
-0.18717624247074127,
0.015542887151241302,
-0.07328063249588013,
0.0896669551730156,
-0.09880653023719788,
-0.09733857214450836,
0.11044173687696457,
0.01508824247866869,
0.016047203913331032,
0.014373628422617912,
0.07406094670295715,
0.13334564864635468,
-0.06919272243976593,
0.004210718907415867,
-0.05812481418251991,
0.12741084396839142,
0.14565809071063995,
-0.15612934529781342,
-0.02727120742201805,
-0.08440516144037247,
-0.09524327516555786,
-0.1501329094171524,
0.05964154005050659,
0.1229935809969902,
-0.06756368279457092,
0.11208710819482803,
-0.22404168546199799,
0.050381164997816086,
0.014920426532626152,
0.049557823687791824,
-0.09624110162258148,
0.04204940423369408,
-0.1456979662179947,
-0.03122231550514698,
0.0797794982790947,
0.01772959902882576,
-0.11958219856023788,
-0.042782604694366455,
-0.043284300714731216,
0.03389406576752663,
0.0709405243396759,
0.03281320258975029,
-0.05077299848198891,
0.08258704096078873,
0.11308731138706207,
-0.07729292660951614,
0.13694125413894653,
-0.1192932054400444,
-0.09157727658748627,
0.02765602618455887,
0.041832491755485535,
-0.21724744141101837,
0.04368317499756813,
0.009625296108424664,
-0.015512890182435513,
-0.146157905459404,
-0.14476795494556427,
0.10489731281995773,
-0.21300125122070312,
-0.05359504371881485,
-0.008471549488604069,
-0.020126948133111,
0.06519773602485657,
0.006411340553313494,
0.021055622026324272,
-0.16812467575073242,
0.004857216030359268,
-0.06735804677009583,
0.005537890829145908,
-0.05973087623715401,
-0.032477688044309616,
0.07664761692285538,
0.13571305572986603,
-0.12913386523723602,
-0.12093863636255264,
-0.006749750580638647,
-0.052873238921165466,
-0.0629170686006546,
0.08230149000883102,
-0.1449517160654068,
0.02850656770169735,
-0.13178274035453796,
-0.10579579323530197,
0.04592058062553406,
0.0031907360535115004,
0.19555817544460297,
0.04893948882818222,
-0.052143316715955734,
0.04554044082760811,
-0.011633006855845451,
-0.13427525758743286,
-0.15707531571388245,
0.02869941107928753,
0.04126308485865593,
-0.2077210694551468,
-0.08687683939933777,
0.09653399139642715,
-0.024323485791683197,
0.06869543343782425,
0.067571260035038,
-0.014511565677821636,
-0.08707790076732635,
0.004664549138396978,
0.3614904284477234,
-0.007701916620135307,
-0.19469811022281647,
0.06124512851238251,
-0.06240673363208771,
0.004392649978399277,
0.1445213258266449,
-0.1044468879699707,
-0.08939192444086075,
0.06526504456996918,
-0.096401646733284,
-0.03281749039888382,
0.14063039422035217,
0.1042628288269043,
0.0003508086083456874,
0.026953089982271194,
-0.1871030032634735,
0.19313035905361176,
0.01579374447464943,
-0.11013458669185638,
-0.09768225997686386,
-0.15926113724708557,
0.05838257819414139,
0.0323481410741806,
0.08310890942811966,
-0.07039909809827805,
-0.04181228205561638,
-0.08368171751499176,
0.12800036370754242,
0.09886231273412704,
0.040407877415418625,
0.022109244018793106,
0.0050482479855418205,
0.06626848876476288,
0.013491692952811718,
0.09206853061914444,
0.05058847740292549,
-0.13455000519752502,
0.035778775811195374,
-0.015563946217298508,
0.03996685892343521,
0.08590764552354813,
-0.1613778918981552,
-0.08094853162765503,
-0.0347023606300354,
0.05446099489927292,
0.02943897247314453,
0.06674724817276001,
-0.022097796201705933,
0.1846248358488083,
0.08898910880088806,
-0.02935786545276642,
0.006921287626028061,
0.022079799324274063,
0.005353972781449556,
-0.12236329168081284,
-0.01146737765520811,
0.008328982628881931,
0.09441246837377548,
-0.020662277936935425,
0.09573455899953842,
0.10918117314577103,
0.03329690173268318,
0.03955279663205147,
-0.06437360495328903,
-0.017131073400378227,
0.12193084508180618,
-0.02805234119296074,
0.006899143103510141,
0.01180693693459034,
-0.0025133625604212284,
-0.17402537167072296,
-0.04341708496212959,
0.02780693583190441,
0.04568261280655861,
-0.07494459301233292,
0.2283378541469574,
-0.07524775713682175,
-0.03779437765479088,
-0.11362064629793167,
-0.24884533882141113,
-0.17777271568775177,
-0.13204006850719452,
-0.10160714387893677,
0.31886571645736694,
0.15968498587608337,
-0.04162643849849701,
0.032534580677747726,
-0.07940355688333511,
0.102894127368927,
0.08440357446670532,
0.013415348716080189,
0.07377848774194717,
-0.10494470596313477,
0.004297105595469475,
0.19746825098991394,
0.0930669754743576,
-0.09131432324647903,
0.009823055006563663,
-0.08541107922792435,
-0.12790675461292267,
-0.01918598636984825,
-0.04848732426762581,
0.011610840447247028,
0.18446727097034454,
-0.11023599654436111,
0.016391804441809654,
-0.07540971785783768,
-0.11066626757383347,
-0.24321959912776947,
0.06272532045841217,
0.06572398543357849,
-0.1539725512266159,
-0.1481163501739502,
-0.07760973274707794,
-0.04298248142004013,
0.17035692930221558,
-0.03568926453590393,
0.025106577202677727,
-0.018040867522358894,
-0.13165684044361115,
0.07308775186538696,
0.21408116817474365,
-0.02694625034928322,
-0.3371025025844574,
-0.1208038479089737,
0.05524614080786705,
0.16049157083034515,
0.15273527801036835,
-0.2524290978908539,
0.018961427733302116,
0.020741881802678108,
-0.17116621136665344,
0.08413573354482651,
-0.007818860001862049,
-0.057189106941223145,
-0.009024583734571934,
-0.10630351305007935,
0.002892719581723213,
-0.07793071120977402,
-0.1719927340745926,
-0.18514662981033325,
0.10477804392576218,
0.1265241801738739,
0.10709930956363678,
-0.06836109608411789,
0.05268016457557678,
0.11658617854118347,
-0.05780559405684471,
-0.0069982330314815044,
0.0887138620018959,
0.06909744441509247,
0.014815285801887512,
0.03216041252017021,
-0.07979004085063934,
0.13754156231880188,
0.14658597111701965,
0.1342482715845108,
-0.007894901558756828,
-0.023596549406647682,
0.24010507762432098,
0.07847660034894943,
0.01698126271367073,
-0.11005303263664246,
0.08042843639850616,
-0.08907993137836456,
-0.05283105745911598,
-0.10022098571062088,
0.03553427383303642,
-0.025951053947210312,
0.06116356700658798,
-0.018997633829712868,
-0.024098407477140427,
0.023325249552726746,
0.0017421565717086196,
-0.09690157324075699,
-0.0747629851102829,
-0.13716799020767212,
-0.055642012506723404,
-0.035298384726047516,
0.20099477469921112,
0.19015070796012878,
-0.0405816026031971,
-0.04904314503073692,
0.05517125129699707,
-0.004973524250090122,
0.0033149588853120804,
0.030588088557124138,
-0.0510149784386158,
-0.05096977949142456,
0.29191407561302185,
0.21683697402477264,
-0.26963451504707336,
0.07264039665460587,
0.13896633684635162,
0.009598496370017529,
0.02683146484196186,
-0.0727943480014801,
0.2848810851573944,
-0.13129256665706635,
0.03982005640864372,
0.004209133796393871,
-0.08138320595026016,
-0.2102247178554535,
-0.0008609895594418049,
0.13347174227237701,
-0.03576413169503212,
-0.005084446631371975,
-0.1481086015701294,
-0.09577403962612152,
0.1359545737504959,
-0.2936730682849884,
0.08051178604364395,
0.0660323053598404,
-0.1222456768155098,
-0.12303245812654495,
0.1282528042793274,
-2.617263151360778e-32,
-0.17921173572540283,
-0.009766737930476665,
-0.07542582601308823,
-0.1593206226825714,
-0.2797616422176361,
0.06283660978078842,
0.1010490283370018,
-0.1371288001537323,
-0.0007412841077893972,
-0.0945761427283287,
0.0354587659239769,
0.18046662211418152,
0.02802131697535515,
-0.0005260532489046454,
0.024581987410783768,
-0.08130443841218948,
-0.010634117759764194,
-0.04899784177541733,
-0.013556077145040035,
0.029558872804045677,
0.1696864366531372,
-0.18614204227924347,
0.06881815195083618,
-0.043851885944604874,
-0.023543555289506912,
0.07852006703615189,
-0.016903486102819443,
-0.06058858335018158,
0.16665612161159515,
0.046046968549489975,
-0.13836868107318878,
0.04093088209629059,
-0.009773680940270424,
0.11695612967014313,
-0.040838293731212616,
-0.012427018955349922,
0.010062303394079208,
-0.07621034979820251,
-0.06117267534136772,
-0.04363265633583069,
0.04389757290482521,
-0.05660155043005943,
-0.12649959325790405,
0.045277755707502365,
-0.11135757714509964,
0.0006180614000186324,
0.0401323139667511,
0.010152378119528294,
-0.0017358111217617989,
0.04053063318133354,
0.028715085238218307,
0.007357442751526833,
-0.1431959867477417,
0.1879183053970337,
0.0628468319773674,
-0.006972653325647116,
0.22808797657489777,
-0.004391800612211227,
-0.20212993025779724,
-0.017362618818879128,
-0.0003492541436571628,
0.0625578761100769,
0.05684494227170944,
-0.10843455046415329,
-0.03376166149973869,
0.020880769938230515,
0.19983941316604614,
-0.014183590188622475,
0.18243753910064697,
0.02032630704343319,
0.23079492151737213,
0.07580113410949707,
0.02777222916483879,
0.07689523696899414,
-0.26383697986602783,
-0.10784474015235901,
-0.13284435868263245,
0.046599213033914566,
-0.15304429829120636,
-0.04309530183672905,
0.2091013789176941,
-0.0077009545639157295,
-0.12456871569156647,
-0.03603634983301163,
-0.07632052898406982,
-0.02379571832716465,
-0.09440844506025314,
-0.10265539586544037,
-0.07813935726881027,
-0.0883195698261261,
-0.02920583263039589,
0.08436746895313263,
-0.08989710360765457,
0.03134845569729805,
0.18409200012683868,
0.04461809992790222,
-0.057459186762571335,
0.10285928845405579,
0.07061927020549774,
-0.04590084031224251,
0.02169521525502205,
-0.01055443100631237,
0.15405908226966858,
0.16316278278827667,
0.1437261402606964,
0.06409357488155365,
-0.027880622074007988,
-0.014666101895272732,
-0.10933990031480789,
-0.07456827163696289,
0.17832957208156586,
-0.057257432490587234,
0.19291993975639343,
0.014442442916333675,
0.08038004487752914,
-0.04454972222447395,
0.06061527878046036,
-0.014407781884074211,
-0.023023368790745735,
0.14398227632045746,
-0.07219788432121277,
-0.07328550517559052,
0.07329479604959488,
0.0130811408162117,
0.09956837445497513,
0.12214557826519012,
-0.08270321786403656,
0.0364738330245018,
0.08407927304506302,
0.0991411954164505,
0.013182266615331173,
0.05457807704806328,
7.566420663351892e-7,
-0.1208496242761612,
0.284809410572052,
0.1030249148607254,
-0.13863080739974976,
-0.0601985864341259,
0.1317334622144699,
-0.04573101922869682,
0.24656929075717926,
0.030054915696382523,
0.09830978512763977,
0.17761428654193878,
-0.07542110979557037,
-0.11445069313049316,
-0.024156557396054268,
-0.1031203418970108,
0.07639060169458389,
-0.06417872756719589,
0.04205821827054024,
-0.1562601923942566,
0.043964069336652756,
0.00677904486656189,
0.04395337402820587,
-0.02340940572321415,
0.0905408039689064,
0.035167984664440155,
-0.04373067989945412,
-0.04968273267149925,
0.013852749019861221,
-0.07496846467256546,
0.016397526487708092,
0.04800086468458176,
-0.12268663197755814,
0.2497461587190628,
0.052102115005254745,
0.005157971754670143,
0.038924138993024826,
0.0562848225235939,
-0.0799785703420639,
0.05210452154278755,
-0.05471152812242508,
-0.20410999655723572,
-0.10802748799324036,
-0.030172517523169518,
-0.24792717397212982,
0.13491719961166382,
0.1730881631374359,
0.0012016722466796637,
-0.035202473402023315,
-0.05602681264281273,
0.04633477330207825,
-0.06769798696041107,
-0.015227819792926311,
0.11658405512571335,
0.10776965320110321,
-0.006452153902500868,
-0.06311170756816864,
0.13991621136665344,
0.01825171336531639,
0.2780282199382782,
-0.12735925614833832,
0.053122635930776596,
-0.2844395935535431,
-0.006654811557382345,
0.04830695688724518,
0.08464311808347702,
-0.05411183461546898,
0.05231998860836029,
1.5297213082479296e-34,
0.012961132451891899,
0.015104671008884907,
-0.013975481502711773,
-0.13657206296920776,
-0.09852945059537888,
-0.07746978849172592,
0.07634031772613525,
-0.08236975222826004,
-0.0037232411559671164,
-0.16452927887439728,
-0.11267918348312378
] |
https://github.com/huggingface/datasets/issues/6011 | Documentation: wiki_dpr Dataset has no metric_type for Faiss Index | Ah! Thank you for pointing this out. FYI: the enum indicates it's using the inner product. Using `torch.inner` or `torch.dot` still produces a discrepancy compared to the built-in score. I think this is because of the compression/quantization that occurs with the FAISS index. | ### Describe the bug
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
### Steps to reproduce the bug
System: Python 3.9.16, Transformers 4.30.2, WSL
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
```py
from transformers import DPRQuestionEncoder, DPRContextEncoder, DPRQuestionEncoderTokenizer, DPRContextEncoderTokenizer
tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-multiset-base")
encoder = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-multiset-base")
def encode_question(query, tokenizer=tokenizer, encoder=encoder):
inputs = tokenizer(query, return_tensors='pt')
question_embedding = encoder(**inputs)[0].detach().numpy()
return question_embedding
def get_knn(query, k=5, tokenizer=tokenizer, encoder=encoder, verbose=False):
enc_question = encode_question(query, tokenizer, encoder)
topk_results = ds.get_nearest_examples(index_name='embeddings',
query=enc_question,
k=k)
a = torch.tensor(enc_question[0]).reshape(768)
b = torch.tensor(topk_results.examples['embeddings'][0])
print(a.shape, b.shape)
print(torch.dot(a, b))
print((a-b).pow(2).sum())
return topk_results
```
The [FAISS documentation](https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances) suggests the metric is usually L2 distance (without the square root) or the inner product. I compute both for the sample query:
```py
query = """ it catapulted into popular culture along with a line of action figures and other toys by Bandai.[2] By 2001, the media franchise had generated over $6 billion in toy sales.
Despite initial criticism that its action violence targeted child audiences, the franchise has been commercially successful."""
get_knn(query,k=5)
```
Here, I get dot product of 80.6020 and L2 distance of 77.6616 and
```py
NearestExamplesResults(scores=array([76.20431 , 75.312416, 74.945404, 74.866394, 74.68506 ],
dtype=float32), examples={'id': ['3081096', '2004811', '8908258', '9594124', '286575'], 'text': ['actors, resulting in the "Power Rangers" franchise which has continued since then into sequel TV series (with "Power Rangers Beast Morphers" set to premiere in 2019), comic books, video games, and three feature films, with a further cinematic universe planned. Following from the success of "Power Rangers", Saban acquired the rights to more of Toei\'s library, creating "VR Troopers" and "Big Bad Beetleborgs" from several Metal Hero Series shows and "Masked Rider" from Kamen Rider Series footage. DIC Entertainment joined this boom by acquiring the rights to "Gridman the Hyper Agent" and turning it into "Superhuman Samurai Syber-Squad". In 2002,',
```
Doing `k=1` indicates the higher the outputted number, the better the match, so the metric should not be L2 distance. However, my manually computed inner product (80.6) has a discrepancy with the reported (76.2). Perhaps, this has to do with me using the `compressed` embeddings?
### Expected behavior
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # METRIC_INNER_PRODUCT
```
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.18.0-477.13.1.el8_8.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1 | 43 | Documentation: wiki_dpr Dataset has no metric_type for Faiss Index
### Describe the bug
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
### Steps to reproduce the bug
System: Python 3.9.16, Transformers 4.30.2, WSL
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
```py
from transformers import DPRQuestionEncoder, DPRContextEncoder, DPRQuestionEncoderTokenizer, DPRContextEncoderTokenizer
tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-multiset-base")
encoder = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-multiset-base")
def encode_question(query, tokenizer=tokenizer, encoder=encoder):
inputs = tokenizer(query, return_tensors='pt')
question_embedding = encoder(**inputs)[0].detach().numpy()
return question_embedding
def get_knn(query, k=5, tokenizer=tokenizer, encoder=encoder, verbose=False):
enc_question = encode_question(query, tokenizer, encoder)
topk_results = ds.get_nearest_examples(index_name='embeddings',
query=enc_question,
k=k)
a = torch.tensor(enc_question[0]).reshape(768)
b = torch.tensor(topk_results.examples['embeddings'][0])
print(a.shape, b.shape)
print(torch.dot(a, b))
print((a-b).pow(2).sum())
return topk_results
```
The [FAISS documentation](https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances) suggests the metric is usually L2 distance (without the square root) or the inner product. I compute both for the sample query:
```py
query = """ it catapulted into popular culture along with a line of action figures and other toys by Bandai.[2] By 2001, the media franchise had generated over $6 billion in toy sales.
Despite initial criticism that its action violence targeted child audiences, the franchise has been commercially successful."""
get_knn(query,k=5)
```
Here, I get dot product of 80.6020 and L2 distance of 77.6616 and
```py
NearestExamplesResults(scores=array([76.20431 , 75.312416, 74.945404, 74.866394, 74.68506 ],
dtype=float32), examples={'id': ['3081096', '2004811', '8908258', '9594124', '286575'], 'text': ['actors, resulting in the "Power Rangers" franchise which has continued since then into sequel TV series (with "Power Rangers Beast Morphers" set to premiere in 2019), comic books, video games, and three feature films, with a further cinematic universe planned. Following from the success of "Power Rangers", Saban acquired the rights to more of Toei\'s library, creating "VR Troopers" and "Big Bad Beetleborgs" from several Metal Hero Series shows and "Masked Rider" from Kamen Rider Series footage. DIC Entertainment joined this boom by acquiring the rights to "Gridman the Hyper Agent" and turning it into "Superhuman Samurai Syber-Squad". In 2002,',
```
Doing `k=1` indicates the higher the outputted number, the better the match, so the metric should not be L2 distance. However, my manually computed inner product (80.6) has a discrepancy with the reported (76.2). Perhaps, this has to do with me using the `compressed` embeddings?
### Expected behavior
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # METRIC_INNER_PRODUCT
```
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.18.0-477.13.1.el8_8.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
Ah! Thank you for pointing this out. FYI: the enum indicates it's using the inner product. Using `torch.inner` or `torch.dot` still produces a discrepancy compared to the built-in score. I think this is because of the compression/quantization that occurs with the FAISS index. | [
-0.04333037883043289,
0.03350655362010002,
-0.04414021223783493,
0.07036974281072617,
0.15826138854026794,
0.15786686539649963,
0.07466624677181244,
0.15670742094516754,
0.019119132310152054,
0.05456371232867241,
0.1923138052225113,
-0.04362834617495537,
0.11219283193349838,
-0.0607433095574379,
0.11039718985557556,
0.014666449278593063,
0.023578975349664688,
0.009282102808356285,
-0.0031787627376616,
0.024025730788707733,
-0.2207687646150589,
0.04873232915997505,
-0.07162352651357651,
0.1205337718129158,
-0.03598659858107567,
-0.1674753725528717,
-0.05046302452683449,
-0.010497042909264565,
-0.09801404178142548,
-0.12641920149326324,
0.1683051884174347,
0.038662105798721313,
0.10426084697246552,
0.020686564967036247,
0.000006169661901367363,
-0.03563978150486946,
0.0006603144574910402,
0.018923018127679825,
0.07788223773241043,
-0.05418820679187775,
0.004766338039189577,
-0.02745662070810795,
0.18600647151470184,
-0.03373909741640091,
-0.044391799718141556,
-0.16652396321296692,
-0.09396202862262726,
0.23047055304050446,
-0.04127928614616394,
0.1879824995994568,
0.028035469353199005,
-0.06406016647815704,
0.04336247593164444,
-0.08885573595762253,
-0.029971148818731308,
0.002961685648187995,
0.017672358080744743,
0.0352340042591095,
-0.19477052986621857,
-0.04293176904320717,
0.034380316734313965,
0.012394028715789318,
0.05921598896384239,
0.009005403146147728,
-0.10597758740186691,
-0.09696124494075775,
-0.012566037476062775,
-0.28114137053489685,
0.07944270223379135,
-0.04128644987940788,
0.16034884750843048,
0.1462295949459076,
0.053005099296569824,
0.0569554902613163,
0.008748026564717293,
-0.0897776186466217,
0.06707314401865005,
-0.1386651247739792,
-0.008374539203941822,
-0.026934409514069557,
-0.17912423610687256,
0.038478780537843704,
0.02152470126748085,
-0.03117983788251877,
0.009516103193163872,
0.2816121280193329,
-0.0408344566822052,
-0.001094299484975636,
-0.0038809634279459715,
-0.003088429570198059,
0.1433459371328354,
-0.07118120789527893,
-0.15776459872722626,
-0.18186534941196442,
0.1440364271402359,
-0.13177208602428436,
-0.025838730856776237,
-0.061566248536109924,
0.0788688212633133,
-0.07921592891216278,
-0.1583794802427292,
-0.034984342753887177,
0.01277143508195877,
-0.02123003639280796,
-0.001397584448568523,
0.18794368207454681,
-0.01219183485955,
0.11798913031816483,
-0.005419897381216288,
0.06484059244394302,
-0.026647450402379036,
0.1122938022017479,
-0.27311211824417114,
-0.058040935546159744,
0.11750583350658417,
-0.09368963539600372,
0.048746880143880844,
0.03101794794201851,
-0.08715977519750595,
0.03349950164556503,
0.2466726303100586,
0.04661528393626213,
-0.07988766580820084,
0.04016629606485367,
-0.15346026420593262,
0.07346739619970322,
0.07770130038261414,
0.05734046921133995,
-0.06838351488113403,
0.14470605552196503,
-0.09643014520406723,
0.007868913933634758,
-0.05130987614393234,
-0.1415187567472458,
0.03924553096294403,
-0.03269520774483681,
0.0766783133149147,
-0.16977651417255402,
0.2159917950630188,
0.06030606850981712,
0.007221120875328779,
0.13418501615524292,
-0.08456632494926453,
0.16902711987495422,
0.03583765774965286,
0.13213695585727692,
0.18529225885868073,
0.0284079872071743,
-0.08885212242603302,
0.086096853017807,
-0.17685261368751526,
-0.0038183594588190317,
-0.14312350749969482,
0.12308281660079956,
-0.037829164415597916,
0.041972581297159195,
0.05284719541668892,
0.09843757003545761,
-0.15675102174282074,
-0.026102783158421516,
0.13706837594509125,
0.016786852851510048,
-0.004883359652012587,
-0.0668124333024025,
0.14404639601707458,
-0.032471079379320145,
0.047027338296175,
0.027425432577729225,
0.003762130858376622,
0.06838597357273102,
-0.003330109640955925,
-0.1012093797326088,
-0.1118849441409111,
-0.012439514510333538,
-0.08450599759817123,
0.27232450246810913,
0.13069088757038116,
-0.11784999072551727,
-0.0522497184574604,
-0.01583975739777088,
0.013544736430048943,
-0.08346214890480042,
-0.01813202165067196,
-0.0839621052145958,
0.10090217739343643,
0.16674567759037018,
-0.004989121574908495,
0.16615594923496246,
-0.003129376797005534,
-0.11222977191209793,
-0.06891494244337082,
-0.019488340243697166,
-0.08714412152767181,
-0.1479348987340927,
0.01615007594227791,
0.04059998691082001,
-0.038752343505620956,
0.11865177005529404,
-0.00453572440892458,
-0.11672079563140869,
0.03098401427268982,
-0.07750354707241058,
-0.050695765763521194,
0.07595950365066528,
0.14496085047721863,
-0.05530109629034996,
-0.03551303967833519,
0.14260147511959076,
-0.1908246874809265,
-0.04449606314301491,
-0.1586824506521225,
-0.024477478116750717,
0.16246213018894196,
0.04790116101503372,
-0.0968962237238884,
-0.018697015941143036,
0.11793848872184753,
-0.17701219022274017,
-0.06713251024484634,
0.1987604796886444,
-0.06115772947669029,
-0.32980531454086304,
-0.049638379365205765,
-0.009313137270510197,
0.11544566601514816,
-0.05687687546014786,
-0.03315473720431328,
0.04144006595015526,
-0.13581998646259308,
0.22294123470783234,
0.050885159522295,
0.03262413665652275,
0.03030359372496605,
0.050509974360466,
-0.009602529928088188,
-0.18717624247074127,
0.015542887151241302,
-0.07328063249588013,
0.0896669551730156,
-0.09880653023719788,
-0.09733857214450836,
0.11044173687696457,
0.01508824247866869,
0.016047203913331032,
0.014373628422617912,
0.07406094670295715,
0.13334564864635468,
-0.06919272243976593,
0.004210718907415867,
-0.05812481418251991,
0.12741084396839142,
0.14565809071063995,
-0.15612934529781342,
-0.02727120742201805,
-0.08440516144037247,
-0.09524327516555786,
-0.1501329094171524,
0.05964154005050659,
0.1229935809969902,
-0.06756368279457092,
0.11208710819482803,
-0.22404168546199799,
0.050381164997816086,
0.014920426532626152,
0.049557823687791824,
-0.09624110162258148,
0.04204940423369408,
-0.1456979662179947,
-0.03122231550514698,
0.0797794982790947,
0.01772959902882576,
-0.11958219856023788,
-0.042782604694366455,
-0.043284300714731216,
0.03389406576752663,
0.0709405243396759,
0.03281320258975029,
-0.05077299848198891,
0.08258704096078873,
0.11308731138706207,
-0.07729292660951614,
0.13694125413894653,
-0.1192932054400444,
-0.09157727658748627,
0.02765602618455887,
0.041832491755485535,
-0.21724744141101837,
0.04368317499756813,
0.009625296108424664,
-0.015512890182435513,
-0.146157905459404,
-0.14476795494556427,
0.10489731281995773,
-0.21300125122070312,
-0.05359504371881485,
-0.008471549488604069,
-0.020126948133111,
0.06519773602485657,
0.006411340553313494,
0.021055622026324272,
-0.16812467575073242,
0.004857216030359268,
-0.06735804677009583,
0.005537890829145908,
-0.05973087623715401,
-0.032477688044309616,
0.07664761692285538,
0.13571305572986603,
-0.12913386523723602,
-0.12093863636255264,
-0.006749750580638647,
-0.052873238921165466,
-0.0629170686006546,
0.08230149000883102,
-0.1449517160654068,
0.02850656770169735,
-0.13178274035453796,
-0.10579579323530197,
0.04592058062553406,
0.0031907360535115004,
0.19555817544460297,
0.04893948882818222,
-0.052143316715955734,
0.04554044082760811,
-0.011633006855845451,
-0.13427525758743286,
-0.15707531571388245,
0.02869941107928753,
0.04126308485865593,
-0.2077210694551468,
-0.08687683939933777,
0.09653399139642715,
-0.024323485791683197,
0.06869543343782425,
0.067571260035038,
-0.014511565677821636,
-0.08707790076732635,
0.004664549138396978,
0.3614904284477234,
-0.007701916620135307,
-0.19469811022281647,
0.06124512851238251,
-0.06240673363208771,
0.004392649978399277,
0.1445213258266449,
-0.1044468879699707,
-0.08939192444086075,
0.06526504456996918,
-0.096401646733284,
-0.03281749039888382,
0.14063039422035217,
0.1042628288269043,
0.0003508086083456874,
0.026953089982271194,
-0.1871030032634735,
0.19313035905361176,
0.01579374447464943,
-0.11013458669185638,
-0.09768225997686386,
-0.15926113724708557,
0.05838257819414139,
0.0323481410741806,
0.08310890942811966,
-0.07039909809827805,
-0.04181228205561638,
-0.08368171751499176,
0.12800036370754242,
0.09886231273412704,
0.040407877415418625,
0.022109244018793106,
0.0050482479855418205,
0.06626848876476288,
0.013491692952811718,
0.09206853061914444,
0.05058847740292549,
-0.13455000519752502,
0.035778775811195374,
-0.015563946217298508,
0.03996685892343521,
0.08590764552354813,
-0.1613778918981552,
-0.08094853162765503,
-0.0347023606300354,
0.05446099489927292,
0.02943897247314453,
0.06674724817276001,
-0.022097796201705933,
0.1846248358488083,
0.08898910880088806,
-0.02935786545276642,
0.006921287626028061,
0.022079799324274063,
0.005353972781449556,
-0.12236329168081284,
-0.01146737765520811,
0.008328982628881931,
0.09441246837377548,
-0.020662277936935425,
0.09573455899953842,
0.10918117314577103,
0.03329690173268318,
0.03955279663205147,
-0.06437360495328903,
-0.017131073400378227,
0.12193084508180618,
-0.02805234119296074,
0.006899143103510141,
0.01180693693459034,
-0.0025133625604212284,
-0.17402537167072296,
-0.04341708496212959,
0.02780693583190441,
0.04568261280655861,
-0.07494459301233292,
0.2283378541469574,
-0.07524775713682175,
-0.03779437765479088,
-0.11362064629793167,
-0.24884533882141113,
-0.17777271568775177,
-0.13204006850719452,
-0.10160714387893677,
0.31886571645736694,
0.15968498587608337,
-0.04162643849849701,
0.032534580677747726,
-0.07940355688333511,
0.102894127368927,
0.08440357446670532,
0.013415348716080189,
0.07377848774194717,
-0.10494470596313477,
0.004297105595469475,
0.19746825098991394,
0.0930669754743576,
-0.09131432324647903,
0.009823055006563663,
-0.08541107922792435,
-0.12790675461292267,
-0.01918598636984825,
-0.04848732426762581,
0.011610840447247028,
0.18446727097034454,
-0.11023599654436111,
0.016391804441809654,
-0.07540971785783768,
-0.11066626757383347,
-0.24321959912776947,
0.06272532045841217,
0.06572398543357849,
-0.1539725512266159,
-0.1481163501739502,
-0.07760973274707794,
-0.04298248142004013,
0.17035692930221558,
-0.03568926453590393,
0.025106577202677727,
-0.018040867522358894,
-0.13165684044361115,
0.07308775186538696,
0.21408116817474365,
-0.02694625034928322,
-0.3371025025844574,
-0.1208038479089737,
0.05524614080786705,
0.16049157083034515,
0.15273527801036835,
-0.2524290978908539,
0.018961427733302116,
0.020741881802678108,
-0.17116621136665344,
0.08413573354482651,
-0.007818860001862049,
-0.057189106941223145,
-0.009024583734571934,
-0.10630351305007935,
0.002892719581723213,
-0.07793071120977402,
-0.1719927340745926,
-0.18514662981033325,
0.10477804392576218,
0.1265241801738739,
0.10709930956363678,
-0.06836109608411789,
0.05268016457557678,
0.11658617854118347,
-0.05780559405684471,
-0.0069982330314815044,
0.0887138620018959,
0.06909744441509247,
0.014815285801887512,
0.03216041252017021,
-0.07979004085063934,
0.13754156231880188,
0.14658597111701965,
0.1342482715845108,
-0.007894901558756828,
-0.023596549406647682,
0.24010507762432098,
0.07847660034894943,
0.01698126271367073,
-0.11005303263664246,
0.08042843639850616,
-0.08907993137836456,
-0.05283105745911598,
-0.10022098571062088,
0.03553427383303642,
-0.025951053947210312,
0.06116356700658798,
-0.018997633829712868,
-0.024098407477140427,
0.023325249552726746,
0.0017421565717086196,
-0.09690157324075699,
-0.0747629851102829,
-0.13716799020767212,
-0.055642012506723404,
-0.035298384726047516,
0.20099477469921112,
0.19015070796012878,
-0.0405816026031971,
-0.04904314503073692,
0.05517125129699707,
-0.004973524250090122,
0.0033149588853120804,
0.030588088557124138,
-0.0510149784386158,
-0.05096977949142456,
0.29191407561302185,
0.21683697402477264,
-0.26963451504707336,
0.07264039665460587,
0.13896633684635162,
0.009598496370017529,
0.02683146484196186,
-0.0727943480014801,
0.2848810851573944,
-0.13129256665706635,
0.03982005640864372,
0.004209133796393871,
-0.08138320595026016,
-0.2102247178554535,
-0.0008609895594418049,
0.13347174227237701,
-0.03576413169503212,
-0.005084446631371975,
-0.1481086015701294,
-0.09577403962612152,
0.1359545737504959,
-0.2936730682849884,
0.08051178604364395,
0.0660323053598404,
-0.1222456768155098,
-0.12303245812654495,
0.1282528042793274,
-2.617263151360778e-32,
-0.17921173572540283,
-0.009766737930476665,
-0.07542582601308823,
-0.1593206226825714,
-0.2797616422176361,
0.06283660978078842,
0.1010490283370018,
-0.1371288001537323,
-0.0007412841077893972,
-0.0945761427283287,
0.0354587659239769,
0.18046662211418152,
0.02802131697535515,
-0.0005260532489046454,
0.024581987410783768,
-0.08130443841218948,
-0.010634117759764194,
-0.04899784177541733,
-0.013556077145040035,
0.029558872804045677,
0.1696864366531372,
-0.18614204227924347,
0.06881815195083618,
-0.043851885944604874,
-0.023543555289506912,
0.07852006703615189,
-0.016903486102819443,
-0.06058858335018158,
0.16665612161159515,
0.046046968549489975,
-0.13836868107318878,
0.04093088209629059,
-0.009773680940270424,
0.11695612967014313,
-0.040838293731212616,
-0.012427018955349922,
0.010062303394079208,
-0.07621034979820251,
-0.06117267534136772,
-0.04363265633583069,
0.04389757290482521,
-0.05660155043005943,
-0.12649959325790405,
0.045277755707502365,
-0.11135757714509964,
0.0006180614000186324,
0.0401323139667511,
0.010152378119528294,
-0.0017358111217617989,
0.04053063318133354,
0.028715085238218307,
0.007357442751526833,
-0.1431959867477417,
0.1879183053970337,
0.0628468319773674,
-0.006972653325647116,
0.22808797657489777,
-0.004391800612211227,
-0.20212993025779724,
-0.017362618818879128,
-0.0003492541436571628,
0.0625578761100769,
0.05684494227170944,
-0.10843455046415329,
-0.03376166149973869,
0.020880769938230515,
0.19983941316604614,
-0.014183590188622475,
0.18243753910064697,
0.02032630704343319,
0.23079492151737213,
0.07580113410949707,
0.02777222916483879,
0.07689523696899414,
-0.26383697986602783,
-0.10784474015235901,
-0.13284435868263245,
0.046599213033914566,
-0.15304429829120636,
-0.04309530183672905,
0.2091013789176941,
-0.0077009545639157295,
-0.12456871569156647,
-0.03603634983301163,
-0.07632052898406982,
-0.02379571832716465,
-0.09440844506025314,
-0.10265539586544037,
-0.07813935726881027,
-0.0883195698261261,
-0.02920583263039589,
0.08436746895313263,
-0.08989710360765457,
0.03134845569729805,
0.18409200012683868,
0.04461809992790222,
-0.057459186762571335,
0.10285928845405579,
0.07061927020549774,
-0.04590084031224251,
0.02169521525502205,
-0.01055443100631237,
0.15405908226966858,
0.16316278278827667,
0.1437261402606964,
0.06409357488155365,
-0.027880622074007988,
-0.014666101895272732,
-0.10933990031480789,
-0.07456827163696289,
0.17832957208156586,
-0.057257432490587234,
0.19291993975639343,
0.014442442916333675,
0.08038004487752914,
-0.04454972222447395,
0.06061527878046036,
-0.014407781884074211,
-0.023023368790745735,
0.14398227632045746,
-0.07219788432121277,
-0.07328550517559052,
0.07329479604959488,
0.0130811408162117,
0.09956837445497513,
0.12214557826519012,
-0.08270321786403656,
0.0364738330245018,
0.08407927304506302,
0.0991411954164505,
0.013182266615331173,
0.05457807704806328,
7.566420663351892e-7,
-0.1208496242761612,
0.284809410572052,
0.1030249148607254,
-0.13863080739974976,
-0.0601985864341259,
0.1317334622144699,
-0.04573101922869682,
0.24656929075717926,
0.030054915696382523,
0.09830978512763977,
0.17761428654193878,
-0.07542110979557037,
-0.11445069313049316,
-0.024156557396054268,
-0.1031203418970108,
0.07639060169458389,
-0.06417872756719589,
0.04205821827054024,
-0.1562601923942566,
0.043964069336652756,
0.00677904486656189,
0.04395337402820587,
-0.02340940572321415,
0.0905408039689064,
0.035167984664440155,
-0.04373067989945412,
-0.04968273267149925,
0.013852749019861221,
-0.07496846467256546,
0.016397526487708092,
0.04800086468458176,
-0.12268663197755814,
0.2497461587190628,
0.052102115005254745,
0.005157971754670143,
0.038924138993024826,
0.0562848225235939,
-0.0799785703420639,
0.05210452154278755,
-0.05471152812242508,
-0.20410999655723572,
-0.10802748799324036,
-0.030172517523169518,
-0.24792717397212982,
0.13491719961166382,
0.1730881631374359,
0.0012016722466796637,
-0.035202473402023315,
-0.05602681264281273,
0.04633477330207825,
-0.06769798696041107,
-0.015227819792926311,
0.11658405512571335,
0.10776965320110321,
-0.006452153902500868,
-0.06311170756816864,
0.13991621136665344,
0.01825171336531639,
0.2780282199382782,
-0.12735925614833832,
0.053122635930776596,
-0.2844395935535431,
-0.006654811557382345,
0.04830695688724518,
0.08464311808347702,
-0.05411183461546898,
0.05231998860836029,
1.5297213082479296e-34,
0.012961132451891899,
0.015104671008884907,
-0.013975481502711773,
-0.13657206296920776,
-0.09852945059537888,
-0.07746978849172592,
0.07634031772613525,
-0.08236975222826004,
-0.0037232411559671164,
-0.16452927887439728,
-0.11267918348312378
] |
https://github.com/huggingface/datasets/issues/6010 | Improve `Dataset`'s string representation | Yes, feel free to work on this.
You can check the PyArrow Table `__repr__` and Polars DataFrame `__repr__`/`_repr_html_` implementations for some pointers/ideas. | Currently, `Dataset.__repr__` outputs a dataset's column names and the number of rows. We could improve it by printing its features and the first few rows.
We should also implement `_repr_html_` to have a rich HTML representation in notebooks/Streamlit. | 22 | Improve `Dataset`'s string representation
Currently, `Dataset.__repr__` outputs a dataset's column names and the number of rows. We could improve it by printing its features and the first few rows.
We should also implement `_repr_html_` to have a rich HTML representation in notebooks/Streamlit.
Yes, feel free to work on this.
You can check the PyArrow Table `__repr__` and Polars DataFrame `__repr__`/`_repr_html_` implementations for some pointers/ideas. | [
0.07815378904342651,
0.20897909998893738,
-0.08588224649429321,
0.025069259107112885,
0.07381875067949295,
0.15063439309597015,
-0.1565927118062973,
0.19819894433021545,
-0.11012743413448334,
0.13977713882923126,
-0.10987243801355362,
0.10845085233449936,
0.03099529631435871,
0.07945052534341812,
0.08036132156848907,
-0.24043475091457367,
-0.11923007667064667,
-0.05345171317458153,
0.047827690839767456,
0.0035832864232361317,
-0.07195905596017838,
0.02712635137140751,
0.18591240048408508,
-0.030701179057359695,
0.045884449034929276,
-0.11333849281072617,
0.013961913995444775,
0.11916749179363251,
-0.024596473202109337,
-0.13136188685894012,
-0.03942626342177391,
0.02776048704981804,
0.056666091084480286,
0.03489977493882179,
0.000006408930403267732,
0.1576961874961853,
0.07637447863817215,
-0.007863743230700493,
-0.06908703595399857,
0.22979311645030975,
0.26154932379722595,
-0.11031165719032288,
0.07421623915433884,
0.036920901387929916,
-0.013992832973599434,
-0.008992706425487995,
-0.07046063989400864,
0.08614515513181686,
0.027931956574320793,
0.08185350894927979,
0.02665914036333561,
-0.040693361312150955,
-0.1416587084531784,
-0.03207851201295853,
0.15398544073104858,
0.31377413868904114,
-0.06273645162582397,
0.0942215621471405,
-0.0918763056397438,
-0.13348069787025452,
0.0676443800330162,
-0.09821700304746628,
-0.04533300921320915,
0.03672105073928833,
0.057072512805461884,
0.06484432518482208,
-0.20177367329597473,
0.008223345503211021,
0.07655160874128342,
0.2101220041513443,
0.020128320902585983,
-0.14251162111759186,
-0.143284410238266,
0.0725531280040741,
0.04360645264387131,
-0.11229824274778366,
-0.10061348229646683,
0.000858692335896194,
-0.1827401965856552,
0.023842794820666313,
-0.12478602677583694,
-0.12460710108280182,
-0.016044676303863525,
-0.0026168685872107744,
-0.07957123219966888,
-0.06889582425355911,
-0.03897754102945328,
-0.1070047914981842,
-0.07370120286941528,
0.02100670337677002,
0.08097130805253983,
0.07025515288114548,
0.01685372367501259,
-0.06424257159233093,
-0.07155013084411621,
0.0974377691745758,
-0.13040392100811005,
-0.16730961203575134,
0.03243042156100273,
0.09828008711338043,
0.044407427310943604,
0.05066663771867752,
-0.09099747240543365,
-0.04089759662747383,
-0.15093426406383514,
-0.05416000261902809,
-0.06901218742132187,
-0.010672856122255325,
0.05476972088217735,
0.10762593895196915,
-0.024958157911896706,
0.052032776176929474,
-0.03583270311355591,
-0.024934066459536552,
0.1904475837945938,
0.20142056047916412,
0.0121802082285285,
0.14631712436676025,
0.02186380885541439,
0.08541002869606018,
0.08248821645975113,
0.04569943994283676,
-0.037426140159368515,
0.09065511077642441,
-0.12941019237041473,
0.1407839059829712,
-0.000019768713173107244,
-0.0208896417170763,
-0.03085297904908657,
-0.07542406022548676,
-0.09269456565380096,
-0.04060281813144684,
0.1891498863697052,
-0.0863572210073471,
0.021018266677856445,
0.09698300063610077,
-0.04248571768403053,
-0.12726739048957825,
0.1019512340426445,
-0.11301364749670029,
0.0862642228603363,
0.05809250846505165,
0.012385190464556217,
-0.00022457765589933842,
0.052002158015966415,
0.015030928887426853,
-0.052902091294527054,
-0.00633277278393507,
-0.09985464066267014,
0.04049418866634369,
-0.050282422453165054,
0.24116148054599762,
-0.2648090124130249,
0.0942823737859726,
-0.12780815362930298,
0.061771709471940994,
-0.02751440927386284,
-0.06818331032991409,
-0.16434060037136078,
0.10246637463569641,
0.08208233118057251,
-0.06562540680170059,
0.01829502359032631,
-0.12488631904125214,
0.07905066013336182,
0.22617200016975403,
0.0015209194971248507,
0.08701587468385696,
0.049687545746564865,
0.053318314254283905,
0.20588114857673645,
-0.12000149488449097,
-0.06706277281045914,
0.0519348569214344,
0.15118831396102905,
0.13685829937458038,
0.06714621186256409,
-0.037855736911296844,
-0.15060944855213165,
0.1225033551454544,
0.18622815608978271,
-0.018628530204296112,
0.2419782280921936,
0.03838454559445381,
0.2810220718383789,
0.020705576986074448,
-0.12851570546627045,
0.19131742417812347,
-0.05632136017084122,
-0.053335607051849365,
-0.05788348242640495,
0.019793787971138954,
0.012557233683764935,
0.23267146944999695,
0.01933681219816208,
-0.09448405355215073,
-0.04463306814432144,
-0.07559580355882645,
0.23534178733825684,
-0.13556790351867676,
0.0023682338651269674,
-0.10840815305709839,
0.20771755278110504,
0.029246864840388298,
-0.05638996884226799,
-0.07359519600868225,
-0.07856200635433197,
-0.1491006463766098,
0.08627813309431076,
0.012356088496744633,
-0.12121974676847458,
-0.02718914858996868,
0.02707448974251747,
-0.002380573656409979,
-0.10810241103172302,
-0.04016546532511711,
-0.04100942611694336,
0.06628499925136566,
-0.14367061853408813,
0.05633058026432991,
0.08517906814813614,
0.10997574776411057,
0.0037286526057869196,
0.014654294587671757,
0.24479973316192627,
0.12680743634700775,
0.13301846385002136,
-0.01248571090400219,
0.13295450806617737,
0.03366880118846893,
-0.08675320446491241,
-0.032421935349702835,
0.125719353556633,
0.11203707754611969,
-0.06394632905721664,
0.020666593685746193,
0.09428917616605759,
-0.18686868250370026,
0.10845143347978592,
0.013438203372061253,
-0.12341512739658356,
0.06408709287643433,
-0.21625280380249023,
-0.013558867387473583,
0.1001349687576294,
-0.016321875154972076,
0.02886383794248104,
0.0974760428071022,
-0.00188471341971308,
-0.00582580640912056,
0.08684534579515457,
0.17250597476959229,
0.1120237410068512,
0.06422077119350433,
0.02675451897084713,
0.09100474417209625,
0.01418696716427803,
0.041432883590459824,
-0.15013176202774048,
0.08978288620710373,
0.057644784450531006,
0.04464451223611832,
0.03243434056639671,
0.10315288603305817,
0.14376682043075562,
-0.006837072782218456,
0.00450136000290513,
0.04467306286096573,
-0.16776876151561737,
0.0372735895216465,
0.007857589982450008,
0.04733198508620262,
0.010838384740054607,
-0.06990419328212738,
-0.04155898466706276,
-0.03240826725959778,
-0.07654113322496414,
-0.09658556431531906,
0.0538664348423481,
0.07210268080234528,
-0.15492957830429077,
0.0018292185850441456,
0.01977197825908661,
0.04185041785240173,
0.2228487730026245,
0.08449232578277588,
-0.10892920941114426,
0.05505150556564331,
-0.04485170915722847,
-0.05201351270079613,
0.018958043307065964,
-0.14817096292972565,
0.07468800991773605,
-0.17119716107845306,
-0.035513024777173996,
0.05011853203177452,
0.08614354580640793,
0.06833743304014206,
-0.201777845621109,
-0.0548425018787384,
0.016109012067317963,
0.11484355479478836,
0.06405182182788849,
0.07639796286821365,
-0.05316535383462906,
0.11922967433929443,
0.18342405557632446,
-0.01349132601171732,
-0.03286733478307724,
-0.2418120950460434,
0.05130009353160858,
0.014591382816433907,
0.03864044323563576,
0.12076638638973236,
0.16912396252155304,
0.017851077020168304,
-0.24661430716514587,
-0.1852445900440216,
0.08366293460130692,
0.09163620322942734,
-0.08012142032384872,
0.036608047783374786,
-0.02330656722187996,
-0.012157282792031765,
-0.01595264859497547,
0.037127476185560226,
-0.12263970077037811,
-0.09681528806686401,
0.1652265042066574,
0.009237734600901604,
-0.036623746156692505,
-0.12500132620334625,
0.005620581563562155,
-0.08778960257768631,
0.03151899576187134,
0.032072003930807114,
-0.07702735811471939,
-0.029952766373753548,
0.12263399362564087,
0.019369417801499367,
-0.0531158447265625,
-0.0421285554766655,
0.009446772746741772,
-0.16183871030807495,
0.14637035131454468,
-0.09358252584934235,
-0.03488754853606224,
-0.1106572225689888,
0.15013174712657928,
0.026902226731181145,
0.11748392134904861,
0.022395186126232147,
-0.032142527401447296,
-0.011957860551774502,
0.14988677203655243,
0.0047586108557879925,
-0.15418364107608795,
0.10327449440956116,
-0.1568938046693802,
0.031242216005921364,
0.01419163215905428,
0.03703819587826729,
0.04855707287788391,
-0.14878275990486145,
-0.052297867834568024,
0.004300714936107397,
-0.06372226029634476,
0.007863585837185383,
0.05306065455079079,
-0.17344467341899872,
-0.10045599937438965,
-0.17656950652599335,
0.016023293137550354,
0.0348505824804306,
0.052709225565195084,
-0.04873725026845932,
0.08988680690526962,
-0.1929502636194229,
0.21704837679862976,
-0.09357331693172455,
0.12952348589897156,
-0.1019156277179718,
-0.016625653952360153,
-0.12692303955554962,
0.05693313106894493,
-0.03701874241232872,
-0.06916660070419312,
0.12052097171545029,
-0.15605509281158447,
-0.015844374895095825,
-0.032009318470954895,
-0.036439429968595505,
-0.24348773062229156,
-0.08695434033870697,
-0.051157038658857346,
0.0508270189166069,
0.08228985965251923,
0.12727776169776917,
-0.02243235893547535,
0.0813254565000534,
0.03631007671356201,
-0.034643933176994324,
-0.1481006145477295,
-0.0825650542974472,
0.15263624489307404,
-0.04203368350863457,
0.12476035952568054,
0.19439297914505005,
-0.008362951688468456,
-0.14282822608947754,
-0.1303897351026535,
0.06377140432596207,
-0.011084873229265213,
-0.07951505482196808,
0.1877642422914505,
0.03059256263077259,
-0.3110590875148773,
-0.007504242472350597,
-0.05082756653428078,
-0.10272188484668732,
-0.028609439730644226,
0.018468322232365608,
-0.04383569955825806,
-0.05695277824997902,
0.16130965948104858,
-0.004268266260623932,
-0.10638941824436188,
0.08187564462423325,
0.02600760944187641,
0.17760367691516876,
0.14233900606632233,
0.09789322316646576,
0.040532175451517105,
-0.06227794662117958,
-0.026920123025774956,
-0.04029973968863487,
0.08804911375045776,
-0.0941195860505104,
-0.12611985206604004,
-0.08822356164455414,
-0.14693599939346313,
0.12476309388875961,
0.12589573860168457,
-0.09231963753700256,
0.07659443467855453,
-0.21285435557365417,
0.07745814323425293,
-0.026220757514238358,
-0.06603322178125381,
-0.03526083007454872,
-0.22350774705410004,
-0.06269955635070801,
-0.29119041562080383,
-0.000615342054516077,
0.05109983682632446,
-0.03246073052287102,
-0.0828445702791214,
0.00922851450741291,
0.06641429662704468,
-0.06089124456048012,
0.07001087069511414,
-0.04724893718957901,
-0.062044624239206314,
0.02878970094025135,
-0.21942712366580963,
-0.07178620249032974,
0.07128617912530899,
-0.3014362156391144,
-0.0629115030169487,
-0.01979917474091053,
0.09222637861967087,
-0.008730325847864151,
0.141774982213974,
0.004529658704996109,
0.003748599672690034,
0.04685521870851517,
-0.07315099239349365,
0.12433260679244995,
0.008798717521131039,
0.1672627180814743,
0.08685635775327682,
0.15364359319210052,
0.10224710404872894,
-0.11136624217033386,
-0.0015079519944265485,
0.06160015985369682,
-0.27113524079322815,
-0.0461135171353817,
-0.13410842418670654,
0.1169392317533493,
0.034018270671367645,
-0.13243737816810608,
-0.06556815654039383,
0.06102912500500679,
-0.052749741822481155,
0.04284321144223213,
-0.10405724495649338,
0.1254255771636963,
-0.11004472523927689,
0.022110270336270332,
0.07068918645381927,
0.10318119823932648,
0.017213087528944016,
-0.06998471170663834,
0.028804169967770576,
-0.09317713230848312,
0.05587130784988403,
-0.05126366391777992,
0.05048903822898865,
-0.10539659857749939,
0.13874809443950653,
0.15051792562007904,
-0.05585932359099388,
-0.1248740404844284,
0.06687843799591064,
0.21131940186023712,
-0.12179223448038101,
0.05166636034846306,
-0.013062238693237305,
-0.009433221071958542,
-0.11117582768201828,
-0.0013281976571306586,
0.09107177704572678,
-0.09279235452413559,
0.01116028893738985,
0.15783698856830597,
0.019295528531074524,
-0.1654297560453415,
-0.10574950277805328,
0.10373321920633316,
0.09062793105840683,
-0.012429287657141685,
0.16140782833099365,
-0.12625376880168915,
-0.03616853058338165,
0.13923072814941406,
0.13909292221069336,
-0.07168935984373093,
0.002628300106152892,
-0.03852969408035278,
-0.05649120733141899,
-0.286174476146698,
-0.12184234708547592,
0.006586579140275717,
0.04389039799571037,
0.014388921670615673,
-0.07843627035617828,
0.009164122864603996,
-0.0016931770369410515,
0.08320232480764389,
0.06805844604969025,
0.04995134472846985,
-0.05169199779629707,
-0.09742342680692673,
-0.04803711175918579,
-2.638497281314032e-32,
-0.15664568543434143,
0.07655681669712067,
-0.12770673632621765,
-0.08827273547649384,
-0.015252342447638512,
-0.010741500183939934,
-0.007997006177902222,
-0.04637349396944046,
-0.0872894823551178,
0.02207644097507,
-0.1017916202545166,
0.02204880304634571,
0.07597686350345612,
0.021368088200688362,
-0.17395803332328796,
0.01231122761964798,
0.18333323299884796,
-0.015737824141979218,
-0.05899302661418915,
0.026785913854837418,
0.058046478778123856,
0.05889683589339256,
0.14183220267295837,
0.04528873786330223,
-0.24331241846084595,
0.04307516664266586,
-0.07098788768053055,
-0.12305349856615067,
0.10214435309171677,
0.014525597915053368,
-0.07354605197906494,
0.1891356259584427,
-0.02349400334060192,
0.12525838613510132,
-0.06740327179431915,
0.10048983991146088,
-0.12699764966964722,
0.017266204580664635,
-0.05479765310883522,
0.016429618000984192,
-0.012438812293112278,
0.009924475103616714,
0.1843012273311615,
-0.03827499970793724,
0.03981072083115578,
0.04653005674481392,
-0.00008731413254281506,
-0.06566250324249268,
-0.1395774930715561,
0.038140688091516495,
-0.013042347505688667,
0.039340198040008545,
0.03826484456658363,
0.07743954658508301,
0.07609131187200546,
0.021180180832743645,
0.0828651487827301,
0.06322895735502243,
-0.16471266746520996,
-0.03238390013575554,
0.13911661505699158,
0.11192101240158081,
-0.048581089824438095,
-0.0022423812188208103,
0.17769816517829895,
0.003606080310419202,
0.15935790538787842,
-0.03558524698019028,
-0.010870425030589104,
0.15734054148197174,
-0.017288200557231903,
-0.026739832013845444,
0.1468779444694519,
0.08703021705150604,
-0.05533803254365921,
-0.15166136622428894,
-0.08323248475790024,
-0.012202390469610691,
0.043814659118652344,
0.15591779351234436,
-0.18586501479148865,
-0.05490448325872421,
0.0679592713713646,
0.040647853165864944,
0.06068209186196327,
0.13261525332927704,
-0.07439589500427246,
-0.06622878462076187,
0.04145917296409607,
-0.051002632826566696,
-0.20003917813301086,
0.2170652598142624,
-0.060995522886514664,
-0.013774766586720943,
-0.11121711879968643,
0.13441820442676544,
-0.20122689008712769,
0.0896071121096611,
-0.13832885026931763,
-0.2644476592540741,
0.1583186686038971,
-0.02234843000769615,
0.11156398802995682,
0.07477361708879471,
0.0539267398416996,
-0.13581225275993347,
0.11061155796051025,
0.10831578075885773,
-0.27014562487602234,
0.0014047848526388407,
-0.09901003539562225,
0.12477697432041168,
0.14212535321712494,
0.05111865699291229,
-0.07970710098743439,
0.039168767631053925,
-0.04588974267244339,
0.10585201531648636,
0.045713160187006,
-0.0797630101442337,
-0.008407442830502987,
-0.0795406773686409,
0.10680091381072998,
-0.0890132263302803,
-0.018132388591766357,
-0.0037749484181404114,
-0.0742252990603447,
0.022720111533999443,
0.16433368623256683,
0.020730797201395035,
-0.07003118097782135,
-0.07170398533344269,
7.521068710047984e-7,
-0.09180045872926712,
0.09485246241092682,
0.18288709223270416,
-0.05328549072146416,
0.005791764240711927,
0.07499086856842041,
0.048840686678886414,
0.11265059560537338,
-0.07653480023145676,
-0.11099860072135925,
0.0919305607676506,
-0.07908637821674347,
0.058973319828510284,
-0.06427696347236633,
0.021920695900917053,
-0.19781553745269775,
-0.2894638478755951,
-0.08457433432340622,
-0.10336374491453171,
0.025580186396837234,
0.35407647490501404,
0.21474486589431763,
0.026179879903793335,
-0.23410792648792267,
0.10931267589330673,
0.08861369639635086,
0.06250957399606705,
-0.22399266064167023,
-0.013144232332706451,
-0.07374695688486099,
0.044512342661619186,
-0.008469788357615471,
-0.14374776184558868,
-0.031723640859127045,
-0.07257615774869919,
-0.09498174488544464,
-0.056298911571502686,
-0.07492539286613464,
0.01871885545551777,
0.09829495847225189,
0.05573076754808426,
0.03560716286301613,
0.05906546115875244,
-0.04971043020486832,
0.07716201990842819,
-0.046310700476169586,
-0.16175660490989685,
0.052059758454561234,
-0.1336292326450348,
0.05915975943207741,
0.06063287332653999,
-0.10185524821281433,
-0.1042097732424736,
0.046085454523563385,
-0.06802301853895187,
-0.01432923972606659,
-0.04142177477478981,
-0.2614288330078125,
0.030947024002671242,
-0.05303700268268585,
-0.057684481143951416,
0.03152591735124588,
0.006299156695604324,
0.12898816168308258,
0.2281576693058014,
-0.16368016600608826,
0.00014115023077465594,
3.377448735881828e-34,
-0.00038618032704107463,
-0.07541367411613464,
0.07778366655111313,
-0.04147838056087494,
0.014942451380193233,
-0.1437688171863556,
0.08471657335758209,
-0.07410819083452225,
0.07026196271181107,
-0.2564423382282257,
-0.07814700156450272
] |
https://github.com/huggingface/datasets/issues/6010 | Improve `Dataset`'s string representation | @mariosasko are there any other similar issues that I could work on? I see this has been already solved. | Currently, `Dataset.__repr__` outputs a dataset's column names and the number of rows. We could improve it by printing its features and the first few rows.
We should also implement `_repr_html_` to have a rich HTML representation in notebooks/Streamlit. | 19 | Improve `Dataset`'s string representation
Currently, `Dataset.__repr__` outputs a dataset's column names and the number of rows. We could improve it by printing its features and the first few rows.
We should also implement `_repr_html_` to have a rich HTML representation in notebooks/Streamlit.
@mariosasko are there any other similar issues that I could work on? I see this has been already solved. | [
0.020062901079654694,
0.235575869679451,
-0.09507185220718384,
0.056195490062236786,
0.0911032035946846,
0.1286364197731018,
-0.09288078546524048,
0.21642909944057465,
-0.08630784600973129,
0.09920644015073776,
-0.03599504381418228,
0.04677240923047066,
-0.012902576476335526,
0.11254970729351044,
0.11708690226078033,
-0.2531697452068329,
-0.09720965474843979,
-0.05428105592727661,
0.01031610555946827,
-0.001700923196040094,
-0.054867055267095566,
0.01027591247111559,
0.21291334927082062,
-0.04671519622206688,
0.054656464606523514,
-0.09890684485435486,
0.014874898828566074,
0.10813286900520325,
-0.01268238015472889,
-0.11027432978153229,
-0.03985470160841942,
0.05901898071169853,
0.0610993355512619,
0.03416500240564346,
0.000006518670488731004,
0.14088211953639984,
0.07276680320501328,
-0.000880019273608923,
-0.11939539015293121,
0.20507678389549255,
0.1454993188381195,
-0.14183245599269867,
0.05264356732368469,
0.05909021943807602,
-0.04917904734611511,
0.01745634526014328,
-0.022508708760142326,
0.02087259106338024,
0.01078211423009634,
0.09101127088069916,
0.0053604780696332455,
-0.02625545673072338,
-0.09157875925302505,
-0.09177973121404648,
0.14989294111728668,
0.3023932874202728,
-0.06871771812438965,
0.0851767286658287,
-0.09504329413175583,
-0.1101066991686821,
0.04617555812001228,
-0.06593895703554153,
-0.047067537903785706,
0.04495949670672417,
0.04689311981201172,
0.04028341546654701,
-0.24580420553684235,
0.002553327474743128,
0.09377585351467133,
0.2356904149055481,
0.06390771269798279,
-0.12481339275836945,
-0.13225258886814117,
0.05539573356509209,
0.054615236818790436,
-0.10496862977743149,
-0.08196726441383362,
-0.006126422435045242,
-0.16338278353214264,
0.053863827139139175,
-0.1919059157371521,
-0.12693186104297638,
-0.024635707959532738,
-0.017415214329957962,
-0.10331282764673233,
-0.11860203742980957,
-0.04901658743619919,
-0.09434160590171814,
-0.10192569345235825,
0.0075220754370093346,
0.06255925446748734,
0.025784730911254883,
-0.028834499418735504,
-0.06925874203443527,
-0.05073290690779686,
0.10727515071630478,
-0.11628421396017075,
-0.19957119226455688,
0.03565281257033348,
0.11288480460643768,
0.062331996858119965,
0.05666615068912506,
-0.13457205891609192,
-0.05821231007575989,
-0.11579325050115585,
-0.03191002458333969,
-0.0606117881834507,
-0.04762352630496025,
0.05063330754637718,
0.10491002351045609,
-0.03616736829280853,
0.05631706863641739,
-0.025934699922800064,
0.0027247373946011066,
0.1893639713525772,
0.19462591409683228,
-0.008701951242983341,
0.15199178457260132,
-0.010738703422248363,
0.07421258091926575,
0.08941491693258286,
0.05360580235719681,
-0.013731933198869228,
0.06365291029214859,
-0.11685599386692047,
0.12303083389997482,
-0.0271004568785429,
-0.05294102802872658,
-0.0023832987062633038,
-0.10833527892827988,
-0.10734201967716217,
-0.07175172865390778,
0.17287372052669525,
-0.07316932082176208,
0.014061413705348969,
0.07081056386232376,
-0.02859288640320301,
-0.10937260836362839,
0.11448631435632706,
-0.12650646269321442,
0.12219525873661041,
0.03356529399752617,
0.02996438555419445,
-0.03662620112299919,
0.04784594848752022,
0.026768168434500694,
-0.042045749723911285,
-0.00008919775427784771,
-0.10978326946496964,
-0.0013543139211833477,
-0.08583591133356094,
0.22124822437763214,
-0.2582681179046631,
0.09102597087621689,
-0.14636443555355072,
0.07053123414516449,
-0.011576622724533081,
-0.056694649159908295,
-0.15937212109565735,
0.07613018155097961,
0.07023346424102783,
-0.046534422785043716,
0.020690979436039925,
-0.10103371739387512,
0.11703801155090332,
0.21224696934223175,
-0.02745218202471733,
0.0782155990600586,
-0.013692819513380527,
0.048662930727005005,
0.15398718416690826,
-0.142336905002594,
-0.0578819178044796,
0.06589538604021072,
0.13245666027069092,
0.16627748310565948,
0.09907490015029907,
-0.025958262383937836,
-0.1816360354423523,
0.1392820030450821,
0.19755618274211884,
0.006284920033067465,
0.2283574938774109,
0.011868187226355076,
0.2676317095756531,
0.00897191558033228,
-0.1363452970981598,
0.1839398443698883,
-0.06318089365959167,
-0.055477794259786606,
-0.05576077848672867,
0.03780683875083923,
0.01516608614474535,
0.2812286913394928,
0.008987152948975563,
-0.06508933007717133,
-0.02157139591872692,
-0.05063682049512863,
0.19632552564144135,
-0.121670201420784,
-0.01679128035902977,
-0.15603087842464447,
0.14413106441497803,
0.031180450692772865,
-0.06723523139953613,
-0.10129188001155853,
-0.08255332708358765,
-0.10907475650310516,
0.1735733300447464,
-0.03759337589144707,
-0.11212445050477982,
0.002139234682545066,
0.02422594092786312,
0.009605511091649532,
-0.06986326724290848,
-0.003126608906313777,
-0.018254613503813744,
0.1173795536160469,
-0.1381567269563675,
0.06437604129314423,
0.050261735916137695,
0.12489163875579834,
-0.012418141588568687,
-0.0027774483896791935,
0.2145971655845642,
0.0722242146730423,
0.16848476231098175,
-0.017576823011040688,
0.11006385833024979,
0.017514295876026154,
-0.07558399438858032,
-0.025098176673054695,
0.1039382666349411,
0.09786467999219894,
-0.04644070938229561,
0.03691280260682106,
0.09512101858854294,
-0.19636225700378418,
0.12291441112756729,
0.03692978620529175,
-0.09716273844242096,
0.07710235565900803,
-0.22343137860298157,
-0.015838248655200005,
0.08036226779222488,
-0.022206399589776993,
0.005867417901754379,
0.08023719489574432,
0.0024440267588943243,
-0.004570900462567806,
0.08518414199352264,
0.1652139276266098,
0.07673631608486176,
0.07096616923809052,
0.010146144777536392,
0.08772135525941849,
0.05550011619925499,
0.06335096806287766,
-0.1598743200302124,
0.11244755238294601,
0.07683676481246948,
0.016896944493055344,
0.01440402027219534,
0.13369326293468475,
0.12584242224693298,
0.016750691458582878,
-0.0004141916870139539,
0.053083471953868866,
-0.1727268248796463,
0.04419511556625366,
0.04423101991415024,
0.04116760939359665,
0.013915681280195713,
-0.05521057918667793,
-0.039171796292066574,
-0.11030199378728867,
-0.06724493950605392,
-0.0745433047413826,
0.04081461578607559,
0.0619124136865139,
-0.14554333686828613,
0.016047758981585503,
-0.018330181017518044,
0.028359925374388695,
0.2285735011100769,
0.06579502671957016,
-0.13165782392024994,
0.05689959600567818,
-0.03529113531112671,
-0.03168535977602005,
0.006072556134313345,
-0.07568404823541641,
0.06430250406265259,
-0.1606404334306717,
-0.06197594851255417,
0.0385691374540329,
0.003170459298416972,
0.06831168383359909,
-0.15643790364265442,
0.00914349127560854,
-0.00639021210372448,
0.14413730800151825,
0.057655490934848785,
0.04884813725948334,
-0.03965095803141594,
0.10025075823068619,
0.17104260623455048,
0.0037259848322719336,
-0.026954546570777893,
-0.22407549619674683,
0.08547048270702362,
-0.015023824758827686,
0.046828098595142365,
0.10610811412334442,
0.20307525992393494,
0.01592991128563881,
-0.2434408962726593,
-0.18597948551177979,
0.03902074694633484,
0.13076098263263702,
-0.08132521063089371,
0.007641456089913845,
0.026357265189290047,
-0.0009316097130067647,
0.025145303457975388,
0.04844619706273079,
-0.13101840019226074,
-0.11042437702417374,
0.13194213807582855,
0.01812572591006756,
0.0013644387945532799,
-0.11068103462457657,
-0.02376989647746086,
-0.0885213166475296,
0.09105532616376877,
0.033554673194885254,
-0.10539407283067703,
-0.04464733973145485,
0.11033415049314499,
0.010781626217067242,
-0.06738462299108505,
-0.054406117647886276,
0.018317505717277527,
-0.17267736792564392,
0.19626955687999725,
-0.09615644812583923,
-0.0009134138817898929,
-0.09218621253967285,
0.0907684713602066,
0.013864719308912754,
0.06111263111233711,
0.06660711020231247,
-0.04982601851224899,
-0.030154092237353325,
0.13996842503547668,
0.04696694016456604,
-0.1283896118402481,
0.11009981483221054,
-0.11787949502468109,
0.04234880954027176,
0.03350970149040222,
0.029421063140034676,
0.05171285942196846,
-0.11608715355396271,
-0.05614329129457474,
0.05710682272911072,
0.003685656236484647,
0.02848784439265728,
0.037293825298547745,
-0.1434507966041565,
-0.08453343063592911,
-0.1844448745250702,
-0.0330515019595623,
0.017092034220695496,
0.05348368361592293,
-0.04195365309715271,
0.09393678605556488,
-0.1996661126613617,
0.2191670835018158,
-0.09255830943584442,
0.09996335208415985,
-0.13714350759983063,
-0.02415737882256508,
-0.11421333998441696,
0.06919778883457184,
-0.05851084738969803,
-0.05534715577960014,
0.12505298852920532,
-0.15262383222579956,
0.011324387043714523,
-0.042698077857494354,
-0.05884738638997078,
-0.14792069792747498,
-0.07865750044584274,
-0.05013281852006912,
0.05524647608399391,
0.1107366606593132,
0.09977734833955765,
-0.030855724588036537,
0.062036462128162384,
0.06814133375883102,
-0.041830942034721375,
-0.18902359902858734,
-0.05843022093176842,
0.133159339427948,
-0.0493180975317955,
0.18907326459884644,
0.20466433465480804,
0.00249856966547668,
-0.09198945760726929,
-0.11397412419319153,
0.09320779889822006,
-0.0156991146504879,
-0.04430491849780083,
0.2234249711036682,
-0.01246214285492897,
-0.28465592861175537,
0.011697979643940926,
0.017418818548321724,
-0.06060503050684929,
-0.008590069599449635,
-0.014629173092544079,
-0.029226547107100487,
-0.04911065846681595,
0.15994499623775482,
-0.03585055097937584,
-0.17896375060081482,
0.08691925555467606,
0.029073426499962807,
0.17579376697540283,
0.1284008026123047,
0.1204114705324173,
0.05509021505713463,
-0.04982716217637062,
0.014157582074403763,
-0.033899109810590744,
0.06400761753320694,
-0.13219323754310608,
-0.12966865301132202,
-0.10404762625694275,
-0.1727583408355713,
0.1193094402551651,
0.11475265771150589,
-0.06721170246601105,
0.025052634999155998,
-0.18208971619606018,
0.07013256847858429,
-0.04165126755833626,
0.0005715917213819921,
-0.04578233137726784,
-0.22201375663280487,
-0.10496862977743149,
-0.3235565721988678,
-0.011520138010382652,
0.09779557585716248,
-0.006842704955488443,
-0.06779276579618454,
-0.0656178891658783,
0.027627848088741302,
-0.08308350294828415,
0.023278508335351944,
-0.04173959419131279,
-0.0452917143702507,
0.02452833764255047,
-0.21595889329910278,
-0.04201517254114151,
0.04909832403063774,
-0.3213452100753784,
-0.07608193159103394,
-0.026683585718274117,
-0.018204601481556892,
-0.025261111557483673,
0.13826973736286163,
-0.00798400491476059,
0.042975734919309616,
0.05659108981490135,
-0.09276969730854034,
0.09024588018655777,
-0.011505665257573128,
0.12681494653224945,
0.1161956638097763,
0.12006775289773941,
0.1125033050775528,
-0.1187097430229187,
0.0031286601442843676,
0.0684119313955307,
-0.2726706862449646,
-0.013623112812638283,
-0.14117126166820526,
0.14785133302211761,
0.01983528397977352,
-0.10490931570529938,
-0.08693768829107285,
0.08081737160682678,
-0.051114387810230255,
0.01995903253555298,
-0.179198756814003,
0.09104711562395096,
-0.1366412192583084,
0.006746469996869564,
0.10508380085229874,
0.11283436417579651,
0.04357093945145607,
-0.0997530147433281,
0.04334210976958275,
-0.11746282875537872,
0.034900519996881485,
-0.029874524101614952,
0.07871222496032715,
-0.06868305802345276,
0.12904579937458038,
0.14204566180706024,
-0.05251864343881607,
-0.13921360671520233,
0.03614488244056702,
0.19156770408153534,
-0.14095932245254517,
0.0071440646424889565,
-0.01899942383170128,
-0.015387720428407192,
-0.10669315606355667,
-0.008825517259538174,
0.10570181161165237,
-0.09142333269119263,
-0.004792859312146902,
0.14980599284172058,
0.024699829518795013,
-0.163471058011055,
-0.08654443919658661,
0.14500632882118225,
0.08985535800457001,
-0.000035357668821234256,
0.10798574239015579,
-0.11489807814359665,
-0.022002361714839935,
0.14405794441699982,
0.16513700783252716,
-0.05693967267870903,
0.03715026378631592,
-0.04409019276499748,
-0.08978509902954102,
-0.28007176518440247,
-0.13573794066905975,
-0.02461102418601513,
0.057547323405742645,
0.012883272022008896,
-0.07296711951494217,
0.05918062478303909,
0.03813619911670685,
0.10538586229085922,
0.06809016317129135,
0.0008600594592280686,
-0.05037551745772362,
-0.09552545100450516,
-0.0614280141890049,
-2.626871936057987e-32,
-0.1385345607995987,
0.06213132664561272,
-0.13229131698608398,
-0.06976661831140518,
-0.018344512209296227,
-0.0479215644299984,
-0.028391756117343903,
-0.04035473242402077,
-0.08485133200883865,
-0.0008678874582983553,
-0.1354687660932541,
0.02301206812262535,
0.07619554549455643,
0.0223113801330328,
-0.1516188532114029,
-0.009728595614433289,
0.17838016152381897,
-0.029927385970950127,
-0.113028384745121,
-0.019762691110372543,
0.04540414363145828,
0.04844089224934578,
0.12678252160549164,
0.09107787162065506,
-0.21933574974536896,
0.04161984100937843,
-0.033109501004219055,
-0.0803505927324295,
0.1137736365199089,
0.00952817965298891,
-0.041381485760211945,
0.19820347428321838,
0.016990749165415764,
0.06841594725847244,
-0.08531716465950012,
0.10074342787265778,
-0.1690080761909485,
0.05022658780217171,
-0.03530146926641464,
-0.0010617284569889307,
0.006045538932085037,
0.0320596881210804,
0.17374275624752045,
-0.010400591418147087,
0.04740191623568535,
0.01950130984187126,
0.0032835304737091064,
-0.08123993873596191,
-0.13978345692157745,
0.022960375994443893,
-0.039660923182964325,
0.010427633300423622,
0.008062454871833324,
0.07360029965639114,
0.10397054255008698,
0.02941993996500969,
0.08387739211320877,
0.051350187510252,
-0.16584676504135132,
-0.008808093145489693,
0.19386176764965057,
0.13527825474739075,
-0.0278772059828043,
-0.014954475685954094,
0.16130617260932922,
0.015231266617774963,
0.20013004541397095,
-0.03133713826537132,
0.014754526317119598,
0.19929984211921692,
0.015484529547393322,
-0.0021854727528989315,
0.12108463048934937,
0.12668132781982422,
-0.023014025762677193,
-0.17693641781806946,
-0.1036495789885521,
-0.026252146810293198,
-0.0019684969447553158,
0.08839566260576248,
-0.15778066217899323,
-0.07201331108808517,
0.05326126515865326,
0.013958284631371498,
0.037298791110515594,
0.1840374916791916,
-0.0913262888789177,
-0.055390022695064545,
0.04329020529985428,
-0.05808918550610542,
-0.19093018770217896,
0.22853049635887146,
-0.050662972033023834,
0.02117397077381611,
-0.1286616176366806,
0.15094703435897827,
-0.18906424939632416,
0.07278800755739212,
-0.12148463726043701,
-0.24010761082172394,
0.15445712208747864,
-0.018380748108029366,
0.14032672345638275,
0.0844951719045639,
0.09107086062431335,
-0.12932807207107544,
0.10634691268205643,
0.07064522057771683,
-0.23675155639648438,
0.02973557822406292,
-0.1212182566523552,
0.11369810253381729,
0.12172353267669678,
0.04187014326453209,
-0.04212133213877678,
0.013155948370695114,
-0.004522241652011871,
0.10845445841550827,
0.011339272372424603,
-0.1118507906794548,
-0.08617138862609863,
-0.05649079009890556,
0.10189555585384369,
-0.07181910425424576,
-0.0256641935557127,
0.006190684158354998,
-0.06527477502822876,
0.03447580710053444,
0.23612911999225616,
0.017064953222870827,
-0.0767761766910553,
-0.06860256940126419,
7.662693519705499e-7,
-0.13277080655097961,
0.10687554627656937,
0.173081636428833,
-0.1029500812292099,
0.02278991788625717,
0.08531171083450317,
0.038561467081308365,
0.12606865167617798,
-0.022592471912503242,
-0.1479858160018921,
0.08623800426721573,
-0.08985061198472977,
0.08061899244785309,
-0.015348119661211967,
0.016929276287555695,
-0.16400869190692902,
-0.27583569288253784,
-0.07243676483631134,
-0.09276390075683594,
-0.0009014098322950304,
0.2962668836116791,
0.21447095274925232,
0.0038165561854839325,
-0.2189139872789383,
0.1243567019701004,
0.10463796555995941,
0.04077623412013054,
-0.20991110801696777,
-0.020107168704271317,
-0.050315964967012405,
0.05613502487540245,
-0.010034244507551193,
-0.1275080442428589,
-0.058235179632902145,
-0.08675505965948105,
-0.10175781697034836,
-0.044886354357004166,
-0.0842498242855072,
0.024128640070557594,
0.11931788176298141,
0.0707584023475647,
-0.0015495079569518566,
0.03160097822546959,
0.00489801587536931,
0.12263330817222595,
-0.0007167657022364438,
-0.12242217361927032,
0.08810790628194809,
-0.12258218973875046,
0.013855467550456524,
0.025647448375821114,
-0.08324071764945984,
-0.03880162164568901,
0.09005336463451385,
-0.060690660029649734,
-0.03186924010515213,
0.001425187336280942,
-0.25995418429374695,
0.02798648178577423,
-0.044012874364852905,
-0.0756017416715622,
-0.0014714334392920136,
0.023658907040953636,
0.11941307783126831,
0.23034866154193878,
-0.21665962040424347,
-0.027061523869633675,
3.63853291886167e-34,
-0.04173725098371506,
-0.01187212485820055,
0.06251372396945953,
-0.01313265971839428,
0.009042598307132721,
-0.1254776567220688,
0.09710022062063217,
-0.07008977234363556,
0.02475525438785553,
-0.21989411115646362,
-0.09958595782518387
] |
https://github.com/huggingface/datasets/issues/6008 | Dataset.from_generator consistently freezes at ~1000 rows | By default, we write data to disk (so it can be memory-mapped) every 1000 rows/samples. You can control this with the `writer_batch_size` parameter. Also, when working with fixed-size arrays, the `ArrayXD` feature types yield better performance (e.g., in your case, `features=datasets.Features({"i": datasets.Array3D(shape=(512,512,3), dtype="float32")})` should be faster).
Our support for multi-dim arrays could be better, and we plan to improve it as part of https://github.com/huggingface/datasets/issues/5272. | ### Describe the bug
Whenever I try to create a dataset which contains images using `Dataset.from_generator`, it freezes around 996 rows. I suppose it has something to do with memory consumption, but there's more memory available. I
Somehow it worked a few times but mostly this makes the datasets library much more cumbersome to work with because generators are the easiest way to turn an existing dataset into a Hugging Face dataset.
I've let it run in the frozen state for way longer than it can possibly take to load the actual dataset.
Let me know if you have ideas how to resolve it!
### Steps to reproduce the bug
```python
from datasets import Dataset
import numpy as np
def gen():
for row in range(10000):
yield {"i": np.random.rand(512, 512, 3)}
Dataset.from_generator(gen)
# -> 90% of the time gets stuck around 1000 rows
```
### Expected behavior
Should continue and go through all the examples yielded by the generator, or at least throw an error or somehow communicate what's going on.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 12.0.1
- Pandas version: 1.5.1
| 64 | Dataset.from_generator consistently freezes at ~1000 rows
### Describe the bug
Whenever I try to create a dataset which contains images using `Dataset.from_generator`, it freezes around 996 rows. I suppose it has something to do with memory consumption, but there's more memory available. I
Somehow it worked a few times but mostly this makes the datasets library much more cumbersome to work with because generators are the easiest way to turn an existing dataset into a Hugging Face dataset.
I've let it run in the frozen state for way longer than it can possibly take to load the actual dataset.
Let me know if you have ideas how to resolve it!
### Steps to reproduce the bug
```python
from datasets import Dataset
import numpy as np
def gen():
for row in range(10000):
yield {"i": np.random.rand(512, 512, 3)}
Dataset.from_generator(gen)
# -> 90% of the time gets stuck around 1000 rows
```
### Expected behavior
Should continue and go through all the examples yielded by the generator, or at least throw an error or somehow communicate what's going on.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 12.0.1
- Pandas version: 1.5.1
By default, we write data to disk (so it can be memory-mapped) every 1000 rows/samples. You can control this with the `writer_batch_size` parameter. Also, when working with fixed-size arrays, the `ArrayXD` feature types yield better performance (e.g., in your case, `features=datasets.Features({"i": datasets.Array3D(shape=(512,512,3), dtype="float32")})` should be faster).
Our support for multi-dim arrays could be better, and we plan to improve it as part of https://github.com/huggingface/datasets/issues/5272. | [
0.052168671041727066,
0.08152813464403152,
-0.08109702169895172,
0.02097267657518387,
0.17865797877311707,
0.09855930507183075,
0.04520590975880623,
0.036789726465940475,
0.007620050571858883,
0.261787474155426,
0.028780188411474228,
-0.09171491116285324,
-0.12245749682188034,
0.056128740310668945,
-0.06977225095033646,
-0.07216999679803848,
-0.11122459918260574,
-0.018466250970959663,
-0.1295493096113205,
-0.06112047657370567,
-0.08024415373802185,
0.002968972083181143,
0.224814310669899,
-0.0614263080060482,
-0.09728343784809113,
-0.23292015492916107,
-0.022162919864058495,
0.0533110648393631,
-0.059828903526067734,
-0.052318040281534195,
-0.07812051475048065,
-0.002036358928307891,
-0.07478412240743637,
0.2799105942249298,
0.000005301884812070057,
-0.035149816423654556,
0.230301171541214,
-0.0071844058111310005,
-0.09587523341178894,
0.11614414304494858,
0.21891102194786072,
-0.17165657877922058,
0.05059397965669632,
-0.07683534920215607,
-0.017093388363718987,
-0.060004089027643204,
0.061941154301166534,
0.015834342688322067,
0.11413582414388657,
-0.10598563402891159,
-0.048185642808675766,
0.04579314589500427,
0.05242731049656868,
-0.1288285255432129,
0.03647498041391373,
-0.06007497012615204,
0.06970037519931793,
0.03267577663064003,
-0.04076105356216431,
-0.1113738864660263,
0.10262534767389297,
0.004951728042215109,
0.1646503359079361,
-0.004215535242110491,
-0.055287107825279236,
0.08473535627126694,
-0.24971416592597961,
-0.05994122475385666,
-0.037046805024147034,
0.29815006256103516,
-0.1633767932653427,
0.05609344691038132,
0.0007762201712466776,
0.054239679127931595,
-0.1602589190006256,
-0.013510220684111118,
0.037196192890405655,
0.1374979168176651,
-0.15315566956996918,
-0.1772988885641098,
0.04811170697212219,
-0.05113061144948006,
-0.06761331111192703,
0.020611271262168884,
-0.21120119094848633,
-0.09300263971090317,
-0.12780548632144928,
0.1292770504951477,
0.045460086315870285,
0.13312500715255737,
-0.09416745603084564,
0.06272372603416443,
-0.08119922131299973,
-0.14126400649547577,
-0.12019453942775726,
0.08264324814081192,
-0.030973367393016815,
-0.09088444709777832,
0.0524025559425354,
-0.19783449172973633,
-0.03159443289041519,
-0.043203312903642654,
0.13734173774719238,
0.09107278287410736,
0.08803856372833252,
-0.10429065674543381,
-0.1096981093287468,
-0.21793408691883087,
0.11154480278491974,
0.06788044422864914,
-0.09448172897100449,
0.218530535697937,
-0.10238784551620483,
-0.009946460835635662,
0.22311680018901825,
-0.10367937386035919,
0.03984536975622177,
0.09187091141939163,
0.07218556106090546,
0.16828572750091553,
-0.023531485348939896,
0.17571847140789032,
0.017257222905755043,
0.05078475549817085,
-0.0030873785726726055,
0.08233661949634552,
-0.0030240777414292097,
0.05793916806578636,
-0.10412415862083435,
0.015467874705791473,
-0.11781076341867447,
-0.09379174560308456,
0.0795191302895546,
-0.05421045422554016,
-0.042015526443719864,
-0.03245093300938606,
-0.0734778344631195,
-0.15821553766727448,
-0.0356721393764019,
-0.09831753373146057,
0.012415219098329544,
-0.17693428695201874,
0.13640859723091125,
0.07342108339071274,
0.16424015164375305,
0.07036149501800537,
-0.05651760473847389,
-0.004627153743058443,
0.05598771572113037,
0.043875161558389664,
0.023984577506780624,
0.2538006901741028,
-0.06039389967918396,
-0.010707267560064793,
-0.026205992326140404,
0.1960565745830536,
0.06689365208148956,
-0.15653204917907715,
-0.2037421613931656,
0.03958866372704506,
0.013093000277876854,
0.018403654918074608,
-0.013076312839984894,
0.013830950483679771,
0.07716908305883408,
0.1498897671699524,
-0.012511955574154854,
0.18747733533382416,
0.026674732565879822,
0.06260751187801361,
0.1324915587902069,
-0.07659196108579636,
-0.0019074382726103067,
-0.03957003355026245,
-0.0189770869910717,
0.014317743480205536,
-0.24451377987861633,
0.19050143659114838,
-0.19245316088199615,
0.028796782717108727,
0.10757061839103699,
-0.041007477790117264,
0.0015103957848623395,
-0.06880726665258408,
0.1210779920220375,
-0.11893156170845032,
0.008332413621246815,
0.04944731667637825,
-0.18955408036708832,
0.0037509838584810495,
0.10708709061145782,
-0.09478575736284256,
-0.0630507618188858,
0.15225744247436523,
0.03188003972172737,
-0.11793572455644608,
0.017342163249850273,
-0.0068766227923333645,
-0.03655998781323433,
-0.22614268958568573,
-0.06607107073068619,
0.03961734473705292,
0.09590970724821091,
0.07767629623413086,
-0.09988703578710556,
-0.1034240648150444,
-0.2931801378726959,
0.12774884700775146,
0.0708438977599144,
-0.19082438945770264,
-0.1911829710006714,
0.02876867912709713,
0.06348199397325516,
0.020569950342178345,
-0.11600339412689209,
-0.1293637454509735,
-0.17701280117034912,
0.01364103239029646,
-0.0038905898109078407,
0.0934351235628128,
-0.07525330781936646,
0.08909071981906891,
0.09608811140060425,
0.06932611763477325,
-0.16762065887451172,
0.10284220427274704,
0.0824924111366272,
-0.11031676828861237,
0.19521138072013855,
-0.03588959947228432,
-0.09423941373825073,
-0.23295195400714874,
0.25892171263694763,
-0.004543093498796225,
-0.044557202607393265,
-0.08553504198789597,
-0.01715839095413685,
-0.24503684043884277,
-0.041773077100515366,
0.060295917093753815,
-0.15925660729408264,
0.025248432531952858,
-0.20543575286865234,
0.01919255219399929,
0.17267633974552155,
0.02738398313522339,
-0.14432117342948914,
0.0353013351559639,
-0.07599738240242004,
0.12366604804992676,
0.23639066517353058,
0.07506836205720901,
0.0109839653596282,
-0.05474391579627991,
-0.07618363946676254,
-0.012961971573531628,
0.11948779225349426,
0.14355827867984772,
-0.07268641144037247,
0.07338029146194458,
0.24389690160751343,
0.00830612052232027,
0.01758382096886635,
0.04677824303507805,
0.10037877410650253,
0.050836458802223206,
-0.036440663039684296,
-0.0411878377199173,
-0.15059781074523926,
0.0437619686126709,
0.03362724184989929,
-0.08847597241401672,
-0.035621870309114456,
-0.04590273275971413,
-0.05541393905878067,
0.0583643801510334,
-0.007058842107653618,
0.018363701179623604,
0.008402790874242783,
0.008356903679668903,
0.02725786715745926,
0.07155850529670715,
0.1400047391653061,
-0.03570454940199852,
0.21658620238304138,
0.10718066990375519,
0.014674559235572815,
0.014318159781396389,
-0.011123738251626492,
0.174417182803154,
-0.07140153646469116,
-0.09372257441282272,
-0.08993697166442871,
-0.03790394216775894,
0.009995106607675552,
-0.02931998297572136,
0.19671855866909027,
0.04167485609650612,
0.06805907934904099,
-0.030376655980944633,
-0.04652349278330803,
0.0920998603105545,
0.04380318149924278,
-0.037384431809186935,
0.04974979907274246,
0.009141571819782257,
0.09986402839422226,
0.059693507850170135,
-0.2678634822368622,
0.0014977698447182775,
0.0762983188033104,
-0.021407071501016617,
0.04465031996369362,
0.18579158186912537,
0.031424637883901596,
0.14521394670009613,
-0.11870842427015305,
-0.18175536394119263,
0.10408847033977509,
-0.007708727847784758,
-0.22666744887828827,
0.12748996913433075,
-0.10086343437433243,
0.05151573568582535,
0.019703205674886703,
0.17218723893165588,
0.03272959589958191,
-0.11495067924261093,
0.1125701516866684,
-0.0461498461663723,
-0.05643083155155182,
0.017584696412086487,
0.026834266260266304,
0.08366961032152176,
0.10989610850811005,
-0.18020889163017273,
-0.0031932757701724768,
-0.021617591381072998,
0.2745867073535919,
0.18696613609790802,
-0.10976140946149826,
0.022313058376312256,
-0.14518623054027557,
-0.06328169256448746,
0.10917960107326508,
-0.1429436206817627,
-0.0028046995867043734,
-0.20291276276111603,
0.13475893437862396,
0.043050169944763184,
-0.03567054122686386,
0.0538947619497776,
-0.06505443900823593,
-0.1458805799484253,
-0.012846608646214008,
0.11306344717741013,
-0.2161729633808136,
0.10687742382287979,
-0.20745298266410828,
0.08370298147201538,
0.08636241406202316,
0.05732717737555504,
0.05594418942928314,
0.007220945321023464,
-0.11941736936569214,
-0.005089746788144112,
0.07009372860193253,
0.04362500086426735,
-0.20887860655784607,
-0.1982441395521164,
-0.03676728904247284,
-0.07975725084543228,
-0.21738584339618683,
-0.09252900630235672,
0.056248538196086884,
0.033331405371427536,
0.07255227863788605,
-0.08350522816181183,
0.25010204315185547,
-0.014657266438007355,
0.17840361595153809,
-0.006589187774807215,
-0.08843536674976349,
-0.03957203030586243,
0.030912134796380997,
0.1069832593202591,
-0.018894866108894348,
-0.07842794060707092,
-0.19310368597507477,
0.18441808223724365,
-0.013662146404385567,
0.007787645328789949,
0.035612739622592926,
-0.09509052336215973,
0.006247402634471655,
-0.03685541823506355,
0.13285985589027405,
0.06191502511501312,
0.07215780019760132,
0.05451555922627449,
0.060675784945487976,
0.23373249173164368,
0.05342353135347366,
0.2285074144601822,
0.07294587790966034,
-0.13078679144382477,
0.005442693829536438,
0.003443002002313733,
0.21360130608081818,
-0.16796742379665375,
0.04961946979165077,
0.1242246925830841,
-0.14089791476726532,
-0.017890391871333122,
0.17452053725719452,
0.11233259737491608,
-0.1501714438199997,
0.1823202669620514,
0.038582440465688705,
-0.20047912001609802,
-0.11719104647636414,
0.05274057760834694,
-0.05877404287457466,
-0.004277828615158796,
0.083376444876194,
-0.0802747905254364,
-0.012974538840353489,
-0.07558009028434753,
0.11025229841470718,
0.1348171830177307,
-0.06948239356279373,
-0.07174452394247055,
0.12536266446113586,
0.10243593901395798,
-0.030765140429139137,
-0.10698918998241425,
0.17523719370365143,
-0.04774363338947296,
0.05184585601091385,
0.06430035084486008,
0.039738889783620834,
0.1123524010181427,
0.08930031955242157,
-0.04826541617512703,
0.15512770414352417,
-0.08275195956230164,
0.018298061564564705,
0.03131010755896568,
0.16415035724639893,
-0.020431481301784515,
-0.07760968059301376,
-0.004933828487992287,
-0.016507232561707497,
-0.12812428176403046,
0.035786498337984085,
0.09016714245080948,
0.15527452528476715,
-0.16706149280071259,
0.08018345385789871,
0.049113836139440536,
-0.17118827998638153,
-0.04543495178222656,
-0.036666180938482285,
0.13002072274684906,
-0.024951910600066185,
-0.028879862278699875,
0.09512032568454742,
-0.02508537285029888,
0.026118017733097076,
0.046285949647426605,
-0.062495291233062744,
0.07938767969608307,
0.025131884962320328,
0.11971721798181534,
-0.017524993047118187,
0.032079797238111496,
-0.05478135123848915,
-0.008676380850374699,
-0.03238709270954132,
0.00935914646834135,
0.08171671628952026,
-0.11731504648923874,
-0.05769675225019455,
-0.15979410707950592,
-0.07770392298698425,
0.18999238312244415,
-0.12572041153907776,
0.03645789250731468,
-0.2773069143295288,
0.012289309874176979,
0.050599198788404465,
-0.03622732311487198,
-0.12015508115291595,
0.06763289868831635,
-0.0016978688072413206,
-0.04407992213964462,
-0.07295471429824829,
-0.04574451223015785,
-0.09665977954864502,
-0.00484903808683157,
0.038512054830789566,
-0.02445637620985508,
0.017023276537656784,
-0.0660969540476799,
0.02806190773844719,
-0.13313056528568268,
-0.05778459832072258,
0.010907165706157684,
0.14139914512634277,
0.10232523828744888,
0.07031039893627167,
0.07042723149061203,
0.008371143601834774,
-0.020202120766043663,
0.02238251082599163,
-0.05301307514309883,
-0.13968148827552795,
0.03317403048276901,
-0.03253008425235748,
-0.07191652804613113,
0.06640303134918213,
0.0349755734205246,
0.19155368208885193,
-0.030453650280833244,
-0.0550726018846035,
0.04690467193722725,
-0.05782032385468483,
0.0008178823045454919,
0.2372828871011734,
0.11619104444980621,
0.21674536168575287,
0.11637072265148163,
0.2572607398033142,
0.05969693511724472,
-0.1482827365398407,
0.08093045651912689,
0.1430085152387619,
-0.16667556762695312,
0.102765291929245,
-0.008435588330030441,
0.02496405318379402,
-0.2208857387304306,
-0.11425264179706573,
0.014783313497900963,
0.0039300150237977505,
0.02966688573360443,
0.05007659271359444,
-0.006578831467777491,
-0.06478800624608994,
0.019107535481452942,
0.04285863786935806,
0.11342594027519226,
-0.11476457118988037,
-0.07151130586862564,
-0.10969873517751694,
-2.6261381337094864e-32,
-0.07678966224193573,
-0.1428246647119522,
-0.017155764624476433,
-0.06566387414932251,
-0.18848980963230133,
0.012442018836736679,
-0.17760133743286133,
-0.03647518903017044,
0.11889306455850601,
-0.08100099861621857,
-0.17477405071258545,
0.106739342212677,
0.04576394334435463,
0.007447164971381426,
-0.13461261987686157,
0.016365764662623405,
0.07437621802091599,
-0.10864866524934769,
0.006095238495618105,
0.16063232719898224,
0.04652021825313568,
-0.05775868147611618,
-0.16766010224819183,
-0.013997890055179596,
-0.09664327651262283,
0.05337152257561684,
-0.0010145041160285473,
-0.12246270477771759,
0.007387748919427395,
-0.006934805307537317,
-0.15321025252342224,
0.16584259271621704,
-0.05970785394310951,
-0.12211105227470398,
-0.020965809002518654,
-0.12482523918151855,
-0.1123109683394432,
0.06868530809879303,
-0.02513623610138893,
-0.042211394757032394,
0.0004911358118988574,
0.007018413860350847,
0.15420447289943695,
-0.028940672054886818,
-0.13010373711585999,
0.01733100414276123,
0.0035785536747425795,
-0.04762590304017067,
-0.08389302343130112,
-0.28073227405548096,
-0.04776093363761902,
0.05907326564192772,
0.03869318217039108,
-0.03372317552566528,
-0.09664946794509888,
-0.18948563933372498,
0.05396540090441704,
0.07248974591493607,
-0.03297914192080498,
-0.17568783462047577,
0.07409889250993729,
0.09787220507860184,
-0.06031960994005203,
-0.0739486813545227,
0.1635684072971344,
-0.004034678917378187,
0.33128535747528076,
0.12379144877195358,
-0.005243328865617514,
-0.035153888165950775,
0.04607667028903961,
0.11312049627304077,
-0.015688061714172363,
-0.0864085704088211,
0.045021042227745056,
-0.034744877368211746,
-0.11634346842765808,
-0.03108711913228035,
-0.17124703526496887,
-0.07924296706914902,
0.10935080796480179,
-0.22943450510501862,
0.2509067952632904,
0.053523700684309006,
0.04076969996094704,
0.09061205387115479,
0.032776232808828354,
0.1580304354429245,
0.06227743253111839,
0.012362993322312832,
-0.10152705758810043,
-0.05528313294053078,
-0.03410637751221657,
-0.09730841219425201,
-0.09560774266719818,
0.13233119249343872,
-0.19299361109733582,
0.1742459237575531,
0.023112252354621887,
-0.06455204635858536,
-0.03886792063713074,
-0.15139220654964447,
-0.024552883580327034,
0.035549063235521317,
0.1231803297996521,
-0.07017377018928528,
0.13373076915740967,
0.006600471213459969,
-0.1030668094754219,
-0.01420128345489502,
-0.18827098608016968,
0.2318699210882187,
0.04235334321856499,
0.1802109032869339,
0.16755305230617523,
-0.09213759005069733,
0.05669102817773819,
-0.02781647816300392,
0.14995352923870087,
0.1367167830467224,
-0.0417325459420681,
-0.10837848484516144,
0.05863703787326813,
0.1271049678325653,
0.05945214629173279,
0.08865020424127579,
-0.32228484749794006,
-0.0685744434595108,
0.01883041486144066,
-0.1491580307483673,
-0.08621937036514282,
-0.07361926138401031,
7.407091970890178e-7,
-0.21481859683990479,
0.23847424983978271,
0.001575132249854505,
0.03830401226878166,
0.11707694828510284,
0.021315820515155792,
-0.019711729139089584,
0.06132860481739044,
-0.12215734273195267,
0.12201891094446182,
0.22690826654434204,
0.04579868167638779,
0.0430920273065567,
-0.06673091650009155,
0.109627366065979,
-0.060719843953847885,
-0.07645102590322495,
0.1431206911802292,
-0.14292581379413605,
0.07645576447248459,
0.1325511783361435,
0.0985051617026329,
-0.08604038506746292,
-0.044992152601480484,
0.22803503274917603,
-0.18906283378601074,
0.1241404190659523,
-0.05957052484154701,
0.0778985470533371,
-0.07475700974464417,
0.10613541305065155,
0.08022220432758331,
-0.06639797985553741,
0.07208190113306046,
0.002033721888437867,
-0.0681285709142685,
-0.17698563635349274,
-0.061614617705345154,
0.07293523102998734,
-0.12058617174625397,
0.0948629155755043,
0.1034790575504303,
0.03845731168985367,
-0.03618042543530464,
0.1368943154811859,
0.01893625035881996,
-0.2050444334745407,
0.21163518726825714,
0.07523424178361893,
0.011558450758457184,
-0.03958910331130028,
0.14869189262390137,
0.18526442348957062,
0.16847574710845947,
0.021533528342843056,
-0.2574946880340576,
-0.05652988702058792,
-0.23153293132781982,
0.02443520352244377,
-0.051480960100889206,
-0.10542159527540207,
-0.019845472648739815,
-0.07724711298942566,
0.042472463101148605,
0.09390079230070114,
0.04327932745218277,
-0.13576142489910126,
1.1813242977071372e-34,
-0.07079237699508667,
0.027483666315674782,
0.020823374390602112,
-0.20641934871673584,
-0.016492510214447975,
-0.0763290673494339,
0.1668148785829544,
0.054000239819288254,
-0.0372169055044651,
-0.1884874850511551,
-0.045829888433218
] |
https://github.com/huggingface/datasets/issues/6008 | Dataset.from_generator consistently freezes at ~1000 rows | > By default, we write data to disk (so it can be memory-mapped) every 1000 rows/samples. You can control this with the `writer_batch_size` parameter. Also, when working with fixed-size arrays, the `ArrayXD` feature types yield better performance (e.g., in your case, `features=datasets.Features({"i": datasets.Array3D(shape=(512,512,3), dtype="float32")})` should be faster).
>
> Our support for multi-dim arrays could be better, and we plan to improve it as part of #5272.
Thanks for the explanation! The Image array was just for demonstration, I use PIL Images in practice. Does that make a difference? What's the best approach for a dataset with PIL Images as rows? | ### Describe the bug
Whenever I try to create a dataset which contains images using `Dataset.from_generator`, it freezes around 996 rows. I suppose it has something to do with memory consumption, but there's more memory available. I
Somehow it worked a few times but mostly this makes the datasets library much more cumbersome to work with because generators are the easiest way to turn an existing dataset into a Hugging Face dataset.
I've let it run in the frozen state for way longer than it can possibly take to load the actual dataset.
Let me know if you have ideas how to resolve it!
### Steps to reproduce the bug
```python
from datasets import Dataset
import numpy as np
def gen():
for row in range(10000):
yield {"i": np.random.rand(512, 512, 3)}
Dataset.from_generator(gen)
# -> 90% of the time gets stuck around 1000 rows
```
### Expected behavior
Should continue and go through all the examples yielded by the generator, or at least throw an error or somehow communicate what's going on.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 12.0.1
- Pandas version: 1.5.1
| 101 | Dataset.from_generator consistently freezes at ~1000 rows
### Describe the bug
Whenever I try to create a dataset which contains images using `Dataset.from_generator`, it freezes around 996 rows. I suppose it has something to do with memory consumption, but there's more memory available. I
Somehow it worked a few times but mostly this makes the datasets library much more cumbersome to work with because generators are the easiest way to turn an existing dataset into a Hugging Face dataset.
I've let it run in the frozen state for way longer than it can possibly take to load the actual dataset.
Let me know if you have ideas how to resolve it!
### Steps to reproduce the bug
```python
from datasets import Dataset
import numpy as np
def gen():
for row in range(10000):
yield {"i": np.random.rand(512, 512, 3)}
Dataset.from_generator(gen)
# -> 90% of the time gets stuck around 1000 rows
```
### Expected behavior
Should continue and go through all the examples yielded by the generator, or at least throw an error or somehow communicate what's going on.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 12.0.1
- Pandas version: 1.5.1
> By default, we write data to disk (so it can be memory-mapped) every 1000 rows/samples. You can control this with the `writer_batch_size` parameter. Also, when working with fixed-size arrays, the `ArrayXD` feature types yield better performance (e.g., in your case, `features=datasets.Features({"i": datasets.Array3D(shape=(512,512,3), dtype="float32")})` should be faster).
>
> Our support for multi-dim arrays could be better, and we plan to improve it as part of #5272.
Thanks for the explanation! The Image array was just for demonstration, I use PIL Images in practice. Does that make a difference? What's the best approach for a dataset with PIL Images as rows? | [
0.0378289669752121,
0.13257291913032532,
-0.0818883404135704,
0.028350619599223137,
0.13360120356082916,
0.09319490194320679,
0.0547093003988266,
0.034205954521894455,
-0.02760746330022812,
0.26326948404312134,
0.0431201308965683,
-0.10476100444793701,
-0.11509162932634354,
0.057577457278966904,
-0.07466182112693787,
-0.0746595710515976,
-0.12184637039899826,
-0.010847175493836403,
-0.09577225148677826,
-0.049611471593379974,
-0.10796714574098587,
-0.02386040985584259,
0.2239374816417694,
-0.04789411649107933,
-0.07584421336650848,
-0.23503617942333221,
-0.02769230306148529,
0.042922597378492355,
-0.07583238929510117,
-0.05259395018219948,
-0.10489513725042343,
-0.01005907915532589,
-0.07455099374055862,
0.2591508626937866,
0.000005381969003792619,
-0.05622180178761482,
0.22612124681472778,
0.0020752293057739735,
-0.09106730669736862,
0.12431670725345612,
0.22364850342273712,
-0.16900715231895447,
0.04006873816251755,
-0.08954533189535141,
-0.023706143721938133,
-0.0549728199839592,
0.06829109787940979,
0.04789244383573532,
0.09998045116662979,
-0.10241471230983734,
-0.04413529857993126,
0.017966357991099358,
0.04194965213537216,
-0.11607563495635986,
0.0699162557721138,
-0.06888508051633835,
0.0706813633441925,
0.019272828474640846,
-0.06016482785344124,
-0.1087077260017395,
0.1156788319349289,
0.006769510917365551,
0.15532852709293365,
-0.002878027269616723,
-0.10257384926080704,
0.08206162601709366,
-0.242009237408638,
-0.06843391805887222,
-0.03285478055477142,
0.27093595266342163,
-0.15073861181735992,
0.04284046217799187,
-0.015239394269883633,
0.05875032767653465,
-0.14677587151527405,
-0.03438977897167206,
0.034283168613910675,
0.15236175060272217,
-0.14797022938728333,
-0.17502175271511078,
0.06388057768344879,
-0.04846890643239021,
-0.06302973628044128,
0.02142142318189144,
-0.20740504562854767,
-0.08717110008001328,
-0.10679072886705399,
0.11472567170858383,
0.018887922167778015,
0.13554835319519043,
-0.06598170101642609,
0.0787787213921547,
-0.09376677125692368,
-0.15999136865139008,
-0.09506010264158249,
0.0923629179596901,
-0.04521368071436882,
-0.11335913836956024,
0.048393942415714264,
-0.20841281116008759,
-0.04073821008205414,
-0.026298653334379196,
0.12365072965621948,
0.07714696228504181,
0.12260656803846359,
-0.10161348432302475,
-0.11526124179363251,
-0.17649205029010773,
0.11376120150089264,
0.0443979874253273,
-0.10832911729812622,
0.24113959074020386,
-0.08828232437372208,
-0.007895256392657757,
0.24179306626319885,
-0.09381424635648727,
0.03798218443989754,
0.09166281670331955,
0.05716351792216301,
0.166747584939003,
-0.01919153518974781,
0.17550982534885406,
0.022008344531059265,
0.020541083067655563,
-0.00438820431008935,
0.12685656547546387,
0.015827743336558342,
0.056019093841314316,
-0.12226026505231857,
0.02457600086927414,
-0.09899241477251053,
-0.10439275205135345,
0.08752695471048355,
-0.05064782500267029,
-0.0664118230342865,
-0.0005179413128644228,
-0.0919918492436409,
-0.17567290365695953,
-0.047012582421302795,
-0.08280768245458603,
0.019190916791558266,
-0.19068460166454315,
0.1491609662771225,
0.0638175904750824,
0.15985402464866638,
0.07201647013425827,
-0.0823696032166481,
-0.018471557646989822,
0.042099207639694214,
0.08176475018262863,
0.02038266696035862,
0.2766808569431305,
-0.061796147376298904,
-0.009393120184540749,
-0.02687874622642994,
0.2048153281211853,
0.041189566254615784,
-0.18208810687065125,
-0.19300921261310577,
0.00005399796646088362,
0.005966715048998594,
-0.015140377916395664,
-0.015076865442097187,
0.0187119971960783,
0.05205269157886505,
0.14409291744232178,
-0.009947076439857483,
0.2060614377260208,
0.01988331973552704,
0.049243174493312836,
0.1411062628030777,
-0.09527821093797684,
0.0023765056394040585,
-0.0504167266190052,
-0.006020064000040293,
-0.004299693275243044,
-0.2231888771057129,
0.19039373099803925,
-0.19222576916217804,
0.030442940071225166,
0.12723766267299652,
-0.043745435774326324,
-0.013250617310404778,
-0.07811064273118973,
0.14820855855941772,
-0.10860635340213776,
-0.004333019256591797,
0.06345729529857635,
-0.1833147555589676,
0.000017528984244563617,
0.10511147975921631,
-0.07584883272647858,
-0.09416723251342773,
0.15948176383972168,
0.048502981662750244,
-0.10622074455022812,
0.0046141305938363075,
0.01937454752624035,
-0.03026013821363449,
-0.210208922624588,
-0.08468439429998398,
0.003262495156377554,
0.08490201085805893,
0.07203071564435959,
-0.10563834011554718,
-0.06509595364332199,
-0.2549358904361725,
0.10847299546003342,
0.04718048870563507,
-0.17669835686683655,
-0.1884041577577591,
0.050177957862615585,
0.07154004275798798,
0.024263454601168633,
-0.11115577816963196,
-0.1282362937927246,
-0.17681564390659332,
0.013384522870182991,
-0.0357348658144474,
0.07720806449651718,
-0.06741634011268616,
0.05992518365383148,
0.09733171761035919,
0.07309360802173615,
-0.14419487118721008,
0.09956445544958115,
0.08502732217311859,
-0.11466854065656662,
0.18422091007232666,
-0.04164022579789162,
-0.08523977547883987,
-0.227060928940773,
0.2627723217010498,
-0.0042493389919400215,
-0.010693221352994442,
-0.08744371682405472,
-0.025505859404802322,
-0.2297615110874176,
-0.04805154725909233,
0.03389723226428032,
-0.14343784749507904,
0.01987207867205143,
-0.19911959767341614,
0.018670083954930305,
0.19067592918872833,
0.04220530018210411,
-0.14135122299194336,
0.03646885231137276,
-0.07552085071802139,
0.11873523145914078,
0.2206249237060547,
0.06980222463607788,
0.022903813049197197,
-0.05015071853995323,
-0.1024954691529274,
0.0057088457979261875,
0.10679100453853607,
0.13144755363464355,
-0.05734795331954956,
0.08055764436721802,
0.2314029484987259,
0.01270208042114973,
0.012435957789421082,
0.038157399743795395,
0.12641997635364532,
0.0467967726290226,
-0.010195815935730934,
-0.03412296622991562,
-0.15418751537799835,
0.041847165673971176,
0.023940419778227806,
-0.09199535101652145,
-0.044252730906009674,
-0.05757393315434456,
-0.06288222223520279,
0.06332552433013916,
-0.04163847491145134,
0.028939910233020782,
0.014753890223801136,
0.009166000410914421,
0.03398135304450989,
0.06805101782083511,
0.13594704866409302,
-0.030289582908153534,
0.22601936757564545,
0.10757371038198471,
-0.005245159845799208,
0.008751150220632553,
-0.011293280869722366,
0.20197740197181702,
-0.04481717571616173,
-0.0973777249455452,
-0.09082228690385818,
-0.01624581776559353,
0.010451787151396275,
-0.04094911739230156,
0.18297839164733887,
0.025195743888616562,
0.06740354746580124,
-0.05473104119300842,
-0.04337335005402565,
0.10110925137996674,
0.06264181435108185,
-0.033052708953619,
0.04688982293009758,
0.011973565444350243,
0.09851740300655365,
0.045226529240608215,
-0.26675447821617126,
0.010332849808037281,
0.08227179944515228,
-0.020028073340654373,
0.06872076541185379,
0.19622497260570526,
0.020206378772854805,
0.15073378384113312,
-0.09757062792778015,
-0.1883689910173416,
0.1069931909441948,
-0.0172828771173954,
-0.21517276763916016,
0.10026039928197861,
-0.11170588433742523,
0.025327205657958984,
0.022185731679201126,
0.15831303596496582,
0.027617687359452248,
-0.10283426195383072,
0.08786161988973618,
0.0042480300180613995,
-0.05706828087568283,
0.02384061925113201,
0.05898554250597954,
0.08005718141794205,
0.11747453361749649,
-0.18800866603851318,
0.015607386827468872,
0.004819395020604134,
0.27519237995147705,
0.2108459770679474,
-0.10662033408880234,
0.015589030459523201,
-0.15705056488513947,
-0.068206787109375,
0.10631504654884338,
-0.13916930556297302,
0.010657384060323238,
-0.1939980834722519,
0.1229352205991745,
0.04129714146256447,
-0.03315560147166252,
0.03276851400732994,
-0.04041425883769989,
-0.139262393116951,
-0.000504158204421401,
0.11190255731344223,
-0.20652852952480316,
0.1329292356967926,
-0.19577786326408386,
0.08376940339803696,
0.060806941241025925,
0.047004565596580505,
0.09287165850400925,
-0.008134976960718632,
-0.10051307082176208,
-0.002020933199673891,
0.06760155409574509,
0.042371246963739395,
-0.2129540890455246,
-0.1882854849100113,
-0.048644110560417175,
-0.10188831388950348,
-0.2355419397354126,
-0.09897568821907043,
0.07381033152341843,
-0.003996068611741066,
0.05490248650312424,
-0.08255152404308319,
0.22219890356063843,
-0.018904557451605797,
0.16763430833816528,
0.024909310042858124,
-0.10402087867259979,
-0.05612275004386902,
0.025591934099793434,
0.10275773704051971,
-0.021366599947214127,
-0.09167742729187012,
-0.2074892669916153,
0.19246259331703186,
-0.0298762246966362,
0.0030786634888499975,
-0.005051450338214636,
-0.07303813099861145,
0.0034600901417434216,
-0.04523640125989914,
0.12912891805171967,
0.04080358147621155,
0.05947508662939072,
0.05502832680940628,
0.07776203751564026,
0.18765871226787567,
0.02120037190616131,
0.21211032569408417,
0.09113597124814987,
-0.14634814858436584,
0.030588308349251747,
-0.03286594897508621,
0.1963927149772644,
-0.1969119906425476,
0.04176308214664459,
0.12735602259635925,
-0.16019143164157867,
-0.012536461465060711,
0.18340924382209778,
0.12634964287281036,
-0.16034002602100372,
0.18175528943538666,
0.025780390948057175,
-0.20392128825187683,
-0.12069427967071533,
0.07213037461042404,
-0.06297704577445984,
-0.008516404777765274,
0.053069304674863815,
-0.08561644703149796,
0.00035037571797147393,
-0.06978385150432587,
0.10357744991779327,
0.11882033199071884,
-0.08161095529794693,
-0.08348630368709564,
0.11729699373245239,
0.0964374840259552,
-0.05342666432261467,
-0.09553473442792892,
0.18154512345790863,
-0.04082776978611946,
0.09129634499549866,
0.07848035544157028,
0.034166280180215836,
0.08173646032810211,
0.08033975213766098,
-0.07038474828004837,
0.12331127375364304,
-0.11377936601638794,
0.012120538391172886,
0.01658962480723858,
0.1661282330751419,
-0.031195176765322685,
-0.08609673380851746,
-0.005429012235254049,
-0.037997208535671234,
-0.12311985343694687,
0.03243054077029228,
0.08125048130750656,
0.14212903380393982,
-0.23091384768486023,
0.08273836225271225,
0.06843177229166031,
-0.15691572427749634,
-0.04443935677409172,
-0.02988629788160324,
0.15594784915447235,
0.0008537964895367622,
-0.005873400252312422,
0.07219088077545166,
-0.02848142571747303,
0.02283182367682457,
0.016073867678642273,
-0.07306353002786636,
0.07439547032117844,
0.03607620671391487,
0.14386357367038727,
-0.02175050973892212,
0.02707587741315365,
-0.04849439859390259,
0.01803675852715969,
-0.05744098499417305,
0.011042919009923935,
0.06725100427865982,
-0.10051923990249634,
-0.031113041564822197,
-0.1343056708574295,
-0.04299077391624451,
0.20586323738098145,
-0.1390535682439804,
0.04594826325774193,
-0.27988359332084656,
-0.02000640518963337,
0.05270683392882347,
-0.022255437448620796,
-0.09677032381296158,
0.07836345583200455,
-0.003264825325459242,
-0.06131094694137573,
-0.08634667098522186,
-0.06973886489868164,
-0.10248306393623352,
-0.033734600991010666,
0.030078984797000885,
-0.015204444527626038,
0.0068684788420796394,
-0.06002631410956383,
0.016404088586568832,
-0.1155049055814743,
-0.05898211896419525,
0.026659807190299034,
0.12587852776050568,
0.12863978743553162,
0.060602400451898575,
0.04115410894155502,
0.021122468635439873,
-0.007844536565244198,
0.02892625704407692,
-0.0015584956854581833,
-0.1221136748790741,
0.021559443324804306,
-0.003108528209850192,
-0.09209970384836197,
0.061826594173908234,
0.02858092077076435,
0.1704343557357788,
-0.015546106733381748,
-0.04666407033801079,
0.04581024497747421,
-0.06706268340349197,
0.0029747067019343376,
0.20752690732479095,
0.14123518764972687,
0.2575797438621521,
0.09579697251319885,
0.23903606832027435,
0.07519379258155823,
-0.14094236493110657,
0.08252733945846558,
0.11101873964071274,
-0.14863599836826324,
0.11069650202989578,
0.006196212023496628,
0.00467589171603322,
-0.23939108848571777,
-0.1320393979549408,
0.009042225778102875,
0.0016563421813771129,
0.030030811205506325,
0.04618161916732788,
0.02277020551264286,
-0.04745166376233101,
0.01964300312101841,
0.0426366925239563,
0.0897967517375946,
-0.11551664024591446,
-0.054530393332242966,
-0.1235128715634346,
-2.590095419798161e-32,
-0.08473504334688187,
-0.1546001136302948,
0.00878792442381382,
-0.06327422708272934,
-0.16286905109882355,
-0.014209499582648277,
-0.1362995207309723,
-0.0461694598197937,
0.12805147469043732,
-0.05335186794400215,
-0.15708030760288239,
0.10920607298612595,
0.041603829711675644,
0.04914851486682892,
-0.12628600001335144,
0.0007100522634573281,
0.07290729135274887,
-0.1090579628944397,
0.02635900117456913,
0.13316571712493896,
0.02557525224983692,
-0.06550347059965134,
-0.15524865686893463,
-0.01943032257258892,
-0.09350990504026413,
0.04861695319414139,
0.018170837312936783,
-0.13474616408348083,
0.007171573583036661,
0.004434066824615002,
-0.14330744743347168,
0.164383202791214,
-0.04797103628516197,
-0.11518331617116928,
-0.04009094461798668,
-0.1326586902141571,
-0.10738313943147659,
0.0950152724981308,
-0.0021456549875438213,
-0.03857453167438507,
-0.017083790153265,
-0.01115809753537178,
0.1689160168170929,
-0.02164735458791256,
-0.12203541398048401,
0.01968378946185112,
0.009329062886536121,
-0.036594852805137634,
-0.07963544875383377,
-0.26565128564834595,
-0.04561460390686989,
0.05931427329778671,
0.05421959236264229,
-0.02279670350253582,
-0.10070739686489105,
-0.19307130575180054,
0.06321416795253754,
0.055295608937740326,
-0.04987773299217224,
-0.18753266334533691,
0.08302506059408188,
0.09974323213100433,
-0.034965332597494125,
-0.060313206166028976,
0.15759751200675964,
-0.023293204605579376,
0.32799914479255676,
0.12019085139036179,
0.011981607414782047,
-0.024250991642475128,
0.04408743232488632,
0.11169809848070145,
-0.025641070678830147,
-0.08821234107017517,
0.051957618445158005,
-0.006482712458819151,
-0.11279451847076416,
-0.029337067157030106,
-0.19782473146915436,
-0.06745512038469315,
0.10018597543239594,
-0.2324506640434265,
0.25657719373703003,
0.05867791548371315,
0.05756116658449173,
0.07945765554904938,
0.021978866308927536,
0.15577660501003265,
0.09175054728984833,
0.006163309328258038,
-0.06705396622419357,
-0.05012379586696625,
-0.025710230693221092,
-0.09044471383094788,
-0.10912587493658066,
0.1323210895061493,
-0.20951016247272491,
0.15882673859596252,
0.010441441088914871,
-0.07548727095127106,
-0.05216379091143608,
-0.14353755116462708,
-0.03473467379808426,
0.04797237366437912,
0.11540821939706802,
-0.07652828842401505,
0.12276998907327652,
-0.002192720538005233,
-0.10184846818447113,
-0.016664354130625725,
-0.1960732787847519,
0.23684212565422058,
0.03705520182847977,
0.18712638318538666,
0.18614079058170319,
-0.08296509087085724,
0.03737055882811546,
-0.021606435999274254,
0.14809048175811768,
0.11503876745700836,
-0.010529577732086182,
-0.09785426408052444,
0.06926346570253372,
0.10955698043107986,
0.06257645040750504,
0.09682152420282364,
-0.3101916015148163,
-0.036640942096710205,
0.021693725138902664,
-0.14596256613731384,
-0.07711178809404373,
-0.0692584216594696,
7.475131269529811e-7,
-0.2000209391117096,
0.23193252086639404,
0.025397267192602158,
0.06632691621780396,
0.1387389600276947,
0.05714236572384834,
-0.024943677708506584,
0.06514821201562881,
-0.13223600387573242,
0.1195325031876564,
0.24545854330062866,
0.04416899383068085,
0.04767557606101036,
-0.03849915415048599,
0.12288501858711243,
-0.06307750940322876,
-0.06431423127651215,
0.1483154147863388,
-0.1387268602848053,
0.09949614852666855,
0.1633119136095047,
0.09268128126859665,
-0.10987334698438644,
-0.06121543422341347,
0.22842103242874146,
-0.20132707059383392,
0.1283522993326187,
-0.0523109957575798,
0.0464327409863472,
-0.07956171035766602,
0.08866285532712936,
0.09890279173851013,
-0.06167875975370407,
0.0733163058757782,
-0.002264217473566532,
-0.07525848597288132,
-0.17375168204307556,
-0.07614143192768097,
0.07992152869701385,
-0.1312229484319687,
0.08513423800468445,
0.10958103090524673,
0.05596451088786125,
-0.0037955460138618946,
0.12920506298542023,
0.005713669583201408,
-0.20457467436790466,
0.19586904346942902,
0.09418264031410217,
0.008614255115389824,
-0.04408429190516472,
0.13500480353832245,
0.1569589525461197,
0.14249947667121887,
0.0013907802058383822,
-0.28272655606269836,
-0.056167613714933395,
-0.21398144960403442,
0.01083203125745058,
-0.033707596361637115,
-0.11739720404148102,
0.001019359682686627,
-0.07266867160797119,
-0.007499307859688997,
0.13978900015354156,
0.06548702716827393,
-0.13211007416248322,
1.3320265764911412e-34,
-0.08001064509153366,
0.028036685660481453,
0.02264546975493431,
-0.20410698652267456,
-0.021594377234578133,
-0.09495499730110168,
0.16572009027004242,
0.05229398235678673,
-0.05368806794285774,
-0.1787876933813095,
-0.02388862892985344
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | This error means that one of the int32 (`Value("int32")`) columns in the dataset has a value that is out of the valid (int32) range.
I'll open a PR to print the name of a problematic column to make debugging such errors easier. | ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 42 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
This error means that one of the int32 (`Value("int32")`) columns in the dataset has a value that is out of the valid (int32) range.
I'll open a PR to print the name of a problematic column to make debugging such errors easier. | [
0.009656712412834167,
0.09457047283649445,
0.028397396206855774,
-0.10254718363285065,
0.300279438495636,
0.07912066578865051,
0.11113177239894867,
0.15341193974018097,
0.008289691060781479,
0.17992077767848969,
0.055744316428899765,
-0.09257358312606812,
-0.08333378285169601,
0.008388161659240723,
-0.11378554999828339,
-0.090740866959095,
-0.06067996099591255,
-0.15912677347660065,
0.016942394897341728,
0.055824410170316696,
-0.15361841022968292,
0.11855024844408035,
0.17527858912944794,
-0.22632110118865967,
-0.12296482175588608,
-0.2910356819629669,
0.0022228776942938566,
0.17556490004062653,
-0.020907439291477203,
-0.21034255623817444,
0.06216181442141533,
-0.16256019473075867,
0.05563400313258171,
0.1498006135225296,
0.0000046960658437456004,
-0.0551123209297657,
0.11053449660539627,
0.07068122923374176,
-0.15089985728263855,
0.06700064241886139,
0.2145037055015564,
-0.10308168083429337,
-0.0357460156083107,
-0.026931282132864,
0.11480947583913803,
-0.07500673830509186,
-0.12224745005369186,
0.035788483917713165,
0.02528032660484314,
0.27487441897392273,
0.0060133421793580055,
-0.0808195024728775,
0.2503894865512848,
-0.11519195884466171,
-0.05395183712244034,
-0.06643125414848328,
0.07898350059986115,
0.1663738489151001,
-0.13938693702220917,
-0.05554361641407013,
-0.08304992318153381,
-0.0009695275803096592,
-0.0009712671162560582,
-0.026312584057450294,
-0.15495742857456207,
0.07126854360103607,
-0.013934827409684658,
-0.0546758733689785,
0.03261517733335495,
0.2576163709163666,
-0.06230660527944565,
0.07801792025566101,
-0.1044859066605568,
0.02031579613685608,
-0.04815537482500076,
-0.1854347586631775,
-0.0710115134716034,
0.1660001277923584,
-0.10143792629241943,
0.02896159701049328,
-0.026478266343474388,
0.04505506530404091,
-0.0430871956050396,
0.15841242671012878,
-0.20206880569458008,
-0.09515172988176346,
-0.24907474219799042,
0.14570336043834686,
0.08530858904123306,
-0.15056854486465454,
0.11756666749715805,
0.06994961202144623,
-0.05212690681219101,
-0.05743562802672386,
-0.14526347815990448,
-0.04358519986271858,
-0.014195523224771023,
-0.16825440526008606,
-0.06442379951477051,
-0.18305546045303345,
-0.18051135540008545,
-0.22835206985473633,
-0.05984804034233093,
0.1746799647808075,
0.05000065639615059,
-0.060966771095991135,
-0.3419525921344757,
0.09316908568143845,
0.15037564933300018,
0.004035145044326782,
-0.045790400356054306,
0.04516245424747467,
-0.22489508986473083,
-0.06493792682886124,
0.11957480758428574,
0.053262170404195786,
0.029500043019652367,
0.0069556087255477905,
-0.10344421118497849,
0.0841095820069313,
0.04022393375635147,
0.1627846360206604,
0.13037370145320892,
0.1294030398130417,
0.07624851167201996,
0.08149987459182739,
-0.030217502266168594,
-0.014819958247244358,
-0.05357777699828148,
-0.01887156441807747,
-0.029313350096344948,
0.11997256428003311,
0.10192769020795822,
-0.10122009366750717,
0.1887286752462387,
-0.04151548445224762,
-0.034036800265312195,
-0.0030987299978733063,
-0.00421995809301734,
-0.07227349281311035,
0.02469581738114357,
-0.29005277156829834,
-0.11250808835029602,
-0.027176422998309135,
0.037489473819732666,
-0.011130898259580135,
0.19486244022846222,
0.05989031493663788,
-0.02225806750357151,
0.05513874813914299,
-0.3139064908027649,
0.035693105310201645,
-0.20406027138233185,
0.05558670312166214,
0.028463352471590042,
0.12348439544439316,
0.0055081951431930065,
-0.19818313419818878,
-0.15235131978988647,
-0.0875188559293747,
0.03675125539302826,
-0.02459813468158245,
0.06047205254435539,
-0.14809690415859222,
0.003394159721210599,
0.05553203448653221,
0.03024313412606716,
0.17436692118644714,
-0.03362385556101799,
0.06137816980481148,
0.21813108026981354,
0.24570848047733307,
-0.0951843336224556,
0.02393963932991028,
-0.11892037093639374,
-0.0757371187210083,
-0.08920329809188843,
0.13218700885772705,
-0.2851983606815338,
0.1889612376689911,
0.06884597986936569,
-0.2631971836090088,
0.05737824738025665,
-0.013590523041784763,
0.004782065283507109,
-0.03132670372724533,
0.0265289768576622,
0.1519167721271515,
-0.17339248955249786,
-0.0755852535367012,
0.028300656005740166,
-0.05583135038614273,
0.07974544167518616,
-0.11540090292692184,
0.17713883519172668,
-0.2418544441461563,
0.10775066912174225,
-0.032601386308670044,
0.04320235922932625,
-0.24560503661632538,
-0.010073219425976276,
-0.08545386046171188,
-0.0074621220119297504,
-0.03443584963679314,
-0.015260113403201103,
-0.17713221907615662,
0.005297270603477955,
0.008816391229629517,
0.042079050093889236,
-0.20128436386585236,
-0.06171054765582085,
0.018201565369963646,
-0.08929288387298584,
0.010389906354248524,
0.16789071261882782,
-0.0014499841490760446,
-0.08047416061162949,
-0.07594913244247437,
0.005906371399760246,
0.14366160333156586,
0.027214299887418747,
0.20461896061897278,
-0.10246128588914871,
-0.03912544250488281,
-0.002603942761197686,
0.00844927504658699,
-0.030459770932793617,
-0.05201491713523865,
0.109295554459095,
0.0973731130361557,
-0.04137824475765228,
-0.09538456797599792,
0.0019644564017653465,
0.08468466252088547,
-0.011607726104557514,
-0.14975018799304962,
-0.02382618933916092,
-0.24581998586654663,
0.00850741658359766,
-0.05638178065419197,
0.03661472350358963,
0.13700057566165924,
0.06644269078969955,
-0.05698458477854729,
0.03190973028540611,
0.0022453395649790764,
-0.04023708030581474,
0.15140609443187714,
0.036351278424263,
-0.13197387754917145,
0.3015817403793335,
0.0742402896285057,
-0.03391881659626961,
0.045967523008584976,
0.03222883865237236,
0.05870652571320534,
-0.023732736706733704,
0.1473410725593567,
-0.061593472957611084,
-0.21027223765850067,
0.36453598737716675,
-0.02877887524664402,
0.02079159766435623,
0.13827326893806458,
0.04910493642091751,
-0.11417054384946823,
0.04588836058974266,
-0.07703665643930435,
0.0019906060770154,
0.08444476872682571,
-0.05144098028540611,
-0.05900797247886658,
-0.05611634626984596,
-0.06588153541088104,
0.019598692655563354,
-0.08013314008712769,
0.0699470043182373,
-0.10836756974458694,
0.05986979976296425,
-0.06268041580915451,
-0.08727557957172394,
0.04244954138994217,
0.16344036161899567,
-0.03764043375849724,
0.029593197628855705,
0.21222719550132751,
-0.09419969469308853,
-0.16264788806438446,
-0.05168341100215912,
0.039517808705568314,
0.022711528465151787,
-0.01390431635081768,
-0.06553836166858673,
-0.1389092206954956,
-0.09073420614004135,
-0.08913692831993103,
0.07340127229690552,
-0.04766012728214264,
0.06400728970766068,
0.02062789909541607,
0.013335689902305603,
-0.03398141637444496,
0.016925618052482605,
0.01661674678325653,
0.20093266665935516,
-0.007422654423862696,
0.19646568596363068,
0.243182972073555,
-0.1660667210817337,
-0.07503834366798401,
0.03202812746167183,
-0.13735543191432953,
0.08650245517492294,
0.11583686619997025,
0.15934056043624878,
0.05332937836647034,
0.07091446965932846,
-0.010717518627643585,
-0.004535519052296877,
-0.08441495895385742,
0.09626125544309616,
0.09125839918851852,
-0.10494532436132431,
0.17265619337558746,
-0.013476905412971973,
0.08720684051513672,
-0.3380545377731323,
-0.14192524552345276,
-0.06901174783706665,
-0.040251825004816055,
0.040105078369379044,
0.05326226353645325,
-0.22947195172309875,
-0.07081545889377594,
0.14559565484523773,
-0.16831503808498383,
-0.2177887260913849,
-0.03298012539744377,
0.3428860306739807,
0.05782369151711464,
0.03518123924732208,
0.10321272909641266,
-0.05086955800652504,
-0.08283645659685135,
0.08656223863363266,
-0.1555335968732834,
-0.008432932198047638,
-0.17583006620407104,
0.08378273248672485,
-0.08138406276702881,
0.0636586844921112,
0.07536053657531738,
0.01946837455034256,
-0.03193814679980278,
-0.01709393411874771,
0.1348324865102768,
-0.2173939347267151,
0.18211081624031067,
-0.005445717368274927,
-0.08593827486038208,
0.27049800753593445,
-0.0032528573647141457,
0.15052089095115662,
0.18225105106830597,
-0.06250595301389694,
0.10238084197044373,
0.07473233342170715,
0.006812513340264559,
-0.2424095720052719,
-0.11055702716112137,
0.06286413222551346,
-0.1543123871088028,
-0.0559416301548481,
0.03213472664356232,
0.08984861522912979,
-0.1449013203382492,
-0.03007817082107067,
-0.29131969809532166,
0.16563083231449127,
0.0701945573091507,
0.1028418093919754,
0.055893730372190475,
-0.06258924305438995,
0.02160830982029438,
-0.0026543245185166597,
0.04225059226155281,
-0.12926842272281647,
-0.03769294545054436,
-0.08294837921857834,
0.0553157813847065,
0.1330539435148239,
0.021688971668481827,
0.05479729548096657,
0.06597398966550827,
-0.056269727647304535,
-0.1349867284297943,
0.14412526786327362,
0.15724922716617584,
0.033660922199487686,
-0.07506062090396881,
0.09069601446390152,
0.10415356606245041,
-0.027633637189865112,
0.15386024117469788,
0.08643825352191925,
0.035705242305994034,
-0.1491578370332718,
-0.0716402530670166,
0.031198784708976746,
0.02133377455174923,
0.16404569149017334,
0.012994849123060703,
0.027501562610268593,
-0.024335764348506927,
0.372873991727829,
0.16760818660259247,
0.008117987774312496,
0.012178181670606136,
-0.011931236833333969,
-0.20337051153182983,
-0.23392483592033386,
-0.19272394478321075,
0.11701203137636185,
0.26644381880760193,
-0.11095768213272095,
-0.04409076273441315,
0.037254951894283295,
-0.10845471173524857,
0.15649984776973724,
0.08095131069421768,
0.014296861365437508,
-0.03987666219472885,
0.09765837341547012,
-0.13957346975803375,
0.0966576635837555,
-0.015330368652939796,
0.4009614586830139,
-0.021354245021939278,
-0.04102849215269089,
0.053944285959005356,
-0.04177761450409889,
-0.001569744199514389,
0.11205988377332687,
-0.16107022762298584,
0.048529256135225296,
0.006522409617900848,
0.0897434651851654,
-0.01113052573055029,
0.24773140251636505,
-0.03469337150454521,
-0.024931209161877632,
-0.24475954473018646,
-0.11572320014238358,
-0.059351738542318344,
0.20780111849308014,
0.09721609205007553,
0.1473301649093628,
-0.14921700954437256,
-0.050581853836774826,
0.10003906488418579,
0.01736634597182274,
-0.06644421070814133,
-0.01539111789315939,
0.08002208918333054,
0.13793641328811646,
0.04470515996217728,
0.11786621809005737,
-0.21435187757015228,
0.004490341059863567,
0.07951308786869049,
0.014016438275575638,
0.13466031849384308,
0.029781220480799675,
0.0055236429907381535,
0.08470863103866577,
0.06856705248355865,
0.11224297434091568,
-0.10613631457090378,
0.006786843296140432,
0.0534418486058712,
0.2636270821094513,
-0.23372529447078705,
0.06885362416505814,
-0.18880337476730347,
-0.031421445310115814,
0.07788430154323578,
0.00017960091645363718,
-0.01075437106192112,
-0.03560531884431839,
-0.04128468781709671,
0.04771841689944267,
-0.061702530831098557,
-0.10647138953208923,
-0.03810501471161842,
0.25681421160697937,
-0.2175809144973755,
0.00874988455325365,
0.22607450187206268,
-0.11272464692592621,
0.03325258940458298,
0.16981551051139832,
-0.04885473474860191,
-0.07521160691976547,
-0.19957415759563446,
-0.0989527627825737,
-0.086904376745224,
0.16858400404453278,
0.0017310897819697857,
-0.06894630938768387,
-0.123754121363163,
-0.0340472050011158,
0.060406170785427094,
-0.03744811564683914,
-0.010740378871560097,
-0.0032517763320356607,
0.1377548724412918,
-0.1560850292444229,
-0.07207032293081284,
-0.09612755477428436,
0.08092925697565079,
0.08189502358436584,
-0.09589753299951553,
0.10975182801485062,
-0.03947451338171959,
-0.031449757516384125,
0.05718901753425598,
-0.006607442162930965,
-0.017021238803863525,
0.1329885870218277,
0.11852100491523743,
0.037561047822237015,
0.1909562051296234,
0.21606948971748352,
-0.14357520639896393,
-0.10785653442144394,
0.26265832781791687,
0.09117700904607773,
-0.16432255506515503,
0.010910370387136936,
0.039607007056474686,
0.007138177752494812,
-0.2373114973306656,
-0.07672784477472305,
0.171210378408432,
0.16020335257053375,
0.23470944166183472,
-0.0941038504242897,
-0.13453146815299988,
-0.1793793886899948,
-0.04937228187918663,
-0.10615569353103638,
0.1720024049282074,
-0.016809402033686638,
-0.0956011638045311,
0.10535416007041931,
-2.383078081117291e-32,
-0.039642397314310074,
-0.08205016702413559,
-0.042046595364809036,
-0.036182790994644165,
-0.33127349615097046,
0.11322882771492004,
-0.023282956331968307,
-0.07143697887659073,
-0.06292624026536942,
-0.013366400264203548,
-0.1527349054813385,
-0.062459807842969894,
0.011120706796646118,
0.004542923998087645,
-0.06523233652114868,
0.07044661045074463,
-0.03981504961848259,
0.05611724406480789,
0.02288234978914261,
0.037243347615003586,
0.04601361230015755,
0.062271472066640854,
-0.0005957273533567786,
-0.10572879761457443,
-0.2229616492986679,
0.11123496294021606,
-0.029945475980639458,
0.06247386336326599,
0.18549440801143646,
-0.09161553531885147,
-0.05046698823571205,
0.19723856449127197,
0.1168028935790062,
-0.11934474855661392,
-0.02980457805097103,
0.10347867757081985,
-0.14921022951602936,
-0.04893799498677254,
-0.0993228405714035,
0.12996284663677216,
0.17927008867263794,
0.03317924588918686,
0.08586988598108292,
-0.26266226172447205,
0.06430396437644958,
0.09627345204353333,
0.04912879690527916,
-0.10188495367765427,
-0.08113753795623779,
-0.1336800754070282,
0.022274894639849663,
0.10874472558498383,
-0.04827867075800896,
0.14366459846496582,
0.05433947220444679,
-0.15857556462287903,
-0.11153203994035721,
0.14610378444194794,
0.00411801366135478,
-0.10059504956007004,
0.21085675060749054,
-0.016003767028450966,
-0.006098954938352108,
0.001206929562613368,
0.06878626346588135,
0.07970213890075684,
0.28674688935279846,
0.0016764634056016803,
-0.05145770683884621,
-0.04237474128603935,
0.012264244258403778,
0.0751974806189537,
-0.021052656695246696,
-0.07070139795541763,
0.0006162490462884307,
-0.12472567707300186,
-0.09538636356592178,
-0.010072888806462288,
0.05700232461094856,
-0.09135500341653824,
0.04916109889745712,
0.10449908673763275,
0.0642109140753746,
0.054103586822748184,
0.0420956052839756,
0.1937851905822754,
-0.008836491033434868,
-0.008661175146698952,
-0.05894887447357178,
-0.1109684556722641,
-0.05034260079264641,
0.08822517842054367,
-0.02393379621207714,
-0.18838587403297424,
-0.05187825486063957,
0.15607091784477234,
0.00467604910954833,
0.11038737744092941,
-0.17016081511974335,
-0.06010426580905914,
-0.11515477299690247,
-0.0896366685628891,
-0.09920739382505417,
-0.09018309414386749,
0.1907949149608612,
0.1363425850868225,
0.08417811244726181,
0.12381139397621155,
-0.1238579973578453,
-0.09765633940696716,
-0.02426992729306221,
-0.27496567368507385,
0.16048899292945862,
0.2922065258026123,
0.17590399086475372,
-0.14565213024616241,
0.050185032188892365,
-0.1455840915441513,
0.16430160403251648,
0.06957726180553436,
-0.07218054682016373,
-0.11679471284151077,
-0.029767243191599846,
-0.03778386116027832,
-0.04891255870461464,
0.044674161821603775,
-0.11771456897258759,
-0.07350894063711166,
-0.004775581881403923,
-0.0011775171151384711,
0.051953401416540146,
0.08874495327472687,
6.786450512663578e-7,
-0.36413779854774475,
0.27956289052963257,
-0.08679476380348206,
0.026698315516114235,
-0.16028812527656555,
-0.006988183595240116,
-0.18391598761081696,
0.002842017449438572,
-0.21157340705394745,
0.08417639136314392,
0.2580553889274597,
0.009095890447497368,
-0.04375891759991646,
0.009013835340738297,
0.08440104126930237,
0.03129890188574791,
-0.020941272377967834,
0.10550066083669662,
-0.0016907901735976338,
-0.011272191070020199,
0.10287715494632721,
0.0484054833650589,
0.12767095863819122,
-0.10665994137525558,
0.048939988017082214,
-0.11283589154481888,
-0.16963103413581848,
-0.10858044773340225,
-0.01252437848597765,
0.04868007451295853,
0.0150448651984334,
0.04772745817899704,
-0.08344123512506485,
0.13185864686965942,
0.0042229313403368,
0.023599185049533844,
-0.034864675253629684,
-0.07993350923061371,
-0.05814579501748085,
0.11037851125001907,
0.06172661483287811,
0.05100079998373985,
-0.050427138805389404,
-0.038065724074840546,
0.003636111505329609,
0.07862556725740433,
-0.09498437494039536,
-0.061456624418497086,
0.03524353355169296,
-0.04600588604807854,
-0.09447378665208817,
0.14498312771320343,
0.22181762754917145,
0.18709923326969147,
-0.0638132095336914,
-0.19567884504795074,
0.08330642431974411,
-0.23134177923202515,
0.14809195697307587,
0.016755837947130203,
-0.03236689418554306,
-0.16407155990600586,
0.09969765692949295,
0.080433689057827,
0.13260886073112488,
-0.1326906383037567,
-0.028049347922205925,
5.78963167600817e-35,
0.03653468191623688,
-0.029012562707066536,
0.050224557518959045,
-0.1225816011428833,
-0.007150986231863499,
0.02993987686932087,
0.17885036766529083,
-0.004327965900301933,
0.04589039087295532,
-0.16445443034172058,
-0.1263214498758316
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | I am afraid int32 is not the reason for this error.
I have submitted a commit to use int64 for all ints in the dataset:
https://huggingface.co/datasets/liwu/MNBVC/commit/857ac00d9eab96a6708ad6a82bd9001686042a9e
and I have updated my env to the latest datasets release:
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.13.1
- Platform: macOS-13.2.1-arm64-arm-64bit
- Python version: 3.11.2
- Huggingface_hub version: 0.13.4
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
But the error still exist
```
Downloading and preparing dataset mnbvc/news_peoples_daily to /Users/silver/.cache/huggingface/datasets/liwu___mnbvc/news_peoples_daily/0.0.1/ee380f6309fe9b8b0d1fb14d77118f132444f22c8c4b28bf5c1645312688e051...
Downloading data files: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 12/12 [00:00<00:00, 9070.40it/s]
Extracting data files: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 12/12 [00:00<00:00, 2697.16it/s]
---------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1647, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1646 example = self.info.features.encode_example(record) if self.info.features is not None else record
-> 1647 writer.write(example, key)
1648 num_examples_progress_update += 1
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:490, in ArrowWriter.write(self, example, key, writer_batch_size)
488 self.hkey_record = []
--> 490 self.write_examples_on_file()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:448, in ArrowWriter.write_examples_on_file(self)
444 batch_examples[col] = [
445 row[0][col].to_pylist()[0] if isinstance(row[0][col], (pa.Array, pa.ChunkedArray)) else row[0][col]
446 for row in self.current_examples
447 ]
--> 448 self.write_batch(batch_examples=batch_examples)
449 self.current_examples = []
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:553, in ArrowWriter.write_batch(self, batch_examples, writer_batch_size)
552 typed_sequence = OptimizedTypedSequence(col_values, type=col_type, try_type=col_try_type, col=col)
--> 553 arrays.append(pa.array(typed_sequence))
554 inferred_features[col] = typed_sequence.get_inferred_type()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:236, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:110, in pyarrow.lib._handle_arrow_array_protocol()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:189, in TypedSequence.__arrow_array__(self, type)
188 trying_cast_to_python_objects = True
--> 189 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
190 # use smaller integer precisions if possible
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:320, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:39, in pyarrow.lib._sequence_to_array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1656, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1655 num_shards = shard_id + 1
-> 1656 num_examples, num_bytes = writer.finalize()
1657 writer.close()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:584, in ArrowWriter.finalize(self, close_stream)
583 self.hkey_record = []
--> 584 self.write_examples_on_file()
585 # If schema is known, infer features even if no examples were written
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:448, in ArrowWriter.write_examples_on_file(self)
444 batch_examples[col] = [
445 row[0][col].to_pylist()[0] if isinstance(row[0][col], (pa.Array, pa.ChunkedArray)) else row[0][col]
446 for row in self.current_examples
447 ]
--> 448 self.write_batch(batch_examples=batch_examples)
449 self.current_examples = []
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:553, in ArrowWriter.write_batch(self, batch_examples, writer_batch_size)
552 typed_sequence = OptimizedTypedSequence(col_values, type=col_type, try_type=col_try_type, col=col)
--> 553 arrays.append(pa.array(typed_sequence))
554 inferred_features[col] = typed_sequence.get_inferred_type()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:236, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:110, in pyarrow.lib._handle_arrow_array_protocol()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:189, in TypedSequence.__arrow_array__(self, type)
188 trying_cast_to_python_objects = True
--> 189 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
190 # use smaller integer precisions if possible
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:320, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:39, in pyarrow.lib._sequence_to_array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
The above exception was the direct cause of the following exception:
DatasetGenerationError Traceback (most recent call last)
Cell In[2], line 1
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
File ~/git/venv/lib/python3.11/site-packages/datasets/load.py:1809, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1806 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
1808 # Download and prepare data
-> 1809 builder_instance.download_and_prepare(
1810 download_config=download_config,
1811 download_mode=download_mode,
1812 verification_mode=verification_mode,
1813 try_from_hf_gcs=try_from_hf_gcs,
1814 num_proc=num_proc,
1815 storage_options=storage_options,
1816 )
1818 # Build dataset for splits
1819 keep_in_memory = (
1820 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1821 )
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:909, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
907 if num_proc is not None:
908 prepare_split_kwargs["num_proc"] = num_proc
--> 909 self._download_and_prepare(
910 dl_manager=dl_manager,
911 verification_mode=verification_mode,
912 **prepare_split_kwargs,
913 **download_and_prepare_kwargs,
914 )
915 # Sync info
916 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1670, in GeneratorBasedBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs)
1669 def _download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs):
-> 1670 super()._download_and_prepare(
1671 dl_manager,
1672 verification_mode,
1673 check_duplicate_keys=verification_mode == VerificationMode.BASIC_CHECKS
1674 or verification_mode == VerificationMode.ALL_CHECKS,
1675 **prepare_splits_kwargs,
1676 )
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1004, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
1000 split_dict.add(split_generator.split_info)
1002 try:
1003 # Prepare split will record examples associated to the split
-> 1004 self._prepare_split(split_generator, **prepare_split_kwargs)
1005 except OSError as e:
1006 raise OSError(
1007 "Cannot find data file. "
1008 + (self.manual_download_instructions or "")
1009 + "\nOriginal error:\n"
1010 + str(e)
1011 ) from None
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1508, in GeneratorBasedBuilder._prepare_split(self, split_generator, check_duplicate_keys, file_format, num_proc, max_shard_size)
1506 job_id = 0
1507 with pbar:
-> 1508 for job_id, done, content in self._prepare_split_single(
1509 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
1510 ):
1511 if done:
1512 result = content
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1665, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1663 if isinstance(e, SchemaInferenceError) and e.__context__ is not None:
1664 e = e.__context__
-> 1665 raise DatasetGenerationError("An error occurred while generating the dataset") from e
1667 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths)
DatasetGenerationError: An error occurred while generating the dataset
```
Besides, it works fine when I am using streamed dataset. | ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 763 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
I am afraid int32 is not the reason for this error.
I have submitted a commit to use int64 for all ints in the dataset:
https://huggingface.co/datasets/liwu/MNBVC/commit/857ac00d9eab96a6708ad6a82bd9001686042a9e
and I have updated my env to the latest datasets release:
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.13.1
- Platform: macOS-13.2.1-arm64-arm-64bit
- Python version: 3.11.2
- Huggingface_hub version: 0.13.4
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
But the error still exist
```
Downloading and preparing dataset mnbvc/news_peoples_daily to /Users/silver/.cache/huggingface/datasets/liwu___mnbvc/news_peoples_daily/0.0.1/ee380f6309fe9b8b0d1fb14d77118f132444f22c8c4b28bf5c1645312688e051...
Downloading data files: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 12/12 [00:00<00:00, 9070.40it/s]
Extracting data files: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 12/12 [00:00<00:00, 2697.16it/s]
---------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1647, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1646 example = self.info.features.encode_example(record) if self.info.features is not None else record
-> 1647 writer.write(example, key)
1648 num_examples_progress_update += 1
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:490, in ArrowWriter.write(self, example, key, writer_batch_size)
488 self.hkey_record = []
--> 490 self.write_examples_on_file()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:448, in ArrowWriter.write_examples_on_file(self)
444 batch_examples[col] = [
445 row[0][col].to_pylist()[0] if isinstance(row[0][col], (pa.Array, pa.ChunkedArray)) else row[0][col]
446 for row in self.current_examples
447 ]
--> 448 self.write_batch(batch_examples=batch_examples)
449 self.current_examples = []
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:553, in ArrowWriter.write_batch(self, batch_examples, writer_batch_size)
552 typed_sequence = OptimizedTypedSequence(col_values, type=col_type, try_type=col_try_type, col=col)
--> 553 arrays.append(pa.array(typed_sequence))
554 inferred_features[col] = typed_sequence.get_inferred_type()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:236, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:110, in pyarrow.lib._handle_arrow_array_protocol()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:189, in TypedSequence.__arrow_array__(self, type)
188 trying_cast_to_python_objects = True
--> 189 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
190 # use smaller integer precisions if possible
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:320, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:39, in pyarrow.lib._sequence_to_array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1656, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1655 num_shards = shard_id + 1
-> 1656 num_examples, num_bytes = writer.finalize()
1657 writer.close()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:584, in ArrowWriter.finalize(self, close_stream)
583 self.hkey_record = []
--> 584 self.write_examples_on_file()
585 # If schema is known, infer features even if no examples were written
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:448, in ArrowWriter.write_examples_on_file(self)
444 batch_examples[col] = [
445 row[0][col].to_pylist()[0] if isinstance(row[0][col], (pa.Array, pa.ChunkedArray)) else row[0][col]
446 for row in self.current_examples
447 ]
--> 448 self.write_batch(batch_examples=batch_examples)
449 self.current_examples = []
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:553, in ArrowWriter.write_batch(self, batch_examples, writer_batch_size)
552 typed_sequence = OptimizedTypedSequence(col_values, type=col_type, try_type=col_try_type, col=col)
--> 553 arrays.append(pa.array(typed_sequence))
554 inferred_features[col] = typed_sequence.get_inferred_type()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:236, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:110, in pyarrow.lib._handle_arrow_array_protocol()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:189, in TypedSequence.__arrow_array__(self, type)
188 trying_cast_to_python_objects = True
--> 189 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
190 # use smaller integer precisions if possible
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:320, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:39, in pyarrow.lib._sequence_to_array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
The above exception was the direct cause of the following exception:
DatasetGenerationError Traceback (most recent call last)
Cell In[2], line 1
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
File ~/git/venv/lib/python3.11/site-packages/datasets/load.py:1809, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1806 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
1808 # Download and prepare data
-> 1809 builder_instance.download_and_prepare(
1810 download_config=download_config,
1811 download_mode=download_mode,
1812 verification_mode=verification_mode,
1813 try_from_hf_gcs=try_from_hf_gcs,
1814 num_proc=num_proc,
1815 storage_options=storage_options,
1816 )
1818 # Build dataset for splits
1819 keep_in_memory = (
1820 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1821 )
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:909, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
907 if num_proc is not None:
908 prepare_split_kwargs["num_proc"] = num_proc
--> 909 self._download_and_prepare(
910 dl_manager=dl_manager,
911 verification_mode=verification_mode,
912 **prepare_split_kwargs,
913 **download_and_prepare_kwargs,
914 )
915 # Sync info
916 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1670, in GeneratorBasedBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs)
1669 def _download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs):
-> 1670 super()._download_and_prepare(
1671 dl_manager,
1672 verification_mode,
1673 check_duplicate_keys=verification_mode == VerificationMode.BASIC_CHECKS
1674 or verification_mode == VerificationMode.ALL_CHECKS,
1675 **prepare_splits_kwargs,
1676 )
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1004, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
1000 split_dict.add(split_generator.split_info)
1002 try:
1003 # Prepare split will record examples associated to the split
-> 1004 self._prepare_split(split_generator, **prepare_split_kwargs)
1005 except OSError as e:
1006 raise OSError(
1007 "Cannot find data file. "
1008 + (self.manual_download_instructions or "")
1009 + "\nOriginal error:\n"
1010 + str(e)
1011 ) from None
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1508, in GeneratorBasedBuilder._prepare_split(self, split_generator, check_duplicate_keys, file_format, num_proc, max_shard_size)
1506 job_id = 0
1507 with pbar:
-> 1508 for job_id, done, content in self._prepare_split_single(
1509 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
1510 ):
1511 if done:
1512 result = content
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1665, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1663 if isinstance(e, SchemaInferenceError) and e.__context__ is not None:
1664 e = e.__context__
-> 1665 raise DatasetGenerationError("An error occurred while generating the dataset") from e
1667 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths)
DatasetGenerationError: An error occurred while generating the dataset
```
Besides, it works fine when I am using streamed dataset. | [
0.009656712412834167,
0.09457047283649445,
0.028397396206855774,
-0.10254718363285065,
0.300279438495636,
0.07912066578865051,
0.11113177239894867,
0.15341193974018097,
0.008289691060781479,
0.17992077767848969,
0.055744316428899765,
-0.09257358312606812,
-0.08333378285169601,
0.008388161659240723,
-0.11378554999828339,
-0.090740866959095,
-0.06067996099591255,
-0.15912677347660065,
0.016942394897341728,
0.055824410170316696,
-0.15361841022968292,
0.11855024844408035,
0.17527858912944794,
-0.22632110118865967,
-0.12296482175588608,
-0.2910356819629669,
0.0022228776942938566,
0.17556490004062653,
-0.020907439291477203,
-0.21034255623817444,
0.06216181442141533,
-0.16256019473075867,
0.05563400313258171,
0.1498006135225296,
0.0000046960658437456004,
-0.0551123209297657,
0.11053449660539627,
0.07068122923374176,
-0.15089985728263855,
0.06700064241886139,
0.2145037055015564,
-0.10308168083429337,
-0.0357460156083107,
-0.026931282132864,
0.11480947583913803,
-0.07500673830509186,
-0.12224745005369186,
0.035788483917713165,
0.02528032660484314,
0.27487441897392273,
0.0060133421793580055,
-0.0808195024728775,
0.2503894865512848,
-0.11519195884466171,
-0.05395183712244034,
-0.06643125414848328,
0.07898350059986115,
0.1663738489151001,
-0.13938693702220917,
-0.05554361641407013,
-0.08304992318153381,
-0.0009695275803096592,
-0.0009712671162560582,
-0.026312584057450294,
-0.15495742857456207,
0.07126854360103607,
-0.013934827409684658,
-0.0546758733689785,
0.03261517733335495,
0.2576163709163666,
-0.06230660527944565,
0.07801792025566101,
-0.1044859066605568,
0.02031579613685608,
-0.04815537482500076,
-0.1854347586631775,
-0.0710115134716034,
0.1660001277923584,
-0.10143792629241943,
0.02896159701049328,
-0.026478266343474388,
0.04505506530404091,
-0.0430871956050396,
0.15841242671012878,
-0.20206880569458008,
-0.09515172988176346,
-0.24907474219799042,
0.14570336043834686,
0.08530858904123306,
-0.15056854486465454,
0.11756666749715805,
0.06994961202144623,
-0.05212690681219101,
-0.05743562802672386,
-0.14526347815990448,
-0.04358519986271858,
-0.014195523224771023,
-0.16825440526008606,
-0.06442379951477051,
-0.18305546045303345,
-0.18051135540008545,
-0.22835206985473633,
-0.05984804034233093,
0.1746799647808075,
0.05000065639615059,
-0.060966771095991135,
-0.3419525921344757,
0.09316908568143845,
0.15037564933300018,
0.004035145044326782,
-0.045790400356054306,
0.04516245424747467,
-0.22489508986473083,
-0.06493792682886124,
0.11957480758428574,
0.053262170404195786,
0.029500043019652367,
0.0069556087255477905,
-0.10344421118497849,
0.0841095820069313,
0.04022393375635147,
0.1627846360206604,
0.13037370145320892,
0.1294030398130417,
0.07624851167201996,
0.08149987459182739,
-0.030217502266168594,
-0.014819958247244358,
-0.05357777699828148,
-0.01887156441807747,
-0.029313350096344948,
0.11997256428003311,
0.10192769020795822,
-0.10122009366750717,
0.1887286752462387,
-0.04151548445224762,
-0.034036800265312195,
-0.0030987299978733063,
-0.00421995809301734,
-0.07227349281311035,
0.02469581738114357,
-0.29005277156829834,
-0.11250808835029602,
-0.027176422998309135,
0.037489473819732666,
-0.011130898259580135,
0.19486244022846222,
0.05989031493663788,
-0.02225806750357151,
0.05513874813914299,
-0.3139064908027649,
0.035693105310201645,
-0.20406027138233185,
0.05558670312166214,
0.028463352471590042,
0.12348439544439316,
0.0055081951431930065,
-0.19818313419818878,
-0.15235131978988647,
-0.0875188559293747,
0.03675125539302826,
-0.02459813468158245,
0.06047205254435539,
-0.14809690415859222,
0.003394159721210599,
0.05553203448653221,
0.03024313412606716,
0.17436692118644714,
-0.03362385556101799,
0.06137816980481148,
0.21813108026981354,
0.24570848047733307,
-0.0951843336224556,
0.02393963932991028,
-0.11892037093639374,
-0.0757371187210083,
-0.08920329809188843,
0.13218700885772705,
-0.2851983606815338,
0.1889612376689911,
0.06884597986936569,
-0.2631971836090088,
0.05737824738025665,
-0.013590523041784763,
0.004782065283507109,
-0.03132670372724533,
0.0265289768576622,
0.1519167721271515,
-0.17339248955249786,
-0.0755852535367012,
0.028300656005740166,
-0.05583135038614273,
0.07974544167518616,
-0.11540090292692184,
0.17713883519172668,
-0.2418544441461563,
0.10775066912174225,
-0.032601386308670044,
0.04320235922932625,
-0.24560503661632538,
-0.010073219425976276,
-0.08545386046171188,
-0.0074621220119297504,
-0.03443584963679314,
-0.015260113403201103,
-0.17713221907615662,
0.005297270603477955,
0.008816391229629517,
0.042079050093889236,
-0.20128436386585236,
-0.06171054765582085,
0.018201565369963646,
-0.08929288387298584,
0.010389906354248524,
0.16789071261882782,
-0.0014499841490760446,
-0.08047416061162949,
-0.07594913244247437,
0.005906371399760246,
0.14366160333156586,
0.027214299887418747,
0.20461896061897278,
-0.10246128588914871,
-0.03912544250488281,
-0.002603942761197686,
0.00844927504658699,
-0.030459770932793617,
-0.05201491713523865,
0.109295554459095,
0.0973731130361557,
-0.04137824475765228,
-0.09538456797599792,
0.0019644564017653465,
0.08468466252088547,
-0.011607726104557514,
-0.14975018799304962,
-0.02382618933916092,
-0.24581998586654663,
0.00850741658359766,
-0.05638178065419197,
0.03661472350358963,
0.13700057566165924,
0.06644269078969955,
-0.05698458477854729,
0.03190973028540611,
0.0022453395649790764,
-0.04023708030581474,
0.15140609443187714,
0.036351278424263,
-0.13197387754917145,
0.3015817403793335,
0.0742402896285057,
-0.03391881659626961,
0.045967523008584976,
0.03222883865237236,
0.05870652571320534,
-0.023732736706733704,
0.1473410725593567,
-0.061593472957611084,
-0.21027223765850067,
0.36453598737716675,
-0.02877887524664402,
0.02079159766435623,
0.13827326893806458,
0.04910493642091751,
-0.11417054384946823,
0.04588836058974266,
-0.07703665643930435,
0.0019906060770154,
0.08444476872682571,
-0.05144098028540611,
-0.05900797247886658,
-0.05611634626984596,
-0.06588153541088104,
0.019598692655563354,
-0.08013314008712769,
0.0699470043182373,
-0.10836756974458694,
0.05986979976296425,
-0.06268041580915451,
-0.08727557957172394,
0.04244954138994217,
0.16344036161899567,
-0.03764043375849724,
0.029593197628855705,
0.21222719550132751,
-0.09419969469308853,
-0.16264788806438446,
-0.05168341100215912,
0.039517808705568314,
0.022711528465151787,
-0.01390431635081768,
-0.06553836166858673,
-0.1389092206954956,
-0.09073420614004135,
-0.08913692831993103,
0.07340127229690552,
-0.04766012728214264,
0.06400728970766068,
0.02062789909541607,
0.013335689902305603,
-0.03398141637444496,
0.016925618052482605,
0.01661674678325653,
0.20093266665935516,
-0.007422654423862696,
0.19646568596363068,
0.243182972073555,
-0.1660667210817337,
-0.07503834366798401,
0.03202812746167183,
-0.13735543191432953,
0.08650245517492294,
0.11583686619997025,
0.15934056043624878,
0.05332937836647034,
0.07091446965932846,
-0.010717518627643585,
-0.004535519052296877,
-0.08441495895385742,
0.09626125544309616,
0.09125839918851852,
-0.10494532436132431,
0.17265619337558746,
-0.013476905412971973,
0.08720684051513672,
-0.3380545377731323,
-0.14192524552345276,
-0.06901174783706665,
-0.040251825004816055,
0.040105078369379044,
0.05326226353645325,
-0.22947195172309875,
-0.07081545889377594,
0.14559565484523773,
-0.16831503808498383,
-0.2177887260913849,
-0.03298012539744377,
0.3428860306739807,
0.05782369151711464,
0.03518123924732208,
0.10321272909641266,
-0.05086955800652504,
-0.08283645659685135,
0.08656223863363266,
-0.1555335968732834,
-0.008432932198047638,
-0.17583006620407104,
0.08378273248672485,
-0.08138406276702881,
0.0636586844921112,
0.07536053657531738,
0.01946837455034256,
-0.03193814679980278,
-0.01709393411874771,
0.1348324865102768,
-0.2173939347267151,
0.18211081624031067,
-0.005445717368274927,
-0.08593827486038208,
0.27049800753593445,
-0.0032528573647141457,
0.15052089095115662,
0.18225105106830597,
-0.06250595301389694,
0.10238084197044373,
0.07473233342170715,
0.006812513340264559,
-0.2424095720052719,
-0.11055702716112137,
0.06286413222551346,
-0.1543123871088028,
-0.0559416301548481,
0.03213472664356232,
0.08984861522912979,
-0.1449013203382492,
-0.03007817082107067,
-0.29131969809532166,
0.16563083231449127,
0.0701945573091507,
0.1028418093919754,
0.055893730372190475,
-0.06258924305438995,
0.02160830982029438,
-0.0026543245185166597,
0.04225059226155281,
-0.12926842272281647,
-0.03769294545054436,
-0.08294837921857834,
0.0553157813847065,
0.1330539435148239,
0.021688971668481827,
0.05479729548096657,
0.06597398966550827,
-0.056269727647304535,
-0.1349867284297943,
0.14412526786327362,
0.15724922716617584,
0.033660922199487686,
-0.07506062090396881,
0.09069601446390152,
0.10415356606245041,
-0.027633637189865112,
0.15386024117469788,
0.08643825352191925,
0.035705242305994034,
-0.1491578370332718,
-0.0716402530670166,
0.031198784708976746,
0.02133377455174923,
0.16404569149017334,
0.012994849123060703,
0.027501562610268593,
-0.024335764348506927,
0.372873991727829,
0.16760818660259247,
0.008117987774312496,
0.012178181670606136,
-0.011931236833333969,
-0.20337051153182983,
-0.23392483592033386,
-0.19272394478321075,
0.11701203137636185,
0.26644381880760193,
-0.11095768213272095,
-0.04409076273441315,
0.037254951894283295,
-0.10845471173524857,
0.15649984776973724,
0.08095131069421768,
0.014296861365437508,
-0.03987666219472885,
0.09765837341547012,
-0.13957346975803375,
0.0966576635837555,
-0.015330368652939796,
0.4009614586830139,
-0.021354245021939278,
-0.04102849215269089,
0.053944285959005356,
-0.04177761450409889,
-0.001569744199514389,
0.11205988377332687,
-0.16107022762298584,
0.048529256135225296,
0.006522409617900848,
0.0897434651851654,
-0.01113052573055029,
0.24773140251636505,
-0.03469337150454521,
-0.024931209161877632,
-0.24475954473018646,
-0.11572320014238358,
-0.059351738542318344,
0.20780111849308014,
0.09721609205007553,
0.1473301649093628,
-0.14921700954437256,
-0.050581853836774826,
0.10003906488418579,
0.01736634597182274,
-0.06644421070814133,
-0.01539111789315939,
0.08002208918333054,
0.13793641328811646,
0.04470515996217728,
0.11786621809005737,
-0.21435187757015228,
0.004490341059863567,
0.07951308786869049,
0.014016438275575638,
0.13466031849384308,
0.029781220480799675,
0.0055236429907381535,
0.08470863103866577,
0.06856705248355865,
0.11224297434091568,
-0.10613631457090378,
0.006786843296140432,
0.0534418486058712,
0.2636270821094513,
-0.23372529447078705,
0.06885362416505814,
-0.18880337476730347,
-0.031421445310115814,
0.07788430154323578,
0.00017960091645363718,
-0.01075437106192112,
-0.03560531884431839,
-0.04128468781709671,
0.04771841689944267,
-0.061702530831098557,
-0.10647138953208923,
-0.03810501471161842,
0.25681421160697937,
-0.2175809144973755,
0.00874988455325365,
0.22607450187206268,
-0.11272464692592621,
0.03325258940458298,
0.16981551051139832,
-0.04885473474860191,
-0.07521160691976547,
-0.19957415759563446,
-0.0989527627825737,
-0.086904376745224,
0.16858400404453278,
0.0017310897819697857,
-0.06894630938768387,
-0.123754121363163,
-0.0340472050011158,
0.060406170785427094,
-0.03744811564683914,
-0.010740378871560097,
-0.0032517763320356607,
0.1377548724412918,
-0.1560850292444229,
-0.07207032293081284,
-0.09612755477428436,
0.08092925697565079,
0.08189502358436584,
-0.09589753299951553,
0.10975182801485062,
-0.03947451338171959,
-0.031449757516384125,
0.05718901753425598,
-0.006607442162930965,
-0.017021238803863525,
0.1329885870218277,
0.11852100491523743,
0.037561047822237015,
0.1909562051296234,
0.21606948971748352,
-0.14357520639896393,
-0.10785653442144394,
0.26265832781791687,
0.09117700904607773,
-0.16432255506515503,
0.010910370387136936,
0.039607007056474686,
0.007138177752494812,
-0.2373114973306656,
-0.07672784477472305,
0.171210378408432,
0.16020335257053375,
0.23470944166183472,
-0.0941038504242897,
-0.13453146815299988,
-0.1793793886899948,
-0.04937228187918663,
-0.10615569353103638,
0.1720024049282074,
-0.016809402033686638,
-0.0956011638045311,
0.10535416007041931,
-2.383078081117291e-32,
-0.039642397314310074,
-0.08205016702413559,
-0.042046595364809036,
-0.036182790994644165,
-0.33127349615097046,
0.11322882771492004,
-0.023282956331968307,
-0.07143697887659073,
-0.06292624026536942,
-0.013366400264203548,
-0.1527349054813385,
-0.062459807842969894,
0.011120706796646118,
0.004542923998087645,
-0.06523233652114868,
0.07044661045074463,
-0.03981504961848259,
0.05611724406480789,
0.02288234978914261,
0.037243347615003586,
0.04601361230015755,
0.062271472066640854,
-0.0005957273533567786,
-0.10572879761457443,
-0.2229616492986679,
0.11123496294021606,
-0.029945475980639458,
0.06247386336326599,
0.18549440801143646,
-0.09161553531885147,
-0.05046698823571205,
0.19723856449127197,
0.1168028935790062,
-0.11934474855661392,
-0.02980457805097103,
0.10347867757081985,
-0.14921022951602936,
-0.04893799498677254,
-0.0993228405714035,
0.12996284663677216,
0.17927008867263794,
0.03317924588918686,
0.08586988598108292,
-0.26266226172447205,
0.06430396437644958,
0.09627345204353333,
0.04912879690527916,
-0.10188495367765427,
-0.08113753795623779,
-0.1336800754070282,
0.022274894639849663,
0.10874472558498383,
-0.04827867075800896,
0.14366459846496582,
0.05433947220444679,
-0.15857556462287903,
-0.11153203994035721,
0.14610378444194794,
0.00411801366135478,
-0.10059504956007004,
0.21085675060749054,
-0.016003767028450966,
-0.006098954938352108,
0.001206929562613368,
0.06878626346588135,
0.07970213890075684,
0.28674688935279846,
0.0016764634056016803,
-0.05145770683884621,
-0.04237474128603935,
0.012264244258403778,
0.0751974806189537,
-0.021052656695246696,
-0.07070139795541763,
0.0006162490462884307,
-0.12472567707300186,
-0.09538636356592178,
-0.010072888806462288,
0.05700232461094856,
-0.09135500341653824,
0.04916109889745712,
0.10449908673763275,
0.0642109140753746,
0.054103586822748184,
0.0420956052839756,
0.1937851905822754,
-0.008836491033434868,
-0.008661175146698952,
-0.05894887447357178,
-0.1109684556722641,
-0.05034260079264641,
0.08822517842054367,
-0.02393379621207714,
-0.18838587403297424,
-0.05187825486063957,
0.15607091784477234,
0.00467604910954833,
0.11038737744092941,
-0.17016081511974335,
-0.06010426580905914,
-0.11515477299690247,
-0.0896366685628891,
-0.09920739382505417,
-0.09018309414386749,
0.1907949149608612,
0.1363425850868225,
0.08417811244726181,
0.12381139397621155,
-0.1238579973578453,
-0.09765633940696716,
-0.02426992729306221,
-0.27496567368507385,
0.16048899292945862,
0.2922065258026123,
0.17590399086475372,
-0.14565213024616241,
0.050185032188892365,
-0.1455840915441513,
0.16430160403251648,
0.06957726180553436,
-0.07218054682016373,
-0.11679471284151077,
-0.029767243191599846,
-0.03778386116027832,
-0.04891255870461464,
0.044674161821603775,
-0.11771456897258759,
-0.07350894063711166,
-0.004775581881403923,
-0.0011775171151384711,
0.051953401416540146,
0.08874495327472687,
6.786450512663578e-7,
-0.36413779854774475,
0.27956289052963257,
-0.08679476380348206,
0.026698315516114235,
-0.16028812527656555,
-0.006988183595240116,
-0.18391598761081696,
0.002842017449438572,
-0.21157340705394745,
0.08417639136314392,
0.2580553889274597,
0.009095890447497368,
-0.04375891759991646,
0.009013835340738297,
0.08440104126930237,
0.03129890188574791,
-0.020941272377967834,
0.10550066083669662,
-0.0016907901735976338,
-0.011272191070020199,
0.10287715494632721,
0.0484054833650589,
0.12767095863819122,
-0.10665994137525558,
0.048939988017082214,
-0.11283589154481888,
-0.16963103413581848,
-0.10858044773340225,
-0.01252437848597765,
0.04868007451295853,
0.0150448651984334,
0.04772745817899704,
-0.08344123512506485,
0.13185864686965942,
0.0042229313403368,
0.023599185049533844,
-0.034864675253629684,
-0.07993350923061371,
-0.05814579501748085,
0.11037851125001907,
0.06172661483287811,
0.05100079998373985,
-0.050427138805389404,
-0.038065724074840546,
0.003636111505329609,
0.07862556725740433,
-0.09498437494039536,
-0.061456624418497086,
0.03524353355169296,
-0.04600588604807854,
-0.09447378665208817,
0.14498312771320343,
0.22181762754917145,
0.18709923326969147,
-0.0638132095336914,
-0.19567884504795074,
0.08330642431974411,
-0.23134177923202515,
0.14809195697307587,
0.016755837947130203,
-0.03236689418554306,
-0.16407155990600586,
0.09969765692949295,
0.080433689057827,
0.13260886073112488,
-0.1326906383037567,
-0.028049347922205925,
5.78963167600817e-35,
0.03653468191623688,
-0.029012562707066536,
0.050224557518959045,
-0.1225816011428833,
-0.007150986231863499,
0.02993987686932087,
0.17885036766529083,
-0.004327965900301933,
0.04589039087295532,
-0.16445443034172058,
-0.1263214498758316
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | `simhash` is the problematic column - it has values such as `18329103420363166823` that are out of the int64 range. You can fix this by setting the feature type to `Value("string")` (it's advised to use this type for hash values in general)
> Besides, it works fine when I am using streamed dataset.
Streaming yields Python dictionaries from the script without converting them to the Arrow representation, as this conversion step is not that cheap performance-wise. | ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 75 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
`simhash` is the problematic column - it has values such as `18329103420363166823` that are out of the int64 range. You can fix this by setting the feature type to `Value("string")` (it's advised to use this type for hash values in general)
> Besides, it works fine when I am using streamed dataset.
Streaming yields Python dictionaries from the script without converting them to the Arrow representation, as this conversion step is not that cheap performance-wise. | [
0.009656712412834167,
0.09457047283649445,
0.028397396206855774,
-0.10254718363285065,
0.300279438495636,
0.07912066578865051,
0.11113177239894867,
0.15341193974018097,
0.008289691060781479,
0.17992077767848969,
0.055744316428899765,
-0.09257358312606812,
-0.08333378285169601,
0.008388161659240723,
-0.11378554999828339,
-0.090740866959095,
-0.06067996099591255,
-0.15912677347660065,
0.016942394897341728,
0.055824410170316696,
-0.15361841022968292,
0.11855024844408035,
0.17527858912944794,
-0.22632110118865967,
-0.12296482175588608,
-0.2910356819629669,
0.0022228776942938566,
0.17556490004062653,
-0.020907439291477203,
-0.21034255623817444,
0.06216181442141533,
-0.16256019473075867,
0.05563400313258171,
0.1498006135225296,
0.0000046960658437456004,
-0.0551123209297657,
0.11053449660539627,
0.07068122923374176,
-0.15089985728263855,
0.06700064241886139,
0.2145037055015564,
-0.10308168083429337,
-0.0357460156083107,
-0.026931282132864,
0.11480947583913803,
-0.07500673830509186,
-0.12224745005369186,
0.035788483917713165,
0.02528032660484314,
0.27487441897392273,
0.0060133421793580055,
-0.0808195024728775,
0.2503894865512848,
-0.11519195884466171,
-0.05395183712244034,
-0.06643125414848328,
0.07898350059986115,
0.1663738489151001,
-0.13938693702220917,
-0.05554361641407013,
-0.08304992318153381,
-0.0009695275803096592,
-0.0009712671162560582,
-0.026312584057450294,
-0.15495742857456207,
0.07126854360103607,
-0.013934827409684658,
-0.0546758733689785,
0.03261517733335495,
0.2576163709163666,
-0.06230660527944565,
0.07801792025566101,
-0.1044859066605568,
0.02031579613685608,
-0.04815537482500076,
-0.1854347586631775,
-0.0710115134716034,
0.1660001277923584,
-0.10143792629241943,
0.02896159701049328,
-0.026478266343474388,
0.04505506530404091,
-0.0430871956050396,
0.15841242671012878,
-0.20206880569458008,
-0.09515172988176346,
-0.24907474219799042,
0.14570336043834686,
0.08530858904123306,
-0.15056854486465454,
0.11756666749715805,
0.06994961202144623,
-0.05212690681219101,
-0.05743562802672386,
-0.14526347815990448,
-0.04358519986271858,
-0.014195523224771023,
-0.16825440526008606,
-0.06442379951477051,
-0.18305546045303345,
-0.18051135540008545,
-0.22835206985473633,
-0.05984804034233093,
0.1746799647808075,
0.05000065639615059,
-0.060966771095991135,
-0.3419525921344757,
0.09316908568143845,
0.15037564933300018,
0.004035145044326782,
-0.045790400356054306,
0.04516245424747467,
-0.22489508986473083,
-0.06493792682886124,
0.11957480758428574,
0.053262170404195786,
0.029500043019652367,
0.0069556087255477905,
-0.10344421118497849,
0.0841095820069313,
0.04022393375635147,
0.1627846360206604,
0.13037370145320892,
0.1294030398130417,
0.07624851167201996,
0.08149987459182739,
-0.030217502266168594,
-0.014819958247244358,
-0.05357777699828148,
-0.01887156441807747,
-0.029313350096344948,
0.11997256428003311,
0.10192769020795822,
-0.10122009366750717,
0.1887286752462387,
-0.04151548445224762,
-0.034036800265312195,
-0.0030987299978733063,
-0.00421995809301734,
-0.07227349281311035,
0.02469581738114357,
-0.29005277156829834,
-0.11250808835029602,
-0.027176422998309135,
0.037489473819732666,
-0.011130898259580135,
0.19486244022846222,
0.05989031493663788,
-0.02225806750357151,
0.05513874813914299,
-0.3139064908027649,
0.035693105310201645,
-0.20406027138233185,
0.05558670312166214,
0.028463352471590042,
0.12348439544439316,
0.0055081951431930065,
-0.19818313419818878,
-0.15235131978988647,
-0.0875188559293747,
0.03675125539302826,
-0.02459813468158245,
0.06047205254435539,
-0.14809690415859222,
0.003394159721210599,
0.05553203448653221,
0.03024313412606716,
0.17436692118644714,
-0.03362385556101799,
0.06137816980481148,
0.21813108026981354,
0.24570848047733307,
-0.0951843336224556,
0.02393963932991028,
-0.11892037093639374,
-0.0757371187210083,
-0.08920329809188843,
0.13218700885772705,
-0.2851983606815338,
0.1889612376689911,
0.06884597986936569,
-0.2631971836090088,
0.05737824738025665,
-0.013590523041784763,
0.004782065283507109,
-0.03132670372724533,
0.0265289768576622,
0.1519167721271515,
-0.17339248955249786,
-0.0755852535367012,
0.028300656005740166,
-0.05583135038614273,
0.07974544167518616,
-0.11540090292692184,
0.17713883519172668,
-0.2418544441461563,
0.10775066912174225,
-0.032601386308670044,
0.04320235922932625,
-0.24560503661632538,
-0.010073219425976276,
-0.08545386046171188,
-0.0074621220119297504,
-0.03443584963679314,
-0.015260113403201103,
-0.17713221907615662,
0.005297270603477955,
0.008816391229629517,
0.042079050093889236,
-0.20128436386585236,
-0.06171054765582085,
0.018201565369963646,
-0.08929288387298584,
0.010389906354248524,
0.16789071261882782,
-0.0014499841490760446,
-0.08047416061162949,
-0.07594913244247437,
0.005906371399760246,
0.14366160333156586,
0.027214299887418747,
0.20461896061897278,
-0.10246128588914871,
-0.03912544250488281,
-0.002603942761197686,
0.00844927504658699,
-0.030459770932793617,
-0.05201491713523865,
0.109295554459095,
0.0973731130361557,
-0.04137824475765228,
-0.09538456797599792,
0.0019644564017653465,
0.08468466252088547,
-0.011607726104557514,
-0.14975018799304962,
-0.02382618933916092,
-0.24581998586654663,
0.00850741658359766,
-0.05638178065419197,
0.03661472350358963,
0.13700057566165924,
0.06644269078969955,
-0.05698458477854729,
0.03190973028540611,
0.0022453395649790764,
-0.04023708030581474,
0.15140609443187714,
0.036351278424263,
-0.13197387754917145,
0.3015817403793335,
0.0742402896285057,
-0.03391881659626961,
0.045967523008584976,
0.03222883865237236,
0.05870652571320534,
-0.023732736706733704,
0.1473410725593567,
-0.061593472957611084,
-0.21027223765850067,
0.36453598737716675,
-0.02877887524664402,
0.02079159766435623,
0.13827326893806458,
0.04910493642091751,
-0.11417054384946823,
0.04588836058974266,
-0.07703665643930435,
0.0019906060770154,
0.08444476872682571,
-0.05144098028540611,
-0.05900797247886658,
-0.05611634626984596,
-0.06588153541088104,
0.019598692655563354,
-0.08013314008712769,
0.0699470043182373,
-0.10836756974458694,
0.05986979976296425,
-0.06268041580915451,
-0.08727557957172394,
0.04244954138994217,
0.16344036161899567,
-0.03764043375849724,
0.029593197628855705,
0.21222719550132751,
-0.09419969469308853,
-0.16264788806438446,
-0.05168341100215912,
0.039517808705568314,
0.022711528465151787,
-0.01390431635081768,
-0.06553836166858673,
-0.1389092206954956,
-0.09073420614004135,
-0.08913692831993103,
0.07340127229690552,
-0.04766012728214264,
0.06400728970766068,
0.02062789909541607,
0.013335689902305603,
-0.03398141637444496,
0.016925618052482605,
0.01661674678325653,
0.20093266665935516,
-0.007422654423862696,
0.19646568596363068,
0.243182972073555,
-0.1660667210817337,
-0.07503834366798401,
0.03202812746167183,
-0.13735543191432953,
0.08650245517492294,
0.11583686619997025,
0.15934056043624878,
0.05332937836647034,
0.07091446965932846,
-0.010717518627643585,
-0.004535519052296877,
-0.08441495895385742,
0.09626125544309616,
0.09125839918851852,
-0.10494532436132431,
0.17265619337558746,
-0.013476905412971973,
0.08720684051513672,
-0.3380545377731323,
-0.14192524552345276,
-0.06901174783706665,
-0.040251825004816055,
0.040105078369379044,
0.05326226353645325,
-0.22947195172309875,
-0.07081545889377594,
0.14559565484523773,
-0.16831503808498383,
-0.2177887260913849,
-0.03298012539744377,
0.3428860306739807,
0.05782369151711464,
0.03518123924732208,
0.10321272909641266,
-0.05086955800652504,
-0.08283645659685135,
0.08656223863363266,
-0.1555335968732834,
-0.008432932198047638,
-0.17583006620407104,
0.08378273248672485,
-0.08138406276702881,
0.0636586844921112,
0.07536053657531738,
0.01946837455034256,
-0.03193814679980278,
-0.01709393411874771,
0.1348324865102768,
-0.2173939347267151,
0.18211081624031067,
-0.005445717368274927,
-0.08593827486038208,
0.27049800753593445,
-0.0032528573647141457,
0.15052089095115662,
0.18225105106830597,
-0.06250595301389694,
0.10238084197044373,
0.07473233342170715,
0.006812513340264559,
-0.2424095720052719,
-0.11055702716112137,
0.06286413222551346,
-0.1543123871088028,
-0.0559416301548481,
0.03213472664356232,
0.08984861522912979,
-0.1449013203382492,
-0.03007817082107067,
-0.29131969809532166,
0.16563083231449127,
0.0701945573091507,
0.1028418093919754,
0.055893730372190475,
-0.06258924305438995,
0.02160830982029438,
-0.0026543245185166597,
0.04225059226155281,
-0.12926842272281647,
-0.03769294545054436,
-0.08294837921857834,
0.0553157813847065,
0.1330539435148239,
0.021688971668481827,
0.05479729548096657,
0.06597398966550827,
-0.056269727647304535,
-0.1349867284297943,
0.14412526786327362,
0.15724922716617584,
0.033660922199487686,
-0.07506062090396881,
0.09069601446390152,
0.10415356606245041,
-0.027633637189865112,
0.15386024117469788,
0.08643825352191925,
0.035705242305994034,
-0.1491578370332718,
-0.0716402530670166,
0.031198784708976746,
0.02133377455174923,
0.16404569149017334,
0.012994849123060703,
0.027501562610268593,
-0.024335764348506927,
0.372873991727829,
0.16760818660259247,
0.008117987774312496,
0.012178181670606136,
-0.011931236833333969,
-0.20337051153182983,
-0.23392483592033386,
-0.19272394478321075,
0.11701203137636185,
0.26644381880760193,
-0.11095768213272095,
-0.04409076273441315,
0.037254951894283295,
-0.10845471173524857,
0.15649984776973724,
0.08095131069421768,
0.014296861365437508,
-0.03987666219472885,
0.09765837341547012,
-0.13957346975803375,
0.0966576635837555,
-0.015330368652939796,
0.4009614586830139,
-0.021354245021939278,
-0.04102849215269089,
0.053944285959005356,
-0.04177761450409889,
-0.001569744199514389,
0.11205988377332687,
-0.16107022762298584,
0.048529256135225296,
0.006522409617900848,
0.0897434651851654,
-0.01113052573055029,
0.24773140251636505,
-0.03469337150454521,
-0.024931209161877632,
-0.24475954473018646,
-0.11572320014238358,
-0.059351738542318344,
0.20780111849308014,
0.09721609205007553,
0.1473301649093628,
-0.14921700954437256,
-0.050581853836774826,
0.10003906488418579,
0.01736634597182274,
-0.06644421070814133,
-0.01539111789315939,
0.08002208918333054,
0.13793641328811646,
0.04470515996217728,
0.11786621809005737,
-0.21435187757015228,
0.004490341059863567,
0.07951308786869049,
0.014016438275575638,
0.13466031849384308,
0.029781220480799675,
0.0055236429907381535,
0.08470863103866577,
0.06856705248355865,
0.11224297434091568,
-0.10613631457090378,
0.006786843296140432,
0.0534418486058712,
0.2636270821094513,
-0.23372529447078705,
0.06885362416505814,
-0.18880337476730347,
-0.031421445310115814,
0.07788430154323578,
0.00017960091645363718,
-0.01075437106192112,
-0.03560531884431839,
-0.04128468781709671,
0.04771841689944267,
-0.061702530831098557,
-0.10647138953208923,
-0.03810501471161842,
0.25681421160697937,
-0.2175809144973755,
0.00874988455325365,
0.22607450187206268,
-0.11272464692592621,
0.03325258940458298,
0.16981551051139832,
-0.04885473474860191,
-0.07521160691976547,
-0.19957415759563446,
-0.0989527627825737,
-0.086904376745224,
0.16858400404453278,
0.0017310897819697857,
-0.06894630938768387,
-0.123754121363163,
-0.0340472050011158,
0.060406170785427094,
-0.03744811564683914,
-0.010740378871560097,
-0.0032517763320356607,
0.1377548724412918,
-0.1560850292444229,
-0.07207032293081284,
-0.09612755477428436,
0.08092925697565079,
0.08189502358436584,
-0.09589753299951553,
0.10975182801485062,
-0.03947451338171959,
-0.031449757516384125,
0.05718901753425598,
-0.006607442162930965,
-0.017021238803863525,
0.1329885870218277,
0.11852100491523743,
0.037561047822237015,
0.1909562051296234,
0.21606948971748352,
-0.14357520639896393,
-0.10785653442144394,
0.26265832781791687,
0.09117700904607773,
-0.16432255506515503,
0.010910370387136936,
0.039607007056474686,
0.007138177752494812,
-0.2373114973306656,
-0.07672784477472305,
0.171210378408432,
0.16020335257053375,
0.23470944166183472,
-0.0941038504242897,
-0.13453146815299988,
-0.1793793886899948,
-0.04937228187918663,
-0.10615569353103638,
0.1720024049282074,
-0.016809402033686638,
-0.0956011638045311,
0.10535416007041931,
-2.383078081117291e-32,
-0.039642397314310074,
-0.08205016702413559,
-0.042046595364809036,
-0.036182790994644165,
-0.33127349615097046,
0.11322882771492004,
-0.023282956331968307,
-0.07143697887659073,
-0.06292624026536942,
-0.013366400264203548,
-0.1527349054813385,
-0.062459807842969894,
0.011120706796646118,
0.004542923998087645,
-0.06523233652114868,
0.07044661045074463,
-0.03981504961848259,
0.05611724406480789,
0.02288234978914261,
0.037243347615003586,
0.04601361230015755,
0.062271472066640854,
-0.0005957273533567786,
-0.10572879761457443,
-0.2229616492986679,
0.11123496294021606,
-0.029945475980639458,
0.06247386336326599,
0.18549440801143646,
-0.09161553531885147,
-0.05046698823571205,
0.19723856449127197,
0.1168028935790062,
-0.11934474855661392,
-0.02980457805097103,
0.10347867757081985,
-0.14921022951602936,
-0.04893799498677254,
-0.0993228405714035,
0.12996284663677216,
0.17927008867263794,
0.03317924588918686,
0.08586988598108292,
-0.26266226172447205,
0.06430396437644958,
0.09627345204353333,
0.04912879690527916,
-0.10188495367765427,
-0.08113753795623779,
-0.1336800754070282,
0.022274894639849663,
0.10874472558498383,
-0.04827867075800896,
0.14366459846496582,
0.05433947220444679,
-0.15857556462287903,
-0.11153203994035721,
0.14610378444194794,
0.00411801366135478,
-0.10059504956007004,
0.21085675060749054,
-0.016003767028450966,
-0.006098954938352108,
0.001206929562613368,
0.06878626346588135,
0.07970213890075684,
0.28674688935279846,
0.0016764634056016803,
-0.05145770683884621,
-0.04237474128603935,
0.012264244258403778,
0.0751974806189537,
-0.021052656695246696,
-0.07070139795541763,
0.0006162490462884307,
-0.12472567707300186,
-0.09538636356592178,
-0.010072888806462288,
0.05700232461094856,
-0.09135500341653824,
0.04916109889745712,
0.10449908673763275,
0.0642109140753746,
0.054103586822748184,
0.0420956052839756,
0.1937851905822754,
-0.008836491033434868,
-0.008661175146698952,
-0.05894887447357178,
-0.1109684556722641,
-0.05034260079264641,
0.08822517842054367,
-0.02393379621207714,
-0.18838587403297424,
-0.05187825486063957,
0.15607091784477234,
0.00467604910954833,
0.11038737744092941,
-0.17016081511974335,
-0.06010426580905914,
-0.11515477299690247,
-0.0896366685628891,
-0.09920739382505417,
-0.09018309414386749,
0.1907949149608612,
0.1363425850868225,
0.08417811244726181,
0.12381139397621155,
-0.1238579973578453,
-0.09765633940696716,
-0.02426992729306221,
-0.27496567368507385,
0.16048899292945862,
0.2922065258026123,
0.17590399086475372,
-0.14565213024616241,
0.050185032188892365,
-0.1455840915441513,
0.16430160403251648,
0.06957726180553436,
-0.07218054682016373,
-0.11679471284151077,
-0.029767243191599846,
-0.03778386116027832,
-0.04891255870461464,
0.044674161821603775,
-0.11771456897258759,
-0.07350894063711166,
-0.004775581881403923,
-0.0011775171151384711,
0.051953401416540146,
0.08874495327472687,
6.786450512663578e-7,
-0.36413779854774475,
0.27956289052963257,
-0.08679476380348206,
0.026698315516114235,
-0.16028812527656555,
-0.006988183595240116,
-0.18391598761081696,
0.002842017449438572,
-0.21157340705394745,
0.08417639136314392,
0.2580553889274597,
0.009095890447497368,
-0.04375891759991646,
0.009013835340738297,
0.08440104126930237,
0.03129890188574791,
-0.020941272377967834,
0.10550066083669662,
-0.0016907901735976338,
-0.011272191070020199,
0.10287715494632721,
0.0484054833650589,
0.12767095863819122,
-0.10665994137525558,
0.048939988017082214,
-0.11283589154481888,
-0.16963103413581848,
-0.10858044773340225,
-0.01252437848597765,
0.04868007451295853,
0.0150448651984334,
0.04772745817899704,
-0.08344123512506485,
0.13185864686965942,
0.0042229313403368,
0.023599185049533844,
-0.034864675253629684,
-0.07993350923061371,
-0.05814579501748085,
0.11037851125001907,
0.06172661483287811,
0.05100079998373985,
-0.050427138805389404,
-0.038065724074840546,
0.003636111505329609,
0.07862556725740433,
-0.09498437494039536,
-0.061456624418497086,
0.03524353355169296,
-0.04600588604807854,
-0.09447378665208817,
0.14498312771320343,
0.22181762754917145,
0.18709923326969147,
-0.0638132095336914,
-0.19567884504795074,
0.08330642431974411,
-0.23134177923202515,
0.14809195697307587,
0.016755837947130203,
-0.03236689418554306,
-0.16407155990600586,
0.09969765692949295,
0.080433689057827,
0.13260886073112488,
-0.1326906383037567,
-0.028049347922205925,
5.78963167600817e-35,
0.03653468191623688,
-0.029012562707066536,
0.050224557518959045,
-0.1225816011428833,
-0.007150986231863499,
0.02993987686932087,
0.17885036766529083,
-0.004327965900301933,
0.04589039087295532,
-0.16445443034172058,
-0.1263214498758316
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | i am using uint64 for simhash
uint64 ranges up to about 3.69E19.
18329103420363166823 is less than this value.
moreover, our simhash algorithm use 64 bits. it should fit in uint64.
| ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 30 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
i am using uint64 for simhash
uint64 ranges up to about 3.69E19.
18329103420363166823 is less than this value.
moreover, our simhash algorithm use 64 bits. it should fit in uint64.
| [
0.009656712412834167,
0.09457047283649445,
0.028397396206855774,
-0.10254718363285065,
0.300279438495636,
0.07912066578865051,
0.11113177239894867,
0.15341193974018097,
0.008289691060781479,
0.17992077767848969,
0.055744316428899765,
-0.09257358312606812,
-0.08333378285169601,
0.008388161659240723,
-0.11378554999828339,
-0.090740866959095,
-0.06067996099591255,
-0.15912677347660065,
0.016942394897341728,
0.055824410170316696,
-0.15361841022968292,
0.11855024844408035,
0.17527858912944794,
-0.22632110118865967,
-0.12296482175588608,
-0.2910356819629669,
0.0022228776942938566,
0.17556490004062653,
-0.020907439291477203,
-0.21034255623817444,
0.06216181442141533,
-0.16256019473075867,
0.05563400313258171,
0.1498006135225296,
0.0000046960658437456004,
-0.0551123209297657,
0.11053449660539627,
0.07068122923374176,
-0.15089985728263855,
0.06700064241886139,
0.2145037055015564,
-0.10308168083429337,
-0.0357460156083107,
-0.026931282132864,
0.11480947583913803,
-0.07500673830509186,
-0.12224745005369186,
0.035788483917713165,
0.02528032660484314,
0.27487441897392273,
0.0060133421793580055,
-0.0808195024728775,
0.2503894865512848,
-0.11519195884466171,
-0.05395183712244034,
-0.06643125414848328,
0.07898350059986115,
0.1663738489151001,
-0.13938693702220917,
-0.05554361641407013,
-0.08304992318153381,
-0.0009695275803096592,
-0.0009712671162560582,
-0.026312584057450294,
-0.15495742857456207,
0.07126854360103607,
-0.013934827409684658,
-0.0546758733689785,
0.03261517733335495,
0.2576163709163666,
-0.06230660527944565,
0.07801792025566101,
-0.1044859066605568,
0.02031579613685608,
-0.04815537482500076,
-0.1854347586631775,
-0.0710115134716034,
0.1660001277923584,
-0.10143792629241943,
0.02896159701049328,
-0.026478266343474388,
0.04505506530404091,
-0.0430871956050396,
0.15841242671012878,
-0.20206880569458008,
-0.09515172988176346,
-0.24907474219799042,
0.14570336043834686,
0.08530858904123306,
-0.15056854486465454,
0.11756666749715805,
0.06994961202144623,
-0.05212690681219101,
-0.05743562802672386,
-0.14526347815990448,
-0.04358519986271858,
-0.014195523224771023,
-0.16825440526008606,
-0.06442379951477051,
-0.18305546045303345,
-0.18051135540008545,
-0.22835206985473633,
-0.05984804034233093,
0.1746799647808075,
0.05000065639615059,
-0.060966771095991135,
-0.3419525921344757,
0.09316908568143845,
0.15037564933300018,
0.004035145044326782,
-0.045790400356054306,
0.04516245424747467,
-0.22489508986473083,
-0.06493792682886124,
0.11957480758428574,
0.053262170404195786,
0.029500043019652367,
0.0069556087255477905,
-0.10344421118497849,
0.0841095820069313,
0.04022393375635147,
0.1627846360206604,
0.13037370145320892,
0.1294030398130417,
0.07624851167201996,
0.08149987459182739,
-0.030217502266168594,
-0.014819958247244358,
-0.05357777699828148,
-0.01887156441807747,
-0.029313350096344948,
0.11997256428003311,
0.10192769020795822,
-0.10122009366750717,
0.1887286752462387,
-0.04151548445224762,
-0.034036800265312195,
-0.0030987299978733063,
-0.00421995809301734,
-0.07227349281311035,
0.02469581738114357,
-0.29005277156829834,
-0.11250808835029602,
-0.027176422998309135,
0.037489473819732666,
-0.011130898259580135,
0.19486244022846222,
0.05989031493663788,
-0.02225806750357151,
0.05513874813914299,
-0.3139064908027649,
0.035693105310201645,
-0.20406027138233185,
0.05558670312166214,
0.028463352471590042,
0.12348439544439316,
0.0055081951431930065,
-0.19818313419818878,
-0.15235131978988647,
-0.0875188559293747,
0.03675125539302826,
-0.02459813468158245,
0.06047205254435539,
-0.14809690415859222,
0.003394159721210599,
0.05553203448653221,
0.03024313412606716,
0.17436692118644714,
-0.03362385556101799,
0.06137816980481148,
0.21813108026981354,
0.24570848047733307,
-0.0951843336224556,
0.02393963932991028,
-0.11892037093639374,
-0.0757371187210083,
-0.08920329809188843,
0.13218700885772705,
-0.2851983606815338,
0.1889612376689911,
0.06884597986936569,
-0.2631971836090088,
0.05737824738025665,
-0.013590523041784763,
0.004782065283507109,
-0.03132670372724533,
0.0265289768576622,
0.1519167721271515,
-0.17339248955249786,
-0.0755852535367012,
0.028300656005740166,
-0.05583135038614273,
0.07974544167518616,
-0.11540090292692184,
0.17713883519172668,
-0.2418544441461563,
0.10775066912174225,
-0.032601386308670044,
0.04320235922932625,
-0.24560503661632538,
-0.010073219425976276,
-0.08545386046171188,
-0.0074621220119297504,
-0.03443584963679314,
-0.015260113403201103,
-0.17713221907615662,
0.005297270603477955,
0.008816391229629517,
0.042079050093889236,
-0.20128436386585236,
-0.06171054765582085,
0.018201565369963646,
-0.08929288387298584,
0.010389906354248524,
0.16789071261882782,
-0.0014499841490760446,
-0.08047416061162949,
-0.07594913244247437,
0.005906371399760246,
0.14366160333156586,
0.027214299887418747,
0.20461896061897278,
-0.10246128588914871,
-0.03912544250488281,
-0.002603942761197686,
0.00844927504658699,
-0.030459770932793617,
-0.05201491713523865,
0.109295554459095,
0.0973731130361557,
-0.04137824475765228,
-0.09538456797599792,
0.0019644564017653465,
0.08468466252088547,
-0.011607726104557514,
-0.14975018799304962,
-0.02382618933916092,
-0.24581998586654663,
0.00850741658359766,
-0.05638178065419197,
0.03661472350358963,
0.13700057566165924,
0.06644269078969955,
-0.05698458477854729,
0.03190973028540611,
0.0022453395649790764,
-0.04023708030581474,
0.15140609443187714,
0.036351278424263,
-0.13197387754917145,
0.3015817403793335,
0.0742402896285057,
-0.03391881659626961,
0.045967523008584976,
0.03222883865237236,
0.05870652571320534,
-0.023732736706733704,
0.1473410725593567,
-0.061593472957611084,
-0.21027223765850067,
0.36453598737716675,
-0.02877887524664402,
0.02079159766435623,
0.13827326893806458,
0.04910493642091751,
-0.11417054384946823,
0.04588836058974266,
-0.07703665643930435,
0.0019906060770154,
0.08444476872682571,
-0.05144098028540611,
-0.05900797247886658,
-0.05611634626984596,
-0.06588153541088104,
0.019598692655563354,
-0.08013314008712769,
0.0699470043182373,
-0.10836756974458694,
0.05986979976296425,
-0.06268041580915451,
-0.08727557957172394,
0.04244954138994217,
0.16344036161899567,
-0.03764043375849724,
0.029593197628855705,
0.21222719550132751,
-0.09419969469308853,
-0.16264788806438446,
-0.05168341100215912,
0.039517808705568314,
0.022711528465151787,
-0.01390431635081768,
-0.06553836166858673,
-0.1389092206954956,
-0.09073420614004135,
-0.08913692831993103,
0.07340127229690552,
-0.04766012728214264,
0.06400728970766068,
0.02062789909541607,
0.013335689902305603,
-0.03398141637444496,
0.016925618052482605,
0.01661674678325653,
0.20093266665935516,
-0.007422654423862696,
0.19646568596363068,
0.243182972073555,
-0.1660667210817337,
-0.07503834366798401,
0.03202812746167183,
-0.13735543191432953,
0.08650245517492294,
0.11583686619997025,
0.15934056043624878,
0.05332937836647034,
0.07091446965932846,
-0.010717518627643585,
-0.004535519052296877,
-0.08441495895385742,
0.09626125544309616,
0.09125839918851852,
-0.10494532436132431,
0.17265619337558746,
-0.013476905412971973,
0.08720684051513672,
-0.3380545377731323,
-0.14192524552345276,
-0.06901174783706665,
-0.040251825004816055,
0.040105078369379044,
0.05326226353645325,
-0.22947195172309875,
-0.07081545889377594,
0.14559565484523773,
-0.16831503808498383,
-0.2177887260913849,
-0.03298012539744377,
0.3428860306739807,
0.05782369151711464,
0.03518123924732208,
0.10321272909641266,
-0.05086955800652504,
-0.08283645659685135,
0.08656223863363266,
-0.1555335968732834,
-0.008432932198047638,
-0.17583006620407104,
0.08378273248672485,
-0.08138406276702881,
0.0636586844921112,
0.07536053657531738,
0.01946837455034256,
-0.03193814679980278,
-0.01709393411874771,
0.1348324865102768,
-0.2173939347267151,
0.18211081624031067,
-0.005445717368274927,
-0.08593827486038208,
0.27049800753593445,
-0.0032528573647141457,
0.15052089095115662,
0.18225105106830597,
-0.06250595301389694,
0.10238084197044373,
0.07473233342170715,
0.006812513340264559,
-0.2424095720052719,
-0.11055702716112137,
0.06286413222551346,
-0.1543123871088028,
-0.0559416301548481,
0.03213472664356232,
0.08984861522912979,
-0.1449013203382492,
-0.03007817082107067,
-0.29131969809532166,
0.16563083231449127,
0.0701945573091507,
0.1028418093919754,
0.055893730372190475,
-0.06258924305438995,
0.02160830982029438,
-0.0026543245185166597,
0.04225059226155281,
-0.12926842272281647,
-0.03769294545054436,
-0.08294837921857834,
0.0553157813847065,
0.1330539435148239,
0.021688971668481827,
0.05479729548096657,
0.06597398966550827,
-0.056269727647304535,
-0.1349867284297943,
0.14412526786327362,
0.15724922716617584,
0.033660922199487686,
-0.07506062090396881,
0.09069601446390152,
0.10415356606245041,
-0.027633637189865112,
0.15386024117469788,
0.08643825352191925,
0.035705242305994034,
-0.1491578370332718,
-0.0716402530670166,
0.031198784708976746,
0.02133377455174923,
0.16404569149017334,
0.012994849123060703,
0.027501562610268593,
-0.024335764348506927,
0.372873991727829,
0.16760818660259247,
0.008117987774312496,
0.012178181670606136,
-0.011931236833333969,
-0.20337051153182983,
-0.23392483592033386,
-0.19272394478321075,
0.11701203137636185,
0.26644381880760193,
-0.11095768213272095,
-0.04409076273441315,
0.037254951894283295,
-0.10845471173524857,
0.15649984776973724,
0.08095131069421768,
0.014296861365437508,
-0.03987666219472885,
0.09765837341547012,
-0.13957346975803375,
0.0966576635837555,
-0.015330368652939796,
0.4009614586830139,
-0.021354245021939278,
-0.04102849215269089,
0.053944285959005356,
-0.04177761450409889,
-0.001569744199514389,
0.11205988377332687,
-0.16107022762298584,
0.048529256135225296,
0.006522409617900848,
0.0897434651851654,
-0.01113052573055029,
0.24773140251636505,
-0.03469337150454521,
-0.024931209161877632,
-0.24475954473018646,
-0.11572320014238358,
-0.059351738542318344,
0.20780111849308014,
0.09721609205007553,
0.1473301649093628,
-0.14921700954437256,
-0.050581853836774826,
0.10003906488418579,
0.01736634597182274,
-0.06644421070814133,
-0.01539111789315939,
0.08002208918333054,
0.13793641328811646,
0.04470515996217728,
0.11786621809005737,
-0.21435187757015228,
0.004490341059863567,
0.07951308786869049,
0.014016438275575638,
0.13466031849384308,
0.029781220480799675,
0.0055236429907381535,
0.08470863103866577,
0.06856705248355865,
0.11224297434091568,
-0.10613631457090378,
0.006786843296140432,
0.0534418486058712,
0.2636270821094513,
-0.23372529447078705,
0.06885362416505814,
-0.18880337476730347,
-0.031421445310115814,
0.07788430154323578,
0.00017960091645363718,
-0.01075437106192112,
-0.03560531884431839,
-0.04128468781709671,
0.04771841689944267,
-0.061702530831098557,
-0.10647138953208923,
-0.03810501471161842,
0.25681421160697937,
-0.2175809144973755,
0.00874988455325365,
0.22607450187206268,
-0.11272464692592621,
0.03325258940458298,
0.16981551051139832,
-0.04885473474860191,
-0.07521160691976547,
-0.19957415759563446,
-0.0989527627825737,
-0.086904376745224,
0.16858400404453278,
0.0017310897819697857,
-0.06894630938768387,
-0.123754121363163,
-0.0340472050011158,
0.060406170785427094,
-0.03744811564683914,
-0.010740378871560097,
-0.0032517763320356607,
0.1377548724412918,
-0.1560850292444229,
-0.07207032293081284,
-0.09612755477428436,
0.08092925697565079,
0.08189502358436584,
-0.09589753299951553,
0.10975182801485062,
-0.03947451338171959,
-0.031449757516384125,
0.05718901753425598,
-0.006607442162930965,
-0.017021238803863525,
0.1329885870218277,
0.11852100491523743,
0.037561047822237015,
0.1909562051296234,
0.21606948971748352,
-0.14357520639896393,
-0.10785653442144394,
0.26265832781791687,
0.09117700904607773,
-0.16432255506515503,
0.010910370387136936,
0.039607007056474686,
0.007138177752494812,
-0.2373114973306656,
-0.07672784477472305,
0.171210378408432,
0.16020335257053375,
0.23470944166183472,
-0.0941038504242897,
-0.13453146815299988,
-0.1793793886899948,
-0.04937228187918663,
-0.10615569353103638,
0.1720024049282074,
-0.016809402033686638,
-0.0956011638045311,
0.10535416007041931,
-2.383078081117291e-32,
-0.039642397314310074,
-0.08205016702413559,
-0.042046595364809036,
-0.036182790994644165,
-0.33127349615097046,
0.11322882771492004,
-0.023282956331968307,
-0.07143697887659073,
-0.06292624026536942,
-0.013366400264203548,
-0.1527349054813385,
-0.062459807842969894,
0.011120706796646118,
0.004542923998087645,
-0.06523233652114868,
0.07044661045074463,
-0.03981504961848259,
0.05611724406480789,
0.02288234978914261,
0.037243347615003586,
0.04601361230015755,
0.062271472066640854,
-0.0005957273533567786,
-0.10572879761457443,
-0.2229616492986679,
0.11123496294021606,
-0.029945475980639458,
0.06247386336326599,
0.18549440801143646,
-0.09161553531885147,
-0.05046698823571205,
0.19723856449127197,
0.1168028935790062,
-0.11934474855661392,
-0.02980457805097103,
0.10347867757081985,
-0.14921022951602936,
-0.04893799498677254,
-0.0993228405714035,
0.12996284663677216,
0.17927008867263794,
0.03317924588918686,
0.08586988598108292,
-0.26266226172447205,
0.06430396437644958,
0.09627345204353333,
0.04912879690527916,
-0.10188495367765427,
-0.08113753795623779,
-0.1336800754070282,
0.022274894639849663,
0.10874472558498383,
-0.04827867075800896,
0.14366459846496582,
0.05433947220444679,
-0.15857556462287903,
-0.11153203994035721,
0.14610378444194794,
0.00411801366135478,
-0.10059504956007004,
0.21085675060749054,
-0.016003767028450966,
-0.006098954938352108,
0.001206929562613368,
0.06878626346588135,
0.07970213890075684,
0.28674688935279846,
0.0016764634056016803,
-0.05145770683884621,
-0.04237474128603935,
0.012264244258403778,
0.0751974806189537,
-0.021052656695246696,
-0.07070139795541763,
0.0006162490462884307,
-0.12472567707300186,
-0.09538636356592178,
-0.010072888806462288,
0.05700232461094856,
-0.09135500341653824,
0.04916109889745712,
0.10449908673763275,
0.0642109140753746,
0.054103586822748184,
0.0420956052839756,
0.1937851905822754,
-0.008836491033434868,
-0.008661175146698952,
-0.05894887447357178,
-0.1109684556722641,
-0.05034260079264641,
0.08822517842054367,
-0.02393379621207714,
-0.18838587403297424,
-0.05187825486063957,
0.15607091784477234,
0.00467604910954833,
0.11038737744092941,
-0.17016081511974335,
-0.06010426580905914,
-0.11515477299690247,
-0.0896366685628891,
-0.09920739382505417,
-0.09018309414386749,
0.1907949149608612,
0.1363425850868225,
0.08417811244726181,
0.12381139397621155,
-0.1238579973578453,
-0.09765633940696716,
-0.02426992729306221,
-0.27496567368507385,
0.16048899292945862,
0.2922065258026123,
0.17590399086475372,
-0.14565213024616241,
0.050185032188892365,
-0.1455840915441513,
0.16430160403251648,
0.06957726180553436,
-0.07218054682016373,
-0.11679471284151077,
-0.029767243191599846,
-0.03778386116027832,
-0.04891255870461464,
0.044674161821603775,
-0.11771456897258759,
-0.07350894063711166,
-0.004775581881403923,
-0.0011775171151384711,
0.051953401416540146,
0.08874495327472687,
6.786450512663578e-7,
-0.36413779854774475,
0.27956289052963257,
-0.08679476380348206,
0.026698315516114235,
-0.16028812527656555,
-0.006988183595240116,
-0.18391598761081696,
0.002842017449438572,
-0.21157340705394745,
0.08417639136314392,
0.2580553889274597,
0.009095890447497368,
-0.04375891759991646,
0.009013835340738297,
0.08440104126930237,
0.03129890188574791,
-0.020941272377967834,
0.10550066083669662,
-0.0016907901735976338,
-0.011272191070020199,
0.10287715494632721,
0.0484054833650589,
0.12767095863819122,
-0.10665994137525558,
0.048939988017082214,
-0.11283589154481888,
-0.16963103413581848,
-0.10858044773340225,
-0.01252437848597765,
0.04868007451295853,
0.0150448651984334,
0.04772745817899704,
-0.08344123512506485,
0.13185864686965942,
0.0042229313403368,
0.023599185049533844,
-0.034864675253629684,
-0.07993350923061371,
-0.05814579501748085,
0.11037851125001907,
0.06172661483287811,
0.05100079998373985,
-0.050427138805389404,
-0.038065724074840546,
0.003636111505329609,
0.07862556725740433,
-0.09498437494039536,
-0.061456624418497086,
0.03524353355169296,
-0.04600588604807854,
-0.09447378665208817,
0.14498312771320343,
0.22181762754917145,
0.18709923326969147,
-0.0638132095336914,
-0.19567884504795074,
0.08330642431974411,
-0.23134177923202515,
0.14809195697307587,
0.016755837947130203,
-0.03236689418554306,
-0.16407155990600586,
0.09969765692949295,
0.080433689057827,
0.13260886073112488,
-0.1326906383037567,
-0.028049347922205925,
5.78963167600817e-35,
0.03653468191623688,
-0.029012562707066536,
0.050224557518959045,
-0.1225816011428833,
-0.007150986231863499,
0.02993987686932087,
0.17885036766529083,
-0.004327965900301933,
0.04589039087295532,
-0.16445443034172058,
-0.1263214498758316
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | You are right. I overlooked the feature type.
This is a reproducer:
```python
import pyarrow as pa
from datasets.arrow_writer import TypedSequence
pa.array(TypedSequence([18329103420363166823], type=Value("uint64")))
```
`pa.array([18329103420363166823])` also fails with the same error, so it seems PyArrow does not always infer the correct type as NumPy does (`uint64` in this case).
I'll report this issue in the Arrow repo.
`pa.array([18329103420363166823], pa.uint64)` works, so maybe we can implement a temporary fix (supporting complex input such as `[{"image": pil_image, "num": uint64_value}]` would be hard though).
In the meantime, you should be able to bypass this error by returning the `simhash` values as NumPy scalars in the script:
```python
def _generate_examples(self, ...):
...
yield {..., "simhash": np.uint64(simhash), ...}
``` | ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 114 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
You are right. I overlooked the feature type.
This is a reproducer:
```python
import pyarrow as pa
from datasets.arrow_writer import TypedSequence
pa.array(TypedSequence([18329103420363166823], type=Value("uint64")))
```
`pa.array([18329103420363166823])` also fails with the same error, so it seems PyArrow does not always infer the correct type as NumPy does (`uint64` in this case).
I'll report this issue in the Arrow repo.
`pa.array([18329103420363166823], pa.uint64)` works, so maybe we can implement a temporary fix (supporting complex input such as `[{"image": pil_image, "num": uint64_value}]` would be hard though).
In the meantime, you should be able to bypass this error by returning the `simhash` values as NumPy scalars in the script:
```python
def _generate_examples(self, ...):
...
yield {..., "simhash": np.uint64(simhash), ...}
``` | [
0.009656712412834167,
0.09457047283649445,
0.028397396206855774,
-0.10254718363285065,
0.300279438495636,
0.07912066578865051,
0.11113177239894867,
0.15341193974018097,
0.008289691060781479,
0.17992077767848969,
0.055744316428899765,
-0.09257358312606812,
-0.08333378285169601,
0.008388161659240723,
-0.11378554999828339,
-0.090740866959095,
-0.06067996099591255,
-0.15912677347660065,
0.016942394897341728,
0.055824410170316696,
-0.15361841022968292,
0.11855024844408035,
0.17527858912944794,
-0.22632110118865967,
-0.12296482175588608,
-0.2910356819629669,
0.0022228776942938566,
0.17556490004062653,
-0.020907439291477203,
-0.21034255623817444,
0.06216181442141533,
-0.16256019473075867,
0.05563400313258171,
0.1498006135225296,
0.0000046960658437456004,
-0.0551123209297657,
0.11053449660539627,
0.07068122923374176,
-0.15089985728263855,
0.06700064241886139,
0.2145037055015564,
-0.10308168083429337,
-0.0357460156083107,
-0.026931282132864,
0.11480947583913803,
-0.07500673830509186,
-0.12224745005369186,
0.035788483917713165,
0.02528032660484314,
0.27487441897392273,
0.0060133421793580055,
-0.0808195024728775,
0.2503894865512848,
-0.11519195884466171,
-0.05395183712244034,
-0.06643125414848328,
0.07898350059986115,
0.1663738489151001,
-0.13938693702220917,
-0.05554361641407013,
-0.08304992318153381,
-0.0009695275803096592,
-0.0009712671162560582,
-0.026312584057450294,
-0.15495742857456207,
0.07126854360103607,
-0.013934827409684658,
-0.0546758733689785,
0.03261517733335495,
0.2576163709163666,
-0.06230660527944565,
0.07801792025566101,
-0.1044859066605568,
0.02031579613685608,
-0.04815537482500076,
-0.1854347586631775,
-0.0710115134716034,
0.1660001277923584,
-0.10143792629241943,
0.02896159701049328,
-0.026478266343474388,
0.04505506530404091,
-0.0430871956050396,
0.15841242671012878,
-0.20206880569458008,
-0.09515172988176346,
-0.24907474219799042,
0.14570336043834686,
0.08530858904123306,
-0.15056854486465454,
0.11756666749715805,
0.06994961202144623,
-0.05212690681219101,
-0.05743562802672386,
-0.14526347815990448,
-0.04358519986271858,
-0.014195523224771023,
-0.16825440526008606,
-0.06442379951477051,
-0.18305546045303345,
-0.18051135540008545,
-0.22835206985473633,
-0.05984804034233093,
0.1746799647808075,
0.05000065639615059,
-0.060966771095991135,
-0.3419525921344757,
0.09316908568143845,
0.15037564933300018,
0.004035145044326782,
-0.045790400356054306,
0.04516245424747467,
-0.22489508986473083,
-0.06493792682886124,
0.11957480758428574,
0.053262170404195786,
0.029500043019652367,
0.0069556087255477905,
-0.10344421118497849,
0.0841095820069313,
0.04022393375635147,
0.1627846360206604,
0.13037370145320892,
0.1294030398130417,
0.07624851167201996,
0.08149987459182739,
-0.030217502266168594,
-0.014819958247244358,
-0.05357777699828148,
-0.01887156441807747,
-0.029313350096344948,
0.11997256428003311,
0.10192769020795822,
-0.10122009366750717,
0.1887286752462387,
-0.04151548445224762,
-0.034036800265312195,
-0.0030987299978733063,
-0.00421995809301734,
-0.07227349281311035,
0.02469581738114357,
-0.29005277156829834,
-0.11250808835029602,
-0.027176422998309135,
0.037489473819732666,
-0.011130898259580135,
0.19486244022846222,
0.05989031493663788,
-0.02225806750357151,
0.05513874813914299,
-0.3139064908027649,
0.035693105310201645,
-0.20406027138233185,
0.05558670312166214,
0.028463352471590042,
0.12348439544439316,
0.0055081951431930065,
-0.19818313419818878,
-0.15235131978988647,
-0.0875188559293747,
0.03675125539302826,
-0.02459813468158245,
0.06047205254435539,
-0.14809690415859222,
0.003394159721210599,
0.05553203448653221,
0.03024313412606716,
0.17436692118644714,
-0.03362385556101799,
0.06137816980481148,
0.21813108026981354,
0.24570848047733307,
-0.0951843336224556,
0.02393963932991028,
-0.11892037093639374,
-0.0757371187210083,
-0.08920329809188843,
0.13218700885772705,
-0.2851983606815338,
0.1889612376689911,
0.06884597986936569,
-0.2631971836090088,
0.05737824738025665,
-0.013590523041784763,
0.004782065283507109,
-0.03132670372724533,
0.0265289768576622,
0.1519167721271515,
-0.17339248955249786,
-0.0755852535367012,
0.028300656005740166,
-0.05583135038614273,
0.07974544167518616,
-0.11540090292692184,
0.17713883519172668,
-0.2418544441461563,
0.10775066912174225,
-0.032601386308670044,
0.04320235922932625,
-0.24560503661632538,
-0.010073219425976276,
-0.08545386046171188,
-0.0074621220119297504,
-0.03443584963679314,
-0.015260113403201103,
-0.17713221907615662,
0.005297270603477955,
0.008816391229629517,
0.042079050093889236,
-0.20128436386585236,
-0.06171054765582085,
0.018201565369963646,
-0.08929288387298584,
0.010389906354248524,
0.16789071261882782,
-0.0014499841490760446,
-0.08047416061162949,
-0.07594913244247437,
0.005906371399760246,
0.14366160333156586,
0.027214299887418747,
0.20461896061897278,
-0.10246128588914871,
-0.03912544250488281,
-0.002603942761197686,
0.00844927504658699,
-0.030459770932793617,
-0.05201491713523865,
0.109295554459095,
0.0973731130361557,
-0.04137824475765228,
-0.09538456797599792,
0.0019644564017653465,
0.08468466252088547,
-0.011607726104557514,
-0.14975018799304962,
-0.02382618933916092,
-0.24581998586654663,
0.00850741658359766,
-0.05638178065419197,
0.03661472350358963,
0.13700057566165924,
0.06644269078969955,
-0.05698458477854729,
0.03190973028540611,
0.0022453395649790764,
-0.04023708030581474,
0.15140609443187714,
0.036351278424263,
-0.13197387754917145,
0.3015817403793335,
0.0742402896285057,
-0.03391881659626961,
0.045967523008584976,
0.03222883865237236,
0.05870652571320534,
-0.023732736706733704,
0.1473410725593567,
-0.061593472957611084,
-0.21027223765850067,
0.36453598737716675,
-0.02877887524664402,
0.02079159766435623,
0.13827326893806458,
0.04910493642091751,
-0.11417054384946823,
0.04588836058974266,
-0.07703665643930435,
0.0019906060770154,
0.08444476872682571,
-0.05144098028540611,
-0.05900797247886658,
-0.05611634626984596,
-0.06588153541088104,
0.019598692655563354,
-0.08013314008712769,
0.0699470043182373,
-0.10836756974458694,
0.05986979976296425,
-0.06268041580915451,
-0.08727557957172394,
0.04244954138994217,
0.16344036161899567,
-0.03764043375849724,
0.029593197628855705,
0.21222719550132751,
-0.09419969469308853,
-0.16264788806438446,
-0.05168341100215912,
0.039517808705568314,
0.022711528465151787,
-0.01390431635081768,
-0.06553836166858673,
-0.1389092206954956,
-0.09073420614004135,
-0.08913692831993103,
0.07340127229690552,
-0.04766012728214264,
0.06400728970766068,
0.02062789909541607,
0.013335689902305603,
-0.03398141637444496,
0.016925618052482605,
0.01661674678325653,
0.20093266665935516,
-0.007422654423862696,
0.19646568596363068,
0.243182972073555,
-0.1660667210817337,
-0.07503834366798401,
0.03202812746167183,
-0.13735543191432953,
0.08650245517492294,
0.11583686619997025,
0.15934056043624878,
0.05332937836647034,
0.07091446965932846,
-0.010717518627643585,
-0.004535519052296877,
-0.08441495895385742,
0.09626125544309616,
0.09125839918851852,
-0.10494532436132431,
0.17265619337558746,
-0.013476905412971973,
0.08720684051513672,
-0.3380545377731323,
-0.14192524552345276,
-0.06901174783706665,
-0.040251825004816055,
0.040105078369379044,
0.05326226353645325,
-0.22947195172309875,
-0.07081545889377594,
0.14559565484523773,
-0.16831503808498383,
-0.2177887260913849,
-0.03298012539744377,
0.3428860306739807,
0.05782369151711464,
0.03518123924732208,
0.10321272909641266,
-0.05086955800652504,
-0.08283645659685135,
0.08656223863363266,
-0.1555335968732834,
-0.008432932198047638,
-0.17583006620407104,
0.08378273248672485,
-0.08138406276702881,
0.0636586844921112,
0.07536053657531738,
0.01946837455034256,
-0.03193814679980278,
-0.01709393411874771,
0.1348324865102768,
-0.2173939347267151,
0.18211081624031067,
-0.005445717368274927,
-0.08593827486038208,
0.27049800753593445,
-0.0032528573647141457,
0.15052089095115662,
0.18225105106830597,
-0.06250595301389694,
0.10238084197044373,
0.07473233342170715,
0.006812513340264559,
-0.2424095720052719,
-0.11055702716112137,
0.06286413222551346,
-0.1543123871088028,
-0.0559416301548481,
0.03213472664356232,
0.08984861522912979,
-0.1449013203382492,
-0.03007817082107067,
-0.29131969809532166,
0.16563083231449127,
0.0701945573091507,
0.1028418093919754,
0.055893730372190475,
-0.06258924305438995,
0.02160830982029438,
-0.0026543245185166597,
0.04225059226155281,
-0.12926842272281647,
-0.03769294545054436,
-0.08294837921857834,
0.0553157813847065,
0.1330539435148239,
0.021688971668481827,
0.05479729548096657,
0.06597398966550827,
-0.056269727647304535,
-0.1349867284297943,
0.14412526786327362,
0.15724922716617584,
0.033660922199487686,
-0.07506062090396881,
0.09069601446390152,
0.10415356606245041,
-0.027633637189865112,
0.15386024117469788,
0.08643825352191925,
0.035705242305994034,
-0.1491578370332718,
-0.0716402530670166,
0.031198784708976746,
0.02133377455174923,
0.16404569149017334,
0.012994849123060703,
0.027501562610268593,
-0.024335764348506927,
0.372873991727829,
0.16760818660259247,
0.008117987774312496,
0.012178181670606136,
-0.011931236833333969,
-0.20337051153182983,
-0.23392483592033386,
-0.19272394478321075,
0.11701203137636185,
0.26644381880760193,
-0.11095768213272095,
-0.04409076273441315,
0.037254951894283295,
-0.10845471173524857,
0.15649984776973724,
0.08095131069421768,
0.014296861365437508,
-0.03987666219472885,
0.09765837341547012,
-0.13957346975803375,
0.0966576635837555,
-0.015330368652939796,
0.4009614586830139,
-0.021354245021939278,
-0.04102849215269089,
0.053944285959005356,
-0.04177761450409889,
-0.001569744199514389,
0.11205988377332687,
-0.16107022762298584,
0.048529256135225296,
0.006522409617900848,
0.0897434651851654,
-0.01113052573055029,
0.24773140251636505,
-0.03469337150454521,
-0.024931209161877632,
-0.24475954473018646,
-0.11572320014238358,
-0.059351738542318344,
0.20780111849308014,
0.09721609205007553,
0.1473301649093628,
-0.14921700954437256,
-0.050581853836774826,
0.10003906488418579,
0.01736634597182274,
-0.06644421070814133,
-0.01539111789315939,
0.08002208918333054,
0.13793641328811646,
0.04470515996217728,
0.11786621809005737,
-0.21435187757015228,
0.004490341059863567,
0.07951308786869049,
0.014016438275575638,
0.13466031849384308,
0.029781220480799675,
0.0055236429907381535,
0.08470863103866577,
0.06856705248355865,
0.11224297434091568,
-0.10613631457090378,
0.006786843296140432,
0.0534418486058712,
0.2636270821094513,
-0.23372529447078705,
0.06885362416505814,
-0.18880337476730347,
-0.031421445310115814,
0.07788430154323578,
0.00017960091645363718,
-0.01075437106192112,
-0.03560531884431839,
-0.04128468781709671,
0.04771841689944267,
-0.061702530831098557,
-0.10647138953208923,
-0.03810501471161842,
0.25681421160697937,
-0.2175809144973755,
0.00874988455325365,
0.22607450187206268,
-0.11272464692592621,
0.03325258940458298,
0.16981551051139832,
-0.04885473474860191,
-0.07521160691976547,
-0.19957415759563446,
-0.0989527627825737,
-0.086904376745224,
0.16858400404453278,
0.0017310897819697857,
-0.06894630938768387,
-0.123754121363163,
-0.0340472050011158,
0.060406170785427094,
-0.03744811564683914,
-0.010740378871560097,
-0.0032517763320356607,
0.1377548724412918,
-0.1560850292444229,
-0.07207032293081284,
-0.09612755477428436,
0.08092925697565079,
0.08189502358436584,
-0.09589753299951553,
0.10975182801485062,
-0.03947451338171959,
-0.031449757516384125,
0.05718901753425598,
-0.006607442162930965,
-0.017021238803863525,
0.1329885870218277,
0.11852100491523743,
0.037561047822237015,
0.1909562051296234,
0.21606948971748352,
-0.14357520639896393,
-0.10785653442144394,
0.26265832781791687,
0.09117700904607773,
-0.16432255506515503,
0.010910370387136936,
0.039607007056474686,
0.007138177752494812,
-0.2373114973306656,
-0.07672784477472305,
0.171210378408432,
0.16020335257053375,
0.23470944166183472,
-0.0941038504242897,
-0.13453146815299988,
-0.1793793886899948,
-0.04937228187918663,
-0.10615569353103638,
0.1720024049282074,
-0.016809402033686638,
-0.0956011638045311,
0.10535416007041931,
-2.383078081117291e-32,
-0.039642397314310074,
-0.08205016702413559,
-0.042046595364809036,
-0.036182790994644165,
-0.33127349615097046,
0.11322882771492004,
-0.023282956331968307,
-0.07143697887659073,
-0.06292624026536942,
-0.013366400264203548,
-0.1527349054813385,
-0.062459807842969894,
0.011120706796646118,
0.004542923998087645,
-0.06523233652114868,
0.07044661045074463,
-0.03981504961848259,
0.05611724406480789,
0.02288234978914261,
0.037243347615003586,
0.04601361230015755,
0.062271472066640854,
-0.0005957273533567786,
-0.10572879761457443,
-0.2229616492986679,
0.11123496294021606,
-0.029945475980639458,
0.06247386336326599,
0.18549440801143646,
-0.09161553531885147,
-0.05046698823571205,
0.19723856449127197,
0.1168028935790062,
-0.11934474855661392,
-0.02980457805097103,
0.10347867757081985,
-0.14921022951602936,
-0.04893799498677254,
-0.0993228405714035,
0.12996284663677216,
0.17927008867263794,
0.03317924588918686,
0.08586988598108292,
-0.26266226172447205,
0.06430396437644958,
0.09627345204353333,
0.04912879690527916,
-0.10188495367765427,
-0.08113753795623779,
-0.1336800754070282,
0.022274894639849663,
0.10874472558498383,
-0.04827867075800896,
0.14366459846496582,
0.05433947220444679,
-0.15857556462287903,
-0.11153203994035721,
0.14610378444194794,
0.00411801366135478,
-0.10059504956007004,
0.21085675060749054,
-0.016003767028450966,
-0.006098954938352108,
0.001206929562613368,
0.06878626346588135,
0.07970213890075684,
0.28674688935279846,
0.0016764634056016803,
-0.05145770683884621,
-0.04237474128603935,
0.012264244258403778,
0.0751974806189537,
-0.021052656695246696,
-0.07070139795541763,
0.0006162490462884307,
-0.12472567707300186,
-0.09538636356592178,
-0.010072888806462288,
0.05700232461094856,
-0.09135500341653824,
0.04916109889745712,
0.10449908673763275,
0.0642109140753746,
0.054103586822748184,
0.0420956052839756,
0.1937851905822754,
-0.008836491033434868,
-0.008661175146698952,
-0.05894887447357178,
-0.1109684556722641,
-0.05034260079264641,
0.08822517842054367,
-0.02393379621207714,
-0.18838587403297424,
-0.05187825486063957,
0.15607091784477234,
0.00467604910954833,
0.11038737744092941,
-0.17016081511974335,
-0.06010426580905914,
-0.11515477299690247,
-0.0896366685628891,
-0.09920739382505417,
-0.09018309414386749,
0.1907949149608612,
0.1363425850868225,
0.08417811244726181,
0.12381139397621155,
-0.1238579973578453,
-0.09765633940696716,
-0.02426992729306221,
-0.27496567368507385,
0.16048899292945862,
0.2922065258026123,
0.17590399086475372,
-0.14565213024616241,
0.050185032188892365,
-0.1455840915441513,
0.16430160403251648,
0.06957726180553436,
-0.07218054682016373,
-0.11679471284151077,
-0.029767243191599846,
-0.03778386116027832,
-0.04891255870461464,
0.044674161821603775,
-0.11771456897258759,
-0.07350894063711166,
-0.004775581881403923,
-0.0011775171151384711,
0.051953401416540146,
0.08874495327472687,
6.786450512663578e-7,
-0.36413779854774475,
0.27956289052963257,
-0.08679476380348206,
0.026698315516114235,
-0.16028812527656555,
-0.006988183595240116,
-0.18391598761081696,
0.002842017449438572,
-0.21157340705394745,
0.08417639136314392,
0.2580553889274597,
0.009095890447497368,
-0.04375891759991646,
0.009013835340738297,
0.08440104126930237,
0.03129890188574791,
-0.020941272377967834,
0.10550066083669662,
-0.0016907901735976338,
-0.011272191070020199,
0.10287715494632721,
0.0484054833650589,
0.12767095863819122,
-0.10665994137525558,
0.048939988017082214,
-0.11283589154481888,
-0.16963103413581848,
-0.10858044773340225,
-0.01252437848597765,
0.04868007451295853,
0.0150448651984334,
0.04772745817899704,
-0.08344123512506485,
0.13185864686965942,
0.0042229313403368,
0.023599185049533844,
-0.034864675253629684,
-0.07993350923061371,
-0.05814579501748085,
0.11037851125001907,
0.06172661483287811,
0.05100079998373985,
-0.050427138805389404,
-0.038065724074840546,
0.003636111505329609,
0.07862556725740433,
-0.09498437494039536,
-0.061456624418497086,
0.03524353355169296,
-0.04600588604807854,
-0.09447378665208817,
0.14498312771320343,
0.22181762754917145,
0.18709923326969147,
-0.0638132095336914,
-0.19567884504795074,
0.08330642431974411,
-0.23134177923202515,
0.14809195697307587,
0.016755837947130203,
-0.03236689418554306,
-0.16407155990600586,
0.09969765692949295,
0.080433689057827,
0.13260886073112488,
-0.1326906383037567,
-0.028049347922205925,
5.78963167600817e-35,
0.03653468191623688,
-0.029012562707066536,
0.050224557518959045,
-0.1225816011428833,
-0.007150986231863499,
0.02993987686932087,
0.17885036766529083,
-0.004327965900301933,
0.04589039087295532,
-0.16445443034172058,
-0.1263214498758316
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | Thank you for checking this issue in detail.
However, it seems that using `np.uint64(simhash)` does not work. The same issue still exists.
https://huggingface.co/datasets/liwu/MNBVC/commit/1e44f1e400b7e61052647d44c99cdae3bae9c830
Anyway, we decide to use string type for these simhash values. Hope pyarrow can fix their bug soon. | ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 41 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
Thank you for checking this issue in detail.
However, it seems that using `np.uint64(simhash)` does not work. The same issue still exists.
https://huggingface.co/datasets/liwu/MNBVC/commit/1e44f1e400b7e61052647d44c99cdae3bae9c830
Anyway, we decide to use string type for these simhash values. Hope pyarrow can fix their bug soon. | [
0.009656712412834167,
0.09457047283649445,
0.028397396206855774,
-0.10254718363285065,
0.300279438495636,
0.07912066578865051,
0.11113177239894867,
0.15341193974018097,
0.008289691060781479,
0.17992077767848969,
0.055744316428899765,
-0.09257358312606812,
-0.08333378285169601,
0.008388161659240723,
-0.11378554999828339,
-0.090740866959095,
-0.06067996099591255,
-0.15912677347660065,
0.016942394897341728,
0.055824410170316696,
-0.15361841022968292,
0.11855024844408035,
0.17527858912944794,
-0.22632110118865967,
-0.12296482175588608,
-0.2910356819629669,
0.0022228776942938566,
0.17556490004062653,
-0.020907439291477203,
-0.21034255623817444,
0.06216181442141533,
-0.16256019473075867,
0.05563400313258171,
0.1498006135225296,
0.0000046960658437456004,
-0.0551123209297657,
0.11053449660539627,
0.07068122923374176,
-0.15089985728263855,
0.06700064241886139,
0.2145037055015564,
-0.10308168083429337,
-0.0357460156083107,
-0.026931282132864,
0.11480947583913803,
-0.07500673830509186,
-0.12224745005369186,
0.035788483917713165,
0.02528032660484314,
0.27487441897392273,
0.0060133421793580055,
-0.0808195024728775,
0.2503894865512848,
-0.11519195884466171,
-0.05395183712244034,
-0.06643125414848328,
0.07898350059986115,
0.1663738489151001,
-0.13938693702220917,
-0.05554361641407013,
-0.08304992318153381,
-0.0009695275803096592,
-0.0009712671162560582,
-0.026312584057450294,
-0.15495742857456207,
0.07126854360103607,
-0.013934827409684658,
-0.0546758733689785,
0.03261517733335495,
0.2576163709163666,
-0.06230660527944565,
0.07801792025566101,
-0.1044859066605568,
0.02031579613685608,
-0.04815537482500076,
-0.1854347586631775,
-0.0710115134716034,
0.1660001277923584,
-0.10143792629241943,
0.02896159701049328,
-0.026478266343474388,
0.04505506530404091,
-0.0430871956050396,
0.15841242671012878,
-0.20206880569458008,
-0.09515172988176346,
-0.24907474219799042,
0.14570336043834686,
0.08530858904123306,
-0.15056854486465454,
0.11756666749715805,
0.06994961202144623,
-0.05212690681219101,
-0.05743562802672386,
-0.14526347815990448,
-0.04358519986271858,
-0.014195523224771023,
-0.16825440526008606,
-0.06442379951477051,
-0.18305546045303345,
-0.18051135540008545,
-0.22835206985473633,
-0.05984804034233093,
0.1746799647808075,
0.05000065639615059,
-0.060966771095991135,
-0.3419525921344757,
0.09316908568143845,
0.15037564933300018,
0.004035145044326782,
-0.045790400356054306,
0.04516245424747467,
-0.22489508986473083,
-0.06493792682886124,
0.11957480758428574,
0.053262170404195786,
0.029500043019652367,
0.0069556087255477905,
-0.10344421118497849,
0.0841095820069313,
0.04022393375635147,
0.1627846360206604,
0.13037370145320892,
0.1294030398130417,
0.07624851167201996,
0.08149987459182739,
-0.030217502266168594,
-0.014819958247244358,
-0.05357777699828148,
-0.01887156441807747,
-0.029313350096344948,
0.11997256428003311,
0.10192769020795822,
-0.10122009366750717,
0.1887286752462387,
-0.04151548445224762,
-0.034036800265312195,
-0.0030987299978733063,
-0.00421995809301734,
-0.07227349281311035,
0.02469581738114357,
-0.29005277156829834,
-0.11250808835029602,
-0.027176422998309135,
0.037489473819732666,
-0.011130898259580135,
0.19486244022846222,
0.05989031493663788,
-0.02225806750357151,
0.05513874813914299,
-0.3139064908027649,
0.035693105310201645,
-0.20406027138233185,
0.05558670312166214,
0.028463352471590042,
0.12348439544439316,
0.0055081951431930065,
-0.19818313419818878,
-0.15235131978988647,
-0.0875188559293747,
0.03675125539302826,
-0.02459813468158245,
0.06047205254435539,
-0.14809690415859222,
0.003394159721210599,
0.05553203448653221,
0.03024313412606716,
0.17436692118644714,
-0.03362385556101799,
0.06137816980481148,
0.21813108026981354,
0.24570848047733307,
-0.0951843336224556,
0.02393963932991028,
-0.11892037093639374,
-0.0757371187210083,
-0.08920329809188843,
0.13218700885772705,
-0.2851983606815338,
0.1889612376689911,
0.06884597986936569,
-0.2631971836090088,
0.05737824738025665,
-0.013590523041784763,
0.004782065283507109,
-0.03132670372724533,
0.0265289768576622,
0.1519167721271515,
-0.17339248955249786,
-0.0755852535367012,
0.028300656005740166,
-0.05583135038614273,
0.07974544167518616,
-0.11540090292692184,
0.17713883519172668,
-0.2418544441461563,
0.10775066912174225,
-0.032601386308670044,
0.04320235922932625,
-0.24560503661632538,
-0.010073219425976276,
-0.08545386046171188,
-0.0074621220119297504,
-0.03443584963679314,
-0.015260113403201103,
-0.17713221907615662,
0.005297270603477955,
0.008816391229629517,
0.042079050093889236,
-0.20128436386585236,
-0.06171054765582085,
0.018201565369963646,
-0.08929288387298584,
0.010389906354248524,
0.16789071261882782,
-0.0014499841490760446,
-0.08047416061162949,
-0.07594913244247437,
0.005906371399760246,
0.14366160333156586,
0.027214299887418747,
0.20461896061897278,
-0.10246128588914871,
-0.03912544250488281,
-0.002603942761197686,
0.00844927504658699,
-0.030459770932793617,
-0.05201491713523865,
0.109295554459095,
0.0973731130361557,
-0.04137824475765228,
-0.09538456797599792,
0.0019644564017653465,
0.08468466252088547,
-0.011607726104557514,
-0.14975018799304962,
-0.02382618933916092,
-0.24581998586654663,
0.00850741658359766,
-0.05638178065419197,
0.03661472350358963,
0.13700057566165924,
0.06644269078969955,
-0.05698458477854729,
0.03190973028540611,
0.0022453395649790764,
-0.04023708030581474,
0.15140609443187714,
0.036351278424263,
-0.13197387754917145,
0.3015817403793335,
0.0742402896285057,
-0.03391881659626961,
0.045967523008584976,
0.03222883865237236,
0.05870652571320534,
-0.023732736706733704,
0.1473410725593567,
-0.061593472957611084,
-0.21027223765850067,
0.36453598737716675,
-0.02877887524664402,
0.02079159766435623,
0.13827326893806458,
0.04910493642091751,
-0.11417054384946823,
0.04588836058974266,
-0.07703665643930435,
0.0019906060770154,
0.08444476872682571,
-0.05144098028540611,
-0.05900797247886658,
-0.05611634626984596,
-0.06588153541088104,
0.019598692655563354,
-0.08013314008712769,
0.0699470043182373,
-0.10836756974458694,
0.05986979976296425,
-0.06268041580915451,
-0.08727557957172394,
0.04244954138994217,
0.16344036161899567,
-0.03764043375849724,
0.029593197628855705,
0.21222719550132751,
-0.09419969469308853,
-0.16264788806438446,
-0.05168341100215912,
0.039517808705568314,
0.022711528465151787,
-0.01390431635081768,
-0.06553836166858673,
-0.1389092206954956,
-0.09073420614004135,
-0.08913692831993103,
0.07340127229690552,
-0.04766012728214264,
0.06400728970766068,
0.02062789909541607,
0.013335689902305603,
-0.03398141637444496,
0.016925618052482605,
0.01661674678325653,
0.20093266665935516,
-0.007422654423862696,
0.19646568596363068,
0.243182972073555,
-0.1660667210817337,
-0.07503834366798401,
0.03202812746167183,
-0.13735543191432953,
0.08650245517492294,
0.11583686619997025,
0.15934056043624878,
0.05332937836647034,
0.07091446965932846,
-0.010717518627643585,
-0.004535519052296877,
-0.08441495895385742,
0.09626125544309616,
0.09125839918851852,
-0.10494532436132431,
0.17265619337558746,
-0.013476905412971973,
0.08720684051513672,
-0.3380545377731323,
-0.14192524552345276,
-0.06901174783706665,
-0.040251825004816055,
0.040105078369379044,
0.05326226353645325,
-0.22947195172309875,
-0.07081545889377594,
0.14559565484523773,
-0.16831503808498383,
-0.2177887260913849,
-0.03298012539744377,
0.3428860306739807,
0.05782369151711464,
0.03518123924732208,
0.10321272909641266,
-0.05086955800652504,
-0.08283645659685135,
0.08656223863363266,
-0.1555335968732834,
-0.008432932198047638,
-0.17583006620407104,
0.08378273248672485,
-0.08138406276702881,
0.0636586844921112,
0.07536053657531738,
0.01946837455034256,
-0.03193814679980278,
-0.01709393411874771,
0.1348324865102768,
-0.2173939347267151,
0.18211081624031067,
-0.005445717368274927,
-0.08593827486038208,
0.27049800753593445,
-0.0032528573647141457,
0.15052089095115662,
0.18225105106830597,
-0.06250595301389694,
0.10238084197044373,
0.07473233342170715,
0.006812513340264559,
-0.2424095720052719,
-0.11055702716112137,
0.06286413222551346,
-0.1543123871088028,
-0.0559416301548481,
0.03213472664356232,
0.08984861522912979,
-0.1449013203382492,
-0.03007817082107067,
-0.29131969809532166,
0.16563083231449127,
0.0701945573091507,
0.1028418093919754,
0.055893730372190475,
-0.06258924305438995,
0.02160830982029438,
-0.0026543245185166597,
0.04225059226155281,
-0.12926842272281647,
-0.03769294545054436,
-0.08294837921857834,
0.0553157813847065,
0.1330539435148239,
0.021688971668481827,
0.05479729548096657,
0.06597398966550827,
-0.056269727647304535,
-0.1349867284297943,
0.14412526786327362,
0.15724922716617584,
0.033660922199487686,
-0.07506062090396881,
0.09069601446390152,
0.10415356606245041,
-0.027633637189865112,
0.15386024117469788,
0.08643825352191925,
0.035705242305994034,
-0.1491578370332718,
-0.0716402530670166,
0.031198784708976746,
0.02133377455174923,
0.16404569149017334,
0.012994849123060703,
0.027501562610268593,
-0.024335764348506927,
0.372873991727829,
0.16760818660259247,
0.008117987774312496,
0.012178181670606136,
-0.011931236833333969,
-0.20337051153182983,
-0.23392483592033386,
-0.19272394478321075,
0.11701203137636185,
0.26644381880760193,
-0.11095768213272095,
-0.04409076273441315,
0.037254951894283295,
-0.10845471173524857,
0.15649984776973724,
0.08095131069421768,
0.014296861365437508,
-0.03987666219472885,
0.09765837341547012,
-0.13957346975803375,
0.0966576635837555,
-0.015330368652939796,
0.4009614586830139,
-0.021354245021939278,
-0.04102849215269089,
0.053944285959005356,
-0.04177761450409889,
-0.001569744199514389,
0.11205988377332687,
-0.16107022762298584,
0.048529256135225296,
0.006522409617900848,
0.0897434651851654,
-0.01113052573055029,
0.24773140251636505,
-0.03469337150454521,
-0.024931209161877632,
-0.24475954473018646,
-0.11572320014238358,
-0.059351738542318344,
0.20780111849308014,
0.09721609205007553,
0.1473301649093628,
-0.14921700954437256,
-0.050581853836774826,
0.10003906488418579,
0.01736634597182274,
-0.06644421070814133,
-0.01539111789315939,
0.08002208918333054,
0.13793641328811646,
0.04470515996217728,
0.11786621809005737,
-0.21435187757015228,
0.004490341059863567,
0.07951308786869049,
0.014016438275575638,
0.13466031849384308,
0.029781220480799675,
0.0055236429907381535,
0.08470863103866577,
0.06856705248355865,
0.11224297434091568,
-0.10613631457090378,
0.006786843296140432,
0.0534418486058712,
0.2636270821094513,
-0.23372529447078705,
0.06885362416505814,
-0.18880337476730347,
-0.031421445310115814,
0.07788430154323578,
0.00017960091645363718,
-0.01075437106192112,
-0.03560531884431839,
-0.04128468781709671,
0.04771841689944267,
-0.061702530831098557,
-0.10647138953208923,
-0.03810501471161842,
0.25681421160697937,
-0.2175809144973755,
0.00874988455325365,
0.22607450187206268,
-0.11272464692592621,
0.03325258940458298,
0.16981551051139832,
-0.04885473474860191,
-0.07521160691976547,
-0.19957415759563446,
-0.0989527627825737,
-0.086904376745224,
0.16858400404453278,
0.0017310897819697857,
-0.06894630938768387,
-0.123754121363163,
-0.0340472050011158,
0.060406170785427094,
-0.03744811564683914,
-0.010740378871560097,
-0.0032517763320356607,
0.1377548724412918,
-0.1560850292444229,
-0.07207032293081284,
-0.09612755477428436,
0.08092925697565079,
0.08189502358436584,
-0.09589753299951553,
0.10975182801485062,
-0.03947451338171959,
-0.031449757516384125,
0.05718901753425598,
-0.006607442162930965,
-0.017021238803863525,
0.1329885870218277,
0.11852100491523743,
0.037561047822237015,
0.1909562051296234,
0.21606948971748352,
-0.14357520639896393,
-0.10785653442144394,
0.26265832781791687,
0.09117700904607773,
-0.16432255506515503,
0.010910370387136936,
0.039607007056474686,
0.007138177752494812,
-0.2373114973306656,
-0.07672784477472305,
0.171210378408432,
0.16020335257053375,
0.23470944166183472,
-0.0941038504242897,
-0.13453146815299988,
-0.1793793886899948,
-0.04937228187918663,
-0.10615569353103638,
0.1720024049282074,
-0.016809402033686638,
-0.0956011638045311,
0.10535416007041931,
-2.383078081117291e-32,
-0.039642397314310074,
-0.08205016702413559,
-0.042046595364809036,
-0.036182790994644165,
-0.33127349615097046,
0.11322882771492004,
-0.023282956331968307,
-0.07143697887659073,
-0.06292624026536942,
-0.013366400264203548,
-0.1527349054813385,
-0.062459807842969894,
0.011120706796646118,
0.004542923998087645,
-0.06523233652114868,
0.07044661045074463,
-0.03981504961848259,
0.05611724406480789,
0.02288234978914261,
0.037243347615003586,
0.04601361230015755,
0.062271472066640854,
-0.0005957273533567786,
-0.10572879761457443,
-0.2229616492986679,
0.11123496294021606,
-0.029945475980639458,
0.06247386336326599,
0.18549440801143646,
-0.09161553531885147,
-0.05046698823571205,
0.19723856449127197,
0.1168028935790062,
-0.11934474855661392,
-0.02980457805097103,
0.10347867757081985,
-0.14921022951602936,
-0.04893799498677254,
-0.0993228405714035,
0.12996284663677216,
0.17927008867263794,
0.03317924588918686,
0.08586988598108292,
-0.26266226172447205,
0.06430396437644958,
0.09627345204353333,
0.04912879690527916,
-0.10188495367765427,
-0.08113753795623779,
-0.1336800754070282,
0.022274894639849663,
0.10874472558498383,
-0.04827867075800896,
0.14366459846496582,
0.05433947220444679,
-0.15857556462287903,
-0.11153203994035721,
0.14610378444194794,
0.00411801366135478,
-0.10059504956007004,
0.21085675060749054,
-0.016003767028450966,
-0.006098954938352108,
0.001206929562613368,
0.06878626346588135,
0.07970213890075684,
0.28674688935279846,
0.0016764634056016803,
-0.05145770683884621,
-0.04237474128603935,
0.012264244258403778,
0.0751974806189537,
-0.021052656695246696,
-0.07070139795541763,
0.0006162490462884307,
-0.12472567707300186,
-0.09538636356592178,
-0.010072888806462288,
0.05700232461094856,
-0.09135500341653824,
0.04916109889745712,
0.10449908673763275,
0.0642109140753746,
0.054103586822748184,
0.0420956052839756,
0.1937851905822754,
-0.008836491033434868,
-0.008661175146698952,
-0.05894887447357178,
-0.1109684556722641,
-0.05034260079264641,
0.08822517842054367,
-0.02393379621207714,
-0.18838587403297424,
-0.05187825486063957,
0.15607091784477234,
0.00467604910954833,
0.11038737744092941,
-0.17016081511974335,
-0.06010426580905914,
-0.11515477299690247,
-0.0896366685628891,
-0.09920739382505417,
-0.09018309414386749,
0.1907949149608612,
0.1363425850868225,
0.08417811244726181,
0.12381139397621155,
-0.1238579973578453,
-0.09765633940696716,
-0.02426992729306221,
-0.27496567368507385,
0.16048899292945862,
0.2922065258026123,
0.17590399086475372,
-0.14565213024616241,
0.050185032188892365,
-0.1455840915441513,
0.16430160403251648,
0.06957726180553436,
-0.07218054682016373,
-0.11679471284151077,
-0.029767243191599846,
-0.03778386116027832,
-0.04891255870461464,
0.044674161821603775,
-0.11771456897258759,
-0.07350894063711166,
-0.004775581881403923,
-0.0011775171151384711,
0.051953401416540146,
0.08874495327472687,
6.786450512663578e-7,
-0.36413779854774475,
0.27956289052963257,
-0.08679476380348206,
0.026698315516114235,
-0.16028812527656555,
-0.006988183595240116,
-0.18391598761081696,
0.002842017449438572,
-0.21157340705394745,
0.08417639136314392,
0.2580553889274597,
0.009095890447497368,
-0.04375891759991646,
0.009013835340738297,
0.08440104126930237,
0.03129890188574791,
-0.020941272377967834,
0.10550066083669662,
-0.0016907901735976338,
-0.011272191070020199,
0.10287715494632721,
0.0484054833650589,
0.12767095863819122,
-0.10665994137525558,
0.048939988017082214,
-0.11283589154481888,
-0.16963103413581848,
-0.10858044773340225,
-0.01252437848597765,
0.04868007451295853,
0.0150448651984334,
0.04772745817899704,
-0.08344123512506485,
0.13185864686965942,
0.0042229313403368,
0.023599185049533844,
-0.034864675253629684,
-0.07993350923061371,
-0.05814579501748085,
0.11037851125001907,
0.06172661483287811,
0.05100079998373985,
-0.050427138805389404,
-0.038065724074840546,
0.003636111505329609,
0.07862556725740433,
-0.09498437494039536,
-0.061456624418497086,
0.03524353355169296,
-0.04600588604807854,
-0.09447378665208817,
0.14498312771320343,
0.22181762754917145,
0.18709923326969147,
-0.0638132095336914,
-0.19567884504795074,
0.08330642431974411,
-0.23134177923202515,
0.14809195697307587,
0.016755837947130203,
-0.03236689418554306,
-0.16407155990600586,
0.09969765692949295,
0.080433689057827,
0.13260886073112488,
-0.1326906383037567,
-0.028049347922205925,
5.78963167600817e-35,
0.03653468191623688,
-0.029012562707066536,
0.050224557518959045,
-0.1225816011428833,
-0.007150986231863499,
0.02993987686932087,
0.17885036766529083,
-0.004327965900301933,
0.04589039087295532,
-0.16445443034172058,
-0.1263214498758316
] |
https://github.com/huggingface/datasets/issues/5997 | extend the map function so it can wrap around long text that does not fit in the context window | I just noticed the [docs](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2881C11-L2881C200) say:
>If batched is `True` and `batch_size` is `n > 1`, then the function takes a batch of `n` examples as input and can return a batch with `n` examples, or with an arbitrary number of examples.
so maybe this is a bug then. | ### Feature request
I understand `dataset` provides a [`map`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2849) function. This function in turn takes in a callable that is used to tokenize the text on which a model is trained. Frequently this text will not fit within a models's context window. In this case it would be useful to wrap around the text into multiple rows with each row fitting the model's context window. I tried to do it using this code as example which in turn I have borrowed from [here](https://stackoverflow.com/a/76343993/147530):
```
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
```
but running the code gives me this error:
```
File "/llm/fine-tune.py", line 117, in <module>
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 580, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 545, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3087, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3480, in _map_single
writer.write_batch(batch)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_writer.py", line 556, in write_batch
pa_table = pa.Table.from_arrays(arrays, schema=schema)
File "pyarrow/table.pxi", line 3798, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 2962, in pyarrow.lib.Table.validate
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 394 but got length 447
```
The lambda function I have provided is correctly chopping up long text so it wraps around (and because of this 394 samples become 447 after wrap around) but the dataset `map` function does not like it.
### Motivation
please see above
### Your contribution
I'm afraid I don't have much knowledge to help | 49 | extend the map function so it can wrap around long text that does not fit in the context window
### Feature request
I understand `dataset` provides a [`map`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2849) function. This function in turn takes in a callable that is used to tokenize the text on which a model is trained. Frequently this text will not fit within a models's context window. In this case it would be useful to wrap around the text into multiple rows with each row fitting the model's context window. I tried to do it using this code as example which in turn I have borrowed from [here](https://stackoverflow.com/a/76343993/147530):
```
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
```
but running the code gives me this error:
```
File "/llm/fine-tune.py", line 117, in <module>
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 580, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 545, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3087, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3480, in _map_single
writer.write_batch(batch)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_writer.py", line 556, in write_batch
pa_table = pa.Table.from_arrays(arrays, schema=schema)
File "pyarrow/table.pxi", line 3798, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 2962, in pyarrow.lib.Table.validate
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 394 but got length 447
```
The lambda function I have provided is correctly chopping up long text so it wraps around (and because of this 394 samples become 447 after wrap around) but the dataset `map` function does not like it.
### Motivation
please see above
### Your contribution
I'm afraid I don't have much knowledge to help
I just noticed the [docs](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2881C11-L2881C200) say:
>If batched is `True` and `batch_size` is `n > 1`, then the function takes a batch of `n` examples as input and can return a batch with `n` examples, or with an arbitrary number of examples.
so maybe this is a bug then. | [
-0.09235337376594543,
0.22351238131523132,
-0.005159356631338596,
-0.003716188482940197,
0.1655946671962738,
0.010219254530966282,
0.004478977993130684,
0.1552717685699463,
-0.05580681934952736,
0.040483154356479645,
-0.08228032290935516,
0.17860472202301025,
0.01609981805086136,
0.167868509888649,
0.17642082273960114,
-0.27353784441947937,
-0.1417403668165207,
-0.13191954791545868,
0.06851614266633987,
0.03616810590028763,
-0.15419161319732666,
0.043309781700372696,
0.05841599404811859,
-0.09119665622711182,
0.12277356535196304,
0.0017112406203523278,
-0.1663196086883545,
-0.04099012166261673,
-0.011910459958016872,
0.0014793665613979101,
0.06986430287361145,
-0.011782975867390633,
-0.029149238020181656,
-0.12867183983325958,
0.00000553487643628614,
0.021991517394781113,
0.15882734954357147,
-0.07093040645122528,
0.09631038457155228,
-0.0448787622153759,
0.17160356044769287,
-0.09997548162937164,
-0.01768931932747364,
0.027674613520503044,
0.009626657702028751,
0.02615678682923317,
-0.036217100918293,
-0.025431150570511818,
0.029297668486833572,
0.1528799682855606,
-0.03233575075864792,
-0.15565074980258942,
0.02175365760922432,
-0.20337584614753723,
0.0426517091691494,
-0.025931769981980324,
0.1594410538673401,
-0.04305780678987503,
-0.09779400378465652,
-0.07724366337060928,
-0.13600249588489532,
0.06451171636581421,
-0.039497166872024536,
-0.07137766480445862,
0.036904990673065186,
0.012675970792770386,
-0.2636495530605316,
-0.12985043227672577,
0.10952585935592651,
0.10610067844390869,
0.05720645934343338,
0.029271390289068222,
-0.13499502837657928,
0.016578571870923042,
0.11603560298681259,
-0.08247067034244537,
-0.19685876369476318,
-0.11990512162446976,
-0.006430807523429394,
0.008718800731003284,
-0.04388716071844101,
-0.04463374242186546,
0.022664008662104607,
0.14970164000988007,
-0.3460116684436798,
0.11627422273159027,
-0.12505102157592773,
0.09926704317331314,
-0.029268257319927216,
-0.0369531586766243,
0.06586474180221558,
0.07327669858932495,
-0.08500420302152634,
0.0818498283624649,
-0.007699142210185528,
0.0902731716632843,
-0.056331977248191833,
-0.10891900211572647,
0.08044909685850143,
-0.023633835837244987,
0.03388198837637901,
0.08411922305822372,
-0.04086310788989067,
-0.06780480593442917,
-0.04703693836927414,
-0.23612548410892487,
-0.059064481407403946,
0.029362600296735764,
-0.14249718189239502,
-0.03800864890217781,
0.09670361876487732,
0.1056768000125885,
-0.0358416810631752,
-0.1960763782262802,
-0.03937605768442154,
0.12525053322315216,
-0.05550157651305199,
0.2881383001804352,
0.2570871412754059,
-0.023507248610258102,
0.014805762097239494,
0.04574054107069969,
-0.09509200602769852,
-0.009665526449680328,
0.10436135530471802,
-0.07443691790103912,
-0.042592454701662064,
-0.020863452926278114,
0.020722607150673866,
0.03357783332467079,
-0.03224875032901764,
0.0011602077865973115,
0.09450936317443848,
-0.019703833386301994,
0.11570132523775101,
0.18105198442935944,
0.07578136026859283,
-0.1492796689271927,
-0.013064523227512836,
-0.08130966871976852,
-0.13110297918319702,
0.05706626921892166,
-0.16763700544834137,
-0.0866866186261177,
-0.08884797245264053,
-0.013839959166944027,
-0.025594128295779228,
0.1714196354150772,
-0.08616019785404205,
-0.05518503114581108,
-0.08122161775827408,
0.10671532899141312,
-0.23951365053653717,
0.02931215800344944,
-0.08333882689476013,
-0.00976208969950676,
-0.02033219486474991,
0.03895215317606926,
-0.16015321016311646,
-0.08635082840919495,
0.1353173702955246,
0.009440863505005836,
-0.09845510870218277,
-0.1419786959886551,
0.16702111065387726,
0.05049359053373337,
-0.02339790388941765,
0.05832685902714729,
-0.08818720281124115,
-0.005547878798097372,
0.021282736212015152,
-0.14482904970645905,
-0.0517074353992939,
-0.09278508275747299,
-0.0884869247674942,
0.16858910024166107,
0.09455376118421555,
0.049066491425037384,
-0.11255060881376266,
0.0005763319786638021,
-0.01517162099480629,
-0.03144988790154457,
0.044154658913612366,
-0.08941569179296494,
0.10703042894601822,
0.29238614439964294,
0.15819790959358215,
0.0922515019774437,
-0.03217688575387001,
-0.25381723046302795,
-0.037005942314863205,
-0.023245126008987427,
0.06523389369249344,
0.023642508313059807,
-0.01061367429792881,
0.008091834373772144,
-0.11350681632757187,
-0.17044109106063843,
0.08232997357845306,
-0.07393587380647659,
0.10372165590524673,
-0.1373063176870346,
0.08172803372144699,
0.0936930775642395,
-0.043439291417598724,
-0.24115534126758575,
-0.1381266862154007,
-0.06435921788215637,
-0.0492994524538517,
-0.08504503965377808,
-0.16430768370628357,
0.060587327927351,
0.131243035197258,
0.056077633053064346,
-0.03210197389125824,
-0.028608599677681923,
0.0042808097787201405,
-0.160594642162323,
-0.03303667902946472,
0.02960311993956566,
0.10013779252767563,
-0.08642572164535522,
0.1416102647781372,
0.131966233253479,
0.08811714500188828,
0.07486273348331451,
0.011752158403396606,
0.04591505229473114,
0.17595221102237701,
0.09231369197368622,
-0.038459911942481995,
-0.029656432569026947,
0.10517675429582596,
0.015126374550163746,
-0.10833024233579636,
-0.05323362722992897,
-0.1102728471159935,
-0.19625286757946014,
-0.06233014166355133,
0.05510091409087181,
-0.12582352757453918,
-0.058112964034080505,
-0.18826919794082642,
0.013672970235347748,
-0.11062952876091003,
0.062086138874292374,
0.08520224690437317,
0.05809091404080391,
-0.051201414316892624,
0.04752146825194359,
0.14902792870998383,
0.03645247220993042,
-0.09833115339279175,
0.013201233930885792,
-0.013036614283919334,
-0.06575907766819,
0.15153156220912933,
-0.08044898509979248,
0.14606831967830658,
0.026075851172208786,
0.13720697164535522,
0.04614642634987831,
-0.11578570306301117,
0.045602940022945404,
0.07323507964611053,
-0.08753784745931625,
-0.03716928884387016,
-0.031288061290979385,
-0.0860939472913742,
0.12601108849048615,
0.03544790670275688,
-0.014348390512168407,
0.01861160807311535,
-0.06900644302368164,
0.05861079320311546,
-0.10970292240381241,
-0.09381470829248428,
0.05220227316021919,
0.06318178027868271,
0.03880772367119789,
0.01299608126282692,
-0.06443466246128082,
0.011328506283462048,
0.04358481988310814,
0.1851072460412979,
0.07882771641016006,
-0.1327829658985138,
-0.09944059699773788,
-0.1777007281780243,
-0.09824453294277191,
-0.013438648544251919,
0.06537771224975586,
-0.030275076627731323,
-0.04634791240096092,
-0.11131217330694199,
-0.0025081075727939606,
0.1063825860619545,
0.06600525230169296,
0.04702894017100334,
-0.08922035992145538,
-0.016273602843284607,
0.01062730047851801,
0.15744440257549286,
0.1276082694530487,
-0.04525827616453171,
-0.012798979878425598,
0.0026600162964314222,
0.2899072766304016,
-0.040455542504787445,
-0.4034234583377838,
-0.07306497544050217,
-0.049013786017894745,
-0.06119825318455696,
-0.0640328899025917,
0.17120888829231262,
0.026547683402895927,
0.029326315969228745,
-0.14247490465641022,
-0.09810452163219452,
0.00814230740070343,
0.02946172095835209,
-0.08558215945959091,
0.009148944169282913,
-0.009116892702877522,
-0.052654482424259186,
0.0008836944471113384,
-0.12125999480485916,
-0.27230820059776306,
0.23472368717193604,
-0.012116966769099236,
0.008854947052896023,
-0.05107216164469719,
0.09969780594110489,
-0.08095817267894745,
-0.05208157002925873,
-0.19182303547859192,
-0.19087189435958862,
0.21923217177391052,
0.14400339126586914,
0.011154900304973125,
0.13097728788852692,
-0.01787594147026539,
-0.17806388437747955,
0.03135708346962929,
0.06598269939422607,
-0.1522938758134842,
0.14512595534324646,
0.009323331527411938,
0.11168835312128067,
-0.021355070173740387,
-0.06491431593894958,
0.15985721349716187,
0.037872426211833954,
-0.0691683292388916,
-0.06297582387924194,
0.11085415631532669,
-0.05236601084470749,
0.1402217447757721,
-0.15225666761398315,
0.16864606738090515,
0.08008379489183426,
0.01737823337316513,
-0.05976588651537895,
-0.023439353331923485,
-0.017044225707650185,
0.010623907670378685,
0.08623146265745163,
0.02622368559241295,
-0.02007739245891571,
-0.09711333364248276,
0.14595986902713776,
-0.08851722627878189,
0.07831183075904846,
0.09915123134851456,
0.037334050983190536,
-0.09390068054199219,
0.14127136766910553,
-0.3223786950111389,
0.23352982103824615,
-0.07651983946561813,
0.17769548296928406,
-0.11284171044826508,
0.013592132367193699,
0.0558512881398201,
0.02054416574537754,
-0.07461686432361603,
0.11090660840272903,
-0.09754357486963272,
-0.24031925201416016,
0.18787547945976257,
0.08473106473684311,
-0.06198202818632126,
-0.019317051395773888,
-0.13111984729766846,
-0.014367488212883472,
0.16068033874034882,
0.09831710159778595,
0.13584959506988525,
-0.049974095076322556,
-0.11692360043525696,
-0.010867629200220108,
0.07660038769245148,
-0.15039198100566864,
-0.19108186662197113,
0.0701361820101738,
0.1421576589345932,
-0.07992499321699142,
0.002852950943633914,
0.12527914345264435,
0.023847686126828194,
0.0855594202876091,
0.04903869703412056,
0.0941457450389862,
-0.04500831663608551,
0.2888091802597046,
0.05032051354646683,
-0.038264382630586624,
0.13960351049900055,
0.13755294680595398,
0.0011510831536725163,
-0.12068367004394531,
0.027518266811966896,
0.11619957536458969,
0.19543854892253876,
0.2362375557422638,
-0.050067078322172165,
-0.0887334942817688,
-0.10305698215961456,
0.07319370657205582,
0.05173325538635254,
0.07538769394159317,
0.22938835620880127,
0.08085718005895615,
-0.19337482750415802,
-0.007199971936643124,
0.04599093645811081,
0.05336477980017662,
-0.2202141284942627,
-0.04095171019434929,
-0.1520034372806549,
0.031817711889743805,
0.1689346879720688,
0.12189110368490219,
-0.07951613515615463,
0.26420798897743225,
-0.22792597115039825,
0.030019856989383698,
0.002735977992415428,
-0.10462832450866699,
0.0684894546866417,
-0.04819494113326073,
-0.01775176264345646,
-0.037590984255075455,
-0.07510246336460114,
0.05523855984210968,
-0.011312851682305336,
0.11940528452396393,
-0.07163021713495255,
-0.1836978942155838,
-0.005950456950813532,
-0.05973238870501518,
-0.06591141223907471,
0.21747620403766632,
0.027098389342427254,
-0.2074541449546814,
0.21392889320850372,
0.3538352847099304,
-0.17419250309467316,
0.03084007278084755,
0.11601123958826065,
0.19117607176303864,
0.0886642262339592,
0.11916809529066086,
-0.09073992073535919,
0.1967397779226303,
0.02300129272043705,
-0.13604405522346497,
-0.04243407025933266,
0.08176769316196442,
0.03025851584970951,
0.07953116297721863,
-0.013573630712926388,
-0.06542828679084778,
-0.03136345371603966,
-0.040301501750946045,
0.08635365962982178,
-0.1936923861503601,
0.05194299668073654,
-0.024778535589575768,
0.11279083043336868,
-0.15359312295913696,
-0.21371911466121674,
0.03936305269598961,
-0.21960888803005219,
-0.05334954336285591,
-0.07315413653850555,
0.002501736395061016,
0.15604041516780853,
-0.1536927968263626,
-0.163357675075531,
0.11484139412641525,
0.1535145342350006,
0.0783601775765419,
0.0033576814457774162,
-0.1618717461824417,
-0.054516490548849106,
-0.04562804847955704,
-0.048725854605436325,
0.14780786633491516,
0.08814244717359543,
0.04800145700573921,
-0.006614758633077145,
-0.08802654594182968,
-0.14647065103054047,
0.035879556089639664,
0.13373948633670807,
-0.18729400634765625,
0.027383802458643913,
0.042636409401893616,
0.12475621700286865,
-0.14379943907260895,
0.05130448937416077,
0.0071940068155527115,
-0.0560266338288784,
0.020930225029587746,
-0.08607156574726105,
-0.03754645958542824,
-0.13158202171325684,
-0.07997126132249832,
0.026774980127811432,
0.08798516541719437,
0.01886679045855999,
0.12713226675987244,
-0.06419064104557037,
-0.0675007551908493,
0.02540898136794567,
0.028373556211590767,
-0.06485290080308914,
0.08721078932285309,
0.09187103807926178,
0.015146701596677303,
-0.2571578025817871,
-0.17108628153800964,
0.07406534999608994,
0.08765940368175507,
-0.05450156331062317,
-0.17171697318553925,
-0.10610222071409225,
0.03382055088877678,
-0.0361381396651268,
0.07273715734481812,
0.03505108132958412,
0.2444320172071457,
-0.21777914464473724,
0.12384350597858429,
-2.551320563141937e-32,
-0.03321540355682373,
0.13059645891189575,
-0.008588596247136593,
-0.07171332091093063,
-0.19206352531909943,
0.012117141857743263,
-0.02745312824845314,
-0.05023755878210068,
0.014100668951869011,
-0.14955531060695648,
-0.14259296655654907,
-0.09102204442024231,
0.004658752121031284,
0.08010783046483994,
-0.21395550668239594,
0.0777730941772461,
0.028085434809327126,
0.14735454320907593,
0.012523200362920761,
0.05318908393383026,
-0.055617742240428925,
0.023766513913869858,
0.0016214525094255805,
-0.013359053060412407,
-0.122893325984478,
0.07069747149944305,
-0.09285879135131836,
0.03110879473388195,
0.13449601829051971,
-0.03831442445516586,
0.026167530566453934,
0.12077930569648743,
0.01052730344235897,
0.09153319895267487,
0.016026809811592102,
0.13401131331920624,
-0.2742981016635895,
-0.036457307636737823,
-0.07116129994392395,
0.0291760116815567,
-0.010826386511325836,
0.03646627813577652,
0.1697825789451599,
-0.008748345077037811,
0.11403921991586685,
0.018122492358088493,
-0.03908140957355499,
-0.14083604514598846,
0.03262011706829071,
0.058304086327552795,
0.11057113111019135,
0.1317192167043686,
-0.0007273759110830724,
0.02246236801147461,
-0.035759370774030685,
0.04917178675532341,
0.04890822246670723,
0.07935148477554321,
-0.09432808309793472,
-0.009086632169783115,
0.1474180966615677,
0.11564354598522186,
-0.011030173860490322,
0.05438123643398285,
0.07707607746124268,
0.19216960668563843,
0.12492062151432037,
-0.023944152519106865,
-0.0505530871450901,
-0.027322404086589813,
-0.08117251098155975,
0.057774364948272705,
0.06852731108665466,
-0.06568067520856857,
-0.03806034103035927,
-0.053189754486083984,
-0.09107452630996704,
0.010479258373379707,
-0.0936567559838295,
-0.05686347931623459,
-0.04550747573375702,
0.1512143909931183,
0.08842846006155014,
-0.021831771358847618,
0.14237754046916962,
-0.026993513107299805,
0.02967970073223114,
0.1478680521249771,
0.04147680848836899,
-0.03358830511569977,
-0.2465321123600006,
0.11622482538223267,
-0.035092830657958984,
-0.06773171573877335,
-0.033559221774339676,
0.12025587260723114,
-0.07412087917327881,
0.058663297444581985,
-0.1639775186777115,
-0.12592385709285736,
0.13573022186756134,
-0.1067143902182579,
0.06108292564749718,
0.06437965482473373,
0.144690603017807,
-0.15275350213050842,
0.21457187831401825,
0.07667122781276703,
-0.3177993893623352,
-0.009932409040629864,
-0.0439668670296669,
0.0067848386242985725,
0.22033779323101044,
0.0490412674844265,
0.0781191810965538,
0.01786811091005802,
0.006396730896085501,
0.0756610706448555,
0.07847978919744492,
0.010004092939198017,
0.039474792778491974,
-0.004689923487603664,
0.005039103329181671,
-0.050159208476543427,
-0.018010620027780533,
0.07839671522378922,
0.12677709758281708,
-0.05221271887421608,
0.17659324407577515,
-0.15234749019145966,
-0.046526502817869186,
-0.10139762610197067,
7.245097890518082e-7,
0.03519599512219429,
-0.0005235031130723655,
0.17790640890598297,
-0.06989841908216476,
-0.12444618344306946,
0.04838796705007553,
0.14278173446655273,
-0.03842005878686905,
-0.14125820994377136,
0.03305990621447563,
0.18330880999565125,
-0.1316499561071396,
-0.005105755291879177,
-0.03549017757177353,
-0.09003040194511414,
0.04742762818932533,
-0.14467303454875946,
0.027223436161875725,
-0.1829027682542801,
0.08792494982481003,
0.14755330979824066,
0.21384699642658234,
0.14512977004051208,
-0.10979080200195312,
0.09247853606939316,
-0.14016909897327423,
-0.14181314408779144,
-0.14824093878269196,
0.07221207767724991,
-0.03077552281320095,
-0.09767291694879532,
-0.0101001663133502,
0.03243409842252731,
0.008061027154326439,
-0.13867321610450745,
0.036100972443819046,
-0.29525813460350037,
0.04214683920145035,
0.03731881454586983,
0.22453728318214417,
0.15402516722679138,
0.03862377628684044,
-0.07940620929002762,
-0.0984218642115593,
0.1097116470336914,
-0.04471540451049805,
-0.15850695967674255,
-0.044352494180202484,
-0.13219048082828522,
0.19181105494499207,
-0.04766826331615448,
0.07114679366350174,
0.10363095253705978,
0.24518993496894836,
-0.05021659657359123,
0.06302975863218307,
0.10297226905822754,
-0.1839180588722229,
-0.014907361008226871,
-0.08932792395353317,
-0.14782357215881348,
0.1486257016658783,
-0.05933584272861481,
0.007396383676677942,
0.012159695848822594,
-0.15725630521774292,
-0.043634623289108276,
1.946954533288906e-34,
0.15020719170570374,
-0.08372379839420319,
0.010357378982007504,
0.008582325652241707,
0.1112671047449112,
-0.026926467195153236,
0.1988336145877838,
0.033056341111660004,
0.1646563857793808,
-0.15686962008476257,
-0.17973707616329193
] |
https://github.com/huggingface/datasets/issues/5997 | extend the map function so it can wrap around long text that does not fit in the context window | All the values in a batch must be of the same length. So one solution is dropping all the input columns:
```python
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True, remove_columns=data.column_names)
```
Another is padding/transforming the input columns to the tokenizer output's length (447). | ### Feature request
I understand `dataset` provides a [`map`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2849) function. This function in turn takes in a callable that is used to tokenize the text on which a model is trained. Frequently this text will not fit within a models's context window. In this case it would be useful to wrap around the text into multiple rows with each row fitting the model's context window. I tried to do it using this code as example which in turn I have borrowed from [here](https://stackoverflow.com/a/76343993/147530):
```
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
```
but running the code gives me this error:
```
File "/llm/fine-tune.py", line 117, in <module>
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 580, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 545, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3087, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3480, in _map_single
writer.write_batch(batch)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_writer.py", line 556, in write_batch
pa_table = pa.Table.from_arrays(arrays, schema=schema)
File "pyarrow/table.pxi", line 3798, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 2962, in pyarrow.lib.Table.validate
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 394 but got length 447
```
The lambda function I have provided is correctly chopping up long text so it wraps around (and because of this 394 samples become 447 after wrap around) but the dataset `map` function does not like it.
### Motivation
please see above
### Your contribution
I'm afraid I don't have much knowledge to help | 46 | extend the map function so it can wrap around long text that does not fit in the context window
### Feature request
I understand `dataset` provides a [`map`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2849) function. This function in turn takes in a callable that is used to tokenize the text on which a model is trained. Frequently this text will not fit within a models's context window. In this case it would be useful to wrap around the text into multiple rows with each row fitting the model's context window. I tried to do it using this code as example which in turn I have borrowed from [here](https://stackoverflow.com/a/76343993/147530):
```
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
```
but running the code gives me this error:
```
File "/llm/fine-tune.py", line 117, in <module>
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 580, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 545, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3087, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3480, in _map_single
writer.write_batch(batch)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_writer.py", line 556, in write_batch
pa_table = pa.Table.from_arrays(arrays, schema=schema)
File "pyarrow/table.pxi", line 3798, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 2962, in pyarrow.lib.Table.validate
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 394 but got length 447
```
The lambda function I have provided is correctly chopping up long text so it wraps around (and because of this 394 samples become 447 after wrap around) but the dataset `map` function does not like it.
### Motivation
please see above
### Your contribution
I'm afraid I don't have much knowledge to help
All the values in a batch must be of the same length. So one solution is dropping all the input columns:
```python
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True, remove_columns=data.column_names)
```
Another is padding/transforming the input columns to the tokenizer output's length (447). | [
-0.09235337376594543,
0.22351238131523132,
-0.005159356631338596,
-0.003716188482940197,
0.1655946671962738,
0.010219254530966282,
0.004478977993130684,
0.1552717685699463,
-0.05580681934952736,
0.040483154356479645,
-0.08228032290935516,
0.17860472202301025,
0.01609981805086136,
0.167868509888649,
0.17642082273960114,
-0.27353784441947937,
-0.1417403668165207,
-0.13191954791545868,
0.06851614266633987,
0.03616810590028763,
-0.15419161319732666,
0.043309781700372696,
0.05841599404811859,
-0.09119665622711182,
0.12277356535196304,
0.0017112406203523278,
-0.1663196086883545,
-0.04099012166261673,
-0.011910459958016872,
0.0014793665613979101,
0.06986430287361145,
-0.011782975867390633,
-0.029149238020181656,
-0.12867183983325958,
0.00000553487643628614,
0.021991517394781113,
0.15882734954357147,
-0.07093040645122528,
0.09631038457155228,
-0.0448787622153759,
0.17160356044769287,
-0.09997548162937164,
-0.01768931932747364,
0.027674613520503044,
0.009626657702028751,
0.02615678682923317,
-0.036217100918293,
-0.025431150570511818,
0.029297668486833572,
0.1528799682855606,
-0.03233575075864792,
-0.15565074980258942,
0.02175365760922432,
-0.20337584614753723,
0.0426517091691494,
-0.025931769981980324,
0.1594410538673401,
-0.04305780678987503,
-0.09779400378465652,
-0.07724366337060928,
-0.13600249588489532,
0.06451171636581421,
-0.039497166872024536,
-0.07137766480445862,
0.036904990673065186,
0.012675970792770386,
-0.2636495530605316,
-0.12985043227672577,
0.10952585935592651,
0.10610067844390869,
0.05720645934343338,
0.029271390289068222,
-0.13499502837657928,
0.016578571870923042,
0.11603560298681259,
-0.08247067034244537,
-0.19685876369476318,
-0.11990512162446976,
-0.006430807523429394,
0.008718800731003284,
-0.04388716071844101,
-0.04463374242186546,
0.022664008662104607,
0.14970164000988007,
-0.3460116684436798,
0.11627422273159027,
-0.12505102157592773,
0.09926704317331314,
-0.029268257319927216,
-0.0369531586766243,
0.06586474180221558,
0.07327669858932495,
-0.08500420302152634,
0.0818498283624649,
-0.007699142210185528,
0.0902731716632843,
-0.056331977248191833,
-0.10891900211572647,
0.08044909685850143,
-0.023633835837244987,
0.03388198837637901,
0.08411922305822372,
-0.04086310788989067,
-0.06780480593442917,
-0.04703693836927414,
-0.23612548410892487,
-0.059064481407403946,
0.029362600296735764,
-0.14249718189239502,
-0.03800864890217781,
0.09670361876487732,
0.1056768000125885,
-0.0358416810631752,
-0.1960763782262802,
-0.03937605768442154,
0.12525053322315216,
-0.05550157651305199,
0.2881383001804352,
0.2570871412754059,
-0.023507248610258102,
0.014805762097239494,
0.04574054107069969,
-0.09509200602769852,
-0.009665526449680328,
0.10436135530471802,
-0.07443691790103912,
-0.042592454701662064,
-0.020863452926278114,
0.020722607150673866,
0.03357783332467079,
-0.03224875032901764,
0.0011602077865973115,
0.09450936317443848,
-0.019703833386301994,
0.11570132523775101,
0.18105198442935944,
0.07578136026859283,
-0.1492796689271927,
-0.013064523227512836,
-0.08130966871976852,
-0.13110297918319702,
0.05706626921892166,
-0.16763700544834137,
-0.0866866186261177,
-0.08884797245264053,
-0.013839959166944027,
-0.025594128295779228,
0.1714196354150772,
-0.08616019785404205,
-0.05518503114581108,
-0.08122161775827408,
0.10671532899141312,
-0.23951365053653717,
0.02931215800344944,
-0.08333882689476013,
-0.00976208969950676,
-0.02033219486474991,
0.03895215317606926,
-0.16015321016311646,
-0.08635082840919495,
0.1353173702955246,
0.009440863505005836,
-0.09845510870218277,
-0.1419786959886551,
0.16702111065387726,
0.05049359053373337,
-0.02339790388941765,
0.05832685902714729,
-0.08818720281124115,
-0.005547878798097372,
0.021282736212015152,
-0.14482904970645905,
-0.0517074353992939,
-0.09278508275747299,
-0.0884869247674942,
0.16858910024166107,
0.09455376118421555,
0.049066491425037384,
-0.11255060881376266,
0.0005763319786638021,
-0.01517162099480629,
-0.03144988790154457,
0.044154658913612366,
-0.08941569179296494,
0.10703042894601822,
0.29238614439964294,
0.15819790959358215,
0.0922515019774437,
-0.03217688575387001,
-0.25381723046302795,
-0.037005942314863205,
-0.023245126008987427,
0.06523389369249344,
0.023642508313059807,
-0.01061367429792881,
0.008091834373772144,
-0.11350681632757187,
-0.17044109106063843,
0.08232997357845306,
-0.07393587380647659,
0.10372165590524673,
-0.1373063176870346,
0.08172803372144699,
0.0936930775642395,
-0.043439291417598724,
-0.24115534126758575,
-0.1381266862154007,
-0.06435921788215637,
-0.0492994524538517,
-0.08504503965377808,
-0.16430768370628357,
0.060587327927351,
0.131243035197258,
0.056077633053064346,
-0.03210197389125824,
-0.028608599677681923,
0.0042808097787201405,
-0.160594642162323,
-0.03303667902946472,
0.02960311993956566,
0.10013779252767563,
-0.08642572164535522,
0.1416102647781372,
0.131966233253479,
0.08811714500188828,
0.07486273348331451,
0.011752158403396606,
0.04591505229473114,
0.17595221102237701,
0.09231369197368622,
-0.038459911942481995,
-0.029656432569026947,
0.10517675429582596,
0.015126374550163746,
-0.10833024233579636,
-0.05323362722992897,
-0.1102728471159935,
-0.19625286757946014,
-0.06233014166355133,
0.05510091409087181,
-0.12582352757453918,
-0.058112964034080505,
-0.18826919794082642,
0.013672970235347748,
-0.11062952876091003,
0.062086138874292374,
0.08520224690437317,
0.05809091404080391,
-0.051201414316892624,
0.04752146825194359,
0.14902792870998383,
0.03645247220993042,
-0.09833115339279175,
0.013201233930885792,
-0.013036614283919334,
-0.06575907766819,
0.15153156220912933,
-0.08044898509979248,
0.14606831967830658,
0.026075851172208786,
0.13720697164535522,
0.04614642634987831,
-0.11578570306301117,
0.045602940022945404,
0.07323507964611053,
-0.08753784745931625,
-0.03716928884387016,
-0.031288061290979385,
-0.0860939472913742,
0.12601108849048615,
0.03544790670275688,
-0.014348390512168407,
0.01861160807311535,
-0.06900644302368164,
0.05861079320311546,
-0.10970292240381241,
-0.09381470829248428,
0.05220227316021919,
0.06318178027868271,
0.03880772367119789,
0.01299608126282692,
-0.06443466246128082,
0.011328506283462048,
0.04358481988310814,
0.1851072460412979,
0.07882771641016006,
-0.1327829658985138,
-0.09944059699773788,
-0.1777007281780243,
-0.09824453294277191,
-0.013438648544251919,
0.06537771224975586,
-0.030275076627731323,
-0.04634791240096092,
-0.11131217330694199,
-0.0025081075727939606,
0.1063825860619545,
0.06600525230169296,
0.04702894017100334,
-0.08922035992145538,
-0.016273602843284607,
0.01062730047851801,
0.15744440257549286,
0.1276082694530487,
-0.04525827616453171,
-0.012798979878425598,
0.0026600162964314222,
0.2899072766304016,
-0.040455542504787445,
-0.4034234583377838,
-0.07306497544050217,
-0.049013786017894745,
-0.06119825318455696,
-0.0640328899025917,
0.17120888829231262,
0.026547683402895927,
0.029326315969228745,
-0.14247490465641022,
-0.09810452163219452,
0.00814230740070343,
0.02946172095835209,
-0.08558215945959091,
0.009148944169282913,
-0.009116892702877522,
-0.052654482424259186,
0.0008836944471113384,
-0.12125999480485916,
-0.27230820059776306,
0.23472368717193604,
-0.012116966769099236,
0.008854947052896023,
-0.05107216164469719,
0.09969780594110489,
-0.08095817267894745,
-0.05208157002925873,
-0.19182303547859192,
-0.19087189435958862,
0.21923217177391052,
0.14400339126586914,
0.011154900304973125,
0.13097728788852692,
-0.01787594147026539,
-0.17806388437747955,
0.03135708346962929,
0.06598269939422607,
-0.1522938758134842,
0.14512595534324646,
0.009323331527411938,
0.11168835312128067,
-0.021355070173740387,
-0.06491431593894958,
0.15985721349716187,
0.037872426211833954,
-0.0691683292388916,
-0.06297582387924194,
0.11085415631532669,
-0.05236601084470749,
0.1402217447757721,
-0.15225666761398315,
0.16864606738090515,
0.08008379489183426,
0.01737823337316513,
-0.05976588651537895,
-0.023439353331923485,
-0.017044225707650185,
0.010623907670378685,
0.08623146265745163,
0.02622368559241295,
-0.02007739245891571,
-0.09711333364248276,
0.14595986902713776,
-0.08851722627878189,
0.07831183075904846,
0.09915123134851456,
0.037334050983190536,
-0.09390068054199219,
0.14127136766910553,
-0.3223786950111389,
0.23352982103824615,
-0.07651983946561813,
0.17769548296928406,
-0.11284171044826508,
0.013592132367193699,
0.0558512881398201,
0.02054416574537754,
-0.07461686432361603,
0.11090660840272903,
-0.09754357486963272,
-0.24031925201416016,
0.18787547945976257,
0.08473106473684311,
-0.06198202818632126,
-0.019317051395773888,
-0.13111984729766846,
-0.014367488212883472,
0.16068033874034882,
0.09831710159778595,
0.13584959506988525,
-0.049974095076322556,
-0.11692360043525696,
-0.010867629200220108,
0.07660038769245148,
-0.15039198100566864,
-0.19108186662197113,
0.0701361820101738,
0.1421576589345932,
-0.07992499321699142,
0.002852950943633914,
0.12527914345264435,
0.023847686126828194,
0.0855594202876091,
0.04903869703412056,
0.0941457450389862,
-0.04500831663608551,
0.2888091802597046,
0.05032051354646683,
-0.038264382630586624,
0.13960351049900055,
0.13755294680595398,
0.0011510831536725163,
-0.12068367004394531,
0.027518266811966896,
0.11619957536458969,
0.19543854892253876,
0.2362375557422638,
-0.050067078322172165,
-0.0887334942817688,
-0.10305698215961456,
0.07319370657205582,
0.05173325538635254,
0.07538769394159317,
0.22938835620880127,
0.08085718005895615,
-0.19337482750415802,
-0.007199971936643124,
0.04599093645811081,
0.05336477980017662,
-0.2202141284942627,
-0.04095171019434929,
-0.1520034372806549,
0.031817711889743805,
0.1689346879720688,
0.12189110368490219,
-0.07951613515615463,
0.26420798897743225,
-0.22792597115039825,
0.030019856989383698,
0.002735977992415428,
-0.10462832450866699,
0.0684894546866417,
-0.04819494113326073,
-0.01775176264345646,
-0.037590984255075455,
-0.07510246336460114,
0.05523855984210968,
-0.011312851682305336,
0.11940528452396393,
-0.07163021713495255,
-0.1836978942155838,
-0.005950456950813532,
-0.05973238870501518,
-0.06591141223907471,
0.21747620403766632,
0.027098389342427254,
-0.2074541449546814,
0.21392889320850372,
0.3538352847099304,
-0.17419250309467316,
0.03084007278084755,
0.11601123958826065,
0.19117607176303864,
0.0886642262339592,
0.11916809529066086,
-0.09073992073535919,
0.1967397779226303,
0.02300129272043705,
-0.13604405522346497,
-0.04243407025933266,
0.08176769316196442,
0.03025851584970951,
0.07953116297721863,
-0.013573630712926388,
-0.06542828679084778,
-0.03136345371603966,
-0.040301501750946045,
0.08635365962982178,
-0.1936923861503601,
0.05194299668073654,
-0.024778535589575768,
0.11279083043336868,
-0.15359312295913696,
-0.21371911466121674,
0.03936305269598961,
-0.21960888803005219,
-0.05334954336285591,
-0.07315413653850555,
0.002501736395061016,
0.15604041516780853,
-0.1536927968263626,
-0.163357675075531,
0.11484139412641525,
0.1535145342350006,
0.0783601775765419,
0.0033576814457774162,
-0.1618717461824417,
-0.054516490548849106,
-0.04562804847955704,
-0.048725854605436325,
0.14780786633491516,
0.08814244717359543,
0.04800145700573921,
-0.006614758633077145,
-0.08802654594182968,
-0.14647065103054047,
0.035879556089639664,
0.13373948633670807,
-0.18729400634765625,
0.027383802458643913,
0.042636409401893616,
0.12475621700286865,
-0.14379943907260895,
0.05130448937416077,
0.0071940068155527115,
-0.0560266338288784,
0.020930225029587746,
-0.08607156574726105,
-0.03754645958542824,
-0.13158202171325684,
-0.07997126132249832,
0.026774980127811432,
0.08798516541719437,
0.01886679045855999,
0.12713226675987244,
-0.06419064104557037,
-0.0675007551908493,
0.02540898136794567,
0.028373556211590767,
-0.06485290080308914,
0.08721078932285309,
0.09187103807926178,
0.015146701596677303,
-0.2571578025817871,
-0.17108628153800964,
0.07406534999608994,
0.08765940368175507,
-0.05450156331062317,
-0.17171697318553925,
-0.10610222071409225,
0.03382055088877678,
-0.0361381396651268,
0.07273715734481812,
0.03505108132958412,
0.2444320172071457,
-0.21777914464473724,
0.12384350597858429,
-2.551320563141937e-32,
-0.03321540355682373,
0.13059645891189575,
-0.008588596247136593,
-0.07171332091093063,
-0.19206352531909943,
0.012117141857743263,
-0.02745312824845314,
-0.05023755878210068,
0.014100668951869011,
-0.14955531060695648,
-0.14259296655654907,
-0.09102204442024231,
0.004658752121031284,
0.08010783046483994,
-0.21395550668239594,
0.0777730941772461,
0.028085434809327126,
0.14735454320907593,
0.012523200362920761,
0.05318908393383026,
-0.055617742240428925,
0.023766513913869858,
0.0016214525094255805,
-0.013359053060412407,
-0.122893325984478,
0.07069747149944305,
-0.09285879135131836,
0.03110879473388195,
0.13449601829051971,
-0.03831442445516586,
0.026167530566453934,
0.12077930569648743,
0.01052730344235897,
0.09153319895267487,
0.016026809811592102,
0.13401131331920624,
-0.2742981016635895,
-0.036457307636737823,
-0.07116129994392395,
0.0291760116815567,
-0.010826386511325836,
0.03646627813577652,
0.1697825789451599,
-0.008748345077037811,
0.11403921991586685,
0.018122492358088493,
-0.03908140957355499,
-0.14083604514598846,
0.03262011706829071,
0.058304086327552795,
0.11057113111019135,
0.1317192167043686,
-0.0007273759110830724,
0.02246236801147461,
-0.035759370774030685,
0.04917178675532341,
0.04890822246670723,
0.07935148477554321,
-0.09432808309793472,
-0.009086632169783115,
0.1474180966615677,
0.11564354598522186,
-0.011030173860490322,
0.05438123643398285,
0.07707607746124268,
0.19216960668563843,
0.12492062151432037,
-0.023944152519106865,
-0.0505530871450901,
-0.027322404086589813,
-0.08117251098155975,
0.057774364948272705,
0.06852731108665466,
-0.06568067520856857,
-0.03806034103035927,
-0.053189754486083984,
-0.09107452630996704,
0.010479258373379707,
-0.0936567559838295,
-0.05686347931623459,
-0.04550747573375702,
0.1512143909931183,
0.08842846006155014,
-0.021831771358847618,
0.14237754046916962,
-0.026993513107299805,
0.02967970073223114,
0.1478680521249771,
0.04147680848836899,
-0.03358830511569977,
-0.2465321123600006,
0.11622482538223267,
-0.035092830657958984,
-0.06773171573877335,
-0.033559221774339676,
0.12025587260723114,
-0.07412087917327881,
0.058663297444581985,
-0.1639775186777115,
-0.12592385709285736,
0.13573022186756134,
-0.1067143902182579,
0.06108292564749718,
0.06437965482473373,
0.144690603017807,
-0.15275350213050842,
0.21457187831401825,
0.07667122781276703,
-0.3177993893623352,
-0.009932409040629864,
-0.0439668670296669,
0.0067848386242985725,
0.22033779323101044,
0.0490412674844265,
0.0781191810965538,
0.01786811091005802,
0.006396730896085501,
0.0756610706448555,
0.07847978919744492,
0.010004092939198017,
0.039474792778491974,
-0.004689923487603664,
0.005039103329181671,
-0.050159208476543427,
-0.018010620027780533,
0.07839671522378922,
0.12677709758281708,
-0.05221271887421608,
0.17659324407577515,
-0.15234749019145966,
-0.046526502817869186,
-0.10139762610197067,
7.245097890518082e-7,
0.03519599512219429,
-0.0005235031130723655,
0.17790640890598297,
-0.06989841908216476,
-0.12444618344306946,
0.04838796705007553,
0.14278173446655273,
-0.03842005878686905,
-0.14125820994377136,
0.03305990621447563,
0.18330880999565125,
-0.1316499561071396,
-0.005105755291879177,
-0.03549017757177353,
-0.09003040194511414,
0.04742762818932533,
-0.14467303454875946,
0.027223436161875725,
-0.1829027682542801,
0.08792494982481003,
0.14755330979824066,
0.21384699642658234,
0.14512977004051208,
-0.10979080200195312,
0.09247853606939316,
-0.14016909897327423,
-0.14181314408779144,
-0.14824093878269196,
0.07221207767724991,
-0.03077552281320095,
-0.09767291694879532,
-0.0101001663133502,
0.03243409842252731,
0.008061027154326439,
-0.13867321610450745,
0.036100972443819046,
-0.29525813460350037,
0.04214683920145035,
0.03731881454586983,
0.22453728318214417,
0.15402516722679138,
0.03862377628684044,
-0.07940620929002762,
-0.0984218642115593,
0.1097116470336914,
-0.04471540451049805,
-0.15850695967674255,
-0.044352494180202484,
-0.13219048082828522,
0.19181105494499207,
-0.04766826331615448,
0.07114679366350174,
0.10363095253705978,
0.24518993496894836,
-0.05021659657359123,
0.06302975863218307,
0.10297226905822754,
-0.1839180588722229,
-0.014907361008226871,
-0.08932792395353317,
-0.14782357215881348,
0.1486257016658783,
-0.05933584272861481,
0.007396383676677942,
0.012159695848822594,
-0.15725630521774292,
-0.043634623289108276,
1.946954533288906e-34,
0.15020719170570374,
-0.08372379839420319,
0.010357378982007504,
0.008582325652241707,
0.1112671047449112,
-0.026926467195153236,
0.1988336145877838,
0.033056341111660004,
0.1646563857793808,
-0.15686962008476257,
-0.17973707616329193
] |
https://github.com/huggingface/datasets/issues/5993 | ValueError: Table schema does not match schema used to create file | We'll do a new release of `datasets` soon to make the fix available :)
In the meantime you can use `datasets` from source (main) | ### Describe the bug
Saving a dataset as parquet fails with a `ValueError: Table schema does not match schema used to create file` if the dataset was obtained out of a `.select_columns()` call with columns selected out of order.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict(
{
"x1": [1, 2, 3],
"x2": [10, 11, 12],
}
)
ds = dataset.select_columns(["x2", "x1"])
ds.to_parquet("demo.parquet")
```
```shell
>>>
ValueError: Table schema does not match schema used to create file:
table:
x2: int64
x1: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53 vs.
file:
x1: int64
x2: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53
```
---
I think this is because after the `.select_columns()` call with out of order columns, the output dataset features' schema ends up being out of sync with the schema of the arrow table backing it.
```python
ds.features.arrow_schema
>>>
x1: int64
x2: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53
ds.data.schema
>>>
x2: int64
x1: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53
```
So when we call `.to_parquet()`, the call behind the scenes to `datasets.io.parquet.ParquetDatasetWriter(...).write()` which initialises the backend `pyarrow.parquet.ParquetWriter` with `schema = self.dataset.features.arrow_schema` triggers `pyarrow` on write when [it checks](https://github.com/apache/arrow/blob/11b140a734a516e436adaddaeb35d23f30dcce44/python/pyarrow/parquet/core.py#L1086-L1090) that the `ParquetWriter` schema matches the schema of the table being written π
https://github.com/huggingface/datasets/blob/6ed837325cb539a5deb99129e5ad181d0269e050/src/datasets/io/parquet.py#L139-L141
### Expected behavior
The dataset gets successfully saved as parquet.
*In the same way as it does if saving it as csv:
```python
import datasets
dataset = datasets.Dataset.from_dict(
{
"x1": [1, 2, 3],
"x2": [10, 11, 12],
}
)
ds = dataset.select_columns(["x2", "x1"])
ds.to_csv("demo.csv")
```
### Environment info
`python==3.11`
`datasets==2.13.1`
| 24 | ValueError: Table schema does not match schema used to create file
### Describe the bug
Saving a dataset as parquet fails with a `ValueError: Table schema does not match schema used to create file` if the dataset was obtained out of a `.select_columns()` call with columns selected out of order.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict(
{
"x1": [1, 2, 3],
"x2": [10, 11, 12],
}
)
ds = dataset.select_columns(["x2", "x1"])
ds.to_parquet("demo.parquet")
```
```shell
>>>
ValueError: Table schema does not match schema used to create file:
table:
x2: int64
x1: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53 vs.
file:
x1: int64
x2: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53
```
---
I think this is because after the `.select_columns()` call with out of order columns, the output dataset features' schema ends up being out of sync with the schema of the arrow table backing it.
```python
ds.features.arrow_schema
>>>
x1: int64
x2: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53
ds.data.schema
>>>
x2: int64
x1: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53
```
So when we call `.to_parquet()`, the call behind the scenes to `datasets.io.parquet.ParquetDatasetWriter(...).write()` which initialises the backend `pyarrow.parquet.ParquetWriter` with `schema = self.dataset.features.arrow_schema` triggers `pyarrow` on write when [it checks](https://github.com/apache/arrow/blob/11b140a734a516e436adaddaeb35d23f30dcce44/python/pyarrow/parquet/core.py#L1086-L1090) that the `ParquetWriter` schema matches the schema of the table being written π
https://github.com/huggingface/datasets/blob/6ed837325cb539a5deb99129e5ad181d0269e050/src/datasets/io/parquet.py#L139-L141
### Expected behavior
The dataset gets successfully saved as parquet.
*In the same way as it does if saving it as csv:
```python
import datasets
dataset = datasets.Dataset.from_dict(
{
"x1": [1, 2, 3],
"x2": [10, 11, 12],
}
)
ds = dataset.select_columns(["x2", "x1"])
ds.to_csv("demo.csv")
```
### Environment info
`python==3.11`
`datasets==2.13.1`
We'll do a new release of `datasets` soon to make the fix available :)
In the meantime you can use `datasets` from source (main) | [
0.03915582597255707,
0.05214106664061546,
-0.08324635028839111,
-0.04305131733417511,
0.187925323843956,
0.047784287482500076,
-0.008229270577430725,
0.06161016970872879,
-0.16068802773952484,
-0.011868643574416637,
0.13224244117736816,
0.05439567565917969,
0.11214426904916763,
0.06978060305118561,
-0.015244439244270325,
0.01590334065258503,
0.1139531210064888,
-0.08475278317928314,
-0.15129612386226654,
0.08592450618743896,
-0.16351866722106934,
-0.06553614139556885,
0.18846793472766876,
-0.1068885400891304,
-0.07991015911102295,
-0.0415702722966671,
-0.20496149361133575,
0.20005790889263153,
-0.004831448197364807,
-0.07054050266742706,
0.052982233464717865,
0.07145752012729645,
-0.017552394419908524,
0.13650672137737274,
0.000005310711912898114,
0.014197558164596558,
0.08913842588663101,
-0.1025083139538765,
0.12894907593727112,
-0.12328822165727615,
-0.016412153840065002,
-0.04778319224715233,
-0.11363807320594788,
-0.013933545909821987,
-0.013219333253800869,
-0.18287678062915802,
-0.0420626662671566,
0.07681073993444443,
0.12854740023612976,
-0.037971120327711105,
-0.07503821700811386,
-0.003565907245501876,
0.12933723628520966,
-0.08208765834569931,
0.11886317282915115,
0.008148313499987125,
-0.10882677137851715,
0.01199778076261282,
-0.21413251757621765,
0.04931514337658882,
-0.022440357133746147,
-0.07975694537162781,
-0.15102139115333557,
-0.022623242810368538,
-0.14331907033920288,
0.10235463827848434,
0.03348400443792343,
0.021203912794589996,
-0.08647705614566803,
0.16850104928016663,
0.12364784628152847,
0.061584632843732834,
-0.09481889754533768,
-0.04235813021659851,
0.11211059242486954,
-0.16583478450775146,
0.08280739933252335,
0.1030883938074112,
0.02323756366968155,
0.06042419746518135,
0.1288750171661377,
0.06701309978961945,
0.053768936544656754,
-0.1452510952949524,
-0.17159275710582733,
0.0761735588312149,
-0.18423548340797424,
0.08431050926446915,
0.0008087502210400999,
-0.23636886477470398,
0.01317570824176073,
0.07793945074081421,
-0.22183503210544586,
-0.19884896278381348,
-0.06953639537096024,
-0.07240161299705505,
0.12962418794631958,
-0.17665956914424896,
0.04441644996404648,
0.06669200211763382,
0.007849995978176594,
-0.09595946222543716,
-0.08685968071222305,
-0.05413435772061348,
0.07494241744279861,
0.048089832067489624,
-0.08665529638528824,
0.04420526698231697,
0.019177261739969254,
0.0825868546962738,
-0.09171179682016373,
0.10224706679582596,
-0.029209334403276443,
-0.07035534828901291,
0.008333306759595871,
0.0049223387613892555,
0.12524595856666565,
0.15347479283809662,
-0.08033965528011322,
0.20882759988307953,
0.04652713984251022,
0.12088283896446228,
0.011401132680475712,
0.05540502071380615,
0.11056353151798248,
0.0021196925081312656,
0.1366560310125351,
0.11167670786380768,
-0.0806504413485527,
-0.026836594566702843,
-0.07409133017063141,
0.2555635869503021,
0.018542855978012085,
-0.15472106635570526,
0.06935866177082062,
0.050089169293642044,
0.02076083794236183,
-0.03942815959453583,
0.10433464497327805,
-0.14305958151817322,
-0.017919329926371574,
-0.07573121041059494,
-0.08732036501169205,
0.034593045711517334,
0.0911111980676651,
0.09166055917739868,
0.15370245277881622,
-0.06790326535701752,
-0.08698709309101105,
0.004366182256489992,
-0.1945645958185196,
0.05643186718225479,
-0.21660035848617554,
0.1271151900291443,
-0.05629454925656319,
-0.018693238496780396,
-0.16513676941394806,
-0.17906932532787323,
-0.1246706023812294,
-0.10620853304862976,
-0.025172265246510506,
0.07679547369480133,
0.07760550826787949,
-0.14052289724349976,
0.04513821378350258,
-0.03715486079454422,
0.04709932208061218,
0.13968947529792786,
0.01427023857831955,
0.08660199493169785,
0.3303210735321045,
0.0733649954199791,
0.1297253519296646,
-0.04690256342291832,
0.018605921417474747,
0.12642982602119446,
-0.17177078127861023,
0.00952920038253069,
-0.1626226305961609,
0.006327190436422825,
-0.012675626203417778,
0.07244190573692322,
0.06154701113700867,
-0.19192227721214294,
0.10335338860750198,
-0.06650946289300919,
-0.2286260724067688,
-0.03258204087615013,
0.030215874314308167,
-0.010912042111158371,
-0.016200311481952667,
-0.024226978421211243,
0.06957869231700897,
-0.22495196759700775,
-0.08020349591970444,
-0.061501484364271164,
-0.12203720211982727,
-0.0025767062325030565,
0.0011377609334886074,
-0.16623783111572266,
-0.08263726532459259,
-0.039702702313661575,
0.019505780190229416,
0.10664594918489456,
-0.09199398010969162,
-0.18271443247795105,
-0.16241325438022614,
-0.02906941808760166,
0.12470187991857529,
-0.06391723453998566,
-0.035833317786455154,
-0.06138535588979721,
-0.08286095410585403,
0.20208846032619476,
-0.10703441500663757,
-0.07773204892873764,
0.07048171758651733,
-0.012857107445597649,
-0.16179367899894714,
0.040232643485069275,
0.06769517064094543,
0.03776858374476433,
-0.04729682579636574,
-0.0009883909951895475,
0.01431938074529171,
0.14081905782222748,
-0.008861913345754147,
-0.06526102870702744,
0.1049281433224678,
0.13478487730026245,
-0.0730452612042427,
0.005205607507377863,
0.05992536246776581,
0.11072878539562225,
0.03797806799411774,
0.23664981126785278,
-0.030318738892674446,
-0.10136943310499191,
-0.09417875111103058,
0.01744094118475914,
-0.1889907717704773,
0.08603005111217499,
-0.07938746362924576,
-0.000120568998681847,
0.07935262471437454,
-0.012614347971975803,
-0.12678663432598114,
0.10716227442026138,
-0.08478999882936478,
-0.006353883072733879,
0.19697171449661255,
-0.021573316305875778,
-0.0013531841104850173,
-0.06634391099214554,
-0.06241399049758911,
-0.10426925122737885,
-0.183074489235878,
0.08145925402641296,
0.04905771464109421,
0.09758904576301575,
0.39012962579727173,
-0.03531554341316223,
0.08206221461296082,
-0.0786975845694542,
0.12575261294841766,
-0.20627519488334656,
0.0731225311756134,
0.070228211581707,
-0.0014354533050209284,
0.1135108545422554,
0.11743736267089844,
-0.07963353395462036,
-0.08593516796827316,
0.03998851031064987,
0.05472593009471893,
-0.18317420780658722,
0.09967200458049774,
0.06088829040527344,
0.02692679688334465,
0.2825204133987427,
-0.1650894731283188,
0.205331951379776,
0.11897376924753189,
-0.05520429462194443,
-0.06559379398822784,
0.14987830817699432,
-0.1056969091296196,
0.009949413128197193,
0.07074496895074844,
0.13458271324634552,
0.04605592042207718,
-0.1554790735244751,
0.0800495371222496,
0.004450006876140833,
-0.06663327664136887,
-0.05761301517486572,
-0.10701149702072144,
-0.16575293242931366,
0.052557170391082764,
-0.06570103764533997,
-0.05164901167154312,
-0.0006866191979497671,
0.09408121556043625,
-0.09229669719934464,
0.023619726300239563,
0.06959351897239685,
0.19239206612110138,
0.13276661932468414,
0.000687247549649328,
-0.22258146107196808,
-0.0950019434094429,
0.001954207429662347,
-0.022254420444369316,
-0.034747879952192307,
0.19957709312438965,
0.17002259194850922,
-0.059200990945100784,
-0.2005782574415207,
0.11959728598594666,
-0.024723462760448456,
-0.008411423303186893,
0.18133355677127838,
-0.04880324751138687,
0.03221754729747772,
0.09036119282245636,
0.06049107387661934,
-0.0818142518401146,
-0.08092188835144043,
0.1245291456580162,
-0.0026858521159738302,
0.047127995640039444,
0.06749055534601212,
-0.24840517342090607,
-0.2270939201116562,
-0.0077429586090147495,
-0.056423477828502655,
-0.07890691608190536,
0.18146701157093048,
0.18315762281417847,
0.035330239683389664,
0.023125728592276573,
-0.01842310093343258,
-0.037736035883426666,
0.016292084008455276,
0.11646617203950882,
-0.0402761846780777,
0.06751151382923126,
-0.08949398249387741,
-0.005191093776375055,
-0.09816696494817734,
-0.01134815439581871,
0.15643922984600067,
0.03495953232049942,
-0.13068996369838715,
-0.23525144159793854,
0.17734447121620178,
-0.23457121849060059,
0.13456222414970398,
-0.14892704784870148,
-0.06004165858030319,
0.3002314865589142,
0.07575566321611404,
-0.08016388863325119,
-0.039144229143857956,
-0.011834798380732536,
0.1997465193271637,
-0.023255713284015656,
-0.05817066878080368,
-0.22227579355239868,
-0.17810307443141937,
-0.126399964094162,
0.05907468497753143,
-0.11457814276218414,
-0.07497217506170273,
-0.13918830454349518,
0.10263299196958542,
0.04921482503414154,
-0.08807725459337234,
0.1294439136981964,
0.020781097933650017,
0.016482539474964142,
-0.05304983630776405,
-0.08953949064016342,
0.16930170357227325,
0.1115126684308052,
0.12032336741685867,
-0.049896739423274994,
0.0024060991127043962,
-0.030196279287338257,
0.03136351704597473,
0.12585094571113586,
-0.2770344913005829,
0.03898249566555023,
0.007593948859721422,
-0.022053346037864685,
-0.15310731530189514,
0.18451663851737976,
0.1524660885334015,
-0.0877961739897728,
0.008344431407749653,
0.0018608404789119959,
0.07033006846904755,
-0.03695211932063103,
0.1652514785528183,
0.06704580038785934,
-0.019851606339216232,
0.11961718648672104,
-0.09670549631118774,
0.07962848246097565,
0.04317478835582733,
-0.003389226272702217,
0.20622174441814423,
0.026294924318790436,
0.008001710288226604,
0.16696900129318237,
-0.0035513408947736025,
0.13425369560718536,
-0.018463168293237686,
-0.07587471604347229,
-0.20998497307300568,
-0.17560113966464996,
-0.15401460230350494,
0.14765717089176178,
0.02514067478477955,
-0.12386626750230789,
-0.031775955110788345,
-0.08896228671073914,
-0.10981281101703644,
0.04384060576558113,
-0.016137437894940376,
0.15077511966228485,
-0.05543970316648483,
0.21161119639873505,
-0.13377100229263306,
0.14623790979385376,
0.006880765315145254,
0.456653892993927,
0.01583898440003395,
-0.18822291493415833,
-0.10088194906711578,
-0.1768559068441391,
-0.06958663463592529,
0.028058011084794998,
-0.15778259932994843,
0.222122922539711,
-0.20796379446983337,
-0.11057239025831223,
-0.0916961058974266,
0.04545619338750839,
0.11218621581792831,
-0.1645948588848114,
0.038001514971256256,
-0.09605720639228821,
-0.013167565688490868,
0.1354067623615265,
-0.03199956938624382,
0.011145009659230709,
-0.021839765831828117,
-0.008344991132616997,
0.20694072544574738,
-0.016966665163636208,
-0.008372155949473381,
-0.024281809106469154,
0.1236996203660965,
0.28968366980552673,
-0.1310785710811615,
0.36282938718795776,
0.06314585357904434,
-0.071518175303936,
-0.006984561216086149,
-0.20216305553913116,
0.0002821696107275784,
-0.0022639441303908825,
0.08323775976896286,
0.14114068448543549,
-0.04108046367764473,
-0.018640225753188133,
-0.07274448126554489,
-0.03422703593969345,
0.002592014381662011,
0.09809651225805283,
-0.07974588871002197,
0.06654749810695648,
-0.20485234260559082,
0.04581209644675255,
0.06141705438494682,
-0.13229501247406006,
-0.01808261312544346,
0.034291308373212814,
0.035438790917396545,
-0.1985294669866562,
-0.08329059183597565,
0.09281795471906662,
-0.012412039563059807,
0.0855492576956749,
0.010677536018192768,
0.021902140229940414,
0.10928183048963547,
0.010154036805033684,
0.090333953499794,
0.02871865965425968,
-0.13583602011203766,
0.08740444481372833,
0.007931741885840893,
0.03218308091163635,
-0.07019181549549103,
0.013543691486120224,
0.016071783378720284,
-0.0011982761789113283,
-0.11359833180904388,
-0.11205263435840607,
0.046434469521045685,
0.022647976875305176,
-0.08930569887161255,
-0.09277290105819702,
-0.13153421878814697,
-0.1056578978896141,
-0.021927904337644577,
0.10783886164426804,
0.13392935693264008,
0.02549290470778942,
0.004511809442192316,
0.010617499239742756,
-0.03531475365161896,
-0.017948834225535393,
-0.08947334438562393,
-0.0482369028031826,
-0.07086546719074249,
0.16224342584609985,
0.1324833184480667,
0.09332571923732758,
0.059235114604234695,
0.11660054326057434,
-0.11761314421892166,
-0.042554453015327454,
0.027307389304041862,
0.041896723210811615,
-0.08744790405035019,
-0.031373392790555954,
-0.06176493316888809,
-0.041167162358760834,
-0.052395302802324295,
-0.025030598044395447,
0.12507522106170654,
0.116862453520298,
0.06736677139997482,
0.020968804135918617,
-0.06558551639318466,
0.13880915939807892,
-0.13636068999767303,
-0.08446677029132843,
0.05150476470589638,
0.06179189309477806,
-0.1515882909297943,
-0.004671880044043064,
-2.3093637119979886e-32,
-0.004324640613049269,
-0.06563012301921844,
-0.07913773506879807,
0.02606959082186222,
-0.13879655301570892,
0.05482107028365135,
-0.15739935636520386,
0.06710758060216904,
0.017802419140934944,
-0.13098064064979553,
-0.02087302692234516,
0.11666534096002579,
0.02248787134885788,
-0.04450112581253052,
0.04556567221879959,
-0.045244548469781876,
-0.05606121942400932,
-0.10619672387838364,
-0.021127333864569664,
0.04271316900849342,
0.19103823602199554,
0.09942270815372467,
0.008418647572398186,
0.0258525088429451,
0.037141941487789154,
-0.055848129093647,
-0.1043306216597557,
-0.1618127077817917,
0.02461215853691101,
-0.159215047955513,
-0.05074766278266907,
0.14995042979717255,
0.09324916452169418,
-0.07939718663692474,
-0.07545129209756851,
-0.11937183141708374,
0.07009617239236832,
0.0515461191534996,
-0.15616366267204285,
-0.053867679089307785,
0.041918057948350906,
0.15555855631828308,
0.020758632570505142,
-0.09350154548883438,
-0.11456359177827835,
0.12323567271232605,
-0.02076917700469494,
-0.01868678256869316,
0.013622778467833996,
0.004261929541826248,
-0.04238809272646904,
-0.08427033573389053,
0.012168836779892445,
0.04975243657827377,
0.13044413924217224,
-0.16036854684352875,
0.11088458448648453,
0.08535157144069672,
-0.0767391100525856,
0.1181442067027092,
0.10150185227394104,
-0.10069123655557632,
-0.037195753306150436,
-0.16649115085601807,
0.056172337383031845,
0.10660579055547714,
0.3091057240962982,
0.17389743030071259,
0.11276954412460327,
0.14941005408763885,
-0.1452046036720276,
0.1794404834508896,
-0.2024659663438797,
-0.14700761437416077,
-0.1741025447845459,
-0.11102055758237839,
-0.14227792620658875,
0.03584608435630798,
0.0048136115074157715,
-0.11859815567731857,
0.0043256464414298534,
-0.1141420528292656,
0.1860237717628479,
-0.032172832638025284,
-0.11112844198942184,
0.07653874158859253,
0.01661120355129242,
0.019559433683753014,
-0.10873667150735855,
-0.22495059669017792,
0.08053701370954514,
-0.002191971754655242,
-0.1577991545200348,
-0.043476685881614685,
-0.19379469752311707,
0.17496919631958008,
-0.2912467122077942,
0.12554602324962616,
-0.2020719051361084,
0.05577356740832329,
0.03043692372739315,
-0.14059405028820038,
0.016122767701745033,
0.029376232996582985,
0.20882168412208557,
0.17095552384853363,
0.1546231210231781,
0.15098391473293304,
-0.11965349316596985,
-0.0578807033598423,
0.028965014964342117,
-0.07379359006881714,
0.014272194355726242,
0.15142036974430084,
0.22585484385490417,
-0.023532696068286896,
0.052851758897304535,
-0.23478931188583374,
0.22370783984661102,
0.13328522443771362,
-0.03470909222960472,
-0.10801921784877777,
-0.14493657648563385,
0.057021938264369965,
0.23270156979560852,
0.06210576370358467,
-0.15637610852718353,
-0.2606636881828308,
0.013448787853121758,
0.1234622448682785,
0.0509929358959198,
-0.011108383536338806,
7.408122542074125e-7,
-0.22080157697200775,
0.09679862856864929,
-0.06365010887384415,
-0.147764191031456,
-0.05599839985370636,
0.2349715232849121,
-0.2511824071407318,
0.08619176596403122,
-0.06052441895008087,
-0.02929508313536644,
0.1666586697101593,
-0.0998249426484108,
0.058466795831918716,
0.028132852166891098,
0.14753411710262299,
0.012451491318643093,
-0.11438661068677902,
0.10124651342630386,
-0.0622638538479805,
0.09306004643440247,
-0.02860577590763569,
-0.07685612887144089,
-0.10718152672052383,
-0.16031157970428467,
0.06154518947005272,
0.27865469455718994,
-0.0262741781771183,
-0.0032073797192424536,
0.12942443788051605,
0.05332782864570618,
0.013566139154136181,
-0.1817268580198288,
-0.014999943785369396,
0.127658411860466,
0.009169288910925388,
-0.05654164031147957,
-0.27802738547325134,
-0.048117294907569885,
-0.034934017807245255,
0.09411147981882095,
0.007932424545288086,
-0.00969606265425682,
0.06493052840232849,
0.08205241709947586,
0.01919751800596714,
0.011052154004573822,
-0.10509490966796875,
0.03646736964583397,
-0.21780048310756683,
0.18828989565372467,
0.05590353161096573,
0.13967394828796387,
0.07107728719711304,
0.15519258379936218,
-0.11810990422964096,
0.019824113696813583,
0.10460400581359863,
-0.14162755012512207,
0.07018821686506271,
0.22901372611522675,
0.016599105671048164,
-0.08992509543895721,
0.03337924927473068,
0.17076703906059265,
0.08099101483821869,
-0.06335978955030441,
-0.015592594631016254,
9.687151369911803e-35,
0.09377672523260117,
0.09481555223464966,
0.07072858512401581,
-0.11502082645893097,
-0.13484910130500793,
-0.08144304901361465,
0.22284480929374695,
0.03115774132311344,
0.04211731627583504,
0.05734729766845703,
-0.08021523803472519
] |
https://github.com/huggingface/datasets/issues/5989 | Set a rule on the config and split names | in this case we need to decide what to do with the existing datasets with white space characters (there shouldn't be a lot of them I think) | > should we actually allow characters like spaces? maybe it's better to add validation for whitespace symbols and directly in datasets and raise
https://github.com/huggingface/datasets-server/issues/853
| 27 | Set a rule on the config and split names
> should we actually allow characters like spaces? maybe it's better to add validation for whitespace symbols and directly in datasets and raise
https://github.com/huggingface/datasets-server/issues/853
in this case we need to decide what to do with the existing datasets with white space characters (there shouldn't be a lot of them I think) | [
0.1071544662117958,
0.11216487735509872,
0.08203740417957306,
0.06670168787240982,
0.28693822026252747,
-0.06940226256847382,
0.18778109550476074,
0.02470267191529274,
-0.09706104546785355,
0.18975400924682617,
0.021482029929757118,
-0.15108081698417664,
-0.06004788354039192,
0.17185215651988983,
0.09327825158834457,
-0.17591357231140137,
0.06199657544493675,
-0.03183504566550255,
0.024629654362797737,
0.006148457992821932,
-0.0013456299202516675,
0.006498593371361494,
0.1818932294845581,
0.07818541675806046,
-0.07437988370656967,
-0.06336110830307007,
-0.009391696192324162,
0.025790056213736534,
-0.014935986138880253,
-0.21836355328559875,
0.04817600175738335,
0.03407924249768257,
-0.11115724593400955,
0.2500707507133484,
0.000005214279099163832,
-0.043814897537231445,
0.0459294393658638,
-0.016350694000720978,
-0.07018095254898071,
-0.17965267598628998,
-0.11390282213687897,
-0.06627506017684937,
0.01601129025220871,
0.06492314487695694,
-0.0602191761136055,
0.03298508748412132,
-0.009897874668240547,
-0.044367026537656784,
0.05761916935443878,
0.03755965456366539,
0.06324529647827148,
0.06279019266366959,
-0.06732799857854843,
0.012691444717347622,
-0.004345053806900978,
0.25194334983825684,
0.033398207277059555,
-0.08574316650629044,
-0.10876654833555222,
-0.0004389896639622748,
-0.08583327382802963,
0.1147984117269516,
0.12348468601703644,
0.07453872263431549,
-0.055357448756694794,
0.10783874243497849,
-0.4662916660308838,
-0.1528204381465912,
0.013647899962961674,
0.32084301114082336,
0.08189249783754349,
0.08551613241434097,
-0.10888724029064178,
-0.055994365364313126,
-0.013107829727232456,
-0.06800664961338043,
0.10923994332551956,
-0.05396748334169388,
-0.15322548151016235,
0.042042795568704605,
-0.15633156895637512,
0.03266879543662071,
0.07316052168607712,
-0.05035997927188873,
-0.24257007241249084,
-0.10565126687288284,
-0.15895821154117584,
-0.018294144421815872,
0.04921569302678108,
-0.2786388397216797,
-0.03881322965025902,
-0.03985670581459999,
-0.06279481947422028,
-0.01787906140089035,
-0.11627568304538727,
0.08285430818796158,
-0.24184153974056244,
-0.063545823097229,
0.00354794692248106,
-0.09906978160142899,
-0.17520023882389069,
-0.12590280175209045,
-0.030040988698601723,
-0.042119938880205154,
0.15583136677742004,
-0.03971819207072258,
0.027277667075395584,
-0.027296433225274086,
0.22020502388477325,
0.03622816130518913,
0.1362428516149521,
-0.01858023926615715,
0.016324689611792564,
-0.02044735848903656,
-0.08702637255191803,
-0.02581157349050045,
0.14279353618621826,
0.0610538013279438,
-0.03981867432594299,
0.006206105463206768,
0.3113289773464203,
-0.07601101696491241,
0.05746261030435562,
0.11702440679073334,
0.05747457966208458,
-0.15196391940116882,
0.045126788318157196,
0.046652134507894516,
-0.04883313924074173,
-0.1497175395488739,
0.013096874579787254,
0.03304281458258629,
-0.047962043434381485,
0.03771212697029114,
0.20891962945461273,
-0.030772283673286438,
0.10617285221815109,
-0.07524007558822632,
0.06363964825868607,
0.0032621435821056366,
0.021753380075097084,
-0.04365285485982895,
0.0033032894134521484,
0.030895277857780457,
0.029637211933732033,
0.00503968633711338,
-0.01568075828254223,
-0.014113265089690685,
0.012042264454066753,
-0.0774545669555664,
-0.173812597990036,
0.27164554595947266,
-0.22749049961566925,
-0.010603437200188637,
0.057783372700214386,
0.026685012504458427,
-0.04163920134305954,
0.027165694162249565,
0.010456256568431854,
-0.08003149926662445,
0.11610101908445358,
0.23576337099075317,
0.10508818924427032,
0.08246838301420212,
0.03197966143488884,
-0.016783902421593666,
-0.04840507730841637,
0.057787515223026276,
0.013815798796713352,
-0.004126557148993015,
-0.00253399764187634,
-0.0020839946810156107,
-0.0009268815047107637,
-0.06426014006137848,
-0.20740258693695068,
0.3923550248146057,
-0.02140076272189617,
0.006227337755262852,
-0.020845206454396248,
-0.02684999443590641,
0.019262107089161873,
-0.1693296581506729,
-0.11902827769517899,
-0.4138709008693695,
0.17940393090248108,
0.00712169473990798,
-0.07775581628084183,
0.12512817978858948,
-0.004174012690782547,
0.03391266241669655,
-0.04216603934764862,
-0.034741729497909546,
-0.011862186715006828,
-0.10832201689481735,
-0.0745880976319313,
-0.1542814075946808,
-0.0655667781829834,
-0.10986359417438507,
0.0658651813864708,
-0.08958471566438675,
0.09056882560253143,
-0.07399975508451462,
0.047539494931697845,
0.17032893002033234,
-0.015377144329249859,
-0.0753035768866539,
-0.23495794832706451,
0.0727340504527092,
0.130036860704422,
-0.15970870852470398,
-0.3068045675754547,
0.019351303577423096,
-0.01407619658857584,
-0.07214207947254181,
-0.11060982197523117,
0.21051496267318726,
-0.0029253626707941294,
-0.03274156525731087,
-0.117836132645607,
0.045314084738492966,
-0.18257565796375275,
0.09306696057319641,
-0.005194110795855522,
0.13573017716407776,
-0.055046141147613525,
0.021467668935656548,
-0.10540538281202316,
-0.020846441388130188,
0.09551161527633667,
0.08313833177089691,
-0.03723440319299698,
-0.08197305351495743,
-0.04906781390309334,
0.11483675241470337,
-0.13225451111793518,
0.1076284870505333,
0.09597364813089371,
-0.15262053906917572,
0.23826336860656738,
-0.03781133517622948,
0.024046272039413452,
-0.009545761160552502,
-0.06571406871080399,
-0.01606619916856289,
-0.07892207056283951,
0.07761137932538986,
-0.1440214067697525,
0.19498726725578308,
0.06513741612434387,
-0.008886515162885189,
0.230332151055336,
-0.08059713989496231,
-0.07565978169441223,
-0.017435165122151375,
0.070468008518219,
-0.15703313052654266,
0.16584281623363495,
0.09718719869852066,
-0.08358756452798843,
0.02397133596241474,
0.35685113072395325,
0.02209012769162655,
-0.11161231249570847,
-0.03169773891568184,
0.0924319326877594,
-0.021134860813617706,
0.12111020088195801,
0.16142113506793976,
-0.025938402861356735,
0.17337147891521454,
0.12548017501831055,
-0.15809372067451477,
0.031618326902389526,
-0.17363591492176056,
0.13045132160186768,
-0.05380548909306526,
-0.11050353199243546,
0.07957106083631516,
-0.1298668086528778,
0.04934088513255119,
-0.23760202527046204,
0.06550373136997223,
0.16609595715999603,
-0.19202156364917755,
-0.056397195905447006,
0.11676885932683945,
-0.13668817281723022,
0.028713224455714226,
-0.09850667417049408,
0.0762665793299675,
-0.07351244240999222,
0.027469463646411896,
-0.05646725744009018,
-0.18891417980194092,
-0.03619984909892082,
-0.06846514344215393,
0.08692042529582977,
0.012180069461464882,
-0.11355474591255188,
0.09739790111780167,
-0.15904340147972107,
0.06974603235721588,
0.02057325653731823,
-0.0747552141547203,
0.009296927601099014,
0.13437014818191528,
0.04470556229352951,
0.15479929745197296,
0.014958200976252556,
-0.12077450007200241,
-0.1332215517759323,
-0.0698012113571167,
-0.161394402384758,
0.19136743247509003,
0.09213310480117798,
-0.043328605592250824,
0.009127299301326275,
-0.0939970314502716,
0.05191216617822647,
-0.009783240035176277,
-0.0037066179793328047,
0.12384863197803497,
0.09337665140628815,
-0.11088776588439941,
0.024552121758461,
-0.039604708552360535,
-0.06387248635292053,
-0.07024955749511719,
0.015782441943883896,
-0.12670733034610748,
-0.11052896827459335,
0.2186669260263443,
-0.10332566499710083,
-0.050851404666900635,
-0.033270519226789474,
-0.07884842157363892,
-0.1407337784767151,
-0.012366394512355328,
0.21681635081768036,
-0.10525589436292648,
-0.058862071484327316,
0.11451949179172516,
0.0032390172127634287,
-0.0296123456209898,
-0.023116985335946083,
-0.03576583042740822,
0.0817471370100975,
-0.12476383149623871,
0.07013338059186935,
0.09447185695171356,
0.029896095395088196,
-0.027868671342730522,
-0.05088931322097778,
-0.04984667897224426,
-0.03578246757388115,
-0.1574631780385971,
-0.23819848895072937,
0.04268946871161461,
-0.05783515423536301,
0.010148398578166962,
0.09272778779268265,
-0.02330966480076313,
-0.04422225430607796,
-0.1663913130760193,
-0.03485088422894478,
0.0852799117565155,
0.02426735684275627,
0.1283084601163864,
-0.04064737260341644,
-0.28150495886802673,
0.10549324750900269,
-0.08352292329072952,
0.11154317855834961,
0.13984838128089905,
-0.010928656905889511,
0.18902955949306488,
0.0602603405714035,
-0.07131554931402206,
0.04358799755573273,
-0.012113695964217186,
-0.062020912766456604,
-0.0990595668554306,
-0.04226790741086006,
0.11876849830150604,
0.1123284101486206,
0.08538489043712616,
-0.034840743988752365,
0.00599247682839632,
-0.06089480221271515,
0.019071955233812332,
-0.006412636488676071,
-0.25754615664482117,
0.06051208823919296,
-0.06808285415172577,
0.0557890310883522,
-0.1389475166797638,
0.10617638379335403,
-0.0026079260278493166,
0.1648290902376175,
0.1255025863647461,
0.24976564943790436,
0.16445431113243103,
-0.0347721204161644,
0.00987042486667633,
-0.11425032466650009,
0.10237769782543182,
-0.018162311986088753,
0.07702279835939407,
0.09654628485441208,
-0.016145991161465645,
0.05118383839726448,
0.09118161350488663,
-0.0710158571600914,
-0.12418331950902939,
0.03886164352297783,
0.05421578139066696,
-0.06954207271337509,
-0.01501364354044199,
0.06427811831235886,
-0.15208230912685394,
-0.08064374327659607,
-0.05479073151946068,
0.06690111011266708,
0.13728593289852142,
0.16848540306091309,
-0.05138815939426422,
-0.045251745730638504,
-0.00758437579497695,
0.1579461395740509,
0.08850447833538055,
0.04105403274297714,
-0.07635118812322617,
0.007646520156413317,
0.11252792924642563,
0.13820399343967438,
-0.010300371795892715,
0.13324497640132904,
-0.26048794388771057,
-0.29036664962768555,
-0.04437033087015152,
-0.23616299033164978,
0.1642354279756546,
0.40756192803382874,
-0.00503187719732523,
0.10647422075271606,
0.031024111434817314,
0.13106808066368103,
0.02161663956940174,
0.149161696434021,
-0.016330163925886154,
-0.020969470962882042,
-0.17348065972328186,
0.09976408630609512,
-0.0982917919754982,
0.04468265175819397,
0.007042832672595978,
0.060668617486953735,
0.20113076269626617,
-0.15710704028606415,
0.10849925875663757,
-0.1330755352973938,
-0.035669997334480286,
-0.041126128286123276,
0.01254146359860897,
-0.0461156889796257,
0.04377967491745949,
0.2490953803062439,
-0.07426825165748596,
-0.15737636387348175,
0.2247844785451889,
0.012163018807768822,
0.10451202094554901,
0.027934269979596138,
0.1275070756673813,
0.05384893715381622,
0.057628288865089417,
0.04959241673350334,
-0.16907405853271484,
0.15061427652835846,
-0.12370400875806808,
0.16818515956401825,
-0.0031035179272294044,
-0.16202062368392944,
-0.17707473039627075,
-0.06654636561870575,
0.054084375500679016,
0.034708864986896515,
0.08073823899030685,
-0.11715508252382278,
0.10086490213871002,
-0.08386793732643127,
-0.061443179845809937,
-0.06115352734923363,
-0.09536975622177124,
0.044411346316337585,
-0.024015527218580246,
0.07481871545314789,
0.11198906600475311,
0.06489863246679306,
0.2041342407464981,
0.14402927458286285,
-0.03310944139957428,
0.08156188577413559,
-0.12669223546981812,
-0.020218295976519585,
-0.24921369552612305,
0.07808773964643478,
-0.059274569153785706,
0.0868203192949295,
-0.07913140207529068,
-0.1854223608970642,
0.12473174929618835,
0.01284677442163229,
0.03469645604491234,
-0.0034572079312056303,
-0.06165826693177223,
-0.24796846508979797,
0.18270157277584076,
-0.07620730251073837,
0.15786750614643097,
-0.05823053792119026,
-0.029647165909409523,
-0.08363348990678787,
-0.1706826090812683,
0.08989634364843369,
0.14124083518981934,
-0.0016071187565103173,
-0.1267286241054535,
-0.18819814920425415,
0.10989721864461899,
0.09366125613451004,
0.1368282437324524,
0.054977793246507645,
-0.15939101576805115,
-0.016072412952780724,
0.12436718493700027,
0.10901501029729843,
-0.16370144486427307,
-0.0005427664727903903,
0.033901557326316833,
-0.08618853986263275,
-0.2028399556875229,
-0.2025778442621231,
0.12603068351745605,
-0.02933415025472641,
0.19374364614486694,
-0.009740836918354034,
0.045447926968336105,
-0.050986725836992264,
0.014216634444892406,
0.12731119990348816,
0.1534959226846695,
0.21807174384593964,
-0.18458372354507446,
0.0561927929520607,
-2.5664864973826586e-32,
0.08554891496896744,
0.05202449858188629,
-0.016695087775588036,
0.14036889374256134,
-0.2561221122741699,
0.0739392638206482,
-0.0146373575553298,
-0.025460850447416306,
-0.04172603413462639,
-0.05250991880893707,
-0.04441528394818306,
0.1223706603050232,
0.06481920927762985,
-0.015750011429190636,
-0.032292623072862625,
-0.13755908608436584,
0.02793307974934578,
0.05728869512677193,
-0.05000874027609825,
-0.06759539246559143,
0.10137950628995895,
0.07412189990282059,
-0.022283168509602547,
-0.04574877768754959,
-0.00888209417462349,
0.016925441101193428,
-0.1128641813993454,
0.10295779258012772,
0.051120318472385406,
0.08143942058086395,
-0.013475095853209496,
0.019033364951610565,
-0.05934564024209976,
0.007108152844011784,
-0.03648322448134422,
0.04966002330183983,
-0.11283360421657562,
-0.18192851543426514,
-0.14906369149684906,
0.010943999513983727,
0.13136057555675507,
0.05183913931250572,
0.16710536181926727,
-0.10519836843013763,
-0.010153139010071754,
0.04318767040967941,
0.03214435279369354,
-0.020142847672104836,
0.062298573553562164,
0.029459979385137558,
0.12261708825826645,
0.04231387376785278,
0.11390740424394608,
0.0746813639998436,
0.12285156548023224,
-0.221763476729393,
0.07050659507513046,
0.11365506052970886,
0.024724695831537247,
-0.010105021297931671,
0.1404515951871872,
-0.11431387811899185,
0.1091785803437233,
0.19716224074363708,
0.11169590055942535,
-0.15174828469753265,
0.22414414584636688,
-0.1665056049823761,
0.16225634515285492,
-0.18132956326007843,
0.02251969836652279,
0.06582698971033096,
0.006810715887695551,
0.02955944836139679,
-0.018427293747663498,
-0.08900025486946106,
-0.13297677040100098,
0.002467166632413864,
-0.10899653285741806,
-0.1727602332830429,
-0.2071293443441391,
0.027371862903237343,
-0.026219442486763,
-0.01053150650113821,
-0.01570284552872181,
0.07762189954519272,
0.01884569600224495,
0.04402324557304382,
-0.07586415857076645,
-0.09415585547685623,
-0.07656852155923843,
0.21513940393924713,
-0.11864831298589706,
-0.026436757296323776,
-0.19342710077762604,
0.11970609426498413,
0.11252327263355255,
0.07300852984189987,
0.004408565349876881,
-0.011107000522315502,
0.02591797336935997,
0.024445978924632072,
0.10702037066221237,
0.14493528008460999,
-0.013354427181184292,
-0.03151123970746994,
0.2121126353740692,
0.05216285213828087,
-0.19271381199359894,
0.006126070395112038,
-0.004119358491152525,
0.013711061328649521,
0.06908458471298218,
0.15305010974407196,
0.10511384904384613,
-0.07846058160066605,
0.049041442573070526,
-0.053833819925785065,
0.21740706264972687,
-0.012379945255815983,
-0.15095095336437225,
-0.045630957931280136,
-0.12630988657474518,
0.09676548093557358,
-0.03288591653108597,
-0.1406382918357849,
-0.04487842693924904,
-0.02409336157143116,
0.20396581292152405,
-0.14151060581207275,
-0.046272531151771545,
-0.2395249307155609,
7.15389091965335e-7,
-0.14613467454910278,
0.12342077493667603,
-0.016966555267572403,
-0.01202464010566473,
-0.1045435443520546,
0.11349964886903763,
-0.06573168188333511,
-0.06570373475551605,
-0.18625527620315552,
0.18501032888889313,
0.04369080066680908,
-0.10610243678092957,
-0.04059285670518875,
-0.062269411981105804,
0.08967719972133636,
-0.040317103266716,
-0.1016479879617691,
-0.12997563183307648,
-0.23154529929161072,
0.10104135423898697,
0.010238963179290295,
0.12418757379055023,
0.19011618196964264,
-0.08518747240304947,
0.09781989455223083,
0.04346330463886261,
-0.30243781208992004,
-0.015630874782800674,
0.17781466245651245,
0.04735874757170677,
0.10171156376600266,
-0.12225151062011719,
0.07586649060249329,
0.0019663257990032434,
0.02323736622929573,
0.033502787351608276,
-0.10118328779935837,
-0.08658016473054886,
-0.022495031356811523,
0.2215292900800705,
0.03539092466235161,
-0.09464772045612335,
-0.09569451212882996,
-0.07332741469144821,
0.17978200316429138,
0.2604876160621643,
-0.15009671449661255,
0.07617338001728058,
-0.003134068101644516,
-0.11290229856967926,
0.06366704404354095,
0.03571973741054535,
0.13553358614444733,
0.18678928911685944,
-0.13037526607513428,
-0.08101994544267654,
0.1351216584444046,
-0.2043534368276596,
0.03289923071861267,
-0.12940821051597595,
-0.12769077718257904,
-0.020751813426613808,
-0.007047594524919987,
0.1482580602169037,
0.06324473768472672,
-0.12615546584129333,
-0.01331032533198595,
2.3167044446301333e-34,
-0.0972432941198349,
-0.07346581667661667,
-0.05120614171028137,
-0.006327301263809204,
-0.09039170295000076,
-0.011166096664965153,
0.25312837958335876,
0.1478120982646942,
-0.0057203802280128,
0.024421516805887222,
-0.003896646434441209
] |
https://github.com/huggingface/datasets/issues/5988 | ConnectionError: Couldn't reach dataset_infos.json | Unfortunately, I can't reproduce the error. What does the following code return for you?
```python
import requests
from huggingface_hub import hf_hub_url
r = requests.get(hf_hub_url("codeparrot/codeparrot-clean-train", "dataset_infos.json", repo_type="dataset"))
```
Also, can you provide more info about your network (region, proxies, etc.)? | ### Describe the bug
I'm trying to load codeparrot/codeparrot-clean-train, but get the following error:
ConnectionError: Couldn't reach https://huggingface.co/datasets/codeparrot/codeparrot-clean-train/resolve/main/dataset_infos.json (ConnectionError(ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))))
### Steps to reproduce the bug
train_data = load_dataset('codeparrot/codeparrot-clean-train', split='train')
### Expected behavior
download the dataset
### Environment info
centos7 | 39 | ConnectionError: Couldn't reach dataset_infos.json
### Describe the bug
I'm trying to load codeparrot/codeparrot-clean-train, but get the following error:
ConnectionError: Couldn't reach https://huggingface.co/datasets/codeparrot/codeparrot-clean-train/resolve/main/dataset_infos.json (ConnectionError(ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))))
### Steps to reproduce the bug
train_data = load_dataset('codeparrot/codeparrot-clean-train', split='train')
### Expected behavior
download the dataset
### Environment info
centos7
Unfortunately, I can't reproduce the error. What does the following code return for you?
```python
import requests
from huggingface_hub import hf_hub_url
r = requests.get(hf_hub_url("codeparrot/codeparrot-clean-train", "dataset_infos.json", repo_type="dataset"))
```
Also, can you provide more info about your network (region, proxies, etc.)? | [
-0.07574890553951263,
0.0836763083934784,
-0.016753526404500008,
0.00452892342582345,
0.3518003523349762,
0.0291182529181242,
0.07625661790370941,
0.07700838148593903,
0.12092049419879913,
0.2554291784763336,
-0.019736584275960922,
0.04712919890880585,
0.012331776320934296,
0.0720020979642868,
0.0554264672100544,
-0.12549524009227753,
-0.04246476665139198,
-0.10084214806556702,
0.017351869493722916,
0.021309562027454376,
0.046331871300935745,
0.1533024162054062,
-0.003989970311522484,
-0.11201947182416916,
-0.0636969804763794,
-0.04728567227721214,
0.06873583048582077,
-0.17499470710754395,
-0.07818987965583801,
-0.20557168126106262,
0.14332273602485657,
0.005581405945122242,
0.034370843321084976,
0.13582080602645874,
0.00000524184588357457,
-0.028054777532815933,
0.05695159733295441,
0.08805253356695175,
-0.07076975703239441,
-0.05185030773282051,
-0.00858713686466217,
-0.05044082552194595,
-0.02411072328686714,
-0.04818634316325188,
-0.045019667595624924,
0.009619444608688354,
0.037661075592041016,
0.014244770631194115,
0.016772085800766945,
0.14994509518146515,
-0.0010641341796144843,
0.21117867529392242,
0.08709792047739029,
0.00021261587971821427,
-0.10781682282686234,
0.02500646561384201,
-0.11164970695972443,
0.32612916827201843,
-0.1803569793701172,
-0.0835038349032402,
-0.044510528445243835,
-0.0435035303235054,
0.2104443907737732,
0.09112901985645294,
-0.047999218106269836,
-0.06464938074350357,
-0.03403235226869583,
0.011663037352263927,
-0.014904015697538853,
0.17663510143756866,
0.012701022438704967,
0.06511596590280533,
-0.18571354448795319,
0.007421555463224649,
-0.17226620018482208,
-0.14232294261455536,
0.06595402956008911,
-0.07588900625705719,
-0.1124730035662651,
0.18116824328899384,
-0.22772227227687836,
-0.10382327437400818,
-0.07908634096384048,
0.017042433843016624,
0.028604626655578613,
-0.10719987750053406,
-0.09815675020217896,
0.06176434084773064,
0.1269848495721817,
-0.23601394891738892,
0.1349804401397705,
-0.005250824615359306,
-0.058155607432127,
0.012363473884761333,
-0.051444102078676224,
-0.028569502755999565,
-0.06908362358808517,
0.0468643493950367,
0.09170308709144592,
0.05594555661082268,
-0.2774313986301422,
-0.08256470412015915,
-0.056561268866062164,
0.0645098015666008,
0.05960838124155998,
-0.09877350926399231,
-0.0008339835912920535,
-0.04327152296900749,
0.24471400678157806,
0.18258878588676453,
0.1449955403804779,
0.02111084945499897,
-0.11932112276554108,
-0.03470764681696892,
-0.0970059260725975,
0.05386113375425339,
0.13648001849651337,
0.09748898446559906,
0.03243440389633179,
0.04354461282491684,
0.02548871748149395,
0.01542226318269968,
-0.09872375428676605,
0.15106609463691711,
-0.23277544975280762,
0.028494246304035187,
-0.15403570234775543,
-0.0614941343665123,
-0.06368545442819595,
0.19613561034202576,
-0.01383703388273716,
-0.13601899147033691,
-0.11554772406816483,
-0.1013835147023201,
0.21227656304836273,
-0.05961456894874573,
0.012586863711476326,
-0.05245446413755417,
0.12466102838516235,
0.0032662092708051205,
0.05625072121620178,
-0.1730380654335022,
-0.22061368823051453,
0.04636469483375549,
0.1510637104511261,
-0.09305465221405029,
-0.024500418454408646,
-0.085613913834095,
-0.003947163932025433,
-0.2281942069530487,
-0.02306263893842697,
0.004850295372307301,
-0.22747205197811127,
-0.04839281365275383,
-0.10941265523433685,
-0.09491891413927078,
-0.03260742127895355,
0.002775676315650344,
-0.23511235415935516,
0.11636533588171005,
0.05611439049243927,
-0.012794152833521366,
0.09005920588970184,
-0.029141949489712715,
0.2794675827026367,
-0.0009077954455278814,
0.11261078715324402,
0.03785921633243561,
0.07936932891607285,
-0.029811374843120575,
-0.0412297360599041,
-0.06567098945379257,
-0.11320861428976059,
0.11881569027900696,
-0.18518489599227905,
0.06636225432157516,
-0.07258256524801254,
-0.045553695410490036,
-0.23086754977703094,
0.0806192085146904,
0.05250288173556328,
-0.1441451758146286,
-0.06469882279634476,
-0.03132276237010956,
-0.08459397405385971,
0.04069076478481293,
0.012289307080209255,
0.11040685325860977,
-0.009359019808471203,
-0.13460823893547058,
0.0206295195966959,
0.11309683322906494,
-0.028292210772633553,
0.012540504336357117,
0.1288500875234604,
-0.17320163547992706,
-0.08215633034706116,
0.0032595284283161163,
0.16620534658432007,
-0.11807654798030853,
-0.008733930997550488,
0.04996413365006447,
0.02963492088019848,
0.13194714486598969,
0.07921908795833588,
-0.09696401655673981,
-0.12006875872612,
0.28369569778442383,
0.16312925517559052,
-0.19294467568397522,
-0.3268406093120575,
0.06892313063144684,
-0.05661080777645111,
0.1062016636133194,
-0.04780033603310585,
-0.050052937120199203,
-0.07192151993513107,
-0.06072032451629639,
0.020434662699699402,
0.2380758374929428,
-0.2500002384185791,
0.26000258326530457,
0.0641307383775711,
0.08651990443468094,
-0.1130538359284401,
0.18261615931987762,
-0.023845966905355453,
0.1705113798379898,
0.0026279462035745382,
-0.048057105392217636,
-0.06381417065858841,
-0.09068319201469421,
-0.004364626482129097,
0.024990763515233994,
-0.05018231272697449,
0.08113733679056168,
0.2299632877111435,
-0.271056592464447,
0.0031382020097225904,
-0.2574611306190491,
-0.1419270783662796,
0.012986689805984497,
0.024639351293444633,
-0.0001403729256708175,
0.12280216068029404,
0.02304895780980587,
-0.0015254756435751915,
0.1507057547569275,
-0.09211879223585129,
-0.05239840969443321,
0.14318139851093292,
0.034003060311079025,
-0.14706076681613922,
0.08422061055898666,
0.18461428582668304,
-0.0969570055603981,
0.17729629576206207,
-0.01389731653034687,
-0.14690425992012024,
-0.19155681133270264,
0.10808245837688446,
-0.04371187090873718,
-0.009722434915602207,
0.12218259274959564,
0.08234784007072449,
-0.1241973489522934,
-0.028777990490198135,
-0.07329080998897552,
-0.09289321303367615,
-0.14082057774066925,
-0.15301531553268433,
0.06153015419840813,
-0.2081681340932846,
-0.06991983205080032,
-0.0870833769440651,
0.0620291531085968,
0.07611829042434692,
0.002965955762192607,
0.056086692959070206,
0.03553657606244087,
-0.17222096025943756,
0.005104163661599159,
-0.09850039333105087,
-0.11360019445419312,
0.07200612127780914,
0.08799929916858673,
-0.17428827285766602,
0.14698681235313416,
0.008107563480734825,
0.023741569370031357,
-0.005751143675297499,
0.025917060673236847,
-0.06335371732711792,
-0.06856251507997513,
-0.11306936293840408,
-0.0381443053483963,
0.05913044512271881,
-0.1564732939004898,
0.0947919487953186,
0.023105505853891373,
-0.04525533691048622,
-0.03571455925703049,
0.17679117619991302,
0.00027384384884499013,
0.015532290562987328,
-0.030012764036655426,
0.22773787379264832,
0.034813642501831055,
-0.03612048178911209,
-0.12572038173675537,
0.12642139196395874,
0.003053209977224469,
0.18592903017997742,
0.08694347739219666,
0.08319798111915588,
0.11722218990325928,
-0.13799041509628296,
0.12085293978452682,
0.16797183454036713,
0.1415058970451355,
-0.03099600039422512,
0.1513577401638031,
-0.16693830490112305,
-0.005659616086632013,
0.06863585114479065,
0.12864074110984802,
-0.3102414906024933,
-0.025188874453306198,
-0.004426840227097273,
-0.01102647464722395,
-0.05242578312754631,
-0.021327797323465347,
-0.08762559294700623,
-0.08500310778617859,
0.07130058109760284,
-0.15090371668338776,
-0.045242540538311005,
-0.14482079446315765,
0.2539301812648773,
0.02803155407309532,
-0.025085052475333214,
-0.041888780891895294,
-0.01341967098414898,
0.07794046401977539,
0.1012827455997467,
-0.0983484536409378,
0.0453445203602314,
0.04782260209321976,
0.17557783424854279,
0.1171906515955925,
-0.0019082839135080576,
0.07721391320228577,
-0.15985457599163055,
-0.19637705385684967,
-0.02809331752359867,
-0.06146489083766937,
0.006146775558590889,
0.03993190824985504,
0.060894183814525604,
0.057177964597940445,
0.0759538859128952,
-0.03489316999912262,
-0.05486401543021202,
-0.012364006601274014,
-0.07518983632326126,
0.1503584384918213,
-0.09217697381973267,
0.06419726461172104,
0.09726186841726303,
-0.0990348756313324,
-0.10057233273983002,
-0.06429585814476013,
-0.08818291872739792,
-0.09217503666877747,
0.07678975909948349,
0.025243636220693588,
-0.15918149054050446,
0.0016347100026905537,
-0.00351478043012321,
0.017393501475453377,
-0.07341473549604416,
-0.11445127427577972,
0.09036591649055481,
0.12007921934127808,
0.10723576694726944,
-0.06730032712221146,
-0.04664218798279762,
0.0545056015253067,
0.15112192928791046,
0.00802910141646862,
-0.010327662341296673,
-0.11254365742206573,
-0.13121896982192993,
-0.12528660893440247,
0.08254300802946091,
-0.09057078510522842,
0.18862971663475037,
0.12695105373859406,
-0.026149248704314232,
-0.08217774331569672,
-0.20471841096878052,
0.01862264610826969,
0.111572265625,
0.11128640174865723,
0.007878182455897331,
0.040347691625356674,
-0.02577201835811138,
0.03140859678387642,
0.194550022482872,
-0.08921132236719131,
-0.04157542064785957,
0.008615097962319851,
-0.1280643194913864,
-0.0015074998373165727,
0.011742785573005676,
-0.009068855084478855,
0.026855453848838806,
0.057193998247385025,
-0.04183533415198326,
-0.20402006804943085,
-0.0686940848827362,
-0.0023457035422325134,
-0.05993853881955147,
0.20712485909461975,
0.11449925601482391,
-0.02557004615664482,
0.24885055422782898,
-0.06808644533157349,
0.07311044633388519,
0.030619056895375252,
-0.07338063418865204,
-0.08964797854423523,
0.10359980911016464,
0.22784331440925598,
0.10367664694786072,
0.0700058564543724,
0.313988596200943,
-0.09484674781560898,
0.03304460272192955,
0.20797359943389893,
-0.047241345047950745,
0.07479272782802582,
0.16751547157764435,
0.03711383789777756,
0.09329257905483246,
-0.03750113397836685,
-0.012425287626683712,
0.013396309688687325,
0.02725689299404621,
-0.03838473930954933,
-0.14774756133556366,
-0.22359657287597656,
-0.11668559163808823,
-0.1385643482208252,
0.03796842321753502,
-0.06681615859270096,
0.1114342212677002,
-0.07543490827083588,
0.20431342720985413,
-0.06580323725938797,
-0.2048112004995346,
-0.07133509963750839,
0.08888039737939835,
0.04006681218743324,
-0.0626843050122261,
-0.22221769392490387,
0.26125064492225647,
-0.3184565007686615,
0.04436877369880676,
0.04680759832262993,
0.15438054502010345,
0.024025894701480865,
-0.110161691904068,
-0.1017443835735321,
-0.07427480071783066,
-0.027209170162677765,
0.16356372833251953,
-0.09820796549320221,
0.11092069745063782,
-0.07274264842271805,
0.22745166718959808,
0.027863305062055588,
0.06619478017091751,
-0.2612150013446808,
-0.13755975663661957,
-0.004082313273102045,
0.1160927340388298,
-0.2236958146095276,
0.003916193265467882,
-0.01796646974980831,
-0.002658439101651311,
-0.10471636056900024,
0.13393616676330566,
-0.02276131696999073,
0.22303709387779236,
0.10450025647878647,
0.06371912360191345,
0.09258773177862167,
-0.028192924335598946,
0.09071438759565353,
-0.006222839001566172,
-0.09723657369613647,
0.04311683773994446,
-0.09308591485023499,
0.1148061528801918,
-0.17774011194705963,
0.11312119662761688,
-0.16670672595500946,
-0.017701635137200356,
-0.244477316737175,
-0.016860434785485268,
-0.08331497758626938,
-0.04646272212266922,
-0.018021905794739723,
0.07967151701450348,
-0.04201298952102661,
0.06304586678743362,
0.15409867465496063,
-0.04131899029016495,
0.08522137254476547,
-0.03991417959332466,
-0.0024496852420270443,
0.09623712301254272,
-0.06561324745416641,
0.008088110014796257,
0.1835698038339615,
-0.03017134591937065,
0.12143436819314957,
0.18093331158161163,
-0.12848637998104095,
-0.0026383905205875635,
0.08825214952230453,
0.26718616485595703,
0.12106823176145554,
0.01554547157138586,
0.19249340891838074,
0.12893842160701752,
-0.024227509275078773,
0.06969358772039413,
-0.010592878796160221,
-0.044862136244773865,
0.047441791743040085,
-0.13508914411067963,
0.12712110579013824,
0.21969597041606903,
0.23048318922519684,
-0.03755062073469162,
-0.05332383140921593,
-0.21333488821983337,
-0.1771213263273239,
0.07147794216871262,
0.2536899149417877,
0.16304387152194977,
0.08855956047773361,
-0.09649692475795746,
-2.204669923946734e-32,
-0.16644731163978577,
-0.010145522654056549,
0.12141577154397964,
0.03862049803137779,
-0.36221829056739807,
0.027133021503686905,
-0.10849899798631668,
0.04934152960777283,
-0.23336105048656464,
-0.05380941554903984,
0.006896491162478924,
-0.11364708840847015,
-0.04198506847023964,
0.18627166748046875,
-0.05570725351572037,
-0.1668274998664856,
0.03042011894285679,
-0.024047307670116425,
0.12106861919164658,
0.12191669642925262,
-0.027323251590132713,
-0.007745049428194761,
-0.19193606078624725,
0.009687773883342743,
-0.0831756666302681,
-0.07978250086307526,
-0.19911763072013855,
0.022183939814567566,
0.2613424062728882,
-0.02074858732521534,
-0.15736554563045502,
0.09069369733333588,
-0.001149981515482068,
-0.10972999036312103,
-0.24372214078903198,
-0.10029211640357971,
-0.14281417429447174,
-0.007490909658372402,
-0.027622586116194725,
0.10857362300157547,
0.08082369714975357,
0.05608343705534935,
-0.01422286219894886,
-0.09645896404981613,
-0.02986481785774231,
0.09539642184972763,
0.12284758687019348,
0.07440625131130219,
-0.02797168679535389,
-0.04315265640616417,
0.0016642381669953465,
0.14751768112182617,
-0.2541700601577759,
0.023205716162919998,
0.2809942364692688,
-0.15444178879261017,
-0.025634700432419777,
0.22967104613780975,
0.013428501784801483,
-0.13608843088150024,
0.15226557850837708,
-0.23498164117336273,
0.052410196512937546,
0.06556060165166855,
-0.08476652204990387,
0.033941850066185,
0.23062288761138916,
-0.08780375868082047,
-0.026419393718242645,
0.05319838225841522,
0.22768285870552063,
0.14607709646224976,
-0.0024875435046851635,
-0.05026990547776222,
-0.1727842390537262,
-0.0961073786020279,
-0.016173547133803368,
-0.09310799837112427,
0.12247376888990402,
-0.19181843101978302,
0.09659609198570251,
0.015559431165456772,
-0.00846246536821127,
0.0543937012553215,
-0.048789408057928085,
-0.056903474032878876,
-0.007051737513393164,
-0.13413186371326447,
-0.2059648185968399,
-0.011270548216998577,
0.0970769003033638,
-0.06912393867969513,
-0.06180338189005852,
-0.08494529128074646,
-0.0544402115046978,
0.08167289197444916,
-0.03572879731655121,
0.175789013504982,
0.15623575448989868,
-0.10914421081542969,
-0.16400973498821259,
0.1112244501709938,
-0.09913455694913864,
0.0746745765209198,
0.06863243877887726,
0.07165845483541489,
0.07790174335241318,
-0.0906023234128952,
-0.01741056516766548,
-0.029240967705845833,
-0.017880497500300407,
0.07990900427103043,
0.3165646493434906,
-0.05890681594610214,
0.15234172344207764,
0.10105717927217484,
0.04231514036655426,
0.0882597267627716,
-0.03246382623910904,
0.08529110997915268,
-0.15103189647197723,
0.04679631441831589,
-0.18035095930099487,
-0.055987145751714706,
0.058051787316799164,
-0.029738876968622208,
-0.1212044283747673,
-0.028508003801107407,
0.025324484333395958,
-0.143976092338562,
0.12714196741580963,
-0.09264399856328964,
6.719277507727384e-7,
-0.27026915550231934,
0.14180898666381836,
-0.0951521173119545,
-0.08071841299533844,
-0.09121613949537277,
-0.1619473695755005,
-0.18164734542369843,
0.11363466084003448,
-0.03537430986762047,
0.06970425695180893,
-0.05186022073030472,
0.020906561985611916,
-0.1338304877281189,
0.15265904366970062,
0.014294536784291267,
-0.16059082746505737,
-0.1626957207918167,
0.012714549899101257,
-0.050547197461128235,
0.08448567241430283,
-0.09983974695205688,
0.051788873970508575,
0.06853219866752625,
0.12023615837097168,
0.09811457991600037,
0.1026911810040474,
0.06960910558700562,
-0.06243316829204559,
0.060633108019828796,
0.06411278247833252,
-0.08483869582414627,
0.14212964475154877,
-0.09491533041000366,
0.12395171076059341,
0.23412930965423584,
-0.16048716008663177,
-0.21938683092594147,
-0.12087449431419373,
0.1480541229248047,
-0.00751738715916872,
-0.009781409054994583,
0.07961972057819366,
0.059855759143829346,
-0.13917124271392822,
0.13031764328479767,
0.18710005283355713,
-0.008603083901107311,
0.029911944642663002,
0.1084454283118248,
0.0014537627575919032,
0.12958434224128723,
0.008062874898314476,
0.13735397160053253,
0.08357052505016327,
-0.12047740817070007,
-0.15942344069480896,
0.11922844499349594,
-0.008041984401643276,
0.004635923076421022,
-0.020408211275935173,
0.01419189851731062,
-0.11520979553461075,
0.20750242471694946,
0.15415321290493011,
0.017518529668450356,
0.0033178371377289295,
-0.12161890417337418,
-1.5567144008392778e-34,
0.06140843778848648,
0.05423658713698387,
-0.04071700572967529,
-0.13000300526618958,
0.018018508329987526,
-0.15017345547676086,
0.31121617555618286,
-0.04115672409534454,
-0.08065897971391678,
-0.12522932887077332,
0.10318073630332947
] |
https://github.com/huggingface/datasets/issues/5987 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare | Can you explain your use case for `max_shard_size`?
On some systems, there is a limit to the size of a memory-mapped file, so we could consider exposing this parameter in `load_dataset`. | ### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1 | 31 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
Can you explain your use case for `max_shard_size`?
On some systems, there is a limit to the size of a memory-mapped file, so we could consider exposing this parameter in `load_dataset`. | [
-0.046053916215896606,
0.02338217757642269,
0.04406140372157097,
-0.08092676103115082,
0.07575385272502899,
0.0045662508346140385,
0.21084454655647278,
-0.012545236386358738,
-0.052137039601802826,
0.17486919462680817,
0.13970448076725006,
-0.1008763387799263,
-0.1094851866364479,
0.014350572600960732,
0.02394924685359001,
-0.04223034158349037,
-0.16641780734062195,
-0.02699594758450985,
-0.1147223487496376,
-0.02723100408911705,
-0.07810948044061661,
0.07266584038734436,
0.07957373559474945,
-0.09804918617010117,
-0.02768145315349102,
0.04188648238778114,
-0.08052075654268265,
0.12325394153594971,
-0.0208981204777956,
0.049953434616327286,
0.03311033174395561,
-0.10490608215332031,
-0.05693588778376579,
-0.1383707970380783,
0.000005647157649946166,
0.06917209178209305,
0.12073902040719986,
0.030036062002182007,
-0.06324664503335953,
0.006003569811582565,
0.04228338971734047,
-0.040109023451805115,
-0.012726309709250927,
-0.0180915929377079,
0.10840784758329391,
0.07535557448863983,
-0.11220734566450119,
0.1240951269865036,
0.039040692150592804,
0.047957342118024826,
-0.05329832062125206,
-0.006324180401861668,
0.2145719677209854,
-0.20020481944084167,
-0.022431522607803345,
0.05127310752868652,
0.08058091998100281,
0.12861019372940063,
-0.07467708736658096,
0.06034790724515915,
-0.002984995022416115,
-0.01535376813262701,
0.028896210715174675,
-0.08840335160493851,
0.05386236310005188,
-0.03802258148789406,
-0.13587462902069092,
0.005380416288971901,
0.07934481650590897,
0.10154727101325989,
0.012574651278555393,
-0.0003004570316988975,
0.0531097948551178,
-0.010806863196194172,
-0.11986546963453293,
-0.08139936625957489,
-0.027139291167259216,
-0.025800008326768875,
-0.18931996822357178,
0.07629849761724472,
-0.1903308928012848,
0.006325143855065107,
0.006217640358954668,
0.11249954253435135,
-0.1941433697938919,
-0.07990223914384842,
-0.07939716428518295,
0.06995216757059097,
0.04875703901052475,
-0.14520950615406036,
-0.06850305944681168,
0.17336659133434296,
-0.022945068776607513,
-0.07065916061401367,
-0.06146799027919769,
0.023895353078842163,
-0.03186958655714989,
-0.07715227454900742,
0.21222050487995148,
-0.024260366335511208,
0.04130933806300163,
-0.10441631823778152,
0.09650883823633194,
0.08341000229120255,
0.11794011294841766,
0.03525939956307411,
-0.15289272367954254,
-0.13169248402118683,
-0.056905485689640045,
0.11639828979969025,
0.03789229318499565,
0.1002875342965126,
-0.0588543638586998,
-0.05140160769224167,
0.07332563400268555,
-0.11228205263614655,
0.07876918464899063,
0.05246535688638687,
-0.03400769829750061,
0.09335143119096756,
0.25187447667121887,
0.12180215120315552,
-0.0059026735834777355,
0.007916809991002083,
0.044533491134643555,
-0.03326017037034035,
-0.12930087745189667,
0.03084573894739151,
-0.019862838089466095,
-0.026263847947120667,
0.003158333245664835,
0.06171291321516037,
0.019243275746703148,
-0.10895519703626633,
0.030584370717406273,
-0.08548744022846222,
-0.005530550144612789,
-0.13446848094463348,
0.17660307884216309,
-0.029284048825502396,
-0.031783927232027054,
-0.10825537145137787,
0.04258962348103523,
-0.020917948335409164,
0.1406082957983017,
0.07674461603164673,
-0.11372753977775574,
0.11236148327589035,
0.04502975568175316,
0.2132152020931244,
-0.24359996616840363,
0.007384403608739376,
-0.07628341764211655,
0.013906913809478283,
-0.163901224732399,
-0.025736292824149132,
-0.01683434098958969,
-0.005026946309953928,
-0.12523150444030762,
-0.07612279057502747,
0.043446704745292664,
-0.011152145452797413,
-0.15703390538692474,
-0.07491019368171692,
0.19492703676223755,
0.13195757567882538,
0.07498788088560104,
0.24282068014144897,
-0.03895723074674606,
-0.14119546115398407,
0.08647055178880692,
-0.01797516830265522,
0.04516111686825752,
-0.10067108273506165,
-0.14993323385715485,
0.13143150508403778,
0.0037799652200192213,
0.12675032019615173,
-0.2863287627696991,
0.09982050210237503,
0.16336485743522644,
-0.10149552673101425,
0.15949149429798126,
-0.19686709344387054,
0.08908352255821228,
-0.16853797435760498,
0.02499428763985634,
0.14207330346107483,
-0.008204133249819279,
-0.12656520307064056,
-0.212255597114563,
0.01690121553838253,
-0.09436064213514328,
0.04693642258644104,
-0.00036834110505878925,
0.049221791326999664,
0.020470036193728447,
0.055815745145082474,
0.1484110951423645,
-0.07262943685054779,
0.17681866884231567,
0.027273545041680336,
-0.17438271641731262,
0.06475938856601715,
0.15231792628765106,
-0.10505428910255432,
-0.14209061861038208,
0.0425325371325016,
-0.0712006539106369,
-0.14569175243377686,
-0.05291164293885231,
0.13286755979061127,
-0.15132002532482147,
-0.06416216492652893,
-0.04032164812088013,
0.07667931169271469,
-0.07236392796039581,
-0.07493803650140762,
0.03987320885062218,
0.17279869318008423,
0.021678796038031578,
-0.01568956859409809,
-0.12271863222122192,
-0.040671441704034805,
-0.04726248234510422,
-0.024780744686722755,
-0.10098970681428909,
-0.1548156589269638,
0.015645436942577362,
-0.0341758206486702,
-0.1867719292640686,
-0.11257896572351456,
0.10121431946754456,
0.13934263586997986,
-0.07765139639377594,
-0.014392651617527008,
-0.13000456988811493,
-0.0049005174078047276,
-0.10074494779109955,
-0.03546646982431412,
-0.007603991311043501,
0.003097864333540201,
0.012956617400050163,
0.0035692586097866297,
0.05346766486763954,
-0.004610699601471424,
-0.0520821213722229,
0.05083944648504257,
-0.0678156316280365,
-0.1095665842294693,
0.08774250000715256,
0.16577626764774323,
0.09851706027984619,
-0.1731705218553543,
0.027529042214155197,
0.09067700803279877,
0.12604813277721405,
0.12098290771245956,
0.1583905667066574,
-0.09319280833005905,
0.34358590841293335,
-0.003108104458078742,
0.023438815027475357,
0.2111274152994156,
-0.05034381151199341,
-0.10560030490159988,
-0.042426541447639465,
0.08144206553697586,
0.137199267745018,
-0.031901296228170395,
0.16704997420310974,
-0.10609985142946243,
0.010766580700874329,
-0.009469462558627129,
-0.008447490632534027,
-0.11631036549806595,
0.07650040090084076,
-0.10282383114099503,
0.022902069613337517,
-0.008450271561741829,
0.027555635198950768,
0.1315644532442093,
0.16599945724010468,
-0.031592756509780884,
0.09024664759635925,
-0.01752655953168869,
-0.02457837574183941,
0.04424792528152466,
-0.07844334840774536,
0.1751788705587387,
-0.03543945401906967,
-0.05895663797855377,
-0.13295455276966095,
-0.14313460886478424,
0.12841525673866272,
-0.2109101563692093,
0.13444846868515015,
-0.05049499496817589,
0.06642132252454758,
0.1290452480316162,
-0.19512487947940826,
0.10060536116361618,
0.09719899296760559,
0.008223461918532848,
0.06837751716375351,
-0.0011703758500516415,
0.03596093878149986,
0.1827712208032608,
-0.09948109835386276,
-0.007802773267030716,
0.01084840763360262,
0.02131231501698494,
-0.0045017884112894535,
0.142717182636261,
0.1962774097919464,
-0.052858617156744,
-0.08302808552980423,
0.07779531925916672,
-0.0067816670052707195,
-0.06170112267136574,
-0.10993222892284393,
0.03549233451485634,
0.029513508081436157,
0.22711588442325592,
-0.06022465229034424,
0.15855291485786438,
-0.13623452186584473,
-0.24186599254608154,
-0.08343527466058731,
0.19123739004135132,
0.005979279056191444,
0.014915475621819496,
0.019218232482671738,
0.11796440184116364,
0.0006551243714056909,
-0.010420119389891624,
-0.10823839157819748,
-0.2677055895328522,
0.123511403799057,
-0.08578187227249146,
0.005834439303725958,
-0.07782814651727676,
-0.027744857594370842,
0.09853539615869522,
0.23289701342582703,
-0.19468826055526733,
0.01621599867939949,
-0.1772163361310959,
-0.006136796902865171,
0.10757436603307724,
0.08462895452976227,
0.07278630137443542,
-0.09091009944677353,
-0.11135904490947723,
-0.06646748632192612,
-0.06388974189758301,
-0.11523562669754028,
-0.08151109516620636,
-0.07879391312599182,
0.10975296050310135,
0.07930872589349747,
0.1432839334011078,
0.22233112156391144,
-0.041410863399505615,
-0.011877011507749557,
0.09035788476467133,
0.2263428419828415,
0.15529993176460266,
-0.0673927292227745,
-0.09055514633655548,
0.1341201215982437,
0.08602046966552734,
0.08632252365350723,
-0.0637034997344017,
-0.03922184929251671,
0.011508237570524216,
0.05109843239188194,
-0.219638392329216,
0.11216172575950623,
0.024870172142982483,
0.08747658133506775,
-0.09356506168842316,
0.004176904913038015,
-0.06598126143217087,
-0.03665534406900406,
-0.01335064321756363,
-0.0488763228058815,
-0.09440978616476059,
-0.0111533859744668,
0.22120213508605957,
0.1650407314300537,
0.060209620743989944,
0.20084354281425476,
0.031204985454678535,
0.019272373989224434,
0.02385633997619152,
0.0782933309674263,
0.008011079393327236,
-0.03265916556119919,
-0.018151983618736267,
0.1567571610212326,
0.1004476323723793,
-0.15011391043663025,
0.14279982447624207,
0.011991978622972965,
-0.06556160748004913,
-0.020269758999347687,
-0.09226395934820175,
0.19051924347877502,
0.021276118233799934,
0.010611769743263721,
0.038739994168281555,
-0.008563997223973274,
-0.010375123471021652,
0.1287214159965515,
0.014480743557214737,
0.0026918069925159216,
-0.046392686665058136,
-0.0978863313794136,
0.024838414043188095,
-0.190225750207901,
-0.1001671850681305,
0.1523304134607315,
0.09119109809398651,
-0.0860845297574997,
0.07769843190908432,
-0.08634036779403687,
0.027863718569278717,
0.08557714521884918,
0.0020706120412796736,
0.07617006450891495,
0.05227125436067581,
0.14287327229976654,
-0.08600006252527237,
0.10210387408733368,
-0.07482133060693741,
0.21624913811683655,
-0.013918141834437847,
-0.04080430045723915,
0.10911543667316437,
-0.09283767640590668,
0.09312279522418976,
-0.03593786433339119,
-0.12047166377305984,
-0.03846558555960655,
-0.008543943986296654,
-0.05599528178572655,
0.05788065493106842,
0.017587870359420776,
0.06258855015039444,
-0.13690748810768127,
-0.1495281457901001,
-0.1531817764043808,
0.00672632921487093,
-0.010962901636958122,
0.10658445954322815,
0.014018513262271881,
0.08832430839538574,
0.06871120631694794,
-0.05507039651274681,
-0.10892215371131897,
-0.021021630614995956,
-0.029048843309283257,
0.06198945268988609,
-0.07191114872694016,
0.06152050197124481,
0.09560059010982513,
0.014618240296840668,
-0.08598747849464417,
0.06206449121236801,
-0.1027371734380722,
0.16300047934055328,
-0.06923799961805344,
-0.014933338388800621,
0.09938903898000717,
-0.04239387810230255,
-0.05600803345441818,
-0.04302788898348808,
0.11148446053266525,
-0.0008104204316623509,
0.1905754804611206,
-0.16453023254871368,
0.0640675351023674,
-0.03190408647060394,
0.016526304185390472,
0.2696339786052704,
-0.2021089494228363,
-0.05811425670981407,
-0.11005248874425888,
-0.018872076645493507,
0.02613549493253231,
0.03231491148471832,
-0.1779678612947464,
0.14913176000118256,
0.12149310857057571,
-0.12987679243087769,
-0.016871927306056023,
0.1689540296792984,
-0.002760671777650714,
-0.1628285050392151,
0.2298571914434433,
-0.07630039006471634,
0.03801872208714485,
-0.13877318799495697,
-0.1441035121679306,
-0.04951341077685356,
0.07646168023347855,
-0.010192298330366611,
-0.05342978611588478,
-0.12893147766590118,
0.10439388453960419,
0.1443129926919937,
-0.10709560662508011,
-0.07505253702402115,
0.036132682114839554,
-0.03281185030937195,
-0.17980344593524933,
-0.04479832574725151,
0.06670105457305908,
-0.017697131261229515,
0.08927667140960693,
-0.032493263483047485,
0.08057470619678497,
0.050131913274526596,
-0.07392533868551254,
-0.07606476545333862,
-0.0360143668949604,
-0.06808500736951828,
0.0701129361987114,
-0.0653618797659874,
0.13022582232952118,
-0.026250004768371582,
0.12416446954011917,
0.1178249642252922,
0.002501359675079584,
0.04322635009884834,
0.0494566485285759,
-0.1772584617137909,
0.08664391934871674,
0.03944255784153938,
-0.005188255570828915,
-0.191461980342865,
-0.225608229637146,
0.1357530802488327,
0.03336232155561447,
0.092320516705513,
-0.13403376936912537,
-0.03190169855952263,
-0.05300924554467201,
-0.19903112947940826,
-0.07558920979499817,
0.08078095316886902,
-0.06367805600166321,
0.010478719137609005,
0.16525839269161224,
-2.506971218400526e-32,
0.037974946200847626,
0.16039204597473145,
-0.030689658597111702,
-0.05355486646294594,
-0.19547727704048157,
0.021358201280236244,
-0.014642222784459591,
-0.2316422313451767,
0.06042282283306122,
-0.11934828013181686,
-0.21789991855621338,
-0.03196602314710617,
0.02857261337339878,
0.004240322392433882,
-0.045034658163785934,
-0.10397490113973618,
-0.12868498265743256,
0.0247120950371027,
-0.05843140184879303,
0.028592757880687714,
0.05740436539053917,
-0.15970072150230408,
-0.055944256484508514,
0.1915934979915619,
-0.03321591764688492,
-0.10346934199333191,
-0.165385901927948,
0.10124337673187256,
-0.006062043830752373,
-0.06884081661701202,
0.04733807221055031,
0.10487665235996246,
-0.0374433696269989,
-0.08425761759281158,
-0.022861961275339127,
-0.09365304559469223,
-0.2384549379348755,
-0.05245118588209152,
0.04240523278713226,
0.091826893389225,
-0.09547194093465805,
0.006760426331311464,
-0.06533375382423401,
-0.10475792735815048,
-0.020366517826914787,
0.07005560398101807,
0.012473191134631634,
0.04124879837036133,
0.013447283767163754,
-0.058273814618587494,
0.15879784524440765,
0.10063900798559189,
0.0038015320897102356,
0.19623734056949615,
0.007774896454066038,
-0.0069040521048009396,
0.09656527638435364,
0.023914538323879242,
-0.11429030448198318,
-0.06902631372213364,
0.1311514973640442,
-0.057005006819963455,
0.0383484922349453,
0.016024798154830933,
0.0777551531791687,
-0.04673266410827637,
0.20119693875312805,
-0.023625141009688377,
0.09159465879201889,
-0.13822950422763824,
-0.06835473328828812,
0.10271450877189636,
-0.029176507145166397,
-0.041379544883966446,
0.020605729892849922,
-0.170558363199234,
0.043917980045080185,
-0.06142009049654007,
0.18811620771884918,
-0.05377936735749245,
0.11906403303146362,
-0.07081472128629684,
-0.10277245193719864,
-0.08586543053388596,
-0.05521272495388985,
0.09215253591537476,
-0.04411746934056282,
-0.027325201779603958,
0.04495604336261749,
0.0879775881767273,
0.04775469750165939,
0.23435719311237335,
-0.19596107304096222,
0.007727465126663446,
-0.05212772637605667,
0.09865371137857437,
-0.06884584575891495,
0.023640906438231468,
-0.0985853374004364,
-0.005934439599514008,
-0.01122963521629572,
-0.019148720428347588,
0.15886661410331726,
-0.0717177763581276,
0.1297571063041687,
-0.03208142891526222,
0.15174630284309387,
0.1363924890756607,
-0.16886404156684875,
-0.03036624938249588,
-0.16926445066928864,
0.029365763068199158,
0.13759773969650269,
0.022899748757481575,
0.080063097178936,
0.05093921348452568,
-0.12836475670337677,
-0.2265552282333374,
0.19757485389709473,
0.2850273549556732,
-0.10966665297746658,
-0.10580626130104065,
-0.17366419732570648,
-0.004871547222137451,
0.1381620466709137,
0.09851877391338348,
-0.19247063994407654,
-0.041622571647167206,
0.05754832923412323,
-0.027094878256320953,
-0.02512594684958458,
-0.024121325463056564,
8.029631430872541e-7,
-0.1019565612077713,
0.18554294109344482,
-0.056233592331409454,
-0.01592175103724003,
-0.14079846441745758,
0.01386927254498005,
-0.0901654064655304,
0.31517255306243896,
-0.088841013610363,
0.11918078362941742,
-0.01790931634604931,
0.11663618683815002,
-0.008925617672502995,
-0.025805477052927017,
-0.07945480197668076,
-0.060599103569984436,
-0.08168590813875198,
-0.1081642135977745,
0.020050790160894394,
-0.050829995423555374,
0.04411029815673828,
0.06209151819348335,
-0.08602779358625412,
-0.03544704243540764,
0.06781921535730362,
-0.08647195994853973,
0.07182531803846359,
-0.1531371921300888,
0.08661452680826187,
-0.021948767825961113,
0.03055785596370697,
-0.0812327116727829,
-0.1000085175037384,
0.12942060828208923,
-0.05988462269306183,
0.08944781869649887,
-0.30625879764556885,
0.06561385095119476,
0.01678004302084446,
0.057428549975156784,
-0.023892277851700783,
-0.1895943582057953,
0.017120899632573128,
-0.03664347901940346,
0.16807273030281067,
0.16975128650665283,
-0.18366795778274536,
0.085297591984272,
0.14825750887393951,
-0.05556313320994377,
0.07467520982027054,
0.05681106448173523,
0.10323385149240494,
0.21965014934539795,
-0.0962669849395752,
-0.1261967569589615,
0.13148356974124908,
-0.19844815135002136,
0.09728299081325531,
0.009977024979889393,
-0.022168761119246483,
0.08526495099067688,
-0.0850718766450882,
0.05650058388710022,
-0.018477801233530045,
-0.11580273509025574,
0.004796958994120359,
1.267653222721125e-34,
-0.01376697700470686,
0.0032969880849123,
0.06833630800247192,
-0.24533595144748688,
0.1045883372426033,
-0.06883622705936432,
0.12936341762542725,
0.12067349255084991,
-0.06652646511793137,
-0.23305821418762207,
-0.13412657380104065
] |
https://github.com/huggingface/datasets/issues/5987 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare | In my use case, users may choose a proper size to balance the cost and benefit of using large shard size. (On azure blob or hdfs which may automatically download the shard from background) | ### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1 | 34 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
In my use case, users may choose a proper size to balance the cost and benefit of using large shard size. (On azure blob or hdfs which may automatically download the shard from background) | [
-0.061314359307289124,
-0.00936344638466835,
0.0539926216006279,
-0.10819295048713684,
0.10019760578870773,
-0.04066597297787666,
0.22245223820209503,
-0.007456796709448099,
-0.07871649414300919,
0.17927837371826172,
0.10803644359111786,
-0.11246243119239807,
-0.1053365021944046,
0.047145575284957886,
-0.008961685933172703,
-0.05343006178736687,
-0.1989956498146057,
-0.02963191457092762,
-0.06996941566467285,
-0.04697193205356598,
-0.09564375877380371,
0.13210251927375793,
0.04339483752846718,
-0.12211037427186966,
-0.033160313963890076,
0.05844408646225929,
-0.07467725872993469,
0.1420571208000183,
-0.01411608699709177,
0.06366929411888123,
0.05613866448402405,
-0.10107796639204025,
-0.04099438339471817,
-0.0804639384150505,
0.0000056083049457811285,
0.02018885500729084,
0.10159575939178467,
0.03011023998260498,
-0.09040005505084991,
-0.022512782365083694,
0.08664530515670776,
-0.05460900440812111,
-0.020367562770843506,
-0.03297882899641991,
0.1090155839920044,
0.0833427757024765,
-0.14837120473384857,
0.12751497328281403,
0.017599595710635185,
0.0331217423081398,
-0.042886607348918915,
0.004351739771664143,
0.21684978902339935,
-0.1814003437757492,
-0.02492687664926052,
0.05186516419053078,
0.07637616246938705,
0.1179494708776474,
-0.012149494141340256,
0.07200741022825241,
0.0027677142061293125,
0.0016741304425522685,
0.04355587810277939,
-0.06435384601354599,
0.06840831786394119,
-0.04152056202292442,
-0.13133442401885986,
0.006707224529236555,
0.060107432305812836,
0.13610626757144928,
-0.0015988369705155492,
0.03977509215474129,
0.032691337168216705,
-0.052225444465875626,
-0.14606352150440216,
-0.11684457957744598,
-0.027375798672437668,
-0.004464332479983568,
-0.22696056962013245,
0.058285389095544815,
-0.19530557096004486,
0.0012514520203694701,
0.007958846166729927,
0.16198524832725525,
-0.18628178536891937,
-0.05590645596385002,
-0.08448071032762527,
0.055485133081674576,
0.09062113612890244,
-0.14952316880226135,
-0.036732856184244156,
0.17244987189769745,
-0.03832559287548065,
-0.08422061055898666,
-0.09064968675374985,
0.005431471858173609,
0.009135879576206207,
-0.05531247705221176,
0.2036573439836502,
-0.01180452760308981,
0.0395531989634037,
-0.12514960765838623,
0.08031623065471649,
0.08152348548173904,
0.10579775273799896,
0.07097580283880234,
-0.134773388504982,
-0.14456582069396973,
-0.029489412903785706,
0.13207441568374634,
0.06872375309467316,
0.11755426228046417,
-0.06008109822869301,
-0.09807083755731583,
0.04363134875893593,
-0.12533076107501984,
0.0713774710893631,
0.04412594437599182,
-0.023075969889760017,
0.12193630635738373,
0.2514904737472534,
0.137905091047287,
-0.026391278952360153,
-0.00005654757478623651,
0.030904289335012436,
-0.05014851316809654,
-0.1034030169248581,
0.04718974977731705,
-0.04758615419268608,
-0.04626796767115593,
0.029060184955596924,
0.08187536895275116,
0.017439156770706177,
-0.10135838389396667,
0.0331181101500988,
-0.1401936113834381,
0.012800589203834534,
-0.13816027343273163,
0.2407587319612503,
-0.04536805674433708,
-0.02720484882593155,
-0.08763740211725235,
0.018398433923721313,
-0.03403060510754585,
0.13849905133247375,
0.042745936661958694,
-0.07459782809019089,
0.08590419590473175,
0.04312051832675934,
0.16832412779331207,
-0.21581025421619415,
0.007927182130515575,
-0.1562323123216629,
0.014540040865540504,
-0.15647655725479126,
-0.03278936818242073,
-0.03653571009635925,
0.007429052144289017,
-0.12308020144701004,
-0.09182167053222656,
0.058522649109363556,
0.014477183111011982,
-0.13863606750965118,
-0.059963539242744446,
0.18571726977825165,
0.11983907222747803,
0.07868573069572449,
0.21633632481098175,
-0.07496457546949387,
-0.09043727070093155,
0.09483205527067184,
-0.04794147238135338,
0.042796481400728226,
-0.0930868461728096,
-0.13336555659770966,
0.12530231475830078,
-0.04842018708586693,
0.13874496519565582,
-0.2621641457080841,
0.11263567954301834,
0.14494188129901886,
-0.12350313365459442,
0.15429063141345978,
-0.22477231919765472,
0.08873182535171509,
-0.1419583261013031,
0.07031772285699844,
0.09249966591596603,
0.010925066657364368,
-0.13627272844314575,
-0.1886720508337021,
-0.005245733540505171,
-0.1585962325334549,
0.04084598645567894,
0.01869078166782856,
0.03246714919805527,
0.002509346464648843,
0.027887193486094475,
0.14121241867542267,
-0.11142260581254959,
0.18031755089759827,
0.06652957946062088,
-0.15170203149318695,
0.0484558641910553,
0.1585298627614975,
-0.11801815778017044,
-0.18974915146827698,
0.08100865036249161,
-0.09087403863668442,
-0.14989954233169556,
-0.06928712129592896,
0.12141765654087067,
-0.12010473757982254,
-0.07659339159727097,
-0.07291591912508011,
0.09781424701213837,
-0.06864199042320251,
-0.1077161356806755,
0.05978742614388466,
0.11219067871570587,
0.023309066891670227,
0.018659507855772972,
-0.0917968824505806,
-0.02499859780073166,
-0.034488797187805176,
0.03857741504907608,
-0.07430906593799591,
-0.17896661162376404,
0.040525153279304504,
-0.017573919147253036,
-0.2018769383430481,
-0.13149957358837128,
0.08448704332113266,
0.13930034637451172,
-0.12383054196834564,
-0.02018565498292446,
-0.12888793647289276,
-0.02452068403363228,
-0.06002826988697052,
0.004153606481850147,
0.012921650893986225,
0.00007245768938446417,
0.0037761384155601263,
0.02486458234488964,
0.04232810065150261,
0.003235528478398919,
-0.11303883790969849,
0.09449297189712524,
-0.05217940732836723,
-0.06628236919641495,
0.08812819421291351,
0.16301926970481873,
0.10754694044589996,
-0.1532731056213379,
0.07530584931373596,
0.020343316718935966,
0.10623154044151306,
0.09458814561367035,
0.14296512305736542,
-0.06717422604560852,
0.317915678024292,
-0.010868215933442116,
0.03893004357814789,
0.21171803772449493,
-0.030631477013230324,
-0.11737195402383804,
0.024651147425174713,
0.06380800157785416,
0.14430569112300873,
-0.03558582812547684,
0.1534859538078308,
-0.09922526776790619,
0.018497062847018242,
-0.02706790901720524,
-0.010677480138838291,
-0.10392241179943085,
0.05353808403015137,
-0.11095263808965683,
0.03061889111995697,
-0.05655622109770775,
0.015813635662198067,
0.11091607809066772,
0.1899535208940506,
-0.0593411847949028,
0.0765065997838974,
-0.015423032455146313,
-0.005216189660131931,
0.07279627025127411,
-0.05362968519330025,
0.13737526535987854,
-0.065499447286129,
-0.07978016138076782,
-0.12425381690263748,
-0.12474247813224792,
0.13936667144298553,
-0.21371325850486755,
0.12568387389183044,
-0.027432773262262344,
0.09222698956727982,
0.10471783578395844,
-0.1669018566608429,
0.14999628067016602,
0.060004375874996185,
-0.02767942287027836,
0.046081945300102234,
0.0029039415530860424,
0.04549364000558853,
0.20731773972511292,
-0.08722077310085297,
-0.05221078544855118,
-0.02290283516049385,
0.052027031779289246,
-0.00945171620696783,
0.07507100701332092,
0.1951717585325241,
-0.11153904348611832,
-0.09743879735469818,
0.09302148222923279,
-0.014108922332525253,
-0.01639164797961712,
-0.06477230787277222,
0.06893880665302277,
-0.0037772832438349724,
0.23287217319011688,
-0.06991998106241226,
0.15289996564388275,
-0.14971470832824707,
-0.2299737185239792,
-0.10018246620893478,
0.2069091945886612,
0.04243258386850357,
-0.0205020010471344,
0.010857653804123402,
0.0409434549510479,
0.0199140515178442,
-0.03706032782793045,
-0.10621535778045654,
-0.2842259705066681,
0.14031368494033813,
-0.10821700096130371,
0.025793785229325294,
-0.11243745684623718,
-0.01828598976135254,
0.0976194441318512,
0.18496018648147583,
-0.18014878034591675,
-0.0517188236117363,
-0.20649543404579163,
0.030941709876060486,
0.05149996280670166,
0.057678453624248505,
0.04581008478999138,
-0.12142129987478256,
-0.0943879559636116,
-0.0897773802280426,
-0.034368108958005905,
-0.067999929189682,
-0.03606344386935234,
-0.053940657526254654,
0.048318810760974884,
0.10458416491746902,
0.15815140306949615,
0.1986369788646698,
-0.04892438277602196,
-0.05267462506890297,
0.10355453193187714,
0.21996329724788666,
0.13461007177829742,
-0.07699660956859589,
-0.06876355409622192,
0.1479831337928772,
0.09250902384519577,
0.06737011671066284,
-0.051656827330589294,
-0.0351397730410099,
0.03276439756155014,
0.05912312492728233,
-0.18659400939941406,
0.12480992823839188,
0.018369892612099648,
0.07412673532962799,
-0.12455559521913528,
0.02310444600880146,
-0.06154150515794754,
-0.017904730513691902,
-0.036897145211696625,
-0.039515767246484756,
-0.12378136813640594,
-0.020677631720900536,
0.19584785401821136,
0.17179253697395325,
0.09210020303726196,
0.2252628058195114,
0.008130880072712898,
0.027516979724168777,
-0.026400072500109673,
0.05619749054312706,
0.019017284736037254,
0.005631359294056892,
0.0007954062893986702,
0.13499687612056732,
0.13823498785495758,
-0.152387335896492,
0.1556989699602127,
-0.012781327590346336,
-0.09307161718606949,
-0.042954880744218826,
-0.12567679584026337,
0.1951945573091507,
0.01177664753049612,
0.0517670214176178,
0.040517985820770264,
-0.018374057486653328,
0.002663831692188978,
0.1546211540699005,
-0.02046297676861286,
0.007953519932925701,
-0.06492886692285538,
-0.07428596168756485,
-0.010379201732575893,
-0.19965966045856476,
-0.10493801534175873,
0.12980496883392334,
0.14995670318603516,
-0.0730159655213356,
0.06758769601583481,
-0.0448533296585083,
0.012774821370840073,
0.08069726824760437,
-0.039819203317165375,
0.045341912657022476,
0.03175478056073189,
0.15038616955280304,
-0.07883477956056595,
0.09658106416463852,
-0.07597212493419647,
0.2332242727279663,
-0.009133712388575077,
-0.02517523244023323,
0.11288658529520035,
-0.09335040301084518,
0.11646365374326706,
-0.04316272586584091,
-0.18708832561969757,
-0.0009841228602454066,
-0.050387222319841385,
-0.024651212617754936,
0.08058544248342514,
0.03592396527528763,
0.05116583779454231,
-0.12520457804203033,
-0.12539663910865784,
-0.10657592862844467,
0.034859370440244675,
-0.026297589763998985,
0.11697500199079514,
0.026282917708158493,
0.11440099775791168,
0.11200086772441864,
-0.04877690598368645,
-0.09204550087451935,
-0.03566664084792137,
-0.0005126657197251916,
0.05191344767808914,
-0.07346409559249878,
0.09687107056379318,
0.1374317705631256,
0.02040555141866207,
-0.09046066552400589,
0.07332426309585571,
-0.11926200985908508,
0.14177341759204865,
-0.05422288551926613,
-0.023148268461227417,
0.11163050681352615,
-0.0349687784910202,
-0.004760961048305035,
-0.07509572058916092,
0.1245017796754837,
0.011627507396042347,
0.18354733288288116,
-0.2131047248840332,
0.028406517580151558,
-0.045985832810401917,
0.0038599639665335417,
0.24497996270656586,
-0.1414242833852768,
-0.058954812586307526,
-0.07151450216770172,
0.0074033308774232864,
-0.003231683513149619,
0.05461488664150238,
-0.1494704931974411,
0.1728193163871765,
0.11363913863897324,
-0.11603932827711105,
-0.005374835338443518,
0.15438400208950043,
0.006898214109241962,
-0.10337912291288376,
0.22729836404323578,
-0.11059385538101196,
0.025841085240244865,
-0.15614309906959534,
-0.1459839940071106,
-0.03109692595899105,
0.0783936157822609,
-0.006720204371958971,
-0.05853259190917015,
-0.13283324241638184,
0.07036995142698288,
0.17197836935520172,
-0.09397653490304947,
-0.07729003578424454,
0.02342122234404087,
-0.0663500651717186,
-0.1866372972726822,
-0.03471268340945244,
0.07886415719985962,
-0.010109861381351948,
0.06371857225894928,
-0.0514451302587986,
0.09425792843103409,
0.0197749026119709,
-0.08695517480373383,
-0.049584392458200455,
-0.03274938836693764,
-0.05076146870851517,
0.1290999948978424,
-0.07883632183074951,
0.12195798754692078,
0.01036906149238348,
0.15100152790546417,
0.11423664540052414,
-0.029385942965745926,
0.015605856664478779,
-0.008824792690575123,
-0.16269168257713318,
0.07318484783172607,
-0.0058983089402318,
0.00618467153981328,
-0.17146340012550354,
-0.2114212065935135,
0.0905679315328598,
0.033961981534957886,
0.06901862472295761,
-0.12203757464885712,
-0.04723623767495155,
-0.10248665511608124,
-0.20366990566253662,
-0.07341766357421875,
0.05794635787606239,
-0.05245404690504074,
0.01049058884382248,
0.18318411707878113,
-2.5197256259805357e-32,
0.028740989044308662,
0.14440754055976868,
-0.0394488126039505,
-0.12016604095697403,
-0.19388267397880554,
0.04874543100595474,
-0.014577480964362621,
-0.231057271361351,
0.08198003470897675,
-0.14253263175487518,
-0.20741117000579834,
-0.047614581882953644,
0.03708448261022568,
-0.007069336250424385,
-0.003251671092584729,
-0.08938706666231155,
-0.11189015209674835,
-0.0016134774778038263,
-0.08905680477619171,
0.06995730102062225,
0.07744887471199036,
-0.1617286056280136,
-0.10064800083637238,
0.18675866723060608,
-0.05387110635638237,
-0.05409635975956917,
-0.19628770649433136,
0.11791602522134781,
-0.011124751530587673,
-0.02946106716990471,
0.03739212453365326,
0.12304392457008362,
-0.03278878703713417,
-0.07119240611791611,
-0.034744974225759506,
-0.09032031148672104,
-0.20452338457107544,
-0.06780621409416199,
-0.022715436294674873,
0.09275378286838531,
-0.12823890149593353,
0.0029973560012876987,
-0.0857943594455719,
-0.10262307524681091,
-0.04976385831832886,
0.061401695013046265,
0.03892984241247177,
0.05238157510757446,
0.021457690745592117,
-0.1068633645772934,
0.1673625409603119,
0.11399892717599869,
0.004931532312184572,
0.190986767411232,
-0.00333533831872046,
-0.07574952393770218,
0.09613832086324692,
0.03961407020688057,
-0.07904451340436935,
-0.03891359642148018,
0.15708695352077484,
-0.09596117585897446,
0.012291857041418552,
0.023340987041592598,
0.056924883276224136,
-0.04323376342654228,
0.17151011526584625,
-0.006103394087404013,
0.11616729944944382,
-0.1497381329536438,
-0.03859863430261612,
0.12525172531604767,
-0.019114242866635323,
-0.07589109241962433,
0.021030619740486145,
-0.08937036991119385,
0.04896850138902664,
-0.09752827137708664,
0.16590146720409393,
-0.05692518875002861,
0.14454014599323273,
-0.10485349595546722,
-0.08093426376581192,
-0.06145031005144119,
-0.053346455097198486,
0.07045599818229675,
-0.022067081183195114,
-0.03728703036904335,
0.029731672257184982,
0.057836730033159256,
0.06235725060105324,
0.19796894490718842,
-0.2131481170654297,
0.01286705769598484,
-0.06007729843258858,
0.10035970062017441,
-0.06645036488771439,
0.03725460544228554,
-0.06942451745271683,
0.027249852195382118,
0.00167580577544868,
0.005220082122832537,
0.16780337691307068,
-0.0847133919596672,
0.09915613383054733,
0.008624223060905933,
0.15403077006340027,
0.09883581101894379,
-0.16972383856773376,
-0.010915180668234825,
-0.1553897112607956,
0.004488316830247641,
0.15340721607208252,
0.07365996390581131,
0.11643669754266739,
0.035943541675806046,
-0.11974240094423294,
-0.1966659128665924,
0.2011006474494934,
0.23186029493808746,
-0.08078254759311676,
-0.01924724504351616,
-0.16910235583782196,
0.02425188384950161,
0.13529911637306213,
0.08201958239078522,
-0.17336392402648926,
-0.07568562030792236,
0.07373087108135223,
-0.011064199730753899,
-0.020585881546139717,
-0.021477825939655304,
8.035581231524702e-7,
-0.12873326241970062,
0.17447008192539215,
-0.07375898957252502,
-0.04077891260385513,
-0.15967130661010742,
0.0006439550197683275,
-0.07851888984441757,
0.30896368622779846,
-0.12309250980615616,
0.14316771924495697,
0.013120137155056,
0.12652269005775452,
-0.014702274464070797,
-0.04561896622180939,
-0.04965296387672424,
-0.04249490797519684,
-0.06410729885101318,
-0.07052571326494217,
-0.008072818629443645,
-0.057699136435985565,
0.032120220363140106,
0.049594052135944366,
-0.07607250660657883,
-0.046920228749513626,
0.06488484889268875,
-0.09690795093774796,
0.06849901378154755,
-0.1491052657365799,
0.11387522518634796,
-0.0028347482439130545,
-0.0068389312364161015,
-0.08998419344425201,
-0.11269475519657135,
0.13819819688796997,
-0.03400059789419174,
0.13868555426597595,
-0.30924999713897705,
0.056313078850507736,
-0.016039598733186722,
0.05979805439710617,
-0.041789066046476364,
-0.13077254593372345,
0.03040161356329918,
-0.021919602528214455,
0.1414848268032074,
0.20226427912712097,
-0.18672680854797363,
0.0940127745270729,
0.14640408754348755,
-0.05967765673995018,
0.054228782653808594,
0.054687198251485825,
0.1156386062502861,
0.24054698646068573,
-0.08808557689189911,
-0.09949076920747757,
0.13107436895370483,
-0.1716759204864502,
0.13919715583324432,
-0.003737892024219036,
-0.008759956806898117,
0.0739162340760231,
-0.07641030848026276,
0.09954820573329926,
-0.0724230483174324,
-0.09148884564638138,
0.013515704311430454,
1.4337758292537577e-34,
0.02397037483751774,
0.011237416416406631,
0.082644522190094,
-0.19647663831710815,
0.09355223178863525,
-0.06768876314163208,
0.12102453410625458,
0.13427820801734924,
-0.023867446929216385,
-0.2423621118068695,
-0.12308251857757568
] |
https://github.com/huggingface/datasets/issues/5987 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare | But `load_dataset` doesn't support caching (and reading) Arrow datasets from remote storage.
`load_datset_builder` + `download_and_prepare` is not equal to `load_dataset`. The latter has one more step, `builder.as_dataset`, that memory-maps Arrow files, which only works for local files. | ### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1 | 37 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
But `load_dataset` doesn't support caching (and reading) Arrow datasets from remote storage.
`load_datset_builder` + `download_and_prepare` is not equal to `load_dataset`. The latter has one more step, `builder.as_dataset`, that memory-maps Arrow files, which only works for local files. | [
-0.07037965208292007,
0.05096133425831795,
0.005731894634664059,
-0.06808195263147354,
0.08546077460050583,
0.012824906036257744,
0.21694917976856232,
0.018904399126768112,
-0.03706159070134163,
0.15416714549064636,
0.11298491060733795,
-0.05566689744591713,
-0.09208168089389801,
-0.015414560213685036,
0.030989279970526695,
-0.003287268104031682,
-0.15538591146469116,
-0.03308144211769104,
-0.11416999250650406,
-0.04923314228653908,
-0.07553598284721375,
0.12690527737140656,
0.0715915635228157,
-0.09338591992855072,
-0.013269620947539806,
0.06737750768661499,
-0.0392339825630188,
0.13541279733181,
-0.03197279945015907,
-0.016887810081243515,
0.0727735161781311,
-0.0891667827963829,
-0.09106487780809402,
-0.08246538788080215,
0.000005830328518641181,
0.038183461874723434,
0.14976075291633606,
0.059666093438863754,
-0.11285950243473053,
-0.052803169935941696,
0.053359851241111755,
-0.05043748393654823,
0.018497109413146973,
0.005917568691074848,
0.10178341716527939,
-0.030857017263770103,
-0.12663137912750244,
0.08227260410785675,
0.061083488166332245,
0.04512501507997513,
-0.05767349526286125,
-0.03427737578749657,
0.177351713180542,
-0.1719076782464981,
0.02421743981540203,
0.05891451612114906,
0.07131010293960571,
0.13499514758586884,
-0.11877790838479996,
0.06568717211484909,
-0.006847645156085491,
-0.015807585790753365,
0.029156837612390518,
-0.06944026798009872,
0.07192683964967728,
-0.06381798535585403,
-0.1389360874891281,
-0.013663133606314659,
0.07429030537605286,
0.13436365127563477,
0.07004329562187195,
-0.01666540652513504,
0.012975224293768406,
-0.0076074316166341305,
-0.17125199735164642,
-0.0662066787481308,
-0.017313094809651375,
0.04466014727950096,
-0.21930205821990967,
0.06125494837760925,
-0.19437530636787415,
0.014385925605893135,
0.04522908478975296,
0.1028091162443161,
-0.20958051085472107,
-0.0740601047873497,
-0.07486104965209961,
0.08528783917427063,
0.03636426851153374,
-0.17097115516662598,
0.00017081302939914167,
0.13008981943130493,
-0.03621181100606918,
-0.054495472460985184,
-0.030091501772403717,
0.03699043393135071,
-0.002423877827823162,
-0.07375131547451019,
0.19883117079734802,
-0.00191946467384696,
0.05782238021492958,
-0.12262217700481415,
0.06676416844129562,
0.09635250270366669,
0.10886137932538986,
0.037772104144096375,
-0.1327875703573227,
-0.10899144411087036,
-0.07986616343259811,
0.11198896914720535,
-0.018089309334754944,
0.07807238399982452,
-0.05937758833169937,
-0.0703667402267456,
0.0951804667711258,
-0.09710711240768433,
0.08933442831039429,
0.022287212312221527,
0.0032155863009393215,
0.10153130441904068,
0.254449725151062,
0.1124391034245491,
-0.0024096346460282803,
-0.010086264461278915,
0.055980999022722244,
0.02422657422721386,
-0.10585302859544754,
0.032492704689502716,
-0.0256106648594141,
-0.0025304039008915424,
0.01934245601296425,
0.03706125542521477,
0.004354449454694986,
-0.107222780585289,
0.023436352610588074,
-0.10194377601146698,
-0.013141128234565258,
-0.13996459543704987,
0.20595034956932068,
-0.05603286996483803,
0.012718679383397102,
-0.12328384071588516,
0.057771265506744385,
-0.022976014763116837,
0.12679153680801392,
0.107622891664505,
-0.1312112957239151,
0.09905669838190079,
0.05153822526335716,
0.17841044068336487,
-0.23485936224460602,
0.00630782637745142,
-0.13166341185569763,
0.007618601433932781,
-0.12079167366027832,
-0.013810686767101288,
-0.03340989351272583,
-0.016506178304553032,
-0.08896856009960175,
-0.09467260539531708,
0.04165925830602646,
0.02233697474002838,
-0.12025299668312073,
-0.05534505844116211,
0.1731324940919876,
0.1258409172296524,
0.05563364177942276,
0.24195343255996704,
-0.009009785950183868,
-0.08421238511800766,
0.08999274671077728,
-0.0028316534589976072,
-0.021709945052862167,
-0.09346041083335876,
-0.14939847588539124,
0.09859591722488403,
0.06011359393596649,
0.08533090353012085,
-0.2937483787536621,
0.09857881814241409,
0.15946300327777863,
-0.1656721532344818,
0.14356663823127747,
-0.2143879532814026,
0.08559548854827881,
-0.18479494750499725,
0.008870257996022701,
0.11269418895244598,
0.009697024710476398,
-0.10796108841896057,
-0.22801128029823303,
0.03634510189294815,
-0.09559754282236099,
0.02248520217835903,
-0.004959012847393751,
0.041595544666051865,
0.01572253555059433,
0.0209512896835804,
0.16721950471401215,
-0.1360182762145996,
0.13907423615455627,
0.089387446641922,
-0.15908783674240112,
0.051538337022066116,
0.13535632193088531,
-0.06620734184980392,
-0.20595520734786987,
0.10783862322568893,
-0.10568927228450775,
-0.144961416721344,
-0.06708507239818573,
0.15995927155017853,
-0.1356901228427887,
-0.06995104253292084,
-0.08579415827989578,
0.0731537938117981,
-0.05075695365667343,
-0.0481940396130085,
0.06370849162340164,
0.13934019207954407,
0.01423860713839531,
-0.027387233451008797,
-0.0630047395825386,
-0.019018780440092087,
-0.05798714980483055,
-0.0004475184832699597,
-0.08149521052837372,
-0.18172596395015717,
-0.011463581584393978,
-0.05363401398062706,
-0.17702709138393402,
-0.08650605380535126,
0.06287503242492676,
0.11633824557065964,
-0.06388213485479355,
-0.00167482637334615,
-0.12476297467947006,
-0.03501336649060249,
-0.07446351647377014,
-0.04936578869819641,
-0.010254490189254284,
-0.009108500555157661,
-0.00880415365099907,
0.013729188591241837,
0.04300934448838234,
0.006962291896343231,
-0.0767551138997078,
0.09738364070653915,
-0.07919780910015106,
-0.08520063757896423,
0.07484985888004303,
0.19609686732292175,
0.09668262302875519,
-0.15712790191173553,
0.037373535335063934,
0.0753636434674263,
0.1337854415178299,
0.1271647810935974,
0.20349179208278656,
-0.0643625557422638,
0.36026111245155334,
0.025199124589562416,
-0.025278301909565926,
0.1798703968524933,
-0.025924747809767723,
-0.14491215348243713,
0.014617457054555416,
0.1031901016831398,
0.08355379849672318,
-0.0017730793915688992,
0.17638133466243744,
-0.1294027417898178,
0.005078804213553667,
-0.0033097690902650356,
0.0266779363155365,
-0.13448409736156464,
0.07538134604692459,
-0.09654305875301361,
0.08842486143112183,
-0.03669073060154915,
0.012741344049572945,
0.13261939585208893,
0.19066493213176727,
-0.04502611607313156,
0.09033262729644775,
-0.0029412524309009314,
-0.04230824112892151,
0.03007711097598076,
-0.08535931259393692,
0.15040645003318787,
-0.049969810992479324,
-0.077344611287117,
-0.11020568758249283,
-0.13893058896064758,
0.10043896734714508,
-0.17985586822032928,
0.08262207359075546,
-0.0697995275259018,
0.04017685353755951,
0.10139153897762299,
-0.17954036593437195,
0.09878513962030411,
0.07643798738718033,
-0.0470278300344944,
0.08375651389360428,
0.002355121774598956,
0.02415565960109234,
0.2024921178817749,
-0.09548818320035934,
-0.03360813856124878,
0.035369135439395905,
0.06344478577375412,
0.00931017380207777,
0.10918202996253967,
0.18159760534763336,
-0.10810718685388565,
-0.10042877495288849,
0.03307477757334709,
0.022089209407567978,
-0.02963024191558361,
-0.1297820508480072,
0.05954359099268913,
0.004081214778125286,
0.18279699981212616,
-0.05661504343152046,
0.1651841700077057,
-0.1214083880186081,
-0.2607332170009613,
-0.04376954212784767,
0.20397600531578064,
0.017516497522592545,
-0.011774824000895023,
0.018804330378770828,
0.06803563982248306,
-0.008865089155733585,
-0.003738499479368329,
-0.1000380739569664,
-0.277381032705307,
0.16925007104873657,
-0.07945207506418228,
0.05455103516578674,
-0.11313799023628235,
-0.03946921229362488,
0.15608860552310944,
0.2457825243473053,
-0.17010055482387543,
0.011110775172710419,
-0.19246473908424377,
0.05407525971531868,
0.0799764096736908,
0.07422246783971786,
0.05635985732078552,
-0.0738690048456192,
-0.11457742750644684,
-0.0576610192656517,
-0.032410360872745514,
-0.0959341824054718,
-0.07642165571451187,
-0.1010301262140274,
0.09287475049495697,
0.09334985911846161,
0.15760233998298645,
0.18842747807502747,
-0.08067397028207779,
-0.04312968999147415,
0.11011415719985962,
0.1869370937347412,
0.13659904897212982,
-0.06888087093830109,
-0.1244821771979332,
0.14080169796943665,
0.0554688386619091,
0.042350757867097855,
-0.11162666231393814,
-0.054368406534194946,
-0.0365622378885746,
0.03723635897040367,
-0.16479727625846863,
0.038747671991586685,
0.02190570905804634,
0.09620091319084167,
-0.17484650015830994,
0.013731812126934528,
-0.042805179953575134,
-0.0648844838142395,
-0.027750885114073753,
-0.05394325405359268,
-0.08764192461967468,
-0.10557153820991516,
0.16679024696350098,
0.17583635449409485,
0.0712868869304657,
0.21414461731910706,
0.005649035330861807,
0.012483211234211922,
0.028233742341399193,
0.06436651945114136,
0.04715082049369812,
-0.009374052286148071,
-0.0034849168732762337,
0.1284853219985962,
0.13334238529205322,
-0.09714186191558838,
0.15986263751983643,
0.03153108060359955,
-0.05036339536309242,
-0.05789851397275925,
-0.13592255115509033,
0.22331300377845764,
0.0240953229367733,
0.02365979179739952,
0.018032027408480644,
-0.007317259907722473,
-0.01953897252678871,
0.10939159244298935,
0.046511318534612656,
0.01976797915995121,
-0.06315065920352936,
-0.10649976879358292,
-0.0038391139823943377,
-0.1983763426542282,
-0.10655014216899872,
0.11635088920593262,
0.09024332463741302,
-0.08873660862445831,
0.04924838989973068,
-0.06109876185655594,
-0.0018177684396505356,
0.06998241692781448,
-0.059606533497571945,
0.11255468428134918,
0.04880727827548981,
0.12497196346521378,
-0.05481293797492981,
0.13188374042510986,
-0.06372623145580292,
0.2832123935222626,
-0.013726276345551014,
-0.061285436153411865,
0.08444953709840775,
-0.10292990505695343,
0.061546165496110916,
-0.03794622793793678,
-0.15888164937496185,
-0.04494990408420563,
-0.012702984735369682,
-0.046007927507162094,
0.06688244640827179,
0.017989376559853554,
0.003904832759872079,
-0.184568852186203,
-0.10497231781482697,
-0.15134644508361816,
-0.0035824670922011137,
-0.041085537523031235,
0.08806955814361572,
0.04074695706367493,
0.08203727006912231,
0.09934794157743454,
-0.013307478278875351,
-0.07304547727108002,
-0.019459310919046402,
-0.027282172814011574,
0.07653946429491043,
-0.039597056806087494,
0.059970248490571976,
0.1613231748342514,
-0.014474030584096909,
-0.08161696046590805,
0.05807860195636749,
-0.048812877386808395,
0.14805550873279572,
-0.07496635615825653,
-0.047542914748191833,
0.1377730816602707,
-0.009726728312671185,
-0.047795288264751434,
-0.06822686642408371,
0.11723456531763077,
-0.0023673265241086483,
0.19426964223384857,
-0.1237984299659729,
0.05427379533648491,
-0.03881857544183731,
0.03084743581712246,
0.2599598467350006,
-0.14086340367794037,
-0.03734925016760826,
-0.10990900546312332,
-0.055451881140470505,
0.019101586192846298,
0.03096991777420044,
-0.1477624922990799,
0.08829258382320404,
0.15301911532878876,
-0.12530890107154846,
-0.04364785924553871,
0.1108117625117302,
-0.0027197436429560184,
-0.10764864832162857,
0.2093966007232666,
-0.06956326216459274,
0.026086879894137383,
-0.08847305923700333,
-0.11544644832611084,
-0.07374987751245499,
0.0737195685505867,
-0.029316164553165436,
-0.04310433566570282,
-0.10807287693023682,
0.07495735585689545,
0.10026013106107712,
-0.13258539140224457,
-0.028833964839577675,
0.04358188807964325,
-0.05331926420331001,
-0.15846329927444458,
-0.012921035289764404,
0.08290154486894608,
-0.010320791974663734,
0.08669940382242203,
-0.05816265568137169,
0.045367736369371414,
0.0506843663752079,
-0.13859839737415314,
-0.05610422417521477,
-0.053587861359119415,
-0.03950227051973343,
0.09426955133676529,
-0.06126079708337784,
0.11407247185707092,
0.050403423607349396,
0.13477902114391327,
0.12123250216245651,
0.008271266706287861,
0.026205062866210938,
0.07354796677827835,
-0.2034347802400589,
0.10125604271888733,
0.002296618651598692,
-0.031235314905643463,
-0.1982409656047821,
-0.20105408132076263,
0.13190174102783203,
0.07661531865596771,
0.08808596432209015,
-0.10419961810112,
-0.08819565176963806,
-0.05797414854168892,
-0.21931232511997223,
-0.09316347539424896,
0.05823526158928871,
-0.09434990584850311,
0.01647906005382538,
0.16994892060756683,
-2.512671484381251e-32,
0.05000750347971916,
0.1640176773071289,
0.0018884087912738323,
-0.08038300275802612,
-0.18083219230175018,
0.030507389456033707,
-0.06391990929841995,
-0.22779248654842377,
0.0305746141821146,
-0.1523571014404297,
-0.19735155999660492,
-0.008798612281680107,
0.04703021049499512,
0.006026327144354582,
-0.03094756416976452,
-0.13421843945980072,
-0.13542520999908447,
0.03218303620815277,
-0.07089650630950928,
0.034764666110277176,
0.03436677157878876,
-0.14704987406730652,
-0.03392600640654564,
0.17718274891376495,
-0.04789254814386368,
-0.13166078925132751,
-0.1703857034444809,
0.06827792525291443,
0.027598030865192413,
-0.050929583609104156,
0.06112804636359215,
0.10293307155370712,
-0.05901119485497475,
-0.0838322564959526,
-0.018593503162264824,
-0.14262157678604126,
-0.20885396003723145,
-0.0896197110414505,
0.018978463485836983,
0.057773396372795105,
-0.10749118030071259,
0.050402719527482986,
-0.06765692681074142,
-0.09840619564056396,
-0.0270810779184103,
0.04672558978199959,
0.005289857741445303,
0.0481855534017086,
-0.01080591231584549,
-0.13154396414756775,
0.1871761977672577,
0.1068645641207695,
0.019648762419819832,
0.2116839587688446,
-0.007719018962234259,
-0.03340675309300423,
0.08446630835533142,
0.017886951565742493,
-0.15020619332790375,
-0.03389822691679001,
0.10642480105161667,
-0.07224295288324356,
0.00639243982732296,
0.003302027704194188,
0.10590830445289612,
-0.03492865338921547,
0.27331581711769104,
-0.013941464014351368,
0.0880092978477478,
-0.07760593295097351,
-0.07942121475934982,
0.14087603986263275,
-0.034092050045728683,
-0.0556865856051445,
0.01731143146753311,
-0.08621635288000107,
0.03090827725827694,
-0.07839040458202362,
0.18918104469776154,
-0.018902013078331947,
0.08928889781236649,
-0.027998102828860283,
-0.07550325989723206,
-0.06880022585391998,
-0.08197679370641708,
0.04936963692307472,
-0.05882733315229416,
-0.01381697691977024,
0.041479550302028656,
0.0801471471786499,
0.07248877733945847,
0.1787918359041214,
-0.1881476640701294,
0.02886257693171501,
-0.09877040982246399,
0.16282528638839722,
-0.03569847717881203,
0.01575438119471073,
-0.11626511067152023,
0.0559808649122715,
0.024655813351273537,
-0.06048787385225296,
0.12289267033338547,
-0.0486583337187767,
0.12431397289037704,
0.013617187738418579,
0.11406669020652771,
0.06727645546197891,
-0.18166464567184448,
-0.011778535321354866,
-0.18036092817783356,
0.014323292300105095,
0.09353475272655487,
-0.03306810185313225,
0.10722002387046814,
0.05487137287855148,
-0.10883479565382004,
-0.13774380087852478,
0.19782261550426483,
0.27774515748023987,
-0.07254357635974884,
-0.09018446505069733,
-0.1771656721830368,
-0.003530886024236679,
0.12250164151191711,
0.07989923655986786,
-0.19896410405635834,
-0.027875643223524094,
0.0966641902923584,
-0.039150308817625046,
-0.010114621371030807,
-0.047787174582481384,
8.065322276706866e-7,
-0.11448036134243011,
0.20161224901676178,
-0.04085512459278107,
0.06255218386650085,
-0.13912366330623627,
-0.007316049188375473,
-0.07798097282648087,
0.30609625577926636,
-0.053115587681531906,
0.16205714643001556,
0.013650791719555855,
0.15851829946041107,
-0.010180450975894928,
0.02281351014971733,
-0.01062721200287342,
-0.009576428681612015,
-0.08413343131542206,
-0.03940949589014053,
0.02140030823647976,
-0.0032582138665020466,
0.07825367152690887,
0.05743329972028732,
-0.08322255313396454,
-0.030854936689138412,
0.03783608227968216,
-0.10008787363767624,
0.09086135774850845,
-0.13480615615844727,
0.08534882962703705,
-0.026842372491955757,
-0.029283365234732628,
-0.10249286144971848,
-0.08843189477920532,
0.09138378500938416,
-0.052927784621715546,
0.06991767138242722,
-0.3078719675540924,
0.00032193862716667354,
-0.002419812837615609,
0.056374963372945786,
-0.027780981734395027,
-0.11894003301858902,
0.0007209702744148672,
0.00012032529775751755,
0.1564333438873291,
0.14627386629581451,
-0.178879052400589,
0.09854893386363983,
0.10953552275896072,
-0.06431514769792557,
0.041543249040842056,
0.048123110085725784,
0.1136317104101181,
0.2201356440782547,
-0.09736378490924835,
-0.07325631380081177,
0.09124886989593506,
-0.2080758661031723,
0.09881047159433365,
-0.02782602608203888,
-0.027116838842630386,
0.09532897919416428,
-0.0752740427851677,
0.14738473296165466,
-0.032273970544338226,
-0.08290128409862518,
0.020491354167461395,
1.3489892813977433e-34,
0.008381142280995846,
0.0037052237894386053,
0.06436087936162949,
-0.24492013454437256,
0.11800999194383621,
-0.09401720762252808,
0.1871008276939392,
0.11986338347196579,
-0.04811859503388405,
-0.2817370593547821,
-0.1242593303322792
] |
https://github.com/huggingface/datasets/issues/5987 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare | Thanks. So if I want to use `IterableDataset` and control the size of single arrow file, how should I organize the data loader? Maybe `load_dataset_build` + `download_and_prepare` + `builder.as_dataset` + `dataset.to_iterable_dataset`? | ### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1 | 31 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
Thanks. So if I want to use `IterableDataset` and control the size of single arrow file, how should I organize the data loader? Maybe `load_dataset_build` + `download_and_prepare` + `builder.as_dataset` + `dataset.to_iterable_dataset`? | [
-0.06949441879987717,
0.0534839928150177,
0.01975799910724163,
-0.07446515560150146,
0.1012427806854248,
0.0022929413244128227,
0.2633296847343445,
0.03748935088515282,
-0.021371779963374138,
0.1987360119819641,
0.09404865652322769,
-0.07430385053157806,
-0.14380387961864471,
0.02871796488761902,
0.029418474063277245,
-0.07219485193490982,
-0.1832745522260666,
-0.041247669607400894,
-0.12322975695133209,
-0.03346820920705795,
-0.0745091661810875,
0.12250920385122299,
0.08579298108816147,
-0.10042623430490494,
-0.00997505709528923,
0.04650208726525307,
-0.05957712233066559,
0.12485207617282867,
-0.029498841613531113,
-0.03767738118767738,
0.07592257112264633,
-0.040614183992147446,
-0.05532233417034149,
-0.09887467324733734,
0.000005677527042280417,
0.08476489782333374,
0.1388552337884903,
0.03708229959011078,
-0.0929621085524559,
-0.04102885723114014,
0.09641717374324799,
-0.03990115597844124,
0.054220013320446014,
0.008573119528591633,
0.13029083609580994,
-0.011406674049794674,
-0.14218522608280182,
0.143537238240242,
0.07536762952804565,
0.039814554154872894,
-0.05337024852633476,
-0.0495750829577446,
0.190690815448761,
-0.2158999741077423,
-0.02691921405494213,
0.08627255260944366,
0.09813078492879868,
0.1352868378162384,
-0.07662304490804672,
0.12435643374919891,
-0.006670617498457432,
0.00746597396209836,
0.04447312280535698,
-0.08283794671297073,
0.06945588439702988,
-0.04694988578557968,
-0.1393444538116455,
-0.013925038278102875,
0.07518967241048813,
0.11057258397340775,
0.07063449919223785,
-0.01548141147941351,
0.019095659255981445,
-0.0518195666372776,
-0.12450093775987625,
-0.13209807872772217,
-0.07221516966819763,
0.019152602180838585,
-0.18222931027412415,
0.05492444336414337,
-0.15320797264575958,
0.03264555707573891,
-0.0005080271512269974,
0.11668957024812698,
-0.20880775153636932,
-0.08231592178344727,
-0.10487689822912216,
0.09540589898824692,
0.056883856654167175,
-0.15524549782276154,
-0.019186770543456078,
0.15520206093788147,
-0.0897776409983635,
-0.11537383496761322,
-0.09241997450590134,
0.003160082036629319,
-0.02086774818599224,
-0.11208067089319229,
0.19004088640213013,
0.022847477346658707,
0.09460876882076263,
-0.1374470442533493,
0.11593300104141235,
0.08315376192331314,
0.18646205961704254,
0.019429614767432213,
-0.16146746277809143,
-0.11350033432245255,
-0.08219893276691437,
0.1261356770992279,
0.029645632952451706,
0.08785505592823029,
-0.0792144238948822,
-0.08615197241306305,
0.07087857276201248,
-0.07618363201618195,
0.10985126346349716,
0.048852432519197464,
-0.02839505858719349,
0.04182479903101921,
0.2617962062358856,
0.1074472963809967,
0.027605991810560226,
-0.03496316075325012,
0.08808182924985886,
-0.034063830971717834,
-0.12543025612831116,
0.062410686165094376,
-0.009167540818452835,
-0.03235561400651932,
0.02093285508453846,
0.07339684665203094,
0.011667679995298386,
-0.13854284584522247,
0.040137793868780136,
-0.08340773731470108,
-0.00518839480355382,
-0.15471260249614716,
0.18121890723705292,
-0.02677365392446518,
0.002632805844768882,
-0.1288599967956543,
0.042685944586992264,
-0.03389179706573486,
0.1063920259475708,
0.08035577088594437,
-0.1433865875005722,
0.09053917229175568,
0.011986254714429379,
0.1710660755634308,
-0.25014805793762207,
0.01611231453716755,
-0.09427235275506973,
0.02903820015490055,
-0.11826759576797485,
-0.03674424812197685,
-0.043340735137462616,
-0.01956038735806942,
-0.1591338813304901,
-0.06603250652551651,
0.026841910555958748,
0.02360869012773037,
-0.09948853403329849,
-0.08981072902679443,
0.18212415277957916,
0.08966147154569626,
0.04396269842982292,
0.23113244771957397,
-0.0713624358177185,
-0.13947637379169464,
0.07935722917318344,
-0.0031036126893013716,
-0.007204839494079351,
-0.0598960742354393,
-0.16244745254516602,
0.1197027936577797,
0.08944716304540634,
0.14490285515785217,
-0.2882371246814728,
0.11533017456531525,
0.15655052661895752,
-0.1040753573179245,
0.16448111832141876,
-0.225161612033844,
0.05596259608864784,
-0.22953446209430695,
-0.029877714812755585,
0.09242185950279236,
-0.017179347574710846,
-0.1331784427165985,
-0.1891930103302002,
0.06413242220878601,
-0.09655633568763733,
0.06748805195093155,
0.010209130123257637,
0.033899031579494476,
-0.006191996857523918,
-0.027500931173563004,
0.15507976710796356,
-0.10304660350084305,
0.12849043309688568,
0.07277393341064453,
-0.14403492212295532,
0.0571865551173687,
0.11256459355354309,
-0.1196499764919281,
-0.14520151913166046,
0.06951719522476196,
-0.02985474094748497,
-0.20459048449993134,
-0.08403807878494263,
0.12175854295492172,
-0.1598510593175888,
-0.05203929543495178,
-0.09308987855911255,
0.10537424683570862,
-0.06070994958281517,
-0.05764087289571762,
0.06575816869735718,
0.1426699459552765,
-0.010498792864382267,
-0.0015272516757249832,
-0.1263357549905777,
-0.022946512326598167,
-0.04751469939947128,
-0.010499515570700169,
-0.07830841839313507,
-0.1785460263490677,
0.07975476235151291,
-0.054462604224681854,
-0.20068831741809845,
-0.10334945470094681,
0.11255520582199097,
0.10571204870939255,
-0.10487555712461472,
-0.0188004020601511,
-0.09882771968841553,
0.002754524350166321,
-0.06472586840391159,
-0.04102926701307297,
-0.03673163801431656,
0.007057883311063051,
-0.0017583940643817186,
0.007736604195088148,
0.04600546509027481,
0.03445593640208244,
-0.12795613706111908,
0.0680484026670456,
-0.06207267567515373,
-0.09721629321575165,
0.11158988624811172,
0.15228226780891418,
0.05724089965224266,
-0.13421602547168732,
0.018581770360469818,
0.05128198489546776,
0.1473943442106247,
0.10037580877542496,
0.19377559423446655,
-0.02994001843035221,
0.3359857499599457,
0.01098740566521883,
0.002420007949694991,
0.2142995148897171,
-0.04059753194451332,
-0.09415989369153976,
-0.02481399103999138,
0.12128029018640518,
0.12044789642095566,
-0.02226208709180355,
0.1622917354106903,
-0.16336163878440857,
0.043531157076358795,
-0.003156916005536914,
0.007720576599240303,
-0.11969997733831406,
0.06757446378469467,
-0.05752743408083916,
0.03215821459889412,
-0.03650009632110596,
-0.0039090425707399845,
0.1286841332912445,
0.17054630815982819,
-0.049493756145238876,
0.08853292465209961,
-0.016980839893221855,
-0.017087850719690323,
0.0190630704164505,
-0.05604298412799835,
0.12782645225524902,
-0.05243372172117233,
-0.07505279779434204,
-0.10775782912969589,
-0.11554921418428421,
0.12114590406417847,
-0.19057334959506989,
0.13420073688030243,
-0.049513909965753555,
0.06029791757464409,
0.14450134336948395,
-0.18870680034160614,
0.10003901273012161,
0.08423727750778198,
-0.00585625134408474,
0.09104102849960327,
0.007188223302364349,
0.07077203691005707,
0.2124442458152771,
-0.04725450277328491,
-0.04909544438123703,
0.03887444734573364,
0.042233310639858246,
-0.0061301314271986485,
0.07240165024995804,
0.1943131983280182,
-0.10494930297136307,
-0.07234445214271545,
0.041510820388793945,
0.029638197273015976,
-0.024774830788373947,
-0.08501631766557693,
0.07645253092050552,
-0.029800143092870712,
0.21274131536483765,
-0.04484439268708229,
0.15059800446033478,
-0.1283499151468277,
-0.23228514194488525,
-0.0289608221501112,
0.21121443808078766,
0.010670594871044159,
0.020835356786847115,
-0.0065863290801644325,
0.0983821302652359,
0.004074712749570608,
-0.008326764218509197,
-0.11787073314189911,
-0.2326267510652542,
0.1900702714920044,
-0.09125377982854843,
0.020130353048443794,
-0.09466787427663803,
-0.0401022844016552,
0.12486463040113449,
0.21417543292045593,
-0.14701823890209198,
0.034359853714704514,
-0.1760333925485611,
-0.003167907241731882,
0.04682767763733864,
0.06181279942393303,
0.02918337844312191,
-0.09874334931373596,
-0.1149691641330719,
-0.053467072546482086,
-0.007651650346815586,
-0.12540864944458008,
-0.09298775345087051,
-0.13480830192565918,
0.11304475367069244,
0.06142469123005867,
0.16002245247364044,
0.20815809071063995,
-0.021173033863306046,
-0.03376209735870361,
0.1059209555387497,
0.21367040276527405,
0.11533991992473602,
-0.07327792048454285,
-0.14473389089107513,
0.12639307975769043,
0.08035480976104736,
0.13239099085330963,
-0.053492140024900436,
-0.06326328217983246,
0.026869164779782295,
0.04580535367131233,
-0.20072029531002045,
0.09983685612678528,
-0.0007294840179383755,
0.09517369419336319,
-0.14992597699165344,
0.03455757722258568,
-0.1022154912352562,
-0.03385276719927788,
0.00304899993352592,
-0.0208913404494524,
-0.07073265314102173,
-0.07302498817443848,
0.20302875339984894,
0.15016019344329834,
0.06999732553958893,
0.15965954959392548,
0.017661897465586662,
-0.02718612179160118,
-0.006298392545431852,
0.08954714983701706,
0.05100838840007782,
-0.03355268016457558,
0.008884835988283157,
0.16844482719898224,
0.19600865244865417,
-0.12299954891204834,
0.12485060840845108,
0.03348779305815697,
-0.02626449428498745,
-0.06416300684213638,
-0.10704945772886276,
0.163577601313591,
0.07064627856016159,
0.05962264910340309,
0.027183594182133675,
-0.0189225934445858,
-0.032965730875730515,
0.11438130587339401,
0.03557164594531059,
-0.0019322457956150174,
-0.06964405626058578,
-0.08153676241636276,
-0.012266975827515125,
-0.1914806067943573,
-0.07582934945821762,
0.1472478061914444,
0.11129353940486908,
-0.08107530325651169,
0.04935964196920395,
-0.11263802647590637,
-0.027147334069013596,
0.08730050921440125,
0.0024104081094264984,
0.09217842668294907,
0.08462344855070114,
0.1313851922750473,
-0.027414435520768166,
0.09696462005376816,
-0.03134623542428017,
0.2542112469673157,
0.03197847306728363,
-0.10226856917142868,
0.07149773091077805,
-0.08800912648439407,
0.054684221744537354,
0.060392264276742935,
-0.19924692809581757,
-0.02646755427122116,
-0.018718600273132324,
-0.06902144849300385,
0.08620241284370422,
-0.007557560224086046,
0.04964699223637581,
-0.17769360542297363,
-0.17064505815505981,
-0.15574553608894348,
-0.01695905067026615,
-0.04520562291145325,
0.11537545174360275,
0.09172242879867554,
0.10626786947250366,
0.0665724128484726,
-0.033908434212207794,
-0.06615939736366272,
-0.026795729994773865,
0.03126057609915733,
0.039349500089883804,
-0.057492319494485855,
0.07545150816440582,
0.13418859243392944,
0.018601004034280777,
-0.10037712752819061,
0.059725530445575714,
-0.07588263601064682,
0.15967483818531036,
-0.0177661944180727,
-0.02744261547923088,
0.17709000408649445,
-0.021196356043219566,
-0.09910637140274048,
-0.08388984948396683,
0.06746756285429001,
0.009594910778105259,
0.20394189655780792,
-0.18941229581832886,
0.028159121051430702,
-0.03362894058227539,
0.008270727470517159,
0.2385704666376114,
-0.18862703442573547,
-0.03954387828707695,
-0.12652525305747986,
0.023112989962100983,
0.023578999564051628,
-0.03593139350414276,
-0.1685129553079605,
0.11657939851284027,
0.10872749239206314,
-0.09878665208816528,
-0.0913127064704895,
0.18824774026870728,
-0.019640693441033363,
-0.09158764034509659,
0.20055146515369415,
-0.060614317655563354,
0.04279951751232147,
-0.13364017009735107,
-0.16740268468856812,
-0.09976018220186234,
0.06954118609428406,
-0.016978858038783073,
-0.01762428507208824,
-0.11470963060855865,
0.08114360272884369,
0.15360967814922333,
-0.07560519874095917,
-0.02171158604323864,
0.042462047189474106,
-0.016451815143227577,
-0.20135849714279175,
-0.012844488024711609,
0.07402784377336502,
-0.00907541811466217,
0.051622577011585236,
-0.04967772960662842,
0.06866791099309921,
0.06718330085277557,
-0.08121064305305481,
-0.07256589084863663,
-0.009212318807840347,
-0.05783924460411072,
0.018590889871120453,
-0.02680088020861149,
0.12410545349121094,
0.0021333734039217234,
0.11443240195512772,
0.10607286542654037,
-0.016743727028369904,
0.021540770307183266,
0.04449882358312607,
-0.19753119349479675,
0.1029633954167366,
0.026933448389172554,
0.03372332453727722,
-0.21238909661769867,
-0.21330183744430542,
0.10994581133127213,
0.07597828656435013,
0.07117925584316254,
-0.13411326706409454,
-0.04188701882958412,
-0.0536000095307827,
-0.15210126340389252,
-0.030969446524977684,
0.035619426518678665,
-0.09550760686397552,
0.006914792116731405,
0.15882301330566406,
-2.5578060593490114e-32,
0.024142565205693245,
0.1841498613357544,
-0.03385774418711662,
-0.016312958672642708,
-0.18525098264217377,
0.03489890322089195,
-0.021752581000328064,
-0.20583996176719666,
0.028376411646604538,
-0.14684967696666718,
-0.21618562936782837,
0.001569553161971271,
0.03848869726061821,
-0.0001766724744811654,
-0.036861568689346313,
-0.09336933493614197,
-0.09595481306314468,
-0.0025061052292585373,
-0.0883948802947998,
0.036508623510599136,
0.014606240205466747,
-0.16177810728549957,
-0.038770418614149094,
0.17915721237659454,
-0.0964374989271164,
-0.09923583269119263,
-0.2175150364637375,
0.11533567309379578,
0.004928237292915583,
-0.07201801240444183,
0.04595670476555824,
0.13734422624111176,
-0.020862799137830734,
-0.08498746156692505,
-0.027258120477199554,
-0.0734729915857315,
-0.2974693775177002,
-0.08947883546352386,
0.004897240083664656,
0.10850692540407181,
-0.058848362416028976,
0.03315189108252525,
-0.013041277416050434,
-0.1603807508945465,
0.026036694645881653,
0.032681144773960114,
-0.0003729217278305441,
0.029619382694363594,
0.003791284514591098,
-0.08889473974704742,
0.18049192428588867,
0.1042996346950531,
0.03908788412809372,
0.19338162243366241,
0.014608403667807579,
-0.03497053682804108,
0.08626138418912888,
0.00030553480610251427,
-0.14078401029109955,
-0.04368624463677406,
0.15062683820724487,
-0.09516990184783936,
0.0041835191659629345,
0.022396355867385864,
0.10688306391239166,
-0.04159305617213249,
0.1824527233839035,
-0.03374682739377022,
0.08116917312145233,
-0.10815038532018661,
-0.11087974905967712,
0.13558679819107056,
-0.041688352823257446,
-0.09664851427078247,
-0.00856009591370821,
-0.12954431772232056,
0.007841529324650764,
-0.05013347417116165,
0.15095536410808563,
-0.013801280409097672,
0.06512188911437988,
-0.01637190766632557,
-0.0769469290971756,
-0.07127057760953903,
-0.04227595031261444,
0.024689245969057083,
-0.04292554035782814,
-0.03246629238128662,
0.03503836691379547,
0.08606784045696259,
0.022909846156835556,
0.20410265028476715,
-0.1831539273262024,
0.028779666870832443,
-0.11469227075576782,
0.17737238109111786,
-0.07598959654569626,
0.03170562908053398,
-0.07137462496757507,
0.03056318312883377,
0.009563533589243889,
-0.044743612408638,
0.15808330476284027,
-0.01192493736743927,
0.09060708433389664,
0.00313528161495924,
0.14984987676143646,
0.10765072703361511,
-0.17887036502361298,
-0.05650220438838005,
-0.1713619977235794,
-0.019462930038571358,
0.11297953128814697,
0.01806897670030594,
0.10075093805789948,
0.05131034925580025,
-0.06588205695152283,
-0.20109333097934723,
0.20932193100452423,
0.23933051526546478,
-0.13161446154117584,
-0.07273898273706436,
-0.1667013168334961,
-0.025875842198729515,
0.11705540865659714,
0.07899459451436996,
-0.1424114853143692,
-0.05497075617313385,
0.09280083328485489,
0.0008068818133324385,
-0.03656589612364769,
-0.04707092046737671,
7.926220177978394e-7,
-0.09955660998821259,
0.17687608301639557,
-0.0893574133515358,
0.04395158216357231,
-0.14123199880123138,
-0.011930127628147602,
-0.057114869356155396,
0.31270092725753784,
-0.13036029040813446,
0.1671772301197052,
0.03525789454579353,
0.1384834200143814,
-0.016458643600344658,
-0.000582386099267751,
-0.017139527946710587,
-0.04183609411120415,
-0.06779171526432037,
-0.017159180715680122,
0.008589336648583412,
-0.03239647299051285,
0.11746689677238464,
0.07917656004428864,
-0.08286333084106445,
-0.0861029326915741,
0.011844451539218426,
-0.09890208393335342,
0.07547321170568466,
-0.09989555925130844,
0.09004874527454376,
-0.019556015729904175,
0.0006924212793819606,
-0.08975577354431152,
-0.0856417790055275,
0.1043807864189148,
-0.06364381313323975,
0.08741038292646408,
-0.3025970160961151,
0.006805014330893755,
-0.03202369809150696,
0.13504774868488312,
0.011306319385766983,
-0.16354626417160034,
-0.020825617015361786,
0.0014515876537188888,
0.1803252398967743,
0.1479140818119049,
-0.17073288559913635,
0.10825636982917786,
0.09648825228214264,
-0.03558075428009033,
0.037145163863897324,
0.09813535958528519,
0.09145735949277878,
0.22109301388263702,
-0.10130799561738968,
-0.09724169224500656,
0.12314657866954803,
-0.19327116012573242,
0.11287322640419006,
-0.017930569127202034,
-0.05455775931477547,
0.12911948561668396,
-0.07189325243234634,
0.09620002657175064,
-0.04549712687730789,
-0.05623335391283035,
0.02152014523744583,
1.092271991054584e-34,
0.013837378472089767,
0.007817713543772697,
0.03594951331615448,
-0.23221422731876373,
0.09881111234426498,
-0.07772117853164673,
0.16653811931610107,
0.12142806500196457,
-0.07339529693126678,
-0.21509799361228943,
-0.09970402717590332
] |
https://github.com/huggingface/datasets/issues/5987 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare | Yes, this should work.
I think we can expose `max_shard_size` in `load_dataset`, so feel free to open a PR. | ### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1 | 19 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
Yes, this should work.
I think we can expose `max_shard_size` in `load_dataset`, so feel free to open a PR. | [
-0.044051121920347214,
0.008326290175318718,
0.04779708385467529,
-0.062070876359939575,
0.11484622955322266,
-0.036724697798490524,
0.1979619562625885,
0.006428393069654703,
-0.033423036336898804,
0.18272456526756287,
0.1261458545923233,
-0.08879338204860687,
-0.13067713379859924,
0.05180726200342178,
0.045401014387607574,
-0.05019195005297661,
-0.1775754690170288,
-0.021811138838529587,
-0.08070915937423706,
-0.0216334518045187,
-0.0708489939570427,
0.10166192054748535,
0.07410598546266556,
-0.11141954362392426,
-0.024142416194081306,
0.05485432222485542,
-0.08521956950426102,
0.11028249561786652,
0.0031420309096574783,
0.03160729259252548,
0.07704683393239975,
-0.07376237958669662,
-0.030085628852248192,
-0.109270378947258,
0.000005869293545401888,
0.06381251662969589,
0.12225815653800964,
0.02909352444112301,
-0.06733096390962601,
-0.03013438545167446,
0.03814688324928284,
-0.04824516549706459,
0.009299584664404392,
-0.038813866674900055,
0.0894223153591156,
0.07224930822849274,
-0.15420213341712952,
0.15060962736606598,
0.011702882125973701,
0.05522976070642471,
-0.033534709364175797,
-0.023294785991311073,
0.24386674165725708,
-0.21721281111240387,
-0.00677869888022542,
0.05844123288989067,
0.08161545544862747,
0.12340012937784195,
-0.059693899005651474,
0.0749066025018692,
0.00015957200957927853,
-0.02251075766980648,
0.06385684013366699,
-0.07174824178218842,
0.05407415330410004,
-0.035069067031145096,
-0.13496674597263336,
0.018699880689382553,
0.06563819199800491,
0.12258155643939972,
0.020001571625471115,
-0.0032436512410640717,
0.016341570764780045,
-0.04679920896887779,
-0.138577401638031,
-0.12405437976121902,
-0.03230711817741394,
-0.03177541121840477,
-0.21375583112239838,
0.06086155027151108,
-0.20807290077209473,
-0.003181139240041375,
0.016332026571035385,
0.12915004789829254,
-0.16610871255397797,
-0.07507242262363434,
-0.07599661499261856,
0.06410141289234161,
0.06861182302236557,
-0.175237238407135,
-0.057930245995521545,
0.19399996101856232,
-0.04759464040398598,
-0.11081899702548981,
-0.0708145797252655,
0.006170892156660557,
0.00564197450876236,
-0.05978145822882652,
0.18828709423542023,
0.020031526684761047,
0.026421990245580673,
-0.13279196619987488,
0.07742764055728912,
0.08183325082063675,
0.13420246541500092,
0.049257099628448486,
-0.14491301774978638,
-0.11602477729320526,
-0.08377518504858017,
0.14791885018348694,
0.021500468254089355,
0.11522365361452103,
-0.0700923502445221,
-0.07961086928844452,
0.04670765623450279,
-0.08924619853496552,
0.07411181926727295,
0.028999552130699158,
-0.02274925448000431,
0.07422491908073425,
0.2788100838661194,
0.15076304972171783,
-0.020437242463231087,
0.004365931730717421,
0.048692330718040466,
-0.019801141694188118,
-0.11487869173288345,
0.05121936276555061,
-0.05290462449193001,
-0.07227513194084167,
0.003537801094353199,
0.07862208783626556,
0.018982701003551483,
-0.10896523296833038,
0.02498396672308445,
-0.12888529896736145,
-0.0198554378002882,
-0.14534206688404083,
0.21613474190235138,
-0.049426812678575516,
-0.03899587690830231,
-0.0770919919013977,
-0.00123429368250072,
-0.02770261839032173,
0.14324669539928436,
0.055720094591379166,
-0.08509860932826996,
0.08399029076099396,
0.03342859447002411,
0.16063031554222107,
-0.22796344757080078,
0.020155221223831177,
-0.10227280110120773,
0.02421906776726246,
-0.16520895063877106,
-0.038418423384428024,
-0.03830889239907265,
0.016715724021196365,
-0.12080381065607071,
-0.06754772365093231,
0.04482477903366089,
0.021627269685268402,
-0.139759361743927,
-0.062142498791217804,
0.20229478180408478,
0.11725904792547226,
0.07577411085367203,
0.19597947597503662,
-0.04007786884903908,
-0.15327288210391998,
0.07326602935791016,
-0.04195379838347435,
0.03947855904698372,
-0.08439216017723083,
-0.14405547082424164,
0.107218898832798,
0.005534863565117121,
0.14274616539478302,
-0.2629062235355377,
0.10090217739343643,
0.16062504053115845,
-0.11520753055810928,
0.15942507982254028,
-0.22891460359096527,
0.06958726048469543,
-0.15435872972011566,
0.001975596882402897,
0.11861903220415115,
-0.01878216303884983,
-0.1266193389892578,
-0.20203296840190887,
0.004777034744620323,
-0.12097593396902084,
0.05076092481613159,
0.005870154593139887,
0.047892432659864426,
0.0029289524536579847,
0.011335349641740322,
0.14177004992961884,
-0.07409593462944031,
0.14969584345817566,
0.0739709809422493,
-0.15521177649497986,
0.06379137933254242,
0.14392229914665222,
-0.12280966341495514,
-0.13364072144031525,
0.07577601075172424,
-0.06374148279428482,
-0.1298016756772995,
-0.06338387727737427,
0.11351296305656433,
-0.137538880109787,
-0.06547830253839493,
-0.05709781125187874,
0.0770396888256073,
-0.041319772601127625,
-0.08988675475120544,
0.05490493401885033,
0.1353609412908554,
0.012238281778991222,
-0.015863796696066856,
-0.08629118651151657,
-0.017180778086185455,
-0.0667085349559784,
-0.013122843578457832,
-0.08352040499448776,
-0.16987194120883942,
0.03509952872991562,
-0.02298707142472267,
-0.20386791229248047,
-0.10327927023172379,
0.09502371400594711,
0.13457496464252472,
-0.10556472092866898,
-0.008429832756519318,
-0.09356939047574997,
-0.034852009266614914,
-0.07120099663734436,
-0.04186110198497772,
-0.03062446229159832,
0.003753605531528592,
0.004865909460932016,
0.027429569512605667,
0.049978841096162796,
0.033117275685071945,
-0.07294366508722305,
0.07408799976110458,
-0.06150804087519646,
-0.09658817201852798,
0.09367095679044724,
0.1719616800546646,
0.114949069917202,
-0.17698095738887787,
0.04780801758170128,
0.04194378852844238,
0.09732770174741745,
0.09958414733409882,
0.16538140177726746,
-0.07897606492042542,
0.28792494535446167,
0.007848194800317287,
0.035301730036735535,
0.19454418122768402,
-0.01676555909216404,
-0.11274789273738861,
-0.022920353338122368,
0.05710870400071144,
0.1338769495487213,
-0.023022916167974472,
0.15469753742218018,
-0.11758600920438766,
0.01854121871292591,
-0.010965327732264996,
-0.008814738132059574,
-0.13235856592655182,
0.056569669395685196,
-0.09931293874979019,
0.012642182409763336,
-0.05928647145628929,
-0.010397554375231266,
0.14999757707118988,
0.17697404325008392,
-0.038016337901353836,
0.0574176050722599,
-0.04251284897327423,
-0.03280468285083771,
0.06159130111336708,
-0.045527104288339615,
0.12272831052541733,
-0.058350007981061935,
-0.06303323805332184,
-0.12354753166437149,
-0.12900029122829437,
0.12149563431739807,
-0.17975611984729767,
0.13792790472507477,
-0.06992068141698837,
0.07519076019525528,
0.11764875054359436,
-0.204948291182518,
0.13008324801921844,
0.09482201933860779,
-0.0042468467727303505,
0.06065669655799866,
0.017400948330760002,
0.052929624915122986,
0.2025286704301834,
-0.08252181112766266,
-0.024917585775256157,
0.009799824096262455,
0.05544687807559967,
0.0003796886885538697,
0.11008135229349136,
0.18867570161819458,
-0.09298769384622574,
-0.09185764938592911,
0.08502891659736633,
-0.00016935118765104562,
-0.04212776944041252,
-0.09943000972270966,
0.06899883598089218,
0.009656164795160294,
0.2584856450557709,
-0.07635404914617538,
0.13818609714508057,
-0.16517944633960724,
-0.23386487364768982,
-0.10025510936975479,
0.1962553858757019,
0.0037155624013394117,
-0.0023163019213825464,
0.03158148005604744,
0.07857053726911545,
0.00030964953475631773,
-0.018020950257778168,
-0.12701520323753357,
-0.2754059433937073,
0.1672813445329666,
-0.09548056125640869,
0.014280887320637703,
-0.1162649542093277,
-0.05918533727526665,
0.08865322172641754,
0.18888786435127258,
-0.15605270862579346,
-0.005869866814464331,
-0.17050352692604065,
-0.0003221913066226989,
0.09644535183906555,
0.06347132474184036,
0.06344269961118698,
-0.10058359056711197,
-0.09843909740447998,
-0.05941066890954971,
-0.04127055034041405,
-0.07931152731180191,
-0.06001197174191475,
-0.07213646918535233,
0.053264256566762924,
0.11276940256357193,
0.12725335359573364,
0.19900402426719666,
-0.04705177992582321,
-0.053128432482481,
0.12085726112127304,
0.18177655339241028,
0.15327906608581543,
-0.043112386018037796,
-0.07647077739238739,
0.11582078039646149,
0.09462688118219376,
0.10874748975038528,
-0.055845774710178375,
-0.03772927448153496,
0.025477763265371323,
0.04012257978320122,
-0.19294795393943787,
0.09169197827577591,
0.013658933341503143,
0.07609383016824722,
-0.11862175166606903,
0.02809089608490467,
-0.07504589855670929,
-0.008410255424678326,
-0.002639775164425373,
-0.038524381816387177,
-0.0946720540523529,
-0.025064144283533096,
0.21051551401615143,
0.16481000185012817,
0.04587104916572571,
0.1903725564479828,
0.00936259888112545,
0.008570611476898193,
-0.030502285808324814,
0.08389590680599213,
0.026772700250148773,
-0.008495312184095383,
-0.00863669440150261,
0.14282703399658203,
0.12452209740877151,
-0.14691030979156494,
0.1288520097732544,
-0.00021637475583702326,
-0.07477433979511261,
-0.054939087480306625,
-0.10010039806365967,
0.17627409100532532,
0.0028588357381522655,
0.040134064853191376,
0.03800899162888527,
-0.019359435886144638,
-0.00722738541662693,
0.1316172331571579,
-0.00323088513687253,
-0.020990421995520592,
-0.10043632239103317,
-0.10496383905410767,
0.006274810526520014,
-0.18645644187927246,
-0.07612591981887817,
0.14469267427921295,
0.15946486592292786,
-0.09038100391626358,
0.0702056735754013,
-0.07656990736722946,
-0.004754615016281605,
0.08320193737745285,
-0.02928248979151249,
0.06157708540558815,
0.058604635298252106,
0.1419396847486496,
-0.06272544711828232,
0.07952988147735596,
-0.0816933810710907,
0.24214783310890198,
-0.00100514548830688,
-0.07250339537858963,
0.08766563981771469,
-0.09438388049602509,
0.09068241715431213,
-0.04492864012718201,
-0.16338272392749786,
0.0015499171568080783,
-0.018039029091596603,
-0.06204182654619217,
0.0482439324259758,
0.007051106542348862,
0.04312456026673317,
-0.13433727622032166,
-0.1452622264623642,
-0.1420251876115799,
0.004852594342082739,
-0.031099217012524605,
0.14169342815876007,
0.034692082554101944,
0.11208512634038925,
0.09667816758155823,
-0.06105616316199303,
-0.07104873657226562,
-0.031503837555646896,
-0.02581949718296528,
0.044975645840168,
-0.047681067138910294,
0.07352805882692337,
0.13882365822792053,
-0.0014840734656900167,
-0.09358202666044235,
0.06439045816659927,
-0.10435154289007187,
0.1533902883529663,
-0.050901271402835846,
-0.014854446053504944,
0.12752008438110352,
-0.038848746567964554,
-0.010463987477123737,
-0.09205610305070877,
0.11149773001670837,
0.010263604111969471,
0.18712592124938965,
-0.17978107929229736,
0.05604291707277298,
-0.0546937994658947,
-0.017703713849186897,
0.22488150000572205,
-0.18065519630908966,
-0.04611751064658165,
-0.10571427643299103,
0.02631218358874321,
0.03146965429186821,
0.04745562747120857,
-0.14300429821014404,
0.17513832449913025,
0.13343258202075958,
-0.08688394725322723,
-0.04029301553964615,
0.1767730712890625,
0.017469802871346474,
-0.10500024259090424,
0.2230772078037262,
-0.08820438385009766,
0.04587426409125328,
-0.1513981819152832,
-0.14407029747962952,
-0.07420065253973007,
0.0984356477856636,
-0.009525096975266933,
-0.043228793889284134,
-0.152293398976326,
0.07722775638103485,
0.1619379073381424,
-0.08227851241827011,
-0.0685737133026123,
0.026232952252030373,
-0.025803634896874428,
-0.1928275227546692,
-0.0245649516582489,
0.057973712682724,
0.007786094676703215,
0.07277403026819229,
-0.059626221656799316,
0.07354560494422913,
0.03835538029670715,
-0.08827587962150574,
-0.03830449655652046,
-0.0033381162211298943,
-0.05543109029531479,
0.10094248503446579,
-0.07088563591241837,
0.09979620575904846,
-0.0020548817701637745,
0.1460668295621872,
0.10601389408111572,
-0.021313292905688286,
0.039605364203453064,
0.019561687484383583,
-0.1826571822166443,
0.08602134883403778,
0.04862946271896362,
0.006737233139574528,
-0.19625666737556458,
-0.22854916751384735,
0.10726147145032883,
0.050382401794195175,
0.09545255452394485,
-0.1220141276717186,
-0.051783327013254166,
-0.07905412465333939,
-0.198363795876503,
-0.06280689686536789,
0.0721212774515152,
-0.012088405899703503,
-0.00665980065241456,
0.19475387036800385,
-2.5425425590771717e-32,
0.02577410638332367,
0.15172240138053894,
-0.051181308925151825,
-0.05277033895254135,
-0.20743387937545776,
0.04456230625510216,
-0.01999177783727646,
-0.18617789447307587,
0.05147653818130493,
-0.131591796875,
-0.20875607430934906,
-0.036961477249860764,
0.04048890247941017,
-0.03883678838610649,
-0.00972381979227066,
-0.09368979930877686,
-0.10620187968015671,
0.010720190592110157,
-0.06741713732481003,
0.013460851274430752,
0.04116252064704895,
-0.14555515348911285,
-0.0684671401977539,
0.15538473427295685,
-0.03653956949710846,
-0.08620410412549973,
-0.18136410415172577,
0.11238699406385422,
0.014853550121188164,
-0.03116697259247303,
0.009999359957873821,
0.1345628947019577,
-0.01218398753553629,
-0.07380944490432739,
-0.03185591474175453,
-0.08845170587301254,
-0.21659396588802338,
-0.0756155401468277,
0.009704336524009705,
0.07368185371160507,
-0.07732653617858887,
0.03867627680301666,
-0.07895407825708389,
-0.12013377249240875,
-0.01101649273186922,
0.0707765519618988,
0.047540340572595596,
0.03274694085121155,
0.02132694609463215,
-0.05520068481564522,
0.1865437775850296,
0.09961062669754028,
-0.006409305613487959,
0.16856351494789124,
0.006964662577956915,
-0.023597044870257378,
0.08370999246835709,
0.018775861710309982,
-0.08738298714160919,
-0.048886753618717194,
0.14634211361408234,
-0.08828946202993393,
0.01518573984503746,
0.02623237855732441,
0.07331287115812302,
-0.04046168550848961,
0.2055017650127411,
-0.01172047108411789,
0.09712093323469162,
-0.1630094200372696,
-0.04914286360144615,
0.12373818457126617,
-0.02251432090997696,
-0.05500900372862816,
-0.011592709459364414,
-0.141636922955513,
0.039617158472537994,
-0.07836739718914032,
0.2267325520515442,
-0.05195007845759392,
0.10125965625047684,
-0.0790848433971405,
-0.08916580677032471,
-0.07937026023864746,
-0.052108846604824066,
0.08783949911594391,
-0.04399269074201584,
-0.0340970903635025,
0.03178414702415466,
0.08041248470544815,
0.05108807608485222,
0.2019173949956894,
-0.22177349030971527,
0.010384905152022839,
-0.09387382864952087,
0.11911770701408386,
-0.07123817503452301,
0.03785224258899689,
-0.07924123853445053,
0.030510270968079567,
-0.011986763216555119,
-0.016448983922600746,
0.17179365456104279,
-0.06765531003475189,
0.09728840738534927,
-0.018505847081542015,
0.14930394291877747,
0.10232292115688324,
-0.15945079922676086,
-0.02517005428671837,
-0.1622043401002884,
-0.018465440720319748,
0.17027704417705536,
0.06379266828298569,
0.10225051641464233,
0.044240884482860565,
-0.10860083252191544,
-0.21702879667282104,
0.1926385909318924,
0.2597705125808716,
-0.127445787191391,
-0.04644832760095596,
-0.15349765121936798,
0.013402572833001614,
0.12976840138435364,
0.09880512207746506,
-0.18263587355613708,
-0.03135860711336136,
0.06994589418172836,
0.018956344574689865,
-0.025014417245984077,
-0.058786045759916306,
8.084964520094218e-7,
-0.1070246696472168,
0.1689961701631546,
-0.05618825554847717,
-0.033654745668172836,
-0.15201108157634735,
0.0019768683705478907,
-0.10912324488162994,
0.316471666097641,
-0.08777350932359695,
0.14255478978157043,
0.00013689111801795661,
0.11689413338899612,
-0.010966310277581215,
-0.015935096889734268,
-0.08431608229875565,
-0.03541639447212219,
-0.05823522061109543,
-0.07272213697433472,
-0.004153289366513491,
-0.054328661412000656,
0.026993397623300552,
0.057697754353284836,
-0.053411953151226044,
-0.03176203742623329,
0.05523931607604027,
-0.0864461213350296,
0.06307750195264816,
-0.13857902586460114,
0.07788170129060745,
-0.013624937273561954,
0.004819202236831188,
-0.0642942562699318,
-0.11378034949302673,
0.15350410342216492,
-0.04086386039853096,
0.09238952398300171,
-0.2918153405189514,
0.03155708312988281,
-0.001359080895781517,
0.09104561805725098,
-0.025130227208137512,
-0.15308433771133423,
0.017749549821019173,
-0.037464555352926254,
0.14092981815338135,
0.18397219479084015,
-0.17331108450889587,
0.09679683297872543,
0.13405728340148926,
-0.06283355504274368,
0.07927019149065018,
0.044803474098443985,
0.09908677637577057,
0.2214091271162033,
-0.0919564738869667,
-0.08543314039707184,
0.12667521834373474,
-0.17745192348957062,
0.09532146155834198,
-0.02392563596367836,
-0.03437799587845802,
0.0661124512553215,
-0.08929231762886047,
0.0844433382153511,
-0.0440090037882328,
-0.08590127527713776,
0.029775220900774002,
1.099474993401366e-34,
0.019659724086523056,
0.013821185566484928,
0.07482006400823593,
-0.21363458037376404,
0.11600565910339355,
-0.05823751911520958,
0.1305323839187622,
0.11093880981206894,
-0.029448220506310463,
-0.24344593286514282,
-0.12466464936733246
] |
https://github.com/huggingface/datasets/issues/5985 | Cannot reuse tokenizer object for dataset map | This is a known issue: https://github.com/huggingface/datasets/issues/3847.
Fixing this requires significant work - rewriting the `tokenizers` lib to make them immutable.
The current solution is to pass `cache_file_name` to `map` to use that file for caching or calling a tokenizer before `map` (with the same set of parameters as the ones in the map transform) | ### Describe the bug
Related to https://github.com/huggingface/transformers/issues/24441. Not sure if this is a tokenizer issue or caching issue, so filing in both.
Passing the tokenizer to the dataset map function causes the tokenizer to be fingerprinted weirdly. After calling the tokenizer with arguments like padding and truncation the tokenizer object changes interanally, even though the hash remains the same.
But dumps is able to detect that internal change which causes the tokenizer object's fingerprint to change.
### Steps to reproduce the bug
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
t.save_pretrained("tok1")
th1 = hash(dumps(t))
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
t.save_pretrained("tok2")
th2 = hash(dumps(t))
assert th1 == th2 # Assertion Error
```
But if you use just the hash of the object without dumps, the hashes don't change
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
th1 = hash(t) # Just hash no dumps
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
th2 = hash(t) # Just hash no dumps
assert th1 == th2 # This is OK
```
This causes situations such as the following
1. Create a text file like this `yes "This is an example text" | head -n 10000 > lines.txt`
```python
from transformers import AutoTokenizer
import datasets
class TokenizeMapper(object):
"""Mapper for tokenizer.
This is needed because the caching mechanism of HuggingFace does not work on
lambdas. Each time a new lambda will be created by a new process which will
lead to a different hash.
This way we can have a universal mapper object in init and reuse it with the same
hash for each process.
"""
def __init__(self, tokenizer):
"""Initialize the tokenizer."""
self.tokenizer = tokenizer
def __call__(self, examples, **kwargs):
"""Run the mapper."""
texts = examples["text"]
tt = self.tokenizer(texts, max_length=256, padding="max_length", truncation=True)
batch_outputs = {
"input_ids": tt.input_ids,
"attention_mask": tt.attention_mask,
}
return batch_outputs
t = AutoTokenizer.from_pretrained('bert-base-uncased')
mapper = TokenizeMapper(t)
ds = datasets.load_dataset("text", data_files="lines.txt")
mds1 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
mds2 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
```
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Expected behavior
We should be able to initialize a tokenizer. And reusing it should let us reuse the same map computation for the same dataset.
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-6.1.31_1-x86_64-with-glibc2.36
- Python version: 3.9.16
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2 | 54 | Cannot reuse tokenizer object for dataset map
### Describe the bug
Related to https://github.com/huggingface/transformers/issues/24441. Not sure if this is a tokenizer issue or caching issue, so filing in both.
Passing the tokenizer to the dataset map function causes the tokenizer to be fingerprinted weirdly. After calling the tokenizer with arguments like padding and truncation the tokenizer object changes interanally, even though the hash remains the same.
But dumps is able to detect that internal change which causes the tokenizer object's fingerprint to change.
### Steps to reproduce the bug
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
t.save_pretrained("tok1")
th1 = hash(dumps(t))
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
t.save_pretrained("tok2")
th2 = hash(dumps(t))
assert th1 == th2 # Assertion Error
```
But if you use just the hash of the object without dumps, the hashes don't change
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
th1 = hash(t) # Just hash no dumps
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
th2 = hash(t) # Just hash no dumps
assert th1 == th2 # This is OK
```
This causes situations such as the following
1. Create a text file like this `yes "This is an example text" | head -n 10000 > lines.txt`
```python
from transformers import AutoTokenizer
import datasets
class TokenizeMapper(object):
"""Mapper for tokenizer.
This is needed because the caching mechanism of HuggingFace does not work on
lambdas. Each time a new lambda will be created by a new process which will
lead to a different hash.
This way we can have a universal mapper object in init and reuse it with the same
hash for each process.
"""
def __init__(self, tokenizer):
"""Initialize the tokenizer."""
self.tokenizer = tokenizer
def __call__(self, examples, **kwargs):
"""Run the mapper."""
texts = examples["text"]
tt = self.tokenizer(texts, max_length=256, padding="max_length", truncation=True)
batch_outputs = {
"input_ids": tt.input_ids,
"attention_mask": tt.attention_mask,
}
return batch_outputs
t = AutoTokenizer.from_pretrained('bert-base-uncased')
mapper = TokenizeMapper(t)
ds = datasets.load_dataset("text", data_files="lines.txt")
mds1 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
mds2 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
```
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Expected behavior
We should be able to initialize a tokenizer. And reusing it should let us reuse the same map computation for the same dataset.
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-6.1.31_1-x86_64-with-glibc2.36
- Python version: 3.9.16
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
This is a known issue: https://github.com/huggingface/datasets/issues/3847.
Fixing this requires significant work - rewriting the `tokenizers` lib to make them immutable.
The current solution is to pass `cache_file_name` to `map` to use that file for caching or calling a tokenizer before `map` (with the same set of parameters as the ones in the map transform) | [
0.1199067085981369,
0.027767449617385864,
-0.004139658994972706,
0.002225374337285757,
0.20467457175254822,
0.017185088247060776,
0.12505604326725006,
0.00036905272281728685,
-0.1904720515012741,
0.015539709478616714,
-0.13409727811813354,
0.05349615216255188,
0.01905348151922226,
0.0215277299284935,
0.008639904670417309,
-0.022877095267176628,
-0.001395335653796792,
0.08264490216970444,
-0.12500545382499695,
-0.06647766381502151,
0.036251068115234375,
0.01739773526787758,
0.13100825250148773,
0.1292923539876938,
-0.15173959732055664,
0.025523370131850243,
-0.1100163459777832,
-0.047665782272815704,
-0.011967110447585583,
-0.027328528463840485,
0.050914593040943146,
0.01750873401761055,
0.003886871738359332,
-0.005950828082859516,
0.000004938060556014534,
0.09246128052473068,
-0.003294509369879961,
-0.055897146463394165,
-0.00827077217400074,
0.03778184950351715,
0.06546797603368759,
0.04957505315542221,
0.035195935517549515,
0.045651089400053024,
-0.16977542638778687,
-0.028728365898132324,
-0.054764989763498306,
0.11792970448732376,
0.35580557584762573,
-0.0076460083946585655,
-0.05024386942386627,
0.07509167492389679,
0.13439615070819855,
-0.06971502304077148,
0.06386711448431015,
-0.03349301964044571,
-0.013714800588786602,
-0.06462423503398895,
-0.2705684006214142,
-0.0958457663655281,
-0.10743314772844315,
-0.0003280912933405489,
-0.004465126898139715,
-0.05485771596431732,
0.09388651698827744,
0.009156919084489346,
-0.20210635662078857,
0.011944027617573738,
0.040384188294410706,
0.00777930673211813,
-0.03352215513586998,
0.0443558469414711,
-0.014799845404922962,
0.09381701797246933,
-0.11586252599954605,
-0.03255700320005417,
-0.01468425989151001,
-0.0798184797167778,
0.11973685026168823,
0.15644913911819458,
-0.1787252575159073,
0.08397164940834045,
0.01428079605102539,
-0.13627038896083832,
-0.2279575616121292,
-0.06950290501117706,
-0.022008614614605904,
0.2715764045715332,
-0.0683533102273941,
-0.10048828274011612,
-0.0627724751830101,
-0.061003394424915314,
-0.1400138884782791,
-0.011228885501623154,
-0.1331307291984558,
-0.015166865661740303,
-0.006860008463263512,
-0.2280348539352417,
-0.015626871958374977,
0.06297273188829422,
0.004815292079001665,
-0.032911788672208786,
-0.14588616788387299,
0.0209843497723341,
-0.0565665178000927,
0.005907605867832899,
0.012477769516408443,
0.09607440233230591,
-0.037860166281461716,
-0.10467976331710815,
-0.30903878808021545,
-0.19990885257720947,
-0.09849514067173004,
0.12316594272851944,
0.335997074842453,
-0.07640399783849716,
0.11019740253686905,
0.15801768004894257,
0.023984134197235107,
-0.0014954686630517244,
-0.08696477860212326,
0.009151998907327652,
-0.10940095037221909,
0.0945068821310997,
0.12493682652711868,
-0.027195783331990242,
-0.05291977897286415,
-0.10444685816764832,
0.011608527973294258,
0.019107578322291374,
-0.0662122443318367,
-0.010172043927013874,
-0.01209115982055664,
0.033393971621990204,
0.08658643811941147,
-0.1432308554649353,
-0.07418373972177505,
-0.072059266269207,
0.0875159204006195,
-0.06811533123254776,
0.06453084945678711,
-0.08581613749265671,
-0.04389791563153267,
-0.02005307748913765,
0.007049372885376215,
0.10959267616271973,
0.10883079469203949,
0.020241674035787582,
0.008365679532289505,
-0.06884851306676865,
-0.17503070831298828,
0.06642060726881027,
0.08915556222200394,
-0.051497023552656174,
-0.11353730410337448,
-0.06056475639343262,
0.21082212030887604,
-0.01536920852959156,
0.0027265623211860657,
-0.03168930113315582,
0.12291833758354187,
0.05042257532477379,
-0.08161993324756622,
-0.14696304500102997,
-0.033894363790750504,
0.10276615619659424,
-0.01657327450811863,
-0.11229973286390305,
0.00027120640152134,
-0.006658276543021202,
0.13247478008270264,
0.1387939751148224,
-0.14739838242530823,
0.10141227394342422,
-0.2578657567501068,
0.2622554898262024,
-0.11891113221645355,
0.032978855073451996,
-0.16573241353034973,
-0.12315554171800613,
-0.10252881795167923,
0.0665714368224144,
-0.004529631696641445,
-0.31438952684402466,
0.1502966731786728,
-0.0338037870824337,
0.09096957743167877,
-0.0655195415019989,
-0.1445886194705963,
-0.07542235404253006,
-0.13610687851905823,
0.08589870482683182,
0.04358050972223282,
-0.3443032205104828,
0.15534615516662598,
0.06564120203256607,
0.046826377511024475,
0.2082701325416565,
-0.0734466016292572,
-0.2706356942653656,
0.2588990032672882,
-0.08078432083129883,
-0.010473128408193588,
0.1446852684020996,
0.06813172250986099,
-0.08632753789424896,
-0.09079068154096603,
0.106437548995018,
0.0174413975328207,
-0.10669811069965363,
-0.1235400140285492,
0.07342658936977386,
-0.023880306631326675,
0.1210966557264328,
-0.194968119263649,
-0.06724847853183746,
0.016742751002311707,
0.049630600959062576,
-0.05767029896378517,
0.14868895709514618,
-0.011003946885466576,
-0.0860588401556015,
0.0926898866891861,
0.06363575905561447,
-0.018108373507857323,
0.10491245985031128,
0.014312165789306164,
-0.06482569128274918,
-0.053360436111688614,
0.04857170581817627,
-0.08260554075241089,
0.06472856551408768,
0.09111116826534271,
-0.11998715251684189,
-0.07010945677757263,
0.11625105142593384,
-0.08293933421373367,
-0.08844292908906937,
0.17787805199623108,
-0.011106619611382484,
-0.07658662647008896,
0.03715582191944122,
-0.12196791917085648,
-0.13330420851707458,
-0.02439780719578266,
0.014969764277338982,
0.23441743850708008,
0.10907024145126343,
0.08124395459890366,
-0.1816357970237732,
0.0935470312833786,
-0.0314791277050972,
-0.13761836290359497,
-0.06599026918411255,
-0.1387375146150589,
-0.16339728236198425,
0.036681678146123886,
0.18560519814491272,
0.022034764289855957,
0.01716252602636814,
0.14868758618831635,
0.11719900369644165,
-0.12016116082668304,
-0.022290529683232307,
0.017535781487822533,
-0.08958929032087326,
-0.11642905324697495,
0.0208477471023798,
0.001405996736139059,
0.05285804346203804,
0.17211651802062988,
-0.05499838665127754,
0.03445272892713547,
0.015787912532687187,
-0.07524558156728745,
-0.19630220532417297,
-0.14917418360710144,
0.07750681787729263,
0.06468883156776428,
0.08006159216165543,
-0.12933507561683655,
0.08068879693746567,
0.21061119437217712,
-0.10496140271425247,
0.02221333235502243,
0.08596094697713852,
-0.22055456042289734,
0.016972851008176804,
-0.2694840431213379,
-0.08045069128274918,
0.07446298748254776,
-0.027738099917769432,
0.028796082362532616,
-0.10698813945055008,
0.07881712168455124,
-0.1261080801486969,
0.11709696799516678,
-0.15628115832805634,
0.18036966025829315,
0.013265088200569153,
-0.07389907538890839,
0.037501104176044464,
-0.05351275950670242,
-0.10920411348342896,
0.017617065459489822,
-0.061156269162893295,
-0.022791367024183273,
0.09952942281961441,
-0.15334923565387726,
-0.18387210369110107,
-0.12254957109689713,
0.04067489877343178,
-0.07001016288995743,
0.016635242849588394,
0.03702026233077049,
0.04015069454908371,
-0.06572446972131729,
-0.32407861948013306,
0.1608407199382782,
-0.07165078073740005,
0.08733142167329788,
0.09604128450155258,
0.024247540161013603,
-0.07901239395141602,
0.031118839979171753,
-0.014026494696736336,
0.19613182544708252,
-0.07921586185693741,
0.11320242285728455,
-0.06749765574932098,
0.009819230064749718,
0.125657856464386,
-0.16591326892375946,
-0.04818018525838852,
-0.03189979866147041,
-0.028840143233537674,
-0.03516267612576485,
-0.08469513058662415,
0.18698707222938538,
-0.04830516502261162,
0.031186744570732117,
-0.09200336039066315,
-0.16584132611751556,
0.005680369678884745,
0.10688219219446182,
-0.019717788323760033,
0.1011848971247673,
-0.07829226553440094,
-0.13433228433132172,
-0.020132530480623245,
0.00786240492016077,
0.006954048294574022,
-0.03429213538765907,
-0.12742337584495544,
-0.10947310924530029,
0.15506158769130707,
-0.011775116436183453,
0.010396406054496765,
-0.05134463682770729,
-0.042274847626686096,
0.06863901764154434,
0.13100191950798035,
0.14133921265602112,
-0.006671035196632147,
-0.04754957929253578,
0.11287494003772736,
0.08797015994787216,
-0.08622264862060547,
0.047457676380872726,
-0.2366379052400589,
0.07140613347291946,
0.0703803077340126,
-0.11458606272935867,
-0.02089635469019413,
-0.05036536604166031,
0.11616349965333939,
0.11932503432035446,
0.023207727819681168,
0.10205056518316269,
-0.12127214670181274,
-0.06888022273778915,
-0.17952750623226166,
-0.005519562400877476,
0.15807169675827026,
0.1967393159866333,
0.15206103026866913,
0.03400152176618576,
-0.008580618537962437,
-0.12303836643695831,
0.09094634652137756,
0.1463082879781723,
-0.12247992306947708,
0.2420218586921692,
-0.09651058167219162,
0.02866041474044323,
-0.0579272098839283,
0.21104951202869415,
0.030864886939525604,
0.006067674607038498,
0.1089002788066864,
0.05320379510521889,
0.061316631734371185,
0.08096075057983398,
0.131694957613945,
0.1248709186911583,
-0.0774448812007904,
0.09187212586402893,
-0.041585616767406464,
0.1383313238620758,
0.07029341906309128,
0.16184478998184204,
0.33106479048728943,
0.0849585011601448,
0.00011524317960720509,
-0.010077130049467087,
0.018014943227171898,
-0.06558045744895935,
-0.0050010764971375465,
0.16276779770851135,
-0.06411655992269516,
-0.13378341495990753,
-0.2733610272407532,
-0.03213997930288315,
0.2522379159927368,
0.13900808990001678,
-0.00911210011690855,
-0.09044001251459122,
-0.2371305525302887,
0.11240475624799728,
0.13928057253360748,
0.08618456870317459,
0.0033660244662314653,
0.19449298083782196,
-0.026768092066049576,
-0.03658077493309975,
-0.08355209976434708,
0.2198093980550766,
-0.13260827958583832,
-0.1854238212108612,
-0.08427462726831436,
0.06277309358119965,
-0.03542081639170647,
0.021631751209497452,
-0.10764743387699127,
0.1277804970741272,
-0.0672520101070404,
-0.0899156779050827,
0.007962843403220177,
0.11827663332223892,
-0.001996113220229745,
-0.14610585570335388,
-0.169545516371727,
-0.003044354496523738,
-0.21237827837467194,
0.115385502576828,
0.01724925823509693,
0.12687325477600098,
-0.1020566076040268,
-0.14909501373767853,
0.16246290504932404,
-0.05062446743249893,
-0.05536798760294914,
0.13660641014575958,
0.09983532130718231,
-0.06673460453748703,
0.18551889061927795,
0.2413529008626938,
0.033202435821294785,
0.042276781052351,
0.016532516106963158,
-0.022961944341659546,
-0.0027388399466872215,
0.030121173709630966,
-0.0671902522444725,
0.09469257295131683,
0.13324269652366638,
-0.09369751065969467,
0.07649388909339905,
0.15327470004558563,
-0.10125751048326492,
0.24107812345027924,
0.08578581362962723,
0.031420979648828506,
0.14714153110980988,
0.0547155998647213,
0.06059907376766205,
0.09552895277738571,
-0.0297038946300745,
-0.08478105068206787,
0.06104588508605957,
-0.09409933537244797,
-0.040026161819696426,
0.0422261618077755,
-0.0013422868214547634,
0.04610223323106766,
0.16040903329849243,
0.10142917186021805,
-0.0050526880659163,
-0.12215863168239594,
0.15040354430675507,
0.1486620008945465,
-0.062229204922914505,
0.04567640274763107,
-0.16878961026668549,
-0.025386620312929153,
-0.11906640976667404,
-0.13589493930339813,
-0.14222316443920135,
0.185139000415802,
-0.034055519849061966,
-0.10006164014339447,
0.1801452785730362,
-0.12654225528240204,
-0.1604195535182953,
-0.10011787712574005,
-0.22319315373897552,
-0.2416515201330185,
0.09691334515810013,
0.020865149796009064,
0.02505601942539215,
-0.012883075512945652,
0.07680042833089828,
-0.010739152319729328,
-0.04976528137922287,
0.04167011007666588,
-0.08034394681453705,
-0.11554104089736938,
-0.004548240918666124,
0.1367516815662384,
0.11133904755115509,
-0.032799117267131805,
0.12533259391784668,
0.06732409447431564,
-0.04904477670788765,
-0.1025843694806099,
0.09920544177293777,
0.08376822620630264,
0.006700027734041214,
0.01192399114370346,
-0.16131386160850525,
0.13165445625782013,
-0.07349815964698792,
-0.013885360211133957,
-0.01997673697769642,
0.02995249070227146,
0.05538357049226761,
-0.06904293596744537,
0.014531468972563744,
-0.01820254512131214,
-0.19694477319717407,
0.16704393923282623,
0.2506603002548218,
0.3412034809589386,
-0.0494786836206913,
0.15539871156215668,
-2.499230881973949e-32,
0.1816561073064804,
0.03893881291151047,
-0.04897889867424965,
-0.11740612983703613,
-0.30080607533454895,
0.12498012185096741,
-0.025385413318872452,
-0.00022818012803327292,
0.1331350952386856,
-0.00020608703198377043,
-0.10744089633226395,
-0.07613856345415115,
0.05891665443778038,
0.061522357165813446,
0.03738921135663986,
0.05520510673522949,
0.0978376641869545,
0.1048005074262619,
-0.11083090305328369,
0.19910332560539246,
0.3091191053390503,
0.09078502655029297,
0.11974583566188812,
0.09121710062026978,
-0.07908514142036438,
0.021154101938009262,
-0.07395073026418686,
-0.13551795482635498,
0.004664176609367132,
0.008658016100525856,
-0.010557244531810284,
0.10520478338003159,
-0.08637472987174988,
-0.029895329847931862,
-0.1365472972393036,
0.035174861550331116,
-0.24749071896076202,
-0.1119551807641983,
-0.023952430114150047,
0.10894849896430969,
0.029091987758874893,
0.038304079324007034,
0.10895318537950516,
-0.15573851764202118,
-0.025372028350830078,
0.055590663105249405,
-0.039621785283088684,
0.05812310054898262,
-0.08749254047870636,
-0.04355783760547638,
-0.0711800754070282,
-0.05650041624903679,
-0.07824274152517319,
-0.007262485567480326,
-0.010950281284749508,
-0.09308309853076935,
0.006558072753250599,
0.10376247018575668,
-0.20120283961296082,
0.08514124155044556,
0.11067637801170349,
-0.11741630733013153,
0.05440323427319527,
0.08510208874940872,
0.1045515164732933,
0.189740851521492,
0.23716241121292114,
-0.041266314685344696,
0.12327830493450165,
-0.16830678284168243,
0.10022912174463272,
0.06752563267946243,
0.0014094122452661395,
-0.09287632256746292,
-0.05337090045213699,
-0.02367796190083027,
-0.020222261548042297,
-0.03844572976231575,
0.020062997937202454,
0.09281544387340546,
0.09876101464033127,
0.12613829970359802,
0.11437183618545532,
-0.036611370742321014,
-0.1935945302248001,
0.0872790664434433,
-0.0073599498718976974,
0.004175993148237467,
-0.06804238259792328,
-0.009837263263761997,
0.040343303233385086,
0.14490537345409393,
-0.10507791489362717,
-0.03586303070187569,
-0.10303841531276703,
-0.011985627934336662,
-0.04845741018652916,
-0.0017030495218932629,
-0.14486205577850342,
0.049921389669179916,
0.132743701338768,
-0.11102982610464096,
0.06642714887857437,
0.010837814770638943,
0.012892460450530052,
0.06697732210159302,
0.2739950716495514,
0.0378519743680954,
-0.19870176911354065,
0.0717601627111435,
0.035525642335414886,
0.028531091287732124,
0.08238894492387772,
0.0004268173943273723,
0.17762184143066406,
-0.056296270340681076,
-0.05638590827584267,
-0.1532382369041443,
0.07209505140781403,
0.16960503160953522,
-0.021154489368200302,
0.09366625547409058,
-0.02387276291847229,
0.09641747921705246,
0.11758832633495331,
0.13010786473751068,
-0.13809272646903992,
-0.12417270243167877,
0.19804620742797852,
-0.12559442222118378,
0.1173182874917984,
-0.10793199390172958,
7.251406373143254e-7,
-0.0241823960095644,
0.0004573905607685447,
0.07308247685432434,
-0.37164071202278137,
-0.07261057198047638,
0.07722015678882599,
-0.23389334976673126,
0.10492970794439316,
-0.18718720972537994,
0.3634922504425049,
-0.07024172693490982,
-0.08356551080942154,
0.00761301489546895,
-0.08499634265899658,
0.05557423457503319,
-0.019261755049228668,
-0.16980329155921936,
-0.03964249789714813,
-0.17219610512256622,
0.044097062200307846,
-0.08827570825815201,
0.004901721607893705,
0.07712163031101227,
0.026683451607823372,
0.06107335910201073,
-0.09733621776103973,
-0.08790011703968048,
0.01706458069384098,
0.03326142206788063,
0.05160394683480263,
0.017895575612783432,
0.004315229598432779,
0.22802770137786865,
0.013237837702035904,
-0.06019364669919014,
0.021983833983540535,
-0.148037850856781,
-0.1499456912279129,
0.08024295419454575,
-0.001830340945161879,
0.009410789236426353,
-0.05995598062872887,
-0.06538882851600647,
-0.12703914940357208,
0.0805039331316948,
-0.1373751312494278,
-0.07165437191724777,
-0.016254452988505363,
-0.07518725097179413,
0.03264646604657173,
0.1037728562951088,
0.167573481798172,
-0.03955201804637909,
0.3385982811450958,
0.10872893035411835,
0.12495045363903046,
0.09246347099542618,
-0.25074705481529236,
0.14879277348518372,
-0.20205651223659515,
-0.22571073472499847,
-0.11316172033548355,
-0.00889093428850174,
-0.016238609328866005,
0.000702603196259588,
-0.2602201998233795,
-0.1110498234629631,
6.540728370351086e-35,
0.01518779993057251,
-0.03733503073453903,
-0.04537298157811165,
-0.031147321686148643,
0.15282298624515533,
-0.11520993709564209,
0.20375557243824005,
0.2806014120578766,
0.06153331696987152,
-0.16350334882736206,
-0.0810190737247467
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
@lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
PS: I don't expect significant speed-up for local, uncompressed Arrow files. | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 86 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
@lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
PS: I don't expect significant speed-up for local, uncompressed Arrow files. | [
-0.24084478616714478,
0.28126290440559387,
-0.0840136855840683,
0.02214287780225277,
-0.12012722343206406,
-0.07367099821567535,
0.29695796966552734,
0.05540955811738968,
-0.14838984608650208,
0.06930417567491531,
-0.004052446689456701,
0.045907508581876755,
-0.2699936628341675,
-0.0346965454518795,
0.06368405371904373,
-0.14817644655704498,
-0.04511512070894241,
0.02052241377532482,
-0.08965151011943817,
-0.07765118777751923,
-0.21477976441383362,
0.0243886299431324,
0.14143355190753937,
-0.13951727747917175,
-0.05772100389003754,
-0.04452585428953171,
-0.10948057472705841,
0.1266438066959381,
0.11127825081348419,
-0.12411443144083023,
0.031799618154764175,
0.13663792610168457,
-0.03980375826358795,
-0.04328162968158722,
0.000005685824362444691,
0.042397305369377136,
0.07069697976112366,
-0.056585632264614105,
-0.017346590757369995,
0.01579437591135502,
0.10472344607114792,
-0.04587150365114212,
0.0776580348610878,
-0.10084037482738495,
0.004089117981493473,
0.08136259019374847,
-0.04392480105161667,
-0.03968479856848717,
0.12795080244541168,
-0.17459262907505035,
-0.04965372011065483,
0.0787743404507637,
-0.0512099526822567,
-0.10805202275514603,
0.006652791518718004,
0.06880252808332443,
-0.04543185979127884,
-0.029772987589240074,
-0.13438166677951813,
-0.01902485452592373,
-0.16912898421287537,
0.03101901151239872,
0.07065046578645706,
0.04912883788347244,
0.19589102268218994,
-0.026455514132976532,
-0.2968420386314392,
-0.07740849256515503,
0.01839323714375496,
-0.04326017200946808,
-0.15009191632270813,
-0.19386863708496094,
-0.018310731276869774,
-0.05036359652876854,
-0.01950809545814991,
-0.17463912069797516,
-0.01793253980576992,
0.04513709992170334,
-0.01757129468023777,
0.04510974511504173,
-0.0136232515797019,
0.02898291125893593,
-0.023765722289681435,
0.07481027394533157,
-0.09912636131048203,
-0.09091364592313766,
0.12145859003067017,
0.08748819679021835,
-0.012480520643293858,
-0.0029341597110033035,
0.1497233659029007,
-0.04950273782014847,
-0.01141589879989624,
-0.08724962174892426,
-0.13730357587337494,
-0.010932018049061298,
-0.08280397206544876,
-0.055434443056583405,
0.06854089349508286,
0.009482698515057564,
0.033576540648937225,
0.03294669836759567,
-0.02809017151594162,
0.10247749835252762,
-0.04912233352661133,
-0.261271208524704,
0.024587884545326233,
-0.09557575732469559,
-0.03743509575724602,
-0.032452311366796494,
0.04674617946147919,
0.1538705974817276,
-0.0837290808558464,
-0.14278215169906616,
0.12595781683921814,
0.05788701772689819,
0.2222752869129181,
0.19279733300209045,
0.0073941051959991455,
-0.025570744648575783,
0.10897254198789597,
-0.08232742547988892,
-0.016359694302082062,
0.009031405672430992,
0.1784290075302124,
-0.04519503936171532,
-0.13269488513469696,
-0.03369799256324768,
0.00407599238678813,
-0.12240903079509735,
0.030025118961930275,
0.01621999405324459,
0.05849054828286171,
0.08911270648241043,
0.12445670366287231,
-0.10723596066236496,
-0.039966829121112823,
-0.19927726686000824,
0.032427769154310226,
-0.04453526809811592,
0.11631183326244354,
0.02068166434764862,
-0.028861669823527336,
-0.1418798416852951,
0.05822450667619705,
0.037004075944423676,
-0.02379555068910122,
0.10845878720283508,
-0.1280219703912735,
0.10446088761091232,
0.10041723400354385,
0.021659215912222862,
-0.17703229188919067,
0.17155396938323975,
-0.12411344051361084,
0.12829439342021942,
-0.05321623384952545,
-0.16442005336284637,
-0.11122435331344604,
0.03261375427246094,
0.11171098053455353,
-0.0779835507273674,
-0.15087994933128357,
-0.04484153166413307,
-0.02727602608501911,
0.20373082160949707,
0.10599641501903534,
0.05220160633325577,
-0.11144137382507324,
-0.22734153270721436,
0.0899805948138237,
-0.10613100975751877,
-0.07895807176828384,
-0.1753159463405609,
0.010956565849483013,
0.24324387311935425,
0.051839303225278854,
0.11537422239780426,
-0.11748498678207397,
0.05181809142231941,
0.004594794008880854,
-0.08680956810712814,
0.0569625198841095,
0.0500829853117466,
0.32390761375427246,
-0.1560021936893463,
0.023831330239772797,
0.13390491902828217,
-0.11374515295028687,
0.0216956939548254,
0.07537835091352463,
0.11988130956888199,
-0.0398503877222538,
0.17923031747341156,
-0.015831200405955315,
-0.02016396075487137,
0.06621375679969788,
-0.2024606168270111,
0.14200982451438904,
-0.08853334188461304,
-0.010401311330497265,
-0.05830058455467224,
0.028079722076654434,
0.03135782107710838,
0.20309370756149292,
-0.03067082352936268,
-0.17395931482315063,
0.16044946014881134,
0.14417526125907898,
-0.20395438373088837,
-0.06672019511461258,
0.043464530259370804,
0.032642051577568054,
-0.05598387122154236,
-0.12920382618904114,
0.13596032559871674,
-0.0952850729227066,
0.10338220000267029,
-0.12711478769779205,
-0.015535879880189896,
-0.1064532920718193,
0.08602044731378555,
-0.002224323572590947,
0.09023629128932953,
-0.13819532096385956,
0.06181637942790985,
0.04717084392905235,
-0.07974523305892944,
0.16228584945201874,
-0.031197713688015938,
-0.06431207805871964,
-0.1351780742406845,
0.20738598704338074,
0.07483439892530441,
-0.05552636459469795,
0.08006873726844788,
0.01707112044095993,
-0.0497644878923893,
0.06537375599145889,
0.021718624979257584,
-0.12499154359102249,
-0.07722952216863632,
-0.056086216121912,
-0.00518100056797266,
0.04122320935130119,
0.12708672881126404,
-0.06385636329650879,
-0.0022113013546913862,
-0.03656914085149765,
-0.09484568983316422,
0.006699391175061464,
0.14249466359615326,
-0.05591652914881706,
0.04366808757185936,
0.011669255793094635,
-0.07328489422798157,
0.14060622453689575,
0.12024030089378357,
-0.012149800546467304,
0.043581753969192505,
0.0893297791481018,
-0.04610007628798485,
-0.014962236396968365,
-0.042391590774059296,
0.005209037102758884,
0.01409963145852089,
0.14970050752162933,
0.16258031129837036,
0.058365389704704285,
-0.0021569503005594015,
0.1684885174036026,
-0.07487331330776215,
-0.05038274824619293,
-0.02429531328380108,
-0.03349070996046066,
-0.18608571588993073,
0.026948735117912292,
0.15162920951843262,
0.04604516550898552,
-0.1320742517709732,
-0.11350994557142258,
-0.000754866108763963,
0.09101652354001999,
-0.14921975135803223,
0.11365517973899841,
-0.03758871555328369,
-0.0005115187377668917,
0.05112488567829132,
-0.22326023876667023,
-0.1325705647468567,
-0.04000142961740494,
-0.19436120986938477,
-0.016528354957699776,
0.050413839519023895,
0.14640343189239502,
-0.05045478045940399,
0.05784831941127777,
0.1544337123632431,
-0.0472731776535511,
-0.14968739449977875,
-0.06931816041469574,
0.08636545389890671,
0.08507147431373596,
0.013805177062749863,
0.059335142374038696,
0.12617455422878265,
0.1205466017127037,
0.023443209007382393,
-0.01423718687146902,
-0.10505474358797073,
0.12924759089946747,
-0.03825872018933296,
0.013543178327381611,
-0.11085184663534164,
0.08548621833324432,
-0.11940491944551468,
-0.03209454566240311,
-0.2731606066226959,
0.012234663590788841,
-0.042304180562496185,
0.00019204558338969946,
-0.007328045554459095,
-0.06692763417959213,
0.06219695881009102,
-0.05454389750957489,
-0.005190645810216665,
-0.25736090540885925,
-0.08600383996963501,
0.0420319065451622,
0.19804969429969788,
0.03770769387483597,
-0.1382519006729126,
0.0949353575706482,
-0.05765298008918762,
0.09320846945047379,
-0.0475788451731205,
-0.052324067801237106,
-0.10531328618526459,
0.2866794466972351,
-0.08147110044956207,
-0.002238566754385829,
-0.11561018228530884,
-0.11277955025434494,
-0.08133313804864883,
0.2002975195646286,
0.10975772887468338,
0.07850252091884613,
-0.1790561079978943,
0.04878958687186241,
0.09511809796094894,
0.03919537737965584,
0.023172631859779358,
0.004499755334109068,
-0.07234806567430496,
-0.15117046236991882,
0.08789528161287308,
-0.03536805137991905,
-0.06101738288998604,
-0.05465373769402504,
0.024953681975603104,
0.05748656764626503,
0.1710413545370102,
0.3255261480808258,
-0.1802690476179123,
-0.14838778972625732,
0.06869529187679291,
0.0905548706650734,
-0.09536077827215195,
0.12756948173046112,
-0.1775897592306137,
-0.029380444437265396,
0.03717152029275894,
0.07027676701545715,
-0.09979397803544998,
-0.12504468858242035,
-0.09084908664226532,
0.0761738047003746,
-0.15512195229530334,
0.03838612884283066,
-0.15135227143764496,
-0.015738587826490402,
-0.1338471919298172,
0.021536074578762054,
-0.09953000396490097,
0.07188516110181808,
0.08775508403778076,
0.01875763200223446,
-0.00964427087455988,
-0.017606833949685097,
0.2364199161529541,
-0.05974213406443596,
0.16452495753765106,
0.12281941622495651,
-0.10205771028995514,
0.0208006352186203,
-0.03725742548704147,
-0.046539705246686935,
0.10131203383207321,
0.01758241094648838,
0.06291290372610092,
0.09414549916982651,
0.21163451671600342,
0.020933814346790314,
0.07516331970691681,
-0.1396094560623169,
0.01280173845589161,
0.0644095242023468,
0.02198207937180996,
0.13284729421138763,
0.03215179592370987,
0.013448675163090229,
-0.029511554166674614,
-0.13019035756587982,
-0.029273658990859985,
0.15824875235557556,
-0.042373206466436386,
-0.004337383434176445,
-0.1018342599272728,
0.08693002164363861,
0.09959227591753006,
-0.1118951067328453,
-0.02159908041357994,
0.05231226235628128,
0.03140992298722267,
-0.04083762317895889,
0.0086599700152874,
-0.21102605760097504,
0.04987189173698425,
0.19433653354644775,
0.03472388535737991,
-0.003206637455150485,
0.09256722033023834,
0.10535760223865509,
0.08325589448213577,
0.11551793664693832,
0.04234795272350311,
0.1290149837732315,
-0.1270313709974289,
-0.11462058871984482,
-0.03302523121237755,
0.05468757078051567,
0.016226163133978844,
0.14121447503566742,
-0.07210314273834229,
-0.11591748148202896,
0.013001848012208939,
-0.19376240670681,
-0.05971654877066612,
-0.12627749145030975,
0.0019280429696664214,
-0.17119213938713074,
-0.06210736930370331,
-0.07441213726997375,
-0.045825179666280746,
0.03087759017944336,
-0.0028513059951364994,
0.10604622215032578,
-0.0820288434624672,
-0.036270372569561005,
0.09051783382892609,
0.019552715122699738,
-0.03379884362220764,
-0.0018401364795863628,
-0.048474688082933426,
-0.04457712918519974,
0.3322068154811859,
0.08129233121871948,
-0.12664863467216492,
0.02133280597627163,
-0.10459773242473602,
-0.08671052008867264,
0.010339225642383099,
0.046080030500888824,
-0.016807131469249725,
0.29811325669288635,
0.0621768943965435,
-0.021298734471201897,
-0.006736410781741142,
-0.08369459956884384,
-0.12469492852687836,
0.22145994007587433,
-0.1326676458120346,
0.02285771071910858,
0.0036232094280421734,
-0.05894143506884575,
0.11044024676084518,
-0.016866091638803482,
-0.00991526897996664,
-0.15612910687923431,
0.17326828837394714,
-0.08605444431304932,
-0.1512780338525772,
-0.060597747564315796,
0.08732952922582626,
0.2044305056333542,
-0.1270068883895874,
-0.15585578978061676,
0.043325357139110565,
0.04512118175625801,
0.07085076719522476,
-0.06507191807031631,
-0.07527364790439606,
0.02462674304842949,
0.03786128759384155,
-0.08046509325504303,
-0.1484452784061432,
0.02641640044748783,
-0.20571717619895935,
0.1133456751704216,
-0.006750969216227531,
-0.1626940667629242,
0.0015718650538474321,
-0.11929144710302353,
-0.16501684486865997,
0.09185419231653214,
0.016769781708717346,
0.016584329307079315,
0.18633580207824707,
0.12969426810741425,
-0.09310299158096313,
-0.033727485686540604,
0.13344384729862213,
-0.019693726673722267,
0.010670792311429977,
-0.009389329701662064,
-0.08847171813249588,
0.08559998124837875,
-0.06616579741239548,
-0.07973073422908783,
-0.04161979258060455,
0.1644403040409088,
-0.0017651644302532077,
0.1195036843419075,
-0.07080592960119247,
-0.0818721354007721,
0.018885377794504166,
0.07598906010389328,
0.031171726062893867,
-0.03362724184989929,
0.023580282926559448,
0.10874449461698532,
-0.07351326197385788,
-0.2621546685695648,
0.26295214891433716,
0.09766710549592972,
-0.1314174085855484,
-0.08628443628549576,
-0.04420950263738632,
-0.0008140938589349389,
-0.14207854866981506,
0.10661395639181137,
0.15362749993801117,
0.04682626202702522,
-0.08957844227552414,
-0.11547377705574036,
-2.6804224628304596e-32,
0.07106796652078629,
-0.027615029364824295,
0.01971406862139702,
0.129142165184021,
-0.08484265953302383,
-0.17722173035144806,
-0.052390776574611664,
-0.17458738386631012,
0.0319889672100544,
-0.062213849276304245,
-0.1313241571187973,
0.15642865002155304,
0.09563139081001282,
-0.03394148498773575,
0.02397415228188038,
-0.039330627769231796,
0.14163672924041748,
-0.02701880782842636,
-0.03545171022415161,
0.06730952113866806,
0.04347429424524307,
-0.04838559031486511,
0.10420297831296921,
0.2949024736881256,
-0.10972702503204346,
-0.134664386510849,
-0.11004563421010971,
-0.063601553440094,
-0.1342262178659439,
-0.2882567048072815,
0.01819884590804577,
0.0733371376991272,
-0.023080304265022278,
-0.037595514208078384,
-0.046225015074014664,
0.1479925960302353,
-0.27504971623420715,
-0.05942675471305847,
-0.020260510966181755,
0.011587584391236305,
-0.11014020442962646,
0.1434532105922699,
0.17371362447738647,
-0.05693764239549637,
0.06593716889619827,
0.1954692006111145,
0.07055814564228058,
0.04634174704551697,
-0.05984439328312874,
-0.10873272269964218,
0.15947215259075165,
0.07996166497468948,
-0.013238669373095036,
0.005221520084887743,
0.03019179217517376,
-0.04451014846563339,
0.12006960064172745,
-0.09293434023857117,
-0.2865409255027771,
0.15680767595767975,
0.006383462809026241,
-0.058523427695035934,
-0.04397214576601982,
0.12064927816390991,
0.07634246349334717,
0.019087035208940506,
0.07783794403076172,
0.09599953889846802,
0.29881173372268677,
-0.01657656393945217,
-0.013777820393443108,
0.1445494145154953,
-0.08406710624694824,
-0.06155022978782654,
-0.08090788125991821,
0.02561279758810997,
-0.07784276455640793,
0.05493168532848358,
0.023023294284939766,
0.06332570314407349,
0.08157261461019516,
-0.007776744198054075,
0.0022347860503941774,
0.02740231156349182,
0.05267244949936867,
-0.026070037856698036,
0.15559157729148865,
0.09194815158843994,
-0.033639829605817795,
0.06292064487934113,
-0.08852358162403107,
0.12211234867572784,
0.042211536318063736,
-0.015298232436180115,
0.09822461009025574,
0.18565481901168823,
0.0008244166383519769,
0.05278221145272255,
-0.014222554862499237,
-0.006698642857372761,
0.03648051247000694,
0.004703155253082514,
0.03898214176297188,
-0.07723700255155563,
0.04118281602859497,
-0.05061104893684387,
0.18895576894283295,
0.017878945916891098,
-0.17871807515621185,
-0.001247738371603191,
-0.07915152609348297,
-0.03476768732070923,
0.036572545766830444,
0.07313574105501175,
0.16199108958244324,
0.05407467111945152,
0.12254197150468826,
-0.05782509222626686,
0.10738655924797058,
-0.013146252371370792,
-0.05226517468690872,
0.02181476540863514,
-0.041390832513570786,
-0.09726878255605698,
-0.0054952604696154594,
0.11905594170093536,
-0.1595500111579895,
-0.12546393275260925,
0.1163647323846817,
-0.09520983695983887,
-0.008166207931935787,
0.0076844519935548306,
7.675723736610962e-7,
-0.12617233395576477,
0.011205296963453293,
-0.024559607729315758,
0.1059885323047638,
-0.057141248136758804,
-0.019786883145570755,
0.018159355968236923,
0.1285436898469925,
-0.007079343311488628,
0.1458403468132019,
0.06899671256542206,
0.036612369120121,
-0.03134658932685852,
0.19578881561756134,
-0.029379816725850105,
-0.029209226369857788,
-0.1104174479842186,
0.21160127222537994,
-0.07697256654500961,
-0.15855687856674194,
0.049053799360990524,
0.14822626113891602,
-0.05121965706348419,
-0.03144536912441254,
0.06153980642557144,
-0.028980890288949013,
-0.0642031654715538,
0.09539104998111725,
-0.032978933304548264,
0.05076957494020462,
0.02728775329887867,
-0.07865678519010544,
-0.08934779465198517,
0.0978531539440155,
-0.07749076187610626,
0.03217107430100441,
-0.23298656940460205,
-0.0016694489168003201,
0.10990652441978455,
0.12075977027416229,
0.15182852745056152,
-0.06955381482839584,
-0.025929467752575874,
0.026451202109456062,
0.10900098830461502,
0.18379724025726318,
-0.0990985557436943,
0.21042092144489288,
-0.0023466250859200954,
-0.17289531230926514,
0.01554847601801157,
0.10763075202703476,
-0.04050969332456589,
0.30814892053604126,
-0.06110285967588425,
0.042220339179039,
0.07492487877607346,
-0.1560012549161911,
-0.039280444383621216,
-0.056384120136499405,
0.021731186658143997,
-0.0018223428633064032,
0.07092925906181335,
0.047644808888435364,
0.08980336040258408,
-0.04319533333182335,
-0.015452227555215359,
1.1984961579562392e-34,
0.09452929347753525,
0.12052787095308304,
-0.1566840410232544,
0.02863035351037979,
0.031504690647125244,
-0.08049924671649933,
-0.19941973686218262,
0.08879049867391586,
0.07773689180612564,
-0.30999910831451416,
-0.2306061089038849
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | Alternatively we could support multiprocessing map for iterable datasets and let the user do the CPU intensive task there ?
This way it would work on arrow data but also on any iterable dataset | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 34 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
Alternatively we could support multiprocessing map for iterable datasets and let the user do the CPU intensive task there ?
This way it would work on arrow data but also on any iterable dataset | [
-0.23135952651500702,
0.269273042678833,
-0.07565662264823914,
0.003619519993662834,
-0.09512832015752792,
-0.12201754003763199,
0.33130720257759094,
-0.014463820494711399,
-0.05470122769474983,
0.10706881433725357,
-0.02407386526465416,
0.09551069885492325,
-0.292359858751297,
-0.04463363066315651,
0.03511400893330574,
-0.0981968492269516,
-0.03599143028259277,
0.00404494721442461,
-0.07187999784946442,
-0.11014065891504288,
-0.23921047151088715,
0.01854184828698635,
0.16602420806884766,
-0.17148612439632416,
-0.06266426295042038,
-0.017205221578478813,
-0.10190539062023163,
0.06659501045942307,
0.12820445001125336,
-0.12011779099702835,
0.014662076719105244,
0.1247156634926796,
-0.011999365873634815,
-0.062265411019325256,
0.000005649793365591904,
0.06443380564451218,
0.037270501255989075,
-0.03874659165740013,
0.005237341392785311,
-0.05722518637776375,
0.10685960948467255,
-0.06987598538398743,
0.09584787487983704,
-0.09100320190191269,
-0.009247801266610622,
0.15903861820697784,
-0.01982920616865158,
-0.06131860613822937,
0.14838825166225433,
-0.2170381098985672,
-0.05082962289452553,
0.1046050488948822,
-0.050010502338409424,
-0.1250564604997635,
-0.07805085182189941,
0.07469210028648376,
-0.05482575669884682,
-0.037782542407512665,
-0.155263289809227,
-0.055181581526994705,
-0.17799286544322968,
0.03361155092716217,
0.04712890461087227,
0.07855109125375748,
0.15305595099925995,
-0.009614131413400173,
-0.2824653685092926,
-0.0811033695936203,
0.02327960915863514,
-0.04835392162203789,
-0.14926767349243164,
-0.20009344816207886,
-0.0013844403438270092,
-0.03584091365337372,
-0.029620135203003883,
-0.14147497713565826,
0.017117071896791458,
0.0071450090035796165,
-0.0063317022286355495,
0.0059492262080311775,
-0.05197472870349884,
0.042169082909822464,
0.0010994948679581285,
0.07829135656356812,
-0.1044403538107872,
-0.050939444452524185,
0.1367190182209015,
0.07101233303546906,
-0.004031600896269083,
-0.016003070399165154,
0.1621868908405304,
-0.03748619183897972,
0.03388750180602074,
-0.07537166029214859,
-0.15233273804187775,
-0.03220481052994728,
-0.12057555466890335,
-0.0643615797162056,
0.059679239988327026,
0.004249636083841324,
0.014964220114052296,
-0.013784559443593025,
-0.05554249882698059,
0.12666313350200653,
-0.051652729511260986,
-0.26009464263916016,
0.00606332765892148,
-0.06938674300909042,
-0.011233351193368435,
-0.06532353162765503,
0.06615229696035385,
0.12769651412963867,
-0.07776033133268356,
-0.14465701580047607,
0.17159892618656158,
0.057086698710918427,
0.22211302816867828,
0.18461331725120544,
-0.01561996154487133,
-0.06189636513590813,
0.09616560488939285,
-0.07567930966615677,
-0.03614057973027229,
0.052825164049863815,
0.17892225086688995,
-0.04534989222884178,
-0.12223529070615768,
-0.017823586240410805,
0.005975004285573959,
-0.11523707211017609,
0.02422664500772953,
0.011460088193416595,
0.07493828237056732,
0.08538968861103058,
0.20101583003997803,
-0.024421105161309242,
-0.0033818541560322046,
-0.20234599709510803,
-0.004166063386946917,
-0.033378176391124725,
0.10158875584602356,
0.01534912921488285,
-0.023916037753224373,
-0.12561798095703125,
0.0770573541522026,
0.031237313523888588,
-0.02280777506530285,
0.08105301111936569,
-0.1537729650735855,
0.09582734107971191,
0.09006932377815247,
0.05400829389691353,
-0.13380062580108643,
0.16563265025615692,
-0.1337684839963913,
0.11627233773469925,
-0.03765520453453064,
-0.14749900996685028,
-0.09467024356126785,
0.044793304055929184,
0.13381993770599365,
-0.05092356726527214,
-0.17420555651187897,
-0.04788471758365631,
-0.012167848646640778,
0.22013001143932343,
0.10211794823408127,
0.03391193598508835,
-0.14363646507263184,
-0.2264358252286911,
0.07007497549057007,
-0.13657818734645844,
-0.06776272505521774,
-0.16477669775485992,
0.017333131283521652,
0.25271645188331604,
0.024485990405082703,
0.13669785857200623,
-0.14507032930850983,
0.005031751934438944,
-0.014637691900134087,
-0.058849260210990906,
0.02680569887161255,
0.06809724867343903,
0.2936793565750122,
-0.18720276653766632,
-0.033059027045965195,
0.12237624824047089,
-0.09853421151638031,
0.027788953855633736,
0.07018578797578812,
0.08916057646274567,
-0.009959999471902847,
0.21722587943077087,
-0.01875847950577736,
0.006899566855281591,
0.05297417193651199,
-0.10926897078752518,
0.0969911590218544,
-0.0902140885591507,
-0.0029044211842119694,
-0.08028528839349747,
0.017729587852954865,
0.042625896632671356,
0.1772853136062622,
-0.039920177310705185,
-0.18720883131027222,
0.2075432389974594,
0.22624047100543976,
-0.20168748497962952,
-0.11442527920007706,
0.0899604856967926,
0.07422499358654022,
-0.04087910056114197,
-0.16337116062641144,
0.05436792969703674,
-0.09493311494588852,
0.0872916653752327,
-0.14973288774490356,
-0.053995806723833084,
-0.10154084861278534,
0.10001294314861298,
0.009213176555931568,
0.06716760993003845,
-0.16545464098453522,
0.09113655239343643,
0.01773577742278576,
-0.04412666708230972,
0.12548737227916718,
-0.02662372775375843,
-0.049131520092487335,
-0.08010692894458771,
0.1928374171257019,
0.08670708537101746,
-0.03401033952832222,
0.10809925943613052,
-0.006070663686841726,
0.01520091388374567,
0.06316445767879486,
-0.02475387044250965,
-0.11991363018751144,
-0.05710744485259056,
-0.04835793003439903,
-0.004226473160088062,
0.03295085206627846,
0.11731422692537308,
-0.08832200616598129,
0.007482089567929506,
-0.047628939151763916,
-0.09518709033727646,
0.037091322243213654,
0.14990082383155823,
-0.06867404282093048,
0.053302161395549774,
0.006132623180747032,
-0.04511171951889992,
0.19011667370796204,
0.1402711272239685,
0.035565782338380814,
0.04036837816238403,
0.09000927954912186,
-0.03340831398963928,
0.007730554789304733,
-0.04479304328560829,
0.015150055289268494,
-0.0018503229366615415,
0.13157100975513458,
0.1380511373281479,
0.038183726370334625,
0.007445450872182846,
0.17936959862709045,
-0.035419054329395294,
-0.061219315975904465,
-0.0025354926474392414,
-0.027815047651529312,
-0.1400478184223175,
0.03552694246172905,
0.16457073390483856,
0.03852415829896927,
-0.11625678837299347,
-0.1033780425786972,
0.0029046658892184496,
0.11828871071338654,
-0.17424476146697998,
0.1197475716471672,
-0.04509560391306877,
-0.00927684549242258,
0.09560806304216385,
-0.21578960120677948,
-0.15122173726558685,
-0.07622754573822021,
-0.16125313937664032,
-0.033604539930820465,
0.0482492633163929,
0.11935027688741684,
-0.0414290577173233,
0.06717413663864136,
0.16792048513889313,
-0.07324711978435516,
-0.15567287802696228,
-0.033498186618089676,
0.05538511648774147,
0.08921843022108078,
-0.03045160323381424,
0.03475993871688843,
0.0695948451757431,
0.12253231555223465,
0.08667250722646713,
-0.014466527849435806,
-0.10470986366271973,
0.09211505204439163,
-0.04167143628001213,
0.019144702702760696,
-0.11990159004926682,
0.08628534525632858,
-0.144831582903862,
-0.005309322848916054,
-0.254388689994812,
0.001067295321263373,
-0.0601261630654335,
0.009504349902272224,
-0.009002096019685268,
-0.028495755046606064,
0.08010030537843704,
-0.01631821133196354,
-0.04024168848991394,
-0.2698816955089569,
-0.06588257104158401,
0.023749055340886116,
0.1670268028974533,
0.04317498207092285,
-0.09983747452497482,
0.07029274851083755,
-0.10704432427883148,
0.12345188111066818,
-0.06872211396694183,
-0.07984626293182373,
-0.08671046048402786,
0.25462478399276733,
-0.1160813495516777,
0.009728771634399891,
-0.10567688941955566,
-0.1061234399676323,
-0.09332164376974106,
0.15435920655727386,
0.11436841636896133,
0.04391362518072128,
-0.16773691773414612,
0.004071968607604504,
0.07922245562076569,
0.028049403801560402,
0.03409304469823837,
0.018194003030657768,
-0.03102749213576317,
-0.18072476983070374,
0.07266261428594589,
-0.009318649768829346,
-0.054244816303253174,
-0.07552385330200195,
-0.01822824776172638,
0.02845291793346405,
0.18705199658870697,
0.2751309275627136,
-0.19945186376571655,
-0.1452457755804062,
0.06695311516523361,
0.1382584273815155,
-0.10223376750946045,
0.18435637652873993,
-0.20689137279987335,
-0.016223842278122902,
0.03564814478158951,
0.05506027862429619,
-0.10161621868610382,
-0.14922933280467987,
-0.0755956843495369,
0.07988811284303665,
-0.1695154309272766,
0.04223020002245903,
-0.13806363940238953,
-0.052078332751989365,
-0.09937530755996704,
0.007986118085682392,
-0.049167145043611526,
0.09530720114707947,
0.049772366881370544,
0.041951850056648254,
-0.010812193155288696,
-0.03244379162788391,
0.19063591957092285,
-0.07390718162059784,
0.13393324613571167,
0.10822709649801254,
-0.1021641418337822,
0.026937207207083702,
-0.044560689479112625,
-0.03627942502498627,
0.05193905904889107,
0.029278576374053955,
0.023377714678645134,
0.10196153074502945,
0.2816441059112549,
0.051815465092659,
0.09204398840665817,
-0.12494855374097824,
-0.04345305263996124,
0.06212909519672394,
0.06944188475608826,
0.11239631474018097,
0.06580101698637009,
0.011491327546536922,
-0.023942945525050163,
-0.12100494652986526,
-0.012422711588442326,
0.15659302473068237,
-0.05416861176490784,
-0.004271409474313259,
-0.13194292783737183,
0.07528191059827805,
0.09031832218170166,
-0.06574172526597977,
-0.033559754490852356,
0.023239005357027054,
0.07533321529626846,
-0.047752745449543,
0.027615925297141075,
-0.19966043531894684,
0.06419600546360016,
0.19101779162883759,
0.042007528245449066,
-0.033766161650419235,
0.077904611825943,
0.11746829748153687,
0.13321605324745178,
0.10688494890928268,
0.060395848006010056,
0.11258186399936676,
-0.17580178380012512,
-0.0768023133277893,
-0.02092503011226654,
0.06838905811309814,
0.013360057957470417,
0.11659814417362213,
-0.04891824722290039,
-0.13130730390548706,
0.03473128005862236,
-0.20646865665912628,
-0.10396571457386017,
-0.1123037114739418,
-0.013052850030362606,
-0.10020913183689117,
-0.05249324068427086,
-0.09083172678947449,
-0.04043058305978775,
0.0663224309682846,
0.022473357617855072,
0.12190967053174973,
-0.12760691344738007,
-0.04033953323960304,
0.05865864083170891,
0.03773556649684906,
-0.029788441956043243,
-0.045616570860147476,
-0.05841394141316414,
-0.03296460956335068,
0.39064761996269226,
0.13315080106258392,
-0.16452276706695557,
0.0013879212783649564,
-0.062442827969789505,
-0.10997097194194794,
0.024844512343406677,
0.05167249217629433,
-0.0028125308454036713,
0.29406362771987915,
0.04802020639181137,
-0.031215472146868706,
-0.024074416607618332,
-0.07763408124446869,
-0.13513004779815674,
0.23996970057487488,
-0.10524314641952515,
-0.022233903408050537,
-0.0020536582451313734,
-0.042593877762556076,
0.12005036324262619,
-0.0021279072389006615,
-0.028271377086639404,
-0.1637457013130188,
0.26046663522720337,
-0.08698087185621262,
-0.14666114747524261,
-0.01497562974691391,
0.07637817412614822,
0.24405261874198914,
-0.10204790532588959,
-0.15570068359375,
0.07723022997379303,
0.09026259928941727,
0.11339554935693741,
-0.061748407781124115,
-0.08337850123643875,
0.028650294989347458,
0.03582789748907089,
-0.00869961641728878,
-0.14270563423633575,
0.006867646239697933,
-0.20421065390110016,
0.10610578954219818,
-0.03426963835954666,
-0.16714517772197723,
0.03204764425754547,
-0.1361599564552307,
-0.20599424839019775,
0.04436047747731209,
-0.0010886205127462745,
-0.0005394718609750271,
0.21371836960315704,
0.15728189051151276,
-0.06650198996067047,
-0.06427459418773651,
0.1274278163909912,
-0.0033287073019891977,
0.01285351812839508,
0.0373193584382534,
-0.12469480186700821,
0.047183867543935776,
-0.029469545930624008,
-0.0660383477807045,
-0.03478538617491722,
0.14340758323669434,
0.005696573760360479,
0.0973750427365303,
-0.08322809636592865,
-0.08440230786800385,
-0.043424155563116074,
0.04075445607304573,
0.0335722416639328,
-0.02718893438577652,
0.00966021791100502,
0.11047092825174332,
-0.0731133371591568,
-0.24862301349639893,
0.2401864379644394,
0.12457242608070374,
-0.1375177800655365,
-0.09574641287326813,
-0.06643794476985931,
-0.028201278299093246,
-0.16296814382076263,
0.0923890471458435,
0.18094001710414886,
0.08340055495500565,
-0.0962405726313591,
-0.07677964866161346,
-2.585877746067411e-32,
0.047219548374414444,
-0.06900512427091599,
0.006051313132047653,
0.09215284883975983,
-0.07709000259637833,
-0.13113051652908325,
-0.05780838429927826,
-0.15989819169044495,
0.059870194643735886,
-0.07045964896678925,
-0.11080481857061386,
0.13500981032848358,
0.09896247833967209,
-0.058279186487197876,
0.00954445544630289,
-0.04509199038147926,
0.15077921748161316,
0.0017567954491823912,
-0.04645979776978493,
0.06080665439367294,
0.05103602632880211,
-0.016655653715133667,
0.09322360157966614,
0.22656066715717316,
-0.11126480251550674,
-0.12845320999622345,
-0.14683416485786438,
-0.06780952960252762,
-0.17414970695972443,
-0.23744304478168488,
0.036212995648384094,
0.11248241364955902,
-0.03675292432308197,
-0.021918704733252525,
-0.06244269758462906,
0.18207502365112305,
-0.28050321340560913,
-0.08184462785720825,
-0.057026494294404984,
-0.00191085459664464,
-0.12361784279346466,
0.14561402797698975,
0.17508910596370697,
-0.056767258793115616,
0.09498132020235062,
0.18007737398147583,
0.10583224892616272,
0.058667853474617004,
-0.05343932658433914,
-0.05756362900137901,
0.16144363582134247,
0.062175601720809937,
-0.005627381149679422,
-0.011068189516663551,
0.07091587036848068,
-0.008341899141669273,
0.1309145987033844,
-0.051335033029317856,
-0.23968982696533203,
0.18206743896007538,
0.030958889052271843,
-0.10967525094747543,
0.002779052359983325,
0.14803873002529144,
0.0760016143321991,
-0.00040893774712458253,
0.06115027144551277,
0.06898202002048492,
0.30586761236190796,
-0.048579007387161255,
-0.0739116221666336,
0.17450354993343353,
-0.121299147605896,
-0.05081432685256004,
-0.07905221730470657,
-0.005813713651150465,
-0.07690021395683289,
-0.013430015183985233,
-0.037424132227897644,
0.08910202980041504,
0.07927996665239334,
-0.028369924053549767,
0.05087631568312645,
0.014194500632584095,
0.013824875466525555,
0.027688706293702126,
0.17594000697135925,
0.07406789064407349,
-0.0671321302652359,
0.02805934101343155,
-0.11715394258499146,
0.15199929475784302,
0.030343113467097282,
-0.043304987251758575,
0.07865265756845474,
0.1786150485277176,
-0.010886697098612785,
0.018063481897115707,
-0.02490442991256714,
0.01440456137061119,
0.045732468366622925,
-0.01814170368015766,
0.028539136052131653,
-0.09062380343675613,
0.04940235987305641,
-0.005109833087772131,
0.1809544563293457,
-0.027448104694485664,
-0.15228182077407837,
0.013636212795972824,
-0.09082239866256714,
-0.0811246857047081,
0.014835338108241558,
0.13896654546260834,
0.18943296372890472,
0.01683698035776615,
0.12832744419574738,
-0.05834784358739853,
0.13785971701145172,
0.025712134316563606,
-0.06301262229681015,
0.07749266922473907,
0.0071969423443078995,
-0.09387931227684021,
0.040539491921663284,
0.11841078847646713,
-0.14598393440246582,
-0.18149712681770325,
0.11361131817102432,
-0.08444216847419739,
-0.0010471106506884098,
-0.03923007473349571,
7.682605200898251e-7,
-0.13245026767253876,
0.0010020486079156399,
-0.05609773099422455,
0.09420476853847504,
-0.10193654894828796,
-0.0065111881121993065,
0.01302114874124527,
0.1379968672990799,
-0.015416399575769901,
0.14868752658367157,
0.04429420456290245,
0.008314277976751328,
-0.021420352160930634,
0.18201856315135956,
-0.038568779826164246,
-0.007485511247068644,
-0.08704132586717606,
0.18454742431640625,
-0.04756241664290428,
-0.17757390439510345,
0.025834403932094574,
0.10032156109809875,
-0.023998823016881943,
-0.06454278528690338,
0.013247172348201275,
-0.04564110189676285,
-0.03892252966761589,
0.0860452875494957,
-0.010107447393238544,
0.03316790610551834,
0.03879781812429428,
-0.04908015951514244,
-0.06725550442934036,
0.09737575799226761,
-0.09164585173130035,
0.037493545562028885,
-0.19011113047599792,
0.046972353011369705,
0.10561593621969223,
0.06934040784835815,
0.16150802373886108,
-0.06055804714560509,
-0.052957918494939804,
0.07933207601308823,
0.06609121710062027,
0.15695510804653168,
-0.1326858550310135,
0.18072789907455444,
0.0009242486557923257,
-0.1825176626443863,
0.03655540943145752,
0.1065249890089035,
-0.04643061012029648,
0.3121769428253174,
-0.06056586280465126,
0.07384143024682999,
0.06660202145576477,
-0.12721170485019684,
-0.03832148015499115,
-0.08851597458124161,
-0.025959733873605728,
-0.03984915465116501,
0.12032732367515564,
-0.003428437514230609,
0.09697558730840683,
-0.06330699473619461,
-0.0135421734303236,
1.3915910792992143e-34,
0.08083038777112961,
0.113233283162117,
-0.14425845444202423,
0.033816147595644,
0.05578910931944847,
-0.06651178002357483,
-0.19215445220470428,
0.07114507257938385,
0.08866260945796967,
-0.2660680115222931,
-0.23809456825256348
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | > For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
>
> @lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
>
> PS: I don't expect significant speed-up for local, uncompressed Arrow files.
Could you explain why you'd need to change the arrow format?
When we use streaming datasets we simply determine the number of worker shards and then add some modulo logic at the appropriate place. Worst case scenario, you'd skip streaming entries according to the number of shards.
For PyTorch, I'd be happy to provide an implementation or a sketch thereof, if you point me toward what the testing requirements would be for such a PR. | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 166 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
>
> @lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
>
> PS: I don't expect significant speed-up for local, uncompressed Arrow files.
Could you explain why you'd need to change the arrow format?
When we use streaming datasets we simply determine the number of worker shards and then add some modulo logic at the appropriate place. Worst case scenario, you'd skip streaming entries according to the number of shards.
For PyTorch, I'd be happy to provide an implementation or a sketch thereof, if you point me toward what the testing requirements would be for such a PR. | [
-0.24346300959587097,
0.27618610858917236,
-0.08877469599246979,
0.021930666640400887,
-0.11913629621267319,
-0.06844563782215118,
0.2960558533668518,
0.06190114468336105,
-0.1517404466867447,
0.06757242977619171,
-0.008853374980390072,
0.06703438609838486,
-0.25753068923950195,
-0.03354472666978836,
0.06721311807632446,
-0.147177591919899,
-0.04624094069004059,
0.01798708550632,
-0.09738897532224655,
-0.06359416246414185,
-0.21557965874671936,
0.03572734817862511,
0.14118139445781708,
-0.13175596296787262,
-0.06556659191846848,
-0.04853035509586334,
-0.11219976842403412,
0.1263582408428192,
0.11104079335927963,
-0.1361011117696762,
0.03925075754523277,
0.136086568236351,
-0.04600214213132858,
-0.04179239645600319,
0.000005665840035362635,
0.048222433775663376,
0.0750705897808075,
-0.049714479595422745,
-0.0226689912378788,
0.014557776972651482,
0.11309876292943954,
-0.05269043147563934,
0.08081866800785065,
-0.09035828709602356,
0.005337974987924099,
0.06078009679913521,
-0.0472995787858963,
-0.040388621389865875,
0.1298392415046692,
-0.16780583560466766,
-0.048775140196084976,
0.07269513607025146,
-0.049875158816576004,
-0.10395993292331696,
0.0014050289755687118,
0.05888678878545761,
-0.042000725865364075,
-0.023183051496744156,
-0.13808344304561615,
-0.007406181190162897,
-0.17384324967861176,
0.03406215459108353,
0.059828490018844604,
0.03839593008160591,
0.20519687235355377,
-0.030516643077135086,
-0.2965508997440338,
-0.07387816905975342,
0.021202731877565384,
-0.03920239955186844,
-0.1494360864162445,
-0.1912117600440979,
-0.023457234725356102,
-0.04422527924180031,
-0.024392427876591682,
-0.17535041272640228,
-0.02345260977745056,
0.046850431710481644,
-0.015682751312851906,
0.047320809215307236,
-0.006179455202072859,
0.03362733870744705,
-0.023781243711709976,
0.06821445375680923,
-0.09960518777370453,
-0.09508805721998215,
0.11887238919734955,
0.09247696399688721,
-0.009122930467128754,
-0.00586236035451293,
0.14433622360229492,
-0.056590113788843155,
-0.01233935821801424,
-0.08793189376592636,
-0.12846973538398743,
-0.01456532534211874,
-0.0879041999578476,
-0.07733225077390671,
0.06255337595939636,
0.005153362173587084,
0.03678407147526741,
0.033077701926231384,
-0.02011043019592762,
0.10051985830068588,
-0.05414682999253273,
-0.2584710717201233,
0.027321351692080498,
-0.08975713700056076,
-0.04721961170434952,
-0.036763712763786316,
0.048791129142045975,
0.1591532826423645,
-0.08674721419811249,
-0.14197419583797455,
0.12518222630023956,
0.06808563321828842,
0.2156657725572586,
0.2032003104686737,
0.011849493719637394,
-0.01972348429262638,
0.10653965920209885,
-0.09150750190019608,
-0.004030416253954172,
0.00510841328650713,
0.1865423619747162,
-0.04555704444646835,
-0.13562460243701935,
-0.03733091801404953,
0.004392846021801233,
-0.11871164292097092,
0.031143182888627052,
0.019083118066191673,
0.05217902734875679,
0.08734919130802155,
0.11907392740249634,
-0.10280288755893707,
-0.030758284032344818,
-0.20008215308189392,
0.017272688448429108,
-0.0398058220744133,
0.12146046757698059,
0.028949333354830742,
-0.021634142845869064,
-0.1398765742778778,
0.05434523895382881,
0.050589628517627716,
-0.03127116337418556,
0.1166214868426323,
-0.1286875605583191,
0.11326645314693451,
0.09288375824689865,
0.012418394908308983,
-0.18619997799396515,
0.16699473559856415,
-0.11986855417490005,
0.1290120631456375,
-0.05894050374627113,
-0.16989359259605408,
-0.10656476020812988,
0.026610612869262695,
0.11193374544382095,
-0.08126097172498703,
-0.14277103543281555,
-0.05591752007603645,
-0.026149807497859,
0.2016412317752838,
0.09333230555057526,
0.05865124985575676,
-0.10241002589464188,
-0.22081540524959564,
0.1015438660979271,
-0.09702593833208084,
-0.09216271340847015,
-0.19250011444091797,
0.016092421486973763,
0.2345060259103775,
0.05536065250635147,
0.1158716231584549,
-0.11226445436477661,
0.047501400113105774,
0.0007965243421494961,
-0.08629896491765976,
0.05942121520638466,
0.05046834051609039,
0.30981117486953735,
-0.15740737318992615,
0.013939915224909782,
0.1280643790960312,
-0.11102466285228729,
0.021623095497488976,
0.06526222079992294,
0.12447831779718399,
-0.040196847170591354,
0.17269380390644073,
-0.02808905951678753,
-0.017500463873147964,
0.057618968188762665,
-0.21211397647857666,
0.14278055727481842,
-0.08486589789390564,
-0.019143110141158104,
-0.049436189234256744,
0.02696176990866661,
0.030415935441851616,
0.20184747874736786,
-0.01683538220822811,
-0.17598168551921844,
0.16139158606529236,
0.12420734018087387,
-0.2103019654750824,
-0.08061438053846359,
0.04790676385164261,
0.027348294854164124,
-0.06151339039206505,
-0.12723256647586823,
0.13497775793075562,
-0.09064417332410812,
0.10417776554822922,
-0.13316553831100464,
-0.015812458470463753,
-0.09913291037082672,
0.07920370250940323,
-0.008925355970859528,
0.09376958012580872,
-0.13140784204006195,
0.04753249138593674,
0.04952344670891762,
-0.09346158802509308,
0.15181483328342438,
-0.036762118339538574,
-0.06620731204748154,
-0.13214923441410065,
0.19885753095149994,
0.07945912331342697,
-0.04879279434680939,
0.07773161679506302,
0.0010128464782610536,
-0.050246432423591614,
0.05926280468702316,
0.019795436412096024,
-0.11977730691432953,
-0.07458910346031189,
-0.05890923738479614,
-0.008510925807058811,
0.0411391519010067,
0.13206076622009277,
-0.05806795880198479,
0.006439400836825371,
-0.03280085697770119,
-0.08628226071596146,
0.011692891828715801,
0.14089946448802948,
-0.05642178654670715,
0.05077024921774864,
0.005059034563601017,
-0.07691812515258789,
0.14619632065296173,
0.11990891396999359,
-0.006485174875706434,
0.05553396791219711,
0.09343750774860382,
-0.04535814747214317,
-0.029738228768110275,
-0.048063796013593674,
-0.0013011718401685357,
0.01175678614526987,
0.1549062728881836,
0.16423971951007843,
0.058515362441539764,
-0.002134689362719655,
0.17784295976161957,
-0.06577645987272263,
-0.03759778290987015,
-0.020891617983579636,
-0.021362582221627235,
-0.18405406177043915,
0.04734870418906212,
0.13448934257030487,
0.05233754217624664,
-0.12826022505760193,
-0.10428961366415024,
-0.001526420353911817,
0.0927669107913971,
-0.15016518533229828,
0.107456274330616,
-0.019340485334396362,
-0.011346787214279175,
0.052974507212638855,
-0.2218083292245865,
-0.13143442571163177,
-0.03037027083337307,
-0.19746018946170807,
-0.021654337644577026,
0.05071952939033508,
0.13963092863559723,
-0.05175541341304779,
0.056195177137851715,
0.14358508586883545,
-0.044627077877521515,
-0.15502019226551056,
-0.06333378702402115,
0.08421055227518082,
0.08404499292373657,
0.018675096333026886,
0.06402874737977982,
0.11788308620452881,
0.11828796565532684,
0.03455835580825806,
-0.01102434191852808,
-0.10329777002334595,
0.1312112808227539,
-0.04485892876982689,
0.014956805855035782,
-0.11167930066585541,
0.08384455740451813,
-0.11546432971954346,
-0.0391429103910923,
-0.2822628617286682,
0.01295151561498642,
-0.0363348051905632,
0.0056068855337798595,
-0.0046103042550385,
-0.0813051164150238,
0.061578333377838135,
-0.056008461862802505,
-0.008527502417564392,
-0.26043492555618286,
-0.09214682877063751,
0.05164658650755882,
0.20029161870479584,
0.03836164250969887,
-0.1253214031457901,
0.0965455025434494,
-0.06235295534133911,
0.08699286729097366,
-0.04543863981962204,
-0.050947729498147964,
-0.11092792451381683,
0.29436764121055603,
-0.08149159699678421,
-0.012650285847485065,
-0.10823395103216171,
-0.11440539360046387,
-0.07368352264165878,
0.2152826488018036,
0.11027219891548157,
0.07651478052139282,
-0.17302575707435608,
0.06075379624962807,
0.09136249125003815,
0.03439803421497345,
0.015566530637443066,
0.008187076076865196,
-0.08150629699230194,
-0.14535829424858093,
0.09110127389431,
-0.039225608110427856,
-0.07395605742931366,
-0.06810718774795532,
0.03885344788432121,
0.056963156908750534,
0.17615406215190887,
0.32259416580200195,
-0.18133273720741272,
-0.16256526112556458,
0.0609808973968029,
0.09204787760972977,
-0.09672265499830246,
0.11314121633768082,
-0.1732887178659439,
-0.0327487587928772,
0.032461926341056824,
0.07940459996461868,
-0.10421383380889893,
-0.13274967670440674,
-0.09436192363500595,
0.08541519194841385,
-0.16143390536308289,
0.03495081514120102,
-0.14996445178985596,
-0.010223979130387306,
-0.1574859619140625,
0.027409695088863373,
-0.10925039649009705,
0.07763317227363586,
0.08527237176895142,
0.01733437180519104,
0.0014934324426576495,
-0.019321179017424583,
0.2344880849123001,
-0.05729057267308235,
0.16857244074344635,
0.11941204220056534,
-0.1124977245926857,
0.01998068206012249,
-0.03083846904337406,
-0.03980548679828644,
0.11499761044979095,
0.020633475854992867,
0.07031960785388947,
0.10393934696912766,
0.2061721682548523,
0.0172232948243618,
0.08006652444601059,
-0.13652396202087402,
0.02179722860455513,
0.05616579204797745,
0.025580309331417084,
0.13592775166034698,
0.03588830679655075,
0.013213197700679302,
-0.03402760252356529,
-0.12812697887420654,
-0.04152302443981171,
0.14690731465816498,
-0.037406258285045624,
-0.0010795503621920943,
-0.10007625818252563,
0.0843844935297966,
0.10557939857244492,
-0.10941492766141891,
-0.024371469393372536,
0.05517551302909851,
0.029238544404506683,
-0.039862342178821564,
-0.006109689828008413,
-0.21824650466442108,
0.05535758659243584,
0.19498591125011444,
0.03420043736696243,
0.010329031385481358,
0.09392298758029938,
0.10543962568044662,
0.07890920341014862,
0.11385699361562729,
0.031947989016771317,
0.1443318873643875,
-0.11961347609758377,
-0.129176527261734,
-0.0427822470664978,
0.054508358240127563,
0.008660535328090191,
0.14313244819641113,
-0.07270392775535583,
-0.1158214807510376,
0.010574615560472012,
-0.194917693734169,
-0.054184671491384506,
-0.1324220597743988,
-0.0003686872951220721,
-0.18053030967712402,
-0.05791011080145836,
-0.07839541882276535,
-0.04539017006754875,
0.02063976600766182,
-0.011104298755526543,
0.12125077843666077,
-0.07574674487113953,
-0.037619542330503464,
0.09824216365814209,
0.024733122438192368,
-0.03487974405288696,
0.004797936417162418,
-0.04205348715186119,
-0.03494160622358322,
0.3195570409297943,
0.0839274600148201,
-0.11074724048376083,
0.014151695184409618,
-0.10198134183883667,
-0.08333375304937363,
0.010122559033334255,
0.03853171318769455,
-0.023019973188638687,
0.298393577337265,
0.07371683418750763,
-0.019543716683983803,
-0.006672412157058716,
-0.09022205322980881,
-0.12143699079751968,
0.2266814112663269,
-0.12714001536369324,
0.0275074802339077,
0.015854910016059875,
-0.047286104410886765,
0.09977293014526367,
-0.025420447811484337,
-0.008035833947360516,
-0.14888274669647217,
0.17021016776561737,
-0.08474427461624146,
-0.14866381883621216,
-0.05302474647760391,
0.06781826913356781,
0.20237772166728973,
-0.12963861227035522,
-0.1524084359407425,
0.050774946808815,
0.0350552536547184,
0.06690925359725952,
-0.06862647831439972,
-0.07211941480636597,
0.014174914918839931,
0.03804749622941017,
-0.07600246369838715,
-0.14391526579856873,
0.03225230798125267,
-0.20619654655456543,
0.10924649983644485,
-0.0072895498014986515,
-0.15458306670188904,
-0.0013875982258468866,
-0.12853366136550903,
-0.14530247449874878,
0.09795401990413666,
0.010501493699848652,
0.015611540526151657,
0.18133407831192017,
0.12941108644008636,
-0.09726282954216003,
-0.023633206263184547,
0.1274324655532837,
-0.011656371876597404,
0.008839131332933903,
-0.011874305084347725,
-0.08863160759210587,
0.08063942939043045,
-0.06171763688325882,
-0.08808095008134842,
-0.03136639669537544,
0.167645663022995,
0.007881458848714828,
0.12742817401885986,
-0.07414835691452026,
-0.07918217778205872,
0.012412019073963165,
0.08417114615440369,
0.020693998783826828,
-0.03489087522029877,
0.01866818778216839,
0.10415762662887573,
-0.07834705710411072,
-0.2542801797389984,
0.2608204185962677,
0.1059177815914154,
-0.12571240961551666,
-0.08566968888044357,
-0.0465976744890213,
0.0005535107920877635,
-0.15666048228740692,
0.10443779826164246,
0.14982324838638306,
0.03709520027041435,
-0.08852114528417587,
-0.11316941678524017,
-2.678615434139658e-32,
0.07816802710294724,
-0.016793161630630493,
0.030479582026600838,
0.12570449709892273,
-0.08599738776683807,
-0.17560222744941711,
-0.054042499512434006,
-0.17290376126766205,
0.026459673419594765,
-0.06631384044885635,
-0.1400560736656189,
0.15187320113182068,
0.10069702565670013,
-0.03163687139749527,
0.022379131987690926,
-0.036849137395620346,
0.13470196723937988,
-0.02734445594251156,
-0.03844985365867615,
0.06833693385124207,
0.054095346480607986,
-0.04519178718328476,
0.11555115878582001,
0.2797313928604126,
-0.1086442619562149,
-0.14099359512329102,
-0.10564864426851273,
-0.06891047954559326,
-0.1311343014240265,
-0.29341429471969604,
0.014089973643422127,
0.07644707709550858,
-0.024428462609648705,
-0.037163443863391876,
-0.04551563784480095,
0.13569992780685425,
-0.27759772539138794,
-0.0659744068980217,
-0.012498553842306137,
0.022738534957170486,
-0.11900418996810913,
0.13315460085868835,
0.1747751235961914,
-0.05379067361354828,
0.06333687901496887,
0.1950715333223343,
0.0598251111805439,
0.04983600229024887,
-0.06658370047807693,
-0.11591781675815582,
0.1616775542497635,
0.08838353306055069,
-0.015138989314436913,
0.01675751432776451,
0.027793249115347862,
-0.045251671224832535,
0.11285223066806793,
-0.10577750951051712,
-0.2864847481250763,
0.14585842192173004,
-0.00015593296848237514,
-0.0600961297750473,
-0.05337224155664444,
0.12578339874744415,
0.08678995817899704,
0.014766027219593525,
0.062950000166893,
0.1080160066485405,
0.3055526912212372,
-0.000015094561604200862,
-0.012033311650156975,
0.14764642715454102,
-0.08665092289447784,
-0.05614442750811577,
-0.08105845749378204,
0.02310076169669628,
-0.08050686120986938,
0.06820176541805267,
0.02029862254858017,
0.0743391364812851,
0.07011204212903976,
0.007070677820593119,
0.00010679398837964982,
0.03606376424431801,
0.051972396671772,
-0.03752898424863815,
0.1546524614095688,
0.08928371220827103,
-0.036802858114242554,
0.0609213225543499,
-0.09091206640005112,
0.13032084703445435,
0.04648955538868904,
0.0015201023779809475,
0.0959552526473999,
0.19038058817386627,
0.005677086301147938,
0.049531590193510056,
-0.022778162732720375,
-0.008581271395087242,
0.04300723597407341,
0.0019293144578114152,
0.044403448700904846,
-0.07105088979005814,
0.045374851673841476,
-0.047766461968421936,
0.19126386940479279,
0.019851509481668472,
-0.1731928586959839,
-0.014230926521122456,
-0.07522400468587875,
-0.039628975093364716,
0.03736533969640732,
0.05939915403723717,
0.16514019668102264,
0.05246474966406822,
0.11551951617002487,
-0.05405990779399872,
0.108132004737854,
-0.006849645636975765,
-0.03747463971376419,
0.019590213894844055,
-0.03771863132715225,
-0.09921957552433014,
-0.007672586943954229,
0.11272159218788147,
-0.16038981080055237,
-0.12031951546669006,
0.12209303677082062,
-0.09443337470293045,
-0.009093723259866238,
0.010193418711423874,
7.66248490435828e-7,
-0.11951257288455963,
0.01814897730946541,
-0.016034986823797226,
0.12380371987819672,
-0.06399640440940857,
-0.01761184260249138,
0.023579010739922523,
0.1365862488746643,
-0.01411273144185543,
0.15383410453796387,
0.07757566124200821,
0.028495198115706444,
-0.0331973172724247,
0.19312317669391632,
-0.027744699269533157,
-0.034358054399490356,
-0.11028216779232025,
0.20917312800884247,
-0.07284460961818695,
-0.1570436954498291,
0.07165829092264175,
0.15108132362365723,
-0.05507443845272064,
-0.03427675738930702,
0.05453996732831001,
-0.019178137183189392,
-0.058760419487953186,
0.09570273011922836,
-0.02358509972691536,
0.044114697724580765,
0.027190452441573143,
-0.0862586721777916,
-0.0821690633893013,
0.09824362397193909,
-0.085594043135643,
0.025790579617023468,
-0.23449335992336273,
0.0020306166261434555,
0.10516618937253952,
0.13181504607200623,
0.1583929806947708,
-0.07035128027200699,
-0.016733698546886444,
0.013423039577901363,
0.11020095646381378,
0.18869905173778534,
-0.10863903164863586,
0.20310556888580322,
-0.01323670707643032,
-0.16697996854782104,
0.011363101191818714,
0.10921545326709747,
-0.0350409634411335,
0.30625563859939575,
-0.05717742070555687,
0.05521774664521217,
0.06701989471912384,
-0.15868158638477325,
-0.04202704504132271,
-0.06065310537815094,
0.026397889479994774,
-0.0018034579697996378,
0.06572066247463226,
0.058618318289518356,
0.09823054075241089,
-0.034791845828294754,
-0.014211097732186317,
1.2078459298200843e-34,
0.081790991127491,
0.10895037651062012,
-0.16331623494625092,
0.023926956579089165,
0.03409035876393318,
-0.09600143134593964,
-0.1887177973985672,
0.09020432084798813,
0.07829891890287399,
-0.3224698007106781,
-0.2315136343240738
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | > Could you explain why you'd need to change the arrow format?
This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file. | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 60 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> Could you explain why you'd need to change the arrow format?
This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file. | [
-0.2399580180644989,
0.24100270867347717,
-0.05735998600721359,
-0.004967137705534697,
-0.09895699471235275,
-0.11363485455513,
0.3224201798439026,
0.0289479810744524,
-0.10781531780958176,
0.08051980286836624,
-0.005406401585787535,
0.09032030403614044,
-0.29395511746406555,
-0.021415742114186287,
0.042861342430114746,
-0.12418095767498016,
-0.06374488770961761,
0.0013885373482480645,
-0.07612426578998566,
-0.09242475032806396,
-0.2347853034734726,
0.011412234045565128,
0.14833177626132965,
-0.16811226308345795,
-0.0758427307009697,
-0.02858390472829342,
-0.11618123203516006,
0.11108709126710892,
0.08893657475709915,
-0.134035125374794,
0.007415477652102709,
0.13187694549560547,
-0.0003860462747979909,
-0.033785492181777954,
0.000005619339844997739,
0.06901755928993225,
0.03711332753300667,
-0.041151005774736404,
-0.04732199013233185,
-0.058323733508586884,
0.08469803631305695,
-0.06126254424452782,
0.08454204350709915,
-0.053655095398426056,
0.01380462758243084,
0.09116929024457932,
-0.029663825407624245,
-0.09985481947660446,
0.1468212604522705,
-0.17728635668754578,
-0.05217820778489113,
0.09471585601568222,
-0.06810377538204193,
-0.10798075050115585,
-0.02771088108420372,
0.0697811096906662,
-0.039482854306697845,
-0.02643757313489914,
-0.15100975334644318,
-0.026607947424054146,
-0.18107621371746063,
0.03942492604255676,
0.04701656103134155,
0.0668422281742096,
0.2105516642332077,
-0.02085927687585354,
-0.2885841429233551,
-0.07612412422895432,
0.002887947950512171,
-0.04136780649423599,
-0.0852462649345398,
-0.21301917731761932,
-0.006943312007933855,
-0.05032965540885925,
-0.04113170877099037,
-0.17081373929977417,
-0.024203365668654442,
0.043125834316015244,
-0.011286873370409012,
0.02333558164536953,
-0.059278782457113266,
0.0651555210351944,
-0.023390522226691246,
0.06140235438942909,
-0.09600198268890381,
-0.07229141891002655,
0.11088154464960098,
0.06272082775831223,
-0.023679722100496292,
-0.004657607991248369,
0.19130966067314148,
-0.053145624697208405,
0.011150873266160488,
-0.07318629324436188,
-0.15230189263820648,
-0.017302947118878365,
-0.1080411821603775,
-0.09499509632587433,
0.04557706043124199,
0.045703332871198654,
0.04690169915556908,
-0.007810138165950775,
-0.08863594383001328,
0.10654555261135101,
-0.024514157325029373,
-0.24325847625732422,
0.022464415058493614,
-0.05373719334602356,
-0.03486360237002373,
-0.060514118522405624,
0.053098369389772415,
0.11118876934051514,
-0.08183638006448746,
-0.14566294848918915,
0.13709954917430878,
0.07872739434242249,
0.24380135536193848,
0.20945599675178528,
0.02374141477048397,
-0.04259737581014633,
0.09999612718820572,
-0.08197380602359772,
-0.024320503696799278,
0.017014989629387856,
0.17650550603866577,
-0.008179529570043087,
-0.15204617381095886,
-0.011898468248546124,
0.03164343908429146,
-0.10010507702827454,
0.018130432814359665,
0.04119380563497543,
0.06593167036771774,
0.06590449064970016,
0.1670875996351242,
-0.03018598072230816,
0.014537807554006577,
-0.21715788543224335,
0.026924721896648407,
-0.005851662717759609,
0.11087708920240402,
0.05326676368713379,
-0.013181214220821857,
-0.13380166888237,
0.06616994738578796,
0.06498812139034271,
-0.055570587515830994,
0.10891429334878922,
-0.16124314069747925,
0.07717856019735336,
0.12023409456014633,
0.016119707375764847,
-0.19781775772571564,
0.18721330165863037,
-0.11288707703351974,
0.11273935437202454,
-0.07691643387079239,
-0.1579725742340088,
-0.08570573478937149,
0.07380948215723038,
0.16936378180980682,
-0.04153508320450783,
-0.14050805568695068,
-0.06863607466220856,
-0.021739186719059944,
0.1843414455652237,
0.09972382336854935,
0.05507926270365715,
-0.11167250573635101,
-0.1882179230451584,
0.09057128429412842,
-0.15655630826950073,
-0.07028058916330338,
-0.1858886033296585,
0.032049499452114105,
0.24279999732971191,
0.02683386765420437,
0.07723754644393921,
-0.12306837737560272,
0.0013910263078287244,
-0.02269759401679039,
-0.07207614928483963,
0.027767660096287727,
0.04413663595914841,
0.30639147758483887,
-0.16786542534828186,
-0.05168881267309189,
0.13541032373905182,
-0.11827967315912247,
0.0395764522254467,
0.035928875207901,
0.09056979417800903,
-0.054552994668483734,
0.17276431620121002,
-0.02385939285159111,
-0.010621543973684311,
0.03453720360994339,
-0.13835901021957397,
0.10463392734527588,
-0.09165166318416595,
0.005511253606528044,
-0.06450127810239792,
-0.0011375846806913614,
0.03592721000313759,
0.1919599026441574,
-0.03885321319103241,
-0.2179182916879654,
0.19397349655628204,
0.19911392033100128,
-0.20714209973812103,
-0.11325839161872864,
0.08919335156679153,
0.06644339859485626,
-0.08370645344257355,
-0.17978732287883759,
0.04124036058783531,
-0.0988486036658287,
0.13311651349067688,
-0.12220343202352524,
-0.0374811552464962,
-0.0791940838098526,
0.06233508139848709,
0.02007504738867283,
0.08616673946380615,
-0.16458413004875183,
0.06405797600746155,
0.021091610193252563,
-0.07311373203992844,
0.1305791437625885,
-0.025527754798531532,
-0.056270044296979904,
-0.09911267459392548,
0.1960541009902954,
0.08615738898515701,
0.008639651350677013,
0.11391453444957733,
-0.02706712856888771,
-0.0036101187579333782,
0.06905796378850937,
-0.01891055516898632,
-0.11750225722789764,
-0.06534840166568756,
-0.07611934840679169,
-0.015776099637150764,
0.0019445191137492657,
0.16332493722438812,
-0.10522525757551193,
0.015496972016990185,
-0.026375513523817062,
-0.0922815129160881,
0.010870742611587048,
0.1634400188922882,
-0.08803325146436691,
0.08995459973812103,
0.017167694866657257,
-0.07646618783473969,
0.15142913162708282,
0.1343902051448822,
0.017260214313864708,
0.08509847521781921,
0.07688437402248383,
-0.05414753034710884,
-0.01254376582801342,
-0.05039134994149208,
0.012935813516378403,
-0.02904750034213066,
0.12197046726942062,
0.13392126560211182,
0.03504228591918945,
0.01972988247871399,
0.19944576919078827,
-0.04754798486828804,
-0.016049258410930634,
-0.02584937959909439,
0.009365441277623177,
-0.17612703144550323,
0.02133403904736042,
0.1269407868385315,
0.03512758016586304,
-0.10717222094535828,
-0.08641819655895233,
-0.0030134397093206644,
0.12336817383766174,
-0.1388900876045227,
0.11564721167087555,
-0.020105527713894844,
-0.031166711822152138,
0.07272332161664963,
-0.25540316104888916,
-0.17736923694610596,
-0.03689572960138321,
-0.18302322924137115,
-0.02468414418399334,
0.06437711417675018,
0.12091685086488724,
-0.023200182244181633,
0.04904402792453766,
0.16517198085784912,
-0.0596960224211216,
-0.13174550235271454,
-0.055425986647605896,
0.08617064356803894,
0.117149218916893,
-0.035489521920681,
0.03449232131242752,
0.10990715771913528,
0.10538626462221146,
0.07933866232633591,
-0.01919330656528473,
-0.12379114329814911,
0.08840466290712357,
-0.02564513124525547,
0.0431455634534359,
-0.1214318722486496,
0.11730940639972687,
-0.1308685839176178,
-0.01798158884048462,
-0.2813051640987396,
-0.015943976119160652,
-0.046724677085876465,
0.00989629328250885,
0.008787387982010841,
-0.037934865802526474,
0.07204199582338333,
-0.03557048365473747,
-0.04044853523373604,
-0.25651663541793823,
-0.08702173829078674,
0.042931728065013885,
0.1847231537103653,
0.036498233675956726,
-0.05761495977640152,
0.06013165041804314,
-0.12615039944648743,
0.08263343572616577,
-0.052038200199604034,
-0.06619609892368317,
-0.12512673437595367,
0.30202433466911316,
-0.12075686454772949,
0.015523388050496578,
-0.09871640056371689,
-0.13558821380138397,
-0.09656032919883728,
0.1916208565235138,
0.11882761120796204,
0.02805999293923378,
-0.11950044333934784,
0.006418737582862377,
0.08151476085186005,
0.019440606236457825,
0.025955645367503166,
0.01263144426047802,
-0.029273152351379395,
-0.18383705615997314,
0.09600739926099777,
-0.0042781587690114975,
-0.10423217713832855,
-0.06687739491462708,
-0.04050812870264053,
0.04671831056475639,
0.19008025527000427,
0.29663872718811035,
-0.19437150657176971,
-0.15033531188964844,
0.04409734532237053,
0.11111141741275787,
-0.10636704415082932,
0.13516955077648163,
-0.21373306214809418,
-0.006030255928635597,
0.06260325014591217,
0.05342353880405426,
-0.09838049113750458,
-0.14735902845859528,
-0.07864828407764435,
0.09706314653158188,
-0.1470385491847992,
0.04501929134130478,
-0.1318906843662262,
-0.06301970779895782,
-0.13403739035129547,
0.015905041247606277,
-0.07188297063112259,
0.10841592401266098,
0.05608516186475754,
0.051719460636377335,
-0.006753058172762394,
-0.03673270344734192,
0.20718911290168762,
-0.06374276429414749,
0.12518706917762756,
0.12159271538257599,
-0.09749840199947357,
-0.007547376677393913,
-0.007901037111878395,
-0.023994851857423782,
0.11199934035539627,
0.03732834383845329,
0.04682876914739609,
0.13037844002246857,
0.2591891288757324,
-0.0013976243790239096,
0.10108277946710587,
-0.13587510585784912,
0.042364973574876785,
0.03866489604115486,
0.027284491807222366,
0.12167522311210632,
0.07255230844020844,
0.03623303025960922,
-0.025363091379404068,
-0.12801972031593323,
-0.004230473190546036,
0.15435753762722015,
-0.047551363706588745,
0.014832435175776482,
-0.10269034653902054,
0.08106721192598343,
0.07130423933267593,
-0.08012387156486511,
-0.031546689569950104,
0.04375235363841057,
0.05557332560420036,
-0.047959085553884506,
0.03140103071928024,
-0.2007581740617752,
0.08033622801303864,
0.19335727393627167,
0.04748919978737831,
-0.01862969808280468,
0.10214288532733917,
0.10793694853782654,
0.11582397669553757,
0.12812311947345734,
0.09427671134471893,
0.12987004220485687,
-0.1602640599012375,
-0.13558678328990936,
-0.029563607648015022,
0.0473739393055439,
0.0032631950452923775,
0.1552910953760147,
-0.0623130276799202,
-0.10649462044239044,
0.048985790461301804,
-0.22220657765865326,
-0.0931122750043869,
-0.11887926608324051,
-0.008314777165651321,
-0.14991311728954315,
-0.09479863196611404,
-0.11337020248174667,
-0.024007318541407585,
0.036522526293992996,
0.009097267873585224,
0.13486942648887634,
-0.13511401414871216,
-0.052159231156110764,
0.08489912748336792,
0.030528642237186432,
-0.026530418545007706,
0.01895849220454693,
-0.03276306390762329,
-0.0006610515411011875,
0.3244074285030365,
0.14423249661922455,
-0.11671645939350128,
0.007615979295223951,
-0.06678371876478195,
-0.0926370620727539,
-0.004016271326690912,
0.024711355566978455,
-0.04066549986600876,
0.2966581881046295,
0.049464911222457886,
-0.025012249127030373,
-0.03359862416982651,
-0.059647124260663986,
-0.14985626935958862,
0.25411561131477356,
-0.11078451573848724,
-0.033268459141254425,
-0.016272790729999542,
-0.043084584176540375,
0.11373117566108704,
-0.008599327877163887,
-0.03190898522734642,
-0.15588897466659546,
0.2264578640460968,
-0.10522247850894928,
-0.16446799039840698,
-0.024042371660470963,
0.0412420853972435,
0.191640242934227,
-0.11517494916915894,
-0.15413695573806763,
0.06989608705043793,
0.008857070468366146,
0.13329151272773743,
-0.08835023641586304,
-0.08571677654981613,
0.021798452362418175,
0.03484519198536873,
-0.01730716973543167,
-0.11561980098485947,
0.009856740944087505,
-0.21106362342834473,
0.11790020018815994,
0.0005011894972994924,
-0.14551830291748047,
0.016469145193696022,
-0.13255679607391357,
-0.17195574939250946,
0.03894632309675217,
0.024232380092144012,
-0.002693328307941556,
0.19113041460514069,
0.15987350046634674,
-0.058274563401937485,
-0.0485433004796505,
0.13432566821575165,
0.02629111334681511,
0.03477311506867409,
0.007379176095128059,
-0.1336112916469574,
0.07634027302265167,
-0.0455716997385025,
-0.05360632389783859,
-0.027678851038217545,
0.17191508412361145,
-0.004073168616741896,
0.1379370242357254,
-0.08607320487499237,
-0.046082720160484314,
-0.01904364675283432,
0.06719604134559631,
0.005663904827088118,
-0.04789717122912407,
0.0021395618095993996,
0.09995260834693909,
-0.050905097275972366,
-0.22939708828926086,
0.235928013920784,
0.11303539574146271,
-0.12117515504360199,
-0.09056448936462402,
-0.050057344138622284,
-0.04468432813882828,
-0.14752468466758728,
0.10434724390506744,
0.16754162311553955,
0.09203167259693146,
-0.10515864938497543,
-0.05721147358417511,
-2.6125538271177963e-32,
0.08043935149908066,
-0.006816732231527567,
0.03564796596765518,
0.08539097011089325,
-0.09922824800014496,
-0.14707648754119873,
-0.048054128885269165,
-0.19224722683429718,
0.03327244892716408,
-0.07357967644929886,
-0.11132701486349106,
0.1373693197965622,
0.10957220941781998,
-0.04133428633213043,
-0.016914602369070053,
-0.06286845356225967,
0.09930422902107239,
-0.024288559332489967,
-0.04391678795218468,
0.05685107409954071,
0.06542881578207016,
-0.003346471581608057,
0.12058291584253311,
0.2110719382762909,
-0.11416647583246231,
-0.14876604080200195,
-0.10671258717775345,
-0.09271179884672165,
-0.14304283261299133,
-0.25010964274406433,
0.04515734314918518,
0.09972458332777023,
-0.04435533285140991,
-0.02956891804933548,
-0.04548024386167526,
0.13180096447467804,
-0.2730981111526489,
-0.07572220265865326,
-0.01720678061246872,
0.020380137488245964,
-0.09693882614374161,
0.13461372256278992,
0.17770209908485413,
-0.042403627187013626,
0.09486176818609238,
0.16221030056476593,
0.08891722559928894,
0.06553126871585846,
-0.09143049269914627,
-0.0917547345161438,
0.1868414431810379,
0.08014349639415741,
-0.01651844009757042,
-0.026067879050970078,
0.047118768095970154,
-0.019823316484689713,
0.15477235615253448,
-0.06466129422187805,
-0.27101728320121765,
0.18455128371715546,
0.048449866473674774,
-0.09421724826097488,
-0.01904897764325142,
0.12704356014728546,
0.10014399886131287,
0.020669296383857727,
0.05759141966700554,
0.09815215319395065,
0.32246533036231995,
-0.007572421338409185,
-0.0784776359796524,
0.15378686785697937,
-0.14089390635490417,
-0.09757986664772034,
-0.0629454255104065,
-0.00017930670583155006,
-0.07828101515769958,
0.015703566372394562,
-0.07170981168746948,
0.07759374380111694,
0.09609426558017731,
-0.000783315917942673,
0.005164851434528828,
0.023615339770913124,
0.023408960551023483,
-0.034719083458185196,
0.1682809442281723,
0.09240714460611343,
-0.06631636619567871,
0.06286551058292389,
-0.08961856365203857,
0.10853560268878937,
0.039416681975126266,
-0.011673584580421448,
0.08257932215929031,
0.1966872662305832,
-0.018028268590569496,
0.024807000532746315,
-0.04396556317806244,
0.008440465666353703,
0.062179140746593475,
-0.03573263809084892,
0.06068604066967964,
-0.060079410672187805,
0.03820925951004028,
0.0027354920748621225,
0.2073066085577011,
-0.02916274592280388,
-0.13737091422080994,
-0.005637615453451872,
-0.09524229168891907,
-0.07914867252111435,
0.019327957183122635,
0.058259062469005585,
0.17460037767887115,
0.04935459420084953,
0.11280659586191177,
0.0037335518281906843,
0.14548566937446594,
-0.001985720358788967,
-0.02653113193809986,
0.056068189442157745,
-0.006276506930589676,
-0.08036965876817703,
0.02634514681994915,
0.148402601480484,
-0.12324371933937073,
-0.1361890286207199,
0.12560172379016876,
-0.047898877412080765,
-0.021416092291474342,
-0.03768574073910713,
7.646992230547767e-7,
-0.1007942259311676,
0.02680078335106373,
0.0015651165740564466,
0.096418097615242,
-0.1029832512140274,
-0.0002026743459282443,
-0.002869293326511979,
0.12368118017911911,
-0.0018062955932691693,
0.14422303438186646,
0.08007276058197021,
0.014544442296028137,
-0.03146413713693619,
0.16049779951572418,
-0.05095742270350456,
0.032691486179828644,
-0.1012023314833641,
0.21181629598140717,
-0.06975023448467255,
-0.16728530824184418,
0.04286210238933563,
0.11945631355047226,
-0.03226638585329056,
-0.06171261519193649,
0.03875929117202759,
-0.012074475176632404,
-0.05414482206106186,
0.0873793438076973,
0.010083548724651337,
0.03606051206588745,
0.022909771651029587,
-0.11847247183322906,
-0.07016532868146896,
0.06718157231807709,
-0.08082130551338196,
0.009089294821023941,
-0.21547259390354156,
0.01864638179540634,
0.0940372496843338,
0.09588371217250824,
0.1664804220199585,
-0.05820940062403679,
-0.04419969767332077,
0.04036249965429306,
0.056095853447914124,
0.18448033928871155,
-0.13908451795578003,
0.17825308442115784,
-0.030743537470698357,
-0.1596769094467163,
-0.015657929703593254,
0.116129070520401,
-0.03584684431552887,
0.2875799536705017,
-0.06299512088298798,
0.06454990804195404,
0.07382357120513916,
-0.13920006155967712,
-0.04095158725976944,
-0.09467161446809769,
0.017677225172519684,
-0.026673192158341408,
0.11141014099121094,
0.039426639676094055,
0.09491284936666489,
-0.06128869205713272,
-0.020306112244725227,
1.7133740482590507e-34,
0.0813455879688263,
0.10461456328630447,
-0.1644401103258133,
0.028605502098798752,
0.0684124305844307,
-0.11139555275440216,
-0.14446888864040375,
0.09693573415279388,
0.08862248063087463,
-0.264190673828125,
-0.23742589354515076
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | > > Could you explain why you'd need to change the arrow format?
>
> This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file.
I guess I don't understand why you'd need to subset the dataset in the first place.
It seems sufficient to figure out how to offset or skip rows.
For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That's one way to do it, where of course you'd need to account for gpu sharding as well.
Otherwise, how did you implement worker/node/GPU sharding for iterable/streaming data where you do not have index information or prior splits (e.g. files)? | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 158 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> > Could you explain why you'd need to change the arrow format?
>
> This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file.
I guess I don't understand why you'd need to subset the dataset in the first place.
It seems sufficient to figure out how to offset or skip rows.
For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That's one way to do it, where of course you'd need to account for gpu sharding as well.
Otherwise, how did you implement worker/node/GPU sharding for iterable/streaming data where you do not have index information or prior splits (e.g. files)? | [
-0.22367943823337555,
0.2820444405078888,
-0.06823019683361053,
0.009242967702448368,
-0.12273918092250824,
-0.08613387495279312,
0.2948901951313019,
0.05167936533689499,
-0.1147301122546196,
0.09562773257493973,
-0.014198517426848412,
0.08505188673734665,
-0.2862824499607086,
-0.011438901536166668,
0.07239978015422821,
-0.10839886963367462,
-0.061776116490364075,
-0.011050346307456493,
-0.0692451223731041,
-0.0644366443157196,
-0.21909047663211823,
0.01566942036151886,
0.10753583908081055,
-0.17228835821151733,
-0.08584582805633545,
-0.05201639607548714,
-0.12938176095485687,
0.11601144820451736,
0.08895254880189896,
-0.12438495457172394,
0.03450000658631325,
0.13036125898361206,
-0.018461240455508232,
-0.034099530428647995,
0.00000553497875444009,
0.05324697121977806,
0.05307508632540703,
-0.057074327021837234,
-0.04019917547702789,
-0.04311766102910042,
0.09480898827314377,
-0.059769220650196075,
0.08853074163198471,
-0.06888750195503235,
0.02190028876066208,
0.09196986258029938,
-0.013534425757825375,
-0.06598757952451706,
0.13412347435951233,
-0.1862621158361435,
-0.060602009296417236,
0.09958603233098984,
-0.07971291244029999,
-0.10251452028751373,
0.013464787974953651,
0.04891885444521904,
-0.03376897796988487,
-0.010412357747554779,
-0.11629686504602432,
-0.029767809435725212,
-0.19612762331962585,
0.027423080056905746,
0.04134436696767807,
0.07371611148118973,
0.21161264181137085,
-0.028215551748871803,
-0.29386258125305176,
-0.06633389741182327,
0.007822882384061813,
-0.0329052172601223,
-0.08931104093790054,
-0.2451571524143219,
-0.005716623272746801,
-0.06690651178359985,
-0.03319147601723671,
-0.18453945219516754,
-0.02839965559542179,
0.03483787551522255,
-0.030938150361180305,
0.03826267272233963,
-0.0494983084499836,
0.06975731253623962,
-0.017370451241731644,
0.06276621669530869,
-0.11688307672739029,
-0.07888145744800568,
0.11313760280609131,
0.04858945682644844,
-0.010710299015045166,
0.022993026301264763,
0.21212343871593475,
-0.05606928467750549,
0.004076980985701084,
-0.07547489553689957,
-0.15941233932971954,
-0.0065100290812551975,
-0.10067444294691086,
-0.08658421039581299,
0.04321884363889694,
0.0327405147254467,
0.03038456290960312,
0.015399911440908909,
-0.04550663381814957,
0.11197599768638611,
-0.0027520889416337013,
-0.22692833840847015,
-0.010308418422937393,
-0.05495552718639374,
-0.05244104191660881,
-0.03888453170657158,
0.03339443355798721,
0.12618792057037354,
-0.0936255156993866,
-0.14214318990707397,
0.14441323280334473,
0.09076256304979324,
0.25855937600135803,
0.2053905576467514,
0.028191162273287773,
-0.027860142290592194,
0.0978226587176323,
-0.07945974916219711,
-0.020500626415014267,
-0.0008920773398131132,
0.18031466007232666,
-0.025381116196513176,
-0.18376679718494415,
0.0044546122662723064,
0.020022552460432053,
-0.10192032158374786,
0.005234880372881889,
0.029845181852579117,
0.07482655346393585,
0.05829969421029091,
0.15004529058933258,
-0.03611136972904205,
0.008409678004682064,
-0.20444464683532715,
0.035231295973062515,
-0.0033102096058428288,
0.10139886289834976,
0.052157629281282425,
-0.04121626541018486,
-0.11226152628660202,
0.05946626514196396,
0.08522845804691315,
-0.04951612278819084,
0.126616433262825,
-0.15798096358776093,
0.11239434778690338,
0.14358007907867432,
0.028659671545028687,
-0.16215403378009796,
0.1736268848180771,
-0.14217190444469452,
0.13069960474967957,
-0.12792564928531647,
-0.1428958922624588,
-0.08813005685806274,
0.08295281231403351,
0.17632393538951874,
-0.0595712810754776,
-0.15020383894443512,
-0.08287714421749115,
-0.004147533793002367,
0.16128113865852356,
0.10656310617923737,
0.07158041000366211,
-0.08779776841402054,
-0.20316901803016663,
0.08259204030036926,
-0.16026732325553894,
-0.07597748935222626,
-0.19369331002235413,
0.0348503403365612,
0.24361683428287506,
0.011104486882686615,
0.11580370366573334,
-0.12519671022891998,
-0.0054452805779874325,
-0.0072814482264220715,
-0.05864148214459419,
0.04944436997175217,
0.022682957351207733,
0.30852681398391724,
-0.17066553235054016,
-0.05118614062666893,
0.14465637505054474,
-0.11618351191282272,
0.052642546594142914,
0.051751505583524704,
0.09518535435199738,
-0.051559142768383026,
0.17094570398330688,
-0.021384913474321365,
-0.01660875231027603,
0.03131961449980736,
-0.16848565638065338,
0.13442224264144897,
-0.07935450226068497,
0.019983526319265366,
-0.0627165213227272,
-0.028416119515895844,
0.042076099663972855,
0.19011428952217102,
-0.03948861360549927,
-0.2356158047914505,
0.1769833266735077,
0.1584576964378357,
-0.2256290763616562,
-0.1205282136797905,
0.0644189640879631,
0.059916943311691284,
-0.08627209812402725,
-0.15581348538398743,
0.05846741795539856,
-0.10540199279785156,
0.13240428268909454,
-0.11644644290208817,
-0.006186381448060274,
-0.0857958272099495,
0.0462549664080143,
0.029577942565083504,
0.09424839168787003,
-0.1717039942741394,
0.027880258858203888,
0.016186779364943504,
-0.06977951526641846,
0.17764176428318024,
-0.031004125252366066,
-0.04110793396830559,
-0.10623873025178909,
0.1945127546787262,
0.08454667776823044,
0.03644246608018875,
0.11166705191135406,
-0.033257272094488144,
-0.01183005515486002,
0.054442644119262695,
0.0010837709996849298,
-0.12507477402687073,
-0.05340399220585823,
-0.07274674624204636,
-0.02040422521531582,
-0.0025484433863312006,
0.19099706411361694,
-0.10121670365333557,
0.009161809459328651,
-0.044357780367136,
-0.08090965449810028,
-0.0038591418415308,
0.17005254328250885,
-0.09318522363901138,
0.10929106175899506,
0.022915521636605263,
-0.061257462948560715,
0.15012605488300323,
0.12061528116464615,
0.017515791580080986,
0.08405986428260803,
0.09640058130025864,
-0.056195009499788284,
0.0047609843313694,
-0.06786944717168808,
0.00019181479001417756,
-0.03781662508845329,
0.1389596164226532,
0.10663197189569473,
0.03185134008526802,
0.02227926254272461,
0.23200589418411255,
-0.033187005668878555,
-0.007998223416507244,
-0.03704899176955223,
-0.0070904879830777645,
-0.16800154745578766,
0.030353400856256485,
0.11412011831998825,
0.026099415495991707,
-0.12059345841407776,
-0.07946798950433731,
0.027372755110263824,
0.1360415667295456,
-0.12789982557296753,
0.11760657280683517,
-0.007532212883234024,
-0.006632041186094284,
0.07126406580209732,
-0.2499905377626419,
-0.18242941796779633,
-0.032918531447649,
-0.20492342114448547,
-0.03467777743935585,
0.07316096127033234,
0.11928075551986694,
0.006863871123641729,
0.04314456507563591,
0.13991911709308624,
-0.09730076789855957,
-0.14188650250434875,
-0.08236388117074966,
0.07988861948251724,
0.11601874232292175,
-0.02240976132452488,
0.03703823685646057,
0.10811713337898254,
0.11593284457921982,
0.08945593982934952,
-0.024356722831726074,
-0.11349599808454514,
0.10588385164737701,
-0.02679554931819439,
0.029056154191493988,
-0.09877774119377136,
0.10410872846841812,
-0.1284620761871338,
-0.042844999581575394,
-0.2659435272216797,
-0.053903546184301376,
-0.06477449089288712,
-0.014970229007303715,
0.00833289884030819,
-0.043511178344488144,
0.07827156037092209,
-0.04429636150598526,
-0.055134352296590805,
-0.2558274269104004,
-0.0589030422270298,
0.0403369665145874,
0.18242451548576355,
0.021472454071044922,
-0.05688139423727989,
0.05001010373234749,
-0.09851676970720291,
0.07255784422159195,
-0.0797981545329094,
-0.06652139872312546,
-0.13962054252624512,
0.3084173798561096,
-0.08154227584600449,
0.012334388680756092,
-0.08433415740728378,
-0.12831993401050568,
-0.10913330316543579,
0.1907222419977188,
0.09770317375659943,
0.03292633965611458,
-0.10789269953966141,
0.060803405940532684,
0.07984080165624619,
-0.003134798491373658,
0.046973563730716705,
-0.002619727747514844,
-0.021279629319906235,
-0.18202510476112366,
0.08563068509101868,
-0.038297660648822784,
-0.12190144509077072,
-0.07807375490665436,
-0.030315836891531944,
0.015574339777231216,
0.20827089250087738,
0.3218984603881836,
-0.21246130764484406,
-0.1304333508014679,
0.0483570471405983,
0.0946490541100502,
-0.12846998870372772,
0.1745934933423996,
-0.21074283123016357,
-0.0035441878717392683,
0.048277128487825394,
0.07704970240592957,
-0.1140940934419632,
-0.14905469119548798,
-0.08180572837591171,
0.08863292634487152,
-0.15847955644130707,
0.04736519604921341,
-0.1443002074956894,
-0.057346243411302567,
-0.14574147760868073,
0.02585395984351635,
-0.0490230917930603,
0.09586489200592041,
0.06541719287633896,
0.02694762870669365,
0.0022661692928522825,
-0.04326614737510681,
0.21510159969329834,
-0.0572107657790184,
0.11996158212423325,
0.11494024097919464,
-0.0994841605424881,
-0.002079695463180542,
-0.013352573849260807,
-0.052437674254179,
0.13938534259796143,
0.032279226928949356,
0.057151999324560165,
0.12953679263591766,
0.28340697288513184,
-0.002572199795395136,
0.10075309127569199,
-0.14935925602912903,
0.02498175948858261,
0.03255719318985939,
0.024690791964530945,
0.13013048470020294,
0.06171329319477081,
0.05024844408035278,
-0.07999513298273087,
-0.13390766084194183,
0.0021988784428685904,
0.1652602106332779,
-0.022465910762548447,
0.013496610336005688,
-0.10825631767511368,
0.08152858912944794,
0.06398607045412064,
-0.08266083896160126,
-0.008770940825343132,
0.04958030581474304,
0.07076472043991089,
-0.04095926508307457,
0.05439308285713196,
-0.18781940639019012,
0.10691317170858383,
0.16372519731521606,
0.053755730390548706,
-0.011371592059731483,
0.08570096641778946,
0.09563305228948593,
0.11526289582252502,
0.1082342267036438,
0.09771564602851868,
0.11940095573663712,
-0.11613517999649048,
-0.13359172642230988,
-0.03019232675433159,
0.03938804566860199,
0.025930773466825485,
0.17065277695655823,
-0.0654551163315773,
-0.09188877046108246,
0.057122521102428436,
-0.25683891773223877,
-0.09940965473651886,
-0.12262041866779327,
-0.014590416103601456,
-0.1626696139574051,
-0.08377590030431747,
-0.0942966639995575,
-0.023161234334111214,
0.015499796718358994,
-0.01747269555926323,
0.1092306524515152,
-0.14209207892417908,
-0.046929433941841125,
0.0709586963057518,
0.03502482920885086,
-0.02384510450065136,
0.0128890136256814,
-0.04496662691235542,
0.013543914072215557,
0.3026488721370697,
0.09953280538320541,
-0.1103743389248848,
0.012305865064263344,
-0.09031771123409271,
-0.09067881107330322,
0.016681207343935966,
0.01805981807410717,
-0.025457413867115974,
0.29227331280708313,
0.07094286382198334,
-0.011383521370589733,
0.0015648971311748028,
-0.04633699730038643,
-0.13601578772068024,
0.2277839034795761,
-0.10377205163240433,
-0.0038948317524045706,
-0.025810210034251213,
-0.055986881256103516,
0.13265380263328552,
-0.02692253887653351,
-0.00506872683763504,
-0.17091074585914612,
0.2043464332818985,
-0.07677123695611954,
-0.14476963877677917,
-0.03158595785498619,
0.014219405129551888,
0.15577611327171326,
-0.10646574199199677,
-0.16252358257770538,
0.07091403007507324,
-0.010817904025316238,
0.1256871223449707,
-0.07968141883611679,
-0.08047955483198166,
0.013708268292248249,
0.02358909137547016,
-0.012505050748586655,
-0.12695938348770142,
-0.0010460644261911511,
-0.20114107429981232,
0.11380971223115921,
0.007341830991208553,
-0.14238275587558746,
0.0005923634744249284,
-0.1275552362203598,
-0.15949396789073944,
0.04271921142935753,
0.04223189875483513,
-0.013760360889136791,
0.1795487403869629,
0.1572609543800354,
-0.04735521972179413,
-0.06772839277982712,
0.13195675611495972,
0.019176097586750984,
0.0532759353518486,
0.009381633251905441,
-0.13040317595005035,
0.08403218537569046,
-0.06047160550951958,
-0.05621221661567688,
-0.016711879521608353,
0.18458159267902374,
-0.0011857296340167522,
0.17732280492782593,
-0.09121502935886383,
-0.06963004916906357,
-0.016519134864211082,
0.06236950680613518,
-0.05060923472046852,
-0.0564858615398407,
0.01978226751089096,
0.09903861582279205,
-0.07603853195905685,
-0.2212556004524231,
0.2233838140964508,
0.09565267711877823,
-0.1201249361038208,
-0.09279462695121765,
-0.04234427213668823,
-0.03651609644293785,
-0.1234138086438179,
0.09244289249181747,
0.17841079831123352,
0.10875558108091354,
-0.09234318137168884,
-0.06397870928049088,
-2.6740853727851767e-32,
0.06827696412801743,
-0.0008132135262712836,
0.041924480348825455,
0.0609348900616169,
-0.11527355015277863,
-0.16541804373264313,
-0.04008279740810394,
-0.19605302810668945,
0.03085784986615181,
-0.07271137088537216,
-0.12404070049524307,
0.14297497272491455,
0.11053301393985748,
-0.05312163010239601,
-0.026897458359599113,
-0.05971105769276619,
0.11465857177972794,
-0.027098551392555237,
-0.04042200744152069,
0.09001482278108597,
0.05533953756093979,
0.017984652891755104,
0.11033953726291656,
0.21110203862190247,
-0.09717582911252975,
-0.15134292840957642,
-0.10063443332910538,
-0.10499405115842819,
-0.15762485563755035,
-0.2707786560058594,
0.017506610602140427,
0.09807399660348892,
-0.022531576454639435,
-0.03979591280221939,
-0.05427999421954155,
0.12313991785049438,
-0.3319620192050934,
-0.07390766590833664,
-0.004799498710781336,
0.03292889520525932,
-0.0840580016374588,
0.11568303406238556,
0.18109214305877686,
-0.06157608702778816,
0.08310052752494812,
0.16515962779521942,
0.07952290773391724,
0.03470662608742714,
-0.07640763372182846,
-0.05753040686249733,
0.1853044331073761,
0.07962461560964584,
-0.02572306990623474,
-0.008852982893586159,
0.04898734390735626,
-0.027479713782668114,
0.13675366342067719,
-0.04283354803919792,
-0.2754948139190674,
0.16967356204986572,
0.056309930980205536,
-0.08905990421772003,
-0.010921359062194824,
0.12086126208305359,
0.11871043592691422,
0.020744705572724342,
0.045551784336566925,
0.08648400008678436,
0.2916771471500397,
-0.021349554881453514,
-0.08655252307653427,
0.12511049211025238,
-0.1709531992673874,
-0.10155096650123596,
-0.018680885434150696,
-0.010066891089081764,
-0.10913664847612381,
0.020644286647439003,
-0.09949424862861633,
0.10968195647001266,
0.10217917710542679,
0.0053956834599375725,
-0.003385585732758045,
0.03318346291780472,
0.056859858334064484,
-0.04586560279130936,
0.16713640093803406,
0.10086053609848022,
-0.056890152394771576,
0.062395911663770676,
-0.1161574125289917,
0.1397843211889267,
0.0486815944314003,
-0.020093519240617752,
0.07627375423908234,
0.20187488198280334,
-0.011610930785536766,
0.022499509155750275,
-0.0370432548224926,
0.0036111671943217516,
0.06620330363512039,
-0.005162698682397604,
0.08010011166334152,
-0.02826041728258133,
0.06966335326433182,
-0.023091472685337067,
0.18678538501262665,
-0.021641436964273453,
-0.139895960688591,
-0.012944506481289864,
-0.09923360496759415,
-0.08809678256511688,
0.028160562738776207,
0.09768778085708618,
0.17527909576892853,
0.03908161446452141,
0.11496149748563766,
0.030329998582601547,
0.15836666524410248,
-0.04039294645190239,
-0.009221252053976059,
0.03106059692800045,
-0.013980565592646599,
-0.10004542768001556,
0.01428668200969696,
0.14911223948001862,
-0.1073107123374939,
-0.11537910252809525,
0.10484502464532852,
-0.05695323646068573,
-0.01773730479180813,
-0.021122923120856285,
7.581618888252706e-7,
-0.08654619008302689,
0.01898936741054058,
0.01666187308728695,
0.10624310374259949,
-0.10673526674509048,
-0.007078937254846096,
-0.01031785923987627,
0.12457691133022308,
0.0033803784754127264,
0.1224980428814888,
0.10676474869251251,
-0.0016798378201201558,
-0.029739340767264366,
0.1453441083431244,
-0.03999035805463791,
0.034306932240724564,
-0.08896533399820328,
0.18531803786754608,
-0.06559943407773972,
-0.15685750544071198,
0.05626989156007767,
0.11205123364925385,
-0.05464254692196846,
-0.04590748995542526,
0.06080121546983719,
-0.024463770911097527,
-0.07408051192760468,
0.08244721591472626,
0.012021034955978394,
0.03561295568943024,
0.036212723702192307,
-0.12524069845676422,
-0.07207372039556503,
0.07392667233943939,
-0.062486015260219574,
0.019250504672527313,
-0.21234558522701263,
0.03413684293627739,
0.087038554251194,
0.12032049149274826,
0.14779150485992432,
-0.05957891792058945,
-0.02452988550066948,
0.018520412966609,
0.06704068183898926,
0.20578476786613464,
-0.12798339128494263,
0.17918545007705688,
-0.02141782082617283,
-0.1674647033214569,
-0.022094573825597763,
0.12786097824573517,
-0.03347427025437355,
0.2712688744068146,
-0.060823675245046616,
0.07540919631719589,
0.0462283119559288,
-0.13515746593475342,
-0.011918898671865463,
-0.08759986609220505,
0.009433933533728123,
-0.013478679582476616,
0.11122085899114609,
0.031106803566217422,
0.08632157742977142,
-0.0578266978263855,
-0.010242417454719543,
1.3491657203447369e-34,
0.09622460603713989,
0.07694216817617416,
-0.16314080357551575,
0.020850809291005135,
0.0689864456653595,
-0.09792689979076385,
-0.15353581309318542,
0.07954518496990204,
0.08323002606630325,
-0.26438987255096436,
-0.2542942464351654
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | > For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That works indeed ! And what we meant is that you can make it even faster to instantiate. Indeed using RecordBatchStreamReader you need to get the list of all the record batches in each worker, whereas you could just get the list of record batches per worker if you use the record batches locations in the Arrow IPC file footer. This would be especially appreciated to have a fast instantiation in case you have tens of thousands of Arrow files for example. | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 110 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That works indeed ! And what we meant is that you can make it even faster to instantiate. Indeed using RecordBatchStreamReader you need to get the list of all the record batches in each worker, whereas you could just get the list of record batches per worker if you use the record batches locations in the Arrow IPC file footer. This would be especially appreciated to have a fast instantiation in case you have tens of thousands of Arrow files for example. | [
-0.22932852804660797,
0.3105093836784363,
-0.07069559395313263,
-0.002499209251254797,
-0.1255764365196228,
-0.07026736438274384,
0.3103172779083252,
0.030947832390666008,
-0.06409918516874313,
0.10194531828165054,
-0.03516526520252228,
0.055674344301223755,
-0.277767539024353,
-0.017912328243255615,
0.058121390640735626,
-0.07883001863956451,
-0.029253143817186356,
-0.015928342938423157,
-0.07772305607795715,
-0.09069068729877472,
-0.20436376333236694,
0.004939778242260218,
0.11293163895606995,
-0.17520774900913239,
-0.06958962231874466,
-0.0306555163115263,
-0.12102324515581131,
0.08598221093416214,
0.10602429509162903,
-0.12209261208772659,
0.0468447282910347,
0.10981442779302597,
-0.0034715416841208935,
-0.04448212683200836,
0.000005694079391105333,
0.050098173320293427,
0.08678130060434341,
-0.05975494533777237,
-0.02290867269039154,
0.005875248461961746,
0.09440818428993225,
-0.0841011181473732,
0.05850397050380707,
-0.07304751127958298,
-0.007800019346177578,
0.10496918112039566,
0.00009736033098306507,
-0.03318566828966141,
0.12198729068040848,
-0.1974293738603592,
-0.05314616113901138,
0.12878191471099854,
-0.06190076842904091,
-0.10215312242507935,
-0.030119245871901512,
0.0638100802898407,
-0.03363959491252899,
0.00638627028092742,
-0.09617257863283157,
-0.03699220344424248,
-0.19097882509231567,
0.013198517262935638,
0.04724115505814552,
0.05312635004520416,
0.14894084632396698,
-0.019944731146097183,
-0.2569655478000641,
-0.08215134590864182,
-0.02448165975511074,
-0.03012891672551632,
-0.15458683669567108,
-0.25010889768600464,
-0.025395970791578293,
-0.041621848940849304,
-0.04156098514795303,
-0.1926516890525818,
0.018619034439325333,
0.030124478042125702,
-0.033887214958667755,
0.03709854558110237,
-0.01819945126771927,
0.06619338691234589,
0.006356790661811829,
0.06423231214284897,
-0.09760969132184982,
-0.09290162473917007,
0.14271485805511475,
0.048346661031246185,
-0.009349143132567406,
0.02756625972688198,
0.2026599943637848,
-0.06360640376806259,
0.0143157122656703,
-0.09363014996051788,
-0.12827032804489136,
-0.046899065375328064,
-0.08684134483337402,
-0.05745382234454155,
0.05443509668111801,
0.030987629666924477,
-0.006051215808838606,
0.017869148403406143,
-0.036627959460020065,
0.1158277690410614,
-0.02509184367954731,
-0.21257953345775604,
-0.033525194972753525,
-0.08259810507297516,
-0.03767422214150429,
-0.02324068732559681,
0.02444865182042122,
0.12958815693855286,
-0.08995085209608078,
-0.14720165729522705,
0.1673065572977066,
0.06307666748762131,
0.26281455159187317,
0.21192386746406555,
0.004488971084356308,
-0.05904904752969742,
0.09122669696807861,
-0.0957210436463356,
0.006353975273668766,
0.04284818470478058,
0.15113167464733124,
-0.05028346925973892,
-0.13408710062503815,
-0.006163979880511761,
-0.03134004399180412,
-0.0988227054476738,
0.010434764437377453,
-0.010075711645185947,
0.09653344750404358,
0.11285380274057388,
0.17174942791461945,
-0.06385282427072525,
-0.031079329550266266,
-0.2228567898273468,
0.007249362301081419,
-0.02294127084314823,
0.09214048087596893,
0.005362801253795624,
-0.046843431890010834,
-0.10363525152206421,
0.06675480306148529,
0.06108063831925392,
-0.027888275682926178,
0.08688738197088242,
-0.12806302309036255,
0.09147247672080994,
0.15374435484409332,
0.031103115528821945,
-0.127312570810318,
0.15896543860435486,
-0.1585267335176468,
0.15799547731876373,
-0.1281559318304062,
-0.15377721190452576,
-0.11965049803256989,
0.052108168601989746,
0.10719149559736252,
-0.07704751938581467,
-0.1299894154071808,
-0.04712654650211334,
-0.027178307995200157,
0.1999373435974121,
0.13396255671977997,
0.07949594408273697,
-0.09704498201608658,
-0.22118350863456726,
0.09239032864570618,
-0.11802318692207336,
-0.09072550386190414,
-0.161170095205307,
0.002729227766394615,
0.24527476727962494,
0.030112681910395622,
0.12060150504112244,
-0.09777296334505081,
-0.004501207731664181,
0.004534557461738586,
-0.05615793913602829,
0.034446775913238525,
0.06161068007349968,
0.3177056908607483,
-0.18084292113780975,
-0.04929416626691818,
0.14083120226860046,
-0.08524512499570847,
0.02954699657857418,
0.08501066267490387,
0.1230454370379448,
-0.04493755102157593,
0.18485461175441742,
-0.01993844099342823,
0.011823424138128757,
0.026627684012055397,
-0.1504090279340744,
0.1014382541179657,
-0.11299242824316025,
0.004971939139068127,
-0.06041824817657471,
-0.004294198006391525,
0.04881691187620163,
0.14922858774662018,
-0.017398040741682053,
-0.21385988593101501,
0.1952434629201889,
0.16059626638889313,
-0.2053184062242508,
-0.09977494180202484,
0.03818981349468231,
0.06400037556886673,
-0.06469960510730743,
-0.15216222405433655,
0.08524911850690842,
-0.10358721762895584,
0.11251933127641678,
-0.15383735299110413,
-0.033270977437496185,
-0.08499136567115784,
0.09552441537380219,
0.0008779570925980806,
0.07990606129169464,
-0.18464316427707672,
0.034161679446697235,
0.016693059355020523,
-0.039807699620723724,
0.190410777926445,
-0.04533238708972931,
-0.0619247630238533,
-0.0888102725148201,
0.19808898866176605,
0.07741676270961761,
-0.004346875939518213,
0.09751135855913162,
-0.022756285965442657,
-0.013744737952947617,
0.06503012776374817,
0.017888221889734268,
-0.13691195845603943,
-0.10916255414485931,
-0.026612207293510437,
-0.017822077497839928,
0.021812599152326584,
0.14768444001674652,
-0.07772158831357956,
0.0016934771556407213,
-0.013973320834338665,
-0.08373574912548065,
0.03694901987910271,
0.15828555822372437,
-0.07772838324308395,
0.09041877090930939,
-0.0025040097534656525,
0.018089143559336662,
0.156210795044899,
0.11309057474136353,
0.036369260400533676,
0.04717879369854927,
0.10709682106971741,
-0.06899970024824142,
0.013645711354911327,
-0.06158288195729256,
-0.01730240322649479,
0.0016563811805099249,
0.13847030699253082,
0.07116182148456573,
0.047101277858018875,
0.0029569570906460285,
0.19352667033672333,
-0.042947918176651,
0.008736547082662582,
-0.020821422338485718,
-0.011220157146453857,
-0.11428675800561905,
-0.011677390895783901,
0.11716204881668091,
0.06359526515007019,
-0.1911858320236206,
-0.08533298969268799,
-0.031198160722851753,
0.10693599283695221,
-0.13372892141342163,
0.09504187852144241,
-0.033526621758937836,
0.028934137895703316,
0.07501615583896637,
-0.23983655869960785,
-0.1542806774377823,
-0.034835539758205414,
-0.18923234939575195,
-0.06470148265361786,
0.06526065617799759,
0.13147880136966705,
-0.03945097327232361,
0.08095484226942062,
0.14486990869045258,
-0.09743963181972504,
-0.16304519772529602,
-0.05282846465706825,
0.07888346165418625,
0.06926075369119644,
-0.036953046917915344,
0.07260692119598389,
0.09714247286319733,
0.11290006339550018,
0.09766897559165955,
-0.004815268330276012,
-0.0996161699295044,
0.14051644504070282,
-0.026875099167227745,
0.0036045145243406296,
-0.1004256084561348,
0.11325976997613907,
-0.09921853989362717,
-0.044410426169633865,
-0.29779937863349915,
-0.03577117249369621,
-0.0470886267721653,
0.00042931034113280475,
-0.012561819516122341,
-0.04010545834898949,
0.022387664765119553,
-0.02581808716058731,
-0.0591164194047451,
-0.27581435441970825,
-0.04755314812064171,
0.02037402056157589,
0.19905361533164978,
0.028180265799164772,
-0.1031043604016304,
0.06447318941354752,
-0.06077608838677406,
0.10742766410112381,
-0.10642462223768234,
-0.05549435317516327,
-0.11151479184627533,
0.2706592381000519,
-0.0851297453045845,
0.021561026573181152,
-0.10242855548858643,
-0.14288491010665894,
-0.0911526009440422,
0.15618553757667542,
0.11740999668836594,
0.08946496993303299,
-0.1366584599018097,
0.0785222202539444,
0.06236164644360542,
0.014579115435481071,
0.04694512486457825,
0.014776854775846004,
-0.04372960701584816,
-0.160050168633461,
0.07818357646465302,
-0.07529912143945694,
-0.09683068841695786,
-0.06556286662817001,
0.014403242617845535,
0.027373239398002625,
0.19793714582920074,
0.316295325756073,
-0.19565331935882568,
-0.14346089959144592,
0.07378706336021423,
0.1240314394235611,
-0.12433817237615585,
0.2172381579875946,
-0.19266200065612793,
-0.010951478965580463,
0.02815190516412258,
0.051762375980615616,
-0.12442273646593094,
-0.13552677631378174,
-0.059176646173000336,
0.07091788947582245,
-0.14587551355361938,
0.013302701525390148,
-0.1305973380804062,
-0.052860014140605927,
-0.08925022929906845,
0.030158020555973053,
-0.039921484887599945,
0.08942914754152298,
0.05590768903493881,
0.054794132709503174,
-0.00268667284399271,
-0.032471876591444016,
0.20406349003314972,
-0.06051626428961754,
0.14556805789470673,
0.10026179999113083,
-0.12440091371536255,
0.012378435581922531,
-0.002226283773779869,
-0.06769485771656036,
0.12772543728351593,
0.01438070833683014,
0.04203949123620987,
0.10118738561868668,
0.2956548035144806,
0.039285656064748764,
0.08695582300424576,
-0.14925223588943481,
-0.019282368943095207,
0.0499991849064827,
0.04868828505277634,
0.14911159873008728,
0.073992520570755,
0.01949414052069187,
-0.05765519663691521,
-0.13142868876457214,
-0.019166622310876846,
0.17652779817581177,
-0.007238635327666998,
-0.007875694893300533,
-0.11727743595838547,
0.09101773053407669,
0.08175871521234512,
-0.051251474767923355,
-0.040544912219047546,
-0.004754915833473206,
0.061755623668432236,
-0.0281209796667099,
0.04285016283392906,
-0.1891527622938156,
0.1230183094739914,
0.15134823322296143,
0.05078909546136856,
-0.008705241605639458,
0.1137026846408844,
0.10699333995580673,
0.11224072426557541,
0.08966614305973053,
0.028582802042365074,
0.121058389544487,
-0.13297340273857117,
-0.1131855845451355,
-0.014460555277764797,
0.06706205010414124,
0.013790617696940899,
0.12927351891994476,
-0.04456507787108421,
-0.11867207288742065,
0.06048934534192085,
-0.2566187381744385,
-0.10163445770740509,
-0.10813945531845093,
0.009259344078600407,
-0.12366341054439545,
-0.1222735047340393,
-0.08754792809486389,
0.009207023307681084,
0.02250613085925579,
-0.03474382311105728,
0.08699794113636017,
-0.16513195633888245,
-0.06338944286108017,
0.06454157829284668,
0.04151228815317154,
-0.037755049765110016,
-0.05576528608798981,
-0.0428135022521019,
0.040770236402750015,
0.3599652349948883,
0.05691753327846527,
-0.14006313681602478,
-0.0015539200976490974,
-0.07369368523359299,
-0.1064421534538269,
0.01784578152000904,
0.009211348369717598,
-0.015194710344076157,
0.26696619391441345,
0.080282062292099,
-0.009139174595475197,
0.009744341485202312,
-0.08805675059556961,
-0.1353289783000946,
0.2471034675836563,
-0.10676561295986176,
0.017649037763476372,
-0.016490554437041283,
-0.04927298054099083,
0.11262799054384232,
0.0024005139712244272,
-0.005192766897380352,
-0.18623760342597961,
0.20974025130271912,
-0.04934971034526825,
-0.1380515843629837,
-0.04771609604358673,
0.058292828500270844,
0.2063920646905899,
-0.07322864979505539,
-0.1044517382979393,
0.05746205151081085,
0.031830716878175735,
0.09970178455114365,
-0.040958017110824585,
-0.11294947564601898,
0.027155598625540733,
0.06407257169485092,
-0.015990832820534706,
-0.16221190989017487,
-0.016751091927289963,
-0.20606717467308044,
0.08539145439863205,
-0.009044171310961246,
-0.1468396931886673,
0.009224102832376957,
-0.12297587096691132,
-0.18443253636360168,
0.07248052954673767,
0.08322533220052719,
0.016868939623236656,
0.164444699883461,
0.15769411623477936,
-0.0672694742679596,
-0.04993421584367752,
0.10075660049915314,
0.006851483136415482,
0.010836789384484291,
0.022167805582284927,
-0.08666966110467911,
0.07645667344331741,
-0.05067247524857521,
-0.038230497390031815,
-0.020053256303071976,
0.14799320697784424,
0.025500718504190445,
0.15937493741512299,
-0.06952161341905594,
-0.08054693788290024,
-0.007599894423037767,
0.06092575192451477,
-0.017437860369682312,
-0.04277726262807846,
0.05243717506527901,
0.09082768857479095,
-0.05973101407289505,
-0.1906479001045227,
0.21285364031791687,
0.06737592816352844,
-0.1309308111667633,
-0.08309391885995865,
-0.06666695326566696,
-0.027291063219308853,
-0.13197506964206696,
0.09785299003124237,
0.18546365201473236,
0.1048516109585762,
-0.10613938421010971,
-0.11240363121032715,
-2.65375843059717e-32,
0.06013849005103111,
-0.06785009801387787,
0.029056591913104057,
0.057314906269311905,
-0.060350097715854645,
-0.11148940026760101,
-0.04615112021565437,
-0.17188628017902374,
0.0350203737616539,
-0.06501288712024689,
-0.10205994546413422,
0.15281176567077637,
0.10162431001663208,
-0.06599393486976624,
-0.027026865631341934,
-0.032032404094934464,
0.1626865267753601,
-0.013056252151727676,
-0.04625185951590538,
0.06418091803789139,
0.08044909685850143,
-0.03626726567745209,
0.11064600944519043,
0.1729629635810852,
-0.12368342280387878,
-0.11600518226623535,
-0.09902679920196533,
-0.09044007956981659,
-0.18464025855064392,
-0.2185152918100357,
0.002942387480288744,
0.11601655930280685,
-0.047126881778240204,
-0.06517508625984192,
-0.04123174771666527,
0.17085255682468414,
-0.3299624025821686,
-0.05929932743310928,
-0.024453550577163696,
0.026086192578077316,
-0.08268378674983978,
0.09414886683225632,
0.15334701538085938,
-0.07077567279338837,
0.08662427961826324,
0.1459859162569046,
0.06679220497608185,
0.05889026075601578,
-0.06320402026176453,
-0.10453610122203827,
0.16484396159648895,
0.06498800218105316,
-0.028525475412607193,
-0.026657963171601295,
0.0656648799777031,
-0.08137740194797516,
0.13773398101329803,
-0.06979444622993469,
-0.2867310345172882,
0.16816848516464233,
0.009626475162804127,
-0.062178436666727066,
-0.012311150319874287,
0.10732152312994003,
0.09682861715555191,
0.004036298952996731,
0.09344601631164551,
0.07942633330821991,
0.30707865953445435,
-0.050046104937791824,
-0.07259881496429443,
0.13110415637493134,
-0.18340802192687988,
-0.07032876461744308,
-0.06346092373132706,
-0.02317947708070278,
-0.09370815008878708,
0.007122548297047615,
-0.05957196280360222,
0.08928411453962326,
0.051473602652549744,
-0.015682589262723923,
-0.0008971950737759471,
0.03785190358757973,
0.03837108612060547,
0.023242251947522163,
0.18318034708499908,
0.10950836539268494,
-0.044339925050735474,
0.06274330615997314,
-0.1253618448972702,
0.10133130103349686,
0.06520190089941025,
-0.030377913266420364,
0.07600332051515579,
0.2152801901102066,
0.011973492801189423,
0.02901911363005638,
-0.010290557518601418,
0.01647333800792694,
0.06857291609048843,
0.014574576169252396,
0.06278262287378311,
-0.03691694140434265,
0.06565582752227783,
-0.028564976528286934,
0.15881812572479248,
-0.012135286815464497,
-0.1884496808052063,
-0.01700354740023613,
-0.08292120695114136,
-0.08908094465732574,
0.02504684589803219,
0.111627958714962,
0.20132574439048767,
0.0451008565723896,
0.11156665533781052,
-0.020508423447608948,
0.15013261139392853,
-0.03040074184536934,
-0.027350781485438347,
0.044446077197790146,
-0.03150624781847,
-0.07338955998420715,
-0.02996826358139515,
0.12281660735607147,
-0.1374158412218094,
-0.13331522047519684,
0.11215800791978836,
-0.08970221132040024,
-0.0033055655658245087,
-0.01795753836631775,
7.635299539288098e-7,
-0.12235747277736664,
0.004313691519200802,
-0.014057035557925701,
0.14474307000637054,
-0.09263823181390762,
0.001149856369011104,
0.013519869185984135,
0.12193217873573303,
-0.001849299413152039,
0.14172661304473877,
0.09594482183456421,
0.018221059814095497,
-0.014906689524650574,
0.16876158118247986,
-0.032991889864206314,
0.002722325501963496,
-0.10467558354139328,
0.17159885168075562,
-0.06070258095860481,
-0.19049938023090363,
0.07016649842262268,
0.1092243418097496,
-0.09665409475564957,
-0.04017786681652069,
0.06966343522071838,
-0.06262284517288208,
-0.046569354832172394,
0.11390016227960587,
-0.013986066915094852,
0.043401893228292465,
0.051187556236982346,
-0.10349851846694946,
-0.06772688776254654,
0.08063264191150665,
-0.061571914702653885,
0.032776832580566406,
-0.1742391735315323,
0.044440511614084244,
0.14591827988624573,
0.1047668606042862,
0.14142237603664398,
-0.06395276635885239,
-0.03315408527851105,
0.0748046413064003,
0.07924970984458923,
0.18554355204105377,
-0.0869871973991394,
0.18884488940238953,
-0.03017241135239601,
-0.2021961212158203,
-0.013939161784946918,
0.1505119353532791,
-0.02859717234969139,
0.28946632146835327,
-0.06417817622423172,
0.057822249829769135,
0.027615012601017952,
-0.12454899400472641,
-0.03202344477176666,
-0.10955968499183655,
-0.00030491326469928026,
-0.03576452657580376,
0.12301944941282272,
-0.00867411121726036,
0.09104125201702118,
-0.048127077519893646,
-0.029145952314138412,
1.3924038234402125e-34,
0.07686695456504822,
0.06337874382734299,
-0.09704562276601791,
0.022490793839097023,
0.0788520947098732,
-0.09191550314426422,
-0.17169757187366486,
0.043913766741752625,
0.06330684572458267,
-0.2916022837162018,
-0.25064027309417725
] |
https://github.com/huggingface/datasets/issues/5982 | 404 on Datasets Documentation Page | This wasnβt working for me a bit earlier, but it looks to be back up now | ### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co | 16 | 404 on Datasets Documentation Page
### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co
This wasnβt working for me a bit earlier, but it looks to be back up now | [
0.13830013573169708,
-0.0839238315820694,
-0.044661521911621094,
0.11983014643192291,
0.19211438298225403,
0.23138487339019775,
0.08476836234331131,
0.10167468339204788,
-0.02366729825735092,
0.23211286962032318,
-0.0008985185995697975,
0.019313963130116463,
-0.07685582339763641,
0.042737528681755066,
0.09669605642557144,
-0.07424472272396088,
-0.04841996356844902,
-0.06525357067584991,
-0.06224653869867325,
-0.0024255653843283653,
0.08211401849985123,
0.14029563963413239,
0.11817732453346252,
0.07345912605524063,
-0.172569140791893,
0.11980049312114716,
-0.060279279947280884,
0.027983801439404488,
-0.10614205151796341,
-0.20886726677417755,
0.25388774275779724,
0.020768197253346443,
-0.01247316226363182,
0.13398528099060059,
0.000006041057986294618,
0.030077772215008736,
0.16881656646728516,
0.13580064475536346,
-0.08984983712434769,
0.032823462039232254,
-0.014402245171368122,
-0.050456926226615906,
0.045463528484106064,
0.03369947895407677,
-0.035781703889369965,
-0.02830294519662857,
0.05399958789348602,
0.07421271502971649,
0.058328963816165924,
0.1584479957818985,
0.05328846722841263,
0.11305925995111465,
-0.04035567492246628,
-0.11207033693790436,
0.08569294959306717,
0.10654911398887634,
-0.029589718207716942,
0.09540889412164688,
-0.20442380011081696,
-0.06718006730079651,
0.08912280946969986,
0.07392524927854538,
0.06937778741121292,
0.14342251420021057,
-0.008610162883996964,
0.012302693910896778,
-0.07738550752401352,
-0.08368641883134842,
0.1293923705816269,
0.20696964859962463,
0.12725621461868286,
0.15150290727615356,
-0.163075253367424,
0.05526718124747276,
-0.04893084987998009,
0.0631982684135437,
-0.00442333472892642,
-0.14604894816875458,
0.0031578547786921263,
0.0006919067236594856,
-0.08988815546035767,
-0.08466193825006485,
-0.011625939048826694,
0.01099372562021017,
0.027299122884869576,
0.0029555419459939003,
-0.2044992297887802,
-0.025166355073451996,
-0.10430148988962173,
-0.17122764885425568,
0.025968177244067192,
0.05573571100831032,
-0.00728988740593195,
0.0027550270315259695,
0.11604425311088562,
0.02869551256299019,
-0.11620202660560608,
0.02436825819313526,
0.09415312856435776,
-0.11407868564128876,
0.00415032496675849,
-0.15517954528331757,
-0.18387387692928314,
0.025362828746438026,
0.09656879305839539,
0.04956755042076111,
0.07003848999738693,
-0.09647330641746521,
0.16011609137058258,
0.23338432610034943,
0.06817223131656647,
0.03970063850283623,
0.02580680325627327,
-0.1019291952252388,
-0.02436014637351036,
-0.06661361455917358,
-0.002098100958392024,
-0.023876795545220375,
-0.0014273481210693717,
0.0996331125497818,
0.05926301330327988,
0.09528724104166031,
-0.022524669766426086,
0.10036545246839523,
-0.04408082365989685,
-0.010588452219963074,
0.015803419053554535,
0.05111132562160492,
-0.006004077848047018,
-0.016462819650769234,
-0.05371837690472603,
-0.0003794507647398859,
-0.08433762192726135,
-0.014090113341808319,
0.08615633100271225,
0.004475288558751345,
0.07085991650819778,
-0.18304504454135895,
0.050745464861392975,
-0.02066894620656967,
0.006392239592969418,
0.04511582851409912,
-0.04943373054265976,
-0.06399279832839966,
0.26257139444351196,
0.003930625040084124,
0.0640965923666954,
0.016682062298059464,
0.08794596046209335,
-0.05666724964976311,
-0.12821625173091888,
0.12019138038158417,
-0.07593641430139542,
-0.08267573267221451,
0.10917084664106369,
-0.019914299249649048,
-0.018109247088432312,
0.08424623310565948,
-0.19033728539943695,
-0.0697311982512474,
0.055100008845329285,
0.1812353879213333,
0.22516180574893951,
-0.023533372208476067,
0.11010178178548813,
0.09561365097761154,
0.10544983297586441,
0.05588790401816368,
0.05747433006763458,
-0.008416122756898403,
0.0889955461025238,
-0.011157234199345112,
-0.16399140655994415,
-0.11019404977560043,
-0.2701396942138672,
0.1592102348804474,
-0.15060877799987793,
-0.04366438090801239,
-0.10823705047369003,
0.005242578685283661,
0.015591603703796864,
-0.13451415300369263,
-0.11421781778335571,
-0.12211919575929642,
-0.1307538002729416,
-0.07791489362716675,
0.02114761434495449,
-0.06624725461006165,
-0.043152227997779846,
0.0018307677237316966,
-0.008842332288622856,
-0.05609558895230293,
0.035715699195861816,
-0.10268830507993698,
0.04290824383497238,
-0.10386469215154648,
0.08960876613855362,
-0.15427564084529877,
0.06025044247508049,
-0.1385142207145691,
-0.10160559415817261,
0.10799083858728409,
0.09316147118806839,
0.19633643329143524,
0.1193317249417305,
-0.02157120779156685,
-0.10441746562719345,
0.13620446622371674,
0.08734673261642456,
-0.08472953736782074,
-0.07044274359941483,
-0.05803091824054718,
-0.017604582011699677,
0.013005186803638935,
-0.059459853917360306,
-0.051171112805604935,
-0.023684794083237648,
0.006225197575986385,
-0.058373548090457916,
0.21712855994701385,
-0.039371561259031296,
0.038407593965530396,
-0.035315074026584625,
0.08493278920650482,
-0.1336973011493683,
0.021547820419073105,
-0.07411220669746399,
-0.05309551581740379,
0.09660022705793381,
-0.004448707681149244,
-0.05288892611861229,
0.003104225965216756,
0.1770615428686142,
0.04640926048159599,
-0.08117439597845078,
0.049819547683000565,
0.14906153082847595,
-0.2735719084739685,
0.1335599720478058,
-0.16420750319957733,
-0.11577555537223816,
0.04569972679018974,
-0.17007094621658325,
0.09244954586029053,
0.07375697046518326,
-0.15340156853199005,
-0.19715425372123718,
0.0941719114780426,
-0.10267212986946106,
0.19241783022880554,
0.14528708159923553,
0.06451699882745743,
-0.1503341943025589,
0.025245854631066322,
0.11449690908193588,
-0.06919980049133301,
-0.01009359396994114,
0.0013528048293665051,
-0.17757673561573029,
0.011995735578238964,
0.22848328948020935,
-0.05437662824988365,
-0.12996861338615417,
0.04127909988164902,
-0.013205652125179768,
0.11164676398038864,
0.03972838073968887,
0.011448201723396778,
-0.29698559641838074,
0.061169032007455826,
0.0018753777258098125,
-0.09406346082687378,
-0.10003145784139633,
0.036011211574077606,
0.04632141813635826,
-0.04123317450284958,
-0.022758152335882187,
-0.0011524028377607465,
0.04731264337897301,
-0.010474128648638725,
-0.3427828252315521,
0.0703982338309288,
-0.08104383200407028,
-0.05570920556783676,
0.13535530865192413,
-0.06918638944625854,
-0.21493352949619293,
-0.09579820185899734,
0.006089857779443264,
-0.008955376222729683,
-0.13705000281333923,
0.07230037450790405,
-0.13857640326023102,
-0.13733939826488495,
-0.1716298907995224,
-0.05095783993601799,
0.044944606721401215,
-0.007161275949329138,
0.01650829426944256,
0.15273533761501312,
-0.06768199801445007,
0.13837209343910217,
-0.05420922115445137,
-0.1162288561463356,
-0.09536292403936386,
0.01961890235543251,
-0.021254414692521095,
-0.06195758655667305,
-0.11306175589561462,
-0.1804693192243576,
-0.01055245753377676,
-0.06864462047815323,
0.10750629007816315,
0.12148147076368332,
-0.052123457193374634,
0.04242574796080589,
-0.027622457593679428,
-0.057701196521520615,
0.1438421756029129,
0.14741596579551697,
0.04573627561330795,
0.09152678400278091,
0.018887344747781754,
-0.07335769385099411,
-0.04166502133011818,
0.008412724360823631,
0.0110994353890419,
0.04461631551384926,
0.0672820433974266,
-0.1317148208618164,
-0.05809972435235977,
0.05953805893659592,
0.030634477734565735,
-0.05453624948859215,
0.0042252992279827595,
-0.12041361629962921,
-0.0737215206027031,
-0.12942123413085938,
0.19630058109760284,
-0.012497426941990852,
-0.04037398844957352,
0.0860721543431282,
0.08698353916406631,
0.029775822535157204,
0.08939807862043381,
-0.08489159494638443,
0.011263377033174038,
-0.020666513592004776,
0.03021446242928505,
-0.12128636986017227,
0.12287392467260361,
0.09464317560195923,
0.018274571746587753,
-0.15213188529014587,
0.07868213951587677,
-0.14419090747833252,
-0.24268174171447754,
0.09307951480150223,
-0.0580889992415905,
-0.012694787234067917,
0.006789993029087782,
0.13965575397014618,
-0.11132099479436874,
-0.07656291127204895,
-0.02520057000219822,
0.09839440882205963,
0.045228876173496246,
0.2592633068561554,
0.03503375127911568,
-0.17193098366260529,
-0.012258561328053474,
0.016513338312506676,
0.014580140821635723,
0.01829393580555916,
0.08606348186731339,
0.1900327205657959,
-0.04217652231454849,
-0.13660123944282532,
0.0862836092710495,
-0.01055900752544403,
-0.07842033356428146,
-0.2558707892894745,
0.055843956768512726,
0.16428372263908386,
0.15708819031715393,
0.11738427728414536,
0.057894427329301834,
0.17883460223674774,
0.10479085147380829,
0.19103386998176575,
-0.07186221331357956,
0.045375607907772064,
-0.011107183992862701,
-0.2143828272819519,
0.12027186900377274,
0.00037399804568849504,
0.1749870330095291,
0.11389417946338654,
0.12271451205015182,
0.03750460594892502,
0.044113460928201675,
0.06905708461999893,
-0.05211346223950386,
0.20706868171691895,
-0.02243977040052414,
-0.0016092336736619473,
0.10086271166801453,
0.1808709353208542,
0.15247531235218048,
-0.07070798426866531,
0.08191414177417755,
0.15345726907253265,
-0.05053173005580902,
-0.08435189723968506,
0.06477393209934235,
-0.12777754664421082,
0.02295181341469288,
0.0905839130282402,
-0.08616946637630463,
-0.1992199569940567,
0.12645460665225983,
-0.03995366767048836,
-0.011436468921601772,
0.024457739666104317,
0.14350590109825134,
-0.05673106387257576,
0.058481838554143906,
-0.05940532684326172,
0.08401180058717728,
0.018513953313231468,
0.06738676875829697,
-0.031069310382008553,
-0.03587295114994049,
0.1296459436416626,
0.18241828680038452,
-0.014411894604563713,
0.16366411745548248,
-0.23190230131149292,
-0.19901730120182037,
-0.04475961998105049,
-0.18097178637981415,
0.09312626719474792,
0.18689647316932678,
-0.03936609998345375,
-0.1392701119184494,
0.09865304082632065,
-0.052276961505413055,
-0.07018781453371048,
0.0629202127456665,
0.00004699054989032447,
-0.03484648838639259,
-0.10802998393774033,
0.09324255585670471,
-0.260288268327713,
0.0540301576256752,
0.04838454723358154,
0.24355678260326385,
0.24877503514289856,
-0.028191717341542244,
-0.034256938844919205,
-0.19020797312259674,
-0.029544388875365257,
-0.16756272315979004,
-0.09355152398347855,
0.005739912856370211,
-0.06792145222425461,
0.29749566316604614,
-0.13187696039676666,
0.03901321068406105,
0.09539259225130081,
0.06597019731998444,
0.04131573811173439,
0.03280477225780487,
0.10573194175958633,
0.08569155633449554,
0.023997049778699875,
-0.0003465183253865689,
-0.011946040205657482,
0.02473139762878418,
-0.08292733877897263,
0.15661296248435974,
0.021615780889987946,
0.03873910754919052,
-0.1589815616607666,
-0.032433897256851196,
0.08399747312068939,
0.041157543659210205,
-0.0854872316122055,
-0.12288318574428558,
-0.07084795087575912,
0.1466372311115265,
-0.020131640136241913,
0.06072355806827545,
-0.014763399958610535,
-0.02457776851952076,
0.08663766086101532,
-0.0912102609872818,
0.013821819797158241,
0.11829662322998047,
0.09397944062948227,
0.13018351793289185,
-0.13636945188045502,
0.09823871403932571,
-0.018802953884005547,
-0.27599120140075684,
-0.26682204008102417,
-0.009370209649205208,
-0.1382574439048767,
0.06793468445539474,
-0.11330826580524445,
0.041216131299734116,
0.017526492476463318,
-0.013435741886496544,
-0.16245362162590027,
0.016985179856419563,
-0.14984361827373505,
-0.1730192005634308,
0.06743981689214706,
0.10481174290180206,
0.05894172191619873,
-0.0897480845451355,
-0.09751194715499878,
-0.051388345658779144,
-0.18843059241771698,
-0.028423260897397995,
0.23130159080028534,
0.059137362986803055,
0.17459708452224731,
0.1287347823381424,
-0.0818130299448967,
0.08010641485452652,
0.1385497748851776,
0.1519254744052887,
-0.16674456000328064,
-0.027825726196169853,
0.031547967344522476,
0.17810213565826416,
-0.07548418641090393,
0.027099186554551125,
-0.004794648382812738,
0.07173343002796173,
-0.07133427262306213,
-0.15004070103168488,
0.13595812022686005,
0.07367981970310211,
0.09674739837646484,
0.08858585357666016,
0.04804830998182297,
-0.11414021998643875,
-0.09375032037496567,
0.14986112713813782,
0.1597668081521988,
-0.04663132131099701,
-0.08447181433439255,
-0.18809010088443756,
-2.409434427704253e-32,
-0.053734224289655685,
0.1218399703502655,
-0.027355995029211044,
-0.008512544445693493,
-0.22988609969615936,
0.056564077734947205,
-0.018344970420002937,
-0.05183100327849388,
-0.08971838653087616,
-0.06187077611684799,
0.025166215375065804,
0.08982064574956894,
-0.021634742617607117,
0.08345958590507507,
-0.05947043374180794,
-0.10502837598323822,
-0.1426403522491455,
-0.15512387454509735,
-0.011194415390491486,
-0.047503747045993805,
0.03305661305785179,
-0.08304006606340408,
-0.017819445580244064,
-0.10453473776578903,
0.07188490033149719,
0.10639555752277374,
-0.1344415694475174,
0.007501044310629368,
0.09652942419052124,
0.005823757033795118,
-0.18679578602313995,
0.04808761179447174,
-0.06561338901519775,
0.10727269947528839,
-0.11005899310112,
-0.034131284803152084,
-0.07708950340747833,
-0.15882863104343414,
-0.16959905624389648,
-0.03060137666761875,
0.026995910331606865,
0.0810902789235115,
-0.06046750769019127,
-0.21075387299060822,
0.022874511778354645,
0.12417633086442947,
0.003866491373628378,
0.04871015250682831,
-0.07681826502084732,
-0.04754694923758507,
0.0029897603671997786,
0.020172201097011566,
-0.08805545419454575,
-0.01790126971900463,
0.14713165163993835,
-0.014386110939085484,
0.06759721040725708,
0.18286699056625366,
0.061729077249765396,
-0.008203092031180859,
0.04900151118636131,
0.07736056298017502,
-0.054662805050611496,
-0.06400066614151001,
0.04604342207312584,
-0.09076330065727234,
0.1519678831100464,
0.05436241254210472,
-0.012703347019851208,
-0.058005861937999725,
0.22067740559577942,
0.10750677436590195,
0.08547863364219666,
-0.10465842485427856,
-0.21515341103076935,
0.08574041724205017,
0.004579425323754549,
0.05573130398988724,
0.08251389116048813,
0.009454410523176193,
0.14831870794296265,
0.015343096107244492,
-0.060740675777196884,
-0.10688083618879318,
-0.019575560465455055,
0.05325515568256378,
-0.11757728457450867,
0.05909394100308418,
-0.1690482497215271,
0.0648069903254509,
0.013426733203232288,
0.026827730238437653,
-0.24305373430252075,
0.0990234836935997,
-0.23807089030742645,
0.1685963124036789,
-0.00741167226806283,
0.15739162266254425,
0.1375071108341217,
-0.10351899266242981,
-0.2227291762828827,
-0.07502759248018265,
0.03561317175626755,
0.2263893485069275,
0.08102000504732132,
-0.149899423122406,
-0.027087783440947533,
0.013280770741403103,
-0.10780663043260574,
-0.11919022351503372,
-0.11547883599996567,
0.11535792052745819,
0.1200660690665245,
-0.06569564342498779,
0.08634825050830841,
-0.02644413709640503,
-0.06673191487789154,
-0.014459431171417236,
-0.028566718101501465,
0.1698676347732544,
-0.12964683771133423,
-0.1813998818397522,
-0.28218457102775574,
0.06549753248691559,
0.006440192461013794,
0.002344029024243355,
-0.1842374950647354,
0.025206109508872032,
0.1320340484380722,
-0.1251188963651657,
-0.04124322906136513,
-0.12296611815690994,
7.496501552850532e-7,
-0.15840524435043335,
0.11427508294582367,
0.05800657719373703,
0.004128654487431049,
-0.035562798380851746,
-0.05790427327156067,
-0.20590269565582275,
0.15452316403388977,
-0.02333896793425083,
0.12914536893367767,
0.007161556277424097,
-0.014210126362740993,
-0.09968075901269913,
-0.15296633541584015,
0.17112372815608978,
-0.2206568717956543,
-0.0784507542848587,
-0.05842648819088936,
0.005714292172342539,
0.08952850848436356,
-0.1146225780248642,
0.17355453968048096,
0.12678095698356628,
0.03756319358944893,
0.12528236210346222,
0.07842781394720078,
-0.03500116616487503,
-0.10556855797767639,
0.1569053679704666,
-0.16436685621738434,
0.06225426122546196,
0.05250952020287514,
0.05781927332282066,
-0.0011364889796823263,
0.05973570793867111,
-0.10942985117435455,
-0.17012327909469604,
-0.10050036758184433,
0.012651752680540085,
0.015316803008317947,
0.05182359740138054,
-0.012110513634979725,
-0.11922772973775864,
-0.24620725214481354,
0.09641695767641068,
0.11509959399700165,
-0.15294991433620453,
0.13579100370407104,
-0.17589202523231506,
0.05229365453124046,
0.10413248091936111,
-0.026822904124855995,
-0.02779276669025421,
0.10178928822278976,
0.003230081871151924,
-0.21506744623184204,
0.10102089494466782,
-0.030744390562176704,
0.11942961066961288,
-0.04022136330604553,
0.04000408202409744,
-0.08810660988092422,
0.01673281006515026,
0.3043268620967865,
-0.03185565397143364,
-0.08571867644786835,
-0.12038855254650116,
1.7158432751619986e-34,
0.1041875034570694,
-0.020657720044255257,
0.06780184060335159,
-0.28814566135406494,
-0.05490131303668022,
-0.005080897361040115,
0.20878861844539642,
0.14078688621520996,
-0.01724943332374096,
-0.19018825888633728,
0.024058189243078232
] |
https://github.com/huggingface/datasets/issues/5982 | 404 on Datasets Documentation Page | We had a minor issue updating the docs after the latest release. It should work now :). | ### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co | 17 | 404 on Datasets Documentation Page
### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co
We had a minor issue updating the docs after the latest release. It should work now :). | [
0.13786883652210236,
-0.0958598330616951,
-0.03768494725227356,
0.12748394906520844,
0.17383258044719696,
0.23306216299533844,
0.06409084051847458,
0.09774301201105118,
-0.006653348449617624,
0.25828438997268677,
-0.0033883932046592236,
0.03831372410058975,
-0.08038449287414551,
0.03938288241624832,
0.08271807432174683,
-0.07943596690893173,
-0.05070100724697113,
-0.041158732026815414,
-0.06092756614089012,
-0.01197434589266777,
0.09485276788473129,
0.1494055688381195,
0.12384657561779022,
0.08354665338993073,
-0.17634780704975128,
0.12452773004770279,
-0.06253772974014282,
0.04761349409818649,
-0.09950839728116989,
-0.19727477431297302,
0.26450738310813904,
0.011376415379345417,
0.002544146729633212,
0.1475651115179062,
0.0000060411193771869875,
0.029076343402266502,
0.14077918231487274,
0.13138455152511597,
-0.08661849051713943,
0.03200618177652359,
-0.015910392627120018,
-0.0675036758184433,
0.04132426530122757,
0.018123973160982132,
-0.04410390928387642,
-0.027217555791139603,
0.058818720281124115,
0.0841086283326149,
0.06265335530042648,
0.1521536409854889,
0.05328403785824776,
0.10567788034677505,
-0.04170931503176689,
-0.11326688528060913,
0.08041511476039886,
0.10976714640855789,
-0.03357347846031189,
0.10119567811489105,
-0.21932700276374817,
-0.05608042702078819,
0.08027750998735428,
0.07209933549165726,
0.07773777097463608,
0.1567189246416092,
-0.015566784888505936,
0.02175891026854515,
-0.07480142265558243,
-0.07919318974018097,
0.1088947057723999,
0.21076732873916626,
0.12766902148723602,
0.1381223350763321,
-0.1524675488471985,
0.05224134027957916,
-0.04484733194112778,
0.07492271810770035,
-0.028034402057528496,
-0.14037099480628967,
0.003523653605952859,
-0.010412084870040417,
-0.09833307564258575,
-0.0943249985575676,
-0.031528908759355545,
0.002051452873274684,
0.043288376182317734,
0.0027668625116348267,
-0.2015347182750702,
-0.020485954359173775,
-0.12402357161045074,
-0.15443561971187592,
0.011973408982157707,
0.057081036269664764,
0.005384726915508509,
0.013410010375082493,
0.10494343191385269,
0.02489759773015976,
-0.12529996037483215,
0.01856611669063568,
0.09112583845853806,
-0.12465761601924896,
0.016324354335665703,
-0.16894331574440002,
-0.17765238881111145,
0.028460610657930374,
0.0686948299407959,
0.04447100684046745,
0.08142238110303879,
-0.09715905785560608,
0.1479039490222931,
0.226545050740242,
0.06979038566350937,
0.04622701182961464,
0.021261906251311302,
-0.07767632603645325,
-0.030531423166394234,
-0.05249425396323204,
-0.028815437108278275,
-0.029632387682795525,
0.0013001230545341969,
0.09388335794210434,
0.06823219358921051,
0.10947935283184052,
-0.04087088257074356,
0.07831081002950668,
-0.036394618451595306,
-0.011270543560385704,
0.020343000069260597,
0.05904829129576683,
-0.02151910401880741,
-0.02971113659441471,
-0.040651578456163406,
-0.00023739694734103978,
-0.0706770047545433,
-0.012225966900587082,
0.06767857074737549,
-0.013603784143924713,
0.0664367750287056,
-0.18343870341777802,
0.0380086824297905,
-0.012676544487476349,
0.029259175062179565,
0.05414813384413719,
-0.07843518257141113,
-0.05463069677352905,
0.29151982069015503,
0.0015324070118367672,
0.0676983892917633,
0.020851243287324905,
0.07363860309123993,
-0.04144274443387985,
-0.11381003260612488,
0.10106653720140457,
-0.08091840147972107,
-0.07437948882579803,
0.13355174660682678,
-0.013378736563026905,
-0.02794313058257103,
0.09254081547260284,
-0.1956264227628708,
-0.06085110455751419,
0.030081169679760933,
0.1638004183769226,
0.21113599836826324,
-0.038780421018600464,
0.09763766825199127,
0.08629092574119568,
0.11153857409954071,
0.06046588346362114,
0.06787332147359848,
0.00427410751581192,
0.09713451564311981,
0.0016908871475607157,
-0.1653885841369629,
-0.11097937822341919,
-0.27580752968788147,
0.1601100116968155,
-0.1447383463382721,
-0.03883649781346321,
-0.09953255206346512,
-0.004602768924087286,
0.010067751631140709,
-0.12896835803985596,
-0.10081182420253754,
-0.10614248365163803,
-0.11585710197687149,
-0.082422636449337,
0.012840861454606056,
-0.08164899051189423,
-0.032990824431180954,
-0.002873244695365429,
0.0019147198181599379,
-0.05594072863459587,
0.04173464700579643,
-0.08074256777763367,
0.027485137805342674,
-0.10377811640501022,
0.09775615483522415,
-0.14518120884895325,
0.04238424077630043,
-0.1414155662059784,
-0.08815967291593552,
0.10417905449867249,
0.10418637096881866,
0.1843508929014206,
0.1221056655049324,
-0.004450896754860878,
-0.1200927197933197,
0.12717556953430176,
0.08951124548912048,
-0.10124132037162781,
-0.06287887692451477,
-0.07196421921253204,
-0.018722867593169212,
0.000043375908717280254,
-0.06894909590482712,
-0.047983765602111816,
-0.038988251239061356,
-0.00494803860783577,
-0.052133798599243164,
0.20639823377132416,
-0.011720538139343262,
0.04042420536279678,
-0.03749578073620796,
0.08957640826702118,
-0.1370689570903778,
0.02041526883840561,
-0.09691444784402847,
-0.06622866541147232,
0.10767107456922531,
-0.012806097976863384,
-0.04058310016989708,
-0.0028883214108645916,
0.18659846484661102,
0.05973116308450699,
-0.07973410189151764,
0.046083055436611176,
0.1490408033132553,
-0.265004426240921,
0.14741170406341553,
-0.1623000204563141,
-0.1243937686085701,
0.05513424426317215,
-0.18829408288002014,
0.0951543003320694,
0.07115146517753601,
-0.12168537080287933,
-0.1928609162569046,
0.07712515443563461,
-0.1043962836265564,
0.18774448335170746,
0.14137011766433716,
0.07086115330457687,
-0.14937849342823029,
0.02850106731057167,
0.1243152990937233,
-0.07350150495767593,
-0.0050149899907410145,
0.016950460150837898,
-0.1757182627916336,
0.013068529777228832,
0.22388999164104462,
-0.04213801026344299,
-0.12854069471359253,
0.06082870066165924,
-0.02140841633081436,
0.11391525715589523,
0.03111075609922409,
0.010324869304895401,
-0.3009086549282074,
0.06459612399339676,
0.0004348031943663955,
-0.07531760632991791,
-0.08798543363809586,
0.03843872994184494,
0.045932378619909286,
-0.03963496536016464,
0.0008473071502521634,
-0.011306163854897022,
0.04272948578000069,
-0.010067320428788662,
-0.33362680673599243,
0.08538851886987686,
-0.07603202760219574,
-0.04769778996706009,
0.14839638769626617,
-0.07708791643381119,
-0.20267198979854584,
-0.08415937423706055,
-0.018469644710421562,
-0.019147006794810295,
-0.15285040438175201,
0.06539210677146912,
-0.1316709816455841,
-0.13911306858062744,
-0.17157326638698578,
-0.052973613142967224,
0.05465656518936157,
-0.0036425075959414244,
0.014812626875936985,
0.16172511875629425,
-0.06617141515016556,
0.15845513343811035,
-0.0636724904179573,
-0.11143653094768524,
-0.12509065866470337,
0.0163334421813488,
-0.022661156952381134,
-0.053789395838975906,
-0.09227550774812698,
-0.20464083552360535,
-0.005429156590253115,
-0.0639607161283493,
0.11301662772893906,
0.1173974871635437,
-0.048307597637176514,
0.04081590846180916,
-0.031520191580057144,
-0.07043500989675522,
0.13853764533996582,
0.13681264221668243,
0.04374578595161438,
0.08460474759340286,
0.018015382811427116,
-0.05528707429766655,
-0.048082154244184494,
-0.007297344505786896,
0.00782916508615017,
0.03510720282793045,
0.0735369324684143,
-0.12076209485530853,
-0.04065530374646187,
0.04408188909292221,
0.040283285081386566,
-0.06031588092446327,
0.006440076977014542,
-0.11741968989372253,
-0.06299649924039841,
-0.14210008084774017,
0.19266562163829803,
-0.0012106035137549043,
-0.047303613275289536,
0.09507394582033157,
0.09551610052585602,
0.02989349700510502,
0.06279539316892624,
-0.09203173965215683,
-0.0029271896928548813,
-0.0316416397690773,
0.020521949976682663,
-0.11697344481945038,
0.11976047605276108,
0.09918937087059021,
0.03514738380908966,
-0.14689649641513824,
0.0796532928943634,
-0.1510932743549347,
-0.22640958428382874,
0.09271838515996933,
-0.07353366911411285,
-0.004808737430721521,
0.011815301142632961,
0.14919070899486542,
-0.12359388917684555,
-0.08953944593667984,
-0.028171991929411888,
0.08087906986474991,
0.049949243664741516,
0.2592999339103699,
0.03676242008805275,
-0.17384018003940582,
0.00448070140555501,
0.01587141491472721,
0.031242774799466133,
0.03385169431567192,
0.09298601746559143,
0.20790129899978638,
-0.036567382514476776,
-0.12612919509410858,
0.09262844920158386,
-0.031739309430122375,
-0.07192429155111313,
-0.2470574676990509,
0.05389760062098503,
0.15452741086483002,
0.13571284711360931,
0.12240441888570786,
0.06278824061155319,
0.17351475358009338,
0.10305929183959961,
0.20983515679836273,
-0.06555945426225662,
0.047631002962589264,
-0.011528716422617435,
-0.1986636519432068,
0.13099899888038635,
-0.001319941133260727,
0.16274699568748474,
0.12794199585914612,
0.13617628812789917,
0.03765297681093216,
0.06294330209493637,
0.06592639535665512,
-0.046268850564956665,
0.19690126180648804,
-0.031825896352529526,
-0.001317647285759449,
0.07375814765691757,
0.19991406798362732,
0.15636752545833588,
-0.07513026148080826,
0.07559046894311905,
0.14854416251182556,
-0.05516435205936432,
-0.11019774526357651,
0.0317387580871582,
-0.1353611797094345,
0.018140681087970734,
0.0700579285621643,
-0.07017390429973602,
-0.18688476085662842,
0.1318950057029724,
-0.048394352197647095,
-0.0029570278711616993,
0.011514612473547459,
0.1287621259689331,
-0.05583107843995094,
0.047373246401548386,
-0.08303598314523697,
0.06934159994125366,
0.004416035488247871,
0.07723624259233475,
-0.02102903090417385,
-0.024852383881807327,
0.10968227684497833,
0.19473564624786377,
-0.011133434250950813,
0.15294553339481354,
-0.23502489924430847,
-0.20574596524238586,
-0.06931222975254059,
-0.18428534269332886,
0.08979719877243042,
0.17473454773426056,
-0.027522359043359756,
-0.12243835628032684,
0.09684441238641739,
-0.047002628445625305,
-0.055109310895204544,
0.06933830678462982,
-0.002107913140207529,
-0.04700123518705368,
-0.10541190207004547,
0.10463334619998932,
-0.24215877056121826,
0.04966803267598152,
0.0560191348195076,
0.23264166712760925,
0.25207048654556274,
-0.018463091924786568,
-0.03309934586286545,
-0.177503764629364,
-0.031950902193784714,
-0.17090006172657013,
-0.08809678256511688,
-0.02114993892610073,
-0.0618375688791275,
0.2932586371898651,
-0.1130930557847023,
0.03397494554519653,
0.07960334420204163,
0.05809713155031204,
0.03940952196717262,
0.03336178883910179,
0.09067575633525848,
0.10056310147047043,
0.03125425800681114,
-0.013706108555197716,
0.0013483576476573944,
0.017166901379823685,
-0.06094249337911606,
0.17010265588760376,
0.039237190037965775,
0.03338034823536873,
-0.14271128177642822,
-0.039619602262973785,
0.08420958369970322,
0.04216708615422249,
-0.06473741680383682,
-0.12942637503147125,
-0.044889986515045166,
0.14132949709892273,
-0.010497163981199265,
0.052548982203006744,
-0.0166708342730999,
-0.02613629214465618,
0.08725623786449432,
-0.08245214074850082,
0.01945391669869423,
0.12304690480232239,
0.09638515114784241,
0.13659359514713287,
-0.12361881881952286,
0.09952351450920105,
-0.010067803785204887,
-0.2791040539741516,
-0.253959983587265,
-0.0049115815199911594,
-0.15368638932704926,
0.054589156061410904,
-0.1056128516793251,
0.038469597697257996,
0.03762267157435417,
-0.018599113449454308,
-0.15341435372829437,
0.008073071017861366,
-0.14119620621204376,
-0.16860799491405487,
0.07216285169124603,
0.11582794785499573,
0.05624960735440254,
-0.09042225778102875,
-0.11278876662254333,
-0.04124258831143379,
-0.188368558883667,
-0.0352124385535717,
0.24169662594795227,
0.0518510639667511,
0.1680920571088791,
0.13393519818782806,
-0.06854137033224106,
0.07601449638605118,
0.14561009407043457,
0.14608646929264069,
-0.1699722558259964,
-0.022885799407958984,
0.02116016298532486,
0.14959846436977386,
-0.07309842854738235,
0.021053727716207504,
0.0025823740288615227,
0.08538578450679779,
-0.07393942028284073,
-0.15950113534927368,
0.14474599063396454,
0.07320239394903183,
0.09596738964319229,
0.07297640293836594,
0.03166716545820236,
-0.11833745986223221,
-0.09338195621967316,
0.14206084609031677,
0.16494229435920715,
-0.04276515543460846,
-0.0924406424164772,
-0.19100144505500793,
-2.4448032894789694e-32,
-0.03421640023589134,
0.12438862025737762,
-0.023418499156832695,
-0.014131272211670876,
-0.22409027814865112,
0.05468394607305527,
-0.0032955424394458532,
-0.06724666804075241,
-0.09078770875930786,
-0.07296206057071686,
0.04120960831642151,
0.0836440920829773,
-0.013032618910074234,
0.08686311542987823,
-0.06503856182098389,
-0.11466424912214279,
-0.14368465542793274,
-0.15914811193943024,
-0.002525490242987871,
-0.04927439242601395,
0.03503405675292015,
-0.08115766197443008,
0.0004733750829473138,
-0.11951131373643875,
0.06941519677639008,
0.10137960314750671,
-0.13199502229690552,
0.011993695050477982,
0.0847523957490921,
0.0033847300801426172,
-0.1976197063922882,
0.054038263857364655,
-0.06465119868516922,
0.11730573326349258,
-0.11139363050460815,
-0.03782939910888672,
-0.07290667295455933,
-0.16321150958538055,
-0.18179482221603394,
-0.026200342923402786,
0.010063673369586468,
0.07918363064527512,
-0.07488392293453217,
-0.22099116444587708,
0.020182626321911812,
0.12132257223129272,
-0.012042663991451263,
0.054081887006759644,
-0.0803193524479866,
-0.0353560671210289,
0.003717094426974654,
0.0290365070104599,
-0.062057171016931534,
-0.03408810868859291,
0.13805338740348816,
0.0006544434581883252,
0.06562484800815582,
0.17714397609233856,
0.05662812665104866,
-0.014038433320820332,
0.056157056242227554,
0.08639151602983475,
-0.05222192406654358,
-0.05555063858628273,
0.060468100011348724,
-0.10575664043426514,
0.1303064078092575,
0.05923432111740112,
-0.005993195343762636,
-0.04821086674928665,
0.19331049919128418,
0.09720654040575027,
0.09260347485542297,
-0.10861507803201675,
-0.2144261747598648,
0.08611965924501419,
-0.004922644700855017,
0.0646325945854187,
0.08175813406705856,
0.008402163162827492,
0.1439565271139145,
0.013398946262896061,
-0.050095509737730026,
-0.10860482603311539,
-0.016703322529792786,
0.05513392388820648,
-0.10962175577878952,
0.042569030076265335,
-0.16291175782680511,
0.05169273167848587,
0.016153043136000633,
0.017521977424621582,
-0.23442615568637848,
0.10032692551612854,
-0.24073006212711334,
0.15081512928009033,
0.015126705169677734,
0.15087145566940308,
0.1529906988143921,
-0.1014714315533638,
-0.21990539133548737,
-0.0667889267206192,
0.05768870934844017,
0.21415860950946808,
0.07404036819934845,
-0.15476451814174652,
-0.020304253324866295,
0.029875779524445534,
-0.09528935700654984,
-0.1220293641090393,
-0.12696006894111633,
0.11111927777528763,
0.12383865565061569,
-0.07606279104948044,
0.08343912661075592,
-0.03180884197354317,
-0.07190077751874924,
-0.007712045684456825,
-0.03020354174077511,
0.17763687670230865,
-0.1265297383069992,
-0.17218133807182312,
-0.2804436683654785,
0.06806875765323639,
0.00540454126894474,
0.005877030082046986,
-0.1772637665271759,
0.03490051254630089,
0.11420048028230667,
-0.12690190970897675,
-0.04773258417844772,
-0.13548557460308075,
7.536636985605583e-7,
-0.15422634780406952,
0.10284759104251862,
0.051396552473306656,
-0.007749139331281185,
-0.01785489358007908,
-0.05790665000677109,
-0.1989116221666336,
0.1712033450603485,
-0.036024823784828186,
0.13593831658363342,
0.017258329316973686,
-0.030580082908272743,
-0.09344588965177536,
-0.16507379710674286,
0.1604420244693756,
-0.20434334874153137,
-0.10568589717149734,
-0.06146341934800148,
0.017006468027830124,
0.08658555150032043,
-0.08987525850534439,
0.1682034283876419,
0.11338440328836441,
0.029660463333129883,
0.11407576501369476,
0.09139276295900345,
-0.029125133529305458,
-0.09587424993515015,
0.15962059795856476,
-0.16210083663463593,
0.06341663748025894,
0.03802398964762688,
0.06492768228054047,
-0.008231613785028458,
0.045821238309144974,
-0.11269951611757278,
-0.14985041320323944,
-0.09555377811193466,
-0.008531633764505386,
-0.0009049774962477386,
0.058429356664419174,
-0.01677222177386284,
-0.13041481375694275,
-0.25839051604270935,
0.08953902870416641,
0.11804240942001343,
-0.1662028282880783,
0.14766572415828705,
-0.178365096449852,
0.05441127344965935,
0.11565051972866058,
-0.032652098685503006,
-0.029761547222733498,
0.09316597133874893,
0.0056541538797318935,
-0.230618417263031,
0.08599831163883209,
-0.03102622926235199,
0.11897802352905273,
-0.03572959080338478,
0.053636334836483,
-0.10564310848712921,
0.03219613805413246,
0.29793086647987366,
-0.01856360211968422,
-0.054383937269449234,
-0.11751217395067215,
1.5540875612660486e-34,
0.10140342265367508,
-0.029420949518680573,
0.061781156808137894,
-0.2864689528942108,
-0.04982386901974678,
-0.0025610297452658415,
0.2166348695755005,
0.1331060379743576,
-0.019142592325806618,
-0.18829993903636932,
0.015285343863070011
] |
https://github.com/huggingface/datasets/issues/5981 | Only two cores are getting used in sagemaker with pytorch 3.10 kernel | I think it's more likely that this issue is related to PyTorch than Datasets, as PyTorch (on import) registers functions to execute when forking a process. Maybe this is the culprit: https://github.com/pytorch/pytorch/issues/99625 | ### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.
![Selection_072](https://github.com/huggingface/datasets/assets/107141022/04c5a824-5321-4531-afca-7bc84dff36b4)
When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel | 32 | Only two cores are getting used in sagemaker with pytorch 3.10 kernel
### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.
![Selection_072](https://github.com/huggingface/datasets/assets/107141022/04c5a824-5321-4531-afca-7bc84dff36b4)
When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
I think it's more likely that this issue is related to PyTorch than Datasets, as PyTorch (on import) registers functions to execute when forking a process. Maybe this is the culprit: https://github.com/pytorch/pytorch/issues/99625 | [
-0.01953105442225933,
-0.1318715512752533,
-0.058712467551231384,
0.1216578334569931,
0.0379493273794651,
-0.15693867206573486,
0.03367646411061287,
0.06222713738679886,
-0.05440274626016617,
-0.049715835601091385,
-0.00613021245226264,
0.07412468641996384,
-0.10839667916297913,
-0.0513540543615818,
-0.02565927803516388,
0.05558529123663902,
-0.036096494644880295,
-0.0211808905005455,
-0.08486999571323395,
-0.011556456796824932,
-0.12828192114830017,
0.1814829707145691,
0.056004397571086884,
-0.21223200857639313,
-0.1256905049085617,
0.04115454852581024,
0.027539942413568497,
-0.029157644137740135,
0.045580726116895676,
-0.027599787339568138,
-0.0758650004863739,
-0.041787829250097275,
-0.1832590252161026,
0.13041985034942627,
0.000005931186024099588,
-0.016103552654385567,
-0.010567919351160526,
0.11410496383905411,
0.046924810856580734,
0.055862583220005035,
0.2782113552093506,
0.0025556767359375954,
0.10937009751796722,
-0.043087128549814224,
-0.11978312581777573,
0.08812152594327927,
-0.2172793447971344,
0.0759928822517395,
0.07957318425178528,
0.06315430253744125,
-0.010991677641868591,
0.1203237846493721,
-0.060207344591617584,
-0.03213198110461235,
-0.15271277725696564,
-0.11908259242773056,
-0.18027882277965546,
-0.03441181778907776,
0.055756375193595886,
0.02223115786910057,
-0.03131020814180374,
0.06715826690196991,
0.16912446916103363,
0.04110812395811081,
0.1430186778306961,
0.13419978320598602,
-0.15395194292068481,
-0.24157002568244934,
0.09770031273365021,
-0.003545805811882019,
-0.287667453289032,
0.06332150846719742,
0.004954956006258726,
-0.03738900274038315,
-0.13750755786895752,
-0.10365800559520721,
0.13051705062389374,
-0.018944237381219864,
-0.14170633256435394,
-0.008175179362297058,
0.042649976909160614,
0.13387234508991241,
-0.006712125148624182,
-0.05058373138308525,
-0.04042752459645271,
0.2722039222717285,
-0.0008880456443876028,
0.1934359222650528,
0.14195875823497772,
-0.006859945133328438,
-0.1600974053144455,
-0.04854865372180939,
0.05586013197898865,
-0.17447859048843384,
-0.08563196659088135,
-0.01988602802157402,
0.02196802757680416,
-0.03746232017874718,
-0.09596288204193115,
0.03415270149707794,
0.0026061167009174824,
0.040915876626968384,
-0.06482499092817307,
0.03985648229718208,
-0.17274172604084015,
-0.18267560005187988,
-0.043523553758859634,
0.07605906575918198,
0.04324248433113098,
0.1016138419508934,
0.06771808862686157,
0.13777010142803192,
0.09662223607301712,
0.012610928155481815,
0.13090592622756958,
-0.12785258889198303,
0.0004809825331903994,
-0.003519371384754777,
-0.019197385758161545,
-0.05543449893593788,
-0.020346039906144142,
-0.0063560279086232185,
-0.05463053658604622,
-0.03621985390782356,
-0.011642014607787132,
0.08976075053215027,
-0.05387675017118454,
0.0743393674492836,
-0.21240206062793732,
-0.23138746619224548,
0.01827424205839634,
0.07430500537157059,
-0.05603563040494919,
-0.09133550524711609,
0.13281071186065674,
-0.33009636402130127,
-0.012416861951351166,
-0.006163521204143763,
-0.04437142238020897,
-0.1738317906856537,
0.09458564221858978,
-0.13103219866752625,
0.003902257652953267,
0.15229010581970215,
-0.09612126648426056,
0.12775272130966187,
0.2359391748905182,
0.000031936131563270465,
0.03529413789510727,
-0.015156037174165249,
-0.1312718689441681,
0.15713860094547272,
-0.01283272635191679,
-0.006682933773845434,
-0.037616051733493805,
0.1090584546327591,
0.03843476250767708,
0.16793613135814667,
-0.11739008873701096,
0.01614418998360634,
0.01707742176949978,
0.012329024262726307,
-0.14892013370990753,
-0.1468472182750702,
0.14449259638786316,
0.019091129302978516,
-0.02967928908765316,
-0.022937936708331108,
-0.05065349489450455,
0.13007168471813202,
0.16793017089366913,
0.05561003461480141,
-0.16574330627918243,
0.005528868176043034,
-0.16550274193286896,
0.13226798176765442,
-0.28013816475868225,
-0.10467281937599182,
-0.12552770972251892,
-0.18295985460281372,
-0.018844613805413246,
-0.019760625436902046,
-0.04930981248617172,
-0.14493189752101898,
0.12046224623918533,
-0.0732000395655632,
0.0900670662522316,
0.015310393646359444,
0.006096268072724342,
-0.02329111285507679,
0.03094920516014099,
0.16315709054470062,
-0.09132329374551773,
-0.023531559854745865,
0.18021494150161743,
0.014791958034038544,
-0.060852739959955215,
-0.13622862100601196,
0.025848574936389923,
-0.2701188623905182,
0.06045220047235489,
0.026169486343860626,
0.07451274245977402,
0.12451661378145218,
0.01499252486974001,
-0.05443025752902031,
-0.050186268985271454,
0.0547473281621933,
0.06633605808019638,
-0.008874364197254181,
-0.029860125854611397,
0.08811601251363754,
0.11759138852357864,
0.02046825923025608,
-0.16341082751750946,
-0.2530438303947449,
-0.1197052150964737,
-0.13059501349925995,
-0.09745185077190399,
0.03148052096366882,
-0.12732964754104614,
0.0782061442732811,
0.2467757612466812,
0.0810738280415535,
-0.22210140526294708,
0.11861962080001831,
0.04070965200662613,
-0.12788432836532593,
-0.04439275711774826,
0.06084500253200531,
0.033432088792324066,
0.0017456403002142906,
0.06457395851612091,
-0.19257782399654388,
-0.011446892283856869,
-0.020857714116573334,
-0.04749602451920509,
-0.19306141138076782,
0.13309650123119354,
-0.007198594510555267,
-0.12281756848096848,
-0.10296650230884552,
-0.036952316761016846,
-0.03563361614942551,
0.02267550304532051,
-0.045248955488204956,
0.07023058831691742,
0.0231072548776865,
-0.0024834824725985527,
0.033956073224544525,
0.20945075154304504,
-0.026165297254920006,
-0.0549459308385849,
-0.029601814225316048,
-0.08117198199033737,
0.051162075251340866,
0.0841715931892395,
-0.02185472473502159,
0.12049181014299393,
-0.03461547568440437,
0.23679909110069275,
0.22246958315372467,
0.07685257494449615,
-0.09727131575345993,
0.0005980285350233316,
-0.07468176633119583,
0.004203274846076965,
-0.07465601712465286,
-0.009234724566340446,
-0.09656385332345963,
0.10601461678743362,
-0.0640614777803421,
-0.04407568648457527,
0.07547927647829056,
-0.10607149451971054,
0.008380650542676449,
-0.044718701392412186,
-0.03241227567195892,
0.03566630184650421,
-0.08021091669797897,
-0.07115636765956879,
-0.07924345135688782,
0.12331390380859375,
-0.0028231667820364237,
-0.02538815699517727,
0.0849989578127861,
0.020686212927103043,
0.07335289567708969,
0.008789497427642345,
0.07297723740339279,
0.07596763223409653,
-0.061187081038951874,
0.024640431627631187,
0.17786002159118652,
-0.0001590930187376216,
0.013295087963342667,
0.13301315903663635,
0.12285580486059189,
-0.14371100068092346,
0.16835205256938934,
-0.041837114840745926,
0.01273901853710413,
-0.000016733567463234067,
-0.05858709663152695,
-0.10275357961654663,
-0.06698623299598694,
0.0861973837018013,
0.08286722004413605,
-0.21823282539844513,
-0.0617976188659668,
-0.020040862262248993,
-0.010652751661837101,
0.036896370351314545,
0.07893521338701248,
-0.007020154967904091,
-0.0632118210196495,
-0.06585797667503357,
-0.18785086274147034,
0.24842894077301025,
0.04748879373073578,
0.08034839481115341,
0.07176365703344345,
-0.1054481491446495,
-0.0477013885974884,
-0.01744295470416546,
-0.029299652203917503,
0.0060326578095555305,
0.007031936664134264,
-0.10170210897922516,
-0.006328943185508251,
0.06414978206157684,
0.023343944922089577,
-0.0595167875289917,
-0.09266196936368942,
-0.13211572170257568,
-0.19689281284809113,
0.021862924098968506,
0.06388262659311295,
0.1021433174610138,
0.09759646654129028,
-0.01938871666789055,
-0.028697798028588295,
-0.04629792645573616,
0.1269710212945938,
0.05560813471674919,
0.055224258452653885,
-0.06713414192199707,
-0.12595096230506897,
0.10328899323940277,
0.15273427963256836,
0.16427461802959442,
0.05840425565838814,
-0.06694675236940384,
-0.1713431179523468,
-0.07022376358509064,
-0.05893684923648834,
-0.07907895743846893,
-0.05437161773443222,
0.016298599541187286,
-0.0010414532152935863,
0.11263269186019897,
0.13759124279022217,
0.15233731269836426,
0.1502678543329239,
-0.14003904163837433,
0.09814029186964035,
0.08700431883335114,
-0.17591580748558044,
-0.007515402976423502,
-0.22213128209114075,
0.023146895691752434,
0.05573005974292755,
-0.05172746628522873,
-0.09258319437503815,
-0.00624970393255353,
0.10584435611963272,
0.036278143525123596,
0.011039918288588524,
0.037691205739974976,
0.039684947580099106,
0.04333934560418129,
0.12147531658411026,
-0.1150025799870491,
0.026852015405893326,
0.08471021801233292,
-0.0009311052854172885,
0.19245445728302002,
-0.01566503569483757,
-0.17841291427612305,
0.021250275894999504,
-0.05086803063750267,
0.008447269909083843,
-0.004759875126183033,
-0.03729753568768501,
-0.055747706443071365,
-0.1423528492450714,
0.07666990160942078,
-0.037174008786678314,
-0.05919010937213898,
0.05513041839003563,
-0.046875204890966415,
0.27182236313819885,
0.15701858699321747,
0.11782211065292358,
-0.03601288050413132,
-0.23861655592918396,
-0.09189417958259583,
-0.1102549284696579,
-0.038568321615457535,
-0.06976264715194702,
0.21401295065879822,
0.10672465711832047,
-0.007996754720807076,
-0.04306783527135849,
0.07704552263021469,
-0.14963889122009277,
0.07321491837501526,
0.0875357910990715,
-0.08623456209897995,
-0.18984781205654144,
-0.022818556055426598,
-0.28286507725715637,
-0.03650245442986488,
0.07078851014375687,
0.11150677502155304,
0.029439212754368782,
0.24271462857723236,
-0.20931226015090942,
0.1580294966697693,
-0.05124684423208237,
0.1418996900320053,
0.1252620667219162,
0.06951811164617538,
0.15737217664718628,
0.11986362934112549,
-0.15121066570281982,
0.20505262911319733,
-0.14179109036922455,
-0.23381884396076202,
0.18741269409656525,
0.11344335973262787,
0.06838969886302948,
0.0557003989815712,
-0.05363680422306061,
0.1317695826292038,
0.07001923024654388,
0.027764489874243736,
-0.010746070183813572,
0.1167985275387764,
0.04347622022032738,
0.1554524153470993,
-0.05355607718229294,
-0.012836495414376259,
-0.2012619525194168,
0.1342807412147522,
0.03516914322972298,
0.11586898565292358,
-0.19534192979335785,
0.025189463049173355,
0.014490712434053421,
-0.12574392557144165,
-0.08297138661146164,
0.028597405180335045,
0.06145848333835602,
-0.053661055862903595,
0.021289315074682236,
0.24640262126922607,
0.02963080257177353,
0.2256021648645401,
-0.0016956566832959652,
-0.1044187992811203,
0.05298271402716637,
-0.0567505769431591,
0.11265398561954498,
0.0605471134185791,
-0.004022981971502304,
0.12656953930854797,
0.06544694304466248,
-0.04642766714096069,
-0.155247300863266,
0.10129732638597488,
0.09079062938690186,
0.022906458005309105,
-0.045313719660043716,
0.044137097895145416,
-0.07205741107463837,
0.1488705426454544,
0.17322580516338348,
-0.06149360164999962,
-0.04780268669128418,
-0.06465352326631546,
-0.04838831350207329,
0.042670901864767075,
0.08506413549184799,
0.06445801258087158,
0.08927100151777267,
0.14189521968364716,
0.10180995613336563,
-0.09662304073572159,
0.07539908587932587,
0.13173575699329376,
-0.1245991438627243,
0.0961327850818634,
-0.06016973406076431,
0.013561876490712166,
-0.07084742188453674,
-0.013802913948893547,
0.03116827830672264,
0.05593730881810188,
-0.06480805575847626,
0.08034604042768478,
0.08849063515663147,
-0.10891975462436676,
-0.11024032533168793,
0.003836612217128277,
-0.2688279151916504,
-0.1410420835018158,
0.1641683429479599,
0.09376909583806992,
0.12702368199825287,
-0.03885583579540253,
-0.034834399819374084,
0.03426266089081764,
-0.07708600908517838,
0.14660105109214783,
0.0008427867433056235,
-0.09352976828813553,
-0.0007986343698576093,
0.30595144629478455,
0.059108417481184006,
-0.1367248147726059,
0.09762714058160782,
0.2560173273086548,
0.08041805028915405,
-0.14720165729522705,
-0.05136684328317642,
0.09753751009702682,
-0.007296830415725708,
0.10667160153388977,
0.044211145490407944,
0.0743846520781517,
0.038749802857637405,
0.047505415976047516,
-0.005048566963523626,
-0.10787138342857361,
-0.15846797823905945,
-0.0038612978532910347,
-0.10892312228679657,
-0.06607674807310104,
-0.19927790760993958,
0.048118140548467636,
0.12017805874347687,
0.003839978016912937,
0.056951094418764114,
0.1079237312078476,
-2.486601076795127e-32,
-0.0665966346859932,
0.07930604368448257,
-0.05668167397379875,
-0.14722752571105957,
-0.1283721774816513,
0.07888438552618027,
-0.028915176168084145,
-0.1347733736038208,
0.02169179543852806,
-0.06159263476729393,
-0.0380905456840992,
-0.035346634685993195,
0.04318024590611458,
0.001778932986781001,
-0.027134669944643974,
-0.014826586470007896,
0.07050880044698715,
0.09374707192182541,
-0.1047200858592987,
0.2953049838542938,
0.1395886242389679,
0.121590256690979,
0.0009028945351019502,
0.15236982703208923,
-0.07687602937221527,
0.06009142845869064,
-0.17633505165576935,
-0.12733009457588196,
-0.12062128633260727,
0.014544093050062656,
-0.041546404361724854,
0.04681605473160744,
-0.13744480907917023,
-0.22822973132133484,
-0.14748229086399078,
-0.0730348601937294,
0.05393238738179207,
-0.13893575966358185,
-0.08037123829126358,
-0.02955917827785015,
0.02119673229753971,
0.141708105802536,
0.00794488936662674,
0.06693019717931747,
0.03582047298550606,
0.031108595430850983,
0.05055385082960129,
0.10045082122087479,
-0.08149068802595139,
-0.07013947516679764,
0.0438075065612793,
0.13997739553451538,
0.10249065607786179,
0.14191566407680511,
-0.016497664153575897,
-0.17414692044258118,
0.02338256873190403,
0.16591113805770874,
-0.11252181977033615,
-0.014762450940907001,
-0.10222148150205612,
0.0779166892170906,
-0.02196980081498623,
0.050471749156713486,
-0.13290710747241974,
0.04353441670536995,
0.2148219645023346,
0.07793645560741425,
0.226021870970726,
-0.1764380782842636,
0.0317172072827816,
0.28567415475845337,
-0.008274266496300697,
-0.14330020546913147,
-0.24216268956661224,
-0.15110157430171967,
0.1463804692029953,
-0.03867607191205025,
0.13719896972179413,
-0.030276451259851456,
0.0928451269865036,
-0.054679274559020996,
-0.026147443801164627,
-0.0795418843626976,
0.021696291863918304,
-0.014172181487083435,
-0.007418295368552208,
0.1371925175189972,
0.07017599046230316,
-0.16222769021987915,
0.03009648248553276,
0.1741936057806015,
-0.09969757497310638,
-0.0517241396009922,
0.002261684276163578,
-0.019997404888272285,
-0.1286035180091858,
0.13855113089084625,
-0.0893787294626236,
0.10399254411458969,
0.0415872186422348,
-0.11527099460363388,
-0.0928579717874527,
-0.07290209829807281,
0.0736643448472023,
-0.030435124412178993,
0.17490719258785248,
-0.07056590914726257,
-0.20080332458019257,
-0.01111473049968481,
-0.07574602961540222,
-0.07190143316984177,
0.12202267348766327,
0.1777411550283432,
0.11262920498847961,
0.0623704269528389,
-0.07300472259521484,
0.05237399786710739,
0.1333635002374649,
0.2572316527366638,
-0.006436785217374563,
-0.14670535922050476,
-0.08281232416629791,
0.060116276144981384,
0.045411739498376846,
-0.010034534148871899,
-0.2027716338634491,
-0.11484561860561371,
0.033190324902534485,
-0.06285837292671204,
-0.052780602127313614,
-0.05451692268252373,
7.446002427968779e-7,
-0.10521415621042252,
-0.010291158221662045,
-0.1974715292453766,
-0.2451808601617813,
-0.2301659733057022,
0.08131635934114456,
0.013752322643995285,
0.055250003933906555,
-0.02865256741642952,
0.11900704354047775,
-0.10777544230222702,
0.04677918180823326,
0.02179785445332527,
0.017524005845189095,
0.3000933527946472,
-0.17942219972610474,
0.09061756730079651,
0.108824722468853,
-0.06024433299899101,
0.1284746378660202,
-0.08966685086488724,
0.02082090638577938,
0.04209282249212265,
0.11080127954483032,
0.08989386260509491,
-0.05212708190083504,
-0.04207466170191765,
-0.09792087227106094,
-0.0397358238697052,
0.1162753477692604,
0.029403403401374817,
-0.03838420286774635,
0.03584635257720947,
0.12775519490242004,
0.05595218390226364,
0.04150810092687607,
-0.086497001349926,
0.10121039301156998,
0.04109286144375801,
-0.04108991101384163,
-0.10945721715688705,
0.04900852590799332,
0.05999649316072464,
-0.07574036717414856,
-0.03806302323937416,
0.0505889430642128,
-0.13114061951637268,
-0.11616464704275131,
0.09030711650848389,
0.01694769598543644,
0.16038408875465393,
0.07897373288869858,
0.06849547475576401,
0.3262230157852173,
0.1308177262544632,
-0.09317145496606827,
-0.2635596692562103,
-0.11641354113817215,
0.05005192011594772,
-0.08874529600143433,
-0.046256907284259796,
-0.23906216025352478,
0.09431013464927673,
0.09088011831045151,
-0.040803223848342896,
-0.04491092637181282,
-0.11653841286897659,
1.4785392051460474e-34,
0.005732820834964514,
0.11675526946783066,
-0.021931182593107224,
-0.1275283396244049,
0.08691906929016113,
-0.06271977722644806,
0.09208570420742035,
0.08179686218500137,
-0.11313604563474655,
-0.3005223870277405,
-0.11353585124015808
] |
https://github.com/huggingface/datasets/issues/5981 | Only two cores are getting used in sagemaker with pytorch 3.10 kernel | From reading that ticket, it may be down in mkl? Is it worth hotfixing in the meantime, with the express intention of turning it off? I know that's a horribly crufty solution, but it's also deeply frustrating to be limited to 2 cores for operations as simple as filtration. | ### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.
![Selection_072](https://github.com/huggingface/datasets/assets/107141022/04c5a824-5321-4531-afca-7bc84dff36b4)
When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel | 49 | Only two cores are getting used in sagemaker with pytorch 3.10 kernel
### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.
![Selection_072](https://github.com/huggingface/datasets/assets/107141022/04c5a824-5321-4531-afca-7bc84dff36b4)
When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
From reading that ticket, it may be down in mkl? Is it worth hotfixing in the meantime, with the express intention of turning it off? I know that's a horribly crufty solution, but it's also deeply frustrating to be limited to 2 cores for operations as simple as filtration. | [
-0.01953105442225933,
-0.1318715512752533,
-0.058712467551231384,
0.1216578334569931,
0.0379493273794651,
-0.15693867206573486,
0.03367646411061287,
0.06222713738679886,
-0.05440274626016617,
-0.049715835601091385,
-0.00613021245226264,
0.07412468641996384,
-0.10839667916297913,
-0.0513540543615818,
-0.02565927803516388,
0.05558529123663902,
-0.036096494644880295,
-0.0211808905005455,
-0.08486999571323395,
-0.011556456796824932,
-0.12828192114830017,
0.1814829707145691,
0.056004397571086884,
-0.21223200857639313,
-0.1256905049085617,
0.04115454852581024,
0.027539942413568497,
-0.029157644137740135,
0.045580726116895676,
-0.027599787339568138,
-0.0758650004863739,
-0.041787829250097275,
-0.1832590252161026,
0.13041985034942627,
0.000005931186024099588,
-0.016103552654385567,
-0.010567919351160526,
0.11410496383905411,
0.046924810856580734,
0.055862583220005035,
0.2782113552093506,
0.0025556767359375954,
0.10937009751796722,
-0.043087128549814224,
-0.11978312581777573,
0.08812152594327927,
-0.2172793447971344,
0.0759928822517395,
0.07957318425178528,
0.06315430253744125,
-0.010991677641868591,
0.1203237846493721,
-0.060207344591617584,
-0.03213198110461235,
-0.15271277725696564,
-0.11908259242773056,
-0.18027882277965546,
-0.03441181778907776,
0.055756375193595886,
0.02223115786910057,
-0.03131020814180374,
0.06715826690196991,
0.16912446916103363,
0.04110812395811081,
0.1430186778306961,
0.13419978320598602,
-0.15395194292068481,
-0.24157002568244934,
0.09770031273365021,
-0.003545805811882019,
-0.287667453289032,
0.06332150846719742,
0.004954956006258726,
-0.03738900274038315,
-0.13750755786895752,
-0.10365800559520721,
0.13051705062389374,
-0.018944237381219864,
-0.14170633256435394,
-0.008175179362297058,
0.042649976909160614,
0.13387234508991241,
-0.006712125148624182,
-0.05058373138308525,
-0.04042752459645271,
0.2722039222717285,
-0.0008880456443876028,
0.1934359222650528,
0.14195875823497772,
-0.006859945133328438,
-0.1600974053144455,
-0.04854865372180939,
0.05586013197898865,
-0.17447859048843384,
-0.08563196659088135,
-0.01988602802157402,
0.02196802757680416,
-0.03746232017874718,
-0.09596288204193115,
0.03415270149707794,
0.0026061167009174824,
0.040915876626968384,
-0.06482499092817307,
0.03985648229718208,
-0.17274172604084015,
-0.18267560005187988,
-0.043523553758859634,
0.07605906575918198,
0.04324248433113098,
0.1016138419508934,
0.06771808862686157,
0.13777010142803192,
0.09662223607301712,
0.012610928155481815,
0.13090592622756958,
-0.12785258889198303,
0.0004809825331903994,
-0.003519371384754777,
-0.019197385758161545,
-0.05543449893593788,
-0.020346039906144142,
-0.0063560279086232185,
-0.05463053658604622,
-0.03621985390782356,
-0.011642014607787132,
0.08976075053215027,
-0.05387675017118454,
0.0743393674492836,
-0.21240206062793732,
-0.23138746619224548,
0.01827424205839634,
0.07430500537157059,
-0.05603563040494919,
-0.09133550524711609,
0.13281071186065674,
-0.33009636402130127,
-0.012416861951351166,
-0.006163521204143763,
-0.04437142238020897,
-0.1738317906856537,
0.09458564221858978,
-0.13103219866752625,
0.003902257652953267,
0.15229010581970215,
-0.09612126648426056,
0.12775272130966187,
0.2359391748905182,
0.000031936131563270465,
0.03529413789510727,
-0.015156037174165249,
-0.1312718689441681,
0.15713860094547272,
-0.01283272635191679,
-0.006682933773845434,
-0.037616051733493805,
0.1090584546327591,
0.03843476250767708,
0.16793613135814667,
-0.11739008873701096,
0.01614418998360634,
0.01707742176949978,
0.012329024262726307,
-0.14892013370990753,
-0.1468472182750702,
0.14449259638786316,
0.019091129302978516,
-0.02967928908765316,
-0.022937936708331108,
-0.05065349489450455,
0.13007168471813202,
0.16793017089366913,
0.05561003461480141,
-0.16574330627918243,
0.005528868176043034,
-0.16550274193286896,
0.13226798176765442,
-0.28013816475868225,
-0.10467281937599182,
-0.12552770972251892,
-0.18295985460281372,
-0.018844613805413246,
-0.019760625436902046,
-0.04930981248617172,
-0.14493189752101898,
0.12046224623918533,
-0.0732000395655632,
0.0900670662522316,
0.015310393646359444,
0.006096268072724342,
-0.02329111285507679,
0.03094920516014099,
0.16315709054470062,
-0.09132329374551773,
-0.023531559854745865,
0.18021494150161743,
0.014791958034038544,
-0.060852739959955215,
-0.13622862100601196,
0.025848574936389923,
-0.2701188623905182,
0.06045220047235489,
0.026169486343860626,
0.07451274245977402,
0.12451661378145218,
0.01499252486974001,
-0.05443025752902031,
-0.050186268985271454,
0.0547473281621933,
0.06633605808019638,
-0.008874364197254181,
-0.029860125854611397,
0.08811601251363754,
0.11759138852357864,
0.02046825923025608,
-0.16341082751750946,
-0.2530438303947449,
-0.1197052150964737,
-0.13059501349925995,
-0.09745185077190399,
0.03148052096366882,
-0.12732964754104614,
0.0782061442732811,
0.2467757612466812,
0.0810738280415535,
-0.22210140526294708,
0.11861962080001831,
0.04070965200662613,
-0.12788432836532593,
-0.04439275711774826,
0.06084500253200531,
0.033432088792324066,
0.0017456403002142906,
0.06457395851612091,
-0.19257782399654388,
-0.011446892283856869,
-0.020857714116573334,
-0.04749602451920509,
-0.19306141138076782,
0.13309650123119354,
-0.007198594510555267,
-0.12281756848096848,
-0.10296650230884552,
-0.036952316761016846,
-0.03563361614942551,
0.02267550304532051,
-0.045248955488204956,
0.07023058831691742,
0.0231072548776865,
-0.0024834824725985527,
0.033956073224544525,
0.20945075154304504,
-0.026165297254920006,
-0.0549459308385849,
-0.029601814225316048,
-0.08117198199033737,
0.051162075251340866,
0.0841715931892395,
-0.02185472473502159,
0.12049181014299393,
-0.03461547568440437,
0.23679909110069275,
0.22246958315372467,
0.07685257494449615,
-0.09727131575345993,
0.0005980285350233316,
-0.07468176633119583,
0.004203274846076965,
-0.07465601712465286,
-0.009234724566340446,
-0.09656385332345963,
0.10601461678743362,
-0.0640614777803421,
-0.04407568648457527,
0.07547927647829056,
-0.10607149451971054,
0.008380650542676449,
-0.044718701392412186,
-0.03241227567195892,
0.03566630184650421,
-0.08021091669797897,
-0.07115636765956879,
-0.07924345135688782,
0.12331390380859375,
-0.0028231667820364237,
-0.02538815699517727,
0.0849989578127861,
0.020686212927103043,
0.07335289567708969,
0.008789497427642345,
0.07297723740339279,
0.07596763223409653,
-0.061187081038951874,
0.024640431627631187,
0.17786002159118652,
-0.0001590930187376216,
0.013295087963342667,
0.13301315903663635,
0.12285580486059189,
-0.14371100068092346,
0.16835205256938934,
-0.041837114840745926,
0.01273901853710413,
-0.000016733567463234067,
-0.05858709663152695,
-0.10275357961654663,
-0.06698623299598694,
0.0861973837018013,
0.08286722004413605,
-0.21823282539844513,
-0.0617976188659668,
-0.020040862262248993,
-0.010652751661837101,
0.036896370351314545,
0.07893521338701248,
-0.007020154967904091,
-0.0632118210196495,
-0.06585797667503357,
-0.18785086274147034,
0.24842894077301025,
0.04748879373073578,
0.08034839481115341,
0.07176365703344345,
-0.1054481491446495,
-0.0477013885974884,
-0.01744295470416546,
-0.029299652203917503,
0.0060326578095555305,
0.007031936664134264,
-0.10170210897922516,
-0.006328943185508251,
0.06414978206157684,
0.023343944922089577,
-0.0595167875289917,
-0.09266196936368942,
-0.13211572170257568,
-0.19689281284809113,
0.021862924098968506,
0.06388262659311295,
0.1021433174610138,
0.09759646654129028,
-0.01938871666789055,
-0.028697798028588295,
-0.04629792645573616,
0.1269710212945938,
0.05560813471674919,
0.055224258452653885,
-0.06713414192199707,
-0.12595096230506897,
0.10328899323940277,
0.15273427963256836,
0.16427461802959442,
0.05840425565838814,
-0.06694675236940384,
-0.1713431179523468,
-0.07022376358509064,
-0.05893684923648834,
-0.07907895743846893,
-0.05437161773443222,
0.016298599541187286,
-0.0010414532152935863,
0.11263269186019897,
0.13759124279022217,
0.15233731269836426,
0.1502678543329239,
-0.14003904163837433,
0.09814029186964035,
0.08700431883335114,
-0.17591580748558044,
-0.007515402976423502,
-0.22213128209114075,
0.023146895691752434,
0.05573005974292755,
-0.05172746628522873,
-0.09258319437503815,
-0.00624970393255353,
0.10584435611963272,
0.036278143525123596,
0.011039918288588524,
0.037691205739974976,
0.039684947580099106,
0.04333934560418129,
0.12147531658411026,
-0.1150025799870491,
0.026852015405893326,
0.08471021801233292,
-0.0009311052854172885,
0.19245445728302002,
-0.01566503569483757,
-0.17841291427612305,
0.021250275894999504,
-0.05086803063750267,
0.008447269909083843,
-0.004759875126183033,
-0.03729753568768501,
-0.055747706443071365,
-0.1423528492450714,
0.07666990160942078,
-0.037174008786678314,
-0.05919010937213898,
0.05513041839003563,
-0.046875204890966415,
0.27182236313819885,
0.15701858699321747,
0.11782211065292358,
-0.03601288050413132,
-0.23861655592918396,
-0.09189417958259583,
-0.1102549284696579,
-0.038568321615457535,
-0.06976264715194702,
0.21401295065879822,
0.10672465711832047,
-0.007996754720807076,
-0.04306783527135849,
0.07704552263021469,
-0.14963889122009277,
0.07321491837501526,
0.0875357910990715,
-0.08623456209897995,
-0.18984781205654144,
-0.022818556055426598,
-0.28286507725715637,
-0.03650245442986488,
0.07078851014375687,
0.11150677502155304,
0.029439212754368782,
0.24271462857723236,
-0.20931226015090942,
0.1580294966697693,
-0.05124684423208237,
0.1418996900320053,
0.1252620667219162,
0.06951811164617538,
0.15737217664718628,
0.11986362934112549,
-0.15121066570281982,
0.20505262911319733,
-0.14179109036922455,
-0.23381884396076202,
0.18741269409656525,
0.11344335973262787,
0.06838969886302948,
0.0557003989815712,
-0.05363680422306061,
0.1317695826292038,
0.07001923024654388,
0.027764489874243736,
-0.010746070183813572,
0.1167985275387764,
0.04347622022032738,
0.1554524153470993,
-0.05355607718229294,
-0.012836495414376259,
-0.2012619525194168,
0.1342807412147522,
0.03516914322972298,
0.11586898565292358,
-0.19534192979335785,
0.025189463049173355,
0.014490712434053421,
-0.12574392557144165,
-0.08297138661146164,
0.028597405180335045,
0.06145848333835602,
-0.053661055862903595,
0.021289315074682236,
0.24640262126922607,
0.02963080257177353,
0.2256021648645401,
-0.0016956566832959652,
-0.1044187992811203,
0.05298271402716637,
-0.0567505769431591,
0.11265398561954498,
0.0605471134185791,
-0.004022981971502304,
0.12656953930854797,
0.06544694304466248,
-0.04642766714096069,
-0.155247300863266,
0.10129732638597488,
0.09079062938690186,
0.022906458005309105,
-0.045313719660043716,
0.044137097895145416,
-0.07205741107463837,
0.1488705426454544,
0.17322580516338348,
-0.06149360164999962,
-0.04780268669128418,
-0.06465352326631546,
-0.04838831350207329,
0.042670901864767075,
0.08506413549184799,
0.06445801258087158,
0.08927100151777267,
0.14189521968364716,
0.10180995613336563,
-0.09662304073572159,
0.07539908587932587,
0.13173575699329376,
-0.1245991438627243,
0.0961327850818634,
-0.06016973406076431,
0.013561876490712166,
-0.07084742188453674,
-0.013802913948893547,
0.03116827830672264,
0.05593730881810188,
-0.06480805575847626,
0.08034604042768478,
0.08849063515663147,
-0.10891975462436676,
-0.11024032533168793,
0.003836612217128277,
-0.2688279151916504,
-0.1410420835018158,
0.1641683429479599,
0.09376909583806992,
0.12702368199825287,
-0.03885583579540253,
-0.034834399819374084,
0.03426266089081764,
-0.07708600908517838,
0.14660105109214783,
0.0008427867433056235,
-0.09352976828813553,
-0.0007986343698576093,
0.30595144629478455,
0.059108417481184006,
-0.1367248147726059,
0.09762714058160782,
0.2560173273086548,
0.08041805028915405,
-0.14720165729522705,
-0.05136684328317642,
0.09753751009702682,
-0.007296830415725708,
0.10667160153388977,
0.044211145490407944,
0.0743846520781517,
0.038749802857637405,
0.047505415976047516,
-0.005048566963523626,
-0.10787138342857361,
-0.15846797823905945,
-0.0038612978532910347,
-0.10892312228679657,
-0.06607674807310104,
-0.19927790760993958,
0.048118140548467636,
0.12017805874347687,
0.003839978016912937,
0.056951094418764114,
0.1079237312078476,
-2.486601076795127e-32,
-0.0665966346859932,
0.07930604368448257,
-0.05668167397379875,
-0.14722752571105957,
-0.1283721774816513,
0.07888438552618027,
-0.028915176168084145,
-0.1347733736038208,
0.02169179543852806,
-0.06159263476729393,
-0.0380905456840992,
-0.035346634685993195,
0.04318024590611458,
0.001778932986781001,
-0.027134669944643974,
-0.014826586470007896,
0.07050880044698715,
0.09374707192182541,
-0.1047200858592987,
0.2953049838542938,
0.1395886242389679,
0.121590256690979,
0.0009028945351019502,
0.15236982703208923,
-0.07687602937221527,
0.06009142845869064,
-0.17633505165576935,
-0.12733009457588196,
-0.12062128633260727,
0.014544093050062656,
-0.041546404361724854,
0.04681605473160744,
-0.13744480907917023,
-0.22822973132133484,
-0.14748229086399078,
-0.0730348601937294,
0.05393238738179207,
-0.13893575966358185,
-0.08037123829126358,
-0.02955917827785015,
0.02119673229753971,
0.141708105802536,
0.00794488936662674,
0.06693019717931747,
0.03582047298550606,
0.031108595430850983,
0.05055385082960129,
0.10045082122087479,
-0.08149068802595139,
-0.07013947516679764,
0.0438075065612793,
0.13997739553451538,
0.10249065607786179,
0.14191566407680511,
-0.016497664153575897,
-0.17414692044258118,
0.02338256873190403,
0.16591113805770874,
-0.11252181977033615,
-0.014762450940907001,
-0.10222148150205612,
0.0779166892170906,
-0.02196980081498623,
0.050471749156713486,
-0.13290710747241974,
0.04353441670536995,
0.2148219645023346,
0.07793645560741425,
0.226021870970726,
-0.1764380782842636,
0.0317172072827816,
0.28567415475845337,
-0.008274266496300697,
-0.14330020546913147,
-0.24216268956661224,
-0.15110157430171967,
0.1463804692029953,
-0.03867607191205025,
0.13719896972179413,
-0.030276451259851456,
0.0928451269865036,
-0.054679274559020996,
-0.026147443801164627,
-0.0795418843626976,
0.021696291863918304,
-0.014172181487083435,
-0.007418295368552208,
0.1371925175189972,
0.07017599046230316,
-0.16222769021987915,
0.03009648248553276,
0.1741936057806015,
-0.09969757497310638,
-0.0517241396009922,
0.002261684276163578,
-0.019997404888272285,
-0.1286035180091858,
0.13855113089084625,
-0.0893787294626236,
0.10399254411458969,
0.0415872186422348,
-0.11527099460363388,
-0.0928579717874527,
-0.07290209829807281,
0.0736643448472023,
-0.030435124412178993,
0.17490719258785248,
-0.07056590914726257,
-0.20080332458019257,
-0.01111473049968481,
-0.07574602961540222,
-0.07190143316984177,
0.12202267348766327,
0.1777411550283432,
0.11262920498847961,
0.0623704269528389,
-0.07300472259521484,
0.05237399786710739,
0.1333635002374649,
0.2572316527366638,
-0.006436785217374563,
-0.14670535922050476,
-0.08281232416629791,
0.060116276144981384,
0.045411739498376846,
-0.010034534148871899,
-0.2027716338634491,
-0.11484561860561371,
0.033190324902534485,
-0.06285837292671204,
-0.052780602127313614,
-0.05451692268252373,
7.446002427968779e-7,
-0.10521415621042252,
-0.010291158221662045,
-0.1974715292453766,
-0.2451808601617813,
-0.2301659733057022,
0.08131635934114456,
0.013752322643995285,
0.055250003933906555,
-0.02865256741642952,
0.11900704354047775,
-0.10777544230222702,
0.04677918180823326,
0.02179785445332527,
0.017524005845189095,
0.3000933527946472,
-0.17942219972610474,
0.09061756730079651,
0.108824722468853,
-0.06024433299899101,
0.1284746378660202,
-0.08966685086488724,
0.02082090638577938,
0.04209282249212265,
0.11080127954483032,
0.08989386260509491,
-0.05212708190083504,
-0.04207466170191765,
-0.09792087227106094,
-0.0397358238697052,
0.1162753477692604,
0.029403403401374817,
-0.03838420286774635,
0.03584635257720947,
0.12775519490242004,
0.05595218390226364,
0.04150810092687607,
-0.086497001349926,
0.10121039301156998,
0.04109286144375801,
-0.04108991101384163,
-0.10945721715688705,
0.04900852590799332,
0.05999649316072464,
-0.07574036717414856,
-0.03806302323937416,
0.0505889430642128,
-0.13114061951637268,
-0.11616464704275131,
0.09030711650848389,
0.01694769598543644,
0.16038408875465393,
0.07897373288869858,
0.06849547475576401,
0.3262230157852173,
0.1308177262544632,
-0.09317145496606827,
-0.2635596692562103,
-0.11641354113817215,
0.05005192011594772,
-0.08874529600143433,
-0.046256907284259796,
-0.23906216025352478,
0.09431013464927673,
0.09088011831045151,
-0.040803223848342896,
-0.04491092637181282,
-0.11653841286897659,
1.4785392051460474e-34,
0.005732820834964514,
0.11675526946783066,
-0.021931182593107224,
-0.1275283396244049,
0.08691906929016113,
-0.06271977722644806,
0.09208570420742035,
0.08179686218500137,
-0.11313604563474655,
-0.3005223870277405,
-0.11353585124015808
] |
https://github.com/huggingface/datasets/issues/5980 | Viewing dataset card returns β502 Bad Gatewayβ | Yes, it seems to be working now. In case it's helpful, the outage lasted several days. It was failing as late as yesterday morning. | The url is: https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams
I am able to successfully view the βFiles and versionsβ tab: [Confirm-Labs/pile_ngrams_trigrams at main](https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams/tree/main)
Any help would be appreciated! Thanks! I hope this is the right place to report an issue like this.
| 24 | Viewing dataset card returns β502 Bad Gatewayβ
The url is: https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams
I am able to successfully view the βFiles and versionsβ tab: [Confirm-Labs/pile_ngrams_trigrams at main](https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams/tree/main)
Any help would be appreciated! Thanks! I hope this is the right place to report an issue like this.
Yes, it seems to be working now. In case it's helpful, the outage lasted several days. It was failing as late as yesterday morning. | [
0.05319330841302872,
-0.04178556427359581,
-0.034804817289114,
0.16900131106376648,
0.27389219403266907,
0.06951368600130081,
0.04435407370328903,
0.09619807451963425,
0.004077076446264982,
0.24026833474636078,
-0.0582042895257473,
-0.039052706211805344,
-0.056466590613126755,
0.24144893884658813,
0.07247667014598846,
-0.04309486970305443,
0.027482474222779274,
-0.05689983814954758,
-0.04163967818021774,
-0.029760565608739853,
0.0047979033552110195,
0.09631282836198807,
0.07136393338441849,
0.03500420227646828,
-0.08483807742595673,
-0.025889700278639793,
-0.085170216858387,
-0.0509277805685997,
0.04011736065149307,
-0.19369973242282867,
0.15595576167106628,
-0.0647118091583252,
-0.007518747355788946,
0.09942499548196793,
0.0000059689155023079365,
0.05630350112915039,
0.12437304109334946,
0.16450709104537964,
-0.2118518203496933,
-0.09913521260023117,
0.018196269869804382,
-0.031962789595127106,
-0.04031100869178772,
-0.050104446709156036,
-0.05735531821846962,
-0.09869324415922165,
-0.09166715294122696,
0.06536063551902771,
0.00035158515674993396,
0.07064977288246155,
-0.0015723182586953044,
0.0522778257727623,
-0.021895943209528923,
-0.03753771632909775,
-0.22120113670825958,
0.017368948087096214,
-0.02872266061604023,
0.22862276434898376,
-0.20068125426769257,
0.011859580874443054,
-0.0031904589850455523,
-0.1037914976477623,
0.17311504483222961,
0.05656960979104042,
-0.07250948995351791,
0.09653519839048386,
0.12135044485330582,
-0.06098857522010803,
0.07345165312290192,
0.2861887514591217,
-0.03312039002776146,
0.13957688212394714,
-0.10173246264457703,
-0.03565287962555885,
-0.12227842211723328,
0.008205919526517391,
0.16511821746826172,
0.005341408308595419,
-0.07793749123811722,
0.06111824885010719,
-0.0273741465061903,
-0.09234514087438583,
-0.05349169671535492,
0.09019135683774948,
-0.08002068847417831,
-0.12581010162830353,
-0.1493884027004242,
0.033246446400880814,
-0.032090701162815094,
-0.05202360823750496,
-0.07151616364717484,
0.07398993521928787,
-0.17524395883083344,
-0.170845627784729,
-0.03862126171588898,
0.09074146300554276,
0.02825300022959709,
0.050275422632694244,
-0.026884211227297783,
-0.033077582716941833,
-0.047858353704214096,
-0.09247919172048569,
-0.01939767226576805,
0.0954521894454956,
0.14278161525726318,
0.03126940876245499,
0.07116983830928802,
-0.20232948660850525,
0.2035425305366516,
0.10790736973285675,
0.10316108167171478,
0.1193842738866806,
-0.14198482036590576,
-0.06150466948747635,
-0.10725772380828857,
-0.009242725558578968,
0.032662514597177505,
-0.08739003539085388,
0.11352589726448059,
-0.11216995865106583,
0.08571771532297134,
0.08626818656921387,
0.06230498477816582,
0.16539911925792694,
-0.10331786423921585,
0.031363535672426224,
-0.018761102110147476,
-0.16041098535060883,
-0.05413919314742088,
-0.10293411463499069,
-0.016802838072180748,
-0.15121251344680786,
-0.054539043456315994,
0.023657316341996193,
0.03732334077358246,
-0.012568802572786808,
-0.09125585108995438,
-0.2886326014995575,
0.0184429083019495,
-0.07143860310316086,
-0.054433438926935196,
-0.05204929783940315,
0.07095737010240555,
0.00842557568103075,
0.2938585579395294,
-0.05280028283596039,
0.14302638173103333,
0.08394179493188858,
0.044242825359106064,
-0.11301609873771667,
-0.06341248750686646,
0.10393410176038742,
-0.10813547670841217,
-0.1060999408364296,
-0.08930675685405731,
-0.03884560987353325,
-0.10691732168197632,
-0.04377845302224159,
-0.18315672874450684,
-0.18923646211624146,
-0.056855976581573486,
-0.08239368349313736,
0.07725163549184799,
0.03852015733718872,
0.09178133308887482,
0.011822236701846123,
-0.08757764101028442,
-0.003815295174717903,
-0.12498041242361069,
-0.012403259053826332,
0.10793370753526688,
-0.03164485841989517,
-0.16533516347408295,
-0.045892052352428436,
-0.21431265771389008,
0.0005302963545545936,
-0.10157904028892517,
-0.00597855681553483,
-0.08833040297031403,
0.18040965497493744,
-0.0012743576662614942,
-0.18168847262859344,
-0.10874832421541214,
-0.09628189355134964,
-0.04865194112062454,
0.014965725131332874,
-0.04467790201306343,
-0.08353981375694275,
0.06930606067180634,
-0.1432313174009323,
0.07431783527135849,
-0.009565148502588272,
-0.07631076872348785,
-0.05890270695090294,
0.0056893061846494675,
-0.18143370747566223,
0.01659327559173107,
-0.3301396071910858,
0.07143408805131912,
-0.12542392313480377,
-0.12952405214309692,
-0.030886687338352203,
0.10789148509502411,
0.05432744696736336,
0.13253112137317657,
0.05695396661758423,
-0.07786452025175095,
0.310452401638031,
0.01148169580847025,
-0.1331620216369629,
-0.20740154385566711,
-0.0030728636775165796,
0.03793006390333176,
-0.01510955672711134,
0.03046208620071411,
0.05316386744379997,
0.003728484967723489,
0.03563665226101875,
0.029123438522219658,
0.2263827919960022,
-0.13984782993793488,
0.0020231392700225115,
0.15929222106933594,
-0.140297532081604,
-0.006491816136986017,
0.09659073501825333,
0.02823987416923046,
0.055452391505241394,
0.05100863054394722,
-0.019518284127116203,
-0.0744183138012886,
-0.06605058163404465,
0.15083108842372894,
0.07776666432619095,
-0.07810817658901215,
0.08279618620872498,
0.14730829000473022,
-0.1161893755197525,
0.1312553435564041,
-0.10594900697469711,
-0.20051543414592743,
-0.033836327493190765,
-0.11206613481044769,
-0.07302874326705933,
-0.0100902384147048,
-0.11711078882217407,
-0.07368338108062744,
0.1102125495672226,
-0.0568283349275589,
0.21087539196014404,
0.14278842508792877,
0.07767274975776672,
-0.025026360526680946,
0.0072096409276127815,
0.1671178936958313,
-0.08904892951250076,
-0.0571197085082531,
-0.054441116750240326,
-0.04347644001245499,
0.0049761454574763775,
0.10666975378990173,
0.06666801869869232,
-0.166818305850029,
0.0008822886738926172,
-0.07726381719112396,
-0.0551883764564991,
0.029938559979200363,
-0.05183253437280655,
-0.17692677676677704,
0.019697215408086777,
-0.013758943416178226,
0.03564013913273811,
-0.2058653086423874,
-0.03258749470114708,
0.03283122181892395,
0.01659763604402542,
0.08243713527917862,
-0.0526704266667366,
0.1196141391992569,
0.06452883034944534,
-0.23380827903747559,
0.05577247217297554,
0.06436757743358612,
-0.03019755706191063,
0.022762389853596687,
0.08344489336013794,
-0.2597511112689972,
-0.1644403487443924,
-0.005038762930780649,
-0.019082162529230118,
0.018519897013902664,
-0.044061414897441864,
-0.11207910627126694,
-0.1896967887878418,
-0.13341748714447021,
-0.049226678907871246,
0.0628385916352272,
0.032380539923906326,
0.012296859174966812,
-0.04430461302399635,
-0.15422998368740082,
0.09278655797243118,
-0.04795767366886139,
0.011266257613897324,
0.038847994059324265,
0.030688442289829254,
-0.00499714957550168,
0.057256896048784256,
-0.1277073621749878,
-0.02074611745774746,
0.04395611584186554,
-0.006521469447761774,
0.14645493030548096,
0.2247517853975296,
-0.03497606888413429,
0.09371460974216461,
-0.11282965540885925,
-0.10127951204776764,
0.20304544270038605,
0.02203455939888954,
-0.0334228053689003,
0.19863896071910858,
0.005601896904408932,
-0.07244430482387543,
-0.009763880632817745,
-0.014406714588403702,
-0.1052456647157669,
0.03452185541391373,
-0.016561150550842285,
-0.043276991695165634,
0.07676511257886887,
0.138821080327034,
0.02114935591816902,
-0.02057400718331337,
0.004857202991843224,
-0.15576334297657013,
-0.014887100085616112,
-0.1772257387638092,
0.22007569670677185,
-0.006278688088059425,
-0.1224583238363266,
0.0027756216004490852,
0.09663007408380508,
0.11490853875875473,
0.0655110776424408,
0.09826050698757172,
0.035789892077445984,
-0.0343501940369606,
-0.04596278816461563,
-0.08527365326881409,
-0.10838393121957779,
0.10242664068937302,
-0.15013539791107178,
-0.14112617075443268,
0.12847252190113068,
0.013804988004267216,
-0.051117971539497375,
0.24707035720348358,
0.07262692600488663,
0.13908028602600098,
0.05465368553996086,
0.11629883944988251,
0.021312318742275238,
-0.16228683292865753,
-0.1156294196844101,
0.1370013803243637,
-0.04204997047781944,
0.18649326264858246,
0.02990904077887535,
-0.11244853585958481,
-0.016705775633454323,
-0.08203009516000748,
-0.06581113487482071,
-0.09593362361192703,
0.1053134948015213,
0.016312191262841225,
-0.12283579260110855,
-0.1261315792798996,
-0.0808585062623024,
-0.04009079560637474,
-0.08133293688297272,
-0.16002941131591797,
-0.020785745233297348,
0.122176893055439,
0.15339499711990356,
0.12775079905986786,
-0.007420207839459181,
0.10181966423988342,
0.06796016544103622,
0.1460552215576172,
0.06201299652457237,
0.07086069881916046,
-0.09406127035617828,
-0.10622110962867737,
0.08884885162115097,
-0.0682920292019844,
0.23594403266906738,
0.1560206562280655,
0.06834208220243454,
0.007556119002401829,
-0.008544296957552433,
0.09022201597690582,
-0.04051293060183525,
0.25888681411743164,
0.09214726090431213,
-0.07626662403345108,
0.08804542571306229,
0.14365673065185547,
0.2878805100917816,
-0.05924095958471298,
0.16494548320770264,
-0.05100734531879425,
0.1438894271850586,
0.027983615174889565,
0.07892115414142609,
-0.09534284472465515,
-0.03662112355232239,
0.016661429777741432,
-0.08715106546878815,
-0.12380809336900711,
-0.005357848014682531,
-0.15769052505493164,
0.065305694937706,
0.1837913542985916,
0.2195408195257187,
-0.022038616240024567,
0.08024424314498901,
0.15938431024551392,
0.04991285502910614,
0.04944990202784538,
0.030759861692786217,
-0.047072917222976685,
0.05544351413846016,
0.1731167435646057,
0.10108426958322525,
-0.06885457038879395,
0.3324580490589142,
-0.10175331681966782,
-0.0887947827577591,
0.11525736004114151,
-0.17955881357192993,
-0.1263313591480255,
0.040451500564813614,
0.0035454225726425648,
-0.052033353596925735,
0.06451664865016937,
-0.09485810250043869,
-0.07306841760873795,
0.10853275656700134,
-0.0603606253862381,
-0.06151928752660751,
-0.23866355419158936,
0.08865315467119217,
-0.20262162387371063,
0.11663082242012024,
-0.08269421011209488,
0.3332841694355011,
0.009736131876707077,
-0.011012345552444458,
-0.16106368601322174,
-0.04047831520438194,
-0.05608086287975311,
-0.13822337985038757,
-0.021682964637875557,
0.022147174924612045,
-0.05329844355583191,
0.12377078086137772,
-0.05790445953607559,
0.08105193078517914,
0.03153940290212631,
0.008537201210856438,
0.05091691017150879,
-0.14816875755786896,
0.09437889605760574,
-0.02695009857416153,
0.07017554342746735,
0.07795916497707367,
0.016931118443608284,
0.14261746406555176,
-0.10046937316656113,
0.05140764266252518,
0.09851710498332977,
0.03579087182879448,
-0.04428087919950485,
-0.0615079291164875,
0.1517898291349411,
0.03439031168818474,
0.07298365235328674,
-0.1193847730755806,
-0.07406561821699142,
0.19155533611774445,
0.010612508282065392,
0.004894431214779615,
-0.07691385596990585,
-0.004470926243811846,
-0.09463426470756531,
-0.11074133962392807,
0.13656337559223175,
0.074720598757267,
-0.06496673822402954,
0.14592672884464264,
-0.12394414097070694,
0.04029757156968117,
-0.06614159792661667,
-0.06142858415842056,
-0.19419342279434204,
0.13165126740932465,
-0.025102006271481514,
-0.01840699091553688,
-0.1539267748594284,
0.0688837468624115,
0.039268288761377335,
0.055032581090927124,
-0.24804730713367462,
0.07131914794445038,
-0.014186139218509197,
-0.04723084345459938,
0.03442959114909172,
0.007198322098702192,
-0.019457338377833366,
0.09108858555555344,
-0.011485150083899498,
0.06805689632892609,
-0.10103166848421097,
-0.06180518865585327,
0.33298179507255554,
-0.05061357840895653,
0.1516018658876419,
0.1496889889240265,
0.03570392727851868,
0.11817536503076553,
0.15988624095916748,
0.20187219977378845,
0.036440521478652954,
0.08332917839288712,
0.004872509278357029,
-0.029125582426786423,
-0.005579463206231594,
-0.06588958948850632,
0.10267985612154007,
0.025766877457499504,
-0.13654404878616333,
-0.09812874346971512,
0.08817755430936813,
0.11579443514347076,
0.0008971660863608122,
-0.04713965579867363,
0.06692670285701752,
-0.08462709188461304,
-0.20473317801952362,
0.12057618051767349,
0.21242877840995789,
-0.05960191413760185,
0.1285070925951004,
-0.21571597456932068,
-2.2477157923898768e-32,
-0.04241717979311943,
-0.02867189049720764,
-0.06827910244464874,
-0.08244024962186813,
-0.15186645090579987,
0.14043085277080536,
-0.1669141799211502,
-0.03891659155488014,
-0.00720473425462842,
-0.05036529153585434,
0.04876837134361267,
0.009294687770307064,
0.01640837825834751,
0.08765638619661331,
-0.10813748091459274,
-0.13085146248340607,
-0.08680947124958038,
-0.04829232022166252,
0.027030808851122856,
-0.11191416531801224,
-0.04790617525577545,
-0.02909310907125473,
0.04515939950942993,
-0.12177926301956177,
0.08116978406906128,
0.07806110382080078,
-0.03632798790931702,
0.010662563145160675,
-0.10521772503852844,
0.12183216959238052,
-0.04488233104348183,
0.012472343631088734,
-0.07545468956232071,
-0.12018945813179016,
-0.13945192098617554,
0.02314961515367031,
-0.10199133306741714,
0.1320699006319046,
0.05621768906712532,
0.10323971509933472,
-0.0625089481472969,
0.16436856985092163,
-0.05417308956384659,
-0.04997333884239197,
0.008032098412513733,
0.1355496197938919,
-0.03378723934292793,
0.0077378819696605206,
-0.1027790829539299,
-0.08759795874357224,
0.004150903783738613,
0.045464519411325455,
-0.10569468885660172,
-0.029621770605444908,
0.14359082281589508,
-0.1485482156276703,
0.0638355016708374,
0.03785586729645729,
0.13330262899398804,
-0.17063792049884796,
0.1353028416633606,
-0.06725364178419113,
0.04240953177213669,
-0.07075461000204086,
0.08365575969219208,
-0.014233854599297047,
0.1679917573928833,
0.11681471019983292,
-0.057065390050411224,
-0.15746422111988068,
0.18366052210330963,
0.1724659949541092,
-0.01187520194798708,
-0.1426662802696228,
-0.00007179935346357524,
-0.01583203114569187,
-0.03664455935359001,
-0.062075965106487274,
0.012694506905972958,
-0.05370767414569855,
0.16606974601745605,
-0.03830894082784653,
-0.1588292270898819,
0.06273888051509857,
0.10369963198900223,
-0.10011767596006393,
-0.09742678701877594,
0.014776131138205528,
-0.2398333102464676,
0.015811719000339508,
0.0941736251115799,
0.03575156256556511,
-0.10263830423355103,
0.004073512274771929,
-0.10476971417665482,
0.1534694880247116,
0.14028333127498627,
0.05757100135087967,
-0.11869609355926514,
-0.09894923865795135,
-0.12395474314689636,
0.027791988104581833,
-0.01857323944568634,
0.0918404757976532,
0.05862085521221161,
-0.04712153598666191,
0.09833384305238724,
-0.06546949595212936,
-0.12765498459339142,
-0.0015424458542838693,
-0.09451200067996979,
0.16668380796909332,
0.11612267792224884,
0.09691301733255386,
0.1975453495979309,
0.18864706158638,
0.03544444590806961,
0.06108790263533592,
0.007485079113394022,
0.13449349999427795,
-0.08226880431175232,
0.10358455032110214,
-0.13917995989322662,
-0.06008818373084068,
0.05446557700634003,
-0.08921108394861221,
-0.21786093711853027,
-0.029059117659926414,
-0.0954369604587555,
-0.09201202541589737,
0.08607468008995056,
-0.04999452084302902,
7.734839186923637e-7,
-0.2758661210536957,
0.1518731713294983,
0.03743520379066467,
0.10811784863471985,
-0.031256452202796936,
-0.08109256625175476,
-0.1152392327785492,
0.05600982904434204,
-0.0330749936401844,
0.15120506286621094,
0.13564299046993256,
0.0023080797400325537,
-0.11562648415565491,
-0.1318635195493698,
-0.0024208370596170425,
-0.1265559047460556,
-0.19085738062858582,
0.12056490033864975,
-0.04192448779940605,
0.1890752613544464,
0.029867906123399734,
0.07134833931922913,
-0.10096223652362823,
0.05183993652462959,
0.18013998866081238,
-0.039446670562028885,
-0.037745166569948196,
-0.06954000145196915,
0.05206646770238876,
-0.13203589618206024,
-0.14496101438999176,
0.05908189341425896,
-0.04947745054960251,
0.13090640306472778,
0.13127724826335907,
0.046053770929574966,
-0.2830154299736023,
-0.18282605707645416,
0.06294740736484528,
0.08178524672985077,
0.08398096263408661,
0.025260135531425476,
0.0020673132967203856,
-0.052989661693573,
0.15010899305343628,
0.21413004398345947,
-0.05485709384083748,
0.031280603259801865,
0.016079967841506004,
-0.03519992530345917,
0.07660219073295593,
-0.07714200019836426,
0.0225615706294775,
0.06282416731119156,
-0.01735737919807434,
-0.19934146106243134,
0.0824187695980072,
-0.1776595562696457,
-0.020186148583889008,
-0.03433804214000702,
0.08186619728803635,
-0.039433810859918594,
-0.07206594944000244,
0.10609900206327438,
0.17058472335338593,
0.03525754436850548,
-0.23459646105766296,
1.108559131092574e-34,
-0.004347414243966341,
0.07633747905492783,
0.005353414453566074,
-0.10085063427686691,
0.020749196410179138,
-0.10269795358181,
0.14381664991378784,
0.010992259718477726,
-0.04963381215929985,
-0.1195380762219429,
0.0019844025373458862
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | Hi ! can you try to set the upper case environment variables `HTTP_PROXY` and `HTTPS_PROXY` ?
We use `aiohttp` for streaming and it uses case sensitive environment variables | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 28 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Hi ! can you try to set the upper case environment variables `HTTP_PROXY` and `HTTPS_PROXY` ?
We use `aiohttp` for streaming and it uses case sensitive environment variables | [
0.04701102524995804,
0.16728535294532776,
-0.021547488868236542,
-0.11249438673257828,
0.2948671579360962,
0.15186676383018494,
0.16805554926395416,
-0.008410202339291573,
0.015933766961097717,
0.07126490771770477,
0.06143335625529289,
-0.06351298838853836,
0.08071628212928772,
0.1114310473203659,
0.055807776749134064,
-0.04127652570605278,
-0.01501800213009119,
-0.04855046048760414,
-0.017422452569007874,
-0.04108985513448715,
-0.02908407896757126,
0.08049909770488739,
0.10412152111530304,
-0.1297028809785843,
0.08129572123289108,
-0.0528799332678318,
0.0022173502948135138,
0.11248185485601425,
-0.10944250971078873,
-0.01178219448775053,
0.15367460250854492,
0.05833312124013901,
0.12443260103464127,
0.3623412549495697,
0.0000058867672123597,
0.13035215437412262,
0.1404409557580948,
0.015565621666610241,
-0.09037598967552185,
-0.005514613818377256,
0.051849283277988434,
-0.1131729856133461,
-0.045331716537475586,
0.005075165536254644,
0.050639647990465164,
-0.04663607478141785,
0.11577248573303223,
-0.17974205315113068,
0.016777483746409416,
0.036129843443632126,
-0.0425807349383831,
0.09499246627092361,
-0.06956490874290466,
-0.007395584601908922,
-0.008896083571016788,
0.015212301164865494,
-0.08576180040836334,
0.05340520665049553,
-0.12659916281700134,
0.0067476374097168446,
0.005409542471170425,
-0.008614146150648594,
-0.011672891676425934,
0.09796655923128128,
-0.1034209206700325,
-0.013392922468483448,
-0.10087459534406662,
-0.18031039834022522,
0.005687346216291189,
0.3498956263065338,
0.09022103250026703,
-0.02605327218770981,
-0.21125522255897522,
0.06194852665066719,
0.00471509387716651,
-0.01891016960144043,
-0.034930627793073654,
0.0187363401055336,
-0.09555105865001678,
0.058613263070583344,
-0.029499376192688942,
-0.025945711880922318,
-0.19785566627979279,
0.08133215457201004,
-0.005846881773322821,
0.032360825687646866,
-0.08994477987289429,
0.11886462569236755,
0.0031415442936122417,
-0.02073110081255436,
-0.04869948700070381,
-0.055312756448984146,
0.10374947637319565,
-0.16746748983860016,
-0.12533815205097198,
0.03569270670413971,
-0.1052401140332222,
-0.042096562683582306,
-0.012836509384214878,
-0.00999895203858614,
0.009721498005092144,
-0.044926200062036514,
0.05494639277458191,
0.1503896713256836,
0.0201991219073534,
-0.036425620317459106,
-0.03635574132204056,
-0.049226704984903336,
0.2998857796192169,
0.12994205951690674,
0.05838760361075401,
-0.012518588453531265,
0.021630117669701576,
0.08676942437887192,
-0.1463841050863266,
-0.002743913559243083,
0.09956001490354538,
0.02977699041366577,
0.10807731002569199,
0.0882529765367508,
-0.10979621112346649,
0.08553539961576462,
0.03261565417051315,
0.08609513938426971,
-0.08863166719675064,
0.12116992473602295,
-0.0637257918715477,
0.13568620383739471,
-0.0671725794672966,
0.017775511369109154,
-0.004796288441866636,
-0.09873108565807343,
-0.091574527323246,
-0.12987224757671356,
0.18485744297504425,
0.06219399347901344,
0.0905742272734642,
-0.13868847489356995,
0.10990646481513977,
-0.004830628167837858,
0.0655871257185936,
0.006209264043718576,
0.039811670780181885,
0.14240898191928864,
0.16651202738285065,
0.031079435721039772,
0.10006895661354065,
-0.04857654124498367,
-0.008094415068626404,
-0.08105539530515671,
0.019425049424171448,
0.11138378083705902,
-0.3021720349788666,
0.07058387994766235,
-0.014530988410115242,
0.004952010698616505,
-0.01910233683884144,
0.07588569074869156,
-0.24178992211818695,
0.01020105928182602,
0.1859257072210312,
-0.005712237674742937,
0.09459985792636871,
0.08904832601547241,
0.280621200799942,
0.25270721316337585,
-0.009984144940972328,
-0.025246569886803627,
0.001012400141917169,
-0.13337863981723785,
0.177222341299057,
-0.11707471311092377,
0.026854336261749268,
-0.1400279849767685,
-0.09629195183515549,
0.031215332448482513,
-0.11380372941493988,
-0.06303207576274872,
-0.15799587965011597,
0.1725216954946518,
0.0063692303374409676,
-0.07548844814300537,
0.11213663965463638,
0.01619134098291397,
0.02107086218893528,
0.0013123571407049894,
-0.09713154286146164,
0.11157221347093582,
-0.09085629135370255,
0.04734038934111595,
-0.004664700943976641,
-0.09859287738800049,
0.030137797817587852,
0.08662983030080795,
-0.13359488546848297,
-0.12815414369106293,
-0.1527453362941742,
-0.07360187917947769,
0.050191886723041534,
-0.07076972723007202,
0.1455584615468979,
-0.07687728106975555,
-0.028307288885116577,
0.09775898605585098,
-0.004346890840679407,
0.002540967892855406,
-0.062043264508247375,
0.1341305375099182,
0.051984261721372604,
0.02542063407599926,
-0.3168421685695648,
-0.0020436719059944153,
-0.10367066413164139,
-0.028624240309000015,
-0.09399057924747467,
-0.14107061922550201,
-0.03761269152164459,
0.0694720670580864,
-0.0522507019340992,
0.31339117884635925,
-0.1305936574935913,
0.18015484511852264,
0.0731692761182785,
0.0017063088016584516,
-0.017870303243398666,
0.11390791088342667,
-0.029966339468955994,
0.027247196063399315,
0.1104547455906868,
-0.05737416073679924,
0.0786060243844986,
0.048749249428510666,
0.003200925188139081,
0.08402667194604874,
-0.0476696752011776,
0.1723231077194214,
0.1847730427980423,
-0.16453878581523895,
-0.002301276195794344,
-0.1364746391773224,
-0.03821496292948723,
0.10398080199956894,
-0.057758718729019165,
0.02768593095242977,
0.1060631051659584,
-0.005770708899945021,
0.006371206603944302,
0.2669081687927246,
0.07957912981510162,
-0.08434052020311356,
0.19516295194625854,
0.10068820416927338,
-0.14766904711723328,
0.09710457175970078,
0.25920411944389343,
-0.12528638541698456,
0.14759810268878937,
0.09137402474880219,
-0.11338422447443008,
-0.02298756316304207,
0.2460009604692459,
-0.01201682724058628,
-0.019473847001791,
0.0363721027970314,
0.060411613434553146,
-0.14608019590377808,
-0.015088088810443878,
0.04155983775854111,
0.011539183557033539,
0.061417996883392334,
0.11484038829803467,
-0.03304343298077583,
-0.05523662269115448,
-0.16279548406600952,
-0.005746397655457258,
-0.02534729428589344,
0.04663730412721634,
-0.0045953309163451195,
0.05227834731340408,
-0.045458730310201645,
-0.26721763610839844,
0.10879336297512054,
0.014089223928749561,
-0.11200329661369324,
0.16530752182006836,
0.10282790660858154,
-0.1010374203324318,
-0.24350959062576294,
0.043586365878582,
-0.013257653452455997,
0.004422809928655624,
-0.277538925409317,
-0.01775442436337471,
0.027620505541563034,
-0.026304369792342186,
0.11828174442052841,
-0.07073580473661423,
0.06089124083518982,
0.10150344669818878,
0.010971522890031338,
-0.07317516207695007,
-0.09408275783061981,
0.027383700013160706,
-0.03431319445371628,
-0.11370968818664551,
0.022988824173808098,
0.10479018092155457,
0.04175411909818649,
-0.17399926483631134,
-0.1593482345342636,
0.018637640401721,
-0.09197632968425751,
0.0910615622997284,
0.13874298334121704,
-0.07074272632598877,
0.12342549860477448,
-0.002357953693717718,
-0.0742320641875267,
0.2663339674472809,
0.01612839289009571,
-0.025892792269587517,
0.15908508002758026,
-0.09482759982347488,
0.08184939622879028,
0.036754343658685684,
0.12826400995254517,
-0.19876722991466522,
-0.1523321270942688,
-0.09438023716211319,
-0.2449767291545868,
-0.11965419352054596,
-0.08409940451383591,
-0.09533246606588364,
-0.07416520267724991,
0.12850841879844666,
-0.05027252808213234,
-0.13149286806583405,
-0.24330076575279236,
0.1797509640455246,
-0.10248415172100067,
-0.04592966288328171,
0.021069852635264397,
0.00019081952632404864,
0.028426581993699074,
0.07207237184047699,
-0.09280063956975937,
-0.18491987884044647,
-0.0015998251037672162,
-0.08829114586114883,
-0.031187180429697037,
-0.04019346833229065,
-0.007932817563414574,
-0.2123609185218811,
-0.1214308887720108,
-0.054093148559331894,
-0.16009049117565155,
-0.06238582357764244,
0.1314380168914795,
0.02522295154631138,
0.13894115388393402,
0.11534234136343002,
0.019480854272842407,
0.04214892163872719,
-0.023763125762343407,
0.03549855947494507,
0.30097299814224243,
0.04647219553589821,
0.031130148097872734,
-0.04607345163822174,
-0.13136565685272217,
0.07264037430286407,
-0.022288717329502106,
-0.06774351000785828,
-0.03026256151497364,
0.06419482082128525,
0.15787732601165771,
-0.14955472946166992,
0.0792461633682251,
0.013520972803235054,
-0.03161624073982239,
-0.017080312594771385,
-0.2021501362323761,
-0.028882388025522232,
0.04293496161699295,
0.22418352961540222,
0.024818947538733482,
-0.03476473689079285,
0.002902367850765586,
0.07795382291078568,
0.16123218834400177,
0.1504371613264084,
0.018604351207613945,
0.07543826103210449,
-0.27471041679382324,
0.11940213292837143,
-0.035959936678409576,
0.33336424827575684,
-0.11509609967470169,
0.18688970804214478,
0.035756293684244156,
0.05755703151226044,
0.14020514488220215,
-0.00998747255653143,
0.03353619948029518,
0.01578254997730255,
0.04656771942973137,
-0.11330541968345642,
0.018489297479391098,
0.06810322403907776,
0.0001881272328319028,
0.010932025499641895,
-0.07821985334157944,
-0.18081530928611755,
0.1422104686498642,
0.06915014982223511,
-0.06924472749233246,
0.09865143150091171,
-0.02488436922430992,
0.044998664408922195,
-0.23114794492721558,
-0.15676993131637573,
-0.11208582669496536,
-0.03346787393093109,
0.06921547651290894,
0.01817215420305729,
0.016906874254345894,
0.09198012948036194,
0.03264833986759186,
0.022387364879250526,
-0.10387302190065384,
0.001449999981559813,
0.008928416296839714,
0.0674569383263588,
0.03370627760887146,
0.0898778960108757,
0.02457461692392826,
0.36837223172187805,
0.040254440158605576,
-0.26992788910865784,
0.020356709137558937,
0.046946246176958084,
0.027523839846253395,
0.08232743293046951,
-0.12105155736207962,
0.0028148607816547155,
0.05412137135863304,
-0.1278216540813446,
-0.029634851962327957,
0.04193922504782677,
0.1142461895942688,
0.000038700603909092024,
-0.009692173451185226,
-0.11113760620355606,
-0.11638684570789337,
0.11804422736167908,
0.017813557758927345,
0.04912354052066803,
-0.05071322247385979,
0.05226396024227142,
0.034038297832012177,
-0.33613815903663635,
-0.09580876678228378,
-0.0593583770096302,
-0.024533823132514954,
-0.06244754418730736,
0.10344113409519196,
0.24894165992736816,
-0.203891783952713,
-0.011638377793133259,
0.1881909966468811,
-0.05887958034873009,
0.12464414536952972,
-0.13000176846981049,
0.07807537168264389,
-0.0007915705791674554,
-0.023204103112220764,
0.03184577450156212,
-0.07143522799015045,
0.07060904800891876,
0.06368626654148102,
0.2155088633298874,
-0.2219216227531433,
-0.09852605313062668,
-0.12729725241661072,
-0.1351597160100937,
-0.0426354818046093,
0.01908782497048378,
-0.030835017561912537,
-0.22067713737487793,
0.005495753139257431,
0.1162559911608696,
-0.14048981666564941,
0.13295958936214447,
-0.09713905304670334,
-0.05844881758093834,
-0.13923080265522003,
0.03974458575248718,
0.11271647363901138,
-0.06651213765144348,
0.10357052832841873,
0.0007668815669603646,
-0.018890369683504105,
0.13600800931453705,
-0.13739167153835297,
0.0932304784655571,
-0.05519702285528183,
-0.04120953381061554,
-0.07590348273515701,
0.05106858164072037,
0.012996428646147251,
0.1523819863796234,
-0.02560056559741497,
-0.04523249343037605,
0.0020036802161484957,
0.005232847761362791,
0.06722306460142136,
-0.0405428372323513,
0.08409512788057327,
-0.06804116815328598,
-0.11046232283115387,
0.01936458796262741,
-0.07491499185562134,
0.07692168653011322,
-0.23883968591690063,
-0.061567358672618866,
0.10436130315065384,
-0.017243968322873116,
-0.03332222253084183,
0.2652583122253418,
-0.11578962206840515,
0.1570894718170166,
0.0883709266781807,
0.2177952229976654,
-0.027949217706918716,
-0.0003222640953026712,
-0.034960050135850906,
-0.08939959853887558,
0.099803127348423,
0.045520488172769547,
0.12091989815235138,
-0.030292773619294167,
-0.1587863266468048,
-0.2615610361099243,
-0.16484060883522034,
0.07073221355676651,
0.1601031869649887,
-0.02327295020222664,
-0.04269775375723839,
-0.13834407925605774,
-0.023974522948265076,
0.04773871600627899,
0.1430412232875824,
0.07323528826236725,
0.07906439900398254,
-0.08627127856016159,
-2.4605525627912864e-32,
-0.1459217667579651,
0.04193970933556557,
-0.030447164550423622,
-0.02749241143465042,
-0.27875059843063354,
0.043924883008003235,
-0.11294260621070862,
-0.0724317878484726,
-0.018445705994963646,
-0.1904793530702591,
-0.11070706695318222,
-0.0018732623429968953,
0.01828630268573761,
0.07251355797052383,
-0.2196420431137085,
-0.12589924037456512,
-0.12711115181446075,
-0.19798213243484497,
-0.02590913698077202,
0.03537546098232269,
0.0785994902253151,
-0.16267545521259308,
-0.18649822473526,
-0.036031872034072876,
-0.03292107209563255,
0.035800907760858536,
-0.06557131558656693,
-0.19029979407787323,
0.09439350664615631,
-0.037157826125621796,
-0.11015336960554123,
0.09965408593416214,
-0.07915762811899185,
-0.04986012354493141,
-0.22452545166015625,
-0.026295682415366173,
-0.16412338614463806,
0.028247632086277008,
-0.043805792927742004,
0.0309453085064888,
0.07884396612644196,
0.1380288004875183,
-0.053177446126937866,
0.02570938691496849,
0.1526021510362625,
0.13590852916240692,
-0.07752896845340729,
-0.012794711627066135,
0.025449324399232864,
-0.020474903285503387,
0.05255858227610588,
0.17441928386688232,
-0.094058558344841,
0.05581654608249664,
0.21071603894233704,
0.02321571856737137,
-0.017666615545749664,
0.08771096915006638,
0.0866815373301506,
0.10639352351427078,
-0.009809206239879131,
-0.23778308928012848,
0.03421987593173981,
-0.12642762064933777,
0.014257853850722313,
-0.05882347375154495,
0.27078577876091003,
0.024925561621785164,
0.15652872622013092,
0.05800459906458855,
0.1213521733880043,
0.08374155312776566,
0.006038290448486805,
-0.038346413522958755,
-0.1427236795425415,
-0.17016653716564178,
-0.01598377898335457,
-0.14248567819595337,
-0.11598818749189377,
-0.16670159995555878,
0.03018353134393692,
-0.10440622270107269,
0.13389071822166443,
-0.022212576121091843,
-0.18098050355911255,
0.012828770093619823,
0.03422313556075096,
0.08346165716648102,
-0.1008858010172844,
-0.06642843037843704,
0.09195178002119064,
-0.13027076423168182,
-0.04433395713567734,
-0.0878215804696083,
-0.18686522543430328,
-0.11705973744392395,
-0.08802270144224167,
0.23489713668823242,
0.03231702372431755,
0.10871967673301697,
-0.03882922604680061,
-0.107847198843956,
0.03396051004528999,
0.05205436423420906,
0.02068607695400715,
0.1049037054181099,
0.09941276907920837,
-0.0011987059842795134,
-0.0837513878941536,
-0.0057694572024047375,
0.053417496383190155,
-0.011971958912909031,
0.21610504388809204,
-0.07290040701627731,
0.11294984817504883,
-0.030075551941990852,
-0.08226852864027023,
-0.038604166358709335,
0.01674528978765011,
0.17558163404464722,
-0.1391143947839737,
-0.09509361535310745,
-0.21009890735149384,
0.2162771373987198,
0.01060573197901249,
-0.021742647513747215,
-0.0873221829533577,
0.026656238362193108,
0.023013120517134666,
-0.029328666627407074,
-0.022090401500463486,
-0.17199485003948212,
7.090529834385961e-7,
-0.25019678473472595,
0.1741737574338913,
-0.046022407710552216,
-0.08792643249034882,
-0.05765261501073837,
0.017654821276664734,
-0.1302971988916397,
0.16751962900161743,
-0.12003403902053833,
0.11828400939702988,
0.1601829081773758,
0.07775537669658661,
-0.065395787358284,
-0.10282179713249207,
0.060083094984292984,
-0.03761344403028488,
-0.04995020478963852,
0.1253235936164856,
-0.07109338045120239,
0.06810063868761063,
-0.13376972079277039,
0.06748327612876892,
0.10231494158506393,
0.060299716889858246,
0.1459198296070099,
0.09535592794418335,
0.07509404420852661,
0.02821321226656437,
-0.08794949948787689,
-0.0841669961810112,
-0.11512172222137451,
0.12331781536340714,
-0.014780744910240173,
0.16888795793056488,
-0.00916536059230566,
-0.07725255936384201,
-0.0550123006105423,
-0.12849125266075134,
0.15417100489139557,
-0.12843434512615204,
-0.029379280284047127,
0.02762375958263874,
0.10585270076990128,
0.00979794654995203,
0.04944484680891037,
0.12587353587150574,
-0.1812439113855362,
-0.024427851662039757,
-0.062092870473861694,
-0.10324857383966446,
0.17654255032539368,
0.15251818299293518,
-0.08544182032346725,
0.0977281779050827,
-0.09144517034292221,
-0.005537451710551977,
-0.022433990612626076,
-0.07415345311164856,
0.23471730947494507,
-0.07924450188875198,
0.018185509368777275,
-0.08652881532907486,
-0.12602166831493378,
0.09189457446336746,
0.10717031359672546,
0.10890863835811615,
0.06511218845844269,
7.614036790626525e-35,
-0.03775552660226822,
-0.06902259588241577,
-0.035347066819667816,
-0.218224436044693,
0.013292591087520123,
-0.15066751837730408,
0.16811494529247284,
0.046176161617040634,
0.1100633293390274,
0.05672426521778107,
0.044740788638591766
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | Hi, thanks for the quick reply.
I set the uppercase env variables with
`
os.environ['HTTP_PROXY'] = "http://example.com:xxxx"
os.environ['HTTPS_PROXY'] = "http://example.com:xxxx"
`
However, I still get the same error.
One thing that could be helpfull: When downloading a dataset without streaming i get the following message:
_HF google storage unreachable. Downloading and preparing it from source_.
The download does however work as expected.
| ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 62 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Hi, thanks for the quick reply.
I set the uppercase env variables with
`
os.environ['HTTP_PROXY'] = "http://example.com:xxxx"
os.environ['HTTPS_PROXY'] = "http://example.com:xxxx"
`
However, I still get the same error.
One thing that could be helpfull: When downloading a dataset without streaming i get the following message:
_HF google storage unreachable. Downloading and preparing it from source_.
The download does however work as expected.
| [
0.04205402731895447,
0.18487466871738434,
-0.011378937400877476,
-0.0868760347366333,
0.27973687648773193,
0.13084249198436737,
0.14711430668830872,
-0.019973965361714363,
0.03484504669904709,
0.07056010514497757,
0.10056143999099731,
-0.09692279994487762,
0.05892980098724365,
0.1482974886894226,
0.06327280402183533,
-0.06204706430435181,
-0.008634338155388832,
-0.03175092115998268,
-0.005129141267389059,
-0.060920748859643936,
-0.06599250435829163,
0.10205613821744919,
0.09743005037307739,
-0.17898082733154297,
0.08309946209192276,
-0.07882348448038101,
-0.0210312120616436,
0.08456142991781235,
-0.09805503487586975,
-0.017366508021950722,
0.13702106475830078,
0.0726255550980568,
0.07705762982368469,
0.36472827196121216,
0.000005775987119704951,
0.11137042939662933,
0.13804693520069122,
-0.0021663191728293896,
-0.1133652925491333,
0.02583080157637596,
0.06327283382415771,
-0.1374656707048416,
-0.07106418162584305,
0.004156896378844976,
0.009284395724534988,
-0.046789806336164474,
0.1352652907371521,
-0.21265274286270142,
0.019795939326286316,
0.02287951298058033,
-0.05085211619734764,
0.09180231392383575,
-0.06329957395792007,
-0.004766667261719704,
0.019879192113876343,
0.023130882531404495,
-0.0667678490281105,
0.07084103673696518,
-0.13832715153694153,
-0.0386512354016304,
0.002496608067303896,
-0.047629185020923615,
-0.03760075196623802,
0.11629341542720795,
-0.1010424792766571,
-0.0035016960464417934,
-0.09902584552764893,
-0.17898885905742645,
0.016428396105766296,
0.3510379493236542,
0.092888742685318,
-0.05027881637215614,
-0.18288780748844147,
0.041729576885700226,
-0.015759512782096863,
-0.03535114601254463,
-0.0399450957775116,
0.009202192537486553,
-0.08683625608682632,
0.04980219900608063,
-0.116661936044693,
-0.06275277584791183,
-0.15930946171283722,
0.051711827516555786,
-0.05042392387986183,
0.01930021122097969,
-0.10327277332544327,
0.13695678114891052,
-0.033454976975917816,
-0.00038182351272553205,
-0.056501030921936035,
-0.05964897945523262,
0.07246927917003632,
-0.15022209286689758,
-0.1279197484254837,
0.04877430200576782,
-0.07214348018169403,
-0.05758877471089363,
0.0002533041115384549,
-0.012624549679458141,
-0.03059259243309498,
-0.04939712956547737,
0.04830308258533478,
0.11786415427923203,
0.027470406144857407,
-0.04959820583462715,
-0.08097487688064575,
-0.03226722404360771,
0.2736697494983673,
0.13506262004375458,
0.07212051749229431,
-0.01657998189330101,
0.05569832772016525,
0.06707713752985,
-0.08923137187957764,
-0.013820610009133816,
0.09596303850412369,
0.04893845319747925,
0.07577133923768997,
0.13164465129375458,
-0.13182733952999115,
0.112822525203228,
0.06550806760787964,
0.07838133722543716,
-0.11354923248291016,
0.10573868453502655,
-0.07702610641717911,
0.10503201186656952,
-0.04462592676281929,
0.004274218343198299,
-0.018360357731580734,
-0.10867216438055038,
-0.09196438640356064,
-0.11751646548509598,
0.19986377656459808,
0.03571082651615143,
0.07941314578056335,
-0.12244738638401031,
0.11067935079336166,
-0.0018709534779191017,
0.0834001824259758,
-0.01996396854519844,
0.08644703030586243,
0.14958009123802185,
0.11769294738769531,
0.011877275072038174,
0.10928386449813843,
-0.04691607132554054,
-0.058809686452150345,
-0.08689998090267181,
0.029507864266633987,
0.10706285387277603,
-0.2929510474205017,
0.09286685287952423,
-0.05742495134472847,
0.0093039870262146,
-0.047868624329566956,
0.08985602110624313,
-0.23933862149715424,
-0.000984690384939313,
0.17181655764579773,
-0.019512241706252098,
0.052028097212314606,
0.09622684121131897,
0.28667476773262024,
0.2451971471309662,
-0.06110677868127823,
-0.0055730147287249565,
0.01593860611319542,
-0.1417173147201538,
0.20083627104759216,
-0.09850269556045532,
0.02646155282855034,
-0.15445895493030548,
-0.13366776704788208,
0.03145753592252731,
-0.14134293794631958,
-0.053572509437799454,
-0.17802700400352478,
0.15593348443508148,
0.019051220268011093,
-0.05552290007472038,
0.10642021894454956,
-0.010518504306674004,
0.05264093726873398,
-0.003482973435893655,
-0.1040479987859726,
0.15894952416419983,
-0.09820365160703659,
0.07604820281267166,
-0.03372206166386604,
-0.09751050919294357,
0.060473598539829254,
0.11116790026426315,
-0.11891651153564453,
-0.10398875176906586,
-0.1426047831773758,
-0.02772318758070469,
0.03494087606668472,
-0.09566733241081238,
0.16363680362701416,
-0.045778028666973114,
-0.02256426401436329,
0.11777281761169434,
0.030301101505756378,
0.010184512473642826,
-0.09948534518480301,
0.13446153700351715,
0.04661273956298828,
0.014361356385052204,
-0.3078969120979309,
0.007688244339078665,
-0.1079770103096962,
-0.04674484208226204,
-0.05235571041703224,
-0.16409832239151,
-0.018829507753252983,
0.043301474303007126,
-0.07195954024791718,
0.32237181067466736,
-0.10542364418506622,
0.1563718616962433,
0.12658879160881042,
0.005376342684030533,
-0.027830462902784348,
0.1501779705286026,
-0.043808940798044205,
0.007147856522351503,
0.09270521998405457,
-0.07260092347860336,
0.08710464835166931,
0.04661044850945473,
0.056475553661584854,
0.10497130453586578,
-0.03371316194534302,
0.18552318215370178,
0.15479867160320282,
-0.1563427597284317,
-0.014930116012692451,
-0.13629145920276642,
-0.008671775460243225,
0.11005990952253342,
-0.055509354919195175,
0.012930001132190228,
0.08325058221817017,
-0.014700389467179775,
0.00606750650331378,
0.2628796398639679,
0.06503763794898987,
-0.10232127457857132,
0.16849228739738464,
0.12452565133571625,
-0.14569436013698578,
0.09333273023366928,
0.27056193351745605,
-0.09047003090381622,
0.12621155381202698,
0.1298254281282425,
-0.11043950915336609,
0.0057789962738752365,
0.26297152042388916,
-0.023673754185438156,
0.00011541057756403461,
0.014480526559054852,
0.07630108296871185,
-0.2028774917125702,
0.01794167421758175,
0.055442724376916885,
-0.003992158453911543,
0.05453123524785042,
0.1467582732439041,
-0.0005666477954946458,
-0.053253114223480225,
-0.16052602231502533,
-0.03991349786520004,
-0.058703478425741196,
0.061728525906801224,
0.04341719672083855,
0.0580882653594017,
-0.01684633642435074,
-0.2513808012008667,
0.12677976489067078,
0.027571070939302444,
-0.10977935791015625,
0.17760156095027924,
0.10865049064159393,
-0.11728501319885254,
-0.15254968404769897,
0.05370444804430008,
-0.07311859726905823,
-0.03055070899426937,
-0.2595996558666229,
-0.005364560056477785,
0.02907300926744938,
-0.024307772517204285,
0.08683489263057709,
-0.06573286652565002,
0.0731605514883995,
0.13165126740932465,
-0.0024947449564933777,
-0.05631742998957634,
-0.056547679007053375,
0.0460694283246994,
-0.07333949208259583,
-0.13427139818668365,
0.015524407848715782,
0.09828443825244904,
0.0677722692489624,
-0.1987209916114807,
-0.1989256590604782,
0.01704670861363411,
-0.09732649475336075,
0.0843885987997055,
0.13191644847393036,
-0.039388787001371384,
0.13560719788074493,
-0.03281236067414284,
-0.06742054224014282,
0.22790203988552094,
0.01954101026058197,
-0.02192090079188347,
0.1528490036725998,
-0.10213176161050797,
0.0870804563164711,
0.037750497460365295,
0.1471409797668457,
-0.20244508981704712,
-0.13486522436141968,
-0.12353979796171188,
-0.215290829539299,
-0.11553355306386948,
-0.053014565259218216,
-0.08114833384752274,
-0.0731968954205513,
0.160685732960701,
-0.06062724068760872,
-0.13984914124011993,
-0.2490023970603943,
0.21525239944458008,
-0.09279821813106537,
-0.0402156263589859,
0.03446393832564354,
-0.027695486322045326,
0.031927384436130524,
0.12067615240812302,
-0.11007434129714966,
-0.15195973217487335,
-0.02972940355539322,
-0.07319491356611252,
-0.062229786068201065,
-0.05384575203061104,
0.03101542592048645,
-0.19917267560958862,
-0.09787142276763916,
-0.0598117969930172,
-0.151729017496109,
-0.05979166924953461,
0.14667978882789612,
0.038213081657886505,
0.15622448921203613,
0.10271964222192764,
0.040382131934165955,
0.06613519787788391,
-0.044006723910570145,
0.05750616267323494,
0.30212390422821045,
0.04017459601163864,
0.022621994838118553,
-0.04359150305390358,
-0.11057674139738083,
0.0747298002243042,
-0.049651265144348145,
-0.11024556308984756,
-0.06810445338487625,
0.07645833492279053,
0.1544400006532669,
-0.12126883864402771,
0.0554906390607357,
-0.005760951433330774,
-0.0358591303229332,
-0.0103562967851758,
-0.19259761273860931,
-0.006905627902597189,
0.04798157885670662,
0.24247771501541138,
0.018129119649529457,
0.00020543586288113147,
-0.017201362177729607,
0.06658730655908585,
0.20069755613803864,
0.1809246987104416,
0.06781060993671417,
0.06819460541009903,
-0.2936299443244934,
0.12536287307739258,
-0.07454477250576019,
0.3114825189113617,
-0.09844984859228134,
0.20286470651626587,
0.036131251603364944,
0.04499753564596176,
0.13423778116703033,
-0.010489116422832012,
0.031019387766718864,
0.01379702240228653,
-0.009088934399187565,
-0.1069285199046135,
-0.03143923357129097,
0.09701798111200333,
-0.019557325169444084,
-0.030900588259100914,
-0.06706874817609787,
-0.19342699646949768,
0.15359999239444733,
0.08255426585674286,
-0.04883285611867905,
0.08437977731227875,
0.002748996950685978,
0.042924363166093826,
-0.24622966349124908,
-0.17696453630924225,
-0.11936932802200317,
0.012120351195335388,
0.08108890056610107,
0.0017885261913761497,
-0.013219775632023811,
0.11855282634496689,
0.06111050769686699,
0.016782578080892563,
-0.1492132991552353,
0.031074240803718567,
-0.0014813508605584502,
0.055459678173065186,
0.04483060538768768,
0.09926015883684158,
0.03779292106628418,
0.38305771350860596,
0.1097688302397728,
-0.2262178659439087,
0.05854415148496628,
0.02825222909450531,
0.006006370764225721,
0.10474163293838501,
-0.12289087474346161,
0.035315535962581635,
0.04716719686985016,
-0.14882470667362213,
-0.027284400537610054,
0.01765347644686699,
0.08581145852804184,
-0.012806967832148075,
0.024567266926169395,
-0.10395596921443939,
-0.08601793646812439,
0.13707277178764343,
0.0022251890040934086,
0.025881199166178703,
-0.07457181811332703,
0.03884413093328476,
0.02989622764289379,
-0.27109891176223755,
-0.08700444549322128,
-0.03845580667257309,
-0.02655043639242649,
-0.04235227033495903,
0.10648784041404724,
0.23958328366279602,
-0.24998334050178528,
0.04241315275430679,
0.15877248346805573,
-0.09366394579410553,
0.11144660413265228,
-0.13926206529140472,
0.06973303109407425,
0.013631526380777359,
-0.029236866161227226,
0.0222206749022007,
-0.0721542164683342,
0.08320189267396927,
0.03722739964723587,
0.18968245387077332,
-0.22622564435005188,
-0.09292092174291611,
-0.129536971449852,
-0.13524173200130463,
-0.017688589170575142,
0.04948093369603157,
-0.0006857475382275879,
-0.2042640596628189,
-0.0046699754893779755,
0.13153523206710815,
-0.1572369784116745,
0.14022204279899597,
-0.07456880807876587,
-0.060672562569379807,
-0.147582545876503,
0.031174317002296448,
0.09400926530361176,
-0.03243541717529297,
0.08939792960882187,
0.023880064487457275,
-0.03360139951109886,
0.12704570591449738,
-0.1587996780872345,
0.07783379405736923,
-0.08347315341234207,
-0.0641118735074997,
-0.06943787634372711,
0.05943503603339195,
0.029184788465499878,
0.17020215094089508,
-0.049236226826906204,
-0.08090383559465408,
-0.002049508970230818,
0.013484369032084942,
0.0450906828045845,
-0.02032940275967121,
0.11760507524013519,
-0.04180312529206276,
-0.11710695922374725,
0.03836977854371071,
-0.08356817811727524,
0.06803342700004578,
-0.22628790140151978,
-0.06719271838665009,
0.08458743244409561,
-0.01447086688131094,
-0.06693785637617111,
0.2580462396144867,
-0.12338417023420334,
0.1593681424856186,
0.09292057156562805,
0.20746798813343048,
-0.017223933711647987,
0.003376959590241313,
-0.029046153649687767,
-0.10075715184211731,
0.13290315866470337,
0.0509052574634552,
0.0791303962469101,
-0.017206985503435135,
-0.17441000044345856,
-0.24941278994083405,
-0.14185400307178497,
0.06489744782447815,
0.12621283531188965,
-0.0043368046171963215,
-0.07423204928636551,
-0.17860209941864014,
-0.05790439993143082,
0.03354518115520477,
0.1374834030866623,
0.04838354140520096,
0.09955348819494247,
-0.10320602357387543,
-2.504518255563948e-32,
-0.12404445558786392,
-0.013052437454462051,
-0.030825629830360413,
-0.06394138932228088,
-0.28918230533599854,
0.0288278479129076,
-0.14505623281002045,
-0.08659841865301132,
-0.05872441455721855,
-0.18242493271827698,
-0.07680229842662811,
0.029254673048853874,
0.02461039088666439,
0.11039482802152634,
-0.2323845773935318,
-0.15728460252285004,
-0.10902669280767441,
-0.20673809945583344,
-0.00967054720968008,
0.05525536462664604,
0.11349403858184814,
-0.13296666741371155,
-0.20858095586299896,
0.006025059148669243,
-0.019237902015447617,
-0.018249761313199997,
-0.09311053901910782,
-0.19547410309314728,
0.0937483161687851,
-0.030901098623871803,
-0.1239781603217125,
0.12392554432153702,
-0.048100367188453674,
-0.05913349986076355,
-0.1992761641740799,
-0.05409612879157066,
-0.1756298691034317,
0.02957521378993988,
-0.02900315821170807,
0.010464644059538841,
0.05591084435582161,
0.14282426238059998,
-0.017361698672175407,
0.03870191052556038,
0.1397128850221634,
0.1271137148141861,
-0.09792168438434601,
0.014470607973635197,
-0.004040996544063091,
-0.035620689392089844,
0.005219695623964071,
0.16102813184261322,
-0.08987466245889664,
0.07367688417434692,
0.2202429324388504,
0.04014262929558754,
-0.005330602638423443,
0.08216077834367752,
0.10348907113075256,
0.0651831328868866,
0.009309516288340092,
-0.24437130987644196,
0.06227725371718407,
-0.09390629082918167,
0.00704790186136961,
-0.07670468091964722,
0.25439000129699707,
0.0014257419388741255,
0.13348203897476196,
0.024351706728339195,
0.1332365721464157,
0.09460573643445969,
-0.011273124255239964,
-0.03832877799868584,
-0.09921147674322128,
-0.1634015142917633,
-0.0038513706531375647,
-0.15715739130973816,
-0.11214810609817505,
-0.18765728175640106,
0.043144818395376205,
-0.11992137879133224,
0.17920783162117004,
-0.031323157250881195,
-0.19278548657894135,
0.05579217150807381,
0.04933074116706848,
0.04907913878560066,
-0.08227065950632095,
-0.06946206092834473,
0.09297654032707214,
-0.13348190486431122,
-0.0560743473470211,
-0.12797842919826508,
-0.15258760750293732,
-0.0727018415927887,
-0.12396089732646942,
0.2433469593524933,
0.01443475391715765,
0.08869436383247375,
-0.0669262483716011,
-0.10607343167066574,
0.056910399347543716,
0.058898333460092545,
0.0021959468722343445,
0.1270098090171814,
0.10725073516368866,
0.002812659367918968,
-0.06225922703742981,
0.007286400068551302,
0.05215476453304291,
0.005582423415035009,
0.17003823816776276,
-0.09455132484436035,
0.12730056047439575,
-0.028995780274271965,
-0.0545278899371624,
0.008412421680986881,
-0.006066539324820042,
0.20318588614463806,
-0.10759028047323227,
-0.11325163394212723,
-0.19472800195217133,
0.20840167999267578,
0.013410721905529499,
-0.017590390518307686,
-0.10047183185815811,
-0.0031415086705237627,
0.03284560516476631,
-0.015961116179823875,
-0.00030098712886683643,
-0.16102153062820435,
7.046874657135049e-7,
-0.22697365283966064,
0.1183544248342514,
-0.020586837083101273,
-0.055861350148916245,
-0.08095988631248474,
-0.00013878710160497576,
-0.1319292038679123,
0.17368610203266144,
-0.11015624552965164,
0.08953700959682465,
0.1842348277568817,
0.08152099698781967,
-0.06639846414327621,
-0.09098001569509506,
0.07651236653327942,
0.013380215503275394,
-0.06610222160816193,
0.11224059760570526,
-0.01443518977612257,
0.05773616209626198,
-0.10307076573371887,
0.018092894926667213,
0.06181121990084648,
0.10012125223875046,
0.16785120964050293,
0.10175348073244095,
0.08205465972423553,
-0.00033489559427835047,
-0.057309526950120926,
-0.09772258996963501,
-0.07685878872871399,
0.12673555314540863,
-0.020438576117157936,
0.1817087084054947,
0.0005806147237308323,
-0.050050776451826096,
-0.07001341879367828,
-0.10550367832183838,
0.15635010600090027,
-0.1509438157081604,
-0.03895555064082146,
0.020550506189465523,
0.12520916759967804,
0.0019215745851397514,
0.06114140897989273,
0.1416340172290802,
-0.17533020675182343,
-0.027848301455378532,
-0.030246630311012268,
-0.09182564169168472,
0.15751808881759644,
0.12816289067268372,
-0.07145825773477554,
0.07386177033185959,
-0.08151239901781082,
-0.016574840992689133,
-0.049256205558776855,
-0.0891696959733963,
0.24606651067733765,
-0.041960135102272034,
0.026717109605669975,
-0.06688282638788223,
-0.1444362998008728,
0.11099567264318466,
0.1232050433754921,
0.11121879518032074,
0.04254582151770592,
3.547775112251093e-35,
-0.046795811504125595,
-0.05988207459449768,
-0.03232378885149956,
-0.20076213777065277,
0.0251624695956707,
-0.17436227202415466,
0.22612926363945007,
0.03580881282687187,
0.127177894115448,
0.03354577347636223,
0.03557347133755684
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | Are you able to use `aiohttp` to get the file at `https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json` using your proxy ? | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 16 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Are you able to use `aiohttp` to get the file at `https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json` using your proxy ? | [
0.04107239469885826,
0.14201511442661285,
-0.022452499717473984,
-0.09294027835130692,
0.28776389360427856,
0.12213338911533356,
0.1334715634584427,
-0.0195319727063179,
0.04970218241214752,
0.09439409524202347,
0.027814708650112152,
-0.08112207055091858,
0.0759870857000351,
0.13369536399841309,
0.06209016963839531,
-0.06616181880235672,
-0.021170351654291153,
-0.007979013957083225,
-0.009264885447919369,
-0.05400092527270317,
-0.03788598254323006,
0.08054167032241821,
0.09693921357393265,
-0.13854658603668213,
0.07134988158941269,
-0.07409138977527618,
-0.010389430448412895,
0.08725722879171371,
-0.12525805830955505,
-0.019818658009171486,
0.1512829214334488,
0.04948919638991356,
0.0873737707734108,
0.3367214798927307,
0.000005795973720523762,
0.12861841917037964,
0.13262996077537537,
0.025354452431201935,
-0.09280465543270111,
0.01542147807776928,
0.04827052727341652,
-0.11734272539615631,
-0.08833426237106323,
0.002321457490324974,
0.02810410037636757,
-0.030745098367333412,
0.10324361175298691,
-0.1988057643175125,
0.03261813148856163,
0.051714181900024414,
-0.062450915575027466,
0.15868119895458221,
-0.06416606903076172,
-0.03965703025460243,
0.004559376742690802,
0.02435286156833172,
-0.08543850481510162,
0.051969029009342194,
-0.12298072129487991,
0.0131935253739357,
0.02899232879281044,
-0.02905062958598137,
-0.02111579105257988,
0.09375100582838058,
-0.08487143367528915,
-0.019638914614915848,
-0.07402145862579346,
-0.1958979219198227,
-0.016699321568012238,
0.33075541257858276,
0.08856716752052307,
-0.00433538481593132,
-0.18151991069316864,
0.05266304314136505,
-0.008451609872281551,
-0.00284641794860363,
-0.06036112830042839,
0.001403938396833837,
-0.11047983914613724,
0.04527644068002701,
-0.060576219111680984,
-0.04814872890710831,
-0.18130968511104584,
0.05542021989822388,
-0.036251384764909744,
0.03718390315771103,
-0.10063587874174118,
0.11420497298240662,
-0.0033433649223297834,
-0.032683949917554855,
-0.09840480983257294,
-0.027568984776735306,
0.06331034749746323,
-0.13369612395763397,
-0.13369829952716827,
0.02626184932887554,
-0.06300628930330276,
-0.039317160844802856,
-0.00644666375592351,
0.011750448495149612,
0.05088379606604576,
-0.04428303241729736,
0.01818605326116085,
0.13017600774765015,
0.04567767307162285,
-0.014018373563885689,
-0.05808550864458084,
-0.04036842659115791,
0.24856533110141754,
0.14188268780708313,
0.05587300285696983,
-0.029637185856699944,
0.04984503984451294,
0.10094132274389267,
-0.11618096381425858,
-0.01784680224955082,
0.12191308289766312,
0.019721733406186104,
0.07032232731580734,
0.08769126236438751,
-0.11457677185535431,
0.10188906639814377,
0.0528729222714901,
0.0869574323296547,
-0.09930736571550369,
0.11550445109605789,
-0.06941289454698563,
0.07576537132263184,
-0.05079072341322899,
0.00690093357115984,
-0.0038361798506230116,
-0.10757182538509369,
-0.10537970066070557,
-0.14500920474529266,
0.2003062665462494,
0.00006419927376555279,
0.07265083491802216,
-0.15280596911907196,
0.13716915249824524,
0.024055371060967445,
0.07617156207561493,
-0.027719149366021156,
0.07274267077445984,
0.17420682311058044,
0.16307729482650757,
-0.007499310653656721,
0.10222741961479187,
-0.010890763252973557,
-0.019391145557165146,
-0.09707695990800858,
0.03355182707309723,
0.09584203362464905,
-0.28514817357063293,
0.0748862698674202,
-0.04780006408691406,
-0.00818703230470419,
-0.029461495578289032,
0.0784607008099556,
-0.2836255133152008,
-0.027658836916089058,
0.18515683710575104,
0.01261832844465971,
0.03013754077255726,
0.10856498032808304,
0.3006193935871124,
0.24149905145168304,
-0.021497409790754318,
-0.014197040349245071,
-0.007736289408057928,
-0.1568802148103714,
0.16991069912910461,
-0.11180068552494049,
0.004708822816610336,
-0.13871531188488007,
-0.1392301470041275,
0.050687532871961594,
-0.12716272473335266,
-0.06128577142953873,
-0.17052264511585236,
0.17713527381420135,
0.027493197470903397,
-0.058737896382808685,
0.10834606736898422,
0.0030337991192936897,
0.061105597764253616,
0.007987473160028458,
-0.08765704184770584,
0.14293445646762848,
-0.10528893023729324,
0.053946349769830704,
-0.03507603704929352,
-0.1021905243396759,
0.037201281636953354,
0.08640452474355698,
-0.11513049900531769,
-0.10200633108615875,
-0.10970901697874069,
-0.08007832616567612,
0.04394429922103882,
-0.05375419557094574,
0.13098768889904022,
-0.05174843966960907,
-0.03154462203383446,
0.0947047621011734,
0.0014894366031512618,
-0.0631956160068512,
-0.08479756116867065,
0.1342482566833496,
0.07950415462255478,
0.004223405383527279,
-0.2610641419887543,
-0.0007768619689159095,
-0.11651348322629929,
0.003619763068854809,
-0.081636443734169,
-0.17077092826366425,
-0.022396594285964966,
0.05045301094651222,
-0.01830441877245903,
0.33171823620796204,
-0.15916708111763,
0.1765449196100235,
0.12858179211616516,
-0.005045561119914055,
-0.07961906492710114,
0.1053226962685585,
-0.03532348945736885,
0.02145974338054657,
0.10193465650081635,
-0.04968230053782463,
0.08308719098567963,
0.05588798224925995,
0.040654197335243225,
0.08638345450162888,
-0.05817219614982605,
0.18108785152435303,
0.1616768091917038,
-0.1404610574245453,
0.031199634075164795,
-0.13284346461296082,
-0.035433314740657806,
0.0881524458527565,
-0.04673665761947632,
0.016405774280428886,
0.10585059970617294,
-0.012830114923417568,
-0.011779925785958767,
0.2621243894100189,
0.08026035130023956,
-0.06839007884263992,
0.19451750814914703,
0.10287688672542572,
-0.1669483631849289,
0.09864606708288193,
0.2759162187576294,
-0.08620943874120712,
0.146131232380867,
0.10706678777933121,
-0.09641314297914505,
-0.00971150305122137,
0.27373313903808594,
-0.022949252277612686,
-0.020755315199494362,
0.05347610265016556,
0.08496584743261337,
-0.16014157235622406,
0.016906509175896645,
0.06496488302946091,
0.03054584376513958,
0.07205165177583694,
0.13277888298034668,
-0.004511319100856781,
-0.06903740763664246,
-0.14631801843643188,
-0.036627497524023056,
-0.022782064974308014,
0.047350045293569565,
0.027195749804377556,
0.08211446553468704,
-0.01930193230509758,
-0.23887735605239868,
0.12645287811756134,
0.006317703984677792,
-0.11912474781274796,
0.1794154793024063,
0.08003005385398865,
-0.0980575904250145,
-0.20490598678588867,
0.05338514223694801,
-0.08117415755987167,
-0.009138606488704681,
-0.2697668671607971,
-0.018002860248088837,
0.02654840052127838,
0.004169830121099949,
0.07307703047990799,
-0.08545664697885513,
0.07458348572254181,
0.10692820698022842,
0.005773552693426609,
-0.08880747854709625,
-0.07621699571609497,
0.03011380508542061,
-0.04837791249155998,
-0.13921743631362915,
0.04894369840621948,
0.11227346211671829,
0.03123127669095993,
-0.18766388297080994,
-0.14734025299549103,
0.03726095333695412,
-0.08235602080821991,
0.10510065406560898,
0.09861941635608673,
-0.04493575543165207,
0.147299662232399,
-0.027644596993923187,
-0.053783997893333435,
0.25307154655456543,
0.01475781574845314,
-0.03570449352264404,
0.14310741424560547,
-0.07616140693426132,
0.11932395398616791,
0.0333792082965374,
0.12200520932674408,
-0.19926150143146515,
-0.15911607444286346,
-0.09023380279541016,
-0.21969813108444214,
-0.10893137753009796,
-0.02704068459570408,
-0.07434295117855072,
-0.06487905234098434,
0.1374332755804062,
-0.03771115839481354,
-0.1369103044271469,
-0.26362964510917664,
0.2045610547065735,
-0.09605304896831512,
-0.0669126808643341,
0.01755439303815365,
0.006261057686060667,
0.042065806686878204,
0.09860005974769592,
-0.11101998388767242,
-0.16854281723499298,
-0.049733180552721024,
-0.06463713943958282,
-0.05531328171491623,
-0.020158076658844948,
0.02026875875890255,
-0.2076195478439331,
-0.14517328143119812,
-0.03747822716832161,
-0.1391553282737732,
-0.029853133484721184,
0.1355036199092865,
0.006373806856572628,
0.15934482216835022,
0.12539120018482208,
0.0469387024641037,
0.06482359021902084,
-0.03432878479361534,
0.05016409233212471,
0.2924039661884308,
0.025396818295121193,
0.06805044412612915,
-0.06530971825122833,
-0.12648186087608337,
0.0733715072274208,
-0.02653694525361061,
-0.08355743438005447,
-0.08384639024734497,
0.07691086083650589,
0.1750277578830719,
-0.13800391554832458,
0.05626840889453888,
0.04084624722599983,
-0.028377551585435867,
-0.015549318864941597,
-0.21057213842868805,
-0.014974482357501984,
0.06243792921304703,
0.2178163081407547,
0.02327186055481434,
-0.01805177889764309,
-0.019609302282333374,
0.11676294356584549,
0.1729331612586975,
0.168903186917305,
0.05876682698726654,
0.06782408803701401,
-0.31234923005104065,
0.1113935112953186,
-0.059871625155210495,
0.3062385022640228,
-0.11218303442001343,
0.19831405580043793,
0.056879930198192596,
0.03975391015410423,
0.156551793217659,
-0.008868422359228134,
0.060681939125061035,
0.007997154258191586,
0.010317088104784489,
-0.10757840424776077,
0.014052323997020721,
0.1152905747294426,
0.01819426193833351,
0.03922964259982109,
-0.08099774271249771,
-0.18342424929141998,
0.13422615826129913,
0.059532832354307175,
-0.06617043912410736,
0.08642230927944183,
-0.021782975643873215,
0.029331162571907043,
-0.22813382744789124,
-0.16839763522148132,
-0.1268707811832428,
0.02335757575929165,
0.08754701912403107,
0.04727751761674881,
-0.0030559664592146873,
0.0889158695936203,
0.021633543074131012,
0.00363618740811944,
-0.10813258588314056,
0.03062378242611885,
0.008105019107460976,
0.06833355873823166,
0.05049027130007744,
0.10933307558298111,
0.034592289477586746,
0.3867618441581726,
0.0713648870587349,
-0.2647385597229004,
0.021816903725266457,
0.00915612280368805,
-0.009510165080428123,
0.07635772973299026,
-0.11078912019729614,
0.027080031111836433,
0.06633728742599487,
-0.16023120284080505,
-0.03591558337211609,
0.04981948807835579,
0.11345915496349335,
-0.012629988603293896,
0.01520977821201086,
-0.12296291440725327,
-0.10846255719661713,
0.1256636083126068,
0.02960851974785328,
0.05692533776164055,
-0.07181505113840103,
0.05482971668243408,
0.012047885917127132,
-0.31128811836242676,
-0.0865258276462555,
-0.0025239333044737577,
-0.03194331005215645,
-0.037458810955286026,
0.09983688592910767,
0.26365140080451965,
-0.19507642090320587,
0.007863118313252926,
0.18132267892360687,
-0.05734051764011383,
0.11220396310091019,
-0.1547093689441681,
0.06180568039417267,
-0.0009135598666034639,
-0.014567828737199306,
0.024803178384900093,
-0.07346297055482864,
0.05287015438079834,
0.04628546163439751,
0.21826621890068054,
-0.2391519546508789,
-0.09402552247047424,
-0.13927704095840454,
-0.12569376826286316,
-0.046898357570171356,
0.056191492825746536,
-0.008573821745812893,
-0.2404860556125641,
0.008117594756186008,
0.1161496564745903,
-0.16630494594573975,
0.11724267899990082,
-0.08300542086362839,
-0.08065096288919449,
-0.12527461349964142,
0.024766189977526665,
0.10260488092899323,
-0.07511985301971436,
0.06487780064344406,
-0.012541371397674084,
-0.0422496497631073,
0.13367320597171783,
-0.1334475874900818,
0.07124187797307968,
-0.07847393304109573,
-0.05004911497235298,
-0.06892354041337967,
0.04826289042830467,
0.004791040904819965,
0.1983921080827713,
-0.021169593557715416,
-0.07265964150428772,
0.022473298013210297,
0.004718742799013853,
0.040898531675338745,
-0.03844674676656723,
0.10744456201791763,
-0.026089131832122803,
-0.12884502112865448,
0.04599493741989136,
-0.05546548217535019,
0.08049003779888153,
-0.23282934725284576,
-0.07148879021406174,
0.11466167122125626,
0.02959057129919529,
-0.03208677098155022,
0.27810221910476685,
-0.1267327517271042,
0.1402031034231186,
0.07613249868154526,
0.21720238029956818,
-0.04211941361427307,
-0.023441292345523834,
-0.029694419354200363,
-0.07991022616624832,
0.06375065445899963,
0.054891880601644516,
0.09659683704376221,
-0.006716346833854914,
-0.16685236990451813,
-0.22320030629634857,
-0.15585857629776,
0.04785590618848801,
0.15136970579624176,
-0.03539981693029404,
-0.08639946579933167,
-0.18682846426963806,
-0.02545337751507759,
0.032437101006507874,
0.15925294160842896,
0.08180097490549088,
0.08618823438882828,
-0.06825129687786102,
-2.4749780825277837e-32,
-0.1355258822441101,
0.03296894207596779,
-0.041273824870586395,
-0.05890485271811485,
-0.30057206749916077,
0.04467427358031273,
-0.1313014179468155,
-0.09584060311317444,
-0.026243098080158234,
-0.18609105050563812,
-0.0966947078704834,
-0.001849538297392428,
0.01217845268547535,
0.06825011968612671,
-0.2325102984905243,
-0.15386074781417847,
-0.15325595438480377,
-0.2083187997341156,
-0.017184335738420486,
0.04813043400645256,
0.07482503354549408,
-0.1531376987695694,
-0.2066478431224823,
0.005192779004573822,
0.004225781187415123,
0.020866261795163155,
-0.06538345664739609,
-0.16593384742736816,
0.09067287296056747,
-0.04615234583616257,
-0.11520674079656601,
0.1089237704873085,
-0.06799346208572388,
-0.06444644182920456,
-0.23931126296520233,
-0.060500308871269226,
-0.1677635908126831,
0.022835001349449158,
-0.04792328551411629,
0.04616367816925049,
0.11288421601057053,
0.16166692972183228,
-0.060902189463377,
0.044581882655620575,
0.17468449473381042,
0.10377150028944016,
-0.09414616227149963,
-0.005615199450403452,
0.009265720844268799,
0.019831016659736633,
0.0284312441945076,
0.18232399225234985,
-0.1079433336853981,
0.04179030656814575,
0.22831730544567108,
0.0590268075466156,
0.0024875428061932325,
0.08653336763381958,
0.08934208005666733,
0.07747843116521835,
-0.003488045884296298,
-0.24054501950740814,
0.047805190086364746,
-0.11175322532653809,
0.02266630530357361,
-0.05243102088570595,
0.2832271158695221,
0.004737929906696081,
0.1272735595703125,
0.049752477556467056,
0.13830718398094177,
0.08736269176006317,
-0.019088169559836388,
-0.06060409918427467,
-0.08521509170532227,
-0.13963282108306885,
0.02447737380862236,
-0.12381482124328613,
-0.09135565161705017,
-0.1699151247739792,
0.0573231540620327,
-0.10970998555421829,
0.15687903761863708,
-0.03300821781158447,
-0.13648749887943268,
0.0006526742945425212,
0.03281395509839058,
0.062060318887233734,
-0.11276768147945404,
-0.06287454813718796,
0.10335525870323181,
-0.10959436744451523,
-0.044193848967552185,
-0.10140140354633331,
-0.1714431792497635,
-0.0799679234623909,
-0.12034943699836731,
0.2507376968860626,
0.006108149420469999,
0.08490168303251266,
-0.07433712482452393,
-0.10661083459854126,
0.05424202233552933,
0.05573973059654236,
0.026257621124386787,
0.11327996104955673,
0.11236923187971115,
0.03530736640095711,
-0.07345830649137497,
-0.026196809485554695,
0.020773164927959442,
0.022632012143731117,
0.2122294157743454,
-0.05102575942873955,
0.1387469470500946,
-0.011235570535063744,
-0.08755900710821152,
-0.002056976780295372,
0.00930848065763712,
0.18840716779232025,
-0.14756089448928833,
-0.07580564171075821,
-0.21278105676174164,
0.17391374707221985,
0.016625070944428444,
-0.0022803228348493576,
-0.1206253170967102,
0.03239312767982483,
-0.02483842335641384,
-0.04980946332216263,
-0.024957286193966866,
-0.18562030792236328,
7.05794150235306e-7,
-0.25384721159935,
0.1426277756690979,
-0.01107480376958847,
-0.0853567123413086,
-0.05331816524267197,
-0.005201930180191994,
-0.1614667922258377,
0.15555407106876373,
-0.09946925193071365,
0.09868594259023666,
0.15914194285869598,
0.08850591629743576,
-0.07754148542881012,
-0.1092425212264061,
0.05833365023136139,
-0.025686440989375114,
-0.045826349407434464,
0.11571848392486572,
-0.017985664308071136,
0.04347972199320793,
-0.14536727964878082,
0.05739785358309746,
0.07359698414802551,
0.07921120524406433,
0.17332863807678223,
0.0823902040719986,
0.07704068720340729,
0.03823264315724373,
-0.07679355889558792,
-0.11477735638618469,
-0.09388207644224167,
0.10108931362628937,
-0.019975371658802032,
0.19680547714233398,
-0.013267637230455875,
-0.04891889914870262,
-0.05864202603697777,
-0.10494410246610641,
0.12627585232257843,
-0.14563587307929993,
-0.01810094155371189,
0.010186287574470043,
0.1052880808711052,
0.016915762796998024,
0.05659883841872215,
0.11962991952896118,
-0.18792468309402466,
-0.020313052460551262,
-0.060525499284267426,
-0.09721864759922028,
0.1650010645389557,
0.12263768166303635,
-0.07579878717660904,
0.11435379087924957,
-0.08560056239366531,
-0.057102903723716736,
-0.002001028275117278,
-0.05694578215479851,
0.1982237547636032,
-0.06525891274213791,
0.02996000088751316,
-0.07004394382238388,
-0.14394493401050568,
0.126035675406456,
0.06312894821166992,
0.10351577401161194,
0.05609593167901039,
7.98588330634504e-35,
-0.053245868533849716,
-0.056634899228811264,
-0.03917509317398071,
-0.21392375230789185,
0.02939905785024166,
-0.1937992125749588,
0.18249210715293884,
0.062015350908041,
0.1120304986834526,
0.058420997112989426,
0.03738328069448471
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | It only works when passing trust_env=True when creating the ClientSession, as well as setting ssl=False.
Working Example:
```
import os
os.environ['HTTP_PROXY'] = "xyz"
os.environ['HTTPS_PROXY'] = "xyz"
import asyncio
import aiohttp
async def download_pep(url):
async with aiohttp.ClientSession(trust_env=True) as session:
print("1")
async with session.get(url, ssl=False) as resp:
print("2")
content = await resp.text()
print(content)
return content
asyncio.run(download_pep("https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json"))
```
SSL Verification has been a problem with other packages as well. Usually I circumvent the problem by setting
```
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
```
(probably not the best idea for security), although here aiohttp does not seem to use this default context. | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 98 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
It only works when passing trust_env=True when creating the ClientSession, as well as setting ssl=False.
Working Example:
```
import os
os.environ['HTTP_PROXY'] = "xyz"
os.environ['HTTPS_PROXY'] = "xyz"
import asyncio
import aiohttp
async def download_pep(url):
async with aiohttp.ClientSession(trust_env=True) as session:
print("1")
async with session.get(url, ssl=False) as resp:
print("2")
content = await resp.text()
print(content)
return content
asyncio.run(download_pep("https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json"))
```
SSL Verification has been a problem with other packages as well. Usually I circumvent the problem by setting
```
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
```
(probably not the best idea for security), although here aiohttp does not seem to use this default context. | [
0.0028760998975485563,
0.15590879321098328,
0.01975938491523266,
-0.053561534732580185,
0.3038266599178314,
0.10123775899410248,
0.15664702653884888,
-0.05008861422538757,
0.0216551274061203,
0.10592662543058395,
-0.009053295478224754,
-0.05896276980638504,
0.0981174111366272,
0.14400194585323334,
0.059033315628767014,
-0.04436508193612099,
-0.026471780613064766,
-0.018969355151057243,
-0.043661054223775864,
-0.06402315199375153,
-0.06260901689529419,
0.08675212413072586,
0.1290266066789627,
-0.17491692304611206,
0.09429359436035156,
-0.08712148666381836,
-0.0129554970189929,
0.09446553885936737,
-0.08930713683366776,
-0.01704832911491394,
0.14229844510555267,
0.04695197194814682,
0.09167994558811188,
0.28184524178504944,
0.000005728647010982968,
0.11476259678602219,
0.15220122039318085,
-0.0017007088754326105,
-0.09160327911376953,
0.02958786115050316,
0.009444254450500011,
-0.15079131722450256,
-0.05586419627070427,
-0.0009052827954292297,
0.010521970689296722,
-0.0005514961667358875,
0.07663197070360184,
-0.20688201487064362,
0.0028027973603457212,
0.04544684663414955,
-0.05735408514738083,
0.13691705465316772,
-0.0926569327712059,
-0.029815642163157463,
-0.027893036603927612,
0.028136497363448143,
-0.07466882467269897,
0.0018651867285370827,
-0.15925703942775726,
-0.012157799676060677,
0.02481594681739807,
-0.026097120717167854,
0.007334916852414608,
0.05212133005261421,
-0.057271506637334824,
-0.019991399720311165,
-0.06882661581039429,
-0.2128545343875885,
-0.027232909575104713,
0.3031690716743469,
0.041648682206869125,
-0.017618540674448013,
-0.19121292233467102,
0.04140843078494072,
0.0015902722952887416,
0.006470957770943642,
-0.04160255193710327,
0.030428534373641014,
-0.11526335030794144,
0.03127765282988548,
-0.04969320818781853,
-0.004522494971752167,
-0.17895619571208954,
0.07302264869213104,
-0.028729088604450226,
0.06177447736263275,
-0.08174648880958557,
0.11604558676481247,
0.00698802201077342,
-0.010908946394920349,
-0.06990311294794083,
-0.031079960986971855,
0.10299748927354813,
-0.14546997845172882,
-0.10203265398740768,
0.055645495653152466,
-0.03152633458375931,
-0.009119330905377865,
0.002857545856386423,
0.02653399296104908,
-0.037005480378866196,
-0.06425923854112625,
0.039470918476581573,
0.1175871267914772,
0.03318006172776222,
-0.042100753635168076,
-0.026206258684396744,
-0.032456956803798676,
0.27401649951934814,
0.15081553161144257,
0.0755772590637207,
0.0023153899237513542,
0.038237038999795914,
0.08751019090414047,
-0.08960413932800293,
-0.02241923287510872,
0.14003024995326996,
0.0674404725432396,
0.05218569189310074,
0.12254016846418381,
-0.02262231335043907,
0.09181897342205048,
0.04245081543922424,
0.1020236536860466,
-0.08600547909736633,
0.10132353752851486,
-0.05993780121207237,
0.053049374371767044,
-0.06524194031953812,
0.004191117361187935,
-0.024930382147431374,
-0.11955998837947845,
-0.1186240166425705,
-0.12446950376033783,
0.16350728273391724,
-0.004187886603176594,
0.09114711731672287,
-0.14088217914104462,
0.11869560182094574,
-0.026827776804566383,
0.06064976006746292,
-0.007811757270246744,
0.07465633749961853,
0.1962403506040573,
0.15078602731227875,
0.004881994798779488,
0.08141332119703293,
0.0021017666440457106,
-0.05078776925802231,
-0.11348315328359604,
0.03144042193889618,
0.09003708511590958,
-0.3330945074558258,
0.0547359436750412,
-0.08409743010997772,
-0.004712088964879513,
-0.0361931286752224,
0.07554220408201218,
-0.24814842641353607,
0.02479444444179535,
0.21187032759189606,
-0.0552322156727314,
0.030773144215345383,
0.07504994422197342,
0.3153095543384552,
0.23553027212619781,
0.03728575259447098,
-0.04586843028664589,
0.036792363971471786,
-0.13752126693725586,
0.1677430421113968,
-0.09796682000160217,
0.028541268780827522,
-0.152664452791214,
-0.0941367968916893,
0.05352652817964554,
-0.1474968045949936,
-0.07943481206893921,
-0.20061181485652924,
0.1821630448102951,
0.043511390686035156,
-0.046629250049591064,
0.06042543798685074,
0.04756386578083038,
0.0897708535194397,
0.01124551985412836,
-0.07562973350286484,
0.17201118171215057,
-0.09164876490831375,
0.032816532999277115,
0.014481358230113983,
-0.11138878762722015,
0.07578346133232117,
0.08659707754850388,
-0.13306169211864471,
-0.0706525444984436,
-0.12235652655363083,
-0.08549820631742477,
0.03663310781121254,
-0.06287052482366562,
0.10822051018476486,
-0.06406774371862411,
-0.00014690158423036337,
0.0907638892531395,
0.0007720561698079109,
0.034153617918491364,
-0.10175586491823196,
0.1381625384092331,
0.04798745736479759,
0.04294538497924805,
-0.2966499626636505,
-0.008954756893217564,
-0.12365392595529556,
0.0006998112075962126,
-0.12129119038581848,
-0.16425363719463348,
-0.039634883403778076,
0.0745449885725975,
-0.07943353056907654,
0.3056197166442871,
-0.12877966463565826,
0.20895981788635254,
0.13613773882389069,
-0.024278944358229637,
-0.017903978005051613,
0.12261690944433212,
-0.005288197658956051,
0.020895564928650856,
0.13407059013843536,
-0.0375957190990448,
0.13490763306617737,
0.05388100817799568,
0.04420600086450577,
0.1277206540107727,
-0.04903389513492584,
0.19056329131126404,
0.11034771800041199,
-0.13600313663482666,
0.02327563241124153,
-0.11927897483110428,
-0.004404672421514988,
0.10772566497325897,
-0.05691817030310631,
0.022350866347551346,
0.09377527981996536,
0.017302652820944786,
0.04995393753051758,
0.271844744682312,
0.1020364984869957,
-0.056989386677742004,
0.19619044661521912,
0.10679847747087479,
-0.15338703989982605,
0.10982780903577805,
0.24884489178657532,
-0.144720658659935,
0.1605900079011917,
0.11638257652521133,
-0.11265695095062256,
-0.02797728218138218,
0.2582661807537079,
-0.014385188929736614,
-0.005335491616278887,
0.04738500714302063,
0.0774800032377243,
-0.1575225293636322,
0.05637471750378609,
0.06196027249097824,
0.051930852234363556,
0.05325225740671158,
0.12481086701154709,
0.006281701847910881,
-0.06086335703730583,
-0.14940433204174042,
-0.02882814034819603,
-0.020293978974223137,
0.08171645551919937,
0.008227144367992878,
0.055785153061151505,
-0.020075824111700058,
-0.22105301916599274,
0.10766681283712387,
0.03707531467080116,
-0.10213635861873627,
0.1755957305431366,
0.07583937048912048,
-0.1121383011341095,
-0.16968734562397003,
0.01837684027850628,
-0.05993593856692314,
-0.0245425533503294,
-0.3079424798488617,
-0.032142456620931625,
0.03066006302833557,
-0.010817219503223896,
0.06383528560400009,
-0.15382766723632812,
0.10458025336265564,
0.13709919154644012,
0.0158099215477705,
-0.05047148838639259,
-0.06496480852365494,
0.0609552375972271,
-0.07694657146930695,
-0.10231589525938034,
0.0025761679280549288,
0.16009429097175598,
0.04525427520275116,
-0.1641891598701477,
-0.14823992550373077,
0.0183350071310997,
-0.09106422960758209,
0.09696684032678604,
0.0764612928032875,
-0.03529268875718117,
0.15939007699489594,
-0.010801821947097778,
-0.09015137702226639,
0.28050628304481506,
0.03442249447107315,
-0.031403303146362305,
0.12330843508243561,
-0.12584829330444336,
0.11274688690900803,
0.05016542971134186,
0.08863277733325958,
-0.199967160820961,
-0.14634031057357788,
-0.08548454195261002,
-0.1905898153781891,
-0.10264746099710464,
-0.05018073320388794,
-0.05264580249786377,
-0.06997732073068619,
0.1333775818347931,
-0.030703505501151085,
-0.11802013963460922,
-0.22939397394657135,
0.16094401478767395,
-0.11941952258348465,
-0.03926587104797363,
0.0018850164487957954,
0.014514712616801262,
0.04270283877849579,
0.08916971832513809,
-0.09640232473611832,
-0.16999483108520508,
-0.04874126985669136,
-0.07389846444129944,
-0.06933991611003876,
-0.06706347316503525,
0.056805066764354706,
-0.22792409360408783,
-0.11261945217847824,
-0.053593337535858154,
-0.17981822788715363,
-0.01611005701124668,
0.097303107380867,
0.036224789917469025,
0.11313417553901672,
0.11195952445268631,
0.04719342663884163,
0.03262428566813469,
-0.03673015534877777,
0.021405532956123352,
0.24133509397506714,
0.03824121877551079,
0.0099710151553154,
-0.05555860325694084,
-0.10523945093154907,
0.0606328509747982,
-0.034661389887332916,
-0.0685662180185318,
-0.0672236904501915,
0.06817011535167694,
0.1527557224035263,
-0.12487629801034927,
0.04170038551092148,
0.019645316526293755,
-0.03425866365432739,
-0.043716613203287125,
-0.18492485582828522,
0.004064621869474649,
0.035598356276750565,
0.24449385702610016,
0.021077033132314682,
0.0016506717074662447,
-0.008550098165869713,
0.11146865785121918,
0.1731656938791275,
0.15161439776420593,
0.04536948725581169,
0.06821317970752716,
-0.32900598645210266,
0.14233356714248657,
-0.057115305215120316,
0.30704203248023987,
-0.10570220649242401,
0.17933398485183716,
0.04135395959019661,
0.010709837079048157,
0.15951724350452423,
-0.030557937920093536,
0.07579289376735687,
0.004620265681296587,
0.018032662570476532,
-0.1109161376953125,
0.01812596060335636,
0.13439026474952698,
-0.05492977052927017,
-0.008968277834355831,
-0.04738221317529678,
-0.20133931934833527,
0.13146668672561646,
0.07857292145490646,
-0.040356989949941635,
0.09001585096120834,
0.0010759447468444705,
0.06629464775323868,
-0.2540528178215027,
-0.1504364013671875,
-0.09857666492462158,
-0.05896955356001854,
0.09611491113901138,
0.04774320498108864,
-0.011394198052585125,
0.09440898895263672,
0.02151636965572834,
0.024274636059999466,
-0.10995747894048691,
0.02678634040057659,
0.004854449070990086,
0.08095259964466095,
0.027432138100266457,
0.09060031920671463,
0.05457356199622154,
0.39564818143844604,
0.057749953120946884,
-0.26440200209617615,
-0.009109066799283028,
0.005526163149625063,
-0.00015410776541102678,
0.04256017133593559,
-0.10647856444120407,
0.043439459055662155,
0.05005548149347305,
-0.19401882588863373,
-0.04497445374727249,
0.03289301320910454,
0.10091274231672287,
0.010264329612255096,
0.017144272103905678,
-0.04714209958910942,
-0.13997013866901398,
0.09090039134025574,
0.03909071162343025,
0.06452964246273041,
-0.08276963979005814,
0.04606184363365173,
0.03517637774348259,
-0.3038981556892395,
-0.0949183851480484,
-0.020411144942045212,
-0.007121345028281212,
-0.0350593663752079,
0.14447849988937378,
0.25456249713897705,
-0.1732630878686905,
-0.024030355736613274,
0.15409640967845917,
-0.03212738409638405,
0.10903707146644592,
-0.14685757458209991,
0.06554456055164337,
-0.04029078781604767,
-0.032950643450021744,
0.006344422698020935,
-0.08403150737285614,
0.04153650626540184,
0.04457949101924896,
0.2239617556333542,
-0.222154438495636,
-0.110595703125,
-0.08439218252897263,
-0.14315836131572723,
-0.03389090672135353,
0.022931871935725212,
0.014089323580265045,
-0.23584367334842682,
0.0203606765717268,
0.11452347785234451,
-0.13131625950336456,
0.1654619723558426,
-0.11463350057601929,
-0.05927177146077156,
-0.08422929048538208,
-0.004656253382563591,
0.0728272870182991,
-0.08228058367967606,
0.08352145552635193,
-0.031661584973335266,
-0.06668879836797714,
0.1517886221408844,
-0.124932199716568,
0.10085643827915192,
-0.06014484912157059,
-0.027816928923130035,
-0.0546192042529583,
0.056418634951114655,
0.023710468783974648,
0.1883409321308136,
-0.008372989483177662,
-0.13157540559768677,
0.019093789160251617,
0.00009019611752592027,
0.07102995365858078,
-0.0394866056740284,
0.09470319747924805,
-0.018842050805687904,
-0.13499712944030762,
0.038909364491701126,
-0.0738740935921669,
0.11473838984966278,
-0.21237288415431976,
-0.09699747711420059,
0.11405780166387558,
-0.014541886746883392,
-0.016008224338293076,
0.28199735283851624,
-0.09342365711927414,
0.07300305366516113,
0.10571151971817017,
0.20819024741649628,
-0.03161788731813431,
-0.07076559960842133,
-0.009711135178804398,
-0.07389718294143677,
0.0830988883972168,
0.03130372613668442,
0.0752279981970787,
-0.0009789856849238276,
-0.17569059133529663,
-0.2202601581811905,
-0.14887212216854095,
0.08522339165210724,
0.19086813926696777,
0.01865893229842186,
-0.06149012967944145,
-0.20200656354427338,
-0.03746315464377403,
0.03334787115454674,
0.106350839138031,
0.10255546122789383,
0.08715412020683289,
-0.07310544699430466,
-2.4723014818909613e-32,
-0.13196733593940735,
0.03363797441124916,
-0.030127495527267456,
-0.021778017282485962,
-0.25443145632743835,
0.07542815804481506,
-0.13518637418746948,
-0.10578014701604843,
-0.00004862136847805232,
-0.15527121722698212,
-0.08316520601511002,
-0.009115904569625854,
0.023139160126447678,
0.10444869101047516,
-0.22729118168354034,
-0.14662112295627594,
-0.11581636220216751,
-0.1982230842113495,
0.0021177995949983597,
0.04143950343132019,
0.08459465205669403,
-0.18829503655433655,
-0.25391867756843567,
-0.04406421259045601,
0.033010635524988174,
-0.012858530506491661,
-0.08527571707963943,
-0.16197960078716278,
0.05005843564867973,
-0.0802108570933342,
-0.09542521834373474,
0.0726747065782547,
-0.1085914820432663,
-0.061129841953516006,
-0.20145128667354584,
-0.06183723360300064,
-0.13821637630462646,
0.03359822928905487,
-0.04354181885719299,
0.04286523163318634,
0.05388110503554344,
0.15265913307666779,
-0.11170455813407898,
0.03355152904987335,
0.15422986447811127,
0.10852864384651184,
-0.08348460495471954,
-0.00446047680452466,
-0.011530955322086811,
-0.039832208305597305,
0.05211055651307106,
0.16500793397426605,
-0.09104662388563156,
0.026835132390260696,
0.232321098446846,
0.06731737405061722,
-0.031760796904563904,
0.029781010001897812,
0.061058495193719864,
0.09581810235977173,
-0.02875751070678234,
-0.279938280582428,
0.0497581772506237,
-0.10475972294807434,
-0.005531548988074064,
-0.09330999106168747,
0.2714083194732666,
-0.005514518823474646,
0.14000965654850006,
0.05449115112423897,
0.09216701984405518,
0.0654435083270073,
-0.012016921304166317,
-0.0658157616853714,
-0.13209891319274902,
-0.14116214215755463,
0.011584112420678139,
-0.16547857224941254,
-0.07757139205932617,
-0.17006877064704895,
0.03222296014428139,
-0.1290121227502823,
0.16633373498916626,
-0.04875778406858444,
-0.17261941730976105,
-0.001150408643297851,
0.07583849877119064,
0.07127127051353455,
-0.10550473630428314,
-0.0707889273762703,
0.09429669380187988,
-0.06015148386359215,
-0.09553005546331406,
-0.10866138339042664,
-0.1375417858362198,
-0.08861880004405975,
-0.08419487625360489,
0.21883666515350342,
0.016986694186925888,
0.08985564857721329,
-0.08355728536844254,
-0.10402242839336395,
0.05518744885921478,
0.04007761925458908,
0.03427877649664879,
0.13476237654685974,
0.1254848688840866,
0.010680622421205044,
-0.06311320513486862,
0.006761335767805576,
0.021001102402806282,
-0.0026563340798020363,
0.1990000158548355,
-0.04375680163502693,
0.15589618682861328,
-0.03054611012339592,
-0.0982273519039154,
0.018768152222037315,
0.01799849607050419,
0.18386387825012207,
-0.12912730872631073,
-0.07904160767793655,
-0.23516033589839935,
0.19367747008800507,
0.019940149039030075,
-0.02361740916967392,
-0.05093258246779442,
-0.05492646247148514,
0.015633368864655495,
-0.024225126951932907,
-0.004705444443970919,
-0.22947311401367188,
7.069289722494432e-7,
-0.2888319790363312,
0.1449180245399475,
-0.042660586535930634,
-0.06672604382038116,
-0.05848849564790726,
0.0025385648477822542,
-0.14387831091880798,
0.1933925747871399,
-0.11997289210557938,
0.05874251946806908,
0.17119179666042328,
0.09589637815952301,
-0.07765837013721466,
-0.10945121198892593,
0.06483838707208633,
-0.03311609849333763,
-0.07378392666578293,
0.09226211160421371,
-0.008083576336503029,
0.054414018988609314,
-0.1647346019744873,
0.014415213838219643,
0.11862101405858994,
0.04791879653930664,
0.17399685084819794,
0.07412823289632797,
0.08035775274038315,
0.04492272809147835,
-0.1058226078748703,
-0.09977124631404877,
-0.058530766516923904,
0.11937789618968964,
-0.03836212679743767,
0.23880718648433685,
-0.0009032472153194249,
-0.04941260814666748,
-0.053961124271154404,
-0.13735511898994446,
0.15343745052814484,
-0.10299929976463318,
-0.034142009913921356,
0.02644781582057476,
0.12750522792339325,
-0.01256675273180008,
0.04772603511810303,
0.1553257703781128,
-0.16068726778030396,
-0.023063234984874725,
-0.05931771174073219,
-0.0787188932299614,
0.18419604003429413,
0.1641683578491211,
-0.06318125873804092,
0.12161274999380112,
-0.08842529356479645,
-0.03593762591481209,
-0.03428192064166069,
-0.06482234597206116,
0.22705517709255219,
-0.12587423622608185,
0.03351731598377228,
-0.053144216537475586,
-0.11668679863214493,
0.12562251091003418,
0.08713195472955704,
0.09368341416120529,
0.011014049872756004,
4.7773818072689237e-35,
-0.027964066714048386,
-0.10775619000196457,
-0.05054447427392006,
-0.22481118142604828,
0.03787483647465706,
-0.15706023573875427,
0.17354591190814972,
0.06008165702223778,
0.10051485151052475,
0.08421581983566284,
0.04134690389037132
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | We do pass `trust_env` as well. Could you share the full stack trace you get when streaming using `datasets` ? That could help locate where we might have forgotten to pass `trust_env` | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 32 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
We do pass `trust_env` as well. Could you share the full stack trace you get when streaming using `datasets` ? That could help locate where we might have forgotten to pass `trust_env` | [
0.0031550845596939325,
0.14302703738212585,
0.001168089103884995,
-0.05678577721118927,
0.2965211570262909,
0.10584620386362076,
0.11937988549470901,
-0.025011412799358368,
0.04098422825336456,
0.10534831881523132,
0.027204100042581558,
-0.06431930512189865,
0.06253977119922638,
0.15310245752334595,
0.08153294026851654,
-0.05547391623258591,
-0.016465505585074425,
-0.0190191138535738,
-0.008702771738171577,
-0.055354777723550797,
-0.039062514901161194,
0.09384700655937195,
0.10650384426116943,
-0.15802887082099915,
0.061457641422748566,
-0.09397689998149872,
-0.02611635811626911,
0.13199374079704285,
-0.09351593255996704,
-0.014646526426076889,
0.14121438562870026,
0.037229541689157486,
0.11651146411895752,
0.3156197667121887,
0.000005764983598055551,
0.11342728137969971,
0.1822400689125061,
0.0019195087952539325,
-0.08021998405456543,
0.01340047363191843,
0.027412917464971542,
-0.14244961738586426,
-0.05502261593937874,
0.0006484331097453833,
0.04329738765954971,
-0.04866362363100052,
0.10104390233755112,
-0.2129543423652649,
0.04174645245075226,
0.03389812260866165,
-0.04380796477198601,
0.1346442848443985,
-0.06525585800409317,
-0.02543604001402855,
0.014709733426570892,
0.04200974851846695,
-0.06253788620233536,
0.02853493206202984,
-0.16746239364147186,
-0.020965371280908585,
0.011068196035921574,
-0.042676135897636414,
-0.01584681309759617,
0.057172637432813644,
-0.08856456726789474,
-0.01264109369367361,
-0.05445392057299614,
-0.19121326506137848,
-0.006987639237195253,
0.3281607925891876,
0.024944687262177467,
-0.02836417593061924,
-0.17839355766773224,
0.04223881661891937,
-0.03246847540140152,
-0.010652205906808376,
-0.03134608641266823,
0.019357001408934593,
-0.10992108285427094,
0.028100913390517235,
-0.08153683692216873,
-0.015835218131542206,
-0.16509978473186493,
0.07549206912517548,
-0.0309617817401886,
0.031200025230646133,
-0.10545593500137329,
0.10381864011287689,
-0.011117013171315193,
-0.017488695681095123,
-0.05537305027246475,
-0.052353713661432266,
0.07733923941850662,
-0.15014402568340302,
-0.0993853211402893,
0.06309445947408676,
-0.043633703142404556,
-0.016580170020461082,
-0.00965090747922659,
0.05676377937197685,
-0.06832466274499893,
-0.04895486310124397,
0.03594590350985527,
0.11853524297475815,
0.06380469352006912,
-0.05462558940052986,
-0.06233600899577141,
-0.05717606842517853,
0.265148788690567,
0.1500340849161148,
0.05547380819916725,
0.005122037138789892,
0.034513626247644424,
0.07618924230337143,
-0.09499158710241318,
-0.0004264786548446864,
0.12234409153461456,
0.04387873411178589,
0.08281856775283813,
0.15081021189689636,
-0.04542524367570877,
0.11531154066324234,
0.07890129089355469,
0.13122253119945526,
-0.10068408399820328,
0.1006162092089653,
-0.06499198824167252,
0.07280047982931137,
-0.019509999081492424,
-0.017857393249869347,
-0.031124604865908623,
-0.11834967136383057,
-0.1348634511232376,
-0.15973128378391266,
0.18892154097557068,
-0.04666933789849281,
0.07077821344137192,
-0.1519903838634491,
0.13173334300518036,
-0.011373704299330711,
0.047335051000118256,
-0.03502507507801056,
0.05966649204492569,
0.1430940479040146,
0.15860529243946075,
-0.0008639930747449398,
0.0943024680018425,
0.013163477182388306,
-0.029430491849780083,
-0.08830104023218155,
0.015010206028819084,
0.09193691611289978,
-0.30952534079551697,
0.06918331980705261,
-0.04994380101561546,
0.01001480221748352,
-0.03582913056015968,
0.07422706484794617,
-0.23757165670394897,
0.014933479949831963,
0.18452559411525726,
-0.03503462299704552,
0.045224372297525406,
0.0937199518084526,
0.32300740480422974,
0.2506607174873352,
-0.011866046115756035,
0.0009299779194407165,
-0.01841684617102146,
-0.14930489659309387,
0.1660873144865036,
-0.10993804037570953,
0.014460518956184387,
-0.14395374059677124,
-0.10726162046194077,
0.04136174917221069,
-0.15352286398410797,
-0.08366532623767853,
-0.16841113567352295,
0.16349700093269348,
0.04595712199807167,
-0.07703736424446106,
0.0522218681871891,
-0.002679285127669573,
0.0649736151099205,
-0.009752514772117138,
-0.1251983940601349,
0.16854849457740784,
-0.0943404957652092,
0.06261678785085678,
-0.014753080904483795,
-0.1032523363828659,
0.08034279197454453,
0.08795296400785446,
-0.14489048719406128,
-0.12263458967208862,
-0.12420961260795593,
-0.035247962921857834,
0.022137796506285667,
-0.09484968334436417,
0.12308584898710251,
-0.02410602755844593,
-0.008883007802069187,
0.10521148890256882,
0.015564692206680775,
0.011783924885094166,
-0.11804714798927307,
0.1232195794582367,
0.05587073415517807,
-0.014210841618478298,
-0.33374589681625366,
-0.008230029605329037,
-0.10021956264972687,
-0.017865434288978577,
-0.0913199856877327,
-0.18751786649227142,
-0.03563376143574715,
0.05964697152376175,
-0.06664110720157623,
0.3417673110961914,
-0.1423376053571701,
0.1277812272310257,
0.14744095504283905,
0.007130253594368696,
-0.0224570594727993,
0.13695217669010162,
-0.021211476996541023,
0.0044706957414746284,
0.11302122473716736,
-0.021797310560941696,
0.0995006412267685,
0.06499774754047394,
0.0648091584444046,
0.11587443202733994,
-0.044733673334121704,
0.18112319707870483,
0.11732208728790283,
-0.16235753893852234,
0.0010643468704074621,
-0.1576230823993683,
0.0021470997016876936,
0.14535607397556305,
-0.08242840319871902,
0.010869883000850677,
0.05959095433354378,
0.0017498511588200927,
-0.031189968809485435,
0.26990726590156555,
0.08070329576730728,
-0.06391099095344543,
0.16668733954429626,
0.127290278673172,
-0.1473853439092636,
0.0777018666267395,
0.270873486995697,
-0.13200898468494415,
0.1584281027317047,
0.13708555698394775,
-0.09097622334957123,
0.010998873971402645,
0.26549139618873596,
-0.01859920844435692,
-0.026042811572551727,
0.028710417449474335,
0.06552201509475708,
-0.17361946403980255,
0.04165979102253914,
0.09324202686548233,
0.012676629237830639,
0.0783640518784523,
0.14740301668643951,
-0.00612132390961051,
-0.06154268980026245,
-0.13568493723869324,
-0.01272091455757618,
-0.05894475430250168,
0.06965097039937973,
0.05014785751700401,
0.0567437969148159,
-0.018589813262224197,
-0.25886988639831543,
0.10675550252199173,
0.022455086931586266,
-0.10675084590911865,
0.18199682235717773,
0.09015946090221405,
-0.13784638047218323,
-0.17811357975006104,
0.026063745841383934,
-0.09409189969301224,
-0.027550192549824715,
-0.27552464604377747,
-0.03050684742629528,
0.0007739981519989669,
-0.029733316972851753,
0.08534940332174301,
-0.12840165197849274,
0.06104123592376709,
0.1353180855512619,
0.013612285256385803,
-0.0528055839240551,
-0.05074957013130188,
0.03720840811729431,
-0.08116182684898376,
-0.08294130116701126,
0.025679482147097588,
0.10849420726299286,
0.08580970019102097,
-0.17918460071086884,
-0.15250170230865479,
0.02367430366575718,
-0.08577226102352142,
0.08540919423103333,
0.11603987962007523,
-0.02797771990299225,
0.13744467496871948,
-0.0077294474467635155,
-0.1217842549085617,
0.23937217891216278,
0.037318237125873566,
-0.04913958162069321,
0.14009198546409607,
-0.07840100675821304,
0.0922030508518219,
0.031344641000032425,
0.1035446748137474,
-0.19471898674964905,
-0.14139240980148315,
-0.1081012636423111,
-0.20533211529254913,
-0.11581848561763763,
-0.021871652454137802,
-0.07175729423761368,
-0.08834262192249298,
0.11951344460248947,
-0.050059739500284195,
-0.1274017095565796,
-0.2219889611005783,
0.185926616191864,
-0.10217193514108658,
-0.05288522690534592,
0.005048985127359629,
-0.015350744128227234,
0.05120564252138138,
0.1075565293431282,
-0.08947691321372986,
-0.1211138442158699,
-0.019685475155711174,
-0.05321169272065163,
-0.0595574788749218,
-0.03684959560632706,
0.0405847541987896,
-0.1818198263645172,
-0.11518440395593643,
-0.042124226689338684,
-0.12716874480247498,
-0.06375886499881744,
0.08053458482027054,
0.04694121703505516,
0.13169124722480774,
0.11816819757223129,
0.060917213559150696,
0.0769302174448967,
-0.03308534994721413,
0.035747796297073364,
0.25431469082832336,
0.046257466077804565,
0.04806443676352501,
-0.03244819864630699,
-0.11490630358457565,
0.10495460033416748,
-0.014283370226621628,
-0.0787377581000328,
-0.05838344991207123,
0.0838792622089386,
0.17315612733364105,
-0.116934634745121,
0.06755752861499786,
0.03913206234574318,
-0.028080886229872704,
-0.028495579957962036,
-0.22923074662685394,
0.011794915422797203,
0.059259071946144104,
0.2513103485107422,
0.029291480779647827,
-0.02499235048890114,
-0.01405393797904253,
0.07309786230325699,
0.1703311800956726,
0.14215093851089478,
0.031195808202028275,
0.10593198984861374,
-0.3137630522251129,
0.12850171327590942,
-0.08388005197048187,
0.2851465046405792,
-0.11030932515859604,
0.2024112045764923,
0.0238262340426445,
0.05322946608066559,
0.14678236842155457,
-0.027631651610136032,
0.0603456124663353,
-0.022608714178204536,
-0.00942033901810646,
-0.12868595123291016,
-0.0213327519595623,
0.13714534044265747,
-0.05158413574099541,
-0.0012736538192257285,
-0.08193660527467728,
-0.17371094226837158,
0.13426925241947174,
0.11549512296915054,
-0.04396193474531174,
0.10380974411964417,
-0.0012984080240130424,
0.06033025681972504,
-0.25572633743286133,
-0.152067631483078,
-0.08991599082946777,
-0.01675613410770893,
0.08345747739076614,
0.03362060710787773,
-0.013382132165133953,
0.08907172828912735,
0.05650104954838753,
0.018591416999697685,
-0.12170549482107162,
0.034172605723142624,
0.01116000022739172,
0.07456478476524353,
0.02853449061512947,
0.11853306740522385,
0.0394505150616169,
0.3946590721607208,
0.054804280400276184,
-0.24933838844299316,
-0.017542874440550804,
0.012149922549724579,
0.02517274022102356,
0.10031875222921371,
-0.1272064447402954,
0.010830429382622242,
0.06842729449272156,
-0.17448915541172028,
-0.03530896455049515,
0.05060942843556404,
0.09021145105361938,
0.030626365914940834,
0.024841634556651115,
-0.04236873984336853,
-0.1260666400194168,
0.13481049239635468,
0.03541071340441704,
0.05187291279435158,
-0.1121533066034317,
0.06572191417217255,
0.009258495643734932,
-0.28656426072120667,
-0.09064663201570511,
0.0033631366677582264,
-0.029724527150392532,
-0.02441411465406418,
0.14872534573078156,
0.2422749251127243,
-0.24181634187698364,
-0.0002858603256754577,
0.16592003405094147,
-0.06503814458847046,
0.10903404653072357,
-0.16385512053966522,
0.06397932022809982,
-0.009859354235231876,
0.011652259156107903,
0.011489302851259708,
-0.07613561302423477,
0.046434465795755386,
0.04016836732625961,
0.19339531660079956,
-0.18930307030677795,
-0.10476747900247574,
-0.08556609600782394,
-0.13816392421722412,
-0.015540002845227718,
0.03059302270412445,
-0.02587079629302025,
-0.24039186537265778,
0.017565613612532616,
0.1397692859172821,
-0.13505280017852783,
0.15049871802330017,
-0.11980188637971878,
-0.05414895340800285,
-0.08251117914915085,
0.004609455354511738,
0.09137478470802307,
-0.04564516618847847,
0.09707220643758774,
0.006606987211853266,
-0.05600137263536453,
0.13328991830348969,
-0.12222180515527725,
0.04674738645553589,
-0.08333425968885422,
-0.04882508143782616,
-0.047446753829717636,
0.04780130833387375,
0.0002911276533268392,
0.21258941292762756,
-0.05739324167370796,
-0.10171858221292496,
0.008922894485294819,
0.004342466592788696,
0.015279250219464302,
-0.05649818480014801,
0.09210231900215149,
-0.014256086200475693,
-0.12149316817522049,
0.03316229581832886,
-0.054387256503105164,
0.07065758109092712,
-0.1972213238477707,
-0.07865405082702637,
0.13052143156528473,
-0.009458912536501884,
-0.009462655521929264,
0.2499433159828186,
-0.1180882677435875,
0.11376021802425385,
0.09612221270799637,
0.2217329442501068,
-0.03960823640227318,
-0.027029667049646378,
-0.01630285382270813,
-0.07060189545154572,
0.11267031729221344,
0.038012027740478516,
0.07710760831832886,
-0.006354173179715872,
-0.15268483757972717,
-0.22199180722236633,
-0.11806800961494446,
0.07307839393615723,
0.1813245266675949,
0.02686009183526039,
-0.0721684992313385,
-0.18361616134643555,
-0.04629838466644287,
0.05303621292114258,
0.10877040773630142,
0.09023185819387436,
0.06322908401489258,
-0.07368768006563187,
-2.4579401735333777e-32,
-0.11017738282680511,
0.013270593248307705,
-0.04342137649655342,
-0.022334571927785873,
-0.26504409313201904,
0.038124650716781616,
-0.1368531733751297,
-0.10796777904033661,
-0.04036210849881172,
-0.18537656962871552,
-0.09630583226680756,
0.028210371732711792,
0.02169075421988964,
0.10222525894641876,
-0.22227993607521057,
-0.15654361248016357,
-0.11408311873674393,
-0.21558308601379395,
0.0027260028291493654,
0.017648538574576378,
0.07876960188150406,
-0.12317748367786407,
-0.229427307844162,
-0.041976314038038254,
0.016101229935884476,
-0.013282270170748234,
-0.13000428676605225,
-0.1347988247871399,
0.0977616086602211,
-0.065762460231781,
-0.09159454703330994,
0.06433255225419998,
-0.07458050549030304,
-0.09678716212511063,
-0.19591693580150604,
-0.06896301358938217,
-0.1753496527671814,
0.029803333804011345,
-0.03149327635765076,
-0.0012709454167634249,
0.044776465743780136,
0.17992553114891052,
-0.07483811676502228,
0.008298424072563648,
0.18840612471103668,
0.12426143139600754,
-0.08556865155696869,
-0.013920369558036327,
0.01397178415209055,
-0.0513002835214138,
0.0528482086956501,
0.1687299907207489,
-0.11292197555303574,
0.041432980448007584,
0.18584385514259338,
0.07169125229120255,
-0.01837579347193241,
0.06599642336368561,
0.04190901666879654,
0.09761151671409607,
-0.030779670923948288,
-0.28148767352104187,
0.04741537943482399,
-0.09339173138141632,
-0.004288514144718647,
-0.0943736732006073,
0.32279321551322937,
-0.03312232345342636,
0.11934328824281693,
0.06361667811870575,
0.08935747295618057,
0.11740745604038239,
0.009235086850821972,
-0.03033570572733879,
-0.09576719999313354,
-0.10903023928403854,
-0.03719235584139824,
-0.13233360648155212,
-0.048532500863075256,
-0.16862790286540985,
0.024378949776291847,
-0.140252023935318,
0.18442954123020172,
-0.06303456425666809,
-0.18013663589954376,
0.041069645434617996,
0.04672875627875328,
0.06011263281106949,
-0.09907712787389755,
-0.043782126158475876,
0.07074446231126785,
-0.08766406029462814,
-0.08822452276945114,
-0.10991959273815155,
-0.16474765539169312,
-0.05078687518835068,
-0.07203502207994461,
0.23524683713912964,
0.002274507423862815,
0.08593001961708069,
-0.07989126443862915,
-0.09928883612155914,
0.08386267721652985,
0.06011537089943886,
0.03251813352108002,
0.12528374791145325,
0.13892361521720886,
-0.001731515978462994,
-0.08966995775699615,
-0.0006930485251359642,
0.03301271051168442,
0.018344249576330185,
0.16761387884616852,
-0.050408829003572464,
0.14618636667728424,
-0.028087502345442772,
-0.0872889906167984,
0.0035296441055834293,
-0.0016209956957027316,
0.17206861078739166,
-0.11223161965608597,
-0.10701880604028702,
-0.2286459058523178,
0.19724468886852264,
0.018786383792757988,
-0.023375073447823524,
-0.07816947251558304,
-0.028910381719470024,
0.05301247537136078,
-0.009227356873452663,
0.0005186529015190899,
-0.21678566932678223,
7.156023116294818e-7,
-0.24041122198104858,
0.11695145070552826,
-0.03176755830645561,
-0.07450352609157562,
-0.060392022132873535,
-0.01942097395658493,
-0.16294802725315094,
0.17223699390888214,
-0.11352536082267761,
0.04891029745340347,
0.19564595818519592,
0.07997753471136093,
-0.07695335149765015,
-0.09236213564872742,
0.07409896701574326,
-0.02997872605919838,
-0.04421911761164665,
0.09001239389181137,
-0.022061999887228012,
0.1184544563293457,
-0.17606285214424133,
0.02092568203806877,
0.0941542387008667,
0.054029952734708786,
0.1521359235048294,
0.0924445390701294,
0.06589341908693314,
0.03061652183532715,
-0.08528707176446915,
-0.1261414736509323,
-0.04430478811264038,
0.1084274873137474,
-0.04366033524274826,
0.22462208569049835,
0.0026000591460615396,
-0.0626213401556015,
-0.08664452284574509,
-0.09095506370067596,
0.16212275624275208,
-0.08315590023994446,
-0.015199162065982819,
0.014761229045689106,
0.10388258099555969,
-0.013565747067332268,
0.06685208529233932,
0.12869912385940552,
-0.1743469536304474,
-0.015161017887294292,
-0.044463347643613815,
-0.08944510668516159,
0.14169274270534515,
0.161195769906044,
-0.03235228732228279,
0.09402093291282654,
-0.09861487150192261,
-0.012455792166292667,
-0.016790999099612236,
-0.0633775070309639,
0.23850709199905396,
-0.09482181817293167,
0.03204025700688362,
-0.07821684330701828,
-0.13968902826309204,
0.11563069373369217,
0.09322977066040039,
0.09594012051820755,
0.0192857813090086,
6.828206189721104e-35,
-0.0411340594291687,
-0.08738717436790466,
-0.03770593926310539,
-0.2844984233379364,
0.01714102365076542,
-0.16505230963230133,
0.18413729965686798,
0.028253203257918358,
0.11710947006940842,
0.048175398260354996,
0.04268177971243858
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | Is there a way to disable ssl verification when streaming a dataset. I suspect this might be the isssue with my proxy.
Here you go:
```
FileNotFoundError Traceback (most recent call last)
Cell In[8], line 3
1 from datasets import load_dataset
----> 3 ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
5 sample = next(iter(ds))
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1788 # Return iterable dataset in case of streaming
1789 if streaming:
-> 1790 return builder_instance.as_streaming_dataset(split=split)
1792 # Some datasets are already processed on the HF google storage
1793 # Don't try downloading from Google storage for the packaged datasets as text, json, csv or pandas
1794 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281), in DatasetBuilder.as_streaming_dataset(self, split, base_path)
1274 dl_manager = StreamingDownloadManager(
1275 base_path=base_path or self.base_path,
1276 download_config=DownloadConfig(use_auth_token=self.use_auth_token, storage_options=self.storage_options),
1277 dataset_name=self.name,
1278 data_dir=self.config.data_dir,
1279 )
1280 self._check_manual_download(dl_manager)
-> 1281 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1282 # By default, return all splits
1283 if split is None:
File [~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120), in Voxpopuli._split_generators(self, dl_manager)
118 def _split_generators(self, dl_manager):
119 n_shards_path = dl_manager.download_and_extract(_N_SHARDS_FILE)
--> 120 with open(n_shards_path) as f:
121 n_shards = json.load(f)
123 if self.config.name == "en_accented":
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71), in extend_module_for_streaming..wrap_auth..wrapper(*args, **kwargs)
69 @wraps(function)
70 def wrapper(*args, **kwargs):
---> 71 return function(*args, use_auth_token=use_auth_token, **kwargs)
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517), in xopen(file, mode, use_auth_token, *args, **kwargs)
515 except FileNotFoundError:
516 if file.startswith(config.HF_ENDPOINT):
--> 517 raise FileNotFoundError(
518 file + "\nIf the repo is private or gated, make sure to log in with `huggingface-cli login`."
519 ) from None
520 else:
521 raise
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
``` | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 282 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Is there a way to disable ssl verification when streaming a dataset. I suspect this might be the isssue with my proxy.
Here you go:
```
FileNotFoundError Traceback (most recent call last)
Cell In[8], line 3
1 from datasets import load_dataset
----> 3 ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
5 sample = next(iter(ds))
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1788 # Return iterable dataset in case of streaming
1789 if streaming:
-> 1790 return builder_instance.as_streaming_dataset(split=split)
1792 # Some datasets are already processed on the HF google storage
1793 # Don't try downloading from Google storage for the packaged datasets as text, json, csv or pandas
1794 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281), in DatasetBuilder.as_streaming_dataset(self, split, base_path)
1274 dl_manager = StreamingDownloadManager(
1275 base_path=base_path or self.base_path,
1276 download_config=DownloadConfig(use_auth_token=self.use_auth_token, storage_options=self.storage_options),
1277 dataset_name=self.name,
1278 data_dir=self.config.data_dir,
1279 )
1280 self._check_manual_download(dl_manager)
-> 1281 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1282 # By default, return all splits
1283 if split is None:
File [~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120), in Voxpopuli._split_generators(self, dl_manager)
118 def _split_generators(self, dl_manager):
119 n_shards_path = dl_manager.download_and_extract(_N_SHARDS_FILE)
--> 120 with open(n_shards_path) as f:
121 n_shards = json.load(f)
123 if self.config.name == "en_accented":
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71), in extend_module_for_streaming..wrap_auth..wrapper(*args, **kwargs)
69 @wraps(function)
70 def wrapper(*args, **kwargs):
---> 71 return function(*args, use_auth_token=use_auth_token, **kwargs)
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517), in xopen(file, mode, use_auth_token, *args, **kwargs)
515 except FileNotFoundError:
516 if file.startswith(config.HF_ENDPOINT):
--> 517 raise FileNotFoundError(
518 file + "\nIf the repo is private or gated, make sure to log in with `huggingface-cli login`."
519 ) from None
520 else:
521 raise
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
``` | [
0.01069821696728468,
0.137516051530838,
-0.005743520800024271,
-0.06898225098848343,
0.2755222022533417,
0.12092772126197815,
0.13279150426387787,
-0.02283499948680401,
-0.018486283719539642,
0.09984257072210312,
0.032719533890485764,
-0.0831851065158844,
0.09504217654466629,
0.13769418001174927,
0.07060133665800095,
-0.0331384614109993,
-0.025331739336252213,
-0.017035968601703644,
-0.004957419354468584,
-0.03130292892456055,
-0.0639892965555191,
0.0854787826538086,
0.08070529997348785,
-0.19087964296340942,
0.0787794217467308,
-0.08470620959997177,
-0.028460226953029633,
0.0761091411113739,
-0.08769497275352478,
-0.027978070080280304,
0.12989437580108643,
0.052495405077934265,
0.07603861391544342,
0.28225353360176086,
0.0000059370495364419185,
0.12128543853759766,
0.15880627930164337,
0.017806489020586014,
-0.10226079821586609,
0.038568828254938126,
0.0360804982483387,
-0.13314515352249146,
-0.09130524098873138,
0.007578396238386631,
0.03585498780012131,
-0.040722087025642395,
0.07118414342403412,
-0.200001522898674,
0.05104842036962509,
0.05256574600934982,
-0.050865232944488525,
0.1418321281671524,
-0.08182472735643387,
-0.009470054879784584,
-0.0025879822205752134,
0.006417734548449516,
-0.07785584032535553,
0.04532799497246742,
-0.13944610953330994,
-0.03793306648731232,
0.016466667875647545,
-0.03064284659922123,
-0.02784230187535286,
0.08414527773857117,
-0.0980491191148758,
-0.04272085428237915,
-0.10305730998516083,
-0.2032630294561386,
0.013972660526633263,
0.32465851306915283,
0.08241000771522522,
-0.025425421074032784,
-0.18646486103534698,
0.02833203598856926,
-0.011552447453141212,
-0.026499539613723755,
-0.04625344276428223,
0.018038202077150345,
-0.11862589418888092,
0.026279335841536522,
-0.09233054518699646,
-0.04702727869153023,
-0.1428808867931366,
0.060971274971961975,
0.002284647896885872,
0.024469036608934402,
-0.08106260001659393,
0.10163973271846771,
-0.018031824380159378,
-0.025688685476779938,
-0.028556331992149353,
-0.05007725581526756,
0.061147723346948624,
-0.16010132431983948,
-0.14201317727565765,
0.04986109957098961,
-0.056175317615270615,
-0.0619489923119545,
-0.0015804094728082418,
0.031432949006557465,
-0.006293407641351223,
-0.03880278766155243,
0.06896448135375977,
0.09251751750707626,
0.0369289256632328,
-0.08212293684482574,
-0.04191308096051216,
-0.01559674832969904,
0.25023025274276733,
0.14175912737846375,
0.09975048899650574,
0.0038632650393992662,
0.026590444147586823,
0.05417725071310997,
-0.09887339919805527,
0.022393325343728065,
0.11100038886070251,
0.06312179565429688,
0.05865619704127312,
0.14762206375598907,
-0.11801303923130035,
0.10646675527095795,
0.08663572371006012,
0.10489358752965927,
-0.10056017339229584,
0.1128317341208458,
-0.04591622203588486,
0.06904958933591843,
-0.05433852970600128,
-0.002181360265240073,
-0.005937204230576754,
-0.11519558727741241,
-0.0826307162642479,
-0.13719947636127472,
0.1792774647474289,
-0.014626327902078629,
0.08308042585849762,
-0.12825798988342285,
0.12948818504810333,
-0.023082876577973366,
0.08763179928064346,
-0.027342870831489563,
0.07276437431573868,
0.17719335854053497,
0.13330917060375214,
0.0008364765672013164,
0.07962857931852341,
0.040860965847969055,
-0.07011669874191284,
-0.06163860112428665,
0.01996510848402977,
0.1309429556131363,
-0.290164053440094,
0.07439007610082626,
-0.0904587060213089,
0.005530640482902527,
-0.014871588908135891,
0.06724804639816284,
-0.24908320605754852,
0.012292354367673397,
0.185188427567482,
-0.04376772791147232,
0.03824083134531975,
0.08420754224061966,
0.2851070463657379,
0.20737534761428833,
-0.06969698518514633,
-0.022803544998168945,
0.008413853123784065,
-0.15549416840076447,
0.17007258534431458,
-0.10137251019477844,
0.007981857284903526,
-0.15188109874725342,
-0.10098733007907867,
0.05291532352566719,
-0.14929194748401642,
-0.0585574135184288,
-0.18552234768867493,
0.15681549906730652,
0.081885427236557,
-0.06438826769590378,
0.0542941577732563,
0.018731122836470604,
0.07359761744737625,
0.009812034666538239,
-0.09553815424442291,
0.1450565606355667,
-0.08842906355857849,
0.058115363121032715,
-0.02298135869204998,
-0.11488008499145508,
0.02452189102768898,
0.10122277587652206,
-0.1378413587808609,
-0.1173473373055458,
-0.12782429158687592,
-0.0743107721209526,
0.03490091860294342,
-0.07545003294944763,
0.1104407086968422,
-0.024370724335312843,
-0.01307565625756979,
0.14147517085075378,
0.0068697999231517315,
-0.007323740050196648,
-0.07396724075078964,
0.11894675344228745,
0.05710725113749504,
0.02991855889558792,
-0.26292121410369873,
-0.01628510095179081,
-0.11547189950942993,
-0.009885606355965137,
-0.0987526997923851,
-0.13910144567489624,
-0.025252636522054672,
0.05990802124142647,
-0.061002012342214584,
0.3080195188522339,
-0.13682909309864044,
0.1509983092546463,
0.15405809879302979,
-0.03637276217341423,
-0.05180584266781807,
0.06961818039417267,
-0.039511606097221375,
0.031164489686489105,
0.11313649266958237,
-0.053758423775434494,
0.11290587484836578,
0.06302262097597122,
0.06149163097143173,
0.15212494134902954,
-0.029711885377764702,
0.1517096608877182,
0.13369037210941315,
-0.14639586210250854,
0.007882515899837017,
-0.12051641941070557,
-0.03350081667304039,
0.13197210431098938,
-0.034437064081430435,
0.0346623994410038,
0.09959752857685089,
0.03286471217870712,
-0.00035466544795781374,
0.2812560796737671,
0.08421346545219421,
-0.05550811439752579,
0.17138217389583588,
0.10176979750394821,
-0.18692295253276825,
0.11376626789569855,
0.25768470764160156,
-0.09019908308982849,
0.13548791408538818,
0.10531600564718246,
-0.09279708564281464,
-0.016208576038479805,
0.2355259358882904,
-0.038891252130270004,
0.009155440144240856,
0.014344991184771061,
0.05911513790488243,
-0.15361447632312775,
0.04006887227296829,
0.10467364639043808,
0.01446742843836546,
0.05082906410098076,
0.11952263861894608,
-0.00020142243010923266,
-0.07135289907455444,
-0.17908723652362823,
-0.038130585104227066,
-0.021775174885988235,
0.044111572206020355,
0.014285287819802761,
0.07044054567813873,
-0.024022553116083145,
-0.26447877287864685,
0.10656868666410446,
0.004341983236372471,
-0.10870324075222015,
0.1697198450565338,
0.07772123068571091,
-0.11911146342754364,
-0.1580091416835785,
0.028554951772093773,
-0.09122888743877411,
-0.026916081085801125,
-0.2514118254184723,
-0.019944671541452408,
0.02715175226330757,
-0.010166894644498825,
0.08469445258378983,
-0.09202053397893906,
0.07128404825925827,
0.11277340352535248,
-0.0318608395755291,
-0.02567240409553051,
-0.05275193601846695,
0.06818928569555283,
-0.044377315789461136,
-0.10301697254180908,
0.020491354167461395,
0.12474486976861954,
0.03792692720890045,
-0.17422495782375336,
-0.1639588475227356,
0.04178674519062042,
-0.06088778376579285,
0.10297289490699768,
0.10214623808860779,
-0.03299923241138458,
0.14552997052669525,
-0.047212518751621246,
-0.0736558586359024,
0.21148455142974854,
0.05811426416039467,
-0.04157833755016327,
0.1471056342124939,
-0.1291719526052475,
0.11418008804321289,
0.04001079127192497,
0.108869269490242,
-0.20037180185317993,
-0.12164760380983353,
-0.1406993567943573,
-0.20572282373905182,
-0.10684774070978165,
0.002480142517015338,
-0.05042281746864319,
-0.06723341345787048,
0.13720814883708954,
-0.0488518662750721,
-0.14370150864124298,
-0.2596561014652252,
0.21987006068229675,
-0.09546113759279251,
-0.04757067188620567,
0.01282768975943327,
-0.012986063957214355,
0.03354789689183235,
0.07537933439016342,
-0.09489116072654724,
-0.15843568742275238,
-0.022516576573252678,
-0.043626029044389725,
-0.057939425110816956,
-0.06038430705666542,
0.04377954825758934,
-0.17688770592212677,
-0.10006695240736008,
-0.06353718042373657,
-0.13020679354667664,
0.0075868722051382065,
0.13550898432731628,
0.0462653674185276,
0.12748390436172485,
0.1000082865357399,
0.04568822309374809,
0.09449818730354309,
-0.04519643634557724,
0.011869971640408039,
0.24980585277080536,
0.030399739742279053,
0.012974578887224197,
-0.022255441173911095,
-0.0672014132142067,
0.07117646187543869,
-0.05868341773748398,
-0.0586293563246727,
-0.0588931143283844,
0.09230723977088928,
0.17401918768882751,
-0.14283780753612518,
0.06760949641466141,
0.028904832899570465,
-0.03876113146543503,
-0.03051084652543068,
-0.20156477391719818,
-0.0007901202770881355,
0.0451933816075325,
0.21158312261104584,
0.035626593977212906,
0.02112545818090439,
-0.047030046582221985,
0.08405834436416626,
0.19548669457435608,
0.14438095688819885,
0.017375363036990166,
0.06488201022148132,
-0.31112468242645264,
0.10818202048540115,
-0.0523795485496521,
0.342755526304245,
-0.11906511336565018,
0.19038091599941254,
0.0004593126359395683,
0.03751692175865173,
0.15284614264965057,
-0.04366077110171318,
0.031046142801642418,
-0.0031169212888926268,
0.01201473269611597,
-0.1028653085231781,
-0.017691124230623245,
0.11250238865613937,
-0.03402587026357651,
0.04891640692949295,
-0.09392502158880234,
-0.21756194531917572,
0.18314602971076965,
0.09592905640602112,
-0.006632605567574501,
0.059081435203552246,
0.004705061204731464,
-0.005870887544006109,
-0.25835368037223816,
-0.17979128658771515,
-0.11599831283092499,
0.024893319234251976,
0.10262604057788849,
0.041302021592855453,
-0.027603451162576675,
0.14287510514259338,
0.00808845553547144,
0.03365727886557579,
-0.11128532886505127,
0.02976246364414692,
0.011395029723644257,
0.059898365288972855,
0.051049090921878815,
0.07303612679243088,
0.05565324425697327,
0.3644414246082306,
0.12238601595163345,
-0.26821303367614746,
0.039860956370830536,
0.015068124048411846,
-0.015753645449876785,
0.05851349979639053,
-0.13876035809516907,
0.0415358729660511,
0.06947728991508484,
-0.1808501034975052,
-0.07737299799919128,
0.023712147027254105,
0.09931769967079163,
0.020080292597413063,
0.0013245141599327326,
-0.09259217977523804,
-0.13544094562530518,
0.12367508560419083,
0.03639668971300125,
0.060472436249256134,
-0.12262094765901566,
0.0803840160369873,
0.002060954226180911,
-0.3137460947036743,
-0.0924309641122818,
0.00004692697984864935,
-0.06118731573224068,
-0.01772608421742916,
0.15369433164596558,
0.26744166016578674,
-0.23224255442619324,
0.023168370127677917,
0.13447293639183044,
-0.07092032581567764,
0.11125626415014267,
-0.14016203582286835,
0.05780952051281929,
-0.018467208370566368,
-0.00030439364491030574,
0.00986004713922739,
-0.04351658374071121,
0.018620166927576065,
0.040196944028139114,
0.17688915133476257,
-0.2104918360710144,
-0.08373316377401352,
-0.0937676727771759,
-0.14137347042560577,
-0.032224878668785095,
0.04549582675099373,
0.011836872436106205,
-0.19968976080417633,
-0.004002036061137915,
0.11597560346126556,
-0.14226670563220978,
0.12540864944458008,
-0.09114951640367508,
-0.05950941890478134,
-0.08456706255674362,
0.009805794805288315,
0.08970978856086731,
-0.07569486647844315,
0.06674151867628098,
-0.0029471605084836483,
-0.05682411044836044,
0.14684699475765228,
-0.1446058750152588,
0.0645337924361229,
-0.08492444455623627,
-0.02320457063615322,
-0.07152324169874191,
0.04547840729355812,
-0.015218467451632023,
0.19178757071495056,
-0.007808577734977007,
-0.08385751396417618,
0.018705658614635468,
-0.002870820229873061,
0.04629642888903618,
-0.024099353700876236,
0.07322527468204498,
-0.012741039507091045,
-0.1156664490699768,
0.03400291129946709,
-0.055546898394823074,
0.07748451828956604,
-0.2020375281572342,
-0.040901269763708115,
0.13696710765361786,
0.024794388562440872,
-0.012651331722736359,
0.25261905789375305,
-0.11716120690107346,
0.1310320496559143,
0.0904841423034668,
0.20434258878231049,
-0.041030868887901306,
-0.03786603361368179,
-0.020907029509544373,
-0.13773781061172485,
0.09671281278133392,
0.02277952991425991,
0.09882289916276932,
-0.0106934430077672,
-0.20401380956172943,
-0.21442872285842896,
-0.1264922171831131,
0.09581596404314041,
0.1631872057914734,
-0.011522737331688404,
-0.0592702180147171,
-0.179506316781044,
-0.04178404435515404,
0.04620965197682381,
0.1122000515460968,
0.10470075905323029,
0.07535570859909058,
-0.07113812863826752,
-2.4972622228099095e-32,
-0.11148948222398758,
0.014797831885516644,
-0.019045261666178703,
-0.04564376920461655,
-0.2502971291542053,
0.02486565336585045,
-0.14042256772518158,
-0.11267537623643875,
-0.015451302751898766,
-0.15421774983406067,
-0.08796759694814682,
0.014294738881289959,
0.028909146785736084,
0.07197470217943192,
-0.23415561020374298,
-0.19240137934684753,
-0.09628719836473465,
-0.21366752684116364,
-0.00012648970005102456,
0.00941905565559864,
0.06308608502149582,
-0.1490626335144043,
-0.22573232650756836,
-0.022724196314811707,
-0.04062279686331749,
0.019162891432642937,
-0.09586389362812042,
-0.15908019244670868,
0.05728789046406746,
-0.030716625973582268,
-0.08368692547082901,
0.09774673730134964,
-0.05683615431189537,
-0.09030428528785706,
-0.19768115878105164,
-0.031413182616233826,
-0.18415521085262299,
0.044681698083877563,
-0.009881916455924511,
0.05961531773209572,
0.07936099916696548,
0.1154509112238884,
-0.0320739820599556,
0.005424436181783676,
0.14315958321094513,
0.09943991154432297,
-0.08043479919433594,
0.004608639981597662,
-0.005594462621957064,
-0.06312175840139389,
0.0275388415902853,
0.1779070496559143,
-0.10150828957557678,
0.03451833873987198,
0.19850412011146545,
0.0775531604886055,
-0.025324849411845207,
0.053798701614141464,
0.10584408044815063,
0.10186370462179184,
0.02589290216565132,
-0.26110392808914185,
0.0669231191277504,
-0.07346130907535553,
-0.048334941267967224,
-0.09409254789352417,
0.2735474109649658,
-0.054448701441287994,
0.12155772000551224,
0.0688232034444809,
0.09912274032831192,
0.08644799888134003,
-0.02934415638446808,
-0.04163721203804016,
-0.07730692625045776,
-0.1269529163837433,
-0.02875017561018467,
-0.11418496817350388,
-0.10728015750646591,
-0.1673624962568283,
0.02892659232020378,
-0.13243484497070312,
0.13764767348766327,
-0.048418790102005005,
-0.19498108327388763,
0.008437328040599823,
0.029459897428750992,
0.07993748039007187,
-0.08116661757230759,
-0.06563229113817215,
0.10564538836479187,
-0.06539297103881836,
-0.09498820453882217,
-0.12130852043628693,
-0.1478513777256012,
-0.08255007863044739,
-0.10696277767419815,
0.21415631473064423,
0.010978414677083492,
0.0780433863401413,
-0.06515668332576752,
-0.09027254581451416,
0.07060066610574722,
0.04282502457499504,
0.02867172285914421,
0.11491551250219345,
0.12173497676849365,
0.037795308977365494,
-0.08767525851726532,
0.005237985402345657,
0.020315872505307198,
-0.00829915702342987,
0.2007037252187729,
-0.05738435685634613,
0.15864717960357666,
0.009001551195979118,
-0.06021655723452568,
0.002714198548346758,
-0.005839721765369177,
0.16947932541370392,
-0.10588681697845459,
-0.08863797038793564,
-0.23169256746768951,
0.1834012120962143,
0.017829008400440216,
-0.009185758419334888,
-0.07109559327363968,
0.005777875892817974,
0.03674578666687012,
-0.018935704603791237,
0.03136010468006134,
-0.22967839241027832,
7.243584150273819e-7,
-0.2597498893737793,
0.13374553620815277,
-0.06386803835630417,
-0.03902991861104965,
-0.0529908649623394,
-0.018575921654701233,
-0.1747259795665741,
0.1783241629600525,
-0.12508051097393036,
0.0846409872174263,
0.18010163307189941,
0.05918194353580475,
-0.06444200873374939,
-0.07063023746013641,
0.046105995774269104,
-0.0178743414580822,
-0.053482700139284134,
0.11796347051858902,
-0.0017217285931110382,
0.052112139761447906,
-0.1434021145105362,
0.06297285109758377,
0.08273175358772278,
0.020118853077292442,
0.17192891240119934,
0.08768774569034576,
0.08272181451320648,
0.02286161296069622,
-0.10231228917837143,
-0.11292009055614471,
-0.05041027069091797,
0.09702541679143906,
-0.019686901941895485,
0.22637668251991272,
-0.021992715075612068,
-0.07021133601665497,
-0.0660565122961998,
-0.08879635483026505,
0.19930262863636017,
-0.1158958300948143,
-0.030014075338840485,
0.003906206926330924,
0.13308647274971008,
0.06285299360752106,
0.058876074850559235,
0.16294880211353302,
-0.16925323009490967,
-0.026978621259331703,
-0.06279835104942322,
-0.06382284313440323,
0.138047993183136,
0.15370503067970276,
-0.08223965764045715,
0.07170959562063217,
-0.10033945739269257,
-0.04041242599487305,
-0.023884743452072144,
-0.04495389387011528,
0.22728155553340912,
-0.06347042322158813,
0.04393119364976883,
-0.0579611100256443,
-0.11635977774858475,
0.10067194700241089,
0.13653920590877533,
0.08319466561079025,
0.04724603891372681,
6.305530777028258e-35,
-0.019212573766708374,
-0.07937372475862503,
-0.04623355716466904,
-0.25244224071502686,
0.039977289736270905,
-0.18303389847278595,
0.20930571854114532,
0.05188396945595741,
0.10615924745798111,
0.06723576039075851,
0.03755496069788933
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | > Is there a way to disable ssl verification when streaming a dataset.
I don't think so.
We use `fsspec` HTTPFileSystem implementation that is based on `aiohttp`. If you register a subclass of HTTPFileSystem that has SSL disabled by default it could work, but I wouldn't recommended it because it can raise security issues. | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 54 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
> Is there a way to disable ssl verification when streaming a dataset.
I don't think so.
We use `fsspec` HTTPFileSystem implementation that is based on `aiohttp`. If you register a subclass of HTTPFileSystem that has SSL disabled by default it could work, but I wouldn't recommended it because it can raise security issues. | [
-0.026718836277723312,
0.1645347625017166,
0.005601507145911455,
-0.04431288316845894,
0.2661031484603882,
0.15533006191253662,
0.13097162544727325,
-0.029917240142822266,
0.031949300318956375,
0.10451938211917877,
0.03430028259754181,
-0.06797470152378082,
0.0919908955693245,
0.16478173434734344,
0.059024326503276825,
-0.016664795577526093,
0.0025290953926742077,
0.015101264230906963,
-0.024824848398566246,
-0.0284577626734972,
-0.03695537894964218,
0.08907177299261093,
0.08019650727510452,
-0.20774886012077332,
0.07945030182600021,
-0.07153444737195969,
-0.03637665882706642,
0.0806153416633606,
-0.06725016236305237,
-0.04344864562153816,
0.14742961525917053,
0.010700452141463757,
0.06936506181955338,
0.28627872467041016,
0.000005967362085357308,
0.13180886209011078,
0.14165212213993073,
0.01656435988843441,
-0.0829000398516655,
0.019946381449699402,
0.042119741439819336,
-0.13879811763763428,
-0.06398490071296692,
0.01198235247284174,
0.02934368886053562,
-0.038699787110090256,
0.11027710139751434,
-0.16247932612895966,
0.020206455141305923,
0.045275285840034485,
-0.06151490658521652,
0.12657994031906128,
-0.05529874935746193,
-0.012575021013617516,
-0.029487047344446182,
0.05158273130655289,
-0.08323168754577637,
0.00732980202883482,
-0.1769883930683136,
-0.02375761605799198,
-0.016127565875649452,
-0.02170407772064209,
-0.021548474207520485,
0.054644182324409485,
-0.08705711364746094,
-0.022939518094062805,
-0.09765316545963287,
-0.18520189821720123,
-0.00240323506295681,
0.27624282240867615,
0.06610385328531265,
-0.04845477268099785,
-0.17189361155033112,
0.004040972795337439,
0.0018099223962053657,
0.0033869489561766386,
-0.03344874456524849,
0.0040014819242060184,
-0.0903584435582161,
0.01677665114402771,
-0.06536764651536942,
-0.0411614254117012,
-0.18314409255981445,
0.07111334800720215,
-0.02319352701306343,
0.02812272682785988,
-0.05575215071439743,
0.0716618075966835,
0.0002986813778989017,
-0.004407639615237713,
-0.05275145545601845,
-0.03345225378870964,
0.06065633147954941,
-0.14576177299022675,
-0.16017015278339386,
0.04164007678627968,
-0.0579131618142128,
-0.03440980985760689,
0.008677172474563122,
0.024165170267224312,
0.016838770359754562,
-0.02662595734000206,
0.06141163781285286,
0.07748942077159882,
0.030513308942317963,
-0.04527070373296738,
-0.03420193865895271,
-0.05401714891195297,
0.2726336717605591,
0.15288908779621124,
0.060351137071847916,
0.011781150475144386,
0.059079356491565704,
0.06014299392700195,
-0.10308113694190979,
0.010846514254808426,
0.12878009676933289,
0.0593392476439476,
0.053457748144865036,
0.10406357795000076,
-0.11191965639591217,
0.10397829115390778,
0.04722200334072113,
0.09081175923347473,
-0.1158558651804924,
0.13001929223537445,
-0.03803054243326187,
0.02898532710969448,
-0.07801061123609543,
-0.021339302882552147,
0.0006469627260230482,
-0.10320896655321121,
-0.08343585580587387,
-0.11952820420265198,
0.1705484688282013,
-0.02107473835349083,
0.07939557731151581,
-0.10987028479576111,
0.12275922298431396,
-0.02431967668235302,
0.07958359271287918,
-0.009883401915431023,
0.08182179927825928,
0.18963809311389923,
0.14190056920051575,
-0.009831727482378483,
0.058076176792383194,
0.01785791665315628,
-0.050454553216695786,
-0.09040611982345581,
0.02680106833577156,
0.10644768178462982,
-0.2974183261394501,
0.0717998743057251,
-0.10929065942764282,
-0.03416847065091133,
-0.054586466401815414,
0.06410256028175354,
-0.27952003479003906,
0.02353202924132347,
0.1697557419538498,
-0.04004193842411041,
0.07416050136089325,
0.09395822882652283,
0.3039330542087555,
0.2165159285068512,
-0.03996258229017258,
-0.022444240748882294,
-0.014416155405342579,
-0.16580797731876373,
0.16363829374313354,
-0.09127423167228699,
0.046956226229667664,
-0.15715788304805756,
-0.12010397762060165,
0.07483034580945969,
-0.10205620527267456,
-0.033521778881549835,
-0.19540946185588837,
0.20003551244735718,
0.08615919947624207,
-0.05875016748905182,
0.056753385812044144,
0.04962971806526184,
0.041067663580179214,
0.010745313949882984,
-0.11294281482696533,
0.1322612762451172,
-0.094956174492836,
0.05032593756914139,
0.0005693366401828825,
-0.13325975835323334,
0.061328012496232986,
0.13879141211509705,
-0.1336720883846283,
-0.09939227998256683,
-0.10195259749889374,
-0.07445456832647324,
0.047182973474264145,
-0.05584859102964401,
0.10021962225437164,
-0.028352273628115654,
-0.0061716316267848015,
0.1272464394569397,
-0.0047297063283622265,
-0.01706019416451454,
-0.12230983376502991,
0.12441971153020859,
0.051323115825653076,
0.03491087257862091,
-0.27003324031829834,
-0.021949896588921547,
-0.10178816318511963,
0.005148541647940874,
-0.10967264324426651,
-0.12550945580005646,
-0.032952528446912766,
0.04365608096122742,
-0.05123191326856613,
0.2942154109477997,
-0.1390227973461151,
0.18460151553153992,
0.13258421421051025,
-0.04622947424650192,
-0.08095605671405792,
0.07144584506750107,
-0.024733634665608406,
0.011388193815946579,
0.1278081238269806,
-0.08679183572530746,
0.13233725726604462,
0.07624249160289764,
0.06357542425394058,
0.13517066836357117,
-0.03153924643993378,
0.14382964372634888,
0.19293633103370667,
-0.10291562229394913,
0.04880838096141815,
-0.13658668100833893,
-0.036263298243284225,
0.11108379065990448,
-0.03153132647275925,
0.060956500470638275,
0.11499011516571045,
0.01328251976519823,
-0.005850558169186115,
0.2564055025577545,
0.08931629359722137,
-0.04357113689184189,
0.1675270050764084,
0.09396127611398697,
-0.16184794902801514,
0.11342426389455795,
0.25088390707969666,
-0.08364905416965485,
0.14163872599601746,
0.12117252498865128,
-0.09503975510597229,
-0.0022522825747728348,
0.23705056309700012,
-0.014917642809450626,
-0.013082250021398067,
0.03873806819319725,
0.09875241667032242,
-0.14365661144256592,
0.023271070793271065,
0.08452524244785309,
0.03338516503572464,
0.0831327959895134,
0.1243865117430687,
0.005563286133110523,
-0.0777699425816536,
-0.1757933497428894,
-0.04569978266954422,
-0.04879460111260414,
0.018111659213900566,
0.020337851718068123,
0.06261806935071945,
-0.012540462426841259,
-0.27145636081695557,
0.12944504618644714,
0.03792711719870567,
-0.09862819314002991,
0.18433424830436707,
0.07692335546016693,
-0.10036427527666092,
-0.16505618393421173,
0.026492228731513023,
-0.04411616548895836,
-0.06349276751279831,
-0.26718011498451233,
-0.004503657575696707,
0.028985580429434776,
-0.004326263442635536,
0.045473311096429825,
-0.11595454066991806,
0.089832603931427,
0.1353236734867096,
-0.037921663373708725,
-0.06693916022777557,
-0.0495019406080246,
0.034728582948446274,
-0.04203624278306961,
-0.09665050357580185,
0.05704059824347496,
0.13703854382038116,
0.022092342376708984,
-0.16433139145374298,
-0.18122228980064392,
0.009446410462260246,
-0.06908577680587769,
0.09616304934024811,
0.09483986347913742,
-0.027866246178746223,
0.16562847793102264,
-0.030207281932234764,
-0.07315877079963684,
0.23148316144943237,
0.03126481920480728,
-0.06870730966329575,
0.13543115556240082,
-0.11061998456716537,
0.12788251042366028,
0.031339723616838455,
0.10733149200677872,
-0.17030633985996246,
-0.09113758057355881,
-0.10415704548358917,
-0.19554896652698517,
-0.0845935270190239,
-0.025925975292921066,
-0.010307453572750092,
-0.0679859071969986,
0.11434860527515411,
-0.04931608587503433,
-0.11908316612243652,
-0.2497212439775467,
0.19730375707149506,
-0.07739856839179993,
-0.059936437755823135,
0.013456464745104313,
0.01857662945985794,
0.0023577199317514896,
0.08512110263109207,
-0.14730039238929749,
-0.18376228213310242,
-0.0655359998345375,
-0.07139506936073303,
-0.07621550559997559,
-0.05498047173023224,
0.03446749970316887,
-0.20029032230377197,
-0.11597667634487152,
-0.02218666486442089,
-0.14441190659999847,
0.011940425261855125,
0.12203078716993332,
0.05577109381556511,
0.12763501703739166,
0.06427884101867676,
0.05764680728316307,
0.07436014711856842,
-0.045597948133945465,
-0.00877215526998043,
0.23980437219142914,
0.050030626356601715,
0.02192891575396061,
-0.024318993091583252,
-0.07646416127681732,
0.08995194733142853,
-0.07787016034126282,
-0.04944365471601486,
-0.0313674695789814,
0.06040797010064125,
0.18480241298675537,
-0.14693260192871094,
0.09905507415533066,
0.026274191215634346,
-0.05011795088648796,
-0.028151560574769974,
-0.18845883011817932,
0.016284404322504997,
0.0008246725192293525,
0.203731968998909,
0.023387674242258072,
0.01493124384433031,
-0.00833746325224638,
0.10896620899438858,
0.1923201084136963,
0.15569370985031128,
0.03305116295814514,
0.04432949796319008,
-0.27498582005500793,
0.108287513256073,
-0.03903792425990105,
0.27624744176864624,
-0.1425788253545761,
0.18640708923339844,
0.03378487005829811,
0.03533559292554855,
0.13051465153694153,
-0.02255292609333992,
0.04334116354584694,
-0.0074359942227602005,
0.017422279343008995,
-0.08550580590963364,
0.017279086634516716,
0.13467708230018616,
-0.052424345165491104,
0.0204156506806612,
-0.0773250162601471,
-0.2296372503042221,
0.11518247425556183,
0.050175171345472336,
-0.024240989238023758,
0.034413307905197144,
0.014508693479001522,
0.04182057082653046,
-0.20727026462554932,
-0.14022196829319,
-0.13347649574279785,
-0.01494584046304226,
0.07238109409809113,
0.046679846942424774,
-0.046220410615205765,
0.10581708699464798,
0.006678857374936342,
0.019741956144571304,
-0.09877992421388626,
0.0305438581854105,
0.04754697531461716,
0.05410439521074295,
0.0441824272274971,
0.07603908330202103,
0.06645151972770691,
0.36349326372146606,
0.11242153495550156,
-0.2598350942134857,
0.02295924909412861,
0.020568694919347763,
-0.044363319873809814,
0.05911717563867569,
-0.1279134899377823,
-0.005359419155865908,
0.05655014142394066,
-0.18087825179100037,
-0.08958248049020767,
0.026216134428977966,
0.11259336024522781,
-0.0029620472341775894,
0.010009109042584896,
-0.0789143294095993,
-0.10890733450651169,
0.11401274800300598,
0.05311433598399162,
0.042975571006536484,
-0.06576245278120041,
0.0459897443652153,
0.007329882122576237,
-0.2669888436794281,
-0.09283668547868729,
0.0011265161447227001,
-0.048609230667352676,
-0.05315662547945976,
0.17367513477802277,
0.2645314931869507,
-0.22942408919334412,
0.0018903773743659258,
0.1309986710548401,
-0.06191292777657509,
0.0835767388343811,
-0.1535056084394455,
0.04615608975291252,
-0.007626030594110489,
0.008365870453417301,
0.005710383411496878,
-0.03720313683152199,
0.019670795649290085,
0.05706716328859329,
0.20995254814624786,
-0.2290199100971222,
-0.06977295875549316,
-0.10730870813131332,
-0.17360882461071014,
-0.05090766400098801,
0.010343576781451702,
-0.0055119688622653484,
-0.2531886100769043,
0.05034123361110687,
0.10169874876737595,
-0.1360352784395218,
0.1215793564915657,
-0.10562554001808167,
-0.07405843585729599,
-0.09367241710424423,
0.04642121121287346,
0.09502603113651276,
-0.047362618148326874,
0.07820836454629898,
-0.02767256274819374,
-0.062668576836586,
0.13444805145263672,
-0.1318894773721695,
0.08980903774499893,
-0.07514090090990067,
-0.02526445873081684,
-0.05447041243314743,
0.07254631817340851,
0.03777983784675598,
0.1910896599292755,
-0.004360077437013388,
-0.1020575612783432,
0.02689961902797222,
-0.008265386335551739,
0.04569268599152565,
-0.03346782550215721,
0.0877760648727417,
-0.01232502143830061,
-0.13115660846233368,
0.03498537093400955,
-0.09071453660726547,
0.07801371067762375,
-0.18210195004940033,
-0.0655549019575119,
0.12962393462657928,
0.028036365285515785,
-0.019992640241980553,
0.257739782333374,
-0.12678535282611847,
0.11840799450874329,
0.07030605524778366,
0.22491444647312164,
-0.05100107565522194,
-0.06504993140697479,
-0.037557851523160934,
-0.1050640344619751,
0.06444164365530014,
0.019520876929163933,
0.11977909505367279,
-0.007930963300168514,
-0.19178523123264313,
-0.21282260119915009,
-0.17665544152259827,
0.09210562705993652,
0.15235893428325653,
0.01471592579036951,
-0.041611798107624054,
-0.19120116531848907,
-0.024661986157298088,
0.04632655158638954,
0.11870609223842621,
0.13617518544197083,
0.0666365921497345,
-0.08231625705957413,
-2.521600833343685e-32,
-0.08454593271017075,
0.04128500446677208,
-0.042129483073949814,
-0.05870886147022247,
-0.23078204691410065,
0.046930454671382904,
-0.12917666137218475,
-0.1095118299126625,
0.002300990978255868,
-0.14098265767097473,
-0.10686888545751572,
0.03468092530965805,
0.03225132077932358,
0.08413545042276382,
-0.26068150997161865,
-0.1919640302658081,
-0.0980871319770813,
-0.20143572986125946,
-0.01689639687538147,
0.0461813248693943,
0.06346787512302399,
-0.1897841840982437,
-0.22581873834133148,
-0.018032601103186607,
-0.010787056758999825,
0.02237841859459877,
-0.06146916747093201,
-0.15515398979187012,
0.05693693459033966,
-0.040691960602998734,
-0.10201863944530487,
0.04972400143742561,
-0.0732860416173935,
-0.05302761122584343,
-0.21744726598262787,
-0.037965014576911926,
-0.17630614340305328,
0.0155040817335248,
-0.02538704127073288,
0.027764203026890755,
0.06035681068897247,
0.12645214796066284,
-0.06094261631369591,
0.010016761720180511,
0.14754605293273926,
0.06919728964567184,
-0.09162942320108414,
0.013844961300492287,
-0.005355555098503828,
-0.057061079889535904,
0.02626827359199524,
0.18153120577335358,
-0.09241630136966705,
0.011661088094115257,
0.2163485586643219,
0.07621755450963974,
-0.0024041826836764812,
-0.014422116801142693,
0.14230872690677643,
0.10589337348937988,
0.03136933222413063,
-0.2506677806377411,
0.03394659608602524,
-0.10413287580013275,
-0.039905063807964325,
-0.09158427268266678,
0.28065112233161926,
-0.04164404422044754,
0.16359691321849823,
0.06792734563350677,
0.09989894926548004,
0.06558099389076233,
-0.02262280136346817,
-0.05419650673866272,
-0.08111211657524109,
-0.11788718402385712,
0.009914932772517204,
-0.13980934023857117,
-0.11626917123794556,
-0.14693427085876465,
0.0052384198643267155,
-0.13963590562343597,
0.1276671290397644,
-0.035021428018808365,
-0.15127092599868774,
0.03534815460443497,
0.045674074441194534,
0.07845966517925262,
-0.08247972279787064,
-0.05652950331568718,
0.09625891596078873,
-0.07696673274040222,
-0.08761138468980789,
-0.11387582123279572,
-0.13339124619960785,
-0.10244573652744293,
-0.06447561830282211,
0.21944653987884521,
0.029418425634503365,
0.09141005575656891,
-0.050163544714450836,
-0.13015349209308624,
0.060864828526973724,
0.049961648881435394,
-0.007029735017567873,
0.1181715726852417,
0.11192630231380463,
0.06834965944290161,
-0.07959281653165817,
-0.0012375310761854053,
0.018200866878032684,
0.012835346162319183,
0.16332723200321198,
-0.06780311465263367,
0.17073453962802887,
-0.012388507835566998,
-0.05296240746974945,
0.01923968642950058,
-0.03793083876371384,
0.15886251628398895,
-0.11351653188467026,
-0.08873924612998962,
-0.19471558928489685,
0.1987006962299347,
0.01946423202753067,
-0.039578866213560104,
-0.07291167229413986,
-0.03585198149085045,
-0.007277434691786766,
-0.059290412813425064,
0.0116340396925807,
-0.21354913711547852,
7.203007044154219e-7,
-0.2601669430732727,
0.14340101182460785,
-0.03748397156596184,
-0.050015341490507126,
-0.03292660415172577,
-0.016983313485980034,
-0.1596766710281372,
0.2289939522743225,
-0.13331671059131622,
0.11900949478149414,
0.1835096776485443,
0.07879044115543365,
-0.06283582001924515,
-0.09141255170106888,
0.06306353211402893,
-0.04413590952754021,
-0.025818146765232086,
0.1380985677242279,
-0.04488880932331085,
0.06546403467655182,
-0.14630530774593353,
0.026711823418736458,
0.07580945640802383,
0.04669385030865669,
0.18388211727142334,
0.09286902099847794,
0.06320109963417053,
0.07027582079172134,
-0.0963480994105339,
-0.13729746639728546,
-0.05592704191803932,
0.12710392475128174,
-0.012429661117494106,
0.2282169908285141,
-0.024006878957152367,
-0.08500745892524719,
-0.04795025289058685,
-0.09508016705513,
0.19033028185367584,
-0.11283788084983826,
-0.022860050201416016,
0.007891854271292686,
0.10950005799531937,
0.049512334167957306,
0.05516325682401657,
0.1394929736852646,
-0.15847553312778473,
-0.03132627159357071,
-0.06802964210510254,
-0.08807948976755142,
0.15822072327136993,
0.15727859735488892,
-0.11069395393133163,
0.09313533455133438,
-0.10066502541303635,
-0.07349664717912674,
-0.02589036151766777,
-0.05517756938934326,
0.2018463909626007,
-0.12212400138378143,
0.07532182335853577,
-0.06934468448162079,
-0.0998387336730957,
0.13923683762550354,
0.13688239455223083,
0.07182855904102325,
0.02010507322847843,
5.247260993220541e-35,
0.006931239273399115,
-0.09163018316030502,
-0.057444650679826736,
-0.25433647632598877,
0.06285936385393143,
-0.18178267776966095,
0.20245671272277832,
0.04062982276082039,
0.12146363407373428,
0.11324607580900192,
0.04150260239839554
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | Okay thanks for your help! I guess I have to figure out how to improve the proxy environment / see if I can make it work with ssl connections. | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 29 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Okay thanks for your help! I guess I have to figure out how to improve the proxy environment / see if I can make it work with ssl connections. | [
0.00990381371229887,
0.12727849185466766,
-0.011301063932478428,
-0.07993073016405106,
0.2757970690727234,
0.11566393822431564,
0.13936254382133484,
-0.028867077082395554,
0.032321855425834656,
0.10705532878637314,
0.0523773618042469,
-0.06778945028781891,
0.06362006068229675,
0.1426113098859787,
0.06262847781181335,
-0.06143452599644661,
0.0011321635683998466,
-0.012912909500300884,
-0.022884787991642952,
-0.04578916355967522,
-0.04671555757522583,
0.08238452672958374,
0.09211007505655289,
-0.20032674074172974,
0.07568655908107758,
-0.07561089098453522,
-0.03985261544585228,
0.08671007305383682,
-0.08543474227190018,
-0.038706377148628235,
0.13776081800460815,
0.053125523030757904,
0.08868374675512314,
0.3309681713581085,
0.000005920097009948222,
0.12479346245527267,
0.15643180906772614,
0.013381712138652802,
-0.08604191988706589,
0.026171885430812836,
0.05293460190296173,
-0.1548982411623001,
-0.050430480390787125,
-0.00659139733761549,
0.03368934616446495,
-0.0449250265955925,
0.11421593278646469,
-0.1814994066953659,
0.05086757615208626,
0.03648354858160019,
-0.048016928136348724,
0.1317760944366455,
-0.06367909908294678,
-0.01827632635831833,
-0.0005133635131642222,
0.04243976250290871,
-0.07607775181531906,
0.04374881833791733,
-0.11311852186918259,
-0.021757232025265694,
0.016289645805954933,
-0.023395761847496033,
-0.024064214900135994,
0.08522423356771469,
-0.09086071699857712,
-0.009673787280917168,
-0.07819771766662598,
-0.18206942081451416,
0.006298209074884653,
0.31333234906196594,
0.06052481010556221,
-0.03023562766611576,
-0.17463499307632446,
0.014675351791083813,
-0.022629698738455772,
-0.004126605577766895,
-0.05955321341753006,
-0.004267629235982895,
-0.10042813420295715,
0.016362342983484268,
-0.07692915946245193,
-0.05591868236660957,
-0.175929456949234,
0.0587783083319664,
-0.011646459810435772,
0.03520707041025162,
-0.0826493352651596,
0.09923459589481354,
-0.02804144285619259,
-0.02158575877547264,
-0.06072600930929184,
-0.04105302691459656,
0.06557530909776688,
-0.15288031101226807,
-0.13986003398895264,
0.05145568400621414,
-0.06689450889825821,
-0.049002788960933685,
0.0006122401682659984,
0.019682392477989197,
0.00661538215354085,
-0.05938921123743057,
0.05257272720336914,
0.1087886393070221,
0.03124925307929516,
-0.051617495715618134,
-0.05599589645862579,
-0.03695831447839737,
0.2620927393436432,
0.14081448316574097,
0.05561874806880951,
-0.007695256732404232,
0.06002100929617882,
0.08207430690526962,
-0.10843763500452042,
0.010379011742770672,
0.12320005893707275,
0.06240884214639664,
0.0690949335694313,
0.12302123010158539,
-0.08046401292085648,
0.10716944187879562,
0.0757223591208458,
0.09884382784366608,
-0.12456879764795303,
0.11606134474277496,
-0.05983881652355194,
0.07603157311677933,
-0.05184708163142204,
0.01660875789821148,
-0.017649797722697258,
-0.11191987991333008,
-0.08063001930713654,
-0.16013668477535248,
0.17763538658618927,
-0.012732462026178837,
0.07741018384695053,
-0.1053551658987999,
0.11530087888240814,
-0.008874507620930672,
0.061101559549570084,
-0.014708253554999828,
0.06377357244491577,
0.16610530018806458,
0.14998391270637512,
-0.0016505034873262048,
0.07448242604732513,
0.014016443863511086,
-0.035181108862161636,
-0.08311139047145844,
0.027621429413557053,
0.10510774701833725,
-0.2912081480026245,
0.06824638694524765,
-0.06775341928005219,
-0.0016914864536374807,
-0.031690921634435654,
0.09271018952131271,
-0.2733398675918579,
0.011094403453171253,
0.17350363731384277,
-0.023785553872585297,
0.05142175778746605,
0.07708315551280975,
0.2818668484687805,
0.23954613506793976,
-0.05157649517059326,
-0.011649946682155132,
0.010271110571920872,
-0.16041840612888336,
0.1786264330148697,
-0.12567102909088135,
0.025691883638501167,
-0.15438143908977509,
-0.08439451456069946,
0.05464889109134674,
-0.12028282135725021,
-0.03140448033809662,
-0.18647338449954987,
0.18147389590740204,
0.05289807543158531,
-0.07823659479618073,
0.07575573772192001,
0.013673757202923298,
0.08038926124572754,
0.013604015111923218,
-0.12214077264070511,
0.14831238985061646,
-0.10424146056175232,
0.06823134422302246,
-0.021389659494161606,
-0.12267787009477615,
0.04727450758218765,
0.10546883940696716,
-0.13078805804252625,
-0.11884897202253342,
-0.12904176115989685,
-0.05541735887527466,
0.040016449987888336,
-0.07310471683740616,
0.12460340559482574,
-0.017965136095881462,
-0.023601330816745758,
0.13803845643997192,
-0.00016588644939474761,
-0.016571657732129097,
-0.12918654084205627,
0.12982596457004547,
0.0638323649764061,
0.009527352638542652,
-0.27518439292907715,
-0.0038829257246106863,
-0.09879560023546219,
-0.001211221911944449,
-0.08371063321828842,
-0.16770146787166595,
-0.01505120936781168,
0.06125936284661293,
-0.04070155695080757,
0.31575000286102295,
-0.1468745321035385,
0.14804169535636902,
0.14983521401882172,
-0.012605988420546055,
-0.041836928576231,
0.10336560755968094,
-0.02854151278734207,
0.0014039622619748116,
0.0998293086886406,
-0.06476493924856186,
0.1089303195476532,
0.05440480634570122,
0.052180834114551544,
0.10652746260166168,
-0.05488923192024231,
0.17394064366817474,
0.1768847107887268,
-0.1417345553636551,
0.02022239938378334,
-0.15347586572170258,
-0.015577776357531548,
0.1281290501356125,
-0.056733086705207825,
0.014474735595285892,
0.10105638951063156,
0.008304460905492306,
-0.03296331688761711,
0.2722867429256439,
0.05647432431578636,
-0.06808385252952576,
0.16378305852413177,
0.10417615622282028,
-0.15414035320281982,
0.10736409574747086,
0.27025291323661804,
-0.08964164555072784,
0.12694329023361206,
0.1316726952791214,
-0.11416051536798477,
0.0006695970077998936,
0.23212556540966034,
-0.032069697976112366,
-0.004624538589268923,
0.024304939433932304,
0.076078400015831,
-0.1591355949640274,
0.010701182298362255,
0.08063340932130814,
0.010293466039001942,
0.07101966440677643,
0.1321098804473877,
-0.011862747371196747,
-0.06498409807682037,
-0.16331303119659424,
-0.04054849594831467,
-0.05029318481683731,
0.04832732677459717,
0.02170857973396778,
0.04491135850548744,
-0.002924977568909526,
-0.24516817927360535,
0.13099494576454163,
0.02544219419360161,
-0.10963115096092224,
0.17870934307575226,
0.07584195584058762,
-0.12183137983083725,
-0.1779390126466751,
0.04387867823243141,
-0.06377662718296051,
-0.04325348138809204,
-0.26505136489868164,
-0.014559675939381123,
0.02244516834616661,
-0.009556359611451626,
0.08220995962619781,
-0.0845877155661583,
0.08526664227247238,
0.1308455914258957,
-0.025684313848614693,
-0.0625702366232872,
-0.06636904180049896,
0.03978375717997551,
-0.05055396258831024,
-0.12941306829452515,
0.03742026537656784,
0.11717551946640015,
0.04860004782676697,
-0.18387362360954285,
-0.1746131181716919,
0.027401041239500046,
-0.0750814825296402,
0.10347004979848862,
0.11343593895435333,
-0.0276094451546669,
0.13881337642669678,
-0.02616383321583271,
-0.06544690579175949,
0.25441524386405945,
0.024857372045516968,
-0.04794211685657501,
0.13252601027488708,
-0.10151049494743347,
0.1207512840628624,
0.035025108605623245,
0.12263200432062149,
-0.1898159682750702,
-0.12256575375795364,
-0.12182975560426712,
-0.21986383199691772,
-0.1080821081995964,
-0.04126876965165138,
-0.04547508805990219,
-0.08596652746200562,
0.11701029539108276,
-0.036545127630233765,
-0.13196173310279846,
-0.2541298568248749,
0.19661907851696014,
-0.0843518078327179,
-0.06308409571647644,
0.022976497188210487,
-0.007664230186492205,
0.025318380445241928,
0.07981988042593002,
-0.12060398608446121,
-0.18362806737422943,
-0.04397178068757057,
-0.06422396004199982,
-0.04557465389370918,
-0.041728321462869644,
0.031064366921782494,
-0.20279663801193237,
-0.11397097259759903,
-0.04055841639637947,
-0.16227644681930542,
-0.03035464882850647,
0.12788283824920654,
0.037600789219141006,
0.135389506816864,
0.11388052254915237,
0.0563940703868866,
0.06791751086711884,
-0.04782889410853386,
0.03297669440507889,
0.26651129126548767,
0.017416981980204582,
0.027062196284532547,
-0.037077397108078,
-0.10305279493331909,
0.08613809943199158,
-0.04644909128546715,
-0.04713816940784454,
-0.05364293232560158,
0.07996410131454468,
0.17870545387268066,
-0.14037774503231049,
0.04805221036076546,
0.016667097806930542,
-0.041236549615859985,
-0.004943665117025375,
-0.20287171006202698,
0.004550267476588488,
0.03528102859854698,
0.23170313239097595,
0.0356425866484642,
0.005233018659055233,
-0.02371230535209179,
0.08484083414077759,
0.19520185887813568,
0.14376859366893768,
0.05201134830713272,
0.08097130060195923,
-0.3144298493862152,
0.10567318648099899,
-0.07482451945543289,
0.2964162528514862,
-0.11587684601545334,
0.2079944759607315,
0.020203936845064163,
0.043709564954042435,
0.15750066936016083,
-0.01010993029922247,
0.03197856992483139,
0.006959761027246714,
-0.008777872659265995,
-0.12049490213394165,
0.006363650783896446,
0.11825840920209885,
-0.013652035966515541,
0.02307869866490364,
-0.08034272491931915,
-0.21712999045848846,
0.15533344447612762,
0.07772267609834671,
-0.0393221490085125,
0.055456653237342834,
0.006189360748976469,
0.040067408233881,
-0.22641731798648834,
-0.16985616087913513,
-0.10450365394353867,
0.00684251356869936,
0.08492472022771835,
0.029736733064055443,
-0.022503281012177467,
0.10874446481466293,
0.022554144263267517,
0.024558914825320244,
-0.11672277748584747,
0.027745798230171204,
0.0210424792021513,
0.07108131051063538,
0.05365311726927757,
0.11272187530994415,
0.039402179419994354,
0.3592109680175781,
0.08401433378458023,
-0.24535541236400604,
0.022402537986636162,
0.018015731126070023,
-0.020276879891753197,
0.08549489080905914,
-0.13369189202785492,
0.024301758036017418,
0.072280153632164,
-0.16658464074134827,
-0.05833667516708374,
0.04715540632605553,
0.09663175046443939,
0.00890407431870699,
0.017112409695982933,
-0.09441886097192764,
-0.11825831234455109,
0.13668221235275269,
0.031928762793540955,
0.026038378477096558,
-0.10838550329208374,
0.0689653679728508,
-0.0010564272524788976,
-0.2919776439666748,
-0.08716930449008942,
-0.00953519158065319,
-0.0479821041226387,
-0.016681114211678505,
0.14097392559051514,
0.2734965682029724,
-0.21379414200782776,
-0.00033217191230505705,
0.1505325883626938,
-0.06039318069815636,
0.10544033348560333,
-0.15648190677165985,
0.06635433435440063,
-0.006061402149498463,
-0.00992534402757883,
-0.0007626384613104165,
-0.06988158077001572,
0.055189553648233414,
0.045588310807943344,
0.1842220425605774,
-0.2110038548707962,
-0.08159958571195602,
-0.13334938883781433,
-0.14891809225082397,
-0.02421306073665619,
0.027005912736058235,
-0.024188635870814323,
-0.2227923572063446,
0.006929268594831228,
0.10551909357309341,
-0.13298112154006958,
0.12261038273572922,
-0.09625234454870224,
-0.08189686387777328,
-0.11461953818798065,
0.012801076285541058,
0.07993382960557938,
-0.0376107394695282,
0.08331267535686493,
-0.018964452669024467,
-0.05184722691774368,
0.14427582919597626,
-0.13595488667488098,
0.06739064306020737,
-0.07985083758831024,
-0.039984844624996185,
-0.06222802400588989,
0.04783528298139572,
0.022294893860816956,
0.20535807311534882,
-0.03189506754279137,
-0.08833931386470795,
0.011819849722087383,
0.0005605773767456412,
0.04494909569621086,
-0.05530858412384987,
0.09347164630889893,
-0.026128722354769707,
-0.1211666613817215,
0.025132397189736366,
-0.0780993402004242,
0.07658839225769043,
-0.21041519939899445,
-0.05473913624882698,
0.12419252097606659,
0.026002807542681694,
-0.026425588876008987,
0.25642532110214233,
-0.1294805258512497,
0.1268838793039322,
0.06961515545845032,
0.22973911464214325,
-0.04425438866019249,
-0.02682304009795189,
-0.034175824373960495,
-0.09834281355142593,
0.08626639097929001,
0.04657971113920212,
0.09062512218952179,
-0.016800425946712494,
-0.18022595345973969,
-0.21474578976631165,
-0.14095163345336914,
0.08029840886592865,
0.1534366011619568,
-0.00162837328389287,
-0.07193274050951004,
-0.1799284964799881,
-0.008265633136034012,
0.04429979249835014,
0.14387622475624084,
0.11943471431732178,
0.0627862736582756,
-0.09077214449644089,
-2.494178607254115e-32,
-0.11873248964548111,
0.02269136533141136,
-0.035294923931360245,
-0.05594177916646004,
-0.25613686442375183,
0.04179687798023224,
-0.12364892661571503,
-0.10438994318246841,
-0.02589593268930912,
-0.16698957979679108,
-0.0967804491519928,
0.028168151155114174,
0.028130505234003067,
0.08206765353679657,
-0.23580960929393768,
-0.20138809084892273,
-0.12461322546005249,
-0.20408941805362701,
0.007763632573187351,
0.03351385518908501,
0.065047986805439,
-0.1507306545972824,
-0.21908925473690033,
-0.01658535562455654,
-0.013616437092423439,
0.023875173181295395,
-0.08489559590816498,
-0.15958654880523682,
0.11050290614366531,
-0.04442207142710686,
-0.1007576659321785,
0.08542938530445099,
-0.07699154317378998,
-0.06651411950588226,
-0.2227260023355484,
-0.05212268978357315,
-0.16885969042778015,
0.03253559395670891,
-0.023142190650105476,
0.03671892359852791,
0.08939596265554428,
0.14235125482082367,
-0.05979389324784279,
0.020810838788747787,
0.18601234257221222,
0.09742607921361923,
-0.07506129145622253,
0.012186670675873756,
0.0017625595210120082,
-0.02561134099960327,
0.04483485221862793,
0.18098673224449158,
-0.11175116151571274,
0.037130240350961685,
0.2153737097978592,
0.05085146799683571,
-0.002616650192067027,
0.05682734027504921,
0.11803597211837769,
0.09715631604194641,
0.03974389284849167,
-0.23733079433441162,
0.0487799197435379,
-0.08146059513092041,
-0.010509241372346878,
-0.09257432818412781,
0.29047176241874695,
-0.009879296645522118,
0.1482391655445099,
0.07076733559370041,
0.11237835139036179,
0.08912156522274017,
-0.006439938209950924,
-0.042969126254320145,
-0.07679876685142517,
-0.10938716679811478,
-0.015535054728388786,
-0.13499417901039124,
-0.10214588046073914,
-0.16742640733718872,
0.027353020384907722,
-0.11737412959337234,
0.15816979110240936,
-0.051032502204179764,
-0.17347146570682526,
0.01596059463918209,
0.027615610510110855,
0.07235202938318253,
-0.09292750060558319,
-0.06878096610307693,
0.09412999451160431,
-0.1016840934753418,
-0.0877142995595932,
-0.10206335037946701,
-0.15953277051448822,
-0.090692438185215,
-0.09212210774421692,
0.2313859462738037,
0.012240090407431126,
0.08198656886816025,
-0.05576275661587715,
-0.10725457221269608,
0.057296887040138245,
0.05331681668758392,
0.013948068954050541,
0.12166912108659744,
0.12410789728164673,
0.025892851874232292,
-0.07839131355285645,
-0.0005926591111347079,
0.013055535033345222,
-0.005517125595360994,
0.18027353286743164,
-0.050894662737846375,
0.1413634717464447,
-0.006473181303590536,
-0.07052531838417053,
-0.0009082155302166939,
-0.001778620295226574,
0.18053828179836273,
-0.10673806816339493,
-0.09916512668132782,
-0.21790282428264618,
0.18950337171554565,
0.014477083459496498,
-0.021275393664836884,
-0.09153246134519577,
-0.013907396234571934,
0.01939440704882145,
-0.036399997770786285,
0.017045870423316956,
-0.21060368418693542,
7.183129469012783e-7,
-0.23961183428764343,
0.1381627470254898,
-0.04135464131832123,
-0.04926203936338425,
-0.05904140695929527,
-0.012605315074324608,
-0.15206974744796753,
0.185140922665596,
-0.09409913420677185,
0.08358534425497055,
0.18645817041397095,
0.08210883289575577,
-0.08173739910125732,
-0.08715164661407471,
0.06799919903278351,
-0.03334281966090202,
-0.039762042462825775,
0.11372346431016922,
-0.02886473760008812,
0.0906081348657608,
-0.15888765454292297,
0.057265836745500565,
0.08786831796169281,
0.06857092678546906,
0.15910908579826355,
0.09106443077325821,
0.07302093505859375,
0.02236260287463665,
-0.09146533906459808,
-0.1345360279083252,
-0.051862116903066635,
0.11916671693325043,
-0.014764255844056606,
0.20968939363956451,
-0.008818553760647774,
-0.060106586664915085,
-0.07383621484041214,
-0.10146035254001617,
0.1727539300918579,
-0.1360260248184204,
-0.019625768065452576,
0.002676868811249733,
0.11209910362958908,
0.040945347398519516,
0.05947220325469971,
0.11623554676771164,
-0.17011010646820068,
-0.025800740346312523,
-0.061330534517765045,
-0.08963143825531006,
0.15931494534015656,
0.13783976435661316,
-0.07376634329557419,
0.09038382768630981,
-0.08946220576763153,
-0.05275389924645424,
-0.011734286323189735,
-0.05500640720129013,
0.1983880251646042,
-0.06263373792171478,
0.04572746530175209,
-0.0760461762547493,
-0.1418566107749939,
0.14557012915611267,
0.12565772235393524,
0.09232296049594879,
0.05094140022993088,
7.257218005910564e-35,
-0.028265085071325302,
-0.0765158012509346,
-0.06060200557112694,
-0.25393417477607727,
0.027329223230481148,
-0.1714966595172882,
0.18047961592674255,
0.04487832635641098,
0.12347768247127533,
0.06235428526997566,
0.03796006739139557
] |
https://github.com/huggingface/datasets/issues/5971 | Docs: make "repository structure" easier to find | Loading a local dataset also works the same way when `data_files` are not specified, so I agree we should make this info easier to discover
cc @stevhliu | The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages. | 27 | Docs: make "repository structure" easier to find
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
Loading a local dataset also works the same way when `data_files` are not specified, so I agree we should make this info easier to discover
cc @stevhliu | [
0.0006885458715260029,
0.06799313426017761,
-0.06827671080827713,
0.12694908678531647,
0.14563396573066711,
0.04011983051896095,
0.09875091910362244,
0.05494726076722145,
0.027699796482920647,
0.20181536674499512,
-0.03487977385520935,
0.0323641374707222,
-0.020847909152507782,
0.07254351675510406,
0.170050710439682,
-0.13876816630363464,
-0.05579078570008278,
-0.0425107479095459,
-0.07680550962686539,
0.05356457084417343,
0.06572983413934708,
0.06533066928386688,
0.14849379658699036,
-0.09519939869642258,
0.015165137127041817,
-0.016745006665587425,
-0.07357878983020782,
0.14902669191360474,
-0.07598796486854553,
-0.2845969498157501,
0.07738938182592392,
0.15990614891052246,
0.04388752952218056,
0.13488247990608215,
0.000006287345058808569,
0.11296149343252182,
-0.07815906405448914,
0.0928027406334877,
-0.16331367194652557,
0.0254710353910923,
0.01197777222841978,
-0.1070723831653595,
0.1281210333108902,
-0.011515446938574314,
-0.017480000853538513,
0.0025280402041971684,
0.07285504043102264,
0.08755182474851608,
-0.09561342746019363,
-0.012197951786220074,
0.06369378417730331,
0.08363338559865952,
-0.10034627467393875,
-0.1542903035879135,
0.25125551223754883,
0.17269590497016907,
-0.2174432873725891,
0.20198608934879303,
0.010080007836222649,
0.09392077475786209,
-0.06689349561929703,
0.12494093179702759,
0.06301499158143997,
0.03745395690202713,
0.24790021777153015,
0.1259969174861908,
-0.16185779869556427,
-0.1351640820503235,
0.02104133553802967,
0.1545720249414444,
0.21098919212818146,
-0.04407219588756561,
-0.019242582842707634,
-0.037570565938949585,
0.028209742158651352,
0.046491220593452454,
-0.13557374477386475,
-0.09897352010011673,
-0.043024636805057526,
0.037237148731946945,
-0.15964575111865997,
-0.16378630697727203,
0.10129242390394211,
-0.05331879109144211,
-0.029129263013601303,
0.09850028157234192,
-0.08244717121124268,
0.023691276088356972,
0.0623922236263752,
-0.1561334878206253,
0.07026540488004684,
-0.028454098850488663,
-0.07643231749534607,
0.050854671746492386,
0.21528491377830505,
0.008897829800844193,
0.03481953963637352,
0.032913628965616226,
0.12859582901000977,
0.05625879019498825,
0.09560961276292801,
0.07744971662759781,
-0.17606121301651,
0.05017886683344841,
-0.05414414778351784,
0.03559499606490135,
0.056158553808927536,
-0.15171746909618378,
0.10021692514419556,
0.2060643434524536,
0.17162945866584778,
0.044282615184783936,
-0.038708314299583435,
-0.21677197515964508,
-0.14611472189426422,
-0.07063844054937363,
0.12106789648532867,
0.11159291863441467,
0.038251280784606934,
-0.07398616522550583,
0.21312955021858215,
0.05779707431793213,
-0.08623439818620682,
0.09512629359960556,
0.015582109801471233,
-0.023685378953814507,
0.008763241581618786,
-0.09845346212387085,
0.010524063371121883,
-0.08709608763456345,
-0.1509021371603012,
0.0019724718295037746,
0.03552292287349701,
0.03729139640927315,
0.03038661740720272,
-0.18256725370883942,
0.08866089582443237,
-0.20556007325649261,
0.17777127027511597,
0.0035797010641545057,
-0.04367484524846077,
0.19497880339622498,
-0.0666060671210289,
-0.06768550723791122,
-0.005984161980450153,
-0.10244225710630417,
0.13101118803024292,
0.0890834778547287,
-0.08355026692152023,
0.011649791151285172,
0.0036198031157255173,
0.1312996745109558,
-0.2971043586730957,
0.047425054013729095,
0.06082205846905708,
0.03241076320409775,
-0.13797177374362946,
0.02651282399892807,
-0.25073835253715515,
-0.005961085204035044,
0.16242365539073944,
0.00038284575566649437,
0.026756852865219116,
-0.04564728960394859,
0.11227713525295258,
0.23222792148590088,
0.11008810997009277,
-0.05694913864135742,
-0.046021461486816406,
-0.21187493205070496,
-0.10691247880458832,
-0.03399674594402313,
-0.02742387354373932,
0.05204331874847412,
-0.1300581842660904,
0.22026246786117554,
0.15249231457710266,
-0.06983213871717453,
-0.0723404586315155,
0.14999815821647644,
0.0002104211744153872,
-0.0049584247171878815,
-0.06357607245445251,
-0.07865798473358154,
-0.024850625544786453,
0.05418272688984871,
-0.27806368470191956,
0.0221968125551939,
-0.04173764958977699,
0.10140717774629593,
-0.13998177647590637,
-0.01895013637840748,
-0.0709574744105339,
0.07407126575708389,
-0.17237453162670135,
0.06427082419395447,
0.07387310266494751,
-0.10598710179328918,
0.14693081378936768,
-0.1150190606713295,
-0.04409920051693916,
0.10396818071603775,
0.09119720757007599,
0.12436031550168991,
-0.054519154131412506,
-0.052113909274339676,
-0.22782696783542633,
0.03485351800918579,
0.08079070597887039,
0.11314252763986588,
-0.15432631969451904,
-0.04189438000321388,
-0.015953507274389267,
-0.06867040693759918,
-0.16987855732440948,
-0.1381341814994812,
-0.021247895434498787,
-0.044152021408081055,
-0.03751992806792259,
0.014308295212686062,
0.020992888137698174,
-0.03401999548077583,
0.02601456642150879,
0.12998077273368835,
-0.11369271576404572,
-0.022571798413991928,
0.10516493767499924,
-0.00534578412771225,
0.14340370893478394,
0.03108404204249382,
-0.04384424909949303,
-0.07359636574983597,
0.08140385895967484,
0.15605393052101135,
-0.11021578311920166,
0.06124351918697357,
0.11616512387990952,
0.049563873559236526,
0.13071738183498383,
-0.0005745148519054055,
0.012669878080487251,
-0.1987360417842865,
-0.17018118500709534,
0.11802126467227936,
-0.13539239764213562,
-0.1430191695690155,
-0.06690817326307297,
0.12031368166208267,
-0.053788501769304276,
0.06290234625339508,
0.08003777265548706,
0.10944881290197372,
-0.16181154549121857,
-0.04186638817191124,
-0.014360014349222183,
-0.014748533256351948,
0.0821453183889389,
0.02780032716691494,
-0.11488527804613113,
0.1311243325471878,
0.09126993268728256,
-0.12173844128847122,
-0.2320234328508377,
0.0752686932682991,
0.11742837727069855,
-0.03853374719619751,
0.12713174521923065,
0.025257479399442673,
-0.04450598731637001,
0.1615109145641327,
0.06626274436712265,
0.019998235628008842,
-0.027685949578881264,
-0.12118803709745407,
-0.02995075285434723,
-0.1528625190258026,
0.05214732885360718,
0.024920687079429626,
-0.10489961504936218,
0.07576663047075272,
-0.19058087468147278,
-0.05931726098060608,
-0.1301279515028,
-0.04592004418373108,
0.08970951288938522,
-0.12601467967033386,
-0.06893060356378555,
-0.1255921870470047,
-0.0014450877206400037,
0.023914972320199013,
-0.05393438786268234,
-0.09360591322183609,
0.057137127965688705,
-0.09617382287979126,
-0.054187025874853134,
0.006328933406621218,
0.12998966872692108,
0.13312500715255737,
-0.17800813913345337,
0.08803015202283859,
0.0074146767146885395,
0.08493120968341827,
0.04830261319875717,
-0.002887520007789135,
-0.030905261635780334,
0.005667591001838446,
0.04842395335435867,
-0.13530220091342926,
-0.06850490719079971,
-0.2426336109638214,
-0.035269998013973236,
0.10104618966579437,
0.06533410400152206,
-0.01496127713471651,
0.03942301869392395,
-0.022234829142689705,
-0.15374630689620972,
-0.1168806254863739,
0.120892733335495,
0.15668348968029022,
-0.03294510766863823,
-0.13850714266300201,
0.055416230112314224,
-0.12127454578876495,
-0.0065963491797447205,
0.00416489178314805,
-0.11822518706321716,
-0.1221601739525795,
0.041464123874902725,
-0.13921497762203217,
-0.002291751326993108,
0.09059467166662216,
0.06856021285057068,
-0.01849949359893799,
-0.04259258881211281,
-0.00680740550160408,
0.008050420321524143,
-0.14508099853992462,
0.12901845574378967,
-0.06933538615703583,
-0.03004051372408867,
0.012522957287728786,
0.03818482160568237,
0.109079509973526,
-0.028972124680876732,
-0.04926753044128418,
-0.02140011265873909,
-0.07694520801305771,
0.08214927464723587,
0.02828609198331833,
0.25958821177482605,
0.08153749257326126,
-0.035003192722797394,
0.010012546554207802,
0.020224321633577347,
-0.15361016988754272,
-0.10774852335453033,
-0.019336948171257973,
-0.054365526884794235,
-0.0385490320622921,
-0.014066159725189209,
0.03395005315542221,
0.08969014883041382,
-0.04945898801088333,
0.07027425616979599,
-0.034991998225450516,
0.04502367600798607,
0.04222720488905907,
-0.0574675053358078,
-0.11890962719917297,
-0.07564771175384521,
-0.03125818446278572,
0.03298862650990486,
0.15672016143798828,
0.1789240688085556,
0.0878952294588089,
0.027286961674690247,
-0.01868417300283909,
0.04112589731812477,
0.009626897051930428,
-0.09780225902795792,
-0.15212658047676086,
0.01101651880890131,
-0.011590050533413887,
0.12986035645008087,
0.14238303899765015,
0.07382550090551376,
0.13823983073234558,
0.08085978776216507,
0.01188832987099886,
-0.06637498736381531,
-0.056663792580366135,
0.1062736064195633,
-0.2585775852203369,
-0.0989561676979065,
-0.03711199387907982,
-0.11277919262647629,
-0.005527293775230646,
-0.03559201955795288,
0.06131216138601303,
-0.012188073247671127,
0.07387887686491013,
0.12694616615772247,
-0.11517888307571411,
-0.13901667296886444,
-0.14492511749267578,
0.11462777107954025,
0.14888617396354675,
0.15599817037582397,
0.04206467047333717,
-0.009421609342098236,
0.1355479508638382,
-0.05165548250079155,
-0.12623199820518494,
0.20724083483219147,
-0.04436538368463516,
-0.04971681162714958,
-0.10100837051868439,
0.013562098145484924,
-0.02628549560904503,
0.015507603995501995,
-0.13090327382087708,
0.02489498257637024,
-0.061312656849622726,
0.12385020405054092,
-0.02513246238231659,
0.06305235624313354,
0.0957910567522049,
0.15823982656002045,
0.07361842691898346,
0.16195544600486755,
0.15112566947937012,
-0.10980149358510971,
0.3434017300605774,
0.20242226123809814,
-0.03971255198121071,
0.17895705997943878,
-0.272472083568573,
-0.28189617395401,
-0.010148689150810242,
-0.12219163775444031,
0.08911125361919403,
0.30782178044319153,
0.02544390968978405,
-0.01293130312114954,
0.11506000906229019,
0.07808800041675568,
-0.1713731288909912,
0.06137596443295479,
0.01943770982325077,
-0.1341586709022522,
-0.18043498694896698,
-0.23692816495895386,
0.06799961626529694,
0.07179230451583862,
-0.05538090690970421,
0.0916205570101738,
0.22007210552692413,
-0.00860149972140789,
-0.020404618233442307,
-0.11420055478811264,
-0.059899311512708664,
-0.24872229993343353,
-0.020367054268717766,
-0.11445114016532898,
0.040687333792448044,
0.1854565292596817,
-0.2822023034095764,
0.01680898293852806,
0.0054447646252810955,
-0.05801897868514061,
0.08117110282182693,
0.02174767665565014,
0.01797190122306347,
0.10120518505573273,
-0.05290069803595543,
0.005400618072599173,
-0.02787850610911846,
-0.033517442643642426,
-0.0817476361989975,
0.19631822407245636,
0.13508658111095428,
-0.04176609218120575,
-0.0775306224822998,
-0.02408820018172264,
0.045173853635787964,
0.06994736939668655,
0.02481255680322647,
-0.08234450966119766,
0.07425544410943985,
0.042618587613105774,
-0.12386605888605118,
0.003908225800842047,
0.08076447248458862,
0.10219240933656693,
0.14399397373199463,
0.03931097313761711,
0.09435548633337021,
0.14296835660934448,
-0.007119632326066494,
0.07050438225269318,
-0.016070863232016563,
0.07377257943153381,
0.026570217683911324,
-0.10129252821207047,
-0.1801212579011917,
0.08064668625593185,
0.08247452229261398,
0.048999231308698654,
-0.1438894122838974,
-0.009057466872036457,
-0.0429362989962101,
-0.04534076899290085,
-0.06265878677368164,
0.0883212760090828,
-0.06663759797811508,
-0.08877405524253845,
-0.024668298661708832,
0.16769573092460632,
0.008239807561039925,
-0.1181449294090271,
-0.10654011368751526,
-0.00829092413187027,
-0.05709536746144295,
-0.22867153584957123,
0.18391193449497223,
0.05838964506983757,
-0.07308688014745712,
-0.08074304461479187,
-0.01643238216638565,
-0.014709913171827793,
-0.0105948681011796,
0.10779062658548355,
-0.07479967176914215,
-0.03589627146720886,
0.03708105534315109,
0.16185502707958221,
-0.10669927299022675,
-0.042682942003011703,
0.013411173596978188,
-0.04870130866765976,
-0.15887607634067535,
0.010298979468643665,
0.0052840011194348335,
-0.12508539855480194,
0.0046145860105752945,
0.011430392973124981,
-0.07361368834972382,
-0.03132746368646622,
-0.23210971057415009,
0.02681639790534973,
0.174753338098526,
-0.00467841187492013,
-0.1276390552520752,
-0.07360505312681198,
-2.695717113702596e-32,
-0.019498445093631744,
0.00397446658462286,
-0.08799821883440018,
0.043619588017463684,
0.028224000707268715,
0.0666985809803009,
-0.14697237312793732,
-0.02086070366203785,
-0.20200257003307343,
-0.02615761198103428,
0.05347778648138046,
0.14823018014431,
0.09418948739767075,
0.009982474148273468,
-0.14424079656600952,
0.0380147323012352,
0.08591107279062271,
-0.03723883256316185,
-0.026596058160066605,
0.12750981748104095,
0.07938320934772491,
0.023668481037020683,
0.0054182978346943855,
-0.10282514244318008,
-0.07613476365804672,
-0.006086741574108601,
-0.09713473170995712,
0.03519901633262634,
0.1447046995162964,
0.12888649106025696,
-0.14526653289794922,
-0.19617196917533875,
-0.060997143387794495,
0.21392886340618134,
0.1049237921833992,
0.033317748457193375,
-0.12465265393257141,
-0.0671033263206482,
-0.13436414301395416,
-0.014736443758010864,
0.20785485208034515,
0.04245179519057274,
-0.13053736090660095,
-0.03671815246343613,
0.07379790395498276,
0.028931573033332825,
-0.022565817460417747,
0.11417768895626068,
-0.012007445096969604,
0.13999658823013306,
-0.049051929265260696,
0.13698223233222961,
0.03230094537138939,
0.09289173781871796,
0.12134407460689545,
-0.10004176944494247,
0.1567535400390625,
0.057054631412029266,
-0.05860085412859917,
-0.016146909445524216,
0.03014511801302433,
0.03946496546268463,
0.10165069997310638,
0.007698067929595709,
0.043327149003744125,
0.050361040979623795,
0.02579503320157528,
0.008747421205043793,
0.02488037757575512,
0.010651696473360062,
0.1861056089401245,
0.07199548184871674,
0.12430033087730408,
-0.005202012602239847,
-0.11508352309465408,
-0.010939952917397022,
-0.103437140583992,
0.00460642809048295,
0.06098200008273125,
0.027165450155735016,
-0.015997527167201042,
0.05084093287587166,
-0.11563542485237122,
-0.029574550688266754,
0.09119036048650742,
0.0790979340672493,
-0.015954451635479927,
-0.0021230708807706833,
-0.05317884683609009,
0.0030367416329681873,
-0.179709330201149,
0.11869650334119797,
-0.18185453116893768,
0.02958439104259014,
0.006027194205671549,
0.220075786113739,
-0.004639917053282261,
0.15922018885612488,
0.014531226828694344,
-0.061319317668676376,
-0.056307777762413025,
-0.014689728617668152,
0.16309450566768646,
0.16680943965911865,
0.026775436475872993,
-0.05068494752049446,
0.20515117049217224,
-0.05700842663645744,
-0.3482348322868347,
0.048724930733442307,
0.09186814725399017,
0.02389419637620449,
-0.00590935442596674,
-0.06900922954082489,
0.11205308139324188,
-0.0027673335280269384,
0.014652515761554241,
0.07384664565324783,
-0.02415657788515091,
0.09957973659038544,
-0.20399680733680725,
-0.05563065782189369,
-0.14189133048057556,
0.07908376306295395,
0.1110692024230957,
0.06449466943740845,
-0.11662738770246506,
-0.0021834068465977907,
0.2218702733516693,
-0.07705481350421906,
-0.06894614547491074,
-0.12353349477052689,
7.583024626001134e-7,
0.042897097766399384,
0.10500781238079071,
0.14220687747001648,
-0.023836946114897728,
-0.05736229941248894,
0.03836368769407272,
-0.09973789006471634,
-0.10404098033905029,
-0.052609000355005264,
-0.002500397153198719,
0.07173287868499756,
-0.007405237294733524,
-0.037698905915021896,
0.031104881316423416,
-0.0831555724143982,
-0.1289213001728058,
-0.05231162905693054,
-0.11239590495824814,
-0.18411554396152496,
0.05805114284157753,
-0.13763481378555298,
0.14556151628494263,
0.005269174464046955,
-0.026901952922344208,
0.04387030005455017,
-0.05220462754368782,
-0.10224243998527527,
-0.13483083248138428,
0.31190308928489685,
0.03186140954494476,
-0.030222197994589806,
-0.03826173394918442,
-0.07249681651592255,
-0.18530136346817017,
-0.061682019382715225,
-0.18358373641967773,
-0.20195196568965912,
-0.021107345819473267,
0.006843884475529194,
0.08317715674638748,
0.010959739796817303,
-0.02104933001101017,
-0.06553362309932709,
-0.23326830565929413,
0.10581900179386139,
0.07541164755821228,
-0.065678671002388,
0.11456449329853058,
-0.10642676055431366,
0.0678766593337059,
0.05841689556837082,
-0.09380266070365906,
-0.06812560558319092,
0.02126131020486355,
-0.017457010224461555,
-0.14909933507442474,
-0.056601058691740036,
-0.0051713017746806145,
0.1920156031847,
-0.014518169686198235,
0.0003959334280807525,
-0.01941833645105362,
-0.07692824304103851,
0.17725758254528046,
-0.04788538068532944,
0.037499409168958664,
0.07709358632564545,
2.694992302049169e-34,
-0.03959265351295471,
-0.01985308714210987,
0.047919634729623795,
-0.0848798155784607,
0.02219420298933983,
-0.006319115404039621,
0.09151700139045715,
-0.03122749738395214,
-0.08455584198236465,
-0.15314453840255737,
-0.1780317723751068
] |
https://github.com/huggingface/datasets/issues/5971 | Docs: make "repository structure" easier to find | @benjaminbrown038 Yes, it is. Maybe @stevhliu can give some pointers on improving this doc page's discoverability. | The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages. | 16 | Docs: make "repository structure" easier to find
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
@benjaminbrown038 Yes, it is. Maybe @stevhliu can give some pointers on improving this doc page's discoverability. | [
0.0004218153189867735,
0.07124263793230057,
-0.1010211631655693,
0.12139096111059189,
0.09585795551538467,
0.06458497792482376,
0.060697052627801895,
0.03285425528883934,
-0.041713960468769073,
0.16605304181575775,
-0.04048478230834007,
0.024684995412826538,
0.029508233070373535,
0.060945965349674225,
0.10274242609739304,
-0.13366669416427612,
-0.06800150126218796,
-0.011174799874424934,
-0.03442559018731117,
0.03862448036670685,
0.09098930656909943,
0.06588263809680939,
0.08819862455129623,
-0.06929796934127808,
0.016008298844099045,
0.0036609277594834566,
-0.09684837609529495,
0.16157889366149902,
-0.06948792934417725,
-0.2681390941143036,
0.1148952767252922,
0.15471000969409943,
0.011466494761407375,
0.15698078274726868,
0.0000060746751842089,
0.10993161052465439,
-0.06362510472536087,
0.11206618696451187,
-0.159016951918602,
0.09956960380077362,
-0.01660175435245037,
-0.12028704583644867,
0.10634059458971024,
-0.020939871668815613,
-0.04715830832719803,
0.09085357189178467,
0.08214718103408813,
0.09445873647928238,
-0.08295457065105438,
-0.01413007453083992,
0.059769485145807266,
0.07173865288496017,
-0.0769827663898468,
-0.09900980442762375,
0.22974814474582672,
0.1712665855884552,
-0.2305372804403305,
0.21042202413082123,
0.04811059683561325,
0.11986030638217926,
-0.06369398534297943,
0.09113956987857819,
0.02947831340134144,
0.01955956220626831,
0.26651740074157715,
0.13410869240760803,
-0.1382060945034027,
-0.12395984679460526,
0.03762675076723099,
0.12302129715681076,
0.20831046998500824,
-0.05676908791065216,
0.02805640548467636,
-0.0071522826328873634,
-0.008876178413629532,
0.05515817180275917,
-0.1678859144449234,
-0.11332041770219803,
0.006685050204396248,
-0.0024963286705315113,
-0.11959508806467056,
-0.2229955941438675,
0.08871925622224808,
-0.09142833203077316,
0.04211486503481865,
0.11871375888586044,
-0.06597746908664703,
-0.013793585821986198,
0.037761520594358444,
-0.12035375833511353,
0.0717359334230423,
-0.021543456241488457,
-0.08402890712022781,
0.019327601417899132,
0.1519617885351181,
0.007780902553349733,
0.024629486724734306,
0.035517141222953796,
0.1793176531791687,
0.02045070007443428,
0.09968280047178268,
0.10670632123947144,
-0.12521350383758545,
-0.02569108083844185,
-0.003816016251221299,
-0.018082590773701668,
0.02020510472357273,
-0.14142975211143494,
0.0765257403254509,
0.23749813437461853,
0.09421134740114212,
0.0588105283677578,
0.0002716081799007952,
-0.17789024114608765,
-0.09507769346237183,
-0.07917100936174393,
0.05517517402768135,
0.05446464195847511,
0.009359120391309261,
-0.07621514052152634,
0.169075608253479,
0.015350576490163803,
-0.027914538979530334,
0.11321750283241272,
0.030552944168448448,
-0.04067215695977211,
-0.05207834020256996,
-0.09860675036907196,
-0.02088959328830242,
-0.021279556676745415,
-0.12180936336517334,
-0.0004957102937623858,
-0.003615390043705702,
0.058295756578445435,
-0.005955659318715334,
-0.17551350593566895,
0.043149184435606,
-0.2601897120475769,
0.1549391895532608,
0.018533313646912575,
-0.06674796342849731,
0.20929338037967682,
-0.028000667691230774,
-0.11195427924394608,
0.005386786535382271,
-0.13319526612758636,
0.08956042677164078,
0.09902367740869522,
-0.06864533573389053,
0.0012921395245939493,
0.013433430343866348,
0.12641103565692902,
-0.2671489715576172,
0.0034853273537009954,
0.08537427335977554,
0.021094659343361855,
-0.08215449005365372,
0.019774282351136208,
-0.1888013482093811,
-0.005294808652251959,
0.19028536975383759,
0.07869886606931686,
0.002409358276054263,
-0.08915702998638153,
0.07353893667459488,
0.2680111527442932,
0.18885459005832672,
-0.03263755887746811,
-0.05078882724046707,
-0.18413934111595154,
-0.07398812472820282,
0.002071739872917533,
-0.01240946352481842,
-0.0032519050873816013,
-0.07976872473955154,
0.22540032863616943,
0.1896369606256485,
-0.025780990719795227,
-0.13916678726673126,
0.19570817053318024,
-0.018866855651140213,
0.008679371327161789,
-0.0296906940639019,
-0.035392023622989655,
0.00775159290060401,
0.013572714291512966,
-0.31056880950927734,
0.0012215282768011093,
-0.05599134787917137,
0.11802029609680176,
-0.13330116868019104,
0.013496367260813713,
-0.03791696950793266,
0.020858872681856155,
-0.14664508402347565,
0.07156882435083389,
0.06885753571987152,
-0.054626885801553726,
0.15773840248584747,
-0.10090982168912888,
-0.09343944489955902,
0.10251715779304504,
0.10732665657997131,
0.1333925724029541,
-0.07368122786283493,
-0.022054648026823997,
-0.20257458090782166,
-0.010039371438324451,
0.12390395253896713,
0.157406285405159,
-0.08065605163574219,
-0.042893536388874054,
-0.029741907492280006,
-0.11794613301753998,
-0.1488012820482254,
-0.12174863368272781,
0.005341858137398958,
-0.056890178471803665,
-0.01903463713824749,
0.022067055106163025,
0.0016673713689669967,
-0.04508576914668083,
0.05761106684803963,
0.16068695485591888,
-0.13768066465854645,
0.028874177485704422,
0.1134902685880661,
0.02563636377453804,
0.13053637742996216,
0.04949318617582321,
-0.05063457787036896,
-0.09310764074325562,
0.10262638330459595,
0.1199728474020958,
-0.10460551828145981,
0.05575999245047569,
0.10141649097204208,
0.053416453301906586,
0.1571512669324875,
-0.032828912138938904,
0.01666482537984848,
-0.20364606380462646,
-0.1588483303785324,
0.0918322205543518,
-0.08231950551271439,
-0.1551881581544876,
-0.04748354107141495,
0.08874408155679703,
-0.056497588753700256,
0.0873996913433075,
0.05138242617249489,
0.08757425844669342,
-0.15690693259239197,
-0.00990375503897667,
-0.05617602914571762,
-0.030555713921785355,
0.06291218101978302,
0.034696049988269806,
-0.11796501278877258,
0.12683045864105225,
-0.005015714559704065,
-0.13759031891822815,
-0.1976248323917389,
0.05729374289512634,
0.1270974725484848,
-0.018305234611034393,
0.10333510488271713,
-0.0125068174675107,
-0.06868649274110794,
0.12339961528778076,
0.06542083621025085,
0.04545363038778305,
-0.03257550299167633,
-0.06132950261235237,
0.03142419084906578,
-0.129530131816864,
0.07036852091550827,
-0.03827142342925072,
-0.11348766833543777,
0.08061061799526215,
-0.14288809895515442,
-0.06345600634813309,
-0.17108669877052307,
-0.030601441860198975,
0.06847953051328659,
-0.1179225966334343,
-0.0412505641579628,
-0.11776134371757507,
0.037339694797992706,
0.04763136804103851,
0.0037852171808481216,
-0.10440804809331894,
0.03735283762216568,
-0.12535910308361053,
-0.03427370637655258,
0.01749240979552269,
0.11263030022382736,
0.09936577826738358,
-0.1530013531446457,
0.11495479196310043,
0.025883624330163002,
0.10690807551145554,
0.0655854195356369,
-0.005208080634474754,
0.012243904173374176,
0.005074350629001856,
0.04872819408774376,
-0.19562168419361115,
-0.09356863051652908,
-0.2760215401649475,
-0.06589601933956146,
0.09196246415376663,
0.06622143089771271,
-0.09942609816789627,
0.04319542273879051,
-0.010053673759102821,
-0.17943882942199707,
-0.08372294902801514,
0.10810718685388565,
0.15111880004405975,
-0.034681037068367004,
-0.16065019369125366,
0.029423709958791733,
-0.12702541053295135,
0.0017665309133008122,
-0.025856558233499527,
-0.04160785302519798,
-0.11720876395702362,
0.03814547881484032,
-0.13498611748218536,
0.01035336870700121,
0.04500594735145569,
0.08933417499065399,
-0.04188041016459465,
-0.019639912992715836,
-0.021708136424422264,
0.0364958792924881,
-0.09940361231565475,
0.11717405915260315,
-0.0410013422369957,
-0.020529625937342644,
0.049491651356220245,
0.03853580728173256,
0.14274808764457703,
0.0379016250371933,
-0.018711820244789124,
0.015599798411130905,
-0.026021748781204224,
0.018367871642112732,
0.04316722974181175,
0.24691446125507355,
0.07324352860450745,
-0.05041619390249252,
0.025931518524885178,
0.08300356566905975,
-0.1197420060634613,
-0.14594122767448425,
-0.0487087145447731,
-0.017959263175725937,
-0.060273345559835434,
-0.007364477962255478,
0.02363678626716137,
0.08706725388765335,
-0.01773463934659958,
0.08764033019542694,
-0.03778834640979767,
-0.016488883644342422,
0.00012902560411021113,
-0.02401118353009224,
-0.11825312674045563,
-0.11424122750759125,
-0.06224267557263374,
-0.01472686417400837,
0.17903698980808258,
0.2523273229598999,
0.04109608754515648,
0.03975941613316536,
-0.028056057170033455,
0.029217282310128212,
0.0015619504265487194,
-0.07158894091844559,
-0.18337169289588928,
0.00959009025245905,
0.05022277310490608,
0.15406495332717896,
0.1898900866508484,
0.042406193912029266,
0.15393324196338654,
0.1343250274658203,
-0.010984952561557293,
-0.11537995934486389,
-0.06696987897157669,
0.11825773864984512,
-0.3138454258441925,
-0.07012122124433517,
-0.016347695142030716,
-0.17005525529384613,
0.027589423581957817,
-0.03336111456155777,
0.03615555539727211,
-0.10338207334280014,
0.06927293539047241,
0.09498961269855499,
-0.06859789043664932,
-0.11243578046560287,
-0.14152424037456512,
0.1462802290916443,
0.20184972882270813,
0.1443781554698944,
-0.016715286299586296,
0.007334635592997074,
0.08126571774482727,
-0.10653173923492432,
-0.10751631110906601,
0.21145448088645935,
-0.10468314588069916,
-0.017949076369404793,
-0.04928063973784447,
0.02767396718263626,
-0.08247475326061249,
0.011209377087652683,
-0.10368534922599792,
0.0028400493320077658,
-0.07450870424509048,
0.14448057115077972,
-0.05470062047243118,
0.07379232347011566,
0.12445556372404099,
0.14367367327213287,
0.09146194905042648,
0.20847858488559723,
0.11631261557340622,
-0.1259898543357849,
0.3618308901786804,
0.2000475972890854,
-0.028330473229289055,
0.19358351826667786,
-0.2656386196613312,
-0.2653310000896454,
-0.009035345166921616,
-0.10892510414123535,
0.059692393988370895,
0.298200786113739,
-0.0026064019184559584,
-0.04166078567504883,
0.12283151596784592,
0.09187563508749008,
-0.1363861858844757,
0.004253301303833723,
0.06576500087976456,
-0.09270831942558289,
-0.2376730591058731,
-0.26266321539878845,
0.07921971380710602,
0.11031818389892578,
-0.0607290081679821,
0.060709018260240555,
0.2709500193595886,
-0.007389632984995842,
0.010392952710390091,
-0.11056286841630936,
-0.05961334705352783,
-0.24165353178977966,
-0.014966173097491264,
-0.061004411429166794,
-0.023012274876236916,
0.15716375410556793,
-0.2314625084400177,
0.017808640375733376,
-0.05945833399891853,
-0.020698271691799164,
0.03811041638255119,
0.04068057984113693,
0.005134031176567078,
0.11390341818332672,
-0.09689408540725708,
0.02620653808116913,
-0.0026063125114887953,
-0.026279248297214508,
-0.10507874935865402,
0.1825084239244461,
0.17066380381584167,
-0.041688233613967896,
-0.037311702966690063,
-0.011986552737653255,
0.06125800311565399,
0.04755173996090889,
0.023201538249850273,
-0.07313838601112366,
0.05498804897069931,
0.025413434952497482,
-0.17588359117507935,
-0.023240413516759872,
0.12005725502967834,
0.04389912262558937,
0.19575275480747223,
0.07627049833536148,
0.15237568318843842,
0.10008887946605682,
0.013474567793309689,
0.052136145532131195,
-0.0401279479265213,
0.06893464922904968,
0.016150299459695816,
-0.12992499768733978,
-0.1707901507616043,
0.03891776502132416,
0.03217235952615738,
0.06691667437553406,
-0.17376987636089325,
-0.01198104303330183,
-0.052112046629190445,
-0.05230209603905678,
-0.08499797433614731,
0.08519760519266129,
-0.07207024097442627,
-0.1037311851978302,
-0.05104619264602661,
0.21189641952514648,
-0.035965029150247574,
-0.10270038992166519,
-0.07750672847032547,
-0.011195250786840916,
-0.10168904066085815,
-0.2153279185295105,
0.20135991275310516,
0.09237392991781235,
-0.05967700108885765,
-0.1215662732720375,
-0.031440913677215576,
0.005391285754740238,
-0.049294691532850266,
0.1153176873922348,
-0.11197435855865479,
-0.05700426176190376,
0.012664048932492733,
0.16618283092975616,
-0.037116337567567825,
-0.0544857494533062,
-0.06369955837726593,
-0.024327319115400314,
-0.10439661890268326,
0.01846017688512802,
-0.014977492392063141,
-0.0736876130104065,
-0.023657260462641716,
0.027382144704461098,
-0.02921856753528118,
-0.03280865028500557,
-0.2133781760931015,
0.03197578713297844,
0.07254023104906082,
-0.05375077575445175,
-0.15796791017055511,
-0.04944121465086937,
-2.606515312637622e-32,
-0.05220940336585045,
0.0387430414557457,
-0.1133410707116127,
0.016367817297577858,
0.06309902667999268,
0.02234758995473385,
-0.19036711752414703,
-0.009493838995695114,
-0.17185646295547485,
0.023452211171388626,
0.0744411051273346,
0.15004707872867584,
0.09199976921081543,
0.04590063542127609,
-0.14484280347824097,
0.08054407685995102,
0.10320553928613663,
-0.05336007475852966,
-0.024309072643518448,
0.11019032448530197,
0.07988951355218887,
0.022286031395196915,
-0.04437141492962837,
-0.07103895395994186,
-0.10426843166351318,
-0.0002050686744041741,
-0.0706738829612732,
0.010340576991438866,
0.21544335782527924,
0.16814136505126953,
-0.13999389111995697,
-0.17048712074756622,
-0.06292416900396347,
0.26254111528396606,
0.12794138491153717,
0.05823740363121033,
-0.16517893970012665,
-0.04313173145055771,
-0.16834203898906708,
0.001955099869519472,
0.1628565937280655,
-0.007177313789725304,
-0.08932217210531235,
-0.031025376170873642,
0.03192342072725296,
0.00005740646520280279,
0.005437976680696011,
0.07901249825954437,
-0.044490572065114975,
0.10362321883440018,
-0.04778910428285599,
0.15132209658622742,
0.03342965617775917,
0.10081557184457779,
0.1258150041103363,
-0.14411742985248566,
0.14100584387779236,
0.09813094884157181,
-0.09582354873418808,
-0.03387351706624031,
-0.02614387683570385,
0.03595411032438278,
0.06477681547403336,
0.020740404725074768,
0.05414680391550064,
0.05699082836508751,
0.0034972205758094788,
0.041965335607528687,
0.03673281893134117,
-0.021320687606930733,
0.1735970824956894,
0.01663694530725479,
0.20844480395317078,
-0.0033431616611778736,
-0.14983642101287842,
-0.040114887058734894,
-0.11595220118761063,
0.025748198851943016,
-0.017095468938350677,
0.06801799684762955,
0.03317999467253685,
0.06309781968593597,
-0.13224318623542786,
-0.030938390642404556,
0.10967190563678741,
0.06909696012735367,
-0.00906640850007534,
0.03800274804234505,
-0.032744839787483215,
0.031726472079753876,
-0.22982503473758698,
0.09687210619449615,
-0.19979189336299896,
0.0785067155957222,
0.00147837377153337,
0.24657605588436127,
-0.04698425158858299,
0.1493557244539261,
0.031945906579494476,
-0.05440281704068184,
-0.09354247152805328,
0.03435962274670601,
0.14071205258369446,
0.17250126600265503,
0.030230356380343437,
-0.09696827083826065,
0.18799856305122375,
-0.06782064586877823,
-0.362343430519104,
0.10520726442337036,
0.11827808618545532,
0.022164564579725266,
-0.025111570954322815,
-0.09316794574260712,
0.03652762249112129,
-0.04733479022979736,
0.06640543043613434,
0.12321633100509644,
-0.010099077597260475,
0.05964701622724533,
-0.16684940457344055,
-0.056103963404893875,
-0.15464387834072113,
0.056415192782878876,
0.09057699143886566,
0.06748617440462112,
-0.08746545761823654,
0.05991441011428833,
0.23018117249011993,
-0.1381606161594391,
-0.018403373658657074,
-0.07405246794223785,
7.534156338806497e-7,
0.09898781031370163,
0.1891150027513504,
0.10500883311033249,
0.016090581193566322,
-0.05221250280737877,
0.05954481288790703,
-0.09763281792402267,
-0.12773151695728302,
-0.11021770536899567,
0.020010652020573616,
0.06545256078243256,
0.0008219850133173168,
-0.014158363454043865,
0.07589571923017502,
-0.04145880416035652,
-0.18236936628818512,
-0.050306472927331924,
-0.1575005203485489,
-0.21125204861164093,
0.034227341413497925,
-0.10178299993276596,
0.13141410052776337,
-0.012854833155870438,
0.02307809889316559,
0.031871262937784195,
-0.06324119120836258,
-0.0901627242565155,
-0.14401406049728394,
0.37649810314178467,
0.0027611292898654938,
-0.011602086015045643,
-0.04754796624183655,
-0.10735281556844711,
-0.18823961913585663,
-0.07176424562931061,
-0.20145833492279053,
-0.19481636583805084,
-0.004883674904704094,
0.009237322956323624,
0.06221708655357361,
0.05612688884139061,
-0.10258463770151138,
-0.04161183163523674,
-0.27589696645736694,
0.058285072445869446,
0.029959846287965775,
0.00802142359316349,
0.13402479887008667,
-0.20116102695465088,
0.12189501523971558,
0.10399086773395538,
-0.10385061800479889,
-0.15108580887317657,
0.024640049785375595,
-0.0206526480615139,
-0.16952496767044067,
-0.008935140445828438,
-0.011034646071493626,
0.20748871564865112,
0.011882545426487923,
-0.01892179436981678,
0.007021244615316391,
-0.10345356911420822,
0.16926008462905884,
-0.08652205020189285,
0.04068562388420105,
0.0662493035197258,
3.0339906383244124e-34,
-0.009098611772060394,
-0.008742348290979862,
0.011858739890158176,
-0.05489654466509819,
0.020172694697976112,
-0.05964096635580063,
0.10470224916934967,
-0.02866441383957863,
-0.1326981633901596,
-0.12728829681873322,
-0.16734987497329712
] |
https://github.com/huggingface/datasets/issues/5971 | Docs: make "repository structure" easier to find | I think we can add a version of the [Main use-case](https://huggingface.co/docs/datasets/repository_structure#main-usecase) section to the [Share a dataset to the Hub](https://huggingface.co/docs/datasets/upload_dataset) tutorial.
Currently, it doesn't tell you *how* to structure the repository; it only tells you how to create it. So adding the "main use-case" will help bridge the gap and make it easier to find. We should also add a link to the [Structure your repository](https://huggingface.co/docs/datasets/repository_structure) guide for users who want to learn about the other options. | The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages. | 77 | Docs: make "repository structure" easier to find
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
I think we can add a version of the [Main use-case](https://huggingface.co/docs/datasets/repository_structure#main-usecase) section to the [Share a dataset to the Hub](https://huggingface.co/docs/datasets/upload_dataset) tutorial.
Currently, it doesn't tell you *how* to structure the repository; it only tells you how to create it. So adding the "main use-case" will help bridge the gap and make it easier to find. We should also add a link to the [Structure your repository](https://huggingface.co/docs/datasets/repository_structure) guide for users who want to learn about the other options. | [
0.046571314334869385,
-0.046287089586257935,
-0.038637224584817886,
0.14137442409992218,
0.14102046191692352,
0.08883877843618393,
0.035225994884967804,
-0.010732023976743221,
-0.017283335328102112,
0.21477676928043365,
-0.010222276672720909,
0.04195094481110573,
0.034663125872612,
0.13277123868465424,
0.14423033595085144,
-0.2612861394882202,
-0.07654955983161926,
-0.042522501200437546,
-0.06016149744391441,
0.09881527721881866,
0.1599704623222351,
0.07586860656738281,
0.10161152482032776,
-0.07050829380750656,
-0.03133077546954155,
-0.021403726190328598,
-0.07353946566581726,
0.14298273622989655,
-0.05870411545038223,
-0.2570894956588745,
0.06896322220563889,
0.13627707958221436,
0.15101490914821625,
0.08384543657302856,
0.000005959017016721191,
0.043116629123687744,
-0.04572773724794388,
0.057134900242090225,
-0.12011367827653885,
0.016586769372224808,
0.06919697672128677,
-0.04445446655154228,
0.19064496457576752,
0.03731051832437515,
0.03140685707330704,
0.12865392863750458,
0.08334094285964966,
0.10700370371341705,
-0.03970370814204216,
-0.019984355196356773,
0.07922352105379105,
0.05793874338269234,
-0.07119596004486084,
-0.11063869297504425,
0.1224135160446167,
0.17840202152729034,
-0.21260571479797363,
0.24057891964912415,
0.06475113332271576,
0.07157712429761887,
-0.045861806720495224,
0.14424283802509308,
0.13531984388828278,
0.03813990578055382,
0.34290438890457153,
0.1575046330690384,
-0.20656079053878784,
-0.1145523190498352,
0.011227641254663467,
0.12593069672584534,
0.16803224384784698,
-0.044421445578336716,
-0.05455232784152031,
-0.04926111549139023,
0.06960797309875488,
0.03834149241447449,
-0.26390331983566284,
-0.11673834174871445,
0.06132238730788231,
0.014311028644442558,
-0.10108143091201782,
-0.165751114487648,
0.01534794270992279,
-0.07739943265914917,
0.04970366507768631,
0.06274155527353287,
-0.13025957345962524,
0.028835348784923553,
0.056690189987421036,
-0.13475748896598816,
0.08370500057935715,
-0.04552305117249489,
-0.08622629940509796,
0.1120995506644249,
0.1588018834590912,
-0.0067681316286325455,
0.06427890062332153,
0.04012848064303398,
0.1641824096441269,
0.016605937853455544,
0.05563294515013695,
0.0939544215798378,
-0.1123940497636795,
0.009888879023492336,
-0.023012422025203705,
-0.0010354113765060902,
0.05911393463611603,
-0.14034044742584229,
0.08086633682250977,
0.2171119600534439,
0.1751002073287964,
0.0015692977467551827,
-0.04519141465425491,
-0.15386293828487396,
-0.08322203904390335,
-0.08266008645296097,
-0.03224204108119011,
0.11110840737819672,
0.13637122511863708,
-0.060988958925008774,
0.16129599511623383,
0.10936498641967773,
-0.07047639042139053,
0.10006926953792572,
0.09516040980815887,
-0.05246807634830475,
-0.057144392281770706,
-0.025943174958229065,
-0.010556026361882687,
-0.036196768283843994,
-0.12408431619405746,
0.036726634949445724,
-0.0039060695562511683,
0.03159860894083977,
0.033506911247968674,
-0.24005967378616333,
0.06545650959014893,
-0.1333787739276886,
0.16075992584228516,
-0.01967766135931015,
-0.06833825260400772,
0.15275512635707855,
-0.1608983725309372,
-0.057746585458517075,
-0.003784625558182597,
-0.04003201052546501,
0.10715335607528687,
0.08901571482419968,
-0.07661613821983337,
-0.028366360813379288,
0.0025094535667449236,
0.1512501835823059,
-0.24423743784427643,
0.06508147716522217,
0.12509502470493317,
0.058931007981300354,
-0.13932062685489655,
0.08673643320798874,
-0.2325931191444397,
0.04937506467103958,
0.14025850594043732,
0.0362573005259037,
-0.005966539960354567,
-0.03265683725476265,
0.11300891637802124,
0.1930416077375412,
0.18230345845222473,
0.003598704468458891,
-0.0495586059987545,
-0.11595243960618973,
-0.09642739593982697,
-0.03657534345984459,
-0.03838181495666504,
0.057267963886260986,
-0.11142400652170181,
0.21402353048324585,
0.07312743365764618,
-0.1556202620267868,
-0.049685828387737274,
0.09251050651073456,
-0.07327544689178467,
0.015566225163638592,
-0.08231113106012344,
-0.028361964970827103,
-0.060117147862911224,
0.03584085404872894,
-0.2917475700378418,
0.006915403995662928,
-0.0935995802283287,
0.10809332132339478,
-0.11967087537050247,
-0.0011463385308161378,
-0.08225200325250626,
0.030871475115418434,
-0.17630535364151,
0.015757959336042404,
0.09018416702747345,
-0.046905238181352615,
0.0537792406976223,
-0.09530442208051682,
-0.014346486888825893,
0.05491738021373749,
0.06588097661733627,
0.11581160128116608,
-0.08867088705301285,
-0.0727626234292984,
-0.21506591141223907,
0.0058542038314044476,
0.14063547551631927,
0.040431443601846695,
-0.191583514213562,
-0.006892533041536808,
-0.1018887460231781,
-0.15902510285377502,
-0.1716739386320114,
-0.22693060338497162,
-0.04680301621556282,
-0.19192476570606232,
-0.020694484934210777,
-0.026083946228027344,
0.04159768670797348,
0.06704864650964737,
0.023850906640291214,
0.13049380481243134,
-0.12928248941898346,
0.046271488070487976,
0.04847531393170357,
0.02989872731268406,
0.1895788162946701,
0.014595217071473598,
0.017491284757852554,
-0.02926320768892765,
0.1176515519618988,
0.13139422237873077,
-0.17622077465057373,
0.14429131150245667,
0.09166630357503891,
0.04631838947534561,
0.1515609323978424,
-0.014201420359313488,
-0.07025517523288727,
-0.1961597204208374,
-0.1516621708869934,
0.15400195121765137,
-0.12629851698875427,
-0.08240703493356705,
-0.04841732606291771,
0.13849695026874542,
-0.017110327258706093,
0.08535048365592957,
0.012034045532345772,
0.10563391447067261,
-0.10380472987890244,
-0.06789109110832214,
-0.04068988934159279,
-0.03395664691925049,
0.06066714972257614,
0.0065337251871824265,
-0.1396108716726303,
0.1890595704317093,
0.021499864757061005,
-0.12858347594738007,
-0.21858730912208557,
0.03209863230586052,
0.07497163861989975,
-0.06918059289455414,
0.10803049057722092,
0.009057039394974709,
-0.07879108935594559,
0.12844596803188324,
0.06372691690921783,
0.03459940850734711,
-0.04813693091273308,
-0.08984433859586716,
0.01337624154984951,
-0.1512875109910965,
0.04840612784028053,
0.011570747941732407,
-0.09287253767251968,
0.05854116752743721,
-0.1594380885362625,
0.029299411922693253,
-0.1340484470129013,
-0.022669199854135513,
0.07494840770959854,
-0.06783679872751236,
-0.037216536700725555,
-0.06496353447437286,
0.008181648328900337,
0.034907057881355286,
-0.04510445520281792,
-0.17233851552009583,
0.07074207067489624,
-0.0887899398803711,
0.007416687905788422,
-0.030208421871066093,
0.15446172654628754,
0.04021039977669716,
-0.14839677512645721,
0.15760880708694458,
-0.012070614844560623,
0.06838563829660416,
0.03457540273666382,
-0.00793345645070076,
-0.0485038086771965,
0.056681521236896515,
-0.012583519332110882,
-0.0776243507862091,
-0.04543320834636688,
-0.27478519082069397,
-0.08878340572118759,
0.03989060968160629,
0.04736257344484329,
-0.04290813207626343,
0.05022832006216049,
-0.03173644468188286,
-0.14011798799037933,
-0.15609732270240784,
0.08019857853651047,
0.10975461453199387,
-0.016644731163978577,
-0.09778297692537308,
-0.002251029945909977,
-0.08992671221494675,
-0.00578143447637558,
-0.027451086789369583,
-0.11728610098361969,
-0.13496850430965424,
0.0950235053896904,
-0.2300632894039154,
0.01180721540004015,
-0.02743704617023468,
0.05071456357836723,
-0.03714669868350029,
-0.132673978805542,
0.0334041602909565,
0.04839136078953743,
-0.11760949343442917,
0.062566377222538,
-0.08730701357126236,
-0.028852684423327446,
0.08858819305896759,
0.038072336465120316,
0.1440671682357788,
-0.018018394708633423,
-0.007287526968866587,
-0.03938053175806999,
-0.07310590893030167,
0.13163024187088013,
0.06286446005105972,
0.24209178984165192,
0.015380529686808586,
-0.019234495237469673,
0.03700008988380432,
0.06677726656198502,
-0.11575976759195328,
-0.17761380970478058,
0.07876468449831009,
-0.08290962874889374,
-0.08191687613725662,
-0.06406910717487335,
0.03588145971298218,
0.10720153152942657,
-0.023151524364948273,
0.03593884035944939,
-0.09692218154668808,
0.10078681260347366,
0.018201051279902458,
-0.07364161312580109,
-0.09189821779727936,
-0.07331831008195877,
-0.04566030576825142,
0.13547401130199432,
0.1629139482975006,
0.23865656554698944,
0.12666746973991394,
0.04765576869249344,
0.04804276302456856,
0.04541022703051567,
-0.025766316801309586,
-0.11385223269462585,
-0.1737673580646515,
0.008815555833280087,
-0.002120082499459386,
0.15717005729675293,
0.08981886506080627,
0.07455573230981827,
0.08094161748886108,
0.11914975196123123,
0.07856856286525726,
-0.08637788891792297,
-0.08058562874794006,
0.04173313081264496,
-0.2678051292896271,
-0.10685018450021744,
-0.005304642021656036,
-0.08970612287521362,
0.02624637819826603,
0.012874559499323368,
0.0981140211224556,
0.011801602318882942,
0.06795985996723175,
0.03784826025366783,
-0.12756997346878052,
-0.10115505009889603,
-0.1289888173341751,
-0.003777735633775592,
0.205258309841156,
0.1736520230770111,
0.08311811834573746,
-0.029050074517726898,
0.0891735851764679,
-0.07525255531072617,
-0.1726059466600418,
0.14538836479187012,
-0.061280615627765656,
0.017697757109999657,
-0.06054377555847168,
0.0838887095451355,
-0.008422189392149448,
0.004139873199164867,
-0.01909504644572735,
0.07172241061925888,
-0.06077341362833977,
0.11556335538625717,
-0.058683983981609344,
0.05290757492184639,
0.11517784744501114,
0.17859885096549988,
0.0842338502407074,
0.17400546371936798,
0.2348901778459549,
-0.0929250493645668,
0.3021632134914398,
0.23740629851818085,
-0.03788622096180916,
0.08694224804639816,
-0.2547975778579712,
-0.25761836767196655,
-0.03518553823232651,
-0.0653243139386177,
0.10833008587360382,
0.3991848826408386,
0.03341938927769661,
0.09009938687086105,
0.04743213951587677,
0.07408571988344193,
-0.14864985644817352,
0.02816389501094818,
0.04888296499848366,
-0.07281915843486786,
-0.1858968585729599,
-0.16416983306407928,
0.06023919954895973,
0.027050891891121864,
-0.04814981296658516,
0.11899838596582413,
0.25829416513442993,
-0.003955668304115534,
-0.05194678530097008,
-0.18786518275737762,
-0.08262412995100021,
-0.18541015684604645,
0.023736290633678436,
-0.19808417558670044,
-0.0653182864189148,
0.26767081022262573,
-0.21943868696689606,
-0.04551006481051445,
0.022858189418911934,
-0.014435923658311367,
0.06161928176879883,
0.034168682992458344,
0.019550351426005363,
0.04333268105983734,
-0.041313327848911285,
0.0038615071680396795,
-0.06529433280229568,
0.048168282955884933,
-0.07597322762012482,
0.24736331403255463,
0.14679589867591858,
-0.05898655205965042,
-0.0808735340833664,
-0.09584476798772812,
0.10404836386442184,
0.07351099699735641,
-0.016896476969122887,
-0.0606243759393692,
0.045994047075510025,
-0.015746235847473145,
-0.16304658353328705,
-0.028193026781082153,
0.10994788259267807,
0.03068993054330349,
0.1177147775888443,
0.0406644269824028,
0.1860278844833374,
0.12325920164585114,
0.05698099732398987,
0.016910294070839882,
-0.005404127761721611,
0.09945766627788544,
-0.04397169128060341,
-0.08606823533773422,
-0.22721460461616516,
0.07804654538631439,
0.07261820137500763,
0.07094210386276245,
-0.13792464137077332,
0.012937812134623528,
-0.0009517170838080347,
0.003938029520213604,
-0.14774443209171295,
0.08460693806409836,
-0.10873701423406601,
-0.1985817849636078,
0.027892353013157845,
0.12623515725135803,
0.01157872099429369,
-0.1594928652048111,
-0.08202321082353592,
0.04639025777578354,
-0.07308077067136765,
-0.1808609664440155,
0.18748484551906586,
0.06644110381603241,
-0.07787930965423584,
-0.07283032685518265,
-0.10998415946960449,
-0.10629164427518845,
-0.027892693877220154,
0.11763161420822144,
-0.09907468408346176,
-0.020807752385735512,
0.0005346176913008094,
0.18222226202487946,
-0.0822918564081192,
-0.008216597139835358,
-0.0353926382958889,
-0.06381651759147644,
-0.14431899785995483,
-0.10567930340766907,
-0.029927443712949753,
-0.13352301716804504,
0.013394876383244991,
0.07965659350156784,
-0.08371671289205551,
-0.10245741903781891,
-0.17959026992321014,
0.061281681060791016,
0.1234692633152008,
-0.022898003458976746,
-0.10531174391508102,
-0.03806498646736145,
-2.784034649142164e-32,
0.016295719891786575,
0.06425154954195023,
-0.00910724326968193,
-0.03856326639652252,
0.005450056400150061,
0.06935381889343262,
-0.11156559735536575,
-0.02255658619105816,
-0.20986899733543396,
-0.03789997473359108,
0.06098359078168869,
0.08589006960391998,
0.09849189966917038,
0.0063148546032607555,
-0.15801113843917847,
0.09009964019060135,
0.10784715414047241,
-0.020732469856739044,
-0.003969900775700808,
0.2321973741054535,
0.1076822504401207,
0.002919448772445321,
-0.017445171251893044,
-0.11276305466890335,
-0.07524508237838745,
0.054824259132146835,
-0.11623755842447281,
0.06851835548877716,
0.1294475793838501,
0.13247187435626984,
-0.16616660356521606,
-0.11920388042926788,
-0.028952835127711296,
0.23427294194698334,
0.13003212213516235,
0.0955500677227974,
-0.13867142796516418,
-0.07387114316225052,
-0.0865018367767334,
-0.03882055729627609,
0.11248787492513657,
-0.05803747475147247,
-0.10127991437911987,
-0.03253797069191933,
0.09001706540584564,
-0.004861175548285246,
-0.00040783456643112004,
0.11654502153396606,
0.011116315610706806,
0.08683857321739197,
-0.0602128840982914,
0.16573868691921234,
0.015304873697459698,
0.05029278248548508,
0.08807976543903351,
-0.0911678671836853,
0.0852527841925621,
0.09156093746423721,
0.0015040554571896791,
0.03109484352171421,
0.0016487593529745936,
-0.008423831313848495,
0.04753366857767105,
0.009237315505743027,
0.02807910367846489,
0.056618332862854004,
-0.11608746647834778,
-0.03706363961100578,
0.08733165264129639,
-0.09486213326454163,
0.1887398064136505,
0.08546769618988037,
0.23315593600273132,
-0.10729309916496277,
-0.2095995992422104,
0.0042212591506540775,
-0.12820780277252197,
-0.04112960770726204,
0.06652788072824478,
0.06114216521382332,
-0.059297166764736176,
0.0881565660238266,
-0.09075970947742462,
-0.002104447688907385,
0.07576584070920944,
0.024452652782201767,
-0.002486746059730649,
-0.04299194738268852,
-0.06915397197008133,
0.026856809854507446,
-0.2522783875465393,
0.055881865322589874,
-0.19367766380310059,
0.053593773394823074,
-0.050724226981401443,
0.21487025916576385,
0.021677320823073387,
0.16699860990047455,
0.09930755943059921,
-0.08787355571985245,
-0.12464728206396103,
-0.009909979067742825,
0.17533621191978455,
0.1707206517457962,
0.010902253910899162,
-0.06540524214506149,
0.24956130981445312,
0.019636256620287895,
-0.2005763053894043,
0.02950247935950756,
0.11019907891750336,
-0.021058695390820503,
-0.011780086904764175,
-0.09811190515756607,
-0.03092384710907936,
-0.008420733734965324,
-0.025457024574279785,
0.059825509786605835,
-0.08801842480897903,
0.09684494137763977,
-0.17341919243335724,
-0.04641370102763176,
-0.19259093701839447,
0.07327542454004288,
0.05856497585773468,
0.07729672640562057,
-0.05448022484779358,
0.030107539147138596,
0.1913657784461975,
-0.13332349061965942,
-0.07085484266281128,
-0.12229080498218536,
7.31596514924604e-7,
0.08696364611387253,
0.1384766846895218,
0.09951326996088028,
-0.036527395248413086,
-0.08589368313550949,
-0.002310957759618759,
-0.06054306402802467,
-0.07811116427183151,
-0.03426210582256317,
0.07539273798465729,
0.06675301492214203,
-0.0056946370750665665,
-0.08655842393636703,
-0.007025262340903282,
-0.06824426352977753,
-0.18402716517448425,
-0.07173056155443192,
-0.08218416571617126,
-0.2019982784986496,
0.04850216209888458,
-0.07952486723661423,
0.1116534024477005,
0.010158587247133255,
0.03889438882470131,
0.02011551521718502,
-0.0139157148078084,
-0.164054274559021,
-0.10501877218484879,
0.3157622218132019,
0.018511932343244553,
0.013071337714791298,
-0.022222895175218582,
-0.03479364514350891,
-0.19578000903129578,
-0.05115991458296776,
-0.163663849234581,
-0.22415399551391602,
-0.0062049138359725475,
-0.06350187957286835,
-0.004679741337895393,
0.06091447174549103,
0.01690933108329773,
-0.07037920504808426,
-0.34006267786026,
0.07389882206916809,
0.0013083659578114748,
-0.05131446197628975,
0.06993141025304794,
-0.12787924706935883,
0.06014604866504669,
0.0887250229716301,
-0.10021568089723587,
-0.030570637434720993,
0.11464878171682358,
0.0026261580642312765,
-0.13594894111156464,
-0.05989740043878555,
-0.06535735726356506,
0.12854167819023132,
0.030922705307602882,
0.01896747574210167,
-0.045470766723155975,
-0.09436986595392227,
0.13470503687858582,
-0.09683819115161896,
0.033565253019332886,
0.05083952099084854,
1.509120195777918e-34,
0.031483691185712814,
-0.005848397500813007,
0.06619663536548615,
-0.06876341998577118,
0.049300339072942734,
0.009870901703834534,
0.15425126254558563,
0.061678316444158554,
-0.022453222423791885,
-0.09005900472402573,
-0.13703861832618713
] |
https://github.com/huggingface/datasets/issues/5970 | description disappearing from Info when Uploading a Dataset Created with `from_dict` | Here's a minimal way to reproduce the bug, for the sake of convenience.
````
from datasets import Dataset, DatasetInfo, load_dataset
episodes_dict = {"test":[1,2,3],"test2": [1,2,4]}
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description="test_str")
)
print(hugging_face_dataset.info)
hugging_face_dataset.push_to_hub("balisujohn/minari_test", private=True)
redownloaded_dataset= load_dataset("balisujohn/minari_test")["train"]
print(redownloaded_dataset.info)
````
| ### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
| 37 | description disappearing from Info when Uploading a Dataset Created with `from_dict`
### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
Here's a minimal way to reproduce the bug, for the sake of convenience.
````
from datasets import Dataset, DatasetInfo, load_dataset
episodes_dict = {"test":[1,2,3],"test2": [1,2,4]}
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description="test_str")
)
print(hugging_face_dataset.info)
hugging_face_dataset.push_to_hub("balisujohn/minari_test", private=True)
redownloaded_dataset= load_dataset("balisujohn/minari_test")["train"]
print(redownloaded_dataset.info)
````
| [
0.13171756267547607,
0.0239928737282753,
-0.05375227332115173,
0.11057797074317932,
0.17905892431735992,
-0.008959664031863213,
0.003947068937122822,
0.03979096561670303,
-0.22852753102779388,
0.03503381833434105,
0.018554555252194405,
-0.18803226947784424,
0.07285238802433014,
0.06492399424314499,
0.04766003414988518,
0.10256741940975189,
-0.07641316205263138,
-0.01881994679570198,
0.014033135958015919,
0.06335579603910446,
-0.1676730066537857,
0.14224959909915924,
0.09370042383670807,
-0.009603084996342659,
-0.04317526891827583,
0.02825155109167099,
-0.020771048963069916,
0.04080192744731903,
-0.172406867146492,
-0.21184749901294708,
-0.06872662156820297,
0.04742156341671944,
0.10290099680423737,
-0.03765816241502762,
0.000005969333869870752,
-0.022110989317297935,
0.17293335497379303,
0.008674285374581814,
-0.09136392921209335,
0.00395694375038147,
0.11865417659282684,
-0.13079072535037994,
0.24217312037944794,
-0.05921896919608116,
-0.06254828721284866,
-0.04064357653260231,
0.061480678617954254,
-0.038235440850257874,
0.03640502318739891,
-0.09110461920499802,
-0.005054687149822712,
0.10783761739730835,
0.008417326025664806,
-0.1523144692182541,
0.14918260276317596,
0.15653523802757263,
-0.037054598331451416,
-0.02865452878177166,
-0.18246245384216309,
-0.037517715245485306,
0.07173099368810654,
-0.01504809781908989,
-0.004841765388846397,
0.08429305255413055,
-0.07594136893749237,
0.017893686890602112,
-0.072543203830719,
-0.17348423600196838,
0.0859379768371582,
0.02035134844481945,
0.04459058865904808,
-0.006304069887846708,
-0.10010404139757156,
0.0015636897878721356,
-0.029169805347919464,
-0.11062127351760864,
-0.1466343104839325,
0.1268717497587204,
0.04255439341068268,
-0.11539625376462936,
0.005242316052317619,
0.05386127158999443,
-0.006451069377362728,
0.06644535809755325,
-0.19027285277843475,
0.001922500436194241,
-0.1294563114643097,
0.1012493297457695,
-0.16880522668361664,
-0.1549699455499649,
-0.011119936592876911,
-0.06626271456480026,
-0.10577009618282318,
-0.009531304240226746,
0.1659812331199646,
0.04212809354066849,
0.04504891857504845,
-0.18620692193508148,
0.12842682003974915,
0.013267752714455128,
-0.17724473774433136,
-0.0774688646197319,
-0.06746651232242584,
0.025263162329792976,
0.0542997345328331,
0.1396051049232483,
0.10568156838417053,
-0.015317495912313461,
0.03277351334691048,
0.08739813417196274,
0.00576279079541564,
0.00039828583248890936,
0.04400808364152908,
0.12361831963062286,
0.20746135711669922,
-0.1567157804965973,
0.13617554306983948,
0.19878137111663818,
0.01889481209218502,
0.13898612558841705,
-0.04073642939329147,
-0.024460390210151672,
-0.17821338772773743,
0.13207243382930756,
-0.03163955360651016,
-0.03745007514953613,
0.14038001000881195,
0.01057931873947382,
0.09619595855474472,
0.051096946001052856,
-0.19244055449962616,
0.017489055171608925,
-0.013566644862294197,
0.04189224913716316,
0.04868572577834129,
-0.028588609769940376,
0.1373031884431839,
-0.2103121131658554,
0.25873029232025146,
-0.10884375870227814,
-0.10601893067359924,
-0.010031339712440968,
0.06709150969982147,
0.1192382201552391,
0.15784454345703125,
0.14680705964565277,
0.11640748381614685,
-0.10466007143259048,
0.06019530072808266,
0.018075957894325256,
-0.11218483000993729,
0.2736392617225647,
-0.2170623540878296,
0.03619889169931412,
-0.22852298617362976,
0.054092250764369965,
-0.04422065615653992,
-0.02986988052725792,
-0.014177977107465267,
0.05398119240999222,
0.10745014250278473,
0.04029625654220581,
0.12870825827121735,
-0.09415096044540405,
0.08779280632734299,
0.24249377846717834,
-0.06379164010286331,
-0.04441569745540619,
0.08167959004640579,
-0.01730417087674141,
0.12842363119125366,
-0.13638825714588165,
0.008740591816604137,
0.12729030847549438,
-0.05132383853197098,
0.218521386384964,
-0.15796278417110443,
-0.09933807700872421,
-0.11821333318948746,
0.13370569050312042,
-0.05401191487908363,
-0.010030955076217651,
-0.047774359583854675,
-0.10399091988801956,
0.04682817682623863,
0.09338755905628204,
-0.04282083734869957,
0.002506196964532137,
0.12480255216360092,
-0.05310042202472687,
-0.09330296516418457,
-0.01429583877325058,
0.092084601521492,
-0.08593318611383438,
-0.09348424524068832,
0.005668263416737318,
-0.06827875226736069,
-0.058195192366838455,
0.2123449444770813,
0.019039103761315346,
0.15736393630504608,
0.06294222921133041,
0.10010132938623428,
0.08603133261203766,
0.019581591710448265,
-0.005497288890182972,
-0.07296540588140488,
-0.02933174930512905,
-0.025565247982740402,
0.04417967423796654,
-0.1982945054769516,
0.04029744490981102,
-0.003264983417466283,
0.01383838802576065,
-0.22000491619110107,
-0.3128865361213684,
0.010959957726299763,
-0.027994878590106964,
-0.09417064487934113,
0.12475445866584778,
0.08660829812288284,
0.12328828126192093,
-0.10351353883743286,
0.09188691526651382,
-0.04211173951625824,
0.08014708012342453,
0.08713556826114655,
-0.14873625338077545,
-0.021709784865379333,
0.09237468987703323,
-0.025507459416985512,
0.1252138316631317,
0.09579204767942429,
0.18839067220687866,
0.0037559254560619593,
0.1189090684056282,
-0.08826570212841034,
-0.27017128467559814,
0.10505521297454834,
0.08646286278963089,
-0.025750217959284782,
0.04764026403427124,
0.04012945666909218,
-0.024205833673477173,
-0.1044405922293663,
-0.1547824889421463,
0.009935619309544563,
0.13306523859500885,
-0.006888280156999826,
0.010299854911863804,
0.14144034683704376,
0.10465005040168762,
-0.11684107780456543,
-0.021407892927527428,
-0.03653794527053833,
-0.06171562522649765,
0.02222355268895626,
0.09936214238405228,
-0.05838068947196007,
-0.10221254080533981,
0.3909671902656555,
0.019329357892274857,
-0.06996158510446548,
0.015001765452325344,
0.0020774947479367256,
-0.05953344702720642,
0.07276349514722824,
-0.0008370678988285363,
-0.01020663883537054,
0.11612413823604584,
0.05614088103175163,
-0.031616248190402985,
-0.060385506600141525,
-0.006699546240270138,
-0.003776266472414136,
-0.12393128126859665,
-0.02159970812499523,
0.07179014384746552,
0.1054745614528656,
0.12183672189712524,
0.07599373161792755,
0.13501891493797302,
-0.03299633413553238,
-0.1380823254585266,
0.067374087870121,
0.08229856193065643,
-0.15517041087150574,
-0.0606122724711895,
-0.10501730442047119,
-0.02858663536608219,
-0.15630006790161133,
-0.1809166818857193,
-0.07032063603401184,
-0.07492046803236008,
-0.047684140503406525,
-0.027917925268411636,
-0.024212779477238655,
-0.22164763510227203,
0.09325382858514786,
-0.0847071185708046,
-0.009059683419764042,
0.20503924787044525,
-0.03166232630610466,
-0.0609133280813694,
-0.18988147377967834,
0.05587755888700485,
0.18593668937683105,
0.0660577118396759,
-0.17255938053131104,
-0.04873261600732803,
-0.059057001024484634,
0.02442747913300991,
-0.10105681419372559,
0.08284011483192444,
-0.038342300802469254,
0.05528693273663521,
-0.1484925001859665,
-0.20605158805847168,
0.18206749856472015,
0.15391622483730316,
-0.08598572760820389,
-0.09466543793678284,
-0.004085300024598837,
-0.06434427201747894,
0.026242123916745186,
-0.07625449448823929,
-0.095998615026474,
-0.18123535811901093,
0.17467769980430603,
0.04924547299742699,
-0.0407777801156044,
0.27426663041114807,
-0.056998468935489655,
-0.16921930015087128,
-0.019399212673306465,
-0.03517669066786766,
-0.09549660980701447,
0.01808812841773033,
0.022141922265291214,
0.045829739421606064,
0.0002565413014963269,
0.0014931918121874332,
0.04123351350426674,
-0.055907756090164185,
0.04956964775919914,
-0.11337089538574219,
-0.045227088034152985,
-0.030152471736073494,
0.16845645010471344,
0.15139161050319672,
0.056370873004198074,
0.16702626645565033,
-0.09495830535888672,
0.007094494998455048,
-0.1682370901107788,
-0.137177512049675,
-0.07579828053712845,
0.050303515046834946,
-0.044688377529382706,
-0.07201313227415085,
-0.010247988626360893,
-0.038025081157684326,
-0.07567038387060165,
0.005673928651958704,
0.10977627336978912,
0.0667506605386734,
0.02397288754582405,
0.13435381650924683,
-0.1369420886039734,
-0.05948103591799736,
-0.05763764679431915,
0.04492983967065811,
-0.08367107808589935,
0.1375783532857895,
-0.09745229035615921,
0.040186937898397446,
0.08297310024499893,
0.11289215087890625,
0.022334938868880272,
0.09361106157302856,
-0.15292783081531525,
-0.18912050127983093,
0.01230559404939413,
0.08012355864048004,
0.29834049940109253,
0.23108291625976562,
0.13728493452072144,
-0.11403843015432358,
0.029938334599137306,
0.09716692566871643,
0.0638272762298584,
-0.006476451177150011,
-0.010878329165279865,
-0.051859308034181595,
-0.0665128231048584,
-0.08054616302251816,
0.2444218099117279,
-0.16992084681987762,
-0.04992596432566643,
0.05108575150370598,
-0.010938934981822968,
0.10459588468074799,
0.04134538024663925,
0.09718053042888641,
0.12571534514427185,
-0.012057844549417496,
0.08624400198459625,
-0.012853113934397697,
0.03800046816468239,
-0.0658189207315445,
0.03385154902935028,
0.13551047444343567,
0.07855244725942612,
0.03100370243191719,
0.18907134234905243,
-0.05832478776574135,
-0.04505264386534691,
0.045126378536224365,
-0.1674322485923767,
-0.10650104284286499,
-0.15047839283943176,
-0.0598631277680397,
-0.02426004409790039,
0.08288607001304626,
-0.013114566914737225,
0.009756045415997505,
0.03669348359107971,
-0.07004901021718979,
0.03218556568026543,
0.01826315000653267,
0.12233144789934158,
-0.02023775689303875,
0.1428995579481125,
0.04260287061333656,
0.16395778954029083,
-0.03216654434800148,
0.12102016061544418,
-0.11651504784822464,
-0.06546798348426819,
-0.12320882827043533,
-0.16819775104522705,
0.09207694232463837,
-0.04890533536672592,
-0.009145266376435757,
0.2531861364841461,
-0.04716411605477333,
-0.1393311619758606,
-0.1652166247367859,
0.0976044088602066,
-0.04649600759148598,
-0.12952452898025513,
-0.03807331994175911,
-0.12463880330324173,
-0.0865531712770462,
-0.1901549994945526,
0.02455771341919899,
0.06487021595239639,
-0.04837212339043617,
0.053902797400951385,
0.060869984328746796,
-0.1503998041152954,
-0.052715964615345,
0.13193856179714203,
0.0960584357380867,
-0.00836070068180561,
0.06545130908489227,
0.21439935266971588,
-0.0802026093006134,
0.03298115357756615,
0.026920828968286514,
-0.06061818078160286,
0.0703754797577858,
-0.03611461818218231,
0.13234414160251617,
0.061893217265605927,
-0.05524773895740509,
-0.025487707927823067,
0.002894253935664892,
-0.012514949776232243,
-0.0007414500578306615,
0.22027966380119324,
0.014186411164700985,
-0.08480601757764816,
-0.17473609745502472,
-0.1738331913948059,
0.028002535924315453,
0.10725121200084686,
-0.0026510939933359623,
-0.16271106898784637,
-0.0005140310968272388,
0.0946853831410408,
0.019061964005231857,
0.15016856789588928,
0.07202038913965225,
-0.044271111488342285,
0.12125717103481293,
-0.052847567945718765,
-0.19555790722370148,
-0.08670847862958908,
-0.0006827249308116734,
0.2305079996585846,
-0.059018585830926895,
0.14712795615196228,
-0.04914778098464012,
-0.10434847325086594,
-0.22544701397418976,
0.04876905679702759,
0.10511014610528946,
0.04539498686790466,
-0.14621105790138245,
0.0903959721326828,
0.165125772356987,
0.008847996592521667,
0.07589202374219894,
-0.12783293426036835,
-0.1470174640417099,
-0.22621935606002808,
0.010914230719208717,
0.11782403290271759,
0.07538681477308273,
0.041068125516176224,
0.020707925781607628,
0.14734545350074768,
-0.03633593022823334,
-0.05924907699227333,
0.10333391278982162,
-0.051412273198366165,
-0.16307279467582703,
0.22351278364658356,
0.13264593482017517,
0.004483915865421295,
0.18738588690757751,
0.14867328107357025,
0.023041587322950363,
-0.031277041882276535,
0.10709760338068008,
0.18140053749084473,
0.08420009166002274,
-0.030600368976593018,
0.08439760655164719,
-0.012901068665087223,
-0.22617760300636292,
-0.0769364982843399,
-0.04639704152941704,
-0.0386495403945446,
-0.12140479683876038,
0.039201293140649796,
-0.06344366073608398,
-0.1346023976802826,
-0.14443522691726685,
0.009564915671944618,
0.13456039130687714,
0.06979489326477051,
0.14704737067222595,
0.015484449453651905,
-2.4440089491714012e-32,
-0.07275188714265823,
-0.02146030031144619,
-0.020478710532188416,
0.09892139583826065,
-0.1514844447374344,
0.27823013067245483,
-0.009372929111123085,
-0.043471552431583405,
-0.04549143835902214,
-0.024356761947274208,
0.0865582749247551,
0.02236754633486271,
-0.04944434389472008,
0.011281800456345081,
0.018896503373980522,
-0.02832885831594467,
-0.07180795818567276,
0.045868415385484695,
-0.04655780270695686,
0.1859930455684662,
0.1251470297574997,
-0.08863679319620132,
0.17491738498210907,
-0.19390267133712769,
0.1485193520784378,
0.03204311802983284,
-0.18950743973255157,
-0.15867748856544495,
-0.05954548344016075,
-0.044286031275987625,
-0.07059743255376816,
0.04053414240479469,
-0.005547522567212582,
0.08732213824987411,
-0.08979655802249908,
-0.11198079586029053,
-0.004149869550019503,
0.016008637845516205,
-0.05345965549349785,
-0.08041801303625107,
-0.08658244460821152,
0.10071974247694016,
-0.038827359676361084,
-0.10128118842840195,
0.06121792644262314,
-0.018596019595861435,
0.01137874461710453,
0.033912450075149536,
-0.15035070478916168,
-0.07450666278600693,
0.013631962239742279,
-0.0012889705831184983,
0.04428825154900551,
-0.0823153406381607,
0.04944610968232155,
-0.13088279962539673,
0.12121868133544922,
0.06614702939987183,
-0.06040634587407112,
-0.024792606011033058,
0.06824611127376556,
-0.013053031638264656,
-0.013609358109533787,
0.010000702925026417,
0.04937921464443207,
-0.024573028087615967,
0.2545672357082367,
0.2844650149345398,
0.19737420976161957,
0.021655505523085594,
-0.003362315008416772,
0.07205481082201004,
-0.05454104021191597,
-0.08335456997156143,
-0.20221179723739624,
-0.01170364674180746,
0.07223339378833771,
-0.14043334126472473,
-0.022510895505547523,
-0.06773123890161514,
0.1464545726776123,
-0.0350133553147316,
-0.09538426250219345,
-0.10982729494571686,
-0.18267884850502014,
0.039019279181957245,
-0.008143852464854717,
0.007181543856859207,
-0.04250304773449898,
0.022954855114221573,
-0.14552882313728333,
0.1358681321144104,
-0.17526063323020935,
0.009021836332976818,
-0.11299469321966171,
-0.005620947573333979,
-0.15670134127140045,
0.03985530510544777,
0.010905373841524124,
0.14433564245700836,
0.029213935136795044,
-0.08477137237787247,
0.12166611850261688,
0.0625808909535408,
0.14251609146595,
0.012630758807063103,
0.23041380941867828,
0.11254066973924637,
-0.1010935977101326,
-0.1639447808265686,
-0.10566691309213638,
0.03646997734904289,
0.08540800958871841,
0.00886131264269352,
0.09279870241880417,
0.0028040031902492046,
-0.19694359600543976,
-0.10841543227434158,
0.12951070070266724,
0.11636820435523987,
-0.06680666655302048,
-0.12706921994686127,
-0.19806259870529175,
0.04597199335694313,
0.009904656559228897,
0.12526170909404755,
-0.24535828828811646,
-0.20050954818725586,
0.21306076645851135,
0.01930749975144863,
0.020168377086520195,
-0.1856120079755783,
7.743448122710106e-7,
-0.07085242867469788,
0.1756201535463333,
0.14773817360401154,
-0.0391802042722702,
0.03818129003047943,
0.12808024883270264,
-0.14477784931659698,
0.026667112484574318,
-0.06543374806642532,
0.11751015484333038,
0.055386316031217575,
-0.10126106441020966,
-0.032450709491968155,
-0.14716318249702454,
0.004701987840235233,
-0.044514819979667664,
-0.12401068210601807,
-0.08109112083911896,
-0.18173234164714813,
0.05150651931762695,
0.07022988051176071,
0.07834425568580627,
-0.08910896629095078,
0.03078691102564335,
-0.0272662453353405,
-0.2512047290802002,
-0.0025061587803065777,
-0.09365127980709076,
-0.006875672843307257,
-0.036920513957738876,
-0.07084951549768448,
0.1310676485300064,
-0.03454924002289772,
0.1330408751964569,
-0.08316586166620255,
-0.027153005823493004,
-0.089177206158638,
-0.002974022412672639,
0.027062419801950455,
0.10873916745185852,
0.0053902119398117065,
0.1320686638355255,
0.05445786938071251,
-0.1705484539270401,
0.10748731344938278,
0.12099160999059677,
-0.07753747701644897,
-0.1077469140291214,
-0.06301611661911011,
0.06201180815696716,
-0.019031383097171783,
0.0431126207113266,
0.12484777718782425,
0.06196170672774315,
-0.028728729113936424,
0.02677040360867977,
-0.0832667201757431,
-0.13276559114456177,
0.06707067787647247,
-0.1079942137002945,
-0.05316510796546936,
-0.1459151953458786,
-0.07776439189910889,
0.006524719297885895,
0.09156335145235062,
-0.24157491326332092,
0.051608856767416,
2.4796601040777577e-34,
-0.007606664206832647,
-0.07158320397138596,
-0.030268004164099693,
-0.1574094593524933,
0.025222910568118095,
0.004519199952483177,
0.2398032248020172,
0.08639713376760483,
-0.006578897126019001,
-0.05071011185646057,
-0.11600560694932938
] |
https://github.com/huggingface/datasets/issues/5970 | description disappearing from Info when Uploading a Dataset Created with `from_dict` | Thanks for reporting !
For now I would recommend uploading a separate JSON file for your metadata.
Alternatively you can upload a second configuration of the dataset containing your metadata but this feature is not released yet (though you can already use it from [here](https://github.com/huggingface/datasets/pull/5331), it will be released soon) | ### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
| 50 | description disappearing from Info when Uploading a Dataset Created with `from_dict`
### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
Thanks for reporting !
For now I would recommend uploading a separate JSON file for your metadata.
Alternatively you can upload a second configuration of the dataset containing your metadata but this feature is not released yet (though you can already use it from [here](https://github.com/huggingface/datasets/pull/5331), it will be released soon) | [
0.13171756267547607,
0.0239928737282753,
-0.05375227332115173,
0.11057797074317932,
0.17905892431735992,
-0.008959664031863213,
0.003947068937122822,
0.03979096561670303,
-0.22852753102779388,
0.03503381833434105,
0.018554555252194405,
-0.18803226947784424,
0.07285238802433014,
0.06492399424314499,
0.04766003414988518,
0.10256741940975189,
-0.07641316205263138,
-0.01881994679570198,
0.014033135958015919,
0.06335579603910446,
-0.1676730066537857,
0.14224959909915924,
0.09370042383670807,
-0.009603084996342659,
-0.04317526891827583,
0.02825155109167099,
-0.020771048963069916,
0.04080192744731903,
-0.172406867146492,
-0.21184749901294708,
-0.06872662156820297,
0.04742156341671944,
0.10290099680423737,
-0.03765816241502762,
0.000005969333869870752,
-0.022110989317297935,
0.17293335497379303,
0.008674285374581814,
-0.09136392921209335,
0.00395694375038147,
0.11865417659282684,
-0.13079072535037994,
0.24217312037944794,
-0.05921896919608116,
-0.06254828721284866,
-0.04064357653260231,
0.061480678617954254,
-0.038235440850257874,
0.03640502318739891,
-0.09110461920499802,
-0.005054687149822712,
0.10783761739730835,
0.008417326025664806,
-0.1523144692182541,
0.14918260276317596,
0.15653523802757263,
-0.037054598331451416,
-0.02865452878177166,
-0.18246245384216309,
-0.037517715245485306,
0.07173099368810654,
-0.01504809781908989,
-0.004841765388846397,
0.08429305255413055,
-0.07594136893749237,
0.017893686890602112,
-0.072543203830719,
-0.17348423600196838,
0.0859379768371582,
0.02035134844481945,
0.04459058865904808,
-0.006304069887846708,
-0.10010404139757156,
0.0015636897878721356,
-0.029169805347919464,
-0.11062127351760864,
-0.1466343104839325,
0.1268717497587204,
0.04255439341068268,
-0.11539625376462936,
0.005242316052317619,
0.05386127158999443,
-0.006451069377362728,
0.06644535809755325,
-0.19027285277843475,
0.001922500436194241,
-0.1294563114643097,
0.1012493297457695,
-0.16880522668361664,
-0.1549699455499649,
-0.011119936592876911,
-0.06626271456480026,
-0.10577009618282318,
-0.009531304240226746,
0.1659812331199646,
0.04212809354066849,
0.04504891857504845,
-0.18620692193508148,
0.12842682003974915,
0.013267752714455128,
-0.17724473774433136,
-0.0774688646197319,
-0.06746651232242584,
0.025263162329792976,
0.0542997345328331,
0.1396051049232483,
0.10568156838417053,
-0.015317495912313461,
0.03277351334691048,
0.08739813417196274,
0.00576279079541564,
0.00039828583248890936,
0.04400808364152908,
0.12361831963062286,
0.20746135711669922,
-0.1567157804965973,
0.13617554306983948,
0.19878137111663818,
0.01889481209218502,
0.13898612558841705,
-0.04073642939329147,
-0.024460390210151672,
-0.17821338772773743,
0.13207243382930756,
-0.03163955360651016,
-0.03745007514953613,
0.14038001000881195,
0.01057931873947382,
0.09619595855474472,
0.051096946001052856,
-0.19244055449962616,
0.017489055171608925,
-0.013566644862294197,
0.04189224913716316,
0.04868572577834129,
-0.028588609769940376,
0.1373031884431839,
-0.2103121131658554,
0.25873029232025146,
-0.10884375870227814,
-0.10601893067359924,
-0.010031339712440968,
0.06709150969982147,
0.1192382201552391,
0.15784454345703125,
0.14680705964565277,
0.11640748381614685,
-0.10466007143259048,
0.06019530072808266,
0.018075957894325256,
-0.11218483000993729,
0.2736392617225647,
-0.2170623540878296,
0.03619889169931412,
-0.22852298617362976,
0.054092250764369965,
-0.04422065615653992,
-0.02986988052725792,
-0.014177977107465267,
0.05398119240999222,
0.10745014250278473,
0.04029625654220581,
0.12870825827121735,
-0.09415096044540405,
0.08779280632734299,
0.24249377846717834,
-0.06379164010286331,
-0.04441569745540619,
0.08167959004640579,
-0.01730417087674141,
0.12842363119125366,
-0.13638825714588165,
0.008740591816604137,
0.12729030847549438,
-0.05132383853197098,
0.218521386384964,
-0.15796278417110443,
-0.09933807700872421,
-0.11821333318948746,
0.13370569050312042,
-0.05401191487908363,
-0.010030955076217651,
-0.047774359583854675,
-0.10399091988801956,
0.04682817682623863,
0.09338755905628204,
-0.04282083734869957,
0.002506196964532137,
0.12480255216360092,
-0.05310042202472687,
-0.09330296516418457,
-0.01429583877325058,
0.092084601521492,
-0.08593318611383438,
-0.09348424524068832,
0.005668263416737318,
-0.06827875226736069,
-0.058195192366838455,
0.2123449444770813,
0.019039103761315346,
0.15736393630504608,
0.06294222921133041,
0.10010132938623428,
0.08603133261203766,
0.019581591710448265,
-0.005497288890182972,
-0.07296540588140488,
-0.02933174930512905,
-0.025565247982740402,
0.04417967423796654,
-0.1982945054769516,
0.04029744490981102,
-0.003264983417466283,
0.01383838802576065,
-0.22000491619110107,
-0.3128865361213684,
0.010959957726299763,
-0.027994878590106964,
-0.09417064487934113,
0.12475445866584778,
0.08660829812288284,
0.12328828126192093,
-0.10351353883743286,
0.09188691526651382,
-0.04211173951625824,
0.08014708012342453,
0.08713556826114655,
-0.14873625338077545,
-0.021709784865379333,
0.09237468987703323,
-0.025507459416985512,
0.1252138316631317,
0.09579204767942429,
0.18839067220687866,
0.0037559254560619593,
0.1189090684056282,
-0.08826570212841034,
-0.27017128467559814,
0.10505521297454834,
0.08646286278963089,
-0.025750217959284782,
0.04764026403427124,
0.04012945666909218,
-0.024205833673477173,
-0.1044405922293663,
-0.1547824889421463,
0.009935619309544563,
0.13306523859500885,
-0.006888280156999826,
0.010299854911863804,
0.14144034683704376,
0.10465005040168762,
-0.11684107780456543,
-0.021407892927527428,
-0.03653794527053833,
-0.06171562522649765,
0.02222355268895626,
0.09936214238405228,
-0.05838068947196007,
-0.10221254080533981,
0.3909671902656555,
0.019329357892274857,
-0.06996158510446548,
0.015001765452325344,
0.0020774947479367256,
-0.05953344702720642,
0.07276349514722824,
-0.0008370678988285363,
-0.01020663883537054,
0.11612413823604584,
0.05614088103175163,
-0.031616248190402985,
-0.060385506600141525,
-0.006699546240270138,
-0.003776266472414136,
-0.12393128126859665,
-0.02159970812499523,
0.07179014384746552,
0.1054745614528656,
0.12183672189712524,
0.07599373161792755,
0.13501891493797302,
-0.03299633413553238,
-0.1380823254585266,
0.067374087870121,
0.08229856193065643,
-0.15517041087150574,
-0.0606122724711895,
-0.10501730442047119,
-0.02858663536608219,
-0.15630006790161133,
-0.1809166818857193,
-0.07032063603401184,
-0.07492046803236008,
-0.047684140503406525,
-0.027917925268411636,
-0.024212779477238655,
-0.22164763510227203,
0.09325382858514786,
-0.0847071185708046,
-0.009059683419764042,
0.20503924787044525,
-0.03166232630610466,
-0.0609133280813694,
-0.18988147377967834,
0.05587755888700485,
0.18593668937683105,
0.0660577118396759,
-0.17255938053131104,
-0.04873261600732803,
-0.059057001024484634,
0.02442747913300991,
-0.10105681419372559,
0.08284011483192444,
-0.038342300802469254,
0.05528693273663521,
-0.1484925001859665,
-0.20605158805847168,
0.18206749856472015,
0.15391622483730316,
-0.08598572760820389,
-0.09466543793678284,
-0.004085300024598837,
-0.06434427201747894,
0.026242123916745186,
-0.07625449448823929,
-0.095998615026474,
-0.18123535811901093,
0.17467769980430603,
0.04924547299742699,
-0.0407777801156044,
0.27426663041114807,
-0.056998468935489655,
-0.16921930015087128,
-0.019399212673306465,
-0.03517669066786766,
-0.09549660980701447,
0.01808812841773033,
0.022141922265291214,
0.045829739421606064,
0.0002565413014963269,
0.0014931918121874332,
0.04123351350426674,
-0.055907756090164185,
0.04956964775919914,
-0.11337089538574219,
-0.045227088034152985,
-0.030152471736073494,
0.16845645010471344,
0.15139161050319672,
0.056370873004198074,
0.16702626645565033,
-0.09495830535888672,
0.007094494998455048,
-0.1682370901107788,
-0.137177512049675,
-0.07579828053712845,
0.050303515046834946,
-0.044688377529382706,
-0.07201313227415085,
-0.010247988626360893,
-0.038025081157684326,
-0.07567038387060165,
0.005673928651958704,
0.10977627336978912,
0.0667506605386734,
0.02397288754582405,
0.13435381650924683,
-0.1369420886039734,
-0.05948103591799736,
-0.05763764679431915,
0.04492983967065811,
-0.08367107808589935,
0.1375783532857895,
-0.09745229035615921,
0.040186937898397446,
0.08297310024499893,
0.11289215087890625,
0.022334938868880272,
0.09361106157302856,
-0.15292783081531525,
-0.18912050127983093,
0.01230559404939413,
0.08012355864048004,
0.29834049940109253,
0.23108291625976562,
0.13728493452072144,
-0.11403843015432358,
0.029938334599137306,
0.09716692566871643,
0.0638272762298584,
-0.006476451177150011,
-0.010878329165279865,
-0.051859308034181595,
-0.0665128231048584,
-0.08054616302251816,
0.2444218099117279,
-0.16992084681987762,
-0.04992596432566643,
0.05108575150370598,
-0.010938934981822968,
0.10459588468074799,
0.04134538024663925,
0.09718053042888641,
0.12571534514427185,
-0.012057844549417496,
0.08624400198459625,
-0.012853113934397697,
0.03800046816468239,
-0.0658189207315445,
0.03385154902935028,
0.13551047444343567,
0.07855244725942612,
0.03100370243191719,
0.18907134234905243,
-0.05832478776574135,
-0.04505264386534691,
0.045126378536224365,
-0.1674322485923767,
-0.10650104284286499,
-0.15047839283943176,
-0.0598631277680397,
-0.02426004409790039,
0.08288607001304626,
-0.013114566914737225,
0.009756045415997505,
0.03669348359107971,
-0.07004901021718979,
0.03218556568026543,
0.01826315000653267,
0.12233144789934158,
-0.02023775689303875,
0.1428995579481125,
0.04260287061333656,
0.16395778954029083,
-0.03216654434800148,
0.12102016061544418,
-0.11651504784822464,
-0.06546798348426819,
-0.12320882827043533,
-0.16819775104522705,
0.09207694232463837,
-0.04890533536672592,
-0.009145266376435757,
0.2531861364841461,
-0.04716411605477333,
-0.1393311619758606,
-0.1652166247367859,
0.0976044088602066,
-0.04649600759148598,
-0.12952452898025513,
-0.03807331994175911,
-0.12463880330324173,
-0.0865531712770462,
-0.1901549994945526,
0.02455771341919899,
0.06487021595239639,
-0.04837212339043617,
0.053902797400951385,
0.060869984328746796,
-0.1503998041152954,
-0.052715964615345,
0.13193856179714203,
0.0960584357380867,
-0.00836070068180561,
0.06545130908489227,
0.21439935266971588,
-0.0802026093006134,
0.03298115357756615,
0.026920828968286514,
-0.06061818078160286,
0.0703754797577858,
-0.03611461818218231,
0.13234414160251617,
0.061893217265605927,
-0.05524773895740509,
-0.025487707927823067,
0.002894253935664892,
-0.012514949776232243,
-0.0007414500578306615,
0.22027966380119324,
0.014186411164700985,
-0.08480601757764816,
-0.17473609745502472,
-0.1738331913948059,
0.028002535924315453,
0.10725121200084686,
-0.0026510939933359623,
-0.16271106898784637,
-0.0005140310968272388,
0.0946853831410408,
0.019061964005231857,
0.15016856789588928,
0.07202038913965225,
-0.044271111488342285,
0.12125717103481293,
-0.052847567945718765,
-0.19555790722370148,
-0.08670847862958908,
-0.0006827249308116734,
0.2305079996585846,
-0.059018585830926895,
0.14712795615196228,
-0.04914778098464012,
-0.10434847325086594,
-0.22544701397418976,
0.04876905679702759,
0.10511014610528946,
0.04539498686790466,
-0.14621105790138245,
0.0903959721326828,
0.165125772356987,
0.008847996592521667,
0.07589202374219894,
-0.12783293426036835,
-0.1470174640417099,
-0.22621935606002808,
0.010914230719208717,
0.11782403290271759,
0.07538681477308273,
0.041068125516176224,
0.020707925781607628,
0.14734545350074768,
-0.03633593022823334,
-0.05924907699227333,
0.10333391278982162,
-0.051412273198366165,
-0.16307279467582703,
0.22351278364658356,
0.13264593482017517,
0.004483915865421295,
0.18738588690757751,
0.14867328107357025,
0.023041587322950363,
-0.031277041882276535,
0.10709760338068008,
0.18140053749084473,
0.08420009166002274,
-0.030600368976593018,
0.08439760655164719,
-0.012901068665087223,
-0.22617760300636292,
-0.0769364982843399,
-0.04639704152941704,
-0.0386495403945446,
-0.12140479683876038,
0.039201293140649796,
-0.06344366073608398,
-0.1346023976802826,
-0.14443522691726685,
0.009564915671944618,
0.13456039130687714,
0.06979489326477051,
0.14704737067222595,
0.015484449453651905,
-2.4440089491714012e-32,
-0.07275188714265823,
-0.02146030031144619,
-0.020478710532188416,
0.09892139583826065,
-0.1514844447374344,
0.27823013067245483,
-0.009372929111123085,
-0.043471552431583405,
-0.04549143835902214,
-0.024356761947274208,
0.0865582749247551,
0.02236754633486271,
-0.04944434389472008,
0.011281800456345081,
0.018896503373980522,
-0.02832885831594467,
-0.07180795818567276,
0.045868415385484695,
-0.04655780270695686,
0.1859930455684662,
0.1251470297574997,
-0.08863679319620132,
0.17491738498210907,
-0.19390267133712769,
0.1485193520784378,
0.03204311802983284,
-0.18950743973255157,
-0.15867748856544495,
-0.05954548344016075,
-0.044286031275987625,
-0.07059743255376816,
0.04053414240479469,
-0.005547522567212582,
0.08732213824987411,
-0.08979655802249908,
-0.11198079586029053,
-0.004149869550019503,
0.016008637845516205,
-0.05345965549349785,
-0.08041801303625107,
-0.08658244460821152,
0.10071974247694016,
-0.038827359676361084,
-0.10128118842840195,
0.06121792644262314,
-0.018596019595861435,
0.01137874461710453,
0.033912450075149536,
-0.15035070478916168,
-0.07450666278600693,
0.013631962239742279,
-0.0012889705831184983,
0.04428825154900551,
-0.0823153406381607,
0.04944610968232155,
-0.13088279962539673,
0.12121868133544922,
0.06614702939987183,
-0.06040634587407112,
-0.024792606011033058,
0.06824611127376556,
-0.013053031638264656,
-0.013609358109533787,
0.010000702925026417,
0.04937921464443207,
-0.024573028087615967,
0.2545672357082367,
0.2844650149345398,
0.19737420976161957,
0.021655505523085594,
-0.003362315008416772,
0.07205481082201004,
-0.05454104021191597,
-0.08335456997156143,
-0.20221179723739624,
-0.01170364674180746,
0.07223339378833771,
-0.14043334126472473,
-0.022510895505547523,
-0.06773123890161514,
0.1464545726776123,
-0.0350133553147316,
-0.09538426250219345,
-0.10982729494571686,
-0.18267884850502014,
0.039019279181957245,
-0.008143852464854717,
0.007181543856859207,
-0.04250304773449898,
0.022954855114221573,
-0.14552882313728333,
0.1358681321144104,
-0.17526063323020935,
0.009021836332976818,
-0.11299469321966171,
-0.005620947573333979,
-0.15670134127140045,
0.03985530510544777,
0.010905373841524124,
0.14433564245700836,
0.029213935136795044,
-0.08477137237787247,
0.12166611850261688,
0.0625808909535408,
0.14251609146595,
0.012630758807063103,
0.23041380941867828,
0.11254066973924637,
-0.1010935977101326,
-0.1639447808265686,
-0.10566691309213638,
0.03646997734904289,
0.08540800958871841,
0.00886131264269352,
0.09279870241880417,
0.0028040031902492046,
-0.19694359600543976,
-0.10841543227434158,
0.12951070070266724,
0.11636820435523987,
-0.06680666655302048,
-0.12706921994686127,
-0.19806259870529175,
0.04597199335694313,
0.009904656559228897,
0.12526170909404755,
-0.24535828828811646,
-0.20050954818725586,
0.21306076645851135,
0.01930749975144863,
0.020168377086520195,
-0.1856120079755783,
7.743448122710106e-7,
-0.07085242867469788,
0.1756201535463333,
0.14773817360401154,
-0.0391802042722702,
0.03818129003047943,
0.12808024883270264,
-0.14477784931659698,
0.026667112484574318,
-0.06543374806642532,
0.11751015484333038,
0.055386316031217575,
-0.10126106441020966,
-0.032450709491968155,
-0.14716318249702454,
0.004701987840235233,
-0.044514819979667664,
-0.12401068210601807,
-0.08109112083911896,
-0.18173234164714813,
0.05150651931762695,
0.07022988051176071,
0.07834425568580627,
-0.08910896629095078,
0.03078691102564335,
-0.0272662453353405,
-0.2512047290802002,
-0.0025061587803065777,
-0.09365127980709076,
-0.006875672843307257,
-0.036920513957738876,
-0.07084951549768448,
0.1310676485300064,
-0.03454924002289772,
0.1330408751964569,
-0.08316586166620255,
-0.027153005823493004,
-0.089177206158638,
-0.002974022412672639,
0.027062419801950455,
0.10873916745185852,
0.0053902119398117065,
0.1320686638355255,
0.05445786938071251,
-0.1705484539270401,
0.10748731344938278,
0.12099160999059677,
-0.07753747701644897,
-0.1077469140291214,
-0.06301611661911011,
0.06201180815696716,
-0.019031383097171783,
0.0431126207113266,
0.12484777718782425,
0.06196170672774315,
-0.028728729113936424,
0.02677040360867977,
-0.0832667201757431,
-0.13276559114456177,
0.06707067787647247,
-0.1079942137002945,
-0.05316510796546936,
-0.1459151953458786,
-0.07776439189910889,
0.006524719297885895,
0.09156335145235062,
-0.24157491326332092,
0.051608856767416,
2.4796601040777577e-34,
-0.007606664206832647,
-0.07158320397138596,
-0.030268004164099693,
-0.1574094593524933,
0.025222910568118095,
0.004519199952483177,
0.2398032248020172,
0.08639713376760483,
-0.006578897126019001,
-0.05071011185646057,
-0.11600560694932938
] |
https://github.com/huggingface/datasets/issues/5968 | Common Voice datasets still need `use_auth_token=True` | The issue commes from the dataset itself and is not related to the `datasets` lib
see https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/blob/2c475b3b88e0f2e5828f830a4b91618a25ff20b7/common_voice_6_1.py#L148-L152 | ### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
``` | 17 | Common Voice datasets still need `use_auth_token=True`
### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
```
The issue commes from the dataset itself and is not related to the `datasets` lib
see https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/blob/2c475b3b88e0f2e5828f830a4b91618a25ff20b7/common_voice_6_1.py#L148-L152 | [
0.05681248754262924,
0.060065850615501404,
0.07074031233787537,
-0.02045232430100441,
0.199932262301445,
0.024984298273921013,
0.2774684727191925,
-0.05008113384246826,
0.06897956132888794,
0.2574648857116699,
-0.20473168790340424,
-0.05943611264228821,
0.05479758232831955,
0.06985059380531311,
0.005659528076648712,
0.02073325589299202,
-0.06619986891746521,
-0.18135611712932587,
0.021193809807300568,
-0.04081806167960167,
-0.06007140502333641,
0.15014369785785675,
-0.1142292246222496,
0.009880749508738518,
-0.1078445166349411,
-0.0717175081372261,
0.023947883397340775,
0.09811572730541229,
0.0527457594871521,
-0.1091427132487297,
0.14288970828056335,
0.06515229493379593,
0.08226469159126282,
0.04580068215727806,
0.000005617560418613721,
0.11399684101343155,
0.07094089686870575,
0.04303121194243431,
-0.07050109654664993,
-0.148372620344162,
0.12486989051103592,
0.1589852273464203,
0.0019992173183709383,
0.027495190501213074,
-0.050826139748096466,
-0.059782058000564575,
-0.02879689261317253,
-0.06552282720804214,
0.11650805175304413,
0.07875852286815643,
-0.015612994320690632,
-0.09871643036603928,
-0.03396978601813316,
-0.09913262724876404,
-0.027433736249804497,
0.011297718621790409,
-0.0003942465118598193,
0.0018400752451270819,
-0.2237238734960556,
-0.04771028086543083,
0.10428353399038315,
-0.04184669256210327,
0.07018867880105972,
0.06553054600954056,
0.07994937151670456,
-0.006086030509322882,
-0.31561699509620667,
-0.31328633427619934,
-0.006586147006601095,
0.17655013501644135,
0.06054861843585968,
0.11769098043441772,
-0.11758542060852051,
0.03335685282945633,
-0.025172600522637367,
-0.04161674529314041,
-0.0530293807387352,
-0.03371190279722214,
-0.07703609019517899,
0.06354010850191116,
-0.16018348932266235,
-0.06696807593107224,
-0.009506508708000183,
-0.0425480455160141,
0.04909045994281769,
-0.03010261245071888,
-0.06128131225705147,
-0.039112359285354614,
-0.04590875282883644,
-0.12459516525268555,
0.07114668935537338,
-0.011690816842019558,
-0.07933543622493744,
0.0077464384958148,
0.09333289414644241,
0.07339277118444443,
-0.05809648707509041,
0.016655534505844116,
0.08818121254444122,
0.0266562569886446,
-0.10935159027576447,
0.019542645663022995,
-0.159942165017128,
0.1177072674036026,
-0.08589843660593033,
0.027670245617628098,
0.13789263367652893,
-0.0026018822100013494,
0.28652864694595337,
0.16408132016658783,
0.07812251150608063,
0.07230670005083084,
-0.024464767426252365,
-0.0015624916413798928,
0.11961760371923447,
0.00525687588378787,
0.07755037397146225,
0.020320413634181023,
0.0758843943476677,
0.16402874886989594,
0.10884183645248413,
0.06309240311384201,
-0.004192634020000696,
0.2844328284263611,
0.09483423829078674,
-0.08293458819389343,
0.029403841122984886,
0.09914796054363251,
0.10147333890199661,
-0.1946403533220291,
-0.1363333910703659,
-0.15290917456150055,
0.026432542130351067,
-0.030572500079870224,
0.16224926710128784,
-0.16650472581386566,
-0.021564025431871414,
-0.08600134402513504,
0.010705958120524883,
-0.022132381796836853,
-0.008860147558152676,
0.004177751950919628,
-0.05289943143725395,
0.054021917283535004,
0.14974038302898407,
-0.0036679282784461975,
0.08108385652303696,
0.1215905174612999,
-0.04510406404733658,
-0.023360131308436394,
-0.21954724192619324,
0.10276404023170471,
-0.08862939476966858,
0.09435677528381348,
-0.03336519002914429,
0.09649794548749924,
0.05113185942173004,
0.054352544248104095,
-0.30310800671577454,
-0.06515136361122131,
0.167704239487648,
-0.08920962363481522,
0.05288971960544586,
0.05441387742757797,
0.17421159148216248,
0.2320460081100464,
0.06561967730522156,
-0.03319046273827553,
-0.07913947105407715,
-0.20763562619686127,
-0.016636954620480537,
0.014983348548412323,
-0.08501089364290237,
-0.06694778054952621,
-0.13739952445030212,
0.28054389357566833,
-0.05132482573390007,
-0.17304785549640656,
-0.17578105628490448,
-0.05923060327768326,
0.14220169186592102,
0.023712700232863426,
-0.051575902849435806,
-0.17871777713298798,
-0.022936975583434105,
-0.10823003947734833,
-0.06798198819160461,
0.057107727974653244,
-0.024118537083268166,
0.09569975733757019,
0.042252812534570694,
-0.010889201425015926,
0.005003797821700573,
0.12511427700519562,
-0.054815590381622314,
-0.012226317077875137,
0.1471932828426361,
-0.08658888190984726,
0.05751127749681473,
-0.2022814303636551,
-0.047229137271642685,
0.03204980120062828,
0.05274278670549393,
0.03961022570729256,
0.020463328808546066,
-0.08070041239261627,
-0.03693864494562149,
0.11883963644504547,
-0.02761327289044857,
0.11404150724411011,
-0.2935851216316223,
-0.03508835658431053,
-0.058319807052612305,
-0.015605118125677109,
-0.22984923422336578,
-0.0018850034102797508,
-0.12275818735361099,
0.01704186014831066,
-0.019046679139137268,
0.2247992902994156,
-0.06894384324550629,
0.16701970994472504,
0.07452799379825592,
-0.030574820935726166,
-0.025853483006358147,
0.027466775849461555,
-0.07299651205539703,
0.06734264642000198,
0.12293464690446854,
0.11433638632297516,
-0.08740970492362976,
-0.006133777089416981,
0.05142320692539215,
0.3077678680419922,
-0.02034064568579197,
0.07192317396402359,
-0.16005690395832062,
-0.16858229041099548,
0.13726875185966492,
0.08730875700712204,
-0.00805595051497221,
0.1377279907464981,
-0.05527886375784874,
-0.00624006986618042,
-0.03262956067919731,
0.013407672755420208,
0.11978593468666077,
0.07209291309118271,
-0.01312015950679779,
-0.04170815274119377,
0.10355480760335922,
0.12050195038318634,
-0.16408680379390717,
-0.0644521489739418,
-0.0035654823295772076,
-0.18036377429962158,
0.09396449476480484,
0.02181290276348591,
-0.020905090495944023,
-0.07363048195838928,
0.2137894630432129,
0.08133421093225479,
0.04853496700525284,
-0.030311711132526398,
-0.020426051691174507,
-0.10357516258955002,
0.08900797367095947,
-0.004755739588290453,
-0.06887675821781158,
0.03892277926206589,
0.08888442814350128,
0.0035491730086505413,
-0.10980194061994553,
-0.15160459280014038,
0.02625090442597866,
-0.09235222637653351,
-0.029573366045951843,
-0.004622581880539656,
0.04894344508647919,
0.008273312821984291,
-0.34550461173057556,
0.05592634901404381,
0.053131282329559326,
-0.08293630927801132,
0.12277854233980179,
0.021868864074349403,
-0.13961976766586304,
0.005296086892485619,
0.03209404647350311,
0.007056824397295713,
-0.03619930520653725,
-0.07581953704357147,
-0.07533618062734604,
-0.1705702394247055,
0.04551414027810097,
0.10087891668081284,
-0.08009171485900879,
0.05403823405504227,
-0.026616815477609634,
-0.012474731542170048,
-0.031155303120613098,
0.14942720532417297,
0.11025785654783249,
-0.06805618852376938,
0.14817005395889282,
-0.1340252310037613,
-0.014580878429114819,
0.061934079974889755,
-0.16646607220172882,
-0.056812819093465805,
0.02800428681075573,
-0.04114675894379616,
-0.03636658936738968,
0.1262907236814499,
-0.010826123878359795,
-0.12306342273950577,
0.006003136280924082,
-0.11312235891819,
0.08234503120183945,
0.08677355945110321,
0.0742463767528534,
0.15038332343101501,
-0.1005515530705452,
-0.0904444232583046,
-0.037467505782842636,
-0.03773212805390358,
-0.1962060034275055,
-0.20682421326637268,
0.08768989890813828,
-0.17945320904254913,
-0.09158794581890106,
0.1804531067609787,
-0.1045752763748169,
0.0005645694909617305,
-0.08111607283353806,
0.07461707293987274,
-0.1777573823928833,
-0.12333425879478455,
0.2674136161804199,
0.03323092684149742,
-0.16681179404258728,
-0.036749646067619324,
-0.10125714540481567,
0.07486654818058014,
0.04722490534186363,
-0.04920262470841408,
-0.015432883985340595,
-0.13266660273075104,
0.12242434918880463,
-0.02261313982307911,
0.10807238519191742,
0.04171421006321907,
-0.06388489902019501,
0.020640704780817032,
-0.03190986439585686,
0.003841804340481758,
-0.11509137600660324,
0.096753790974617,
-0.10870447754859924,
-0.031854305416345596,
0.11862939596176147,
0.009900323115289211,
0.19929790496826172,
-0.1214984804391861,
0.001041335635818541,
0.08495251089334488,
0.12786833941936493,
0.2000807225704193,
0.022796569392085075,
-0.11869747191667557,
0.005113594699651003,
-0.05607326701283455,
0.14811210334300995,
-0.033788565546274185,
0.03708573803305626,
-0.026462657377123833,
-0.1297616958618164,
-0.07344995439052582,
0.025830306112766266,
-0.05895617976784706,
-0.22143003344535828,
-0.2766348719596863,
0.06440209597349167,
0.1959013044834137,
0.34791404008865356,
-0.006786549463868141,
-0.06175616756081581,
0.0707014948129654,
-0.11404605209827423,
0.22134406864643097,
-0.02844039350748062,
-0.05823134258389473,
0.032213617116212845,
-0.2186046540737152,
0.10415368527173996,
-0.033596739172935486,
0.20095396041870117,
0.04248327389359474,
-0.030939236283302307,
0.011850313283503056,
0.0456576831638813,
0.02574588544666767,
0.023000627756118774,
0.10171803832054138,
-0.025737764313817024,
0.12477260082960129,
0.06286918371915817,
0.019252637401223183,
0.09364647418260574,
-0.08498723804950714,
0.17011581361293793,
-0.04071921482682228,
0.038155943155288696,
-0.11248631030321121,
0.05817937105894089,
-0.037652406841516495,
-0.07056144624948502,
0.01197244506329298,
-0.00441049225628376,
-0.12684699892997742,
-0.13609261810779572,
-0.04905683547258377,
-0.03426472097635269,
0.15191037952899933,
0.06155604124069214,
-0.03883041441440582,
0.15403559803962708,
-0.0051539186388254166,
0.23551726341247559,
0.06687656790018082,
-0.02066950500011444,
0.005223547108471394,
0.05654901638627052,
0.1594303548336029,
0.08517640829086304,
-0.04893815517425537,
0.336475133895874,
-0.0018255915492773056,
-0.2899760603904724,
-0.01584024168550968,
-0.024482913315296173,
0.044518955051898956,
0.15052984654903412,
-0.06738627701997757,
0.12946857511997223,
0.052995067089796066,
-0.02254386432468891,
0.00025725006707943976,
0.00905844196677208,
-0.0663556307554245,
-0.10141414403915405,
-0.18666495382785797,
-0.0652076005935669,
-0.193763867020607,
0.04097721353173256,
-0.04587065801024437,
-0.0019318241393193603,
0.033715005964040756,
0.005419123452156782,
-0.02823786251246929,
-0.2409161627292633,
-0.07253245264291763,
0.07328284531831741,
-0.016095783561468124,
-0.07076586037874222,
0.11054005473852158,
0.21135862171649933,
-0.1558501124382019,
0.10217498242855072,
0.07533890008926392,
0.004639743827283382,
0.07157983630895615,
-0.051851771771907806,
0.010776820592582226,
0.030217869207262993,
0.1959029585123062,
0.11253111064434052,
-0.09211872518062592,
-0.009839455597102642,
-0.0827210322022438,
0.22675730288028717,
-0.1743854582309723,
0.11232507228851318,
0.1112806648015976,
-0.12617771327495575,
0.13323839008808136,
0.12987715005874634,
-0.04619710147380829,
-0.1196753978729248,
0.033050280064344406,
0.03254399448633194,
-0.06632882356643677,
0.04792467877268791,
-0.0840902104973793,
0.021892614662647247,
0.2294045090675354,
0.0520077608525753,
0.1377004235982895,
0.08972155302762985,
0.07857465744018555,
-0.04790455102920532,
-0.16636960208415985,
0.025983592495322227,
0.07395754754543304,
-0.16428105533123016,
-0.24891595542430878,
0.14750936627388,
0.07578299194574356,
0.03699765354394913,
-0.08714820444583893,
0.07928997278213501,
0.027385741472244263,
-0.07211965322494507,
-0.18492737412452698,
0.06839790940284729,
-0.12956611812114716,
-0.16453048586845398,
0.20252062380313873,
0.003835745621472597,
-0.028735093772411346,
0.03689717501401901,
-0.04175204038619995,
-0.001341740251518786,
-0.10891107469797134,
-0.004590190947055817,
-0.04781672731041908,
0.02315385453402996,
-0.03232806921005249,
0.18921366333961487,
0.022657200694084167,
-0.025975599884986877,
0.21055683493614197,
0.055539969354867935,
0.009563331492245197,
-0.03207527846097946,
-0.057816583663225174,
0.21170417964458466,
-0.12138345837593079,
-0.011162713170051575,
-0.026948461309075356,
0.016537616029381752,
-0.1892031580209732,
-0.057633329182863235,
0.004064624197781086,
0.09013401716947556,
0.19835126399993896,
-0.04297715425491333,
-0.05058213695883751,
-0.16174042224884033,
-0.15271200239658356,
0.05853386968374252,
0.11054734885692596,
0.056094203144311905,
-0.1221354529261589,
0.06674643605947495,
-2.744560961094376e-32,
-0.005309938918799162,
0.15119656920433044,
-0.0907956063747406,
0.004622475244104862,
-0.16778859496116638,
0.14974847435951233,
-0.06130353733897209,
-0.012952003628015518,
0.0090718325227499,
-0.1198926642537117,
-0.06127858906984329,
-0.015573893673717976,
0.11888538300991058,
0.13966964185237885,
-0.17170628905296326,
-0.10603107511997223,
0.05271251127123833,
-0.1901046186685562,
0.005551811307668686,
0.16929681599140167,
0.17633205652236938,
0.06919797509908676,
-0.1273154765367508,
-0.06514529883861542,
0.047500330954790115,
0.0902659147977829,
-0.11680055409669876,
0.037978023290634155,
-0.08790893852710724,
0.02777213230729103,
-0.018796559423208237,
0.03977501392364502,
0.045203063637018204,
-0.11395862698554993,
-0.009556717239320278,
0.05995272099971771,
-0.18979914486408234,
0.05281602218747139,
-0.08076101541519165,
0.03567185252904892,
0.10311289131641388,
0.13956208527088165,
0.023562714457511902,
-0.1294308751821518,
-0.039893802255392075,
0.07466346770524979,
-0.011279025115072727,
-0.09172756969928741,
0.02488192543387413,
-0.21726618707180023,
0.052838586270809174,
0.08103249967098236,
0.023200593888759613,
0.06755427271127701,
0.05541471391916275,
-0.02974891848862171,
-0.06835244596004486,
-0.005103473551571369,
0.02555045671761036,
0.04318935051560402,
-0.020671527832746506,
-0.28633734583854675,
0.017176847904920578,
0.11994139850139618,
-0.031431153416633606,
0.03506208956241608,
0.1358267217874527,
-0.13287480175495148,
0.01149672083556652,
-0.08562538772821426,
0.08598344027996063,
0.07761342078447342,
-0.09859807789325714,
-0.07402300089597702,
-0.24000410735607147,
-0.168272465467453,
-0.1553751826286316,
-0.05283765122294426,
0.0345865823328495,
-0.10399780422449112,
0.14652761816978455,
-0.031168069690465927,
0.06680087000131607,
-0.04821832850575447,
-0.01765892282128334,
0.08015453815460205,
-0.04969531297683716,
-0.0037510450929403305,
-0.147796168923378,
-0.08814002573490143,
-0.14254635572433472,
-0.03391684964299202,
-0.059576068073511124,
-0.00589236943051219,
-0.028034096583724022,
0.07602985948324203,
0.022335726767778397,
0.13518595695495605,
-0.07845871150493622,
0.004035810939967632,
-0.06220123916864395,
-0.07325773686170578,
0.2782616913318634,
0.01782483048737049,
0.11753708869218826,
-0.11067544668912888,
0.18437498807907104,
0.06119130551815033,
-0.13012880086898804,
-0.034784987568855286,
-0.013058433309197426,
0.21974501013755798,
0.2511894702911377,
0.2846629321575165,
0.13034659624099731,
-0.0015124912606552243,
0.015500394627451897,
-0.06533560156822205,
0.07050702720880508,
0.15346477925777435,
-0.13259099423885345,
0.14594770967960358,
-0.1971958726644516,
0.03657679259777069,
0.03401210904121399,
0.030850911512970924,
0.018832478672266006,
-0.06969234347343445,
0.055797185748815536,
0.005854505579918623,
0.08036180585622787,
-0.25026413798332214,
7.285166248038877e-7,
-0.16761481761932373,
0.01674174889922142,
0.1447761505842209,
-0.14792245626449585,
0.10313411056995392,
0.07030375301837921,
-0.1881435513496399,
0.11025285720825195,
0.01708853989839554,
0.19178816676139832,
0.08587110787630081,
-0.03715407848358154,
-0.039385825395584106,
-0.02618199586868286,
-0.053840477019548416,
-0.08837366104125977,
-0.20852692425251007,
-0.12902240455150604,
-0.04668506234884262,
0.01458221860229969,
-0.025879133492708206,
0.05052252113819122,
0.03998424485325813,
-0.17562586069107056,
0.08874490857124329,
-0.0661977082490921,
-0.01949446275830269,
0.08506692945957184,
0.011706204153597355,
-0.16286365687847137,
0.06364821642637253,
-0.010218780487775803,
0.13450610637664795,
0.08265402913093567,
0.05086922645568848,
0.07777617871761322,
-0.1359693855047226,
-0.040212567895650864,
0.09567061811685562,
-0.038062017410993576,
-0.06557802855968475,
0.07174127548933029,
-0.002685860963538289,
-0.14413027465343475,
0.12037245184183121,
0.23115277290344238,
-0.045687153935432434,
-0.17521098256111145,
-0.10197477042675018,
-0.0555194728076458,
-0.03837669640779495,
0.0696457102894783,
0.14069843292236328,
0.16761557757854462,
-0.06071150675415993,
-0.09144318848848343,
-0.07480096817016602,
-0.07815725356340408,
0.22114013135433197,
-0.1373676210641861,
-0.09041211009025574,
-0.21131937205791473,
0.01880834810435772,
0.18587587773799896,
-0.14989055693149567,
-0.013614434748888016,
-0.03621663525700569,
3.3815422457258854e-35,
-0.08366260677576065,
-0.014648091048002243,
0.024817083030939102,
-0.26393282413482666,
0.043110162019729614,
-0.019497768953442574,
0.17437997460365295,
-0.045032795518636703,
-0.0257843229919672,
-0.15992581844329834,
-0.12295401096343994
] |
https://github.com/huggingface/datasets/issues/5968 | Common Voice datasets still need `use_auth_token=True` | Addressed in:
* `mozilla-foundation/common_voice_1_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_1_0/discussions/4)
* `mozilla-foundation/common_voice_2_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_2_0/discussions/3)
* `mozilla-foundation/common_voice_3_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_3_0/discussions/3)
* `mozilla-foundation/common_voice_4_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_4_0/discussions/3)
* `mozilla-foundation/common_voice_5_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_0/discussions/3)
* `mozilla-foundation/common_voice_5_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_1/discussions/3)
* `mozilla-foundation/common_voice_6_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_0/discussions/3)
* `mozilla-foundation/common_voice_6_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/discussions/3)
* `mozilla-foundation/common_voice_7_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_7_0/discussions/3)
* `mozilla-foundation/common_voice_8_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_8_0/discussions/7)
* `mozilla-foundation/common_voice_9_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_9_0/discussions/8)
* `mozilla-foundation/common_voice_10_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_10_0/discussions/7) | ### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
``` | 38 | Common Voice datasets still need `use_auth_token=True`
### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
```
Addressed in:
* `mozilla-foundation/common_voice_1_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_1_0/discussions/4)
* `mozilla-foundation/common_voice_2_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_2_0/discussions/3)
* `mozilla-foundation/common_voice_3_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_3_0/discussions/3)
* `mozilla-foundation/common_voice_4_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_4_0/discussions/3)
* `mozilla-foundation/common_voice_5_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_0/discussions/3)
* `mozilla-foundation/common_voice_5_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_1/discussions/3)
* `mozilla-foundation/common_voice_6_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_0/discussions/3)
* `mozilla-foundation/common_voice_6_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/discussions/3)
* `mozilla-foundation/common_voice_7_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_7_0/discussions/3)
* `mozilla-foundation/common_voice_8_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_8_0/discussions/7)
* `mozilla-foundation/common_voice_9_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_9_0/discussions/8)
* `mozilla-foundation/common_voice_10_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_10_0/discussions/7) | [
0.05681248754262924,
0.060065850615501404,
0.07074031233787537,
-0.02045232430100441,
0.199932262301445,
0.024984298273921013,
0.2774684727191925,
-0.05008113384246826,
0.06897956132888794,
0.2574648857116699,
-0.20473168790340424,
-0.05943611264228821,
0.05479758232831955,
0.06985059380531311,
0.005659528076648712,
0.02073325589299202,
-0.06619986891746521,
-0.18135611712932587,
0.021193809807300568,
-0.04081806167960167,
-0.06007140502333641,
0.15014369785785675,
-0.1142292246222496,
0.009880749508738518,
-0.1078445166349411,
-0.0717175081372261,
0.023947883397340775,
0.09811572730541229,
0.0527457594871521,
-0.1091427132487297,
0.14288970828056335,
0.06515229493379593,
0.08226469159126282,
0.04580068215727806,
0.000005617560418613721,
0.11399684101343155,
0.07094089686870575,
0.04303121194243431,
-0.07050109654664993,
-0.148372620344162,
0.12486989051103592,
0.1589852273464203,
0.0019992173183709383,
0.027495190501213074,
-0.050826139748096466,
-0.059782058000564575,
-0.02879689261317253,
-0.06552282720804214,
0.11650805175304413,
0.07875852286815643,
-0.015612994320690632,
-0.09871643036603928,
-0.03396978601813316,
-0.09913262724876404,
-0.027433736249804497,
0.011297718621790409,
-0.0003942465118598193,
0.0018400752451270819,
-0.2237238734960556,
-0.04771028086543083,
0.10428353399038315,
-0.04184669256210327,
0.07018867880105972,
0.06553054600954056,
0.07994937151670456,
-0.006086030509322882,
-0.31561699509620667,
-0.31328633427619934,
-0.006586147006601095,
0.17655013501644135,
0.06054861843585968,
0.11769098043441772,
-0.11758542060852051,
0.03335685282945633,
-0.025172600522637367,
-0.04161674529314041,
-0.0530293807387352,
-0.03371190279722214,
-0.07703609019517899,
0.06354010850191116,
-0.16018348932266235,
-0.06696807593107224,
-0.009506508708000183,
-0.0425480455160141,
0.04909045994281769,
-0.03010261245071888,
-0.06128131225705147,
-0.039112359285354614,
-0.04590875282883644,
-0.12459516525268555,
0.07114668935537338,
-0.011690816842019558,
-0.07933543622493744,
0.0077464384958148,
0.09333289414644241,
0.07339277118444443,
-0.05809648707509041,
0.016655534505844116,
0.08818121254444122,
0.0266562569886446,
-0.10935159027576447,
0.019542645663022995,
-0.159942165017128,
0.1177072674036026,
-0.08589843660593033,
0.027670245617628098,
0.13789263367652893,
-0.0026018822100013494,
0.28652864694595337,
0.16408132016658783,
0.07812251150608063,
0.07230670005083084,
-0.024464767426252365,
-0.0015624916413798928,
0.11961760371923447,
0.00525687588378787,
0.07755037397146225,
0.020320413634181023,
0.0758843943476677,
0.16402874886989594,
0.10884183645248413,
0.06309240311384201,
-0.004192634020000696,
0.2844328284263611,
0.09483423829078674,
-0.08293458819389343,
0.029403841122984886,
0.09914796054363251,
0.10147333890199661,
-0.1946403533220291,
-0.1363333910703659,
-0.15290917456150055,
0.026432542130351067,
-0.030572500079870224,
0.16224926710128784,
-0.16650472581386566,
-0.021564025431871414,
-0.08600134402513504,
0.010705958120524883,
-0.022132381796836853,
-0.008860147558152676,
0.004177751950919628,
-0.05289943143725395,
0.054021917283535004,
0.14974038302898407,
-0.0036679282784461975,
0.08108385652303696,
0.1215905174612999,
-0.04510406404733658,
-0.023360131308436394,
-0.21954724192619324,
0.10276404023170471,
-0.08862939476966858,
0.09435677528381348,
-0.03336519002914429,
0.09649794548749924,
0.05113185942173004,
0.054352544248104095,
-0.30310800671577454,
-0.06515136361122131,
0.167704239487648,
-0.08920962363481522,
0.05288971960544586,
0.05441387742757797,
0.17421159148216248,
0.2320460081100464,
0.06561967730522156,
-0.03319046273827553,
-0.07913947105407715,
-0.20763562619686127,
-0.016636954620480537,
0.014983348548412323,
-0.08501089364290237,
-0.06694778054952621,
-0.13739952445030212,
0.28054389357566833,
-0.05132482573390007,
-0.17304785549640656,
-0.17578105628490448,
-0.05923060327768326,
0.14220169186592102,
0.023712700232863426,
-0.051575902849435806,
-0.17871777713298798,
-0.022936975583434105,
-0.10823003947734833,
-0.06798198819160461,
0.057107727974653244,
-0.024118537083268166,
0.09569975733757019,
0.042252812534570694,
-0.010889201425015926,
0.005003797821700573,
0.12511427700519562,
-0.054815590381622314,
-0.012226317077875137,
0.1471932828426361,
-0.08658888190984726,
0.05751127749681473,
-0.2022814303636551,
-0.047229137271642685,
0.03204980120062828,
0.05274278670549393,
0.03961022570729256,
0.020463328808546066,
-0.08070041239261627,
-0.03693864494562149,
0.11883963644504547,
-0.02761327289044857,
0.11404150724411011,
-0.2935851216316223,
-0.03508835658431053,
-0.058319807052612305,
-0.015605118125677109,
-0.22984923422336578,
-0.0018850034102797508,
-0.12275818735361099,
0.01704186014831066,
-0.019046679139137268,
0.2247992902994156,
-0.06894384324550629,
0.16701970994472504,
0.07452799379825592,
-0.030574820935726166,
-0.025853483006358147,
0.027466775849461555,
-0.07299651205539703,
0.06734264642000198,
0.12293464690446854,
0.11433638632297516,
-0.08740970492362976,
-0.006133777089416981,
0.05142320692539215,
0.3077678680419922,
-0.02034064568579197,
0.07192317396402359,
-0.16005690395832062,
-0.16858229041099548,
0.13726875185966492,
0.08730875700712204,
-0.00805595051497221,
0.1377279907464981,
-0.05527886375784874,
-0.00624006986618042,
-0.03262956067919731,
0.013407672755420208,
0.11978593468666077,
0.07209291309118271,
-0.01312015950679779,
-0.04170815274119377,
0.10355480760335922,
0.12050195038318634,
-0.16408680379390717,
-0.0644521489739418,
-0.0035654823295772076,
-0.18036377429962158,
0.09396449476480484,
0.02181290276348591,
-0.020905090495944023,
-0.07363048195838928,
0.2137894630432129,
0.08133421093225479,
0.04853496700525284,
-0.030311711132526398,
-0.020426051691174507,
-0.10357516258955002,
0.08900797367095947,
-0.004755739588290453,
-0.06887675821781158,
0.03892277926206589,
0.08888442814350128,
0.0035491730086505413,
-0.10980194061994553,
-0.15160459280014038,
0.02625090442597866,
-0.09235222637653351,
-0.029573366045951843,
-0.004622581880539656,
0.04894344508647919,
0.008273312821984291,
-0.34550461173057556,
0.05592634901404381,
0.053131282329559326,
-0.08293630927801132,
0.12277854233980179,
0.021868864074349403,
-0.13961976766586304,
0.005296086892485619,
0.03209404647350311,
0.007056824397295713,
-0.03619930520653725,
-0.07581953704357147,
-0.07533618062734604,
-0.1705702394247055,
0.04551414027810097,
0.10087891668081284,
-0.08009171485900879,
0.05403823405504227,
-0.026616815477609634,
-0.012474731542170048,
-0.031155303120613098,
0.14942720532417297,
0.11025785654783249,
-0.06805618852376938,
0.14817005395889282,
-0.1340252310037613,
-0.014580878429114819,
0.061934079974889755,
-0.16646607220172882,
-0.056812819093465805,
0.02800428681075573,
-0.04114675894379616,
-0.03636658936738968,
0.1262907236814499,
-0.010826123878359795,
-0.12306342273950577,
0.006003136280924082,
-0.11312235891819,
0.08234503120183945,
0.08677355945110321,
0.0742463767528534,
0.15038332343101501,
-0.1005515530705452,
-0.0904444232583046,
-0.037467505782842636,
-0.03773212805390358,
-0.1962060034275055,
-0.20682421326637268,
0.08768989890813828,
-0.17945320904254913,
-0.09158794581890106,
0.1804531067609787,
-0.1045752763748169,
0.0005645694909617305,
-0.08111607283353806,
0.07461707293987274,
-0.1777573823928833,
-0.12333425879478455,
0.2674136161804199,
0.03323092684149742,
-0.16681179404258728,
-0.036749646067619324,
-0.10125714540481567,
0.07486654818058014,
0.04722490534186363,
-0.04920262470841408,
-0.015432883985340595,
-0.13266660273075104,
0.12242434918880463,
-0.02261313982307911,
0.10807238519191742,
0.04171421006321907,
-0.06388489902019501,
0.020640704780817032,
-0.03190986439585686,
0.003841804340481758,
-0.11509137600660324,
0.096753790974617,
-0.10870447754859924,
-0.031854305416345596,
0.11862939596176147,
0.009900323115289211,
0.19929790496826172,
-0.1214984804391861,
0.001041335635818541,
0.08495251089334488,
0.12786833941936493,
0.2000807225704193,
0.022796569392085075,
-0.11869747191667557,
0.005113594699651003,
-0.05607326701283455,
0.14811210334300995,
-0.033788565546274185,
0.03708573803305626,
-0.026462657377123833,
-0.1297616958618164,
-0.07344995439052582,
0.025830306112766266,
-0.05895617976784706,
-0.22143003344535828,
-0.2766348719596863,
0.06440209597349167,
0.1959013044834137,
0.34791404008865356,
-0.006786549463868141,
-0.06175616756081581,
0.0707014948129654,
-0.11404605209827423,
0.22134406864643097,
-0.02844039350748062,
-0.05823134258389473,
0.032213617116212845,
-0.2186046540737152,
0.10415368527173996,
-0.033596739172935486,
0.20095396041870117,
0.04248327389359474,
-0.030939236283302307,
0.011850313283503056,
0.0456576831638813,
0.02574588544666767,
0.023000627756118774,
0.10171803832054138,
-0.025737764313817024,
0.12477260082960129,
0.06286918371915817,
0.019252637401223183,
0.09364647418260574,
-0.08498723804950714,
0.17011581361293793,
-0.04071921482682228,
0.038155943155288696,
-0.11248631030321121,
0.05817937105894089,
-0.037652406841516495,
-0.07056144624948502,
0.01197244506329298,
-0.00441049225628376,
-0.12684699892997742,
-0.13609261810779572,
-0.04905683547258377,
-0.03426472097635269,
0.15191037952899933,
0.06155604124069214,
-0.03883041441440582,
0.15403559803962708,
-0.0051539186388254166,
0.23551726341247559,
0.06687656790018082,
-0.02066950500011444,
0.005223547108471394,
0.05654901638627052,
0.1594303548336029,
0.08517640829086304,
-0.04893815517425537,
0.336475133895874,
-0.0018255915492773056,
-0.2899760603904724,
-0.01584024168550968,
-0.024482913315296173,
0.044518955051898956,
0.15052984654903412,
-0.06738627701997757,
0.12946857511997223,
0.052995067089796066,
-0.02254386432468891,
0.00025725006707943976,
0.00905844196677208,
-0.0663556307554245,
-0.10141414403915405,
-0.18666495382785797,
-0.0652076005935669,
-0.193763867020607,
0.04097721353173256,
-0.04587065801024437,
-0.0019318241393193603,
0.033715005964040756,
0.005419123452156782,
-0.02823786251246929,
-0.2409161627292633,
-0.07253245264291763,
0.07328284531831741,
-0.016095783561468124,
-0.07076586037874222,
0.11054005473852158,
0.21135862171649933,
-0.1558501124382019,
0.10217498242855072,
0.07533890008926392,
0.004639743827283382,
0.07157983630895615,
-0.051851771771907806,
0.010776820592582226,
0.030217869207262993,
0.1959029585123062,
0.11253111064434052,
-0.09211872518062592,
-0.009839455597102642,
-0.0827210322022438,
0.22675730288028717,
-0.1743854582309723,
0.11232507228851318,
0.1112806648015976,
-0.12617771327495575,
0.13323839008808136,
0.12987715005874634,
-0.04619710147380829,
-0.1196753978729248,
0.033050280064344406,
0.03254399448633194,
-0.06632882356643677,
0.04792467877268791,
-0.0840902104973793,
0.021892614662647247,
0.2294045090675354,
0.0520077608525753,
0.1377004235982895,
0.08972155302762985,
0.07857465744018555,
-0.04790455102920532,
-0.16636960208415985,
0.025983592495322227,
0.07395754754543304,
-0.16428105533123016,
-0.24891595542430878,
0.14750936627388,
0.07578299194574356,
0.03699765354394913,
-0.08714820444583893,
0.07928997278213501,
0.027385741472244263,
-0.07211965322494507,
-0.18492737412452698,
0.06839790940284729,
-0.12956611812114716,
-0.16453048586845398,
0.20252062380313873,
0.003835745621472597,
-0.028735093772411346,
0.03689717501401901,
-0.04175204038619995,
-0.001341740251518786,
-0.10891107469797134,
-0.004590190947055817,
-0.04781672731041908,
0.02315385453402996,
-0.03232806921005249,
0.18921366333961487,
0.022657200694084167,
-0.025975599884986877,
0.21055683493614197,
0.055539969354867935,
0.009563331492245197,
-0.03207527846097946,
-0.057816583663225174,
0.21170417964458466,
-0.12138345837593079,
-0.011162713170051575,
-0.026948461309075356,
0.016537616029381752,
-0.1892031580209732,
-0.057633329182863235,
0.004064624197781086,
0.09013401716947556,
0.19835126399993896,
-0.04297715425491333,
-0.05058213695883751,
-0.16174042224884033,
-0.15271200239658356,
0.05853386968374252,
0.11054734885692596,
0.056094203144311905,
-0.1221354529261589,
0.06674643605947495,
-2.744560961094376e-32,
-0.005309938918799162,
0.15119656920433044,
-0.0907956063747406,
0.004622475244104862,
-0.16778859496116638,
0.14974847435951233,
-0.06130353733897209,
-0.012952003628015518,
0.0090718325227499,
-0.1198926642537117,
-0.06127858906984329,
-0.015573893673717976,
0.11888538300991058,
0.13966964185237885,
-0.17170628905296326,
-0.10603107511997223,
0.05271251127123833,
-0.1901046186685562,
0.005551811307668686,
0.16929681599140167,
0.17633205652236938,
0.06919797509908676,
-0.1273154765367508,
-0.06514529883861542,
0.047500330954790115,
0.0902659147977829,
-0.11680055409669876,
0.037978023290634155,
-0.08790893852710724,
0.02777213230729103,
-0.018796559423208237,
0.03977501392364502,
0.045203063637018204,
-0.11395862698554993,
-0.009556717239320278,
0.05995272099971771,
-0.18979914486408234,
0.05281602218747139,
-0.08076101541519165,
0.03567185252904892,
0.10311289131641388,
0.13956208527088165,
0.023562714457511902,
-0.1294308751821518,
-0.039893802255392075,
0.07466346770524979,
-0.011279025115072727,
-0.09172756969928741,
0.02488192543387413,
-0.21726618707180023,
0.052838586270809174,
0.08103249967098236,
0.023200593888759613,
0.06755427271127701,
0.05541471391916275,
-0.02974891848862171,
-0.06835244596004486,
-0.005103473551571369,
0.02555045671761036,
0.04318935051560402,
-0.020671527832746506,
-0.28633734583854675,
0.017176847904920578,
0.11994139850139618,
-0.031431153416633606,
0.03506208956241608,
0.1358267217874527,
-0.13287480175495148,
0.01149672083556652,
-0.08562538772821426,
0.08598344027996063,
0.07761342078447342,
-0.09859807789325714,
-0.07402300089597702,
-0.24000410735607147,
-0.168272465467453,
-0.1553751826286316,
-0.05283765122294426,
0.0345865823328495,
-0.10399780422449112,
0.14652761816978455,
-0.031168069690465927,
0.06680087000131607,
-0.04821832850575447,
-0.01765892282128334,
0.08015453815460205,
-0.04969531297683716,
-0.0037510450929403305,
-0.147796168923378,
-0.08814002573490143,
-0.14254635572433472,
-0.03391684964299202,
-0.059576068073511124,
-0.00589236943051219,
-0.028034096583724022,
0.07602985948324203,
0.022335726767778397,
0.13518595695495605,
-0.07845871150493622,
0.004035810939967632,
-0.06220123916864395,
-0.07325773686170578,
0.2782616913318634,
0.01782483048737049,
0.11753708869218826,
-0.11067544668912888,
0.18437498807907104,
0.06119130551815033,
-0.13012880086898804,
-0.034784987568855286,
-0.013058433309197426,
0.21974501013755798,
0.2511894702911377,
0.2846629321575165,
0.13034659624099731,
-0.0015124912606552243,
0.015500394627451897,
-0.06533560156822205,
0.07050702720880508,
0.15346477925777435,
-0.13259099423885345,
0.14594770967960358,
-0.1971958726644516,
0.03657679259777069,
0.03401210904121399,
0.030850911512970924,
0.018832478672266006,
-0.06969234347343445,
0.055797185748815536,
0.005854505579918623,
0.08036180585622787,
-0.25026413798332214,
7.285166248038877e-7,
-0.16761481761932373,
0.01674174889922142,
0.1447761505842209,
-0.14792245626449585,
0.10313411056995392,
0.07030375301837921,
-0.1881435513496399,
0.11025285720825195,
0.01708853989839554,
0.19178816676139832,
0.08587110787630081,
-0.03715407848358154,
-0.039385825395584106,
-0.02618199586868286,
-0.053840477019548416,
-0.08837366104125977,
-0.20852692425251007,
-0.12902240455150604,
-0.04668506234884262,
0.01458221860229969,
-0.025879133492708206,
0.05052252113819122,
0.03998424485325813,
-0.17562586069107056,
0.08874490857124329,
-0.0661977082490921,
-0.01949446275830269,
0.08506692945957184,
0.011706204153597355,
-0.16286365687847137,
0.06364821642637253,
-0.010218780487775803,
0.13450610637664795,
0.08265402913093567,
0.05086922645568848,
0.07777617871761322,
-0.1359693855047226,
-0.040212567895650864,
0.09567061811685562,
-0.038062017410993576,
-0.06557802855968475,
0.07174127548933029,
-0.002685860963538289,
-0.14413027465343475,
0.12037245184183121,
0.23115277290344238,
-0.045687153935432434,
-0.17521098256111145,
-0.10197477042675018,
-0.0555194728076458,
-0.03837669640779495,
0.0696457102894783,
0.14069843292236328,
0.16761557757854462,
-0.06071150675415993,
-0.09144318848848343,
-0.07480096817016602,
-0.07815725356340408,
0.22114013135433197,
-0.1373676210641861,
-0.09041211009025574,
-0.21131937205791473,
0.01880834810435772,
0.18587587773799896,
-0.14989055693149567,
-0.013614434748888016,
-0.03621663525700569,
3.3815422457258854e-35,
-0.08366260677576065,
-0.014648091048002243,
0.024817083030939102,
-0.26393282413482666,
0.043110162019729614,
-0.019497768953442574,
0.17437997460365295,
-0.045032795518636703,
-0.0257843229919672,
-0.15992581844329834,
-0.12295401096343994
] |
https://github.com/huggingface/datasets/issues/5967 | Config name / split name lost after map with multiproc | This must be due to DatasetInfo.from_merge which drops them and is used in `concatenate_datasets`.
And you're experiencing this issue because multiprocessing does concatenate the resulting datasets from each process.
Maybe they should be kept if all the subdatasets share the same values for config_name and split | ### Describe the bug
Performing a `.map` method on a dataset loses it's config name / split name only if run with multiproc
### Steps to reproduce the bug
```python
from datasets import Audio, load_dataset
from transformers import AutoFeatureExtractor
import numpy as np
# load dummy dataset
libri = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean")
# make train / test splits
libri = libri["validation"].train_test_split(seed=42, shuffle=True, test_size=0.1)
# example feature extractor
model_id = "ntu-spml/distilhubert"
feature_extractor = AutoFeatureExtractor.from_pretrained(model_id, do_normalize=True, return_attention_mask=True)
sampling_rate = feature_extractor.sampling_rate
libri = libri.cast_column("audio", Audio(sampling_rate=sampling_rate))
max_duration = 30.0
def preprocess_function(examples):
audio_arrays = [x["array"] for x in examples["audio"]]
inputs = feature_extractor(
audio_arrays,
sampling_rate=feature_extractor.sampling_rate,
max_length=int(feature_extractor.sampling_rate * max_duration),
truncation=True,
return_attention_mask=True,
)
return inputs
# single proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=1
)
print(10 * "=" ,"Single processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
# multi proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=2
)
print(10 * "=" ,"Multi processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
```
**Print Output:**
```
========== Single processing ==========
Config name before: clean Split name before: validation
Config name after: clean Split name after: validation
========== Multi processing ==========
Config name before: clean Split name before: validation
Config name after: None Split name after: None
```
=> we can see that the config/split names are lost in the multiprocessing setting
### Expected behavior
Should retain both config / split names in the multiproc setting
### Environment info
- `datasets` version: 2.13.1.dev0
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2 | 46 | Config name / split name lost after map with multiproc
### Describe the bug
Performing a `.map` method on a dataset loses it's config name / split name only if run with multiproc
### Steps to reproduce the bug
```python
from datasets import Audio, load_dataset
from transformers import AutoFeatureExtractor
import numpy as np
# load dummy dataset
libri = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean")
# make train / test splits
libri = libri["validation"].train_test_split(seed=42, shuffle=True, test_size=0.1)
# example feature extractor
model_id = "ntu-spml/distilhubert"
feature_extractor = AutoFeatureExtractor.from_pretrained(model_id, do_normalize=True, return_attention_mask=True)
sampling_rate = feature_extractor.sampling_rate
libri = libri.cast_column("audio", Audio(sampling_rate=sampling_rate))
max_duration = 30.0
def preprocess_function(examples):
audio_arrays = [x["array"] for x in examples["audio"]]
inputs = feature_extractor(
audio_arrays,
sampling_rate=feature_extractor.sampling_rate,
max_length=int(feature_extractor.sampling_rate * max_duration),
truncation=True,
return_attention_mask=True,
)
return inputs
# single proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=1
)
print(10 * "=" ,"Single processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
# multi proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=2
)
print(10 * "=" ,"Multi processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
```
**Print Output:**
```
========== Single processing ==========
Config name before: clean Split name before: validation
Config name after: clean Split name after: validation
========== Multi processing ==========
Config name before: clean Split name before: validation
Config name after: None Split name after: None
```
=> we can see that the config/split names are lost in the multiprocessing setting
### Expected behavior
Should retain both config / split names in the multiproc setting
### Environment info
- `datasets` version: 2.13.1.dev0
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2
This must be due to DatasetInfo.from_merge which drops them and is used in `concatenate_datasets`.
And you're experiencing this issue because multiprocessing does concatenate the resulting datasets from each process.
Maybe they should be kept if all the subdatasets share the same values for config_name and split | [
0.06212739646434784,
0.009924191050231457,
-0.10298075526952744,
0.03278486058115959,
0.22666461765766144,
-0.032152388244867325,
0.22788965702056885,
-0.169854074716568,
-0.19259320199489594,
0.22464624047279358,
-0.02929673343896866,
0.0010917021427303553,
-0.09108607470989227,
0.01775415614247322,
0.1079663634300232,
0.1312151998281479,
-0.07571308314800262,
-0.1684904396533966,
-0.04794681817293167,
0.1453522890806198,
-0.1913679987192154,
0.1443866640329361,
0.09203742444515228,
0.19631430506706238,
-0.067800372838974,
-0.0034989623818546534,
-0.05707411840558052,
0.06906989961862564,
-0.017408572137355804,
0.061967384070158005,
-0.07915796339511871,
-0.09678066521883011,
-0.2429400086402893,
0.060040682554244995,
0.000004819898549612844,
-0.017012104392051697,
0.13714519143104553,
-0.002807012991979718,
0.11085484176874161,
0.04799304157495499,
-0.051662247627973557,
0.10708888620138168,
-0.10875548422336578,
-0.025350037962198257,
-0.14419378340244293,
0.16588787734508514,
-0.10367687046527863,
-0.09678315371274948,
-0.06342298537492752,
0.016796164214611053,
-0.010036486200988293,
-0.11185024678707123,
-0.1716109663248062,
-0.06818721443414688,
-0.0358395017683506,
-0.05068403482437134,
-0.17365676164627075,
-0.18819764256477356,
-0.19056349992752075,
-0.06276224553585052,
0.006519403774291277,
0.013098540715873241,
-0.06034713238477707,
-0.03547240048646927,
-0.20066235959529877,
-0.10707269608974457,
-0.12952479720115662,
-0.1174955815076828,
0.013532806187868118,
0.19432678818702698,
-0.1710800975561142,
0.11844976246356964,
-0.09116431325674057,
0.09763322025537491,
0.0009849249618127942,
-0.06235421821475029,
0.0026908342260867357,
0.09266535937786102,
0.0533602237701416,
-0.09583617001771927,
-0.04753907769918442,
0.04684886336326599,
0.007868917658925056,
-0.07298099249601364,
-0.20713874697685242,
0.08057213574647903,
-0.07580514252185822,
0.07973704487085342,
0.06505158543586731,
-0.24728043377399445,
-0.059087611734867096,
0.1375751495361328,
-0.19584204256534576,
-0.15376240015029907,
0.06752049922943115,
0.07607871294021606,
-0.06748580187559128,
-0.16607604920864105,
-0.12709975242614746,
-0.12813061475753784,
-0.023980937898159027,
0.04052366688847542,
-0.035504717379808426,
0.10705296695232391,
-0.030780278146266937,
-0.004216515924781561,
-0.026656175032258034,
0.14600977301597595,
-0.012114073149859905,
-0.012140830047428608,
-0.1467083841562271,
0.01200125552713871,
0.03359057381749153,
0.032418474555015564,
0.057619623839855194,
0.014864337630569935,
0.0398029163479805,
0.09766890108585358,
-0.0957750752568245,
0.1105000302195549,
-0.02195943333208561,
-0.06506611406803131,
-0.15700176358222961,
0.08602537214756012,
0.1802993267774582,
0.17948898673057556,
0.0982961356639862,
-0.055498428642749786,
-0.006193486042320728,
0.016499409452080727,
-0.05436725541949272,
-0.07584070414304733,
-0.04379156604409218,
0.24850688874721527,
0.181012362241745,
0.11587818711996078,
0.1267279088497162,
-0.15581488609313965,
-0.002662613755092025,
-0.2239508181810379,
0.10680930316448212,
-0.04880981892347336,
0.247979536652565,
0.1625463366508484,
0.17369487881660461,
0.005946886260062456,
0.08028999716043472,
-0.03236158937215805,
-0.09787841141223907,
-0.10590051859617233,
-0.10182151198387146,
0.1753447949886322,
-0.02992543950676918,
0.26723214983940125,
0.12913672626018524,
0.19114822149276733,
0.09298050403594971,
-0.04148692265152931,
-0.07208853960037231,
-0.11215463280677795,
0.15859070420265198,
0.01664905436336994,
-0.025485601276159286,
0.08805110305547714,
-0.03510293364524841,
-0.1787341982126236,
-0.07204366475343704,
-0.09405048191547394,
-0.06435838341712952,
-0.07608183473348618,
0.09238290041685104,
-0.1743980050086975,
-0.053395017981529236,
0.0741923525929451,
-0.11295530200004578,
0.2564570903778076,
0.018125392496585846,
0.10189454257488251,
-0.11261675506830215,
-0.09813131392002106,
0.0428648479282856,
-0.017969941720366478,
-0.08057045191526413,
-0.15740518271923065,
0.11493287980556488,
0.09133180230855942,
0.09731169790029526,
0.12391270697116852,
0.07336912304162979,
0.0792861059308052,
0.04519837349653244,
-0.0803142637014389,
-0.21752259135246277,
-0.24663342535495758,
-0.01977759785950184,
0.01391665544360876,
-0.09551756083965302,
0.11335807293653488,
0.09642766416072845,
-0.1672808974981308,
0.053820088505744934,
-0.03473588824272156,
0.0040573799051344395,
0.022157102823257446,
0.017477132380008698,
0.03345799446105957,
-0.08206667006015778,
-0.043202441185712814,
-0.06386987864971161,
-0.22150515019893646,
-0.01908322051167488,
0.006438524927943945,
0.2467079758644104,
0.07425951212644577,
-0.13187892735004425,
-0.13114431500434875,
0.03189004957675934,
0.07285799831151962,
-0.28384578227996826,
-0.18922805786132812,
0.02113872393965721,
0.12408773601055145,
0.02558247558772564,
0.048998504877090454,
-0.10646522045135498,
0.0353359580039978,
0.008125838823616505,
-0.08394060283899307,
-0.016740474849939346,
0.028370428830385208,
-0.14250938594341278,
0.08189012855291367,
0.018249837681651115,
0.11691275238990784,
0.2149651050567627,
-0.09071540087461472,
-0.12605173885822296,
-0.26271092891693115,
0.03460435941815376,
0.017095565795898438,
-0.029323715716600418,
-0.0100259929895401,
-0.04777497798204422,
-0.17218747735023499,
-0.041005004197359085,
0.15005101263523102,
0.17553220689296722,
0.06743399798870087,
0.10948717594146729,
-0.03935849294066429,
0.2028314769268036,
-0.034397948533296585,
-0.1489279866218567,
-0.08117145299911499,
-0.10170957446098328,
-0.19397319853305817,
0.1108141764998436,
0.004678458906710148,
0.06937601417303085,
0.010199970565736294,
0.3878141939640045,
0.017917804419994354,
-0.1703675538301468,
-0.17089088261127472,
0.06791970133781433,
-0.015480462461709976,
-0.07586482912302017,
0.10152821987867355,
0.07170823961496353,
0.03427310660481453,
0.020760327577590942,
-0.03676073998212814,
-0.20827309787273407,
-0.01020073238760233,
-0.022664256393909454,
0.07685007154941559,
-0.06891947239637375,
-0.10731842368841171,
0.012736642733216286,
-0.08970952033996582,
0.012648222036659718,
-0.021633807569742203,
0.05048839747905731,
-0.2238950878381729,
0.06723672896623611,
0.13782517611980438,
-0.15477286279201508,
0.19390685856342316,
-0.21462029218673706,
-0.10597056895494461,
0.009234501980245113,
-0.1745281219482422,
-0.02781050093472004,
-0.03346113860607147,
-0.14582687616348267,
0.043523725122213364,
0.041319213807582855,
-0.27820688486099243,
-0.13989722728729248,
-0.16866432130336761,
-0.005283960606902838,
0.19314374029636383,
-0.00951383262872696,
-0.07826443761587143,
-0.12846483290195465,
-0.07949895411729813,
0.01821349747478962,
0.23619410395622253,
-0.16487076878547668,
0.051402051001787186,
0.022248147055506706,
-0.025833867490291595,
0.18510472774505615,
-0.07856422662734985,
-0.052294325083494186,
-0.02392948791384697,
0.04390891641378403,
-0.4234616160392761,
0.09747327119112015,
0.022253112867474556,
0.10366837680339813,
-0.06000380963087082,
0.1544928252696991,
-0.12050267308950424,
-0.043921541422605515,
-0.16963692009449005,
-0.14093461632728577,
0.04883819818496704,
0.11729686707258224,
-0.06865590065717697,
0.07482919096946716,
0.15891508758068085,
-0.09787281602621078,
-0.17327870428562164,
0.03297499194741249,
-0.056378524750471115,
-0.1588502824306488,
0.12199684232473373,
0.08087603002786636,
-0.08327484130859375,
0.09180410206317902,
-0.03962608426809311,
0.002237520879134536,
0.003792255185544491,
0.12517349421977997,
0.10953912883996964,
0.14930376410484314,
0.07119311392307281,
0.033011987805366516,
0.2285953313112259,
0.0019111974397674203,
0.055187590420246124,
0.08293651789426804,
-0.10499292612075806,
-0.060512881726026535,
0.08287985622882843,
-0.040911659598350525,
0.08270920068025589,
0.1005689799785614,
-0.08041294664144516,
0.09473743289709091,
-0.25999897718429565,
-0.012754116207361221,
-0.0015516768908128142,
0.0826120376586914,
0.0608087033033371,
0.0008931818883866072,
0.0509660467505455,
-0.0036377902142703533,
0.011620466597378254,
0.025189166888594627,
0.015655597671866417,
-0.029857125133275986,
0.051643285900354385,
0.05150343105196953,
-0.21133092045783997,
0.04789776727557182,
0.01797996647655964,
0.007753878831863403,
-0.010847841389477253,
-0.13476864993572235,
0.07072161138057709,
-0.04108571633696556,
-0.003004020545631647,
0.13794319331645966,
0.09242506325244904,
0.1097087636590004,
-0.029577400535345078,
-0.227113738656044,
-0.009073463268578053,
0.06712864339351654,
-0.190633162856102,
-0.031022433191537857,
-0.08039907366037369,
-0.07488659769296646,
0.009660761803388596,
0.22515353560447693,
-0.0036472829524427652,
-0.12456390261650085,
-0.03385258838534355,
0.0484134666621685,
0.14746052026748657,
-0.04655560106039047,
-0.019571395590901375,
0.09395408630371094,
0.1418166160583496,
0.22792237997055054,
-0.13352005183696747,
0.06631973385810852,
0.08824756741523743,
0.14543651044368744,
0.11318734288215637,
0.2579578161239624,
0.10515992343425751,
0.2034461498260498,
0.12252311408519745,
-0.021517330780625343,
-0.0038528607692569494,
0.07267050445079803,
-0.08789045363664627,
-0.03199181333184242,
-0.19378957152366638,
0.007503059227019548,
0.12713950872421265,
-0.009276027791202068,
-0.08990604430437088,
0.07946575433015823,
-0.03160930797457695,
0.14988532662391663,
0.17329420149326324,
-0.0023809350095689297,
0.03699282556772232,
0.029754996299743652,
0.050872135907411575,
0.15033909678459167,
-0.0750541016459465,
0.0937977209687233,
-0.18905560672283173,
-0.11938495934009552,
0.31057021021842957,
-0.14746510982513428,
0.15183480083942413,
0.16353243589401245,
-0.14735820889472961,
-0.013528824783861637,
-0.046621039509773254,
-0.018979936838150024,
-0.0672142282128334,
0.18068116903305054,
0.08466653525829315,
-0.07284388691186905,
0.0059868344105780125,
-0.19188298285007477,
-0.0938103199005127,
0.11773942410945892,
0.05771445855498314,
0.17585983872413635,
-0.17075583338737488,
-0.10874185711145401,
0.2101506143808365,
0.03937707096338272,
-0.015184991993010044,
0.02796434797346592,
0.04325887933373451,
-0.12236304581165314,
-0.03929353877902031,
-0.042314689606428146,
-0.15348820388317108,
0.11736996471881866,
-0.011382372118532658,
0.025938814505934715,
0.08056684583425522,
0.13631349802017212,
0.13876080513000488,
0.1290038675069809,
0.037648964673280716,
0.09068549424409866,
0.039816342294216156,
-0.007381213363260031,
-0.06978601217269897,
0.16793780028820038,
0.18573805689811707,
-0.11708253622055054,
0.029811494052410126,
-0.06578755378723145,
0.05401089787483215,
0.046945150941610336,
0.07621906697750092,
-0.01943678967654705,
0.08785796165466309,
0.02143499255180359,
-0.1547727733850479,
0.12367686629295349,
0.002508420730009675,
0.11607114225625992,
-0.010538565926253796,
0.15732018649578094,
-0.13419193029403687,
0.16050638258457184,
-0.11572468280792236,
0.13357898592948914,
0.02703009359538555,
0.0720873549580574,
0.1100459024310112,
0.0881374180316925,
-0.14976267516613007,
0.04644764959812164,
0.11111272126436234,
0.07991911470890045,
-0.12900283932685852,
-0.012544889003038406,
0.049306560307741165,
0.07620986551046371,
-0.0847308561205864,
0.015654481947422028,
0.016009455546736717,
-0.15506526827812195,
-0.06264407932758331,
0.1984075903892517,
0.16976532340049744,
0.033916108310222626,
0.10417507588863373,
-0.06869661062955856,
-0.2193455994129181,
0.18122877180576324,
0.03266780078411102,
-0.19640855491161346,
-0.061432600021362305,
0.16547420620918274,
0.07685589790344238,
0.1489366590976715,
0.02690531313419342,
0.04415997862815857,
0.07514866441488266,
0.01309364102780819,
0.11723436415195465,
-0.05513554811477661,
-0.03030187450349331,
-0.04722641035914421,
0.07118877023458481,
-0.16752444207668304,
-0.12215709686279297,
-0.08594480156898499,
0.052187733352184296,
0.07998237013816833,
-0.08205035328865051,
-0.013305933214724064,
-0.06598710268735886,
-0.05181720480322838,
-0.14429530501365662,
0.01182436291128397,
0.035833604633808136,
0.18797121942043304,
-0.05418970808386803,
0.04767126590013504,
-2.3746437622133473e-32,
-0.12064944952726364,
-0.1869441419839859,
0.037797585129737854,
-0.044395092874765396,
-0.12311375886201859,
-0.05410505086183548,
-0.053255725651979446,
0.14672833681106567,
-0.030836954712867737,
-0.10243205726146698,
-0.01304286066442728,
-0.07702570408582687,
-0.01814012974500656,
-0.00645659351721406,
0.11544344574213028,
-0.020488325506448746,
0.04147457331418991,
0.015162263996899128,
-0.12971699237823486,
0.1274949610233307,
0.14213919639587402,
0.1357836276292801,
0.23152665793895721,
-0.07270205765962601,
-0.08516351133584976,
0.05487562343478203,
-0.10796120762825012,
-0.1448475867509842,
-0.01974722370505333,
-0.031124303117394447,
0.1088428646326065,
0.017120573669672012,
0.021190619096159935,
-0.15191936492919922,
-0.15534017980098724,
-0.12958550453186035,
-0.06126406416296959,
-0.10189071297645569,
0.052514467388391495,
-0.1463327556848526,
0.020326634868979454,
0.10101435333490372,
0.10540357977151871,
0.004945278633385897,
0.04452647268772125,
0.014560985378921032,
0.031107842922210693,
0.059682101011276245,
-0.1464783102273941,
0.038668882101774216,
0.11263550072908401,
0.038007743656635284,
0.0208544060587883,
0.02327427640557289,
0.1335383951663971,
-0.13181829452514648,
0.07253112643957138,
0.011854876764118671,
-0.22206787765026093,
0.10535886138677597,
0.13941390812397003,
0.020618483424186707,
0.2628071904182434,
0.0832788422703743,
0.07744527608156204,
-0.1371818333864212,
0.28188037872314453,
0.18612204492092133,
0.08636856824159622,
-0.13928720355033875,
0.003243648447096348,
0.1310160756111145,
-0.14261433482170105,
-0.15273024141788483,
-0.0716739147901535,
-0.22309085726737976,
0.07046213746070862,
0.011849734000861645,
0.03318360075354576,
-0.18675711750984192,
-0.038163892924785614,
0.09736140072345734,
-0.15269340574741364,
0.10450636595487595,
-0.22284351289272308,
0.1250736266374588,
0.032981988042593,
0.0553160160779953,
0.03010173700749874,
-0.046890877187252045,
0.10676812380552292,
0.37122100591659546,
-0.04554355889558792,
0.01275256834924221,
0.09234735369682312,
-0.09590496122837067,
-0.04847341775894165,
0.018776092678308487,
-0.1277974396944046,
0.036723874509334564,
0.026934025809168816,
0.030775368213653564,
0.08234468102455139,
-0.05371314659714699,
0.00846041738986969,
-0.08946388959884644,
0.1612580120563507,
0.09510987251996994,
-0.05881219729781151,
-0.06146141141653061,
-0.00030350417364388704,
-0.14868733286857605,
0.22726291418075562,
0.13453514873981476,
0.13421893119812012,
-0.006175763439387083,
0.027273688465356827,
-0.13083882629871368,
0.16536781191825867,
0.25977417826652527,
0.0675249844789505,
0.06718552857637405,
0.023423412814736366,
0.0467863567173481,
-0.1573190838098526,
0.060883596539497375,
-0.15893596410751343,
-0.21131275594234467,
0.18397028744220734,
0.0331704281270504,
0.021314214915037155,
0.05995572358369827,
7.021262717898935e-7,
-0.053144752979278564,
-0.007473765406757593,
-0.02641093172132969,
-0.1699497252702713,
-0.07772063463926315,
0.09855183959007263,
-0.05060933902859688,
-0.09672434628009796,
-0.16983307898044586,
0.07674888521432877,
0.07030391693115234,
-0.1604209989309311,
0.03600674867630005,
-0.11209408193826675,
0.06110144034028053,
-0.18979394435882568,
-0.016195019707083702,
0.11972828209400177,
-0.2236395925283432,
-0.021585114300251007,
-0.05197892338037491,
0.21034972369670868,
0.20253264904022217,
-0.14049132168293,
-0.0661548376083374,
0.03128514438867569,
-0.2091934233903885,
-0.09532532840967178,
-0.025187665596604347,
0.06729570031166077,
0.12148243933916092,
-0.03145270422101021,
-0.17503003776073456,
-0.09670601785182953,
-0.09106432646512985,
0.1620217114686966,
-0.031128279864788055,
0.11474952846765518,
0.08199912309646606,
-0.00950548704713583,
0.17501412332057953,
-0.06397076696157455,
-0.07291346788406372,
0.09151125699281693,
-0.014896309934556484,
0.12766475975513458,
-0.08073317259550095,
0.0318441316485405,
-0.0030482534784823656,
0.1129700243473053,
0.0410870723426342,
0.015954194590449333,
0.293526828289032,
0.21554332971572876,
-0.12418313324451447,
-0.1642616242170334,
0.102196104824543,
-0.16947299242019653,
0.18022996187210083,
0.05635502561926842,
-0.06483156234025955,
-0.1516723334789276,
0.09754125028848648,
-0.1833437979221344,
0.2301342934370041,
-0.17136850953102112,
-0.1500944346189499,
1.59641637815519e-34,
-0.12253538519144058,
-0.14518846571445465,
-0.032686784863471985,
-0.06756014376878738,
-0.027109218761324883,
-0.016186103224754333,
0.035220809280872345,
0.049153611063957214,
-0.2813169062137604,
-0.2075798064470291,
-0.11552216112613678
] |
https://github.com/huggingface/datasets/issues/5965 | "Couldn't cast array of type" in complex datasets | Thanks for reporting!
Specifying the target features explicitly should avoid this error:
```python
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
features=datasets.Features({"texts": datasets.Sequence(datasets.Value("string"))})
)
```
This error stems from our type promotion not handling the nested case. But this promotion/casting allocates memory in most scenarios, which can be problematic for large datasets, so explicitly passing the features is the optimal solution. | ### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux | 61 | "Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
Thanks for reporting!
Specifying the target features explicitly should avoid this error:
```python
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
features=datasets.Features({"texts": datasets.Sequence(datasets.Value("string"))})
)
```
This error stems from our type promotion not handling the nested case. But this promotion/casting allocates memory in most scenarios, which can be problematic for large datasets, so explicitly passing the features is the optimal solution. | [
0.023039560765028,
0.08479779213666916,
-0.03420985862612724,
-0.08843552321195602,
0.21419557929039001,
0.10067474842071533,
0.1391715109348297,
0.15732137858867645,
-0.02228400483727455,
0.11448030173778534,
0.0660654827952385,
-0.0967242568731308,
0.021327951923012733,
-0.11079639941453934,
-0.035542938858270645,
-0.08627188205718994,
0.07574532181024551,
-0.2120600938796997,
-0.06447721272706985,
0.024836493656039238,
-0.08211006969213486,
0.03955869376659393,
0.059279244393110275,
0.010849014855921268,
-0.002504647010937333,
-0.321490079164505,
-0.08274209499359131,
0.0184228103607893,
-0.13131773471832275,
-0.02976761944591999,
0.17033426463603973,
-0.02484538033604622,
0.011714218184351921,
0.06234622746706009,
0.0000050315511543885805,
0.06724147498607635,
0.24457509815692902,
-0.08425161987543106,
0.0379486158490181,
-0.11255490779876709,
-0.03186554089188576,
-0.028285307809710503,
0.0644921213388443,
0.015746356919407845,
-0.011679169721901417,
-0.19680897891521454,
-0.0776633769273758,
0.01986665278673172,
-0.06463362276554108,
0.02394293248653412,
-0.03364264965057373,
0.027849044650793076,
0.07982229441404343,
-0.13327114284038544,
0.14715470373630524,
0.03041977994143963,
0.09633412957191467,
-0.07886788994073868,
-0.06685690581798553,
-0.06106613203883171,
-0.0010906400857493281,
-0.11028124392032623,
-0.13805899024009705,
-0.0189944077283144,
-0.14738759398460388,
-0.03517763316631317,
-0.1335231363773346,
0.024576416239142418,
-0.04153063893318176,
0.12348335236310959,
-0.01421585027128458,
0.07036063075065613,
-0.07830536365509033,
-0.023272579535841942,
0.030359046533703804,
-0.11438994109630585,
-0.015653764829039574,
0.03278553858399391,
-0.16132791340351105,
0.07571741938591003,
-0.05940111726522446,
0.18195989727973938,
0.05002323538064957,
0.12264322489500046,
-0.18872666358947754,
-0.010520579293370247,
-0.12503249943256378,
0.18206606805324554,
0.02467545121908188,
-0.10278695076704025,
0.022287506610155106,
-0.07595288008451462,
-0.1095631942152977,
0.0035906347911804914,
0.051520608365535736,
-0.03886871784925461,
0.014571637846529484,
-0.2949250340461731,
0.00719205429777503,
-0.10657498985528946,
-0.11168701946735382,
-0.06917622685432434,
0.14268529415130615,
0.03340734541416168,
0.08538959920406342,
-0.008004515431821346,
-0.13887064158916473,
0.08024495095014572,
-0.004969592206180096,
-0.0610518641769886,
-0.01463074516505003,
-0.010895236395299435,
-0.13229161500930786,
-0.0330396369099617,
0.06688368320465088,
0.07010385394096375,
0.17895819246768951,
0.1468421220779419,
-0.1073402538895607,
0.1408822387456894,
-0.05974743142724037,
0.024915242567658424,
-0.08455195277929306,
0.04956064745783806,
0.11878432333469391,
0.007299941033124924,
0.015113777481019497,
0.12081704288721085,
0.055951882153749466,
0.048225585371255875,
-0.07304147630929947,
0.04294900223612785,
0.01133055705577135,
-0.1350492238998413,
0.08705426752567291,
0.060459040105342865,
-0.09214596450328827,
-0.08935882896184921,
-0.011039532721042633,
-0.022050179541110992,
-0.07214988023042679,
-0.1249856948852539,
0.022539494559168816,
0.032238468527793884,
0.2586023509502411,
0.01353431586176157,
0.19969482719898224,
-0.05132438614964485,
-0.00870427768677473,
-0.025644710287451744,
-0.2063349038362503,
0.05134260654449463,
-0.14866338670253754,
-0.008144942112267017,
-0.1701856106519699,
0.14093320071697235,
-0.10734611749649048,
-0.13332919776439667,
-0.04797583445906639,
-0.05632861703634262,
0.07163245230913162,
0.08487176150083542,
0.09754743427038193,
-0.13137659430503845,
0.059346653521060944,
-0.015152828767895699,
0.04252083972096443,
0.17744000256061554,
-0.11941201239824295,
0.005603773053735495,
0.10508447140455246,
0.06674645096063614,
0.003773108357563615,
0.11433269828557968,
-0.05720547214150429,
0.23567865788936615,
-0.13092075288295746,
0.14099860191345215,
-0.21731631457805634,
-0.0487244613468647,
0.09513990581035614,
-0.062051307410001755,
0.04277915135025978,
-0.2304452359676361,
0.08016660809516907,
-0.05844606086611748,
-0.11608122289180756,
-0.02423056960105896,
-0.20873168110847473,
-0.02936188131570816,
-0.03451066464185715,
-0.020312951877713203,
0.06921018660068512,
-0.2672951817512512,
0.11730066686868668,
-0.08854880928993225,
-0.07083400338888168,
-0.1005340963602066,
-0.06638320535421371,
-0.15546487271785736,
0.13637422025203705,
-0.10941142588853836,
0.06367260217666626,
-0.003331572748720646,
-0.09418772161006927,
-0.22003473341464996,
-0.09686221927404404,
-0.05212601274251938,
0.0018514604307711124,
-0.12315358966588974,
-0.23156321048736572,
0.04473328962922096,
-0.12580092251300812,
0.16119977831840515,
-0.07981190085411072,
0.06107611209154129,
0.009674801491200924,
-0.04508795589208603,
-0.14238226413726807,
0.013501481153070927,
-0.05243149399757385,
-0.11038818955421448,
-0.0039052474312484264,
-0.07344029098749161,
0.04829155281186104,
-0.00850102212280035,
-0.03358440473675728,
-0.11094555258750916,
0.0386933758854866,
0.13524161279201508,
0.000958349322900176,
-0.106665700674057,
0.10183411836624146,
0.05904868617653847,
-0.18234287202358246,
-0.19791078567504883,
0.053956035524606705,
-0.16884230077266693,
-0.1109689250588417,
-0.13317306339740753,
-0.15623685717582703,
0.13029401004314423,
-0.1138199046254158,
-0.0679139718413353,
0.02558937855064869,
0.16951388120651245,
-0.007758420892059803,
0.23802082240581512,
-0.07438886910676956,
-0.02679418958723545,
0.24506685137748718,
-0.045384589582681656,
-0.13331320881843567,
-0.05198283493518829,
-0.13943831622600555,
-0.17655593156814575,
-0.1458190232515335,
-0.03039037249982357,
0.05408439040184021,
-0.03159894794225693,
0.312668114900589,
-0.06651131808757782,
0.04033614695072174,
0.07358638942241669,
0.22416852414608002,
-0.04806828498840332,
-0.0009009181521832943,
0.01464972086250782,
0.033232271671295166,
0.0861426517367363,
0.053715720772743225,
0.012511193752288818,
0.029382796958088875,
0.014067612588405609,
0.07853787392377853,
-0.16543200612068176,
0.027166826650500298,
-0.09984119236469269,
0.04385693371295929,
0.21575671434402466,
-0.17761661112308502,
0.07955778390169144,
0.17884565889835358,
-0.1404629498720169,
-0.07064572721719742,
0.12567020952701569,
-0.0400637723505497,
0.11952182650566101,
-0.007753300480544567,
0.09333431720733643,
0.053224049508571625,
0.023169856518507004,
-0.04326479882001877,
0.03500087186694145,
-0.07370159029960632,
-0.06597982347011566,
-0.055968958884477615,
-0.07103743404150009,
0.04944176226854324,
-0.07601423561573029,
-0.19216643273830414,
-0.07518532872200012,
-0.020843306556344032,
0.008875689469277859,
0.11540954560041428,
-0.010461783967912197,
0.12502232193946838,
0.24858973920345306,
-0.07530547678470612,
-0.155669167637825,
-0.061221688985824585,
-0.10350753366947174,
-0.04415357857942581,
0.03500445559620857,
0.14518949389457703,
0.04258419945836067,
0.012444140389561653,
-0.13817936182022095,
0.17487452924251556,
-0.11813871562480927,
-0.09939778596162796,
0.24730369448661804,
-0.07293472439050674,
-0.11390112340450287,
0.05233306065201759,
0.11808780580759048,
-0.19514888525009155,
-0.20855553448200226,
-0.07236121594905853,
-0.20080244541168213,
-0.16558104753494263,
0.0241822749376297,
0.07145818322896957,
-0.1140376478433609,
0.05847933888435364,
-0.2351960390806198,
-0.08023157715797424,
0.315422922372818,
0.1977805644273758,
0.0790359377861023,
-0.1206960380077362,
-0.0627073347568512,
-0.0482388436794281,
-0.02463354542851448,
0.17084820568561554,
-0.11900260299444199,
0.25885650515556335,
-0.0815177783370018,
0.042356375604867935,
0.02754916250705719,
-0.13294391334056854,
0.17266845703125,
0.04815632849931717,
-0.15461650490760803,
-0.20827019214630127,
0.07874802500009537,
-0.19127163290977478,
0.029748842120170593,
-0.11147582530975342,
0.0037230979651212692,
0.14481417834758759,
0.1340387463569641,
0.17463964223861694,
-0.05262858048081398,
0.04776439070701599,
0.14500895142555237,
0.19845978915691376,
-0.02214173786342144,
-0.07190067321062088,
-0.23421679437160492,
0.0033820602111518383,
-0.0898296982049942,
-0.07671386003494263,
-0.0981515571475029,
-0.059488143771886826,
-0.16651487350463867,
0.04333413392305374,
-0.08973227441310883,
0.2262028455734253,
-0.014410349540412426,
0.12224790453910828,
-0.19555452466011047,
-0.02025759406387806,
0.2065308392047882,
0.13859239220619202,
-0.036623939871788025,
-0.12568645179271698,
-0.051813796162605286,
-0.19272154569625854,
0.03867188096046448,
0.213289275765419,
0.00325761828571558,
-0.022775961086153984,
0.0005444709677249193,
0.14816085994243622,
-0.036920562386512756,
0.14744198322296143,
0.00932942796498537,
-0.004776974208652973,
0.13413725793361664,
0.24537359178066254,
0.12624594569206238,
-0.022697610780596733,
0.010496420785784721,
0.1629098802804947,
0.03946342691779137,
-0.05492102727293968,
-0.10183035582304001,
0.03706338256597519,
0.10129226744174957,
0.001083525363355875,
0.07541241496801376,
-0.13969725370407104,
0.08166034519672394,
0.06170601397752762,
0.06015847995877266,
0.03915257751941681,
0.07296255230903625,
0.05523000285029411,
-0.37162137031555176,
-0.12264082580804825,
-0.09764012694358826,
0.2760855257511139,
0.19898010790348053,
-0.020636098459362984,
-0.07903208583593369,
-0.0771632120013237,
0.09520646184682846,
0.13729052245616913,
0.022042933851480484,
-0.015024019405245781,
0.0057279872708022594,
0.03786904737353325,
-0.17487798631191254,
-0.0051035271026194096,
0.03387388959527016,
0.15544871985912323,
0.0454554446041584,
0.0988006666302681,
-0.006772094871848822,
-0.2308800369501114,
0.024029117077589035,
0.22568872570991516,
-0.1595316231250763,
0.005378170404583216,
-0.06342486292123795,
-0.03543129935860634,
0.08108342438936234,
0.1259019672870636,
0.06761407107114792,
-0.12158149480819702,
-0.15821972489356995,
-0.050989896059036255,
-0.19625861942768097,
0.12471381574869156,
0.01765727624297142,
0.1224551722407341,
-0.19527962803840637,
0.011638094671070576,
0.16434533894062042,
0.13385546207427979,
-0.03231189027428627,
-0.03859074041247368,
0.01149209588766098,
0.22324621677398682,
0.2245996743440628,
0.18651464581489563,
0.05151372030377388,
-0.054105956107378006,
0.18662184476852417,
0.023558756336569786,
0.00024234535521827638,
0.0687156468629837,
0.009682612493634224,
0.02591758593916893,
-0.0415896400809288,
0.08049940317869186,
-0.00900786742568016,
0.04764627665281296,
0.04928354546427727,
-0.00927985180169344,
-0.07080288976430893,
0.06763973087072372,
-0.1804526448249817,
0.16020898520946503,
0.22089698910713196,
-0.09510169178247452,
-0.04123523458838463,
-0.10222114622592926,
-0.165985569357872,
0.02452521026134491,
-0.07536490261554718,
-0.018430020660161972,
0.04278898984193802,
0.1475471407175064,
0.05068890005350113,
0.010803447104990482,
0.09112250804901123,
0.06530825048685074,
0.12613338232040405,
-0.027715954929590225,
0.0016693213256075978,
0.09965977072715759,
0.05976351350545883,
-0.06721504777669907,
-0.08381006866693497,
-0.04935670644044876,
0.05331902578473091,
0.09381425380706787,
0.03567027673125267,
-0.0024207213427871466,
0.0860712081193924,
-0.03747016564011574,
-0.08560565859079361,
-0.011307698674499989,
-0.07717803120613098,
-0.21173499524593353,
-0.033004067838191986,
0.04437686502933502,
0.11159496009349823,
-0.053081315010786057,
-0.01334403920918703,
-0.0897618904709816,
-0.18515557050704956,
0.12640665471553802,
-0.038135506212711334,
0.05004759877920151,
0.10201933234930038,
0.14443986117839813,
0.12582603096961975,
0.017318682745099068,
0.15522608160972595,
0.12879617512226105,
-0.003216927871108055,
0.027191396802663803,
0.11356150358915329,
0.044713541865348816,
-0.19270628690719604,
0.13256730139255524,
-0.17592541873455048,
-0.19643843173980713,
-0.2151336669921875,
0.06512892991304398,
-0.026342220604419708,
0.2158077210187912,
0.035641834139823914,
-0.05399312824010849,
-0.09805985540151596,
0.053597353398799896,
-0.07559795677661896,
-0.05324550345540047,
0.10549065470695496,
0.15943898260593414,
-0.14998647570610046,
-0.14363239705562592,
-2.605123233452661e-32,
-0.046475280076265335,
-0.033967118710279465,
-0.06962493807077408,
-0.15252506732940674,
-0.1277025192975998,
0.07354693859815598,
0.08219149708747864,
0.059537339955568314,
0.061699140816926956,
0.002632501535117626,
-0.14729107916355133,
0.07865734398365021,
0.06145026907324791,
0.016840143129229546,
-0.08553794771432877,
0.040816742926836014,
-0.010315247811377048,
-0.030430862680077553,
0.011771655641496181,
-0.0520143136382103,
0.1421864628791809,
0.019019220024347305,
-0.022616159170866013,
-0.14218775928020477,
-0.012408818118274212,
0.0892842635512352,
-0.10142230242490768,
-0.11080451309680939,
0.07683755457401276,
-0.11434165388345718,
0.008443665690720081,
0.2285165786743164,
0.018600083887577057,
-0.010437949560582638,
-0.10340731590986252,
0.012927155010402203,
-0.16728611290454865,
-0.0010134609183296561,
-0.03501462936401367,
0.01320022065192461,
0.05796029418706894,
0.13409623503684998,
0.12640444934368134,
-0.09394209086894989,
-0.012188777327537537,
-0.04934303089976311,
0.024302056059241295,
0.06450062990188599,
0.07517828792333603,
-0.03930747136473656,
0.017777882516384125,
-0.084897980093956,
-0.05884275957942009,
0.1319136768579483,
-0.009302332997322083,
0.01525589358061552,
0.04530925303697586,
0.19011107087135315,
-0.17179247736930847,
-0.03671032190322876,
0.12698958814144135,
0.003256368450820446,
0.11860987544059753,
-0.08794046193361282,
-0.009728865697979927,
0.058820221573114395,
0.2865739166736603,
0.012080015614628792,
0.00927233137190342,
-0.11647789925336838,
-0.06133536994457245,
-0.032644595950841904,
-0.06386403739452362,
0.014009307138621807,
-0.0665239691734314,
0.11928023397922516,
-0.2232867330312729,
0.03219055384397507,
-0.15089043974876404,
-0.1499415934085846,
-0.0626307800412178,
0.06986227631568909,
0.03201517090201378,
-0.11729088425636292,
0.03040093556046486,
-0.13623261451721191,
0.059548504650592804,
0.017279522493481636,
-0.1280796229839325,
-0.12325984984636307,
-0.00837177038192749,
0.1945153921842575,
-0.06488833576440811,
-0.08027660101652145,
-0.12182753533124924,
0.09181167930364609,
-0.14220912754535675,
0.19286103546619415,
-0.0037309168837964535,
0.006096587050706148,
-0.06905736029148102,
-0.14700371026992798,
0.05717935413122177,
0.20695392787456512,
0.21686257421970367,
0.2311326265335083,
0.18940326571464539,
0.03016916662454605,
-0.1553734689950943,
-0.06542959809303284,
-0.047644104808568954,
0.09068317711353302,
0.096431665122509,
0.19143232703208923,
0.16379188001155853,
-0.07933636754751205,
0.13686683773994446,
-0.07418322563171387,
0.14614544808864594,
0.11690354347229004,
0.04544990882277489,
-0.04001711308956146,
-0.17742177844047546,
-0.1079033836722374,
0.16834001243114471,
0.00006941503670532256,
-0.08249817788600922,
-0.16078859567642212,
0.24587894976139069,
-0.06669633835554123,
0.11345773935317993,
-0.08466093987226486,
7.305824283321272e-7,
-0.11212678253650665,
0.10139742493629456,
0.011453951708972454,
-0.05084548518061638,
-0.09223002195358276,
0.12429355829954147,
-0.12561695277690887,
0.1689174324274063,
-0.17688524723052979,
0.17156805098056793,
0.2112259417772293,
-0.07041993737220764,
0.019748784601688385,
-0.018421271815896034,
0.12281735241413116,
-0.06950978934764862,
-0.24003759026527405,
0.12499023228883743,
-0.038577850908041,
0.025523332878947258,
0.08960749208927155,
0.033061154186725616,
0.12029235810041428,
-0.11074702441692352,
0.08717138320207596,
-0.024036990478634834,
-0.0021278734784573317,
0.03540263697504997,
0.08279253542423248,
0.1023513525724411,
0.015901735052466393,
-0.09500808268785477,
0.09247472882270813,
0.14884409308433533,
0.0347093865275383,
0.01368026714771986,
-0.09422342479228973,
-0.009062639437615871,
-0.07031890749931335,
0.03314695507287979,
-0.08157193660736084,
0.024638550356030464,
0.05408181622624397,
0.14671948552131653,
0.127145916223526,
-0.09611896425485611,
-0.05115276202559471,
0.20114389061927795,
-0.06335517019033432,
0.2360580712556839,
-0.127717986702919,
0.19471700489521027,
0.16884009540081024,
0.12244883179664612,
-0.047431446611881256,
0.05051621422171593,
0.08477775007486343,
-0.18071071803569794,
0.2594757080078125,
-0.05529593303799629,
-0.07463816553354263,
-0.029646549373865128,
-0.045596588402986526,
-0.08186829835176468,
-0.037730295211076736,
-0.06749612838029861,
-0.16399100422859192,
1.959062354691116e-34,
0.10918021947145462,
0.12568627297878265,
-0.07822031527757645,
-0.18888989090919495,
-0.0021775730419903994,
-0.12579232454299927,
0.1288488209247589,
-0.024068022146821022,
0.09332415461540222,
-0.08313114941120148,
-0.10798909515142441
] |
https://github.com/huggingface/datasets/issues/5965 | "Couldn't cast array of type" in complex datasets | Hi @mariosasko thanks for the context, this is helpful to know. Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Feels like something that would be easy to implement and could save memory / deal with this case in a standardized way. | ### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux | 61 | "Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
Hi @mariosasko thanks for the context, this is helpful to know. Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Feels like something that would be easy to implement and could save memory / deal with this case in a standardized way. | [
0.023039560765028,
0.08479779213666916,
-0.03420985862612724,
-0.08843552321195602,
0.21419557929039001,
0.10067474842071533,
0.1391715109348297,
0.15732137858867645,
-0.02228400483727455,
0.11448030173778534,
0.0660654827952385,
-0.0967242568731308,
0.021327951923012733,
-0.11079639941453934,
-0.035542938858270645,
-0.08627188205718994,
0.07574532181024551,
-0.2120600938796997,
-0.06447721272706985,
0.024836493656039238,
-0.08211006969213486,
0.03955869376659393,
0.059279244393110275,
0.010849014855921268,
-0.002504647010937333,
-0.321490079164505,
-0.08274209499359131,
0.0184228103607893,
-0.13131773471832275,
-0.02976761944591999,
0.17033426463603973,
-0.02484538033604622,
0.011714218184351921,
0.06234622746706009,
0.0000050315511543885805,
0.06724147498607635,
0.24457509815692902,
-0.08425161987543106,
0.0379486158490181,
-0.11255490779876709,
-0.03186554089188576,
-0.028285307809710503,
0.0644921213388443,
0.015746356919407845,
-0.011679169721901417,
-0.19680897891521454,
-0.0776633769273758,
0.01986665278673172,
-0.06463362276554108,
0.02394293248653412,
-0.03364264965057373,
0.027849044650793076,
0.07982229441404343,
-0.13327114284038544,
0.14715470373630524,
0.03041977994143963,
0.09633412957191467,
-0.07886788994073868,
-0.06685690581798553,
-0.06106613203883171,
-0.0010906400857493281,
-0.11028124392032623,
-0.13805899024009705,
-0.0189944077283144,
-0.14738759398460388,
-0.03517763316631317,
-0.1335231363773346,
0.024576416239142418,
-0.04153063893318176,
0.12348335236310959,
-0.01421585027128458,
0.07036063075065613,
-0.07830536365509033,
-0.023272579535841942,
0.030359046533703804,
-0.11438994109630585,
-0.015653764829039574,
0.03278553858399391,
-0.16132791340351105,
0.07571741938591003,
-0.05940111726522446,
0.18195989727973938,
0.05002323538064957,
0.12264322489500046,
-0.18872666358947754,
-0.010520579293370247,
-0.12503249943256378,
0.18206606805324554,
0.02467545121908188,
-0.10278695076704025,
0.022287506610155106,
-0.07595288008451462,
-0.1095631942152977,
0.0035906347911804914,
0.051520608365535736,
-0.03886871784925461,
0.014571637846529484,
-0.2949250340461731,
0.00719205429777503,
-0.10657498985528946,
-0.11168701946735382,
-0.06917622685432434,
0.14268529415130615,
0.03340734541416168,
0.08538959920406342,
-0.008004515431821346,
-0.13887064158916473,
0.08024495095014572,
-0.004969592206180096,
-0.0610518641769886,
-0.01463074516505003,
-0.010895236395299435,
-0.13229161500930786,
-0.0330396369099617,
0.06688368320465088,
0.07010385394096375,
0.17895819246768951,
0.1468421220779419,
-0.1073402538895607,
0.1408822387456894,
-0.05974743142724037,
0.024915242567658424,
-0.08455195277929306,
0.04956064745783806,
0.11878432333469391,
0.007299941033124924,
0.015113777481019497,
0.12081704288721085,
0.055951882153749466,
0.048225585371255875,
-0.07304147630929947,
0.04294900223612785,
0.01133055705577135,
-0.1350492238998413,
0.08705426752567291,
0.060459040105342865,
-0.09214596450328827,
-0.08935882896184921,
-0.011039532721042633,
-0.022050179541110992,
-0.07214988023042679,
-0.1249856948852539,
0.022539494559168816,
0.032238468527793884,
0.2586023509502411,
0.01353431586176157,
0.19969482719898224,
-0.05132438614964485,
-0.00870427768677473,
-0.025644710287451744,
-0.2063349038362503,
0.05134260654449463,
-0.14866338670253754,
-0.008144942112267017,
-0.1701856106519699,
0.14093320071697235,
-0.10734611749649048,
-0.13332919776439667,
-0.04797583445906639,
-0.05632861703634262,
0.07163245230913162,
0.08487176150083542,
0.09754743427038193,
-0.13137659430503845,
0.059346653521060944,
-0.015152828767895699,
0.04252083972096443,
0.17744000256061554,
-0.11941201239824295,
0.005603773053735495,
0.10508447140455246,
0.06674645096063614,
0.003773108357563615,
0.11433269828557968,
-0.05720547214150429,
0.23567865788936615,
-0.13092075288295746,
0.14099860191345215,
-0.21731631457805634,
-0.0487244613468647,
0.09513990581035614,
-0.062051307410001755,
0.04277915135025978,
-0.2304452359676361,
0.08016660809516907,
-0.05844606086611748,
-0.11608122289180756,
-0.02423056960105896,
-0.20873168110847473,
-0.02936188131570816,
-0.03451066464185715,
-0.020312951877713203,
0.06921018660068512,
-0.2672951817512512,
0.11730066686868668,
-0.08854880928993225,
-0.07083400338888168,
-0.1005340963602066,
-0.06638320535421371,
-0.15546487271785736,
0.13637422025203705,
-0.10941142588853836,
0.06367260217666626,
-0.003331572748720646,
-0.09418772161006927,
-0.22003473341464996,
-0.09686221927404404,
-0.05212601274251938,
0.0018514604307711124,
-0.12315358966588974,
-0.23156321048736572,
0.04473328962922096,
-0.12580092251300812,
0.16119977831840515,
-0.07981190085411072,
0.06107611209154129,
0.009674801491200924,
-0.04508795589208603,
-0.14238226413726807,
0.013501481153070927,
-0.05243149399757385,
-0.11038818955421448,
-0.0039052474312484264,
-0.07344029098749161,
0.04829155281186104,
-0.00850102212280035,
-0.03358440473675728,
-0.11094555258750916,
0.0386933758854866,
0.13524161279201508,
0.000958349322900176,
-0.106665700674057,
0.10183411836624146,
0.05904868617653847,
-0.18234287202358246,
-0.19791078567504883,
0.053956035524606705,
-0.16884230077266693,
-0.1109689250588417,
-0.13317306339740753,
-0.15623685717582703,
0.13029401004314423,
-0.1138199046254158,
-0.0679139718413353,
0.02558937855064869,
0.16951388120651245,
-0.007758420892059803,
0.23802082240581512,
-0.07438886910676956,
-0.02679418958723545,
0.24506685137748718,
-0.045384589582681656,
-0.13331320881843567,
-0.05198283493518829,
-0.13943831622600555,
-0.17655593156814575,
-0.1458190232515335,
-0.03039037249982357,
0.05408439040184021,
-0.03159894794225693,
0.312668114900589,
-0.06651131808757782,
0.04033614695072174,
0.07358638942241669,
0.22416852414608002,
-0.04806828498840332,
-0.0009009181521832943,
0.01464972086250782,
0.033232271671295166,
0.0861426517367363,
0.053715720772743225,
0.012511193752288818,
0.029382796958088875,
0.014067612588405609,
0.07853787392377853,
-0.16543200612068176,
0.027166826650500298,
-0.09984119236469269,
0.04385693371295929,
0.21575671434402466,
-0.17761661112308502,
0.07955778390169144,
0.17884565889835358,
-0.1404629498720169,
-0.07064572721719742,
0.12567020952701569,
-0.0400637723505497,
0.11952182650566101,
-0.007753300480544567,
0.09333431720733643,
0.053224049508571625,
0.023169856518507004,
-0.04326479882001877,
0.03500087186694145,
-0.07370159029960632,
-0.06597982347011566,
-0.055968958884477615,
-0.07103743404150009,
0.04944176226854324,
-0.07601423561573029,
-0.19216643273830414,
-0.07518532872200012,
-0.020843306556344032,
0.008875689469277859,
0.11540954560041428,
-0.010461783967912197,
0.12502232193946838,
0.24858973920345306,
-0.07530547678470612,
-0.155669167637825,
-0.061221688985824585,
-0.10350753366947174,
-0.04415357857942581,
0.03500445559620857,
0.14518949389457703,
0.04258419945836067,
0.012444140389561653,
-0.13817936182022095,
0.17487452924251556,
-0.11813871562480927,
-0.09939778596162796,
0.24730369448661804,
-0.07293472439050674,
-0.11390112340450287,
0.05233306065201759,
0.11808780580759048,
-0.19514888525009155,
-0.20855553448200226,
-0.07236121594905853,
-0.20080244541168213,
-0.16558104753494263,
0.0241822749376297,
0.07145818322896957,
-0.1140376478433609,
0.05847933888435364,
-0.2351960390806198,
-0.08023157715797424,
0.315422922372818,
0.1977805644273758,
0.0790359377861023,
-0.1206960380077362,
-0.0627073347568512,
-0.0482388436794281,
-0.02463354542851448,
0.17084820568561554,
-0.11900260299444199,
0.25885650515556335,
-0.0815177783370018,
0.042356375604867935,
0.02754916250705719,
-0.13294391334056854,
0.17266845703125,
0.04815632849931717,
-0.15461650490760803,
-0.20827019214630127,
0.07874802500009537,
-0.19127163290977478,
0.029748842120170593,
-0.11147582530975342,
0.0037230979651212692,
0.14481417834758759,
0.1340387463569641,
0.17463964223861694,
-0.05262858048081398,
0.04776439070701599,
0.14500895142555237,
0.19845978915691376,
-0.02214173786342144,
-0.07190067321062088,
-0.23421679437160492,
0.0033820602111518383,
-0.0898296982049942,
-0.07671386003494263,
-0.0981515571475029,
-0.059488143771886826,
-0.16651487350463867,
0.04333413392305374,
-0.08973227441310883,
0.2262028455734253,
-0.014410349540412426,
0.12224790453910828,
-0.19555452466011047,
-0.02025759406387806,
0.2065308392047882,
0.13859239220619202,
-0.036623939871788025,
-0.12568645179271698,
-0.051813796162605286,
-0.19272154569625854,
0.03867188096046448,
0.213289275765419,
0.00325761828571558,
-0.022775961086153984,
0.0005444709677249193,
0.14816085994243622,
-0.036920562386512756,
0.14744198322296143,
0.00932942796498537,
-0.004776974208652973,
0.13413725793361664,
0.24537359178066254,
0.12624594569206238,
-0.022697610780596733,
0.010496420785784721,
0.1629098802804947,
0.03946342691779137,
-0.05492102727293968,
-0.10183035582304001,
0.03706338256597519,
0.10129226744174957,
0.001083525363355875,
0.07541241496801376,
-0.13969725370407104,
0.08166034519672394,
0.06170601397752762,
0.06015847995877266,
0.03915257751941681,
0.07296255230903625,
0.05523000285029411,
-0.37162137031555176,
-0.12264082580804825,
-0.09764012694358826,
0.2760855257511139,
0.19898010790348053,
-0.020636098459362984,
-0.07903208583593369,
-0.0771632120013237,
0.09520646184682846,
0.13729052245616913,
0.022042933851480484,
-0.015024019405245781,
0.0057279872708022594,
0.03786904737353325,
-0.17487798631191254,
-0.0051035271026194096,
0.03387388959527016,
0.15544871985912323,
0.0454554446041584,
0.0988006666302681,
-0.006772094871848822,
-0.2308800369501114,
0.024029117077589035,
0.22568872570991516,
-0.1595316231250763,
0.005378170404583216,
-0.06342486292123795,
-0.03543129935860634,
0.08108342438936234,
0.1259019672870636,
0.06761407107114792,
-0.12158149480819702,
-0.15821972489356995,
-0.050989896059036255,
-0.19625861942768097,
0.12471381574869156,
0.01765727624297142,
0.1224551722407341,
-0.19527962803840637,
0.011638094671070576,
0.16434533894062042,
0.13385546207427979,
-0.03231189027428627,
-0.03859074041247368,
0.01149209588766098,
0.22324621677398682,
0.2245996743440628,
0.18651464581489563,
0.05151372030377388,
-0.054105956107378006,
0.18662184476852417,
0.023558756336569786,
0.00024234535521827638,
0.0687156468629837,
0.009682612493634224,
0.02591758593916893,
-0.0415896400809288,
0.08049940317869186,
-0.00900786742568016,
0.04764627665281296,
0.04928354546427727,
-0.00927985180169344,
-0.07080288976430893,
0.06763973087072372,
-0.1804526448249817,
0.16020898520946503,
0.22089698910713196,
-0.09510169178247452,
-0.04123523458838463,
-0.10222114622592926,
-0.165985569357872,
0.02452521026134491,
-0.07536490261554718,
-0.018430020660161972,
0.04278898984193802,
0.1475471407175064,
0.05068890005350113,
0.010803447104990482,
0.09112250804901123,
0.06530825048685074,
0.12613338232040405,
-0.027715954929590225,
0.0016693213256075978,
0.09965977072715759,
0.05976351350545883,
-0.06721504777669907,
-0.08381006866693497,
-0.04935670644044876,
0.05331902578473091,
0.09381425380706787,
0.03567027673125267,
-0.0024207213427871466,
0.0860712081193924,
-0.03747016564011574,
-0.08560565859079361,
-0.011307698674499989,
-0.07717803120613098,
-0.21173499524593353,
-0.033004067838191986,
0.04437686502933502,
0.11159496009349823,
-0.053081315010786057,
-0.01334403920918703,
-0.0897618904709816,
-0.18515557050704956,
0.12640665471553802,
-0.038135506212711334,
0.05004759877920151,
0.10201933234930038,
0.14443986117839813,
0.12582603096961975,
0.017318682745099068,
0.15522608160972595,
0.12879617512226105,
-0.003216927871108055,
0.027191396802663803,
0.11356150358915329,
0.044713541865348816,
-0.19270628690719604,
0.13256730139255524,
-0.17592541873455048,
-0.19643843173980713,
-0.2151336669921875,
0.06512892991304398,
-0.026342220604419708,
0.2158077210187912,
0.035641834139823914,
-0.05399312824010849,
-0.09805985540151596,
0.053597353398799896,
-0.07559795677661896,
-0.05324550345540047,
0.10549065470695496,
0.15943898260593414,
-0.14998647570610046,
-0.14363239705562592,
-2.605123233452661e-32,
-0.046475280076265335,
-0.033967118710279465,
-0.06962493807077408,
-0.15252506732940674,
-0.1277025192975998,
0.07354693859815598,
0.08219149708747864,
0.059537339955568314,
0.061699140816926956,
0.002632501535117626,
-0.14729107916355133,
0.07865734398365021,
0.06145026907324791,
0.016840143129229546,
-0.08553794771432877,
0.040816742926836014,
-0.010315247811377048,
-0.030430862680077553,
0.011771655641496181,
-0.0520143136382103,
0.1421864628791809,
0.019019220024347305,
-0.022616159170866013,
-0.14218775928020477,
-0.012408818118274212,
0.0892842635512352,
-0.10142230242490768,
-0.11080451309680939,
0.07683755457401276,
-0.11434165388345718,
0.008443665690720081,
0.2285165786743164,
0.018600083887577057,
-0.010437949560582638,
-0.10340731590986252,
0.012927155010402203,
-0.16728611290454865,
-0.0010134609183296561,
-0.03501462936401367,
0.01320022065192461,
0.05796029418706894,
0.13409623503684998,
0.12640444934368134,
-0.09394209086894989,
-0.012188777327537537,
-0.04934303089976311,
0.024302056059241295,
0.06450062990188599,
0.07517828792333603,
-0.03930747136473656,
0.017777882516384125,
-0.084897980093956,
-0.05884275957942009,
0.1319136768579483,
-0.009302332997322083,
0.01525589358061552,
0.04530925303697586,
0.19011107087135315,
-0.17179247736930847,
-0.03671032190322876,
0.12698958814144135,
0.003256368450820446,
0.11860987544059753,
-0.08794046193361282,
-0.009728865697979927,
0.058820221573114395,
0.2865739166736603,
0.012080015614628792,
0.00927233137190342,
-0.11647789925336838,
-0.06133536994457245,
-0.032644595950841904,
-0.06386403739452362,
0.014009307138621807,
-0.0665239691734314,
0.11928023397922516,
-0.2232867330312729,
0.03219055384397507,
-0.15089043974876404,
-0.1499415934085846,
-0.0626307800412178,
0.06986227631568909,
0.03201517090201378,
-0.11729088425636292,
0.03040093556046486,
-0.13623261451721191,
0.059548504650592804,
0.017279522493481636,
-0.1280796229839325,
-0.12325984984636307,
-0.00837177038192749,
0.1945153921842575,
-0.06488833576440811,
-0.08027660101652145,
-0.12182753533124924,
0.09181167930364609,
-0.14220912754535675,
0.19286103546619415,
-0.0037309168837964535,
0.006096587050706148,
-0.06905736029148102,
-0.14700371026992798,
0.05717935413122177,
0.20695392787456512,
0.21686257421970367,
0.2311326265335083,
0.18940326571464539,
0.03016916662454605,
-0.1553734689950943,
-0.06542959809303284,
-0.047644104808568954,
0.09068317711353302,
0.096431665122509,
0.19143232703208923,
0.16379188001155853,
-0.07933636754751205,
0.13686683773994446,
-0.07418322563171387,
0.14614544808864594,
0.11690354347229004,
0.04544990882277489,
-0.04001711308956146,
-0.17742177844047546,
-0.1079033836722374,
0.16834001243114471,
0.00006941503670532256,
-0.08249817788600922,
-0.16078859567642212,
0.24587894976139069,
-0.06669633835554123,
0.11345773935317993,
-0.08466093987226486,
7.305824283321272e-7,
-0.11212678253650665,
0.10139742493629456,
0.011453951708972454,
-0.05084548518061638,
-0.09223002195358276,
0.12429355829954147,
-0.12561695277690887,
0.1689174324274063,
-0.17688524723052979,
0.17156805098056793,
0.2112259417772293,
-0.07041993737220764,
0.019748784601688385,
-0.018421271815896034,
0.12281735241413116,
-0.06950978934764862,
-0.24003759026527405,
0.12499023228883743,
-0.038577850908041,
0.025523332878947258,
0.08960749208927155,
0.033061154186725616,
0.12029235810041428,
-0.11074702441692352,
0.08717138320207596,
-0.024036990478634834,
-0.0021278734784573317,
0.03540263697504997,
0.08279253542423248,
0.1023513525724411,
0.015901735052466393,
-0.09500808268785477,
0.09247472882270813,
0.14884409308433533,
0.0347093865275383,
0.01368026714771986,
-0.09422342479228973,
-0.009062639437615871,
-0.07031890749931335,
0.03314695507287979,
-0.08157193660736084,
0.024638550356030464,
0.05408181622624397,
0.14671948552131653,
0.127145916223526,
-0.09611896425485611,
-0.05115276202559471,
0.20114389061927795,
-0.06335517019033432,
0.2360580712556839,
-0.127717986702919,
0.19471700489521027,
0.16884009540081024,
0.12244883179664612,
-0.047431446611881256,
0.05051621422171593,
0.08477775007486343,
-0.18071071803569794,
0.2594757080078125,
-0.05529593303799629,
-0.07463816553354263,
-0.029646549373865128,
-0.045596588402986526,
-0.08186829835176468,
-0.037730295211076736,
-0.06749612838029861,
-0.16399100422859192,
1.959062354691116e-34,
0.10918021947145462,
0.12568627297878265,
-0.07822031527757645,
-0.18888989090919495,
-0.0021775730419903994,
-0.12579232454299927,
0.1288488209247589,
-0.024068022146821022,
0.09332415461540222,
-0.08313114941120148,
-0.10798909515142441
] |
https://github.com/huggingface/datasets/issues/5965 | "Couldn't cast array of type" in complex datasets | > . Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Interesting proposal! Yes, we could consider doing this if the (return) type hint is `TypedDict`, and raise an error that type hints are incorrect if the cast using the inferred types fails. | ### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux | 62 | "Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
> . Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Interesting proposal! Yes, we could consider doing this if the (return) type hint is `TypedDict`, and raise an error that type hints are incorrect if the cast using the inferred types fails. | [
0.023039560765028,
0.08479779213666916,
-0.03420985862612724,
-0.08843552321195602,
0.21419557929039001,
0.10067474842071533,
0.1391715109348297,
0.15732137858867645,
-0.02228400483727455,
0.11448030173778534,
0.0660654827952385,
-0.0967242568731308,
0.021327951923012733,
-0.11079639941453934,
-0.035542938858270645,
-0.08627188205718994,
0.07574532181024551,
-0.2120600938796997,
-0.06447721272706985,
0.024836493656039238,
-0.08211006969213486,
0.03955869376659393,
0.059279244393110275,
0.010849014855921268,
-0.002504647010937333,
-0.321490079164505,
-0.08274209499359131,
0.0184228103607893,
-0.13131773471832275,
-0.02976761944591999,
0.17033426463603973,
-0.02484538033604622,
0.011714218184351921,
0.06234622746706009,
0.0000050315511543885805,
0.06724147498607635,
0.24457509815692902,
-0.08425161987543106,
0.0379486158490181,
-0.11255490779876709,
-0.03186554089188576,
-0.028285307809710503,
0.0644921213388443,
0.015746356919407845,
-0.011679169721901417,
-0.19680897891521454,
-0.0776633769273758,
0.01986665278673172,
-0.06463362276554108,
0.02394293248653412,
-0.03364264965057373,
0.027849044650793076,
0.07982229441404343,
-0.13327114284038544,
0.14715470373630524,
0.03041977994143963,
0.09633412957191467,
-0.07886788994073868,
-0.06685690581798553,
-0.06106613203883171,
-0.0010906400857493281,
-0.11028124392032623,
-0.13805899024009705,
-0.0189944077283144,
-0.14738759398460388,
-0.03517763316631317,
-0.1335231363773346,
0.024576416239142418,
-0.04153063893318176,
0.12348335236310959,
-0.01421585027128458,
0.07036063075065613,
-0.07830536365509033,
-0.023272579535841942,
0.030359046533703804,
-0.11438994109630585,
-0.015653764829039574,
0.03278553858399391,
-0.16132791340351105,
0.07571741938591003,
-0.05940111726522446,
0.18195989727973938,
0.05002323538064957,
0.12264322489500046,
-0.18872666358947754,
-0.010520579293370247,
-0.12503249943256378,
0.18206606805324554,
0.02467545121908188,
-0.10278695076704025,
0.022287506610155106,
-0.07595288008451462,
-0.1095631942152977,
0.0035906347911804914,
0.051520608365535736,
-0.03886871784925461,
0.014571637846529484,
-0.2949250340461731,
0.00719205429777503,
-0.10657498985528946,
-0.11168701946735382,
-0.06917622685432434,
0.14268529415130615,
0.03340734541416168,
0.08538959920406342,
-0.008004515431821346,
-0.13887064158916473,
0.08024495095014572,
-0.004969592206180096,
-0.0610518641769886,
-0.01463074516505003,
-0.010895236395299435,
-0.13229161500930786,
-0.0330396369099617,
0.06688368320465088,
0.07010385394096375,
0.17895819246768951,
0.1468421220779419,
-0.1073402538895607,
0.1408822387456894,
-0.05974743142724037,
0.024915242567658424,
-0.08455195277929306,
0.04956064745783806,
0.11878432333469391,
0.007299941033124924,
0.015113777481019497,
0.12081704288721085,
0.055951882153749466,
0.048225585371255875,
-0.07304147630929947,
0.04294900223612785,
0.01133055705577135,
-0.1350492238998413,
0.08705426752567291,
0.060459040105342865,
-0.09214596450328827,
-0.08935882896184921,
-0.011039532721042633,
-0.022050179541110992,
-0.07214988023042679,
-0.1249856948852539,
0.022539494559168816,
0.032238468527793884,
0.2586023509502411,
0.01353431586176157,
0.19969482719898224,
-0.05132438614964485,
-0.00870427768677473,
-0.025644710287451744,
-0.2063349038362503,
0.05134260654449463,
-0.14866338670253754,
-0.008144942112267017,
-0.1701856106519699,
0.14093320071697235,
-0.10734611749649048,
-0.13332919776439667,
-0.04797583445906639,
-0.05632861703634262,
0.07163245230913162,
0.08487176150083542,
0.09754743427038193,
-0.13137659430503845,
0.059346653521060944,
-0.015152828767895699,
0.04252083972096443,
0.17744000256061554,
-0.11941201239824295,
0.005603773053735495,
0.10508447140455246,
0.06674645096063614,
0.003773108357563615,
0.11433269828557968,
-0.05720547214150429,
0.23567865788936615,
-0.13092075288295746,
0.14099860191345215,
-0.21731631457805634,
-0.0487244613468647,
0.09513990581035614,
-0.062051307410001755,
0.04277915135025978,
-0.2304452359676361,
0.08016660809516907,
-0.05844606086611748,
-0.11608122289180756,
-0.02423056960105896,
-0.20873168110847473,
-0.02936188131570816,
-0.03451066464185715,
-0.020312951877713203,
0.06921018660068512,
-0.2672951817512512,
0.11730066686868668,
-0.08854880928993225,
-0.07083400338888168,
-0.1005340963602066,
-0.06638320535421371,
-0.15546487271785736,
0.13637422025203705,
-0.10941142588853836,
0.06367260217666626,
-0.003331572748720646,
-0.09418772161006927,
-0.22003473341464996,
-0.09686221927404404,
-0.05212601274251938,
0.0018514604307711124,
-0.12315358966588974,
-0.23156321048736572,
0.04473328962922096,
-0.12580092251300812,
0.16119977831840515,
-0.07981190085411072,
0.06107611209154129,
0.009674801491200924,
-0.04508795589208603,
-0.14238226413726807,
0.013501481153070927,
-0.05243149399757385,
-0.11038818955421448,
-0.0039052474312484264,
-0.07344029098749161,
0.04829155281186104,
-0.00850102212280035,
-0.03358440473675728,
-0.11094555258750916,
0.0386933758854866,
0.13524161279201508,
0.000958349322900176,
-0.106665700674057,
0.10183411836624146,
0.05904868617653847,
-0.18234287202358246,
-0.19791078567504883,
0.053956035524606705,
-0.16884230077266693,
-0.1109689250588417,
-0.13317306339740753,
-0.15623685717582703,
0.13029401004314423,
-0.1138199046254158,
-0.0679139718413353,
0.02558937855064869,
0.16951388120651245,
-0.007758420892059803,
0.23802082240581512,
-0.07438886910676956,
-0.02679418958723545,
0.24506685137748718,
-0.045384589582681656,
-0.13331320881843567,
-0.05198283493518829,
-0.13943831622600555,
-0.17655593156814575,
-0.1458190232515335,
-0.03039037249982357,
0.05408439040184021,
-0.03159894794225693,
0.312668114900589,
-0.06651131808757782,
0.04033614695072174,
0.07358638942241669,
0.22416852414608002,
-0.04806828498840332,
-0.0009009181521832943,
0.01464972086250782,
0.033232271671295166,
0.0861426517367363,
0.053715720772743225,
0.012511193752288818,
0.029382796958088875,
0.014067612588405609,
0.07853787392377853,
-0.16543200612068176,
0.027166826650500298,
-0.09984119236469269,
0.04385693371295929,
0.21575671434402466,
-0.17761661112308502,
0.07955778390169144,
0.17884565889835358,
-0.1404629498720169,
-0.07064572721719742,
0.12567020952701569,
-0.0400637723505497,
0.11952182650566101,
-0.007753300480544567,
0.09333431720733643,
0.053224049508571625,
0.023169856518507004,
-0.04326479882001877,
0.03500087186694145,
-0.07370159029960632,
-0.06597982347011566,
-0.055968958884477615,
-0.07103743404150009,
0.04944176226854324,
-0.07601423561573029,
-0.19216643273830414,
-0.07518532872200012,
-0.020843306556344032,
0.008875689469277859,
0.11540954560041428,
-0.010461783967912197,
0.12502232193946838,
0.24858973920345306,
-0.07530547678470612,
-0.155669167637825,
-0.061221688985824585,
-0.10350753366947174,
-0.04415357857942581,
0.03500445559620857,
0.14518949389457703,
0.04258419945836067,
0.012444140389561653,
-0.13817936182022095,
0.17487452924251556,
-0.11813871562480927,
-0.09939778596162796,
0.24730369448661804,
-0.07293472439050674,
-0.11390112340450287,
0.05233306065201759,
0.11808780580759048,
-0.19514888525009155,
-0.20855553448200226,
-0.07236121594905853,
-0.20080244541168213,
-0.16558104753494263,
0.0241822749376297,
0.07145818322896957,
-0.1140376478433609,
0.05847933888435364,
-0.2351960390806198,
-0.08023157715797424,
0.315422922372818,
0.1977805644273758,
0.0790359377861023,
-0.1206960380077362,
-0.0627073347568512,
-0.0482388436794281,
-0.02463354542851448,
0.17084820568561554,
-0.11900260299444199,
0.25885650515556335,
-0.0815177783370018,
0.042356375604867935,
0.02754916250705719,
-0.13294391334056854,
0.17266845703125,
0.04815632849931717,
-0.15461650490760803,
-0.20827019214630127,
0.07874802500009537,
-0.19127163290977478,
0.029748842120170593,
-0.11147582530975342,
0.0037230979651212692,
0.14481417834758759,
0.1340387463569641,
0.17463964223861694,
-0.05262858048081398,
0.04776439070701599,
0.14500895142555237,
0.19845978915691376,
-0.02214173786342144,
-0.07190067321062088,
-0.23421679437160492,
0.0033820602111518383,
-0.0898296982049942,
-0.07671386003494263,
-0.0981515571475029,
-0.059488143771886826,
-0.16651487350463867,
0.04333413392305374,
-0.08973227441310883,
0.2262028455734253,
-0.014410349540412426,
0.12224790453910828,
-0.19555452466011047,
-0.02025759406387806,
0.2065308392047882,
0.13859239220619202,
-0.036623939871788025,
-0.12568645179271698,
-0.051813796162605286,
-0.19272154569625854,
0.03867188096046448,
0.213289275765419,
0.00325761828571558,
-0.022775961086153984,
0.0005444709677249193,
0.14816085994243622,
-0.036920562386512756,
0.14744198322296143,
0.00932942796498537,
-0.004776974208652973,
0.13413725793361664,
0.24537359178066254,
0.12624594569206238,
-0.022697610780596733,
0.010496420785784721,
0.1629098802804947,
0.03946342691779137,
-0.05492102727293968,
-0.10183035582304001,
0.03706338256597519,
0.10129226744174957,
0.001083525363355875,
0.07541241496801376,
-0.13969725370407104,
0.08166034519672394,
0.06170601397752762,
0.06015847995877266,
0.03915257751941681,
0.07296255230903625,
0.05523000285029411,
-0.37162137031555176,
-0.12264082580804825,
-0.09764012694358826,
0.2760855257511139,
0.19898010790348053,
-0.020636098459362984,
-0.07903208583593369,
-0.0771632120013237,
0.09520646184682846,
0.13729052245616913,
0.022042933851480484,
-0.015024019405245781,
0.0057279872708022594,
0.03786904737353325,
-0.17487798631191254,
-0.0051035271026194096,
0.03387388959527016,
0.15544871985912323,
0.0454554446041584,
0.0988006666302681,
-0.006772094871848822,
-0.2308800369501114,
0.024029117077589035,
0.22568872570991516,
-0.1595316231250763,
0.005378170404583216,
-0.06342486292123795,
-0.03543129935860634,
0.08108342438936234,
0.1259019672870636,
0.06761407107114792,
-0.12158149480819702,
-0.15821972489356995,
-0.050989896059036255,
-0.19625861942768097,
0.12471381574869156,
0.01765727624297142,
0.1224551722407341,
-0.19527962803840637,
0.011638094671070576,
0.16434533894062042,
0.13385546207427979,
-0.03231189027428627,
-0.03859074041247368,
0.01149209588766098,
0.22324621677398682,
0.2245996743440628,
0.18651464581489563,
0.05151372030377388,
-0.054105956107378006,
0.18662184476852417,
0.023558756336569786,
0.00024234535521827638,
0.0687156468629837,
0.009682612493634224,
0.02591758593916893,
-0.0415896400809288,
0.08049940317869186,
-0.00900786742568016,
0.04764627665281296,
0.04928354546427727,
-0.00927985180169344,
-0.07080288976430893,
0.06763973087072372,
-0.1804526448249817,
0.16020898520946503,
0.22089698910713196,
-0.09510169178247452,
-0.04123523458838463,
-0.10222114622592926,
-0.165985569357872,
0.02452521026134491,
-0.07536490261554718,
-0.018430020660161972,
0.04278898984193802,
0.1475471407175064,
0.05068890005350113,
0.010803447104990482,
0.09112250804901123,
0.06530825048685074,
0.12613338232040405,
-0.027715954929590225,
0.0016693213256075978,
0.09965977072715759,
0.05976351350545883,
-0.06721504777669907,
-0.08381006866693497,
-0.04935670644044876,
0.05331902578473091,
0.09381425380706787,
0.03567027673125267,
-0.0024207213427871466,
0.0860712081193924,
-0.03747016564011574,
-0.08560565859079361,
-0.011307698674499989,
-0.07717803120613098,
-0.21173499524593353,
-0.033004067838191986,
0.04437686502933502,
0.11159496009349823,
-0.053081315010786057,
-0.01334403920918703,
-0.0897618904709816,
-0.18515557050704956,
0.12640665471553802,
-0.038135506212711334,
0.05004759877920151,
0.10201933234930038,
0.14443986117839813,
0.12582603096961975,
0.017318682745099068,
0.15522608160972595,
0.12879617512226105,
-0.003216927871108055,
0.027191396802663803,
0.11356150358915329,
0.044713541865348816,
-0.19270628690719604,
0.13256730139255524,
-0.17592541873455048,
-0.19643843173980713,
-0.2151336669921875,
0.06512892991304398,
-0.026342220604419708,
0.2158077210187912,
0.035641834139823914,
-0.05399312824010849,
-0.09805985540151596,
0.053597353398799896,
-0.07559795677661896,
-0.05324550345540047,
0.10549065470695496,
0.15943898260593414,
-0.14998647570610046,
-0.14363239705562592,
-2.605123233452661e-32,
-0.046475280076265335,
-0.033967118710279465,
-0.06962493807077408,
-0.15252506732940674,
-0.1277025192975998,
0.07354693859815598,
0.08219149708747864,
0.059537339955568314,
0.061699140816926956,
0.002632501535117626,
-0.14729107916355133,
0.07865734398365021,
0.06145026907324791,
0.016840143129229546,
-0.08553794771432877,
0.040816742926836014,
-0.010315247811377048,
-0.030430862680077553,
0.011771655641496181,
-0.0520143136382103,
0.1421864628791809,
0.019019220024347305,
-0.022616159170866013,
-0.14218775928020477,
-0.012408818118274212,
0.0892842635512352,
-0.10142230242490768,
-0.11080451309680939,
0.07683755457401276,
-0.11434165388345718,
0.008443665690720081,
0.2285165786743164,
0.018600083887577057,
-0.010437949560582638,
-0.10340731590986252,
0.012927155010402203,
-0.16728611290454865,
-0.0010134609183296561,
-0.03501462936401367,
0.01320022065192461,
0.05796029418706894,
0.13409623503684998,
0.12640444934368134,
-0.09394209086894989,
-0.012188777327537537,
-0.04934303089976311,
0.024302056059241295,
0.06450062990188599,
0.07517828792333603,
-0.03930747136473656,
0.017777882516384125,
-0.084897980093956,
-0.05884275957942009,
0.1319136768579483,
-0.009302332997322083,
0.01525589358061552,
0.04530925303697586,
0.19011107087135315,
-0.17179247736930847,
-0.03671032190322876,
0.12698958814144135,
0.003256368450820446,
0.11860987544059753,
-0.08794046193361282,
-0.009728865697979927,
0.058820221573114395,
0.2865739166736603,
0.012080015614628792,
0.00927233137190342,
-0.11647789925336838,
-0.06133536994457245,
-0.032644595950841904,
-0.06386403739452362,
0.014009307138621807,
-0.0665239691734314,
0.11928023397922516,
-0.2232867330312729,
0.03219055384397507,
-0.15089043974876404,
-0.1499415934085846,
-0.0626307800412178,
0.06986227631568909,
0.03201517090201378,
-0.11729088425636292,
0.03040093556046486,
-0.13623261451721191,
0.059548504650592804,
0.017279522493481636,
-0.1280796229839325,
-0.12325984984636307,
-0.00837177038192749,
0.1945153921842575,
-0.06488833576440811,
-0.08027660101652145,
-0.12182753533124924,
0.09181167930364609,
-0.14220912754535675,
0.19286103546619415,
-0.0037309168837964535,
0.006096587050706148,
-0.06905736029148102,
-0.14700371026992798,
0.05717935413122177,
0.20695392787456512,
0.21686257421970367,
0.2311326265335083,
0.18940326571464539,
0.03016916662454605,
-0.1553734689950943,
-0.06542959809303284,
-0.047644104808568954,
0.09068317711353302,
0.096431665122509,
0.19143232703208923,
0.16379188001155853,
-0.07933636754751205,
0.13686683773994446,
-0.07418322563171387,
0.14614544808864594,
0.11690354347229004,
0.04544990882277489,
-0.04001711308956146,
-0.17742177844047546,
-0.1079033836722374,
0.16834001243114471,
0.00006941503670532256,
-0.08249817788600922,
-0.16078859567642212,
0.24587894976139069,
-0.06669633835554123,
0.11345773935317993,
-0.08466093987226486,
7.305824283321272e-7,
-0.11212678253650665,
0.10139742493629456,
0.011453951708972454,
-0.05084548518061638,
-0.09223002195358276,
0.12429355829954147,
-0.12561695277690887,
0.1689174324274063,
-0.17688524723052979,
0.17156805098056793,
0.2112259417772293,
-0.07041993737220764,
0.019748784601688385,
-0.018421271815896034,
0.12281735241413116,
-0.06950978934764862,
-0.24003759026527405,
0.12499023228883743,
-0.038577850908041,
0.025523332878947258,
0.08960749208927155,
0.033061154186725616,
0.12029235810041428,
-0.11074702441692352,
0.08717138320207596,
-0.024036990478634834,
-0.0021278734784573317,
0.03540263697504997,
0.08279253542423248,
0.1023513525724411,
0.015901735052466393,
-0.09500808268785477,
0.09247472882270813,
0.14884409308433533,
0.0347093865275383,
0.01368026714771986,
-0.09422342479228973,
-0.009062639437615871,
-0.07031890749931335,
0.03314695507287979,
-0.08157193660736084,
0.024638550356030464,
0.05408181622624397,
0.14671948552131653,
0.127145916223526,
-0.09611896425485611,
-0.05115276202559471,
0.20114389061927795,
-0.06335517019033432,
0.2360580712556839,
-0.127717986702919,
0.19471700489521027,
0.16884009540081024,
0.12244883179664612,
-0.047431446611881256,
0.05051621422171593,
0.08477775007486343,
-0.18071071803569794,
0.2594757080078125,
-0.05529593303799629,
-0.07463816553354263,
-0.029646549373865128,
-0.045596588402986526,
-0.08186829835176468,
-0.037730295211076736,
-0.06749612838029861,
-0.16399100422859192,
1.959062354691116e-34,
0.10918021947145462,
0.12568627297878265,
-0.07822031527757645,
-0.18888989090919495,
-0.0021775730419903994,
-0.12579232454299927,
0.1288488209247589,
-0.024068022146821022,
0.09332415461540222,
-0.08313114941120148,
-0.10798909515142441
] |
https://github.com/huggingface/datasets/issues/5965 | "Couldn't cast array of type" in complex datasets | @mariosasko Put up an initial PR to implement this proposal. Let me know your thoughts on direction and what else should be in-scope here. | ### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux | 24 | "Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
@mariosasko Put up an initial PR to implement this proposal. Let me know your thoughts on direction and what else should be in-scope here. | [
0.023039560765028,
0.08479779213666916,
-0.03420985862612724,
-0.08843552321195602,
0.21419557929039001,
0.10067474842071533,
0.1391715109348297,
0.15732137858867645,
-0.02228400483727455,
0.11448030173778534,
0.0660654827952385,
-0.0967242568731308,
0.021327951923012733,
-0.11079639941453934,
-0.035542938858270645,
-0.08627188205718994,
0.07574532181024551,
-0.2120600938796997,
-0.06447721272706985,
0.024836493656039238,
-0.08211006969213486,
0.03955869376659393,
0.059279244393110275,
0.010849014855921268,
-0.002504647010937333,
-0.321490079164505,
-0.08274209499359131,
0.0184228103607893,
-0.13131773471832275,
-0.02976761944591999,
0.17033426463603973,
-0.02484538033604622,
0.011714218184351921,
0.06234622746706009,
0.0000050315511543885805,
0.06724147498607635,
0.24457509815692902,
-0.08425161987543106,
0.0379486158490181,
-0.11255490779876709,
-0.03186554089188576,
-0.028285307809710503,
0.0644921213388443,
0.015746356919407845,
-0.011679169721901417,
-0.19680897891521454,
-0.0776633769273758,
0.01986665278673172,
-0.06463362276554108,
0.02394293248653412,
-0.03364264965057373,
0.027849044650793076,
0.07982229441404343,
-0.13327114284038544,
0.14715470373630524,
0.03041977994143963,
0.09633412957191467,
-0.07886788994073868,
-0.06685690581798553,
-0.06106613203883171,
-0.0010906400857493281,
-0.11028124392032623,
-0.13805899024009705,
-0.0189944077283144,
-0.14738759398460388,
-0.03517763316631317,
-0.1335231363773346,
0.024576416239142418,
-0.04153063893318176,
0.12348335236310959,
-0.01421585027128458,
0.07036063075065613,
-0.07830536365509033,
-0.023272579535841942,
0.030359046533703804,
-0.11438994109630585,
-0.015653764829039574,
0.03278553858399391,
-0.16132791340351105,
0.07571741938591003,
-0.05940111726522446,
0.18195989727973938,
0.05002323538064957,
0.12264322489500046,
-0.18872666358947754,
-0.010520579293370247,
-0.12503249943256378,
0.18206606805324554,
0.02467545121908188,
-0.10278695076704025,
0.022287506610155106,
-0.07595288008451462,
-0.1095631942152977,
0.0035906347911804914,
0.051520608365535736,
-0.03886871784925461,
0.014571637846529484,
-0.2949250340461731,
0.00719205429777503,
-0.10657498985528946,
-0.11168701946735382,
-0.06917622685432434,
0.14268529415130615,
0.03340734541416168,
0.08538959920406342,
-0.008004515431821346,
-0.13887064158916473,
0.08024495095014572,
-0.004969592206180096,
-0.0610518641769886,
-0.01463074516505003,
-0.010895236395299435,
-0.13229161500930786,
-0.0330396369099617,
0.06688368320465088,
0.07010385394096375,
0.17895819246768951,
0.1468421220779419,
-0.1073402538895607,
0.1408822387456894,
-0.05974743142724037,
0.024915242567658424,
-0.08455195277929306,
0.04956064745783806,
0.11878432333469391,
0.007299941033124924,
0.015113777481019497,
0.12081704288721085,
0.055951882153749466,
0.048225585371255875,
-0.07304147630929947,
0.04294900223612785,
0.01133055705577135,
-0.1350492238998413,
0.08705426752567291,
0.060459040105342865,
-0.09214596450328827,
-0.08935882896184921,
-0.011039532721042633,
-0.022050179541110992,
-0.07214988023042679,
-0.1249856948852539,
0.022539494559168816,
0.032238468527793884,
0.2586023509502411,
0.01353431586176157,
0.19969482719898224,
-0.05132438614964485,
-0.00870427768677473,
-0.025644710287451744,
-0.2063349038362503,
0.05134260654449463,
-0.14866338670253754,
-0.008144942112267017,
-0.1701856106519699,
0.14093320071697235,
-0.10734611749649048,
-0.13332919776439667,
-0.04797583445906639,
-0.05632861703634262,
0.07163245230913162,
0.08487176150083542,
0.09754743427038193,
-0.13137659430503845,
0.059346653521060944,
-0.015152828767895699,
0.04252083972096443,
0.17744000256061554,
-0.11941201239824295,
0.005603773053735495,
0.10508447140455246,
0.06674645096063614,
0.003773108357563615,
0.11433269828557968,
-0.05720547214150429,
0.23567865788936615,
-0.13092075288295746,
0.14099860191345215,
-0.21731631457805634,
-0.0487244613468647,
0.09513990581035614,
-0.062051307410001755,
0.04277915135025978,
-0.2304452359676361,
0.08016660809516907,
-0.05844606086611748,
-0.11608122289180756,
-0.02423056960105896,
-0.20873168110847473,
-0.02936188131570816,
-0.03451066464185715,
-0.020312951877713203,
0.06921018660068512,
-0.2672951817512512,
0.11730066686868668,
-0.08854880928993225,
-0.07083400338888168,
-0.1005340963602066,
-0.06638320535421371,
-0.15546487271785736,
0.13637422025203705,
-0.10941142588853836,
0.06367260217666626,
-0.003331572748720646,
-0.09418772161006927,
-0.22003473341464996,
-0.09686221927404404,
-0.05212601274251938,
0.0018514604307711124,
-0.12315358966588974,
-0.23156321048736572,
0.04473328962922096,
-0.12580092251300812,
0.16119977831840515,
-0.07981190085411072,
0.06107611209154129,
0.009674801491200924,
-0.04508795589208603,
-0.14238226413726807,
0.013501481153070927,
-0.05243149399757385,
-0.11038818955421448,
-0.0039052474312484264,
-0.07344029098749161,
0.04829155281186104,
-0.00850102212280035,
-0.03358440473675728,
-0.11094555258750916,
0.0386933758854866,
0.13524161279201508,
0.000958349322900176,
-0.106665700674057,
0.10183411836624146,
0.05904868617653847,
-0.18234287202358246,
-0.19791078567504883,
0.053956035524606705,
-0.16884230077266693,
-0.1109689250588417,
-0.13317306339740753,
-0.15623685717582703,
0.13029401004314423,
-0.1138199046254158,
-0.0679139718413353,
0.02558937855064869,
0.16951388120651245,
-0.007758420892059803,
0.23802082240581512,
-0.07438886910676956,
-0.02679418958723545,
0.24506685137748718,
-0.045384589582681656,
-0.13331320881843567,
-0.05198283493518829,
-0.13943831622600555,
-0.17655593156814575,
-0.1458190232515335,
-0.03039037249982357,
0.05408439040184021,
-0.03159894794225693,
0.312668114900589,
-0.06651131808757782,
0.04033614695072174,
0.07358638942241669,
0.22416852414608002,
-0.04806828498840332,
-0.0009009181521832943,
0.01464972086250782,
0.033232271671295166,
0.0861426517367363,
0.053715720772743225,
0.012511193752288818,
0.029382796958088875,
0.014067612588405609,
0.07853787392377853,
-0.16543200612068176,
0.027166826650500298,
-0.09984119236469269,
0.04385693371295929,
0.21575671434402466,
-0.17761661112308502,
0.07955778390169144,
0.17884565889835358,
-0.1404629498720169,
-0.07064572721719742,
0.12567020952701569,
-0.0400637723505497,
0.11952182650566101,
-0.007753300480544567,
0.09333431720733643,
0.053224049508571625,
0.023169856518507004,
-0.04326479882001877,
0.03500087186694145,
-0.07370159029960632,
-0.06597982347011566,
-0.055968958884477615,
-0.07103743404150009,
0.04944176226854324,
-0.07601423561573029,
-0.19216643273830414,
-0.07518532872200012,
-0.020843306556344032,
0.008875689469277859,
0.11540954560041428,
-0.010461783967912197,
0.12502232193946838,
0.24858973920345306,
-0.07530547678470612,
-0.155669167637825,
-0.061221688985824585,
-0.10350753366947174,
-0.04415357857942581,
0.03500445559620857,
0.14518949389457703,
0.04258419945836067,
0.012444140389561653,
-0.13817936182022095,
0.17487452924251556,
-0.11813871562480927,
-0.09939778596162796,
0.24730369448661804,
-0.07293472439050674,
-0.11390112340450287,
0.05233306065201759,
0.11808780580759048,
-0.19514888525009155,
-0.20855553448200226,
-0.07236121594905853,
-0.20080244541168213,
-0.16558104753494263,
0.0241822749376297,
0.07145818322896957,
-0.1140376478433609,
0.05847933888435364,
-0.2351960390806198,
-0.08023157715797424,
0.315422922372818,
0.1977805644273758,
0.0790359377861023,
-0.1206960380077362,
-0.0627073347568512,
-0.0482388436794281,
-0.02463354542851448,
0.17084820568561554,
-0.11900260299444199,
0.25885650515556335,
-0.0815177783370018,
0.042356375604867935,
0.02754916250705719,
-0.13294391334056854,
0.17266845703125,
0.04815632849931717,
-0.15461650490760803,
-0.20827019214630127,
0.07874802500009537,
-0.19127163290977478,
0.029748842120170593,
-0.11147582530975342,
0.0037230979651212692,
0.14481417834758759,
0.1340387463569641,
0.17463964223861694,
-0.05262858048081398,
0.04776439070701599,
0.14500895142555237,
0.19845978915691376,
-0.02214173786342144,
-0.07190067321062088,
-0.23421679437160492,
0.0033820602111518383,
-0.0898296982049942,
-0.07671386003494263,
-0.0981515571475029,
-0.059488143771886826,
-0.16651487350463867,
0.04333413392305374,
-0.08973227441310883,
0.2262028455734253,
-0.014410349540412426,
0.12224790453910828,
-0.19555452466011047,
-0.02025759406387806,
0.2065308392047882,
0.13859239220619202,
-0.036623939871788025,
-0.12568645179271698,
-0.051813796162605286,
-0.19272154569625854,
0.03867188096046448,
0.213289275765419,
0.00325761828571558,
-0.022775961086153984,
0.0005444709677249193,
0.14816085994243622,
-0.036920562386512756,
0.14744198322296143,
0.00932942796498537,
-0.004776974208652973,
0.13413725793361664,
0.24537359178066254,
0.12624594569206238,
-0.022697610780596733,
0.010496420785784721,
0.1629098802804947,
0.03946342691779137,
-0.05492102727293968,
-0.10183035582304001,
0.03706338256597519,
0.10129226744174957,
0.001083525363355875,
0.07541241496801376,
-0.13969725370407104,
0.08166034519672394,
0.06170601397752762,
0.06015847995877266,
0.03915257751941681,
0.07296255230903625,
0.05523000285029411,
-0.37162137031555176,
-0.12264082580804825,
-0.09764012694358826,
0.2760855257511139,
0.19898010790348053,
-0.020636098459362984,
-0.07903208583593369,
-0.0771632120013237,
0.09520646184682846,
0.13729052245616913,
0.022042933851480484,
-0.015024019405245781,
0.0057279872708022594,
0.03786904737353325,
-0.17487798631191254,
-0.0051035271026194096,
0.03387388959527016,
0.15544871985912323,
0.0454554446041584,
0.0988006666302681,
-0.006772094871848822,
-0.2308800369501114,
0.024029117077589035,
0.22568872570991516,
-0.1595316231250763,
0.005378170404583216,
-0.06342486292123795,
-0.03543129935860634,
0.08108342438936234,
0.1259019672870636,
0.06761407107114792,
-0.12158149480819702,
-0.15821972489356995,
-0.050989896059036255,
-0.19625861942768097,
0.12471381574869156,
0.01765727624297142,
0.1224551722407341,
-0.19527962803840637,
0.011638094671070576,
0.16434533894062042,
0.13385546207427979,
-0.03231189027428627,
-0.03859074041247368,
0.01149209588766098,
0.22324621677398682,
0.2245996743440628,
0.18651464581489563,
0.05151372030377388,
-0.054105956107378006,
0.18662184476852417,
0.023558756336569786,
0.00024234535521827638,
0.0687156468629837,
0.009682612493634224,
0.02591758593916893,
-0.0415896400809288,
0.08049940317869186,
-0.00900786742568016,
0.04764627665281296,
0.04928354546427727,
-0.00927985180169344,
-0.07080288976430893,
0.06763973087072372,
-0.1804526448249817,
0.16020898520946503,
0.22089698910713196,
-0.09510169178247452,
-0.04123523458838463,
-0.10222114622592926,
-0.165985569357872,
0.02452521026134491,
-0.07536490261554718,
-0.018430020660161972,
0.04278898984193802,
0.1475471407175064,
0.05068890005350113,
0.010803447104990482,
0.09112250804901123,
0.06530825048685074,
0.12613338232040405,
-0.027715954929590225,
0.0016693213256075978,
0.09965977072715759,
0.05976351350545883,
-0.06721504777669907,
-0.08381006866693497,
-0.04935670644044876,
0.05331902578473091,
0.09381425380706787,
0.03567027673125267,
-0.0024207213427871466,
0.0860712081193924,
-0.03747016564011574,
-0.08560565859079361,
-0.011307698674499989,
-0.07717803120613098,
-0.21173499524593353,
-0.033004067838191986,
0.04437686502933502,
0.11159496009349823,
-0.053081315010786057,
-0.01334403920918703,
-0.0897618904709816,
-0.18515557050704956,
0.12640665471553802,
-0.038135506212711334,
0.05004759877920151,
0.10201933234930038,
0.14443986117839813,
0.12582603096961975,
0.017318682745099068,
0.15522608160972595,
0.12879617512226105,
-0.003216927871108055,
0.027191396802663803,
0.11356150358915329,
0.044713541865348816,
-0.19270628690719604,
0.13256730139255524,
-0.17592541873455048,
-0.19643843173980713,
-0.2151336669921875,
0.06512892991304398,
-0.026342220604419708,
0.2158077210187912,
0.035641834139823914,
-0.05399312824010849,
-0.09805985540151596,
0.053597353398799896,
-0.07559795677661896,
-0.05324550345540047,
0.10549065470695496,
0.15943898260593414,
-0.14998647570610046,
-0.14363239705562592,
-2.605123233452661e-32,
-0.046475280076265335,
-0.033967118710279465,
-0.06962493807077408,
-0.15252506732940674,
-0.1277025192975998,
0.07354693859815598,
0.08219149708747864,
0.059537339955568314,
0.061699140816926956,
0.002632501535117626,
-0.14729107916355133,
0.07865734398365021,
0.06145026907324791,
0.016840143129229546,
-0.08553794771432877,
0.040816742926836014,
-0.010315247811377048,
-0.030430862680077553,
0.011771655641496181,
-0.0520143136382103,
0.1421864628791809,
0.019019220024347305,
-0.022616159170866013,
-0.14218775928020477,
-0.012408818118274212,
0.0892842635512352,
-0.10142230242490768,
-0.11080451309680939,
0.07683755457401276,
-0.11434165388345718,
0.008443665690720081,
0.2285165786743164,
0.018600083887577057,
-0.010437949560582638,
-0.10340731590986252,
0.012927155010402203,
-0.16728611290454865,
-0.0010134609183296561,
-0.03501462936401367,
0.01320022065192461,
0.05796029418706894,
0.13409623503684998,
0.12640444934368134,
-0.09394209086894989,
-0.012188777327537537,
-0.04934303089976311,
0.024302056059241295,
0.06450062990188599,
0.07517828792333603,
-0.03930747136473656,
0.017777882516384125,
-0.084897980093956,
-0.05884275957942009,
0.1319136768579483,
-0.009302332997322083,
0.01525589358061552,
0.04530925303697586,
0.19011107087135315,
-0.17179247736930847,
-0.03671032190322876,
0.12698958814144135,
0.003256368450820446,
0.11860987544059753,
-0.08794046193361282,
-0.009728865697979927,
0.058820221573114395,
0.2865739166736603,
0.012080015614628792,
0.00927233137190342,
-0.11647789925336838,
-0.06133536994457245,
-0.032644595950841904,
-0.06386403739452362,
0.014009307138621807,
-0.0665239691734314,
0.11928023397922516,
-0.2232867330312729,
0.03219055384397507,
-0.15089043974876404,
-0.1499415934085846,
-0.0626307800412178,
0.06986227631568909,
0.03201517090201378,
-0.11729088425636292,
0.03040093556046486,
-0.13623261451721191,
0.059548504650592804,
0.017279522493481636,
-0.1280796229839325,
-0.12325984984636307,
-0.00837177038192749,
0.1945153921842575,
-0.06488833576440811,
-0.08027660101652145,
-0.12182753533124924,
0.09181167930364609,
-0.14220912754535675,
0.19286103546619415,
-0.0037309168837964535,
0.006096587050706148,
-0.06905736029148102,
-0.14700371026992798,
0.05717935413122177,
0.20695392787456512,
0.21686257421970367,
0.2311326265335083,
0.18940326571464539,
0.03016916662454605,
-0.1553734689950943,
-0.06542959809303284,
-0.047644104808568954,
0.09068317711353302,
0.096431665122509,
0.19143232703208923,
0.16379188001155853,
-0.07933636754751205,
0.13686683773994446,
-0.07418322563171387,
0.14614544808864594,
0.11690354347229004,
0.04544990882277489,
-0.04001711308956146,
-0.17742177844047546,
-0.1079033836722374,
0.16834001243114471,
0.00006941503670532256,
-0.08249817788600922,
-0.16078859567642212,
0.24587894976139069,
-0.06669633835554123,
0.11345773935317993,
-0.08466093987226486,
7.305824283321272e-7,
-0.11212678253650665,
0.10139742493629456,
0.011453951708972454,
-0.05084548518061638,
-0.09223002195358276,
0.12429355829954147,
-0.12561695277690887,
0.1689174324274063,
-0.17688524723052979,
0.17156805098056793,
0.2112259417772293,
-0.07041993737220764,
0.019748784601688385,
-0.018421271815896034,
0.12281735241413116,
-0.06950978934764862,
-0.24003759026527405,
0.12499023228883743,
-0.038577850908041,
0.025523332878947258,
0.08960749208927155,
0.033061154186725616,
0.12029235810041428,
-0.11074702441692352,
0.08717138320207596,
-0.024036990478634834,
-0.0021278734784573317,
0.03540263697504997,
0.08279253542423248,
0.1023513525724411,
0.015901735052466393,
-0.09500808268785477,
0.09247472882270813,
0.14884409308433533,
0.0347093865275383,
0.01368026714771986,
-0.09422342479228973,
-0.009062639437615871,
-0.07031890749931335,
0.03314695507287979,
-0.08157193660736084,
0.024638550356030464,
0.05408181622624397,
0.14671948552131653,
0.127145916223526,
-0.09611896425485611,
-0.05115276202559471,
0.20114389061927795,
-0.06335517019033432,
0.2360580712556839,
-0.127717986702919,
0.19471700489521027,
0.16884009540081024,
0.12244883179664612,
-0.047431446611881256,
0.05051621422171593,
0.08477775007486343,
-0.18071071803569794,
0.2594757080078125,
-0.05529593303799629,
-0.07463816553354263,
-0.029646549373865128,
-0.045596588402986526,
-0.08186829835176468,
-0.037730295211076736,
-0.06749612838029861,
-0.16399100422859192,
1.959062354691116e-34,
0.10918021947145462,
0.12568627297878265,
-0.07822031527757645,
-0.18888989090919495,
-0.0021775730419903994,
-0.12579232454299927,
0.1288488209247589,
-0.024068022146821022,
0.09332415461540222,
-0.08313114941120148,
-0.10798909515142441
] |
https://github.com/huggingface/datasets/issues/5963 | Got an error _pickle.PicklingError use Dataset.from_spark. | i got error using method from_spark when using multi-node Spark cluster. seems could only use "from_spark" in local? | python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 18 | Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
i got error using method from_spark when using multi-node Spark cluster. seems could only use "from_spark" in local? | [
-0.07752278447151184,
-0.09337377548217773,
-0.011128445155918598,
-0.1698015034198761,
0.13619302213191986,
0.019566195085644722,
0.19890405237674713,
0.13917233049869537,
-0.0238414965569973,
0.07585181295871735,
0.04286695271730423,
0.20813030004501343,
-0.006341530941426754,
0.07669556140899658,
-0.12801624834537506,
-0.10388898849487305,
-0.09205395728349686,
-0.16833743453025818,
-0.059561971575021744,
0.06176738440990448,
-0.05160898715257645,
0.16076594591140747,
0.2074074149131775,
0.027783522382378578,
-0.103728286921978,
-0.2807946801185608,
-0.11210732161998749,
0.08867055922746658,
-0.034081485122442245,
-0.10193748772144318,
0.16714131832122803,
0.08877483010292053,
0.06912147998809814,
0.20631994307041168,
0.0000049033128561859485,
-0.10779209434986115,
0.007994201965630054,
0.054524749517440796,
-0.046612631529569626,
-0.14829184114933014,
0.08533171564340591,
-0.005426748655736446,
0.15117526054382324,
-0.10462307184934616,
0.044871795922517776,
0.11867382377386093,
-0.1612575799226761,
0.24271801114082336,
0.17553168535232544,
-0.025581376627087593,
0.026371750980615616,
0.03577399253845215,
0.2019362449645996,
-0.08707945048809052,
-0.10513825714588165,
-0.042476024478673935,
0.037753570824861526,
0.15679824352264404,
-0.19436505436897278,
0.04019821062684059,
-0.11700370907783508,
0.02798542194068432,
0.046458858996629715,
-0.07119672000408173,
-0.057972561568021774,
0.009777255356311798,
-0.2203282117843628,
-0.04626016691327095,
0.02498723566532135,
0.20781747996807098,
0.20448407530784607,
-0.0555531308054924,
-0.1822832226753235,
-0.12880268692970276,
-0.0006729160668328404,
-0.1921997368335724,
0.03154630959033966,
-0.0050127641297876835,
-0.19655291736125946,
0.0834287628531456,
0.037132058292627335,
0.0759829506278038,
0.0714804008603096,
-0.08404775708913803,
0.06597878038883209,
-0.0033730107825249434,
-0.20178790390491486,
0.20863859355449677,
0.11548517644405365,
-0.14162349700927734,
0.036772165447473526,
0.026168320327997208,
0.01593450829386711,
-0.20786945521831512,
0.026830529794096947,
-0.11080775409936905,
-0.11794283241033554,
-0.28242331743240356,
-0.15050570666790009,
-0.0935041531920433,
-0.062341202050447464,
-0.3001437187194824,
0.007279410492628813,
0.14584772288799286,
0.10053817182779312,
-0.02380981110036373,
-0.05883849412202835,
0.029879538342356682,
0.00867962185293436,
-0.029232999309897423,
-0.04198183864355087,
0.13743096590042114,
-0.13407579064369202,
-0.12322572618722916,
-0.013990102335810661,
0.10305064916610718,
0.10506265610456467,
0.10946865379810333,
-0.03203822672367096,
-0.03684011474251747,
0.10303183645009995,
0.10164283961057663,
-0.017047127708792686,
-0.10210862010717392,
0.11179662495851517,
-0.024829179048538208,
-0.08296740055084229,
0.11238203197717667,
-0.014013734646141529,
-0.03397111967206001,
0.07005675882101059,
0.060768645256757736,
0.00951747503131628,
-0.16089540719985962,
0.05379735305905342,
-0.25209206342697144,
-0.02674248069524765,
-0.19992923736572266,
-0.16524851322174072,
0.11491777002811432,
0.1929088830947876,
-0.16373656690120697,
-0.3111562430858612,
-0.033539675176143646,
0.14906848967075348,
-0.011045864783227444,
0.08939667791128159,
-0.12356662005186081,
0.002661673817783594,
-0.0833047479391098,
-0.25291335582733154,
-0.07716287672519684,
-0.3324746787548065,
-0.008210331201553345,
-0.11452207714319229,
0.04698681831359863,
-0.11948640644550323,
-0.007410983555018902,
-0.23838558793067932,
-0.15564125776290894,
-0.05080825462937355,
0.0282000545412302,
-0.02583337016403675,
-0.23129135370254517,
0.08338324725627899,
-0.008534623309969902,
0.04878602549433708,
0.12964379787445068,
-0.08004531264305115,
0.010309752076864243,
0.15896552801132202,
0.06133440136909485,
-0.0014515756629407406,
-0.05906829982995987,
-0.10808419436216354,
0.22439339756965637,
-0.07272882759571075,
0.014509038999676704,
-0.14059482514858246,
0.018993277102708817,
-0.06724103540182114,
-0.09740883111953735,
0.07346014678478241,
-0.17185187339782715,
-0.0016963620437309146,
-0.06358995288610458,
-0.05773274227976799,
0.04687771946191788,
-0.042902108281850815,
-0.11058724671602249,
0.10128659754991531,
0.05505449324846268,
0.17010994255542755,
-0.1451026350259781,
0.1358678787946701,
-0.1295498013496399,
-0.12703610956668854,
-0.017443297430872917,
0.05779290199279785,
-0.03481799364089966,
-0.10563404858112335,
-0.15947672724723816,
-0.04998301342129707,
-0.06028981879353523,
-0.01555092167109251,
0.058744437992572784,
-0.08608619123697281,
0.01345894392579794,
0.10760191828012466,
-0.12033317238092422,
-0.1152997836470604,
0.0005392887396737933,
-0.09009627997875214,
0.17984427511692047,
-0.016459982842206955,
-0.08278872072696686,
0.07521574944257736,
-0.12955835461616516,
0.011458308435976505,
0.1472107470035553,
-0.08049951493740082,
0.08161161094903946,
0.1217375248670578,
-0.0423114039003849,
-0.008384979330003262,
0.09536434710025787,
-0.027941226959228516,
-0.10836129635572433,
0.06130290776491165,
0.02067219465970993,
-0.13266605138778687,
-0.06278229504823685,
-0.04672655463218689,
0.14751361310482025,
-0.12794993817806244,
0.005787249654531479,
0.15156877040863037,
-0.201111301779747,
0.013885279186069965,
0.04481957480311394,
-0.21486052870750427,
0.10577033460140228,
-0.040468063205480576,
0.02907576598227024,
-0.01761809177696705,
0.0749068334698677,
-0.016623448580503464,
0.1343430131673813,
-0.07191061973571777,
-0.028804495930671692,
0.17533421516418457,
-0.07101815938949585,
-0.11535511165857315,
0.002361764432862401,
-0.01367697212845087,
-0.09515593200922012,
0.00810924544930458,
-0.004921065177768469,
-0.1834893673658371,
-0.04765364155173302,
0.1661824733018875,
0.07670082896947861,
0.003996191546320915,
0.14393001794815063,
0.16191746294498444,
-0.1746276617050171,
0.22687289118766785,
-0.07809117436408997,
-0.11176566779613495,
0.0679531842470169,
-0.131336972117424,
-0.03650498390197754,
0.051044825464487076,
-0.094736248254776,
0.04227426275610924,
0.06564222276210785,
0.21653378009796143,
0.02999701164662838,
0.01641778089106083,
0.04097408056259155,
-0.15818648040294647,
0.0355815552175045,
0.2220299243927002,
-0.09869108349084854,
-0.003317848313599825,
0.21824504435062408,
-0.007474988233298063,
0.08604586869478226,
-0.055408068001270294,
0.17737530171871185,
-0.010096694342792034,
0.06712967902421951,
0.09801365435123444,
-0.01923176273703575,
-0.09764047712087631,
-0.07635437697172165,
0.05019091069698334,
-0.06331072002649307,
-0.05494840815663338,
0.19228553771972656,
-0.21783868968486786,
-0.09342311322689056,
0.1409939080476761,
0.02435135655105114,
-0.017269104719161987,
0.005876397248357534,
0.07527173310518265,
0.37017303705215454,
0.0644911527633667,
-0.1917315274477005,
0.11966211348772049,
-0.17922650277614594,
-0.05071183294057846,
0.158585324883461,
0.14174452424049377,
-0.08616376668214798,
-0.14610973000526428,
-0.1206488162279129,
-0.02217954583466053,
0.06741788983345032,
-0.02109220251441002,
0.0453563928604126,
-0.00617733970284462,
0.1913427859544754,
0.013814226724207401,
0.0855703204870224,
-0.4022485017776489,
-0.1142735406756401,
0.026461957022547722,
-0.07669512927532196,
-0.05382658168673515,
0.0893552303314209,
0.12138582020998001,
0.07145245373249054,
-0.08747592568397522,
-0.1013142466545105,
-0.12475127726793289,
0.11529114842414856,
0.18846432864665985,
-0.024042535573244095,
-0.06519009917974472,
-0.0777462050318718,
-0.09715206921100616,
0.02673855796456337,
0.04497607797384262,
-0.08649902045726776,
0.08140682429075241,
-0.0008734317380003631,
-0.04560321569442749,
-0.1516108363866806,
-0.0012723851250484586,
0.16110122203826904,
-0.040617767721414566,
-0.19248606264591217,
0.04587511718273163,
0.09265193343162537,
-0.13475000858306885,
0.055013805627822876,
-0.07991057634353638,
0.09715428948402405,
0.22517572343349457,
0.07874191552400589,
0.19409838318824768,
-0.1209825798869133,
-0.11641079187393188,
0.1237579882144928,
0.20619890093803406,
-0.06111134961247444,
-0.08481063693761826,
-0.16309630870819092,
0.079526387155056,
-0.13588429987430573,
-0.0647532269358635,
0.02172921784222126,
-0.10684368759393692,
0.16528533399105072,
-0.08967559784650803,
-0.1953936368227005,
0.0418025366961956,
-0.08695781975984573,
0.039090536534786224,
-0.04895956814289093,
-0.01878155954182148,
0.006360146217048168,
0.1145591214299202,
-0.030901536345481873,
-0.13130231201648712,
0.07759011536836624,
-0.07251226156949997,
0.2153148651123047,
0.19693449139595032,
-0.17281793057918549,
-0.034986045211553574,
-0.09664807468652725,
0.005788587965071201,
-0.11085757613182068,
0.03822571784257889,
0.07296116650104523,
0.07645640522241592,
-0.0020859281066805124,
0.2196601927280426,
0.20438751578330994,
-0.03401975706219673,
0.16277824342250824,
0.0011464115232229233,
-0.017362769693136215,
-0.098075270652771,
-0.21808640658855438,
0.11051762104034424,
-0.04760538414120674,
-0.011201362125575542,
0.19489671289920807,
-0.04746907949447632,
0.016022855415940285,
0.01732766255736351,
-0.07761796563863754,
0.051932767033576965,
-0.05416572839021683,
-0.11320243775844574,
-0.11606883257627487,
-0.31859079003334045,
-0.08289051800966263,
0.1075122058391571,
0.21156862378120422,
-0.08637354522943497,
-0.08224721252918243,
0.15112712979316711,
-0.001080866320990026,
0.059049662202596664,
-0.07783859968185425,
0.0726638063788414,
-0.07484020292758942,
0.20214389264583588,
0.02527710050344467,
-0.08172781020402908,
-0.08852126449346542,
0.15811242163181305,
0.031578000634908676,
-0.03503738343715668,
0.03977551683783531,
-0.11886586993932724,
-0.01816004142165184,
0.18105605244636536,
-0.21453556418418884,
0.3491869270801544,
-0.028857126832008362,
0.047637686133384705,
0.0017316909506917,
0.02676033042371273,
-0.0513913631439209,
-0.11472658812999725,
-0.05111602321267128,
-0.04862657189369202,
-0.10515477508306503,
0.07812822610139847,
0.09285388141870499,
0.13554580509662628,
-0.12429631501436234,
0.026990994811058044,
0.10668010264635086,
0.18207527697086334,
-0.025533359497785568,
-0.08721313625574112,
0.046173062175512314,
0.24402596056461334,
-0.09065765142440796,
0.18971934914588928,
0.12712974846363068,
0.07607531547546387,
0.07390511780977249,
0.14040811359882355,
0.1531999707221985,
-0.017195245251059532,
-0.08521180599927902,
0.03313163295388222,
-0.19648554921150208,
-0.09363589435815811,
-0.06438392400741577,
-0.044738829135894775,
-0.050463031977415085,
0.16655869781970978,
-0.15495799481868744,
0.008685940876603127,
-0.04540644586086273,
-0.021983345970511436,
-0.018466822803020477,
0.17726300656795502,
-0.019864162430167198,
-0.1855923980474472,
0.08377370983362198,
0.03800441697239876,
-0.16435255110263824,
-0.05626531317830086,
-0.057410337030887604,
0.24412308633327484,
-0.007680217735469341,
-0.028830690309405327,
0.1241251677274704,
0.17565149068832397,
-0.04550115391612053,
-0.007376548368483782,
-0.003342706011608243,
-0.03925498574972153,
-0.020572584122419357,
0.06443747878074646,
-0.03936309739947319,
0.0886281430721283,
0.20882803201675415,
0.034811776131391525,
-0.00810431782156229,
0.03462851047515869,
0.09915196895599365,
-0.160943403840065,
0.1601521521806717,
0.04031286761164665,
-0.06256811320781708,
-0.052208252251148224,
0.02145811915397644,
-0.05894824117422104,
-0.003943067509680986,
-0.03254567086696625,
-0.18126030266284943,
0.10648331791162491,
0.011647369712591171,
0.019657758995890617,
0.06924640387296677,
0.01682170294225216,
0.19310346245765686,
0.2085164338350296,
0.010188142769038677,
0.05058049038052559,
0.2512843906879425,
0.24483127892017365,
-0.18454046547412872,
-0.042481038719415665,
0.05152757465839386,
-0.000004648381946026348,
-0.055458080023527145,
0.2235521376132965,
-0.12122831493616104,
-0.002886837348341942,
-0.14276152849197388,
0.03272155299782753,
0.12581832706928253,
0.16370035707950592,
0.2328416407108307,
-0.058755893260240555,
-0.13480690121650696,
0.042356498539447784,
-0.11521518230438232,
-0.14616337418556213,
0.21563361585140228,
0.08845415711402893,
0.05045682191848755,
0.004968840163201094,
-2.3220857934833505e-32,
0.026768367737531662,
-0.006573337130248547,
-0.07256121188402176,
0.0734243243932724,
-0.3723628520965576,
0.04050441458821297,
0.012744486331939697,
0.006305368151515722,
-0.10748425126075745,
0.023562796413898468,
0.04319862648844719,
0.08254065364599228,
-0.010700514540076256,
-0.06548808515071869,
-0.09943755716085434,
-0.043158043175935745,
-0.1170654147863388,
-0.017140546813607216,
0.021091481670737267,
0.07504428178071976,
0.07077585905790329,
0.045581549406051636,
0.06890609860420227,
0.018654193729162216,
-0.018880778923630714,
-0.10438153892755508,
-0.07968955487012863,
0.030135607346892357,
0.07156084477901459,
-0.16297873854637146,
-0.00261586788110435,
0.06421229243278503,
0.02303541824221611,
-0.16677109897136688,
-0.05984578654170036,
0.016267910599708557,
-0.05644109845161438,
-0.03580894693732262,
-0.04585602879524231,
0.06359990686178207,
-0.03820786625146866,
0.16879834234714508,
0.06912944465875626,
-0.1329120397567749,
-0.019269879907369614,
0.13969852030277252,
0.07685889303684235,
0.06272532790899277,
0.05718482658267021,
-0.09226105362176895,
0.03689131513237953,
-0.023928245529532433,
-0.1059807613492012,
0.10581626743078232,
0.05273496359586716,
-0.2815828323364258,
0.10110821574926376,
0.1843428760766983,
-0.14692892134189606,
-0.08097407966852188,
-0.021048538386821747,
-0.20974530279636383,
0.0602157860994339,
-0.018956970423460007,
0.006046523340046406,
0.0525929294526577,
0.18632028996944427,
-0.07430806010961533,
0.015380440279841423,
-0.1176544651389122,
-0.014272492378950119,
0.09307470917701721,
-0.10100682079792023,
0.08450188487768173,
-0.2431463599205017,
-0.04545823857188225,
-0.1082264855504036,
-0.028833791613578796,
0.03538782149553299,
-0.22463677823543549,
0.04607925936579704,
0.029291564598679543,
0.12026908993721008,
-0.04969465360045433,
0.05917131528258324,
0.06307544559240341,
0.02753271721303463,
0.03721285238862038,
-0.05758462846279144,
-0.12394129484891891,
-0.00027852514176629484,
0.12942539155483246,
-0.06875386089086533,
-0.11562691628932953,
0.0009671846637502313,
0.14945738017559052,
0.04550980404019356,
0.07756110280752182,
-0.08566712588071823,
-0.12326356768608093,
-0.09146806597709656,
0.11375175416469574,
-0.10284952819347382,
0.24553483724594116,
0.2611892819404602,
0.02924257144331932,
-0.003942020703107119,
-0.026280470192432404,
-0.082308329641819,
0.01854901947081089,
-0.01949644275009632,
-0.17262427508831024,
0.18024775385856628,
0.2772603929042816,
0.19730277359485626,
0.027123916894197464,
-0.015427381731569767,
-0.026345031335949898,
0.16165770590305328,
0.12509633600711823,
-0.013553986325860023,
-0.20687676966190338,
-0.034962210804224014,
-0.08504176884889603,
0.13244971632957458,
0.05737636983394623,
-0.03948518633842468,
0.03426592797040939,
0.12202128022909164,
0.05373112112283707,
0.038620468229055405,
-0.15417540073394775,
7.130827270884765e-7,
-0.14990946650505066,
0.21533647179603577,
-0.010402945801615715,
-0.169012650847435,
-0.11085780709981918,
0.14774209260940552,
-0.2054068148136139,
0.11854713410139084,
0.03549366071820259,
0.1196506917476654,
0.02520783804357052,
-0.030891135334968567,
-0.058397483080625534,
0.007231735158711672,
-0.03994441032409668,
-0.11941526085138321,
-0.21002592146396637,
0.04940970987081528,
0.027371721342206,
0.059428196400403976,
0.018499258905649185,
-0.03084399737417698,
0.22882692515850067,
-0.056971799582242966,
0.1200588271021843,
0.10126542299985886,
-0.09586422890424728,
-0.023641273379325867,
-0.013462696224451065,
-0.005422085523605347,
-0.05849101021885872,
0.03379112109541893,
-0.08761542290449142,
0.16724714636802673,
-0.034477729350328445,
-0.09501159936189651,
-0.01980961672961712,
-0.03060934506356716,
0.03593241050839424,
0.1343822181224823,
-0.07422366738319397,
0.12251487374305725,
-0.08545589447021484,
0.04795223847031593,
0.026749800890684128,
-0.05821523070335388,
-0.1730099767446518,
0.06960253417491913,
-0.09330848604440689,
0.01976890116930008,
0.11836384981870651,
0.09218130260705948,
0.06400950253009796,
0.17993564903736115,
-0.04695821925997734,
0.14968359470367432,
-0.14752061665058136,
-0.018301282078027725,
0.2027939409017563,
0.09195929020643234,
-0.00027207753737457097,
-0.1187509149312973,
-0.05235975608229637,
0.05760292708873749,
0.07747180759906769,
-0.0271675493568182,
-0.0030425386503338814,
-6.357817316765811e-35,
0.045008692890405655,
0.14456987380981445,
-0.03615735471248627,
-0.08040468394756317,
-0.1201181709766388,
-0.053430937230587006,
0.2575661540031433,
-0.08725377917289734,
0.20268036425113678,
-0.1187385618686676,
0.0842466652393341
] |
https://github.com/huggingface/datasets/issues/5963 | Got an error _pickle.PicklingError use Dataset.from_spark. | cc @maddiedawson it looks like there an issue with `_validate_cache_dir` ?
It looks like the function passed to mapPartitions has a reference to the Spark dataset builder, and therefore contains the SparkContext itself.
I think it can be fixed by defining `create_cache_and_write_probe` outside the Spark dataset builder, and pass a `partial(create_cache_and_write_probe, cache_dir=self._cache_dir)` to `mapPartitions` | python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 54 | Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
cc @maddiedawson it looks like there an issue with `_validate_cache_dir` ?
It looks like the function passed to mapPartitions has a reference to the Spark dataset builder, and therefore contains the SparkContext itself.
I think it can be fixed by defining `create_cache_and_write_probe` outside the Spark dataset builder, and pass a `partial(create_cache_and_write_probe, cache_dir=self._cache_dir)` to `mapPartitions` | [
-0.07752278447151184,
-0.09337377548217773,
-0.011128445155918598,
-0.1698015034198761,
0.13619302213191986,
0.019566195085644722,
0.19890405237674713,
0.13917233049869537,
-0.0238414965569973,
0.07585181295871735,
0.04286695271730423,
0.20813030004501343,
-0.006341530941426754,
0.07669556140899658,
-0.12801624834537506,
-0.10388898849487305,
-0.09205395728349686,
-0.16833743453025818,
-0.059561971575021744,
0.06176738440990448,
-0.05160898715257645,
0.16076594591140747,
0.2074074149131775,
0.027783522382378578,
-0.103728286921978,
-0.2807946801185608,
-0.11210732161998749,
0.08867055922746658,
-0.034081485122442245,
-0.10193748772144318,
0.16714131832122803,
0.08877483010292053,
0.06912147998809814,
0.20631994307041168,
0.0000049033128561859485,
-0.10779209434986115,
0.007994201965630054,
0.054524749517440796,
-0.046612631529569626,
-0.14829184114933014,
0.08533171564340591,
-0.005426748655736446,
0.15117526054382324,
-0.10462307184934616,
0.044871795922517776,
0.11867382377386093,
-0.1612575799226761,
0.24271801114082336,
0.17553168535232544,
-0.025581376627087593,
0.026371750980615616,
0.03577399253845215,
0.2019362449645996,
-0.08707945048809052,
-0.10513825714588165,
-0.042476024478673935,
0.037753570824861526,
0.15679824352264404,
-0.19436505436897278,
0.04019821062684059,
-0.11700370907783508,
0.02798542194068432,
0.046458858996629715,
-0.07119672000408173,
-0.057972561568021774,
0.009777255356311798,
-0.2203282117843628,
-0.04626016691327095,
0.02498723566532135,
0.20781747996807098,
0.20448407530784607,
-0.0555531308054924,
-0.1822832226753235,
-0.12880268692970276,
-0.0006729160668328404,
-0.1921997368335724,
0.03154630959033966,
-0.0050127641297876835,
-0.19655291736125946,
0.0834287628531456,
0.037132058292627335,
0.0759829506278038,
0.0714804008603096,
-0.08404775708913803,
0.06597878038883209,
-0.0033730107825249434,
-0.20178790390491486,
0.20863859355449677,
0.11548517644405365,
-0.14162349700927734,
0.036772165447473526,
0.026168320327997208,
0.01593450829386711,
-0.20786945521831512,
0.026830529794096947,
-0.11080775409936905,
-0.11794283241033554,
-0.28242331743240356,
-0.15050570666790009,
-0.0935041531920433,
-0.062341202050447464,
-0.3001437187194824,
0.007279410492628813,
0.14584772288799286,
0.10053817182779312,
-0.02380981110036373,
-0.05883849412202835,
0.029879538342356682,
0.00867962185293436,
-0.029232999309897423,
-0.04198183864355087,
0.13743096590042114,
-0.13407579064369202,
-0.12322572618722916,
-0.013990102335810661,
0.10305064916610718,
0.10506265610456467,
0.10946865379810333,
-0.03203822672367096,
-0.03684011474251747,
0.10303183645009995,
0.10164283961057663,
-0.017047127708792686,
-0.10210862010717392,
0.11179662495851517,
-0.024829179048538208,
-0.08296740055084229,
0.11238203197717667,
-0.014013734646141529,
-0.03397111967206001,
0.07005675882101059,
0.060768645256757736,
0.00951747503131628,
-0.16089540719985962,
0.05379735305905342,
-0.25209206342697144,
-0.02674248069524765,
-0.19992923736572266,
-0.16524851322174072,
0.11491777002811432,
0.1929088830947876,
-0.16373656690120697,
-0.3111562430858612,
-0.033539675176143646,
0.14906848967075348,
-0.011045864783227444,
0.08939667791128159,
-0.12356662005186081,
0.002661673817783594,
-0.0833047479391098,
-0.25291335582733154,
-0.07716287672519684,
-0.3324746787548065,
-0.008210331201553345,
-0.11452207714319229,
0.04698681831359863,
-0.11948640644550323,
-0.007410983555018902,
-0.23838558793067932,
-0.15564125776290894,
-0.05080825462937355,
0.0282000545412302,
-0.02583337016403675,
-0.23129135370254517,
0.08338324725627899,
-0.008534623309969902,
0.04878602549433708,
0.12964379787445068,
-0.08004531264305115,
0.010309752076864243,
0.15896552801132202,
0.06133440136909485,
-0.0014515756629407406,
-0.05906829982995987,
-0.10808419436216354,
0.22439339756965637,
-0.07272882759571075,
0.014509038999676704,
-0.14059482514858246,
0.018993277102708817,
-0.06724103540182114,
-0.09740883111953735,
0.07346014678478241,
-0.17185187339782715,
-0.0016963620437309146,
-0.06358995288610458,
-0.05773274227976799,
0.04687771946191788,
-0.042902108281850815,
-0.11058724671602249,
0.10128659754991531,
0.05505449324846268,
0.17010994255542755,
-0.1451026350259781,
0.1358678787946701,
-0.1295498013496399,
-0.12703610956668854,
-0.017443297430872917,
0.05779290199279785,
-0.03481799364089966,
-0.10563404858112335,
-0.15947672724723816,
-0.04998301342129707,
-0.06028981879353523,
-0.01555092167109251,
0.058744437992572784,
-0.08608619123697281,
0.01345894392579794,
0.10760191828012466,
-0.12033317238092422,
-0.1152997836470604,
0.0005392887396737933,
-0.09009627997875214,
0.17984427511692047,
-0.016459982842206955,
-0.08278872072696686,
0.07521574944257736,
-0.12955835461616516,
0.011458308435976505,
0.1472107470035553,
-0.08049951493740082,
0.08161161094903946,
0.1217375248670578,
-0.0423114039003849,
-0.008384979330003262,
0.09536434710025787,
-0.027941226959228516,
-0.10836129635572433,
0.06130290776491165,
0.02067219465970993,
-0.13266605138778687,
-0.06278229504823685,
-0.04672655463218689,
0.14751361310482025,
-0.12794993817806244,
0.005787249654531479,
0.15156877040863037,
-0.201111301779747,
0.013885279186069965,
0.04481957480311394,
-0.21486052870750427,
0.10577033460140228,
-0.040468063205480576,
0.02907576598227024,
-0.01761809177696705,
0.0749068334698677,
-0.016623448580503464,
0.1343430131673813,
-0.07191061973571777,
-0.028804495930671692,
0.17533421516418457,
-0.07101815938949585,
-0.11535511165857315,
0.002361764432862401,
-0.01367697212845087,
-0.09515593200922012,
0.00810924544930458,
-0.004921065177768469,
-0.1834893673658371,
-0.04765364155173302,
0.1661824733018875,
0.07670082896947861,
0.003996191546320915,
0.14393001794815063,
0.16191746294498444,
-0.1746276617050171,
0.22687289118766785,
-0.07809117436408997,
-0.11176566779613495,
0.0679531842470169,
-0.131336972117424,
-0.03650498390197754,
0.051044825464487076,
-0.094736248254776,
0.04227426275610924,
0.06564222276210785,
0.21653378009796143,
0.02999701164662838,
0.01641778089106083,
0.04097408056259155,
-0.15818648040294647,
0.0355815552175045,
0.2220299243927002,
-0.09869108349084854,
-0.003317848313599825,
0.21824504435062408,
-0.007474988233298063,
0.08604586869478226,
-0.055408068001270294,
0.17737530171871185,
-0.010096694342792034,
0.06712967902421951,
0.09801365435123444,
-0.01923176273703575,
-0.09764047712087631,
-0.07635437697172165,
0.05019091069698334,
-0.06331072002649307,
-0.05494840815663338,
0.19228553771972656,
-0.21783868968486786,
-0.09342311322689056,
0.1409939080476761,
0.02435135655105114,
-0.017269104719161987,
0.005876397248357534,
0.07527173310518265,
0.37017303705215454,
0.0644911527633667,
-0.1917315274477005,
0.11966211348772049,
-0.17922650277614594,
-0.05071183294057846,
0.158585324883461,
0.14174452424049377,
-0.08616376668214798,
-0.14610973000526428,
-0.1206488162279129,
-0.02217954583466053,
0.06741788983345032,
-0.02109220251441002,
0.0453563928604126,
-0.00617733970284462,
0.1913427859544754,
0.013814226724207401,
0.0855703204870224,
-0.4022485017776489,
-0.1142735406756401,
0.026461957022547722,
-0.07669512927532196,
-0.05382658168673515,
0.0893552303314209,
0.12138582020998001,
0.07145245373249054,
-0.08747592568397522,
-0.1013142466545105,
-0.12475127726793289,
0.11529114842414856,
0.18846432864665985,
-0.024042535573244095,
-0.06519009917974472,
-0.0777462050318718,
-0.09715206921100616,
0.02673855796456337,
0.04497607797384262,
-0.08649902045726776,
0.08140682429075241,
-0.0008734317380003631,
-0.04560321569442749,
-0.1516108363866806,
-0.0012723851250484586,
0.16110122203826904,
-0.040617767721414566,
-0.19248606264591217,
0.04587511718273163,
0.09265193343162537,
-0.13475000858306885,
0.055013805627822876,
-0.07991057634353638,
0.09715428948402405,
0.22517572343349457,
0.07874191552400589,
0.19409838318824768,
-0.1209825798869133,
-0.11641079187393188,
0.1237579882144928,
0.20619890093803406,
-0.06111134961247444,
-0.08481063693761826,
-0.16309630870819092,
0.079526387155056,
-0.13588429987430573,
-0.0647532269358635,
0.02172921784222126,
-0.10684368759393692,
0.16528533399105072,
-0.08967559784650803,
-0.1953936368227005,
0.0418025366961956,
-0.08695781975984573,
0.039090536534786224,
-0.04895956814289093,
-0.01878155954182148,
0.006360146217048168,
0.1145591214299202,
-0.030901536345481873,
-0.13130231201648712,
0.07759011536836624,
-0.07251226156949997,
0.2153148651123047,
0.19693449139595032,
-0.17281793057918549,
-0.034986045211553574,
-0.09664807468652725,
0.005788587965071201,
-0.11085757613182068,
0.03822571784257889,
0.07296116650104523,
0.07645640522241592,
-0.0020859281066805124,
0.2196601927280426,
0.20438751578330994,
-0.03401975706219673,
0.16277824342250824,
0.0011464115232229233,
-0.017362769693136215,
-0.098075270652771,
-0.21808640658855438,
0.11051762104034424,
-0.04760538414120674,
-0.011201362125575542,
0.19489671289920807,
-0.04746907949447632,
0.016022855415940285,
0.01732766255736351,
-0.07761796563863754,
0.051932767033576965,
-0.05416572839021683,
-0.11320243775844574,
-0.11606883257627487,
-0.31859079003334045,
-0.08289051800966263,
0.1075122058391571,
0.21156862378120422,
-0.08637354522943497,
-0.08224721252918243,
0.15112712979316711,
-0.001080866320990026,
0.059049662202596664,
-0.07783859968185425,
0.0726638063788414,
-0.07484020292758942,
0.20214389264583588,
0.02527710050344467,
-0.08172781020402908,
-0.08852126449346542,
0.15811242163181305,
0.031578000634908676,
-0.03503738343715668,
0.03977551683783531,
-0.11886586993932724,
-0.01816004142165184,
0.18105605244636536,
-0.21453556418418884,
0.3491869270801544,
-0.028857126832008362,
0.047637686133384705,
0.0017316909506917,
0.02676033042371273,
-0.0513913631439209,
-0.11472658812999725,
-0.05111602321267128,
-0.04862657189369202,
-0.10515477508306503,
0.07812822610139847,
0.09285388141870499,
0.13554580509662628,
-0.12429631501436234,
0.026990994811058044,
0.10668010264635086,
0.18207527697086334,
-0.025533359497785568,
-0.08721313625574112,
0.046173062175512314,
0.24402596056461334,
-0.09065765142440796,
0.18971934914588928,
0.12712974846363068,
0.07607531547546387,
0.07390511780977249,
0.14040811359882355,
0.1531999707221985,
-0.017195245251059532,
-0.08521180599927902,
0.03313163295388222,
-0.19648554921150208,
-0.09363589435815811,
-0.06438392400741577,
-0.044738829135894775,
-0.050463031977415085,
0.16655869781970978,
-0.15495799481868744,
0.008685940876603127,
-0.04540644586086273,
-0.021983345970511436,
-0.018466822803020477,
0.17726300656795502,
-0.019864162430167198,
-0.1855923980474472,
0.08377370983362198,
0.03800441697239876,
-0.16435255110263824,
-0.05626531317830086,
-0.057410337030887604,
0.24412308633327484,
-0.007680217735469341,
-0.028830690309405327,
0.1241251677274704,
0.17565149068832397,
-0.04550115391612053,
-0.007376548368483782,
-0.003342706011608243,
-0.03925498574972153,
-0.020572584122419357,
0.06443747878074646,
-0.03936309739947319,
0.0886281430721283,
0.20882803201675415,
0.034811776131391525,
-0.00810431782156229,
0.03462851047515869,
0.09915196895599365,
-0.160943403840065,
0.1601521521806717,
0.04031286761164665,
-0.06256811320781708,
-0.052208252251148224,
0.02145811915397644,
-0.05894824117422104,
-0.003943067509680986,
-0.03254567086696625,
-0.18126030266284943,
0.10648331791162491,
0.011647369712591171,
0.019657758995890617,
0.06924640387296677,
0.01682170294225216,
0.19310346245765686,
0.2085164338350296,
0.010188142769038677,
0.05058049038052559,
0.2512843906879425,
0.24483127892017365,
-0.18454046547412872,
-0.042481038719415665,
0.05152757465839386,
-0.000004648381946026348,
-0.055458080023527145,
0.2235521376132965,
-0.12122831493616104,
-0.002886837348341942,
-0.14276152849197388,
0.03272155299782753,
0.12581832706928253,
0.16370035707950592,
0.2328416407108307,
-0.058755893260240555,
-0.13480690121650696,
0.042356498539447784,
-0.11521518230438232,
-0.14616337418556213,
0.21563361585140228,
0.08845415711402893,
0.05045682191848755,
0.004968840163201094,
-2.3220857934833505e-32,
0.026768367737531662,
-0.006573337130248547,
-0.07256121188402176,
0.0734243243932724,
-0.3723628520965576,
0.04050441458821297,
0.012744486331939697,
0.006305368151515722,
-0.10748425126075745,
0.023562796413898468,
0.04319862648844719,
0.08254065364599228,
-0.010700514540076256,
-0.06548808515071869,
-0.09943755716085434,
-0.043158043175935745,
-0.1170654147863388,
-0.017140546813607216,
0.021091481670737267,
0.07504428178071976,
0.07077585905790329,
0.045581549406051636,
0.06890609860420227,
0.018654193729162216,
-0.018880778923630714,
-0.10438153892755508,
-0.07968955487012863,
0.030135607346892357,
0.07156084477901459,
-0.16297873854637146,
-0.00261586788110435,
0.06421229243278503,
0.02303541824221611,
-0.16677109897136688,
-0.05984578654170036,
0.016267910599708557,
-0.05644109845161438,
-0.03580894693732262,
-0.04585602879524231,
0.06359990686178207,
-0.03820786625146866,
0.16879834234714508,
0.06912944465875626,
-0.1329120397567749,
-0.019269879907369614,
0.13969852030277252,
0.07685889303684235,
0.06272532790899277,
0.05718482658267021,
-0.09226105362176895,
0.03689131513237953,
-0.023928245529532433,
-0.1059807613492012,
0.10581626743078232,
0.05273496359586716,
-0.2815828323364258,
0.10110821574926376,
0.1843428760766983,
-0.14692892134189606,
-0.08097407966852188,
-0.021048538386821747,
-0.20974530279636383,
0.0602157860994339,
-0.018956970423460007,
0.006046523340046406,
0.0525929294526577,
0.18632028996944427,
-0.07430806010961533,
0.015380440279841423,
-0.1176544651389122,
-0.014272492378950119,
0.09307470917701721,
-0.10100682079792023,
0.08450188487768173,
-0.2431463599205017,
-0.04545823857188225,
-0.1082264855504036,
-0.028833791613578796,
0.03538782149553299,
-0.22463677823543549,
0.04607925936579704,
0.029291564598679543,
0.12026908993721008,
-0.04969465360045433,
0.05917131528258324,
0.06307544559240341,
0.02753271721303463,
0.03721285238862038,
-0.05758462846279144,
-0.12394129484891891,
-0.00027852514176629484,
0.12942539155483246,
-0.06875386089086533,
-0.11562691628932953,
0.0009671846637502313,
0.14945738017559052,
0.04550980404019356,
0.07756110280752182,
-0.08566712588071823,
-0.12326356768608093,
-0.09146806597709656,
0.11375175416469574,
-0.10284952819347382,
0.24553483724594116,
0.2611892819404602,
0.02924257144331932,
-0.003942020703107119,
-0.026280470192432404,
-0.082308329641819,
0.01854901947081089,
-0.01949644275009632,
-0.17262427508831024,
0.18024775385856628,
0.2772603929042816,
0.19730277359485626,
0.027123916894197464,
-0.015427381731569767,
-0.026345031335949898,
0.16165770590305328,
0.12509633600711823,
-0.013553986325860023,
-0.20687676966190338,
-0.034962210804224014,
-0.08504176884889603,
0.13244971632957458,
0.05737636983394623,
-0.03948518633842468,
0.03426592797040939,
0.12202128022909164,
0.05373112112283707,
0.038620468229055405,
-0.15417540073394775,
7.130827270884765e-7,
-0.14990946650505066,
0.21533647179603577,
-0.010402945801615715,
-0.169012650847435,
-0.11085780709981918,
0.14774209260940552,
-0.2054068148136139,
0.11854713410139084,
0.03549366071820259,
0.1196506917476654,
0.02520783804357052,
-0.030891135334968567,
-0.058397483080625534,
0.007231735158711672,
-0.03994441032409668,
-0.11941526085138321,
-0.21002592146396637,
0.04940970987081528,
0.027371721342206,
0.059428196400403976,
0.018499258905649185,
-0.03084399737417698,
0.22882692515850067,
-0.056971799582242966,
0.1200588271021843,
0.10126542299985886,
-0.09586422890424728,
-0.023641273379325867,
-0.013462696224451065,
-0.005422085523605347,
-0.05849101021885872,
0.03379112109541893,
-0.08761542290449142,
0.16724714636802673,
-0.034477729350328445,
-0.09501159936189651,
-0.01980961672961712,
-0.03060934506356716,
0.03593241050839424,
0.1343822181224823,
-0.07422366738319397,
0.12251487374305725,
-0.08545589447021484,
0.04795223847031593,
0.026749800890684128,
-0.05821523070335388,
-0.1730099767446518,
0.06960253417491913,
-0.09330848604440689,
0.01976890116930008,
0.11836384981870651,
0.09218130260705948,
0.06400950253009796,
0.17993564903736115,
-0.04695821925997734,
0.14968359470367432,
-0.14752061665058136,
-0.018301282078027725,
0.2027939409017563,
0.09195929020643234,
-0.00027207753737457097,
-0.1187509149312973,
-0.05235975608229637,
0.05760292708873749,
0.07747180759906769,
-0.0271675493568182,
-0.0030425386503338814,
-6.357817316765811e-35,
0.045008692890405655,
0.14456987380981445,
-0.03615735471248627,
-0.08040468394756317,
-0.1201181709766388,
-0.053430937230587006,
0.2575661540031433,
-0.08725377917289734,
0.20268036425113678,
-0.1187385618686676,
0.0842466652393341
] |
https://github.com/huggingface/datasets/issues/5963 | Got an error _pickle.PicklingError use Dataset.from_spark. | Just saw this; thanks for flagging! Your proposed solution sounds good. I can prepare a PR | python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 16 | Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
Just saw this; thanks for flagging! Your proposed solution sounds good. I can prepare a PR | [
-0.07752278447151184,
-0.09337377548217773,
-0.011128445155918598,
-0.1698015034198761,
0.13619302213191986,
0.019566195085644722,
0.19890405237674713,
0.13917233049869537,
-0.0238414965569973,
0.07585181295871735,
0.04286695271730423,
0.20813030004501343,
-0.006341530941426754,
0.07669556140899658,
-0.12801624834537506,
-0.10388898849487305,
-0.09205395728349686,
-0.16833743453025818,
-0.059561971575021744,
0.06176738440990448,
-0.05160898715257645,
0.16076594591140747,
0.2074074149131775,
0.027783522382378578,
-0.103728286921978,
-0.2807946801185608,
-0.11210732161998749,
0.08867055922746658,
-0.034081485122442245,
-0.10193748772144318,
0.16714131832122803,
0.08877483010292053,
0.06912147998809814,
0.20631994307041168,
0.0000049033128561859485,
-0.10779209434986115,
0.007994201965630054,
0.054524749517440796,
-0.046612631529569626,
-0.14829184114933014,
0.08533171564340591,
-0.005426748655736446,
0.15117526054382324,
-0.10462307184934616,
0.044871795922517776,
0.11867382377386093,
-0.1612575799226761,
0.24271801114082336,
0.17553168535232544,
-0.025581376627087593,
0.026371750980615616,
0.03577399253845215,
0.2019362449645996,
-0.08707945048809052,
-0.10513825714588165,
-0.042476024478673935,
0.037753570824861526,
0.15679824352264404,
-0.19436505436897278,
0.04019821062684059,
-0.11700370907783508,
0.02798542194068432,
0.046458858996629715,
-0.07119672000408173,
-0.057972561568021774,
0.009777255356311798,
-0.2203282117843628,
-0.04626016691327095,
0.02498723566532135,
0.20781747996807098,
0.20448407530784607,
-0.0555531308054924,
-0.1822832226753235,
-0.12880268692970276,
-0.0006729160668328404,
-0.1921997368335724,
0.03154630959033966,
-0.0050127641297876835,
-0.19655291736125946,
0.0834287628531456,
0.037132058292627335,
0.0759829506278038,
0.0714804008603096,
-0.08404775708913803,
0.06597878038883209,
-0.0033730107825249434,
-0.20178790390491486,
0.20863859355449677,
0.11548517644405365,
-0.14162349700927734,
0.036772165447473526,
0.026168320327997208,
0.01593450829386711,
-0.20786945521831512,
0.026830529794096947,
-0.11080775409936905,
-0.11794283241033554,
-0.28242331743240356,
-0.15050570666790009,
-0.0935041531920433,
-0.062341202050447464,
-0.3001437187194824,
0.007279410492628813,
0.14584772288799286,
0.10053817182779312,
-0.02380981110036373,
-0.05883849412202835,
0.029879538342356682,
0.00867962185293436,
-0.029232999309897423,
-0.04198183864355087,
0.13743096590042114,
-0.13407579064369202,
-0.12322572618722916,
-0.013990102335810661,
0.10305064916610718,
0.10506265610456467,
0.10946865379810333,
-0.03203822672367096,
-0.03684011474251747,
0.10303183645009995,
0.10164283961057663,
-0.017047127708792686,
-0.10210862010717392,
0.11179662495851517,
-0.024829179048538208,
-0.08296740055084229,
0.11238203197717667,
-0.014013734646141529,
-0.03397111967206001,
0.07005675882101059,
0.060768645256757736,
0.00951747503131628,
-0.16089540719985962,
0.05379735305905342,
-0.25209206342697144,
-0.02674248069524765,
-0.19992923736572266,
-0.16524851322174072,
0.11491777002811432,
0.1929088830947876,
-0.16373656690120697,
-0.3111562430858612,
-0.033539675176143646,
0.14906848967075348,
-0.011045864783227444,
0.08939667791128159,
-0.12356662005186081,
0.002661673817783594,
-0.0833047479391098,
-0.25291335582733154,
-0.07716287672519684,
-0.3324746787548065,
-0.008210331201553345,
-0.11452207714319229,
0.04698681831359863,
-0.11948640644550323,
-0.007410983555018902,
-0.23838558793067932,
-0.15564125776290894,
-0.05080825462937355,
0.0282000545412302,
-0.02583337016403675,
-0.23129135370254517,
0.08338324725627899,
-0.008534623309969902,
0.04878602549433708,
0.12964379787445068,
-0.08004531264305115,
0.010309752076864243,
0.15896552801132202,
0.06133440136909485,
-0.0014515756629407406,
-0.05906829982995987,
-0.10808419436216354,
0.22439339756965637,
-0.07272882759571075,
0.014509038999676704,
-0.14059482514858246,
0.018993277102708817,
-0.06724103540182114,
-0.09740883111953735,
0.07346014678478241,
-0.17185187339782715,
-0.0016963620437309146,
-0.06358995288610458,
-0.05773274227976799,
0.04687771946191788,
-0.042902108281850815,
-0.11058724671602249,
0.10128659754991531,
0.05505449324846268,
0.17010994255542755,
-0.1451026350259781,
0.1358678787946701,
-0.1295498013496399,
-0.12703610956668854,
-0.017443297430872917,
0.05779290199279785,
-0.03481799364089966,
-0.10563404858112335,
-0.15947672724723816,
-0.04998301342129707,
-0.06028981879353523,
-0.01555092167109251,
0.058744437992572784,
-0.08608619123697281,
0.01345894392579794,
0.10760191828012466,
-0.12033317238092422,
-0.1152997836470604,
0.0005392887396737933,
-0.09009627997875214,
0.17984427511692047,
-0.016459982842206955,
-0.08278872072696686,
0.07521574944257736,
-0.12955835461616516,
0.011458308435976505,
0.1472107470035553,
-0.08049951493740082,
0.08161161094903946,
0.1217375248670578,
-0.0423114039003849,
-0.008384979330003262,
0.09536434710025787,
-0.027941226959228516,
-0.10836129635572433,
0.06130290776491165,
0.02067219465970993,
-0.13266605138778687,
-0.06278229504823685,
-0.04672655463218689,
0.14751361310482025,
-0.12794993817806244,
0.005787249654531479,
0.15156877040863037,
-0.201111301779747,
0.013885279186069965,
0.04481957480311394,
-0.21486052870750427,
0.10577033460140228,
-0.040468063205480576,
0.02907576598227024,
-0.01761809177696705,
0.0749068334698677,
-0.016623448580503464,
0.1343430131673813,
-0.07191061973571777,
-0.028804495930671692,
0.17533421516418457,
-0.07101815938949585,
-0.11535511165857315,
0.002361764432862401,
-0.01367697212845087,
-0.09515593200922012,
0.00810924544930458,
-0.004921065177768469,
-0.1834893673658371,
-0.04765364155173302,
0.1661824733018875,
0.07670082896947861,
0.003996191546320915,
0.14393001794815063,
0.16191746294498444,
-0.1746276617050171,
0.22687289118766785,
-0.07809117436408997,
-0.11176566779613495,
0.0679531842470169,
-0.131336972117424,
-0.03650498390197754,
0.051044825464487076,
-0.094736248254776,
0.04227426275610924,
0.06564222276210785,
0.21653378009796143,
0.02999701164662838,
0.01641778089106083,
0.04097408056259155,
-0.15818648040294647,
0.0355815552175045,
0.2220299243927002,
-0.09869108349084854,
-0.003317848313599825,
0.21824504435062408,
-0.007474988233298063,
0.08604586869478226,
-0.055408068001270294,
0.17737530171871185,
-0.010096694342792034,
0.06712967902421951,
0.09801365435123444,
-0.01923176273703575,
-0.09764047712087631,
-0.07635437697172165,
0.05019091069698334,
-0.06331072002649307,
-0.05494840815663338,
0.19228553771972656,
-0.21783868968486786,
-0.09342311322689056,
0.1409939080476761,
0.02435135655105114,
-0.017269104719161987,
0.005876397248357534,
0.07527173310518265,
0.37017303705215454,
0.0644911527633667,
-0.1917315274477005,
0.11966211348772049,
-0.17922650277614594,
-0.05071183294057846,
0.158585324883461,
0.14174452424049377,
-0.08616376668214798,
-0.14610973000526428,
-0.1206488162279129,
-0.02217954583466053,
0.06741788983345032,
-0.02109220251441002,
0.0453563928604126,
-0.00617733970284462,
0.1913427859544754,
0.013814226724207401,
0.0855703204870224,
-0.4022485017776489,
-0.1142735406756401,
0.026461957022547722,
-0.07669512927532196,
-0.05382658168673515,
0.0893552303314209,
0.12138582020998001,
0.07145245373249054,
-0.08747592568397522,
-0.1013142466545105,
-0.12475127726793289,
0.11529114842414856,
0.18846432864665985,
-0.024042535573244095,
-0.06519009917974472,
-0.0777462050318718,
-0.09715206921100616,
0.02673855796456337,
0.04497607797384262,
-0.08649902045726776,
0.08140682429075241,
-0.0008734317380003631,
-0.04560321569442749,
-0.1516108363866806,
-0.0012723851250484586,
0.16110122203826904,
-0.040617767721414566,
-0.19248606264591217,
0.04587511718273163,
0.09265193343162537,
-0.13475000858306885,
0.055013805627822876,
-0.07991057634353638,
0.09715428948402405,
0.22517572343349457,
0.07874191552400589,
0.19409838318824768,
-0.1209825798869133,
-0.11641079187393188,
0.1237579882144928,
0.20619890093803406,
-0.06111134961247444,
-0.08481063693761826,
-0.16309630870819092,
0.079526387155056,
-0.13588429987430573,
-0.0647532269358635,
0.02172921784222126,
-0.10684368759393692,
0.16528533399105072,
-0.08967559784650803,
-0.1953936368227005,
0.0418025366961956,
-0.08695781975984573,
0.039090536534786224,
-0.04895956814289093,
-0.01878155954182148,
0.006360146217048168,
0.1145591214299202,
-0.030901536345481873,
-0.13130231201648712,
0.07759011536836624,
-0.07251226156949997,
0.2153148651123047,
0.19693449139595032,
-0.17281793057918549,
-0.034986045211553574,
-0.09664807468652725,
0.005788587965071201,
-0.11085757613182068,
0.03822571784257889,
0.07296116650104523,
0.07645640522241592,
-0.0020859281066805124,
0.2196601927280426,
0.20438751578330994,
-0.03401975706219673,
0.16277824342250824,
0.0011464115232229233,
-0.017362769693136215,
-0.098075270652771,
-0.21808640658855438,
0.11051762104034424,
-0.04760538414120674,
-0.011201362125575542,
0.19489671289920807,
-0.04746907949447632,
0.016022855415940285,
0.01732766255736351,
-0.07761796563863754,
0.051932767033576965,
-0.05416572839021683,
-0.11320243775844574,
-0.11606883257627487,
-0.31859079003334045,
-0.08289051800966263,
0.1075122058391571,
0.21156862378120422,
-0.08637354522943497,
-0.08224721252918243,
0.15112712979316711,
-0.001080866320990026,
0.059049662202596664,
-0.07783859968185425,
0.0726638063788414,
-0.07484020292758942,
0.20214389264583588,
0.02527710050344467,
-0.08172781020402908,
-0.08852126449346542,
0.15811242163181305,
0.031578000634908676,
-0.03503738343715668,
0.03977551683783531,
-0.11886586993932724,
-0.01816004142165184,
0.18105605244636536,
-0.21453556418418884,
0.3491869270801544,
-0.028857126832008362,
0.047637686133384705,
0.0017316909506917,
0.02676033042371273,
-0.0513913631439209,
-0.11472658812999725,
-0.05111602321267128,
-0.04862657189369202,
-0.10515477508306503,
0.07812822610139847,
0.09285388141870499,
0.13554580509662628,
-0.12429631501436234,
0.026990994811058044,
0.10668010264635086,
0.18207527697086334,
-0.025533359497785568,
-0.08721313625574112,
0.046173062175512314,
0.24402596056461334,
-0.09065765142440796,
0.18971934914588928,
0.12712974846363068,
0.07607531547546387,
0.07390511780977249,
0.14040811359882355,
0.1531999707221985,
-0.017195245251059532,
-0.08521180599927902,
0.03313163295388222,
-0.19648554921150208,
-0.09363589435815811,
-0.06438392400741577,
-0.044738829135894775,
-0.050463031977415085,
0.16655869781970978,
-0.15495799481868744,
0.008685940876603127,
-0.04540644586086273,
-0.021983345970511436,
-0.018466822803020477,
0.17726300656795502,
-0.019864162430167198,
-0.1855923980474472,
0.08377370983362198,
0.03800441697239876,
-0.16435255110263824,
-0.05626531317830086,
-0.057410337030887604,
0.24412308633327484,
-0.007680217735469341,
-0.028830690309405327,
0.1241251677274704,
0.17565149068832397,
-0.04550115391612053,
-0.007376548368483782,
-0.003342706011608243,
-0.03925498574972153,
-0.020572584122419357,
0.06443747878074646,
-0.03936309739947319,
0.0886281430721283,
0.20882803201675415,
0.034811776131391525,
-0.00810431782156229,
0.03462851047515869,
0.09915196895599365,
-0.160943403840065,
0.1601521521806717,
0.04031286761164665,
-0.06256811320781708,
-0.052208252251148224,
0.02145811915397644,
-0.05894824117422104,
-0.003943067509680986,
-0.03254567086696625,
-0.18126030266284943,
0.10648331791162491,
0.011647369712591171,
0.019657758995890617,
0.06924640387296677,
0.01682170294225216,
0.19310346245765686,
0.2085164338350296,
0.010188142769038677,
0.05058049038052559,
0.2512843906879425,
0.24483127892017365,
-0.18454046547412872,
-0.042481038719415665,
0.05152757465839386,
-0.000004648381946026348,
-0.055458080023527145,
0.2235521376132965,
-0.12122831493616104,
-0.002886837348341942,
-0.14276152849197388,
0.03272155299782753,
0.12581832706928253,
0.16370035707950592,
0.2328416407108307,
-0.058755893260240555,
-0.13480690121650696,
0.042356498539447784,
-0.11521518230438232,
-0.14616337418556213,
0.21563361585140228,
0.08845415711402893,
0.05045682191848755,
0.004968840163201094,
-2.3220857934833505e-32,
0.026768367737531662,
-0.006573337130248547,
-0.07256121188402176,
0.0734243243932724,
-0.3723628520965576,
0.04050441458821297,
0.012744486331939697,
0.006305368151515722,
-0.10748425126075745,
0.023562796413898468,
0.04319862648844719,
0.08254065364599228,
-0.010700514540076256,
-0.06548808515071869,
-0.09943755716085434,
-0.043158043175935745,
-0.1170654147863388,
-0.017140546813607216,
0.021091481670737267,
0.07504428178071976,
0.07077585905790329,
0.045581549406051636,
0.06890609860420227,
0.018654193729162216,
-0.018880778923630714,
-0.10438153892755508,
-0.07968955487012863,
0.030135607346892357,
0.07156084477901459,
-0.16297873854637146,
-0.00261586788110435,
0.06421229243278503,
0.02303541824221611,
-0.16677109897136688,
-0.05984578654170036,
0.016267910599708557,
-0.05644109845161438,
-0.03580894693732262,
-0.04585602879524231,
0.06359990686178207,
-0.03820786625146866,
0.16879834234714508,
0.06912944465875626,
-0.1329120397567749,
-0.019269879907369614,
0.13969852030277252,
0.07685889303684235,
0.06272532790899277,
0.05718482658267021,
-0.09226105362176895,
0.03689131513237953,
-0.023928245529532433,
-0.1059807613492012,
0.10581626743078232,
0.05273496359586716,
-0.2815828323364258,
0.10110821574926376,
0.1843428760766983,
-0.14692892134189606,
-0.08097407966852188,
-0.021048538386821747,
-0.20974530279636383,
0.0602157860994339,
-0.018956970423460007,
0.006046523340046406,
0.0525929294526577,
0.18632028996944427,
-0.07430806010961533,
0.015380440279841423,
-0.1176544651389122,
-0.014272492378950119,
0.09307470917701721,
-0.10100682079792023,
0.08450188487768173,
-0.2431463599205017,
-0.04545823857188225,
-0.1082264855504036,
-0.028833791613578796,
0.03538782149553299,
-0.22463677823543549,
0.04607925936579704,
0.029291564598679543,
0.12026908993721008,
-0.04969465360045433,
0.05917131528258324,
0.06307544559240341,
0.02753271721303463,
0.03721285238862038,
-0.05758462846279144,
-0.12394129484891891,
-0.00027852514176629484,
0.12942539155483246,
-0.06875386089086533,
-0.11562691628932953,
0.0009671846637502313,
0.14945738017559052,
0.04550980404019356,
0.07756110280752182,
-0.08566712588071823,
-0.12326356768608093,
-0.09146806597709656,
0.11375175416469574,
-0.10284952819347382,
0.24553483724594116,
0.2611892819404602,
0.02924257144331932,
-0.003942020703107119,
-0.026280470192432404,
-0.082308329641819,
0.01854901947081089,
-0.01949644275009632,
-0.17262427508831024,
0.18024775385856628,
0.2772603929042816,
0.19730277359485626,
0.027123916894197464,
-0.015427381731569767,
-0.026345031335949898,
0.16165770590305328,
0.12509633600711823,
-0.013553986325860023,
-0.20687676966190338,
-0.034962210804224014,
-0.08504176884889603,
0.13244971632957458,
0.05737636983394623,
-0.03948518633842468,
0.03426592797040939,
0.12202128022909164,
0.05373112112283707,
0.038620468229055405,
-0.15417540073394775,
7.130827270884765e-7,
-0.14990946650505066,
0.21533647179603577,
-0.010402945801615715,
-0.169012650847435,
-0.11085780709981918,
0.14774209260940552,
-0.2054068148136139,
0.11854713410139084,
0.03549366071820259,
0.1196506917476654,
0.02520783804357052,
-0.030891135334968567,
-0.058397483080625534,
0.007231735158711672,
-0.03994441032409668,
-0.11941526085138321,
-0.21002592146396637,
0.04940970987081528,
0.027371721342206,
0.059428196400403976,
0.018499258905649185,
-0.03084399737417698,
0.22882692515850067,
-0.056971799582242966,
0.1200588271021843,
0.10126542299985886,
-0.09586422890424728,
-0.023641273379325867,
-0.013462696224451065,
-0.005422085523605347,
-0.05849101021885872,
0.03379112109541893,
-0.08761542290449142,
0.16724714636802673,
-0.034477729350328445,
-0.09501159936189651,
-0.01980961672961712,
-0.03060934506356716,
0.03593241050839424,
0.1343822181224823,
-0.07422366738319397,
0.12251487374305725,
-0.08545589447021484,
0.04795223847031593,
0.026749800890684128,
-0.05821523070335388,
-0.1730099767446518,
0.06960253417491913,
-0.09330848604440689,
0.01976890116930008,
0.11836384981870651,
0.09218130260705948,
0.06400950253009796,
0.17993564903736115,
-0.04695821925997734,
0.14968359470367432,
-0.14752061665058136,
-0.018301282078027725,
0.2027939409017563,
0.09195929020643234,
-0.00027207753737457097,
-0.1187509149312973,
-0.05235975608229637,
0.05760292708873749,
0.07747180759906769,
-0.0271675493568182,
-0.0030425386503338814,
-6.357817316765811e-35,
0.045008692890405655,
0.14456987380981445,
-0.03615735471248627,
-0.08040468394756317,
-0.1201181709766388,
-0.053430937230587006,
0.2575661540031433,
-0.08725377917289734,
0.20268036425113678,
-0.1187385618686676,
0.0842466652393341
] |
https://github.com/huggingface/datasets/issues/5963 | Got an error _pickle.PicklingError use Dataset.from_spark. | @maddiedawson can you show me the demo ,so i can test in local .before your PR | python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 16 | Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
@maddiedawson can you show me the demo ,so i can test in local .before your PR | [
-0.07752278447151184,
-0.09337377548217773,
-0.011128445155918598,
-0.1698015034198761,
0.13619302213191986,
0.019566195085644722,
0.19890405237674713,
0.13917233049869537,
-0.0238414965569973,
0.07585181295871735,
0.04286695271730423,
0.20813030004501343,
-0.006341530941426754,
0.07669556140899658,
-0.12801624834537506,
-0.10388898849487305,
-0.09205395728349686,
-0.16833743453025818,
-0.059561971575021744,
0.06176738440990448,
-0.05160898715257645,
0.16076594591140747,
0.2074074149131775,
0.027783522382378578,
-0.103728286921978,
-0.2807946801185608,
-0.11210732161998749,
0.08867055922746658,
-0.034081485122442245,
-0.10193748772144318,
0.16714131832122803,
0.08877483010292053,
0.06912147998809814,
0.20631994307041168,
0.0000049033128561859485,
-0.10779209434986115,
0.007994201965630054,
0.054524749517440796,
-0.046612631529569626,
-0.14829184114933014,
0.08533171564340591,
-0.005426748655736446,
0.15117526054382324,
-0.10462307184934616,
0.044871795922517776,
0.11867382377386093,
-0.1612575799226761,
0.24271801114082336,
0.17553168535232544,
-0.025581376627087593,
0.026371750980615616,
0.03577399253845215,
0.2019362449645996,
-0.08707945048809052,
-0.10513825714588165,
-0.042476024478673935,
0.037753570824861526,
0.15679824352264404,
-0.19436505436897278,
0.04019821062684059,
-0.11700370907783508,
0.02798542194068432,
0.046458858996629715,
-0.07119672000408173,
-0.057972561568021774,
0.009777255356311798,
-0.2203282117843628,
-0.04626016691327095,
0.02498723566532135,
0.20781747996807098,
0.20448407530784607,
-0.0555531308054924,
-0.1822832226753235,
-0.12880268692970276,
-0.0006729160668328404,
-0.1921997368335724,
0.03154630959033966,
-0.0050127641297876835,
-0.19655291736125946,
0.0834287628531456,
0.037132058292627335,
0.0759829506278038,
0.0714804008603096,
-0.08404775708913803,
0.06597878038883209,
-0.0033730107825249434,
-0.20178790390491486,
0.20863859355449677,
0.11548517644405365,
-0.14162349700927734,
0.036772165447473526,
0.026168320327997208,
0.01593450829386711,
-0.20786945521831512,
0.026830529794096947,
-0.11080775409936905,
-0.11794283241033554,
-0.28242331743240356,
-0.15050570666790009,
-0.0935041531920433,
-0.062341202050447464,
-0.3001437187194824,
0.007279410492628813,
0.14584772288799286,
0.10053817182779312,
-0.02380981110036373,
-0.05883849412202835,
0.029879538342356682,
0.00867962185293436,
-0.029232999309897423,
-0.04198183864355087,
0.13743096590042114,
-0.13407579064369202,
-0.12322572618722916,
-0.013990102335810661,
0.10305064916610718,
0.10506265610456467,
0.10946865379810333,
-0.03203822672367096,
-0.03684011474251747,
0.10303183645009995,
0.10164283961057663,
-0.017047127708792686,
-0.10210862010717392,
0.11179662495851517,
-0.024829179048538208,
-0.08296740055084229,
0.11238203197717667,
-0.014013734646141529,
-0.03397111967206001,
0.07005675882101059,
0.060768645256757736,
0.00951747503131628,
-0.16089540719985962,
0.05379735305905342,
-0.25209206342697144,
-0.02674248069524765,
-0.19992923736572266,
-0.16524851322174072,
0.11491777002811432,
0.1929088830947876,
-0.16373656690120697,
-0.3111562430858612,
-0.033539675176143646,
0.14906848967075348,
-0.011045864783227444,
0.08939667791128159,
-0.12356662005186081,
0.002661673817783594,
-0.0833047479391098,
-0.25291335582733154,
-0.07716287672519684,
-0.3324746787548065,
-0.008210331201553345,
-0.11452207714319229,
0.04698681831359863,
-0.11948640644550323,
-0.007410983555018902,
-0.23838558793067932,
-0.15564125776290894,
-0.05080825462937355,
0.0282000545412302,
-0.02583337016403675,
-0.23129135370254517,
0.08338324725627899,
-0.008534623309969902,
0.04878602549433708,
0.12964379787445068,
-0.08004531264305115,
0.010309752076864243,
0.15896552801132202,
0.06133440136909485,
-0.0014515756629407406,
-0.05906829982995987,
-0.10808419436216354,
0.22439339756965637,
-0.07272882759571075,
0.014509038999676704,
-0.14059482514858246,
0.018993277102708817,
-0.06724103540182114,
-0.09740883111953735,
0.07346014678478241,
-0.17185187339782715,
-0.0016963620437309146,
-0.06358995288610458,
-0.05773274227976799,
0.04687771946191788,
-0.042902108281850815,
-0.11058724671602249,
0.10128659754991531,
0.05505449324846268,
0.17010994255542755,
-0.1451026350259781,
0.1358678787946701,
-0.1295498013496399,
-0.12703610956668854,
-0.017443297430872917,
0.05779290199279785,
-0.03481799364089966,
-0.10563404858112335,
-0.15947672724723816,
-0.04998301342129707,
-0.06028981879353523,
-0.01555092167109251,
0.058744437992572784,
-0.08608619123697281,
0.01345894392579794,
0.10760191828012466,
-0.12033317238092422,
-0.1152997836470604,
0.0005392887396737933,
-0.09009627997875214,
0.17984427511692047,
-0.016459982842206955,
-0.08278872072696686,
0.07521574944257736,
-0.12955835461616516,
0.011458308435976505,
0.1472107470035553,
-0.08049951493740082,
0.08161161094903946,
0.1217375248670578,
-0.0423114039003849,
-0.008384979330003262,
0.09536434710025787,
-0.027941226959228516,
-0.10836129635572433,
0.06130290776491165,
0.02067219465970993,
-0.13266605138778687,
-0.06278229504823685,
-0.04672655463218689,
0.14751361310482025,
-0.12794993817806244,
0.005787249654531479,
0.15156877040863037,
-0.201111301779747,
0.013885279186069965,
0.04481957480311394,
-0.21486052870750427,
0.10577033460140228,
-0.040468063205480576,
0.02907576598227024,
-0.01761809177696705,
0.0749068334698677,
-0.016623448580503464,
0.1343430131673813,
-0.07191061973571777,
-0.028804495930671692,
0.17533421516418457,
-0.07101815938949585,
-0.11535511165857315,
0.002361764432862401,
-0.01367697212845087,
-0.09515593200922012,
0.00810924544930458,
-0.004921065177768469,
-0.1834893673658371,
-0.04765364155173302,
0.1661824733018875,
0.07670082896947861,
0.003996191546320915,
0.14393001794815063,
0.16191746294498444,
-0.1746276617050171,
0.22687289118766785,
-0.07809117436408997,
-0.11176566779613495,
0.0679531842470169,
-0.131336972117424,
-0.03650498390197754,
0.051044825464487076,
-0.094736248254776,
0.04227426275610924,
0.06564222276210785,
0.21653378009796143,
0.02999701164662838,
0.01641778089106083,
0.04097408056259155,
-0.15818648040294647,
0.0355815552175045,
0.2220299243927002,
-0.09869108349084854,
-0.003317848313599825,
0.21824504435062408,
-0.007474988233298063,
0.08604586869478226,
-0.055408068001270294,
0.17737530171871185,
-0.010096694342792034,
0.06712967902421951,
0.09801365435123444,
-0.01923176273703575,
-0.09764047712087631,
-0.07635437697172165,
0.05019091069698334,
-0.06331072002649307,
-0.05494840815663338,
0.19228553771972656,
-0.21783868968486786,
-0.09342311322689056,
0.1409939080476761,
0.02435135655105114,
-0.017269104719161987,
0.005876397248357534,
0.07527173310518265,
0.37017303705215454,
0.0644911527633667,
-0.1917315274477005,
0.11966211348772049,
-0.17922650277614594,
-0.05071183294057846,
0.158585324883461,
0.14174452424049377,
-0.08616376668214798,
-0.14610973000526428,
-0.1206488162279129,
-0.02217954583466053,
0.06741788983345032,
-0.02109220251441002,
0.0453563928604126,
-0.00617733970284462,
0.1913427859544754,
0.013814226724207401,
0.0855703204870224,
-0.4022485017776489,
-0.1142735406756401,
0.026461957022547722,
-0.07669512927532196,
-0.05382658168673515,
0.0893552303314209,
0.12138582020998001,
0.07145245373249054,
-0.08747592568397522,
-0.1013142466545105,
-0.12475127726793289,
0.11529114842414856,
0.18846432864665985,
-0.024042535573244095,
-0.06519009917974472,
-0.0777462050318718,
-0.09715206921100616,
0.02673855796456337,
0.04497607797384262,
-0.08649902045726776,
0.08140682429075241,
-0.0008734317380003631,
-0.04560321569442749,
-0.1516108363866806,
-0.0012723851250484586,
0.16110122203826904,
-0.040617767721414566,
-0.19248606264591217,
0.04587511718273163,
0.09265193343162537,
-0.13475000858306885,
0.055013805627822876,
-0.07991057634353638,
0.09715428948402405,
0.22517572343349457,
0.07874191552400589,
0.19409838318824768,
-0.1209825798869133,
-0.11641079187393188,
0.1237579882144928,
0.20619890093803406,
-0.06111134961247444,
-0.08481063693761826,
-0.16309630870819092,
0.079526387155056,
-0.13588429987430573,
-0.0647532269358635,
0.02172921784222126,
-0.10684368759393692,
0.16528533399105072,
-0.08967559784650803,
-0.1953936368227005,
0.0418025366961956,
-0.08695781975984573,
0.039090536534786224,
-0.04895956814289093,
-0.01878155954182148,
0.006360146217048168,
0.1145591214299202,
-0.030901536345481873,
-0.13130231201648712,
0.07759011536836624,
-0.07251226156949997,
0.2153148651123047,
0.19693449139595032,
-0.17281793057918549,
-0.034986045211553574,
-0.09664807468652725,
0.005788587965071201,
-0.11085757613182068,
0.03822571784257889,
0.07296116650104523,
0.07645640522241592,
-0.0020859281066805124,
0.2196601927280426,
0.20438751578330994,
-0.03401975706219673,
0.16277824342250824,
0.0011464115232229233,
-0.017362769693136215,
-0.098075270652771,
-0.21808640658855438,
0.11051762104034424,
-0.04760538414120674,
-0.011201362125575542,
0.19489671289920807,
-0.04746907949447632,
0.016022855415940285,
0.01732766255736351,
-0.07761796563863754,
0.051932767033576965,
-0.05416572839021683,
-0.11320243775844574,
-0.11606883257627487,
-0.31859079003334045,
-0.08289051800966263,
0.1075122058391571,
0.21156862378120422,
-0.08637354522943497,
-0.08224721252918243,
0.15112712979316711,
-0.001080866320990026,
0.059049662202596664,
-0.07783859968185425,
0.0726638063788414,
-0.07484020292758942,
0.20214389264583588,
0.02527710050344467,
-0.08172781020402908,
-0.08852126449346542,
0.15811242163181305,
0.031578000634908676,
-0.03503738343715668,
0.03977551683783531,
-0.11886586993932724,
-0.01816004142165184,
0.18105605244636536,
-0.21453556418418884,
0.3491869270801544,
-0.028857126832008362,
0.047637686133384705,
0.0017316909506917,
0.02676033042371273,
-0.0513913631439209,
-0.11472658812999725,
-0.05111602321267128,
-0.04862657189369202,
-0.10515477508306503,
0.07812822610139847,
0.09285388141870499,
0.13554580509662628,
-0.12429631501436234,
0.026990994811058044,
0.10668010264635086,
0.18207527697086334,
-0.025533359497785568,
-0.08721313625574112,
0.046173062175512314,
0.24402596056461334,
-0.09065765142440796,
0.18971934914588928,
0.12712974846363068,
0.07607531547546387,
0.07390511780977249,
0.14040811359882355,
0.1531999707221985,
-0.017195245251059532,
-0.08521180599927902,
0.03313163295388222,
-0.19648554921150208,
-0.09363589435815811,
-0.06438392400741577,
-0.044738829135894775,
-0.050463031977415085,
0.16655869781970978,
-0.15495799481868744,
0.008685940876603127,
-0.04540644586086273,
-0.021983345970511436,
-0.018466822803020477,
0.17726300656795502,
-0.019864162430167198,
-0.1855923980474472,
0.08377370983362198,
0.03800441697239876,
-0.16435255110263824,
-0.05626531317830086,
-0.057410337030887604,
0.24412308633327484,
-0.007680217735469341,
-0.028830690309405327,
0.1241251677274704,
0.17565149068832397,
-0.04550115391612053,
-0.007376548368483782,
-0.003342706011608243,
-0.03925498574972153,
-0.020572584122419357,
0.06443747878074646,
-0.03936309739947319,
0.0886281430721283,
0.20882803201675415,
0.034811776131391525,
-0.00810431782156229,
0.03462851047515869,
0.09915196895599365,
-0.160943403840065,
0.1601521521806717,
0.04031286761164665,
-0.06256811320781708,
-0.052208252251148224,
0.02145811915397644,
-0.05894824117422104,
-0.003943067509680986,
-0.03254567086696625,
-0.18126030266284943,
0.10648331791162491,
0.011647369712591171,
0.019657758995890617,
0.06924640387296677,
0.01682170294225216,
0.19310346245765686,
0.2085164338350296,
0.010188142769038677,
0.05058049038052559,
0.2512843906879425,
0.24483127892017365,
-0.18454046547412872,
-0.042481038719415665,
0.05152757465839386,
-0.000004648381946026348,
-0.055458080023527145,
0.2235521376132965,
-0.12122831493616104,
-0.002886837348341942,
-0.14276152849197388,
0.03272155299782753,
0.12581832706928253,
0.16370035707950592,
0.2328416407108307,
-0.058755893260240555,
-0.13480690121650696,
0.042356498539447784,
-0.11521518230438232,
-0.14616337418556213,
0.21563361585140228,
0.08845415711402893,
0.05045682191848755,
0.004968840163201094,
-2.3220857934833505e-32,
0.026768367737531662,
-0.006573337130248547,
-0.07256121188402176,
0.0734243243932724,
-0.3723628520965576,
0.04050441458821297,
0.012744486331939697,
0.006305368151515722,
-0.10748425126075745,
0.023562796413898468,
0.04319862648844719,
0.08254065364599228,
-0.010700514540076256,
-0.06548808515071869,
-0.09943755716085434,
-0.043158043175935745,
-0.1170654147863388,
-0.017140546813607216,
0.021091481670737267,
0.07504428178071976,
0.07077585905790329,
0.045581549406051636,
0.06890609860420227,
0.018654193729162216,
-0.018880778923630714,
-0.10438153892755508,
-0.07968955487012863,
0.030135607346892357,
0.07156084477901459,
-0.16297873854637146,
-0.00261586788110435,
0.06421229243278503,
0.02303541824221611,
-0.16677109897136688,
-0.05984578654170036,
0.016267910599708557,
-0.05644109845161438,
-0.03580894693732262,
-0.04585602879524231,
0.06359990686178207,
-0.03820786625146866,
0.16879834234714508,
0.06912944465875626,
-0.1329120397567749,
-0.019269879907369614,
0.13969852030277252,
0.07685889303684235,
0.06272532790899277,
0.05718482658267021,
-0.09226105362176895,
0.03689131513237953,
-0.023928245529532433,
-0.1059807613492012,
0.10581626743078232,
0.05273496359586716,
-0.2815828323364258,
0.10110821574926376,
0.1843428760766983,
-0.14692892134189606,
-0.08097407966852188,
-0.021048538386821747,
-0.20974530279636383,
0.0602157860994339,
-0.018956970423460007,
0.006046523340046406,
0.0525929294526577,
0.18632028996944427,
-0.07430806010961533,
0.015380440279841423,
-0.1176544651389122,
-0.014272492378950119,
0.09307470917701721,
-0.10100682079792023,
0.08450188487768173,
-0.2431463599205017,
-0.04545823857188225,
-0.1082264855504036,
-0.028833791613578796,
0.03538782149553299,
-0.22463677823543549,
0.04607925936579704,
0.029291564598679543,
0.12026908993721008,
-0.04969465360045433,
0.05917131528258324,
0.06307544559240341,
0.02753271721303463,
0.03721285238862038,
-0.05758462846279144,
-0.12394129484891891,
-0.00027852514176629484,
0.12942539155483246,
-0.06875386089086533,
-0.11562691628932953,
0.0009671846637502313,
0.14945738017559052,
0.04550980404019356,
0.07756110280752182,
-0.08566712588071823,
-0.12326356768608093,
-0.09146806597709656,
0.11375175416469574,
-0.10284952819347382,
0.24553483724594116,
0.2611892819404602,
0.02924257144331932,
-0.003942020703107119,
-0.026280470192432404,
-0.082308329641819,
0.01854901947081089,
-0.01949644275009632,
-0.17262427508831024,
0.18024775385856628,
0.2772603929042816,
0.19730277359485626,
0.027123916894197464,
-0.015427381731569767,
-0.026345031335949898,
0.16165770590305328,
0.12509633600711823,
-0.013553986325860023,
-0.20687676966190338,
-0.034962210804224014,
-0.08504176884889603,
0.13244971632957458,
0.05737636983394623,
-0.03948518633842468,
0.03426592797040939,
0.12202128022909164,
0.05373112112283707,
0.038620468229055405,
-0.15417540073394775,
7.130827270884765e-7,
-0.14990946650505066,
0.21533647179603577,
-0.010402945801615715,
-0.169012650847435,
-0.11085780709981918,
0.14774209260940552,
-0.2054068148136139,
0.11854713410139084,
0.03549366071820259,
0.1196506917476654,
0.02520783804357052,
-0.030891135334968567,
-0.058397483080625534,
0.007231735158711672,
-0.03994441032409668,
-0.11941526085138321,
-0.21002592146396637,
0.04940970987081528,
0.027371721342206,
0.059428196400403976,
0.018499258905649185,
-0.03084399737417698,
0.22882692515850067,
-0.056971799582242966,
0.1200588271021843,
0.10126542299985886,
-0.09586422890424728,
-0.023641273379325867,
-0.013462696224451065,
-0.005422085523605347,
-0.05849101021885872,
0.03379112109541893,
-0.08761542290449142,
0.16724714636802673,
-0.034477729350328445,
-0.09501159936189651,
-0.01980961672961712,
-0.03060934506356716,
0.03593241050839424,
0.1343822181224823,
-0.07422366738319397,
0.12251487374305725,
-0.08545589447021484,
0.04795223847031593,
0.026749800890684128,
-0.05821523070335388,
-0.1730099767446518,
0.06960253417491913,
-0.09330848604440689,
0.01976890116930008,
0.11836384981870651,
0.09218130260705948,
0.06400950253009796,
0.17993564903736115,
-0.04695821925997734,
0.14968359470367432,
-0.14752061665058136,
-0.018301282078027725,
0.2027939409017563,
0.09195929020643234,
-0.00027207753737457097,
-0.1187509149312973,
-0.05235975608229637,
0.05760292708873749,
0.07747180759906769,
-0.0271675493568182,
-0.0030425386503338814,
-6.357817316765811e-35,
0.045008692890405655,
0.14456987380981445,
-0.03615735471248627,
-0.08040468394756317,
-0.1201181709766388,
-0.053430937230587006,
0.2575661540031433,
-0.08725377917289734,
0.20268036425113678,
-0.1187385618686676,
0.0842466652393341
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | Does "number of shards" refer to the total number of data?
my config:
nproc_per_node=2
ds=ds['train'] = load_dataset(streaming=True).take(50000)
I'm test again: in prepare_data(), data have the same for each GPU
| There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 29 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
Does "number of shards" refer to the total number of data?
my config:
nproc_per_node=2
ds=ds['train'] = load_dataset(streaming=True).take(50000)
I'm test again: in prepare_data(), data have the same for each GPU
| [
0.059241533279418945,
0.01362750492990017,
-0.09634306281805038,
-0.06705553084611893,
0.10183470696210861,
0.05937300622463226,
0.18314917385578156,
-0.052385587245225906,
-0.10711795091629028,
0.1919621378183365,
0.03171102702617645,
-0.0779431164264679,
-0.019303536042571068,
-0.03830241039395332,
-0.09812437742948532,
-0.2534083425998688,
0.035305287688970566,
-0.037447892129421234,
-0.11291177570819855,
-0.03729182854294777,
-0.15310563147068024,
0.13496746122837067,
0.1116960346698761,
-0.11461856961250305,
0.12081432342529297,
-0.07829836755990982,
-0.07191883772611618,
-0.06216313689947128,
0.027173984795808792,
-0.013661001808941364,
0.01720350608229637,
0.09324156492948532,
-0.16179992258548737,
0.02062351442873478,
0.000004618525508703897,
0.22691012918949127,
0.14673054218292236,
-0.05717604607343674,
-0.02145913802087307,
0.11510574072599411,
0.1009584590792656,
-0.010815142653882504,
0.02268693596124649,
-0.03482208028435707,
-0.09019338339567184,
-0.12349989265203476,
-0.16381096839904785,
-0.03922084718942642,
0.08299683034420013,
-0.047809895128011703,
-0.048191022127866745,
0.2044724076986313,
-0.1400250345468521,
-0.17002014815807343,
0.02953820303082466,
-0.049837470054626465,
0.07207497209310532,
0.030985023826360703,
-0.04900199547410011,
0.05255413427948952,
-0.045698750764131546,
0.033109623938798904,
0.07393002510070801,
0.08076748996973038,
0.0011063172714784741,
0.07413089275360107,
-0.1446935534477234,
-0.16795305907726288,
0.05016741156578064,
0.023115329444408417,
-0.19824808835983276,
-0.002310151234269142,
0.0191339123994112,
0.08732830733060837,
-0.07075589150190353,
-0.14215010404586792,
-0.09751351922750473,
0.09847505390644073,
-0.15875326097011566,
0.09524643421173096,
-0.1141376718878746,
0.06198110058903694,
-0.00412235502153635,
-0.06868591159582138,
-0.17491064965724945,
-0.0038758921436965466,
-0.10994098335504532,
0.20254886150360107,
-0.029697295278310776,
0.08778461813926697,
-0.0286845900118351,
-0.05620142072439194,
-0.15072165429592133,
-0.16970038414001465,
-0.2322397083044052,
0.05204997956752777,
-0.07876478880643845,
-0.17689915001392365,
-0.020211759954690933,
0.10370892286300659,
0.18039272725582123,
-0.08034639805555344,
0.11579283326864243,
0.03432760015130043,
0.10471578687429428,
-0.2881821393966675,
0.05215122178196907,
-0.06253305822610855,
-0.12479814141988754,
-0.10540580749511719,
0.1267518699169159,
0.04252919927239418,
0.14134542644023895,
0.04919995367527008,
-0.08291520923376083,
-0.09888173639774323,
0.13488662242889404,
0.12831652164459229,
-0.18066951632499695,
0.018662091344594955,
0.08391667902469635,
-0.09227847307920456,
-0.009003153070807457,
0.02206888049840927,
0.18548838794231415,
-0.02579716220498085,
-0.26497966051101685,
0.13293574750423431,
-0.1106598973274231,
-0.03975768759846687,
-0.0977778211236,
-0.07181727886199951,
-0.021067136898636818,
0.10329672694206238,
0.04051971435546875,
-0.13018180429935455,
0.10089772194623947,
-0.16088871657848358,
0.00901644304394722,
-0.053934015333652496,
0.1461276262998581,
-0.004403449594974518,
0.17558078467845917,
0.05499204248189926,
0.18453767895698547,
0.06710422039031982,
0.04107089713215828,
0.08375991135835648,
-0.015719393268227577,
0.060133691877126694,
-0.15797732770442963,
0.23797519505023956,
-0.055532895028591156,
0.14495731890201569,
-0.15462790429592133,
0.15752044320106506,
0.015295244753360748,
0.003485091496258974,
-0.08445405215024948,
0.010609067045152187,
0.08522958308458328,
-0.004578778985887766,
-0.24808891117572784,
-0.11603070050477982,
0.038005195558071136,
0.011323267593979836,
0.08579105883836746,
-0.05016058683395386,
0.06048411503434181,
-0.1697533279657364,
0.1421276032924652,
-0.1237519159913063,
-0.0838576927781105,
-0.14488603174686432,
-0.1324652135372162,
0.34345465898513794,
-0.14192496240139008,
0.21327005326747894,
-0.15046490728855133,
0.05409548431634903,
0.03903862461447716,
0.03729694336652756,
0.02489309385418892,
-0.2581423223018646,
0.11577921360731125,
-0.22648370265960693,
0.023995989933609962,
-0.02152080275118351,
-0.1564514935016632,
0.12269110232591629,
0.02018161304295063,
-0.022892696782946587,
-0.0691976398229599,
-0.0021569165401160717,
-0.036168355494737625,
0.02913937158882618,
-0.02132347784936428,
-0.1810990273952484,
0.2356501668691635,
-0.20552118122577667,
-0.09288033097982407,
0.20705674588680267,
0.1520421952009201,
0.03283259645104408,
0.00028247784939594567,
-0.09538936614990234,
-0.09209340810775757,
0.22219927608966827,
0.12895794212818146,
-0.2185535877943039,
-0.006626071874052286,
0.01778664067387581,
0.06945895403623581,
-0.02059379406273365,
-0.09148462861776352,
0.09158238023519516,
-0.11642426252365112,
0.06023871898651123,
0.05189124494791031,
0.044215571135282516,
-0.2017202079296112,
0.03728021681308746,
-0.13238003849983215,
0.0056537603959441185,
-0.0050560664385557175,
0.030938999727368355,
-0.050866883248090744,
-0.04364409297704697,
0.0684310644865036,
-0.02721223793923855,
0.008813278749585152,
-0.13085146248340607,
0.2033051699399948,
0.07927015423774719,
0.0919351652264595,
0.006865223869681358,
-0.005834500305354595,
-0.2494090348482132,
0.01963324472308159,
-0.0010150440502911806,
-0.17548984289169312,
0.013461974449455738,
-0.22340832650661469,
-0.058405857533216476,
-0.053927913308143616,
0.1059153825044632,
-0.09703702479600906,
0.12698079645633698,
0.0015311555471271276,
0.014340941794216633,
0.1797070950269699,
0.10821545869112015,
-0.1312216967344284,
-0.07100364565849304,
-0.11674126982688904,
-0.08737152069807053,
0.06541205197572708,
0.08159317076206207,
0.15901806950569153,
0.13115538656711578,
0.1536080539226532,
0.08337707817554474,
-0.15484757721424103,
0.011457068845629692,
-0.028164979070425034,
-0.011434115469455719,
0.12114184349775314,
0.011119109578430653,
0.019423581659793854,
0.0048410482704639435,
0.2277643233537674,
0.014409431256353855,
0.005968550220131874,
-0.05034021660685539,
-0.07324566692113876,
0.015379391610622406,
-0.03183763101696968,
0.04466697573661804,
-0.02689620666205883,
-0.18206629157066345,
-0.10045872628688812,
0.14291328191757202,
0.23070581257343292,
-0.2363099753856659,
0.03958085551857948,
0.13069778680801392,
-0.022570839151740074,
-0.06915370374917984,
-0.12243502587080002,
0.0442642904818058,
-0.009994782507419586,
-0.0382145419716835,
-0.03805113583803177,
-0.024306487292051315,
0.19025512039661407,
0.004389916080981493,
0.049404438585042953,
-0.03590332344174385,
0.013294046744704247,
0.07932032644748688,
-0.057540398091077805,
-0.045149240642786026,
-0.011481845751404762,
-0.0069464729167521,
-0.011609606444835663,
0.03204360604286194,
-0.02507890574634075,
0.08524582535028458,
-0.21381492912769318,
-0.08137592673301697,
-0.10320009291172028,
-0.03407236933708191,
-0.056371718645095825,
0.1070651039481163,
-0.08294755965471268,
-0.18485818803310394,
-0.04018336161971092,
-0.09763427078723907,
-0.012551387771964073,
0.012617107480764389,
0.051281098276376724,
0.11062075197696686,
-0.07634574174880981,
-0.05582987144589424,
0.030832882970571518,
-0.1872919499874115,
-0.007320063188672066,
-0.05196185037493706,
0.07008906453847885,
-0.02772010862827301,
-0.04521523043513298,
0.041690926998853683,
0.005402214825153351,
0.022647492587566376,
0.1241602748632431,
-0.08212345093488693,
-0.09360436350107193,
-0.04660963639616966,
0.21480223536491394,
0.05053570866584778,
-0.010764851234853268,
-0.10728656500577927,
-0.07285571098327637,
-0.04315691441297531,
0.20709824562072754,
-0.03994676098227501,
-0.005832207854837179,
-0.025860974565148354,
-0.06830178201198578,
0.07365509867668152,
-0.1207188069820404,
0.09548962861299515,
-0.12845712900161743,
-0.099497951567173,
-0.025772899389266968,
-0.009148948825895786,
0.04014713317155838,
0.02017143927514553,
-0.12271345406770706,
0.20558562874794006,
-0.016080673784017563,
0.12210404127836227,
0.2932104766368866,
0.07696329802274704,
-0.07153907418251038,
0.09634553641080856,
0.2071554809808731,
-0.038354650139808655,
0.04122944921255112,
-0.2569369673728943,
0.065143883228302,
-0.053634192794561386,
-0.011894511990249157,
-0.01095613744109869,
-0.04594637081027031,
-0.17656128108501434,
0.0026361700147390366,
-0.043299175798892975,
0.11005768179893494,
-0.13741342723369598,
0.12763230502605438,
-0.03253263607621193,
0.0009758652304299176,
0.12333162873983383,
0.21682074666023254,
0.22851771116256714,
0.01486937515437603,
0.02276003174483776,
-0.06206498295068741,
0.2873227000236511,
-0.008227902464568615,
-0.19934986531734467,
-0.004320560488849878,
-0.2302098125219345,
-0.07405823469161987,
0.10384935140609741,
0.19086042046546936,
0.05582627281546593,
-0.06880058348178864,
0.17949099838733673,
0.1802077293395996,
0.13855858147144318,
-0.1011156290769577,
0.14972873032093048,
0.045468080788850784,
0.041195113211870193,
0.02845003269612789,
-0.036419764161109924,
0.05395960435271263,
0.08710604161024094,
0.1410405933856964,
-0.04009321704506874,
0.02110670506954193,
-0.07312600314617157,
0.20734618604183197,
-0.16056695580482483,
-0.17964160442352295,
-0.07113134115934372,
0.10570426285266876,
-0.0700162872672081,
-0.04621429741382599,
-0.06015285104513168,
0.14568525552749634,
0.1016572117805481,
-0.030189165845513344,
-0.14411474764347076,
-0.09133072197437286,
0.0853743627667427,
0.11549542099237442,
0.054264552891254425,
0.046567320823669434,
0.03543646261096001,
0.23019444942474365,
0.0379076786339283,
0.2055780440568924,
0.012799179181456566,
0.08162907510995865,
0.04425084590911865,
0.057832419872283936,
0.12162929028272629,
-0.3603735566139221,
0.0658012330532074,
0.373283714056015,
-0.19478142261505127,
0.07885602861642838,
-0.08760832250118256,
-0.03542288765311241,
-0.036122050136327744,
0.1589524894952774,
0.005672070197761059,
-0.11430951207876205,
0.059540051966905594,
-0.05543994531035423,
-0.08132728934288025,
0.20154085755348206,
-0.11372365802526474,
0.01844698376953602,
-0.09323050081729889,
0.06822604686021805,
0.15274302661418915,
-0.07191352546215057,
-0.03126227855682373,
0.17483605444431305,
0.04244373366236687,
-0.14370356500148773,
0.1951783448457718,
0.08609164506196976,
-0.02513652667403221,
-0.05065499246120453,
0.04475590959191322,
-0.13672885298728943,
0.09867163002490997,
-0.0035871805157512426,
0.06629931926727295,
0.19985038042068481,
0.1056312844157219,
0.047596968710422516,
0.0626354068517685,
-0.021396176889538765,
-0.06574681401252747,
0.19327184557914734,
0.019639218226075172,
0.03213217481970787,
0.16651219129562378,
-0.02979857474565506,
0.17964774370193481,
0.05991170182824135,
0.09911094605922699,
-0.21805766224861145,
0.08604736626148224,
0.07732987403869629,
-0.10034375637769699,
-0.16109074652194977,
0.10961278527975082,
0.042508263140916824,
-0.10555937141180038,
-0.1303364634513855,
0.07360189408063889,
0.1371781975030899,
0.08951040357351303,
-0.09699685126543045,
-0.175968736410141,
-0.10871996730566025,
0.028224755078554153,
-0.08820175379514694,
-0.09426001459360123,
0.05853179097175598,
0.014268825761973858,
0.10925347357988358,
-0.03221859410405159,
-0.14986354112625122,
0.13251565396785736,
-0.09158875793218613,
-0.227347269654274,
0.10267854481935501,
-0.08233223110437393,
-0.262756884098053,
0.0205103550106287,
0.11955536156892776,
-0.07686180621385574,
0.12098074704408646,
0.04961775988340378,
-0.08179693669080734,
-0.19532275199890137,
0.0640396997332573,
0.10953334718942642,
0.06449922174215317,
0.09107697010040283,
0.1364658772945404,
0.0641021579504013,
0.01673726737499237,
-0.08361517637968063,
-0.022832492366433144,
-0.01661178655922413,
0.0018731039017438889,
-0.11491265892982483,
0.10789415240287781,
-0.04331136867403984,
-0.04017530009150505,
-0.05931428074836731,
0.09973205626010895,
-0.1696539670228958,
-0.07807452976703644,
-0.10310672223567963,
-0.014981415122747421,
-0.0008344542002305388,
-0.11560748517513275,
-0.08965355157852173,
-0.087921142578125,
0.023550227284431458,
0.10144513845443726,
0.171281099319458,
-0.01490834355354309,
-0.10192068666219711,
0.0686531588435173,
-2.4823493137282025e-32,
0.036129437386989594,
0.03561650589108467,
0.06837761402130127,
0.0057646301575005054,
-0.033734895288944244,
-0.001806466723792255,
-0.0656270682811737,
-0.13984127342700958,
0.061271004378795624,
-0.04403679445385933,
-0.25377705693244934,
0.16408120095729828,
0.1298300176858902,
-0.07561789453029633,
0.013902981765568256,
-0.032499928027391434,
0.1778802126646042,
-0.04018359258770943,
-0.08000479638576508,
0.2103617638349533,
-0.049382131546735764,
0.18258246779441833,
0.022076118737459183,
0.11310844123363495,
-0.009753591381013393,
-0.09249066561460495,
0.022114217281341553,
-0.06361468136310577,
-0.020046807825565338,
-0.21317581832408905,
-0.13564057648181915,
0.0771317407488823,
-0.06502093374729156,
-0.11317898333072662,
-0.2001756727695465,
0.00881789717823267,
-0.22497855126857758,
-0.2156742513179779,
0.0141915800049901,
0.15368102490901947,
-0.19102321565151215,
0.19196924567222595,
0.018958447501063347,
-0.02204234153032303,
0.12247654050588608,
0.014695576392114162,
0.00987986009567976,
0.16807134449481964,
-0.17643438279628754,
-0.007535422686487436,
0.1513218730688095,
0.16599415242671967,
0.204955592751503,
0.19412104785442352,
0.12428291887044907,
-0.12321184575557709,
0.19832126796245575,
0.05325731635093689,
-0.286470502614975,
0.0999782606959343,
0.058327097445726395,
-0.09473639726638794,
0.0663924440741539,
-0.028668897226452827,
0.20042935013771057,
0.04008106514811516,
0.2280704379081726,
0.06846275180578232,
0.2457720935344696,
-0.12721960246562958,
-0.051619481295347214,
-0.1653171330690384,
-0.22430828213691711,
-0.15222924947738647,
-0.08739028871059418,
-0.01880701817572117,
-0.09898889809846878,
-0.059967584908008575,
-0.09176226705312729,
-0.012031329795718193,
0.08881848305463791,
-0.13268092274665833,
-0.0074272784404456615,
-0.0566459596157074,
-0.06303264200687408,
-0.23541311919689178,
0.05709874629974365,
0.1011112704873085,
0.05900871753692627,
0.021668486297130585,
-0.16832198202610016,
0.22306117415428162,
-0.08540090173482895,
-0.07666873186826706,
-0.07241897284984589,
0.16699762642383575,
-0.043921176344156265,
0.12620587646961212,
-0.07478465884923935,
-0.059136539697647095,
-0.07424572855234146,
-0.033754222095012665,
-0.002824844093993306,
-0.08586741238832474,
0.05717136710882187,
0.022198837250471115,
0.12175512313842773,
0.08741530776023865,
-0.004494135733693838,
-0.009355796501040459,
0.0034579895436763763,
0.04052559286355972,
0.009471943601965904,
0.2550768554210663,
0.15989530086517334,
-0.21668651700019836,
0.1215011477470398,
-0.08653753995895386,
0.2127705067396164,
0.26234525442123413,
-0.04889778792858124,
-0.020473476499319077,
-0.14870195090770721,
-0.035626012831926346,
0.12863221764564514,
0.06081649661064148,
-0.1037045493721962,
-0.04937119409441948,
0.03887863829731941,
-0.14754632115364075,
0.1196611300110817,
0.13404089212417603,
6.667601155641023e-7,
-0.037218764424324036,
0.0936603844165802,
-0.09019158035516739,
-0.050413526594638824,
-0.049877066165208817,
0.02176683023571968,
0.04754042625427246,
0.08753393590450287,
0.02737727388739586,
0.30663755536079407,
0.19939225912094116,
-0.05479423701763153,
-0.09720318019390106,
-0.0021503728348761797,
-0.009788612835109234,
-0.04466097056865692,
-0.08107931166887283,
0.15618257224559784,
-0.18846194446086884,
-0.11477574706077576,
-0.13035276532173157,
0.157441183924675,
0.037498291581869125,
-0.10672455281019211,
0.04519343376159668,
0.01311308890581131,
-0.2169945240020752,
0.010109775699675083,
0.15328773856163025,
0.12619616091251373,
0.1494775265455246,
-0.08396173268556595,
0.04224565252661705,
0.10263805091381073,
0.1068679615855217,
0.18892492353916168,
-0.03141116723418236,
-0.007084346376359463,
-0.044698894023895264,
0.045993007719516754,
0.10286390036344528,
-0.1917465329170227,
0.06892331689596176,
-0.11072345823049545,
0.18208903074264526,
0.08874145150184631,
-0.04999573156237602,
-0.0026152716018259525,
0.01803853176534176,
-0.005301346071064472,
0.040788065642118454,
0.13791681826114655,
0.27512824535369873,
0.31182053685188293,
0.019450053572654724,
-0.15060608088970184,
0.002224965952336788,
-0.17145664989948273,
0.1100698709487915,
-0.0783737301826477,
-0.15340496599674225,
-0.06780482083559036,
-0.0746811106801033,
0.11113608628511429,
0.01148366928100586,
-0.03455222398042679,
-0.1964237093925476,
-1.6521786905321744e-35,
0.07270052284002304,
0.012493113055825233,
-0.06385265290737152,
-0.14542284607887268,
-0.1703823208808899,
-0.19554388523101807,
0.01446938794106245,
0.12414192408323288,
-0.19136440753936768,
-0.2664496600627899,
-0.22735626995563507
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | The number of shards is `ds.n_shards`. It corresponds generally to the number of files the dataset is made of, to be able to distribute to several nodes.
**You don't end up with the same data per GPU**. But all the samples are going through your preprocessing function you pass to map. They are just skipped afterwards to only keep 1 sample out of n(GPUs) | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 64 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
The number of shards is `ds.n_shards`. It corresponds generally to the number of files the dataset is made of, to be able to distribute to several nodes.
**You don't end up with the same data per GPU**. But all the samples are going through your preprocessing function you pass to map. They are just skipped afterwards to only keep 1 sample out of n(GPUs) | [
0.04120239242911339,
-0.0592992827296257,
-0.13173824548721313,
-0.06486132740974426,
0.10235351324081421,
0.09523797035217285,
0.15981929004192352,
-0.04102279245853424,
0.004345638677477837,
0.24527448415756226,
-0.02870415523648262,
-0.020177869126200676,
0.022801093757152557,
-0.0649142637848854,
-0.10897856950759888,
-0.24476782977581024,
0.014734199270606041,
-0.01097850315272808,
-0.13798333704471588,
-0.05905035510659218,
-0.1598494052886963,
0.15928412973880768,
0.09804129600524902,
-0.10369987785816193,
0.0779251754283905,
-0.11430193483829498,
-0.09135178476572037,
-0.029833802953362465,
0.024265147745609283,
0.02553064189851284,
-0.0029664665926247835,
0.0756130963563919,
-0.15732894837856293,
0.06289196014404297,
0.000004713691396318609,
0.2092001736164093,
0.1397833675146103,
-0.045255813747644424,
-0.012332912534475327,
0.11700470745563507,
0.0733688548207283,
-0.012174995616078377,
0.029255442321300507,
0.0005050079780630767,
-0.11798247694969177,
-0.12029377371072769,
-0.16602972149848938,
-0.08671194314956665,
0.0925617665052414,
-0.11538293212652206,
-0.0502072311937809,
0.1966092437505722,
-0.14491303265094757,
-0.1623253971338272,
-0.0016899608308449388,
-0.045926403254270554,
0.0709412544965744,
0.0017015814082697034,
0.007002521306276321,
0.04212794080376625,
-0.03395482897758484,
0.06528975069522858,
0.07441706955432892,
0.0956495851278305,
0.0013470874400809407,
0.12192092090845108,
-0.09260177612304688,
-0.16056512296199799,
0.0512099526822567,
0.028461843729019165,
-0.16241303086280823,
-0.04933694005012512,
-0.01781921461224556,
0.078993059694767,
-0.08710773289203644,
-0.04670426994562149,
-0.12931568920612335,
0.07353118062019348,
-0.1921384334564209,
0.10770870000123978,
-0.07058725506067276,
0.061254680156707764,
0.0069581735879182816,
-0.05793274566531181,
-0.15086974203586578,
-0.018229879438877106,
-0.1060396358370781,
0.15488530695438385,
0.0289816502481699,
0.10957071185112,
-0.06634758412837982,
-0.043788012117147446,
-0.16352128982543945,
-0.13200461864471436,
-0.18657666444778442,
0.017211753875017166,
-0.09435401111841202,
-0.23381800949573517,
0.012600818648934364,
0.07895556092262268,
0.15958945453166962,
-0.10664965212345123,
0.09168034046888351,
0.025215240195393562,
0.1502179205417633,
-0.24912673234939575,
0.08868446201086044,
-0.05411888659000397,
-0.10221809148788452,
-0.08143012970685959,
0.11147161573171616,
0.018147137016057968,
0.1442444622516632,
0.06365638226270676,
-0.06965731829404831,
-0.07669958472251892,
0.11471600085496902,
0.13179291784763336,
-0.15932762622833252,
0.04745450243353844,
0.11325874924659729,
-0.11316049844026566,
0.012827206403017044,
0.019958222284913063,
0.22630757093429565,
-0.13088278472423553,
-0.28740277886390686,
0.13395768404006958,
-0.09725523740053177,
-0.06543383002281189,
-0.11296650022268295,
-0.036015480756759644,
0.006710230838507414,
0.06025945767760277,
0.05435881018638611,
-0.10324141383171082,
0.09549006819725037,
-0.16544026136398315,
-0.03717448562383652,
-0.03921416401863098,
0.15565232932567596,
0.0373823419213295,
0.1244334876537323,
0.04369380697607994,
0.16683247685432434,
0.07579824328422546,
0.03006613813340664,
0.046236809343099594,
-0.008564911782741547,
0.03725763410329819,
-0.14246107637882233,
0.22450070083141327,
-0.09651490300893784,
0.1501358598470688,
-0.09485290199518204,
0.17348550260066986,
-0.01930811069905758,
-0.02166816219687462,
-0.15407924354076385,
0.01273681316524744,
0.05894433706998825,
-0.004463218152523041,
-0.1742102950811386,
-0.12236752361059189,
0.0524483248591423,
0.05323931947350502,
0.06653688848018646,
-0.024051351472735405,
0.045409541577100754,
-0.1678052693605423,
0.11414799094200134,
-0.0941101536154747,
-0.0817781612277031,
-0.12527316808700562,
-0.15352152287960052,
0.34660065174102783,
-0.17600245773792267,
0.18363477289676666,
-0.1600736528635025,
0.03397638723254204,
0.0763896107673645,
0.04452166706323624,
0.0919877141714096,
-0.3028971254825592,
0.09788976609706879,
-0.2674386501312256,
0.007039507385343313,
-0.04017110913991928,
-0.13413189351558685,
0.10596209764480591,
-0.011718499474227428,
-0.014788794331252575,
-0.05280135199427605,
0.02012285776436329,
-0.09345574676990509,
0.02295568957924843,
-0.011405305936932564,
-0.16288140416145325,
0.2322292923927307,
-0.19399486482143402,
-0.07759734243154526,
0.24181854724884033,
0.14640548825263977,
-0.016281360760331154,
-0.008506402373313904,
-0.09687963873147964,
-0.16888843476772308,
0.23025372624397278,
0.11512600630521774,
-0.24344155192375183,
-0.11943226307630539,
-0.0022688547614961863,
0.045574404299259186,
0.0018134786514565349,
-0.10611406713724136,
0.09409670531749725,
-0.13084688782691956,
0.04416456073522568,
0.08701153844594955,
0.05084860697388649,
-0.21777193248271942,
-0.00216568517498672,
-0.07244811952114105,
0.02283678576350212,
-0.017191309481859207,
0.009155632928013802,
-0.03340916335582733,
-0.01804395578801632,
0.1389135867357254,
-0.025181584060192108,
0.009801757521927357,
-0.14271897077560425,
0.21126802265644073,
0.033087994903326035,
0.04759571701288223,
0.03885406628251076,
0.047017768025398254,
-0.19060862064361572,
0.05914546549320221,
-0.007579918950796127,
-0.12362571805715561,
-0.022450394928455353,
-0.20219488441944122,
-0.0684288963675499,
-0.04636285454034805,
0.09249956905841827,
-0.1358790099620819,
0.1580483317375183,
0.010438437573611736,
-0.013365061953663826,
0.16603884100914001,
0.03282042220234871,
-0.11137943714857101,
-0.07449343800544739,
-0.16181138157844543,
-0.08135011047124863,
0.11571483314037323,
0.09496845304965973,
0.20811235904693604,
0.21192853152751923,
0.20857581496238708,
0.05837004631757736,
-0.14760415256023407,
0.01765807904303074,
-0.043277256190776825,
-0.01071715448051691,
0.11533708870410919,
0.03518794849514961,
-0.01276598684489727,
0.014059984125196934,
0.22708383202552795,
0.05309697240591049,
0.0234439205378294,
-0.04831849783658981,
-0.03954622894525528,
-0.023985138162970543,
0.0005226146895438433,
0.07502638548612595,
-0.058934710919857025,
-0.14395473897457123,
-0.049756962805986404,
0.13721784949302673,
0.18538765609264374,
-0.21037419140338898,
0.03154943510890007,
0.13453081250190735,
-0.02799912914633751,
-0.035009413957595825,
-0.10402600467205048,
0.01725280098617077,
0.010163450613617897,
-0.011234677396714687,
-0.04052714630961418,
-0.039956919848918915,
0.1825396567583084,
0.02092120796442032,
0.10364781320095062,
-0.053386297076940536,
0.04476344957947731,
-0.0012878702254965901,
-0.08872705698013306,
-0.062221936881542206,
-0.031210875138640404,
-0.05837441235780716,
0.006051073782145977,
0.08949492871761322,
-0.05724640190601349,
0.06600085645914078,
-0.18890917301177979,
-0.08057363331317902,
-0.07111840695142746,
-0.027882449328899384,
-0.08104987442493439,
0.11734972149133682,
-0.02120797149837017,
-0.22750847041606903,
-0.06625925004482269,
-0.08073740452528,
0.008940713480114937,
0.009978135116398335,
0.03522110357880592,
0.12730972468852997,
-0.09170987457036972,
-0.13936522603034973,
0.05193456634879112,
-0.11784350126981735,
0.019472714513540268,
-0.10675039142370224,
0.0908546894788742,
-0.0977620854973793,
-0.05444387346506119,
0.02737252227962017,
0.030517300590872765,
-0.009706253185868263,
0.12637262046337128,
-0.06846209615468979,
-0.07123179733753204,
-0.07096561789512634,
0.16879132390022278,
0.03095552884042263,
0.013412524946033955,
-0.07904969155788422,
-0.05135205015540123,
-0.036199793219566345,
0.1534954160451889,
-0.01136678084731102,
-0.003217215882614255,
-0.010128195397555828,
-0.03950049728155136,
0.026649899780750275,
-0.06934337317943573,
0.09550899267196655,
-0.11230415850877762,
-0.08953943103551865,
-0.03593789041042328,
-0.06146351248025894,
-0.027452804148197174,
-0.016987008973956108,
-0.16324394941329956,
0.24216119945049286,
-0.049146924167871475,
0.1341843456029892,
0.21511293947696686,
0.05351068824529648,
-0.025129349902272224,
0.06647855043411255,
0.2550366520881653,
-0.03581435978412628,
0.006518423557281494,
-0.2803138494491577,
0.042156267911195755,
0.010988591238856316,
0.04336600378155708,
-0.08034031838178635,
-0.05743055045604706,
-0.09874523431062698,
0.016902200877666473,
-0.04754476249217987,
0.17214429378509521,
-0.12861751019954681,
0.13766013085842133,
-0.06525261700153351,
0.007754435762763023,
0.15339244902133942,
0.2450815588235855,
0.20988360047340393,
0.03874886780977249,
0.05773944407701492,
-0.0500619113445282,
0.3038958013057709,
0.03264310956001282,
-0.11024811118841171,
-0.039500415325164795,
-0.2420538365840912,
-0.04848404973745346,
0.060488346964120865,
0.16462759673595428,
0.0419563427567482,
-0.046928051859140396,
0.20505772531032562,
0.20312471687793732,
0.1711558699607849,
-0.10421337187290192,
0.1746326982975006,
0.0406235046684742,
0.0005605004844255745,
-0.005827856715768576,
-0.013613234274089336,
0.0875898227095604,
0.09714829921722412,
0.09633567184209824,
0.034109633415937424,
0.015413057990372181,
-0.12021701782941818,
0.1264588087797165,
-0.1353958547115326,
-0.12988954782485962,
-0.004436542745679617,
0.10743428021669388,
-0.06326316297054291,
0.0012849814957007766,
-0.040929701179265976,
0.13988710939884186,
0.10506834089756012,
0.06561385840177536,
-0.14366759359836578,
-0.08729258924722672,
0.07066243886947632,
0.06688163429498672,
0.11169514060020447,
0.03342233598232269,
0.03603397682309151,
0.20604977011680603,
0.04105362668633461,
0.23141910135746002,
-0.03714589402079582,
0.09614666551351547,
0.017862532287836075,
0.019619639962911606,
0.05534820631146431,
-0.38423046469688416,
0.058935653418302536,
0.34177476167678833,
-0.1721234917640686,
0.04397127404808998,
-0.1389055848121643,
-0.044848449528217316,
-0.05104518681764603,
0.13556921482086182,
0.014931031502783298,
-0.089326873421669,
0.03994464501738548,
-0.03957700356841087,
-0.1392282396554947,
0.13878944516181946,
-0.11087626218795776,
0.052091944962739944,
-0.05592180788516998,
0.059022270143032074,
0.1634606271982193,
-0.03556523472070694,
-0.03532763943076134,
0.18387551605701447,
-0.007523719687014818,
-0.17672571539878845,
0.1600637435913086,
0.0780811756849289,
0.07631709426641464,
-0.0954594686627388,
0.11739201843738556,
-0.11705121397972107,
0.11603206396102905,
0.03613786771893501,
0.1339266002178192,
0.1706545650959015,
0.119267538189888,
0.004258411470800638,
0.010364264249801636,
-0.03952062129974365,
-0.07611813396215439,
0.24799713492393494,
0.07221616059541702,
0.007068847306072712,
0.14958208799362183,
-0.007570951711386442,
0.12788985669612885,
0.05617191642522812,
0.09797670692205429,
-0.22866353392601013,
0.08823832869529724,
0.08700212091207504,
-0.10254541784524918,
-0.15561671555042267,
0.1052604392170906,
-0.01082553155720234,
-0.06374042481184006,
-0.07942040264606476,
0.11450450867414474,
0.1124739870429039,
0.10125773400068283,
-0.08010120689868927,
-0.14061379432678223,
-0.11396944522857666,
0.008378928527235985,
-0.09046474099159241,
-0.1083163470029831,
0.018595075234770775,
0.010711323469877243,
0.055222295224666595,
-0.012827551923692226,
-0.12393274158239365,
0.11401359736919403,
-0.08779877424240112,
-0.16825009882450104,
0.12385495007038116,
-0.11104198545217514,
-0.27452149987220764,
0.06831073760986328,
0.13840988278388977,
-0.08231062442064285,
0.09549714624881744,
0.048771414905786514,
-0.04789453372359276,
-0.2212013155221939,
0.10217133909463882,
0.07816791534423828,
0.04846223443746567,
0.07824593782424927,
0.12554076313972473,
0.10598073154687881,
-0.00821447279304266,
-0.09608199447393417,
0.027032485231757164,
0.004747270606458187,
-0.018421784043312073,
-0.12845826148986816,
0.1392102688550949,
-0.029157111421227455,
-0.023418502882122993,
-0.05800468474626541,
0.07652439177036285,
-0.12775103747844696,
-0.054532911628484726,
-0.1578194797039032,
0.00967455469071865,
-0.002790336264297366,
-0.10529051721096039,
-0.05549650639295578,
-0.06553695350885391,
0.009116080589592457,
0.06380758434534073,
0.15285724401474,
-0.034991372376680374,
-0.10741478949785233,
0.08430192619562149,
-2.542765903003828e-32,
0.09225180000066757,
0.10132360458374023,
0.06662465631961823,
-0.03544541448354721,
-0.032240912318229675,
0.037945523858070374,
-0.05068549886345863,
-0.08996707201004028,
0.038502082228660583,
-0.07605062425136566,
-0.2571679353713989,
0.1546783745288849,
0.11670119315385818,
-0.10640227794647217,
0.007889200001955032,
-0.03644949197769165,
0.17768503725528717,
-0.049946270883083344,
-0.11507146805524826,
0.21544955670833588,
-0.0480634942650795,
0.1694066971540451,
0.027738438919186592,
0.049243539571762085,
-0.055654969066381454,
-0.018494613468647003,
-0.002456576330587268,
-0.06658709794282913,
-0.06519072502851486,
-0.24981918931007385,
-0.14413943886756897,
0.11366312205791473,
-0.11489882320165634,
-0.08133711665868759,
-0.16342002153396606,
-0.023093268275260925,
-0.21283237636089325,
-0.19127227365970612,
0.04824846610426903,
0.12821736931800842,
-0.13563810288906097,
0.15622146427631378,
-0.0169120654463768,
-0.06059199944138527,
0.13250800967216492,
-0.019874414429068565,
-0.006199793890118599,
0.15560194849967957,
-0.20124705135822296,
0.0541495606303215,
0.19040268659591675,
0.17349959909915924,
0.24225223064422607,
0.1678343415260315,
0.13957300782203674,
-0.1048356369137764,
0.17261360585689545,
0.11590005457401276,
-0.23148459196090698,
0.1352759748697281,
0.06315158307552338,
-0.12393281608819962,
0.04938386753201485,
0.006572617683559656,
0.26046687364578247,
0.02705097384750843,
0.2486068606376648,
0.05159341171383858,
0.16346792876720428,
-0.0850021094083786,
-0.014346904121339321,
-0.15483339130878448,
-0.21247781813144684,
-0.09851934760808945,
-0.12312137335538864,
0.004220523871481419,
-0.057001519948244095,
-0.08767207711935043,
-0.050325144082307816,
-0.059658024460077286,
0.06063728779554367,
-0.11352146416902542,
0.0030017499811947346,
-0.1025499626994133,
-0.05059114471077919,
-0.22079738974571228,
0.07712873071432114,
0.10640490800142288,
0.009441842325031757,
-0.0007019267650321126,
-0.23442791402339935,
0.23185868561267853,
-0.11614608764648438,
-0.039613284170627594,
-0.04283649101853371,
0.135789692401886,
-0.06630099564790726,
0.1664457619190216,
-0.041381292045116425,
-0.08998209983110428,
-0.12470857799053192,
-0.013838795945048332,
0.004676563199609518,
0.0018962620524689555,
0.05045917257666588,
0.016820810735225677,
0.13026313483715057,
0.08299468457698822,
-0.016102850437164307,
-0.04149758443236351,
0.00005078788672108203,
0.07591596245765686,
-0.027796778827905655,
0.19989220798015594,
0.14826637506484985,
-0.2129315733909607,
0.14615406095981598,
-0.12482793629169464,
0.2266840785741806,
0.2849770784378052,
-0.032678794115781784,
-0.05989649519324303,
-0.23515073955059052,
-0.03479781001806259,
0.15503224730491638,
0.05670192092657089,
-0.12219211459159851,
-0.11454218626022339,
0.041766367852687836,
-0.18570777773857117,
0.10563777387142181,
0.05296838656067848,
6.682320190520841e-7,
-0.08254363387823105,
0.08145421743392944,
-0.07623477280139923,
-0.07558667659759521,
-0.07309799641370773,
0.015685666352510452,
0.04434587061405182,
0.0891796350479126,
-0.029293164610862732,
0.26667559146881104,
0.2567516267299652,
-0.05599288269877434,
-0.0712055116891861,
0.00823990348726511,
0.042177654802799225,
-0.0869419276714325,
-0.12997008860111237,
0.09997718036174774,
-0.16795042157173157,
-0.04005277901887894,
-0.12392719835042953,
0.12675422430038452,
0.03460201993584633,
-0.11490994691848755,
0.07844390720129013,
0.05848554149270058,
-0.17907682061195374,
0.007233683951199055,
0.20069631934165955,
0.06657480448484421,
0.12387946993112564,
-0.09988238662481308,
0.07293429970741272,
0.07249124348163605,
0.08913262188434601,
0.17491932213306427,
-0.04014349728822708,
-0.0008841126109473407,
-0.05205736309289932,
0.0916924998164177,
0.13052909076213837,
-0.1869954913854599,
0.03363063186407089,
-0.11981300264596939,
0.15681958198547363,
0.05701244994997978,
-0.10182787477970123,
-0.004304050002247095,
-0.021394971758127213,
0.048564426600933075,
0.04015687480568886,
0.11315091699361801,
0.2757648229598999,
0.2836928963661194,
0.027991484850645065,
-0.17035405337810516,
0.025574952363967896,
-0.1480916291475296,
0.07083474844694138,
-0.0569128692150116,
-0.16757315397262573,
-0.04660584777593613,
-0.0348084531724453,
0.10947846621274948,
-0.04691508039832115,
-0.041621480137109756,
-0.1893826127052307,
3.9547957709418197e-35,
0.06711771339178085,
0.014840911142528057,
-0.03964288532733917,
-0.15702170133590698,
-0.1696859449148178,
-0.19799645245075226,
0.06911303848028183,
0.14630618691444397,
-0.13724258542060852,
-0.26565220952033997,
-0.17823754251003265
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Where can I print the actual training data for each GPU? | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 37 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Where can I print the actual training data for each GPU? | [
0.03453907370567322,
-0.07318390160799026,
-0.07280486077070236,
-0.03586940839886665,
0.08751174807548523,
0.10097090154886246,
0.17990434169769287,
-0.047862257808446884,
-0.027035240083932877,
0.2025694102048874,
-0.06439704447984695,
-0.03678041324019432,
0.03461490198969841,
-0.08246923238039017,
-0.060165584087371826,
-0.2191171944141388,
-0.0016217484371736646,
-0.01882154867053032,
-0.12302954494953156,
-0.07253360748291016,
-0.17323830723762512,
0.16355261206626892,
0.11858037114143372,
-0.0610341876745224,
0.09997810423374176,
-0.11231046169996262,
-0.06084218621253967,
-0.03731852397322655,
0.016365308314561844,
0.0030610309913754463,
0.002803390845656395,
0.06189496070146561,
-0.13580471277236938,
-0.009095883928239346,
0.0000049477316679258365,
0.20759880542755127,
0.07084979861974716,
0.02741215191781521,
-0.023404531180858612,
0.11606419831514359,
0.09457036107778549,
0.022059287875890732,
0.03171314671635628,
0.02102707140147686,
-0.10702215880155563,
-0.14325164258480072,
-0.15205320715904236,
-0.0758243203163147,
0.054566044360399246,
-0.11365525424480438,
-0.011615785770118237,
0.20764675736427307,
-0.2154238224029541,
-0.19580934941768646,
0.03452125936746597,
-0.04524265229701996,
0.05116571485996246,
-0.007972068153321743,
-0.05342217907309532,
0.0548844151198864,
-0.016822384670376778,
0.06436900049448013,
0.08102220296859741,
0.04758477956056595,
-0.03457820415496826,
0.07903674989938736,
-0.11443915218114853,
-0.16774699091911316,
0.054163575172424316,
-0.036151282489299774,
-0.11534910649061203,
-0.09151847660541534,
-0.0068319812417030334,
0.10037557780742645,
-0.047291193157434464,
-0.08235528320074081,
-0.10617794841527939,
0.12409269064664841,
-0.15494422614574432,
0.09042629599571228,
-0.07698724418878555,
0.02540149725973606,
0.0037032871041446924,
-0.07408058643341064,
-0.16690805554389954,
0.06757178157567978,
-0.13079343736171722,
0.16242669522762299,
-0.03081376478075981,
0.08136208355426788,
-0.02111007831990719,
-0.04953477904200554,
-0.08915074914693832,
-0.1277012676000595,
-0.17297573387622833,
0.020587334409356117,
-0.07823844254016876,
-0.2049812376499176,
-0.009936073794960976,
0.09445488452911377,
0.2444220632314682,
-0.055194955319166183,
0.12130211293697357,
0.015034843236207962,
0.14983820915222168,
-0.2614997625350952,
0.07963216304779053,
-0.037819426506757736,
-0.13209840655326843,
-0.0313575342297554,
0.16362573206424713,
-0.0076799578964710236,
0.13506709039211273,
0.02345634438097477,
-0.08128909021615982,
-0.08873745799064636,
0.1086459532380104,
0.100023552775383,
-0.22115890681743622,
-0.00730599882081151,
0.11464495956897736,
-0.0861259177327156,
0.00278128101490438,
-0.002001411747187376,
0.1760595440864563,
-0.1189122274518013,
-0.28415364027023315,
0.10172619670629501,
-0.060659848153591156,
-0.07669948041439056,
-0.12639200687408447,
-0.009384043514728546,
-0.013975667767226696,
0.08945725113153458,
0.047726333141326904,
-0.11385497450828552,
0.12598147988319397,
-0.16598455607891083,
-0.017174841836094856,
-0.036012012511491776,
0.15250477194786072,
0.004681809339672327,
0.19321990013122559,
0.018102524802088737,
0.18643349409103394,
0.07492920011281967,
0.06978274881839752,
0.10081622749567032,
-0.033307306468486786,
0.06542934477329254,
-0.08748330920934677,
0.23572131991386414,
-0.09762156754732132,
0.1242728978395462,
-0.0774809718132019,
0.14536495506763458,
0.013859730213880539,
-0.054013967514038086,
-0.1409163475036621,
0.024783767759799957,
0.06248968839645386,
-0.046607375144958496,
-0.12756454944610596,
-0.1321876347064972,
0.09133533388376236,
-0.017653539776802063,
0.02857079915702343,
-0.0369119755923748,
0.0880068987607956,
-0.1742236465215683,
0.05353828892111778,
-0.11900744587182999,
-0.10590584576129913,
-0.11436936259269714,
-0.13888980448246002,
0.35506075620651245,
-0.12304139137268066,
0.13217280805110931,
-0.08871626108884811,
0.03802181035280228,
0.09946603327989578,
0.06385325640439987,
0.05147582292556763,
-0.29480183124542236,
0.10894849896430969,
-0.2239837646484375,
0.030574513599276543,
0.005286346655339003,
-0.09439653158187866,
0.0454019270837307,
-0.006192754954099655,
-0.016119487583637238,
-0.0936998799443245,
0.0346359945833683,
-0.06158174201846123,
0.06407193839550018,
-0.009599149227142334,
-0.2242278754711151,
0.2550165057182312,
-0.19833630323410034,
-0.15019065141677856,
0.2122919261455536,
0.19124478101730347,
0.04305192083120346,
-0.003696592990309,
-0.07119782269001007,
-0.13898871839046478,
0.18096891045570374,
0.09616277366876602,
-0.279532790184021,
-0.16139957308769226,
-0.042207930237054825,
0.08205319941043854,
-0.021584760397672653,
-0.1037881150841713,
0.07636964321136475,
-0.09725144505500793,
0.040135812014341354,
0.08151136338710785,
0.037356577813625336,
-0.17920491099357605,
0.0067447698675096035,
-0.1664142608642578,
0.02782801166176796,
-0.0084152827039361,
0.03432583808898926,
-0.04040268063545227,
-0.04866807907819748,
0.1176491230726242,
-0.037668850272893906,
-0.011232796125113964,
-0.09893181920051575,
0.28509533405303955,
0.06963957101106644,
0.07879459112882614,
0.021694723516702652,
0.020425070077180862,
-0.13886430859565735,
0.06503017991781235,
-0.01815798692405224,
-0.09104357659816742,
-0.08643429726362228,
-0.22238418459892273,
-0.05749843642115593,
-0.06917083263397217,
0.09990876168012619,
-0.1405252367258072,
0.12245230376720428,
0.022611478343605995,
0.02234014868736267,
0.12412865459918976,
0.08790801465511322,
-0.10618573427200317,
-0.076408252120018,
-0.1439916342496872,
-0.01218065619468689,
0.1200554370880127,
0.0647515207529068,
0.16310499608516693,
0.21825186908245087,
0.21738959848880768,
0.037726037204265594,
-0.17247486114501953,
-0.003805507905781269,
-0.049555160105228424,
0.01960584707558155,
0.1348801851272583,
-0.03373035416007042,
-0.027515126392245293,
0.022921336814761162,
0.23230256140232086,
0.06627079844474792,
-0.019757147878408432,
-0.051703546196222305,
-0.07758469134569168,
0.026565229520201683,
0.00785241462290287,
0.058108244091272354,
-0.017195381224155426,
-0.18415701389312744,
-0.07370147109031677,
0.13291741907596588,
0.16922743618488312,
-0.22213999927043915,
0.04971720650792122,
0.16114351153373718,
-0.0067238411866128445,
-0.0824284553527832,
-0.11392223089933395,
-0.007008054293692112,
0.0194851104170084,
-0.012907101772725582,
-0.03255695104598999,
-0.02073332481086254,
0.21940022706985474,
0.0035127284936606884,
0.05563579872250557,
0.041698746383190155,
0.009618228301405907,
0.15314044058322906,
-0.09591548144817352,
-0.02381821908056736,
-0.03984636068344116,
-0.02677113562822342,
-0.024120600894093513,
0.08654550462961197,
-0.033276353031396866,
0.034559547901153564,
-0.17897820472717285,
0.004078587517142296,
-0.06107547879219055,
-0.026688236743211746,
-0.09978058189153671,
0.10428164899349213,
-0.027614232152700424,
-0.19609218835830688,
-0.09471477568149567,
-0.04342414438724518,
0.0013600554084405303,
0.07001430541276932,
0.05877204239368439,
0.035416267812252045,
-0.09175768494606018,
-0.12580855190753937,
0.11924736201763153,
-0.1544095128774643,
-0.002480112249031663,
-0.032058898359537125,
0.1145448088645935,
-0.07648693025112152,
-0.05384490638971329,
-0.05168170481920242,
0.020205877721309662,
0.06260471791028976,
0.14173534512519836,
-0.05352181941270828,
-0.06696953624486923,
-0.11064673960208893,
0.16833524405956268,
0.017876669764518738,
0.02418786846101284,
-0.10071805119514465,
0.010645021684467793,
0.021304424852132797,
0.13864775002002716,
-0.08156806230545044,
-0.002019641688093543,
-0.009747236967086792,
-0.04868321865797043,
0.03742241859436035,
-0.05611078068614006,
0.10100352019071579,
-0.11887107044458389,
-0.0825490951538086,
-0.01481558196246624,
-0.06951155513525009,
0.029007069766521454,
-0.033752623945474625,
-0.18641279637813568,
0.22321100533008575,
-0.08873160928487778,
0.1585836410522461,
0.25276026129722595,
0.12167702615261078,
-0.051841430366039276,
-0.0018458302365615964,
0.2491299957036972,
-0.004708038177341223,
0.011532728560268879,
-0.2417638599872589,
-0.0061415741220116615,
-0.03130686283111572,
0.024636803194880486,
-0.06763646751642227,
-0.04863787814974785,
-0.12740302085876465,
0.04132010415196419,
0.02790052630007267,
0.16587918996810913,
-0.0961466059088707,
0.09086085855960846,
-0.038804877549409866,
0.01871541328728199,
0.1224093958735466,
0.22456367313861847,
0.21517163515090942,
0.0509478859603405,
0.08054781705141068,
-0.07544704526662827,
0.2974221110343933,
-0.006893558893352747,
-0.15620940923690796,
-0.10096487402915955,
-0.20254763960838318,
-0.0993945524096489,
0.08554241061210632,
0.18029579520225525,
0.044689930975437164,
-0.05916657671332359,
0.2783377468585968,
0.19647033512592316,
0.18180492520332336,
-0.1411931812763214,
0.07055776566267014,
0.04067942500114441,
0.0074579487554728985,
0.038950592279434204,
-0.020416028797626495,
0.07383895665407181,
0.10239356756210327,
0.10704274475574493,
-0.022149350494146347,
0.0031882855109870434,
-0.13171783089637756,
0.14625214040279388,
-0.19446086883544922,
-0.15095146000385284,
-0.01117097306996584,
0.12744903564453125,
-0.0562981478869915,
-0.020857373252511024,
-0.007374901790171862,
0.10365211963653564,
0.05257036164402962,
0.025056080892682076,
-0.11856050044298172,
-0.07330955564975739,
0.09025977551937103,
0.05865377187728882,
0.08165466785430908,
-0.00475842971354723,
0.018243029713630676,
0.1267300695180893,
0.09250868111848831,
0.21840858459472656,
0.04297869652509689,
0.09168023616075516,
0.05694226548075676,
0.030044779181480408,
0.07580909132957458,
-0.36726489663124084,
0.0766211599111557,
0.41269174218177795,
-0.13713504374027252,
-0.016189102083444595,
-0.11537063866853714,
-0.02930321730673313,
-0.07117637991905212,
0.1419956386089325,
0.01123123336583376,
-0.10961504280567169,
0.038289137184619904,
-0.06374113261699677,
-0.14675229787826538,
0.1533343642950058,
-0.10785920172929764,
0.05373864993453026,
-0.05931342765688896,
0.004293153993785381,
0.13778354227542877,
0.0022364791948348284,
-0.023916352540254593,
0.1940668374300003,
0.04252075031399727,
-0.1432705968618393,
0.21070535480976105,
0.10595615208148956,
-0.025897115468978882,
-0.05560559406876564,
0.02309589646756649,
-0.15322381258010864,
0.09805474430322647,
-0.007537307683378458,
0.11437691003084183,
0.17015263438224792,
0.11606232076883316,
-0.00027501204749569297,
0.04776579514145851,
-0.032697856426239014,
-0.04515182599425316,
0.1929793655872345,
0.06202874705195427,
-0.004598761443048716,
0.09598717838525772,
-0.025233769789338112,
0.10939584672451019,
0.046122562140226364,
0.10006848722696304,
-0.2354094535112381,
0.0778956487774849,
0.10514737665653229,
-0.15085911750793457,
-0.15078675746917725,
0.054823942482471466,
0.06276531517505646,
-0.048669517040252686,
-0.16619674861431122,
0.040419019758701324,
0.11739383637905121,
0.11876314133405685,
-0.11317791044712067,
-0.15877139568328857,
-0.12002594023942947,
0.024489207193255424,
-0.12950317561626434,
-0.09934229403734207,
0.02728470042347908,
0.01264197938144207,
0.10719705373048782,
-0.019866039976477623,
-0.05985347926616669,
0.15797552466392517,
-0.04822337627410889,
-0.19797676801681519,
0.05984339118003845,
-0.0735410675406456,
-0.2834421396255493,
0.014042007736861706,
0.12363863736391068,
-0.040557172149419785,
0.0686894953250885,
0.030949123203754425,
-0.04788666218519211,
-0.18871502578258514,
0.09986263513565063,
0.09517940133810043,
0.03990049287676811,
0.04039241001009941,
0.10213113576173782,
0.11637010425329208,
-0.014005132019519806,
-0.08208168298006058,
0.015912314876914024,
-0.029213784262537956,
0.004738611169159412,
-0.12200585752725601,
0.09997660666704178,
-0.04707501456141472,
-0.045458197593688965,
-0.0775822326540947,
0.10504527390003204,
-0.1244770735502243,
-0.051810503005981445,
-0.06864070147275925,
-0.06864950805902481,
-0.025328656658530235,
-0.10162313282489777,
-0.021913858130574226,
-0.04595119506120682,
0.018162738531827927,
0.11266318708658218,
0.16813068091869354,
-0.03064771369099617,
-0.07135546952486038,
0.06599587202072144,
-2.5468046077196656e-32,
0.008317209780216217,
0.04554637894034386,
0.06324411928653717,
-0.012059374712407589,
-0.002814856357872486,
0.02670956589281559,
-0.010100917890667915,
-0.1298646777868271,
0.01942608691751957,
-0.008766786195337772,
-0.20883524417877197,
0.18260571360588074,
0.10756783932447433,
-0.07224030047655106,
-0.03830409422516823,
-0.06130671501159668,
0.17037129402160645,
-0.03962835296988487,
-0.11714660376310349,
0.21129396557807922,
-0.022302497178316116,
0.15485598146915436,
0.11510074138641357,
-0.019081024453043938,
-0.02156113274395466,
-0.04425947368144989,
0.018337735906243324,
-0.08146756887435913,
-0.12709221243858337,
-0.18352754414081573,
-0.14152465760707855,
0.060933224856853485,
-0.08160015940666199,
-0.09957342594861984,
-0.1336970031261444,
-0.048822544515132904,
-0.2433733493089676,
-0.18716520071029663,
0.07365448027849197,
0.11741995811462402,
-0.2103993445634842,
0.1083691194653511,
-0.023700227960944176,
-0.016744332388043404,
0.13430054485797882,
-0.062223881483078,
-0.046624310314655304,
0.17210732400417328,
-0.19594420492649078,
0.06590917706489563,
0.0974777415394783,
0.1628320962190628,
0.23822815716266632,
0.2217777967453003,
0.1727449744939804,
-0.06657259166240692,
0.18775290250778198,
0.11993175745010376,
-0.30138227343559265,
0.12523478269577026,
0.07004495710134506,
-0.09382551908493042,
0.1028534471988678,
-0.01905098371207714,
0.27255740761756897,
0.026531770825386047,
0.19338563084602356,
0.0829821303486824,
0.16596639156341553,
-0.072217658162117,
-0.05166390538215637,
-0.12791092693805695,
-0.25826120376586914,
-0.15204815566539764,
-0.10418111830949783,
0.0019432934932410717,
-0.055686041712760925,
-0.1521555483341217,
-0.09291772544384003,
-0.07987063378095627,
0.032540854066610336,
-0.16444642841815948,
0.054315730929374695,
-0.12146828323602676,
-0.08325474709272385,
-0.28791794180870056,
0.056910641491413116,
0.0843195989727974,
0.08241929858922958,
0.0066439989022910595,
-0.2504177689552307,
0.2554570138454437,
-0.14940707385540009,
-0.05045290291309357,
-0.058187682181596756,
0.14594018459320068,
-0.032970283180475235,
0.12876641750335693,
0.0035623526200652122,
-0.0647018626332283,
-0.1304706186056137,
-0.03177957981824875,
-0.007453712169080973,
-0.04739433154463768,
0.06452339887619019,
0.00960204005241394,
0.12995392084121704,
0.12161489576101303,
-0.04234043136239052,
-0.009039545431733131,
0.008746299892663956,
0.07244807481765747,
-0.021699564531445503,
0.15636934340000153,
0.21125511825084686,
-0.1265517622232437,
0.16264718770980835,
-0.08449256420135498,
0.23055428266525269,
0.2607714831829071,
-0.019369296729564667,
-0.06359363347291946,
-0.18416954576969147,
-0.02194010652601719,
0.18366466462612152,
0.06371817737817764,
-0.1013646274805069,
-0.08166606724262238,
0.06251043826341629,
-0.12642334401607513,
0.1102316603064537,
0.16282251477241516,
6.742332629983139e-7,
-0.015606621280312538,
0.06439847499132156,
-0.04317634552717209,
-0.0749906525015831,
-0.045629363507032394,
0.009753896854817867,
0.12206634134054184,
0.05007699131965637,
0.024779481813311577,
0.2058347463607788,
0.1862773299217224,
-0.07859570533037186,
-0.05718483030796051,
-0.02697056718170643,
0.029690062627196312,
-0.035533417016267776,
-0.14146608114242554,
0.16611094772815704,
-0.16889937222003937,
-0.06754067540168762,
-0.13868287205696106,
0.15635962784290314,
-0.022593224421143532,
-0.0842614620923996,
0.06668337434530258,
0.0644908994436264,
-0.18326738476753235,
-0.02791232243180275,
0.14442646503448486,
0.06821459531784058,
0.11261989176273346,
-0.10725709050893784,
0.03783261403441429,
0.06322825700044632,
0.09944330155849457,
0.16100412607192993,
-0.05730563402175903,
0.00015920378791633993,
-0.03499934449791908,
0.14453265070915222,
0.11721986532211304,
-0.20898742973804474,
0.013068122789263725,
-0.14188195765018463,
0.16097863018512726,
0.08810295909643173,
-0.08406317979097366,
-0.03508203849196434,
0.028364764526486397,
-0.018733980134129524,
0.06603850424289703,
0.08436045795679092,
0.3374950587749481,
0.2921517789363861,
0.04334927350282669,
-0.13080227375030518,
-0.017259906977415085,
-0.101291723549366,
0.059344083070755005,
-0.08508352190256119,
-0.12578846514225006,
-0.023675616830587387,
-0.08155408501625061,
0.09586430341005325,
-0.02108154632151127,
-0.06895371526479721,
-0.18694181740283966,
7.662234928869494e-35,
0.0449092835187912,
0.018968278542160988,
-0.0054106442257761955,
-0.10172868520021439,
-0.14998449385166168,
-0.20601215958595276,
0.068723164498806,
0.1244177371263504,
-0.21617691218852997,
-0.23304583132266998,
-0.17976698279380798
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | > For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Yes exactly :)
> Where can I print the actual training data for each GPU?
You should call print in the data_collator | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 49 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
> For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Yes exactly :)
> Where can I print the actual training data for each GPU?
You should call print in the data_collator | [
0.056691985577344894,
-0.04524286463856697,
-0.06328354775905609,
-0.03431014344096184,
0.10766536742448807,
0.10742980241775513,
0.18964087963104248,
-0.03779835253953934,
-0.02999907173216343,
0.20115754008293152,
-0.10148883610963821,
-0.039471585303545,
0.03844284266233444,
-0.06397035717964172,
-0.08233770728111267,
-0.23871572315692902,
-0.006644508335739374,
-0.023770052939653397,
-0.08966454118490219,
-0.07924400269985199,
-0.18186335265636444,
0.13894422352313995,
0.12256801873445511,
-0.07809728384017944,
0.1073618233203888,
-0.12346943467855453,
-0.067328080534935,
-0.0467492900788784,
0.005537969991564751,
0.030475199222564697,
-0.00442098593339324,
0.07440678775310516,
-0.11743319034576416,
0.015564975328743458,
0.00000464537197331083,
0.2138291448354721,
0.07580219954252243,
0.007008996792137623,
-0.027920709922909737,
0.08605789393186569,
0.0960722491145134,
0.0007587804575450718,
0.04115251824259758,
-0.005972136743366718,
-0.14554795622825623,
-0.15506289899349213,
-0.1761043518781662,
-0.06547689437866211,
0.10735921561717987,
-0.10818086564540863,
-0.011134009808301926,
0.1864888221025467,
-0.200400710105896,
-0.18784265220165253,
0.025371409952640533,
-0.06691760569810867,
0.07523027062416077,
-0.00023143035650718957,
-0.009468067437410355,
0.03919946402311325,
-0.03343413025140762,
0.07504291087388992,
0.08919327706098557,
0.05086825042963028,
-0.027726298198103905,
0.0866241455078125,
-0.12685322761535645,
-0.14993536472320557,
0.03524502366781235,
-0.02646726928651333,
-0.12512551248073578,
-0.10473749786615372,
-0.0006427268381230533,
0.12544506788253784,
-0.07241559028625488,
-0.1317492574453354,
-0.13615675270557404,
0.12485091388225555,
-0.14425115287303925,
0.09129556268453598,
-0.07826972752809525,
0.05671527236700058,
-0.00711358105763793,
-0.06069650873541832,
-0.17733356356620789,
0.05407978966832161,
-0.13454140722751617,
0.1510748714208603,
0.002936925273388624,
0.0869474709033966,
-0.010735348798334599,
-0.04851418361067772,
-0.07249342650175095,
-0.11464373767375946,
-0.21461914479732513,
0.019943805411458015,
-0.10858382284641266,
-0.21070949733257294,
-0.0012749478919431567,
0.11015695333480835,
0.21265408396720886,
-0.0652412623167038,
0.11969618499279022,
0.0040365708991885185,
0.1281162053346634,
-0.25151821970939636,
0.057527896016836166,
-0.0300355963408947,
-0.13234232366085052,
-0.024394238367676735,
0.13437965512275696,
-0.0209544338285923,
0.13782744109630585,
0.10007046908140182,
-0.05982953682541847,
-0.08708570152521133,
0.10602924227714539,
0.11051624268293381,
-0.19994382560253143,
0.018774664029479027,
0.10768037289381027,
-0.08289790153503418,
0.02061396837234497,
-0.0010583484545350075,
0.18802964687347412,
-0.14384110271930695,
-0.2850458025932312,
0.12843018770217896,
-0.0802110806107521,
-0.08689781278371811,
-0.12348025292158127,
0.016283538192510605,
-0.00446399487555027,
0.09178395569324493,
0.034626856446266174,
-0.07828659564256668,
0.11921174824237823,
-0.16855470836162567,
-0.0191100612282753,
-0.025379979982972145,
0.13499051332473755,
0.0019401544705033302,
0.14657911658287048,
0.016852734610438347,
0.18368852138519287,
0.09225969761610031,
0.07490219920873642,
0.08914017677307129,
-0.04026982933282852,
0.03802888095378876,
-0.062079042196273804,
0.23217448592185974,
-0.11127366870641708,
0.11941614747047424,
-0.06897471100091934,
0.16278354823589325,
0.022534288465976715,
-0.06962444633245468,
-0.12974196672439575,
0.04575434699654579,
0.055545493960380554,
-0.04691089689731598,
-0.13397304713726044,
-0.14222954213619232,
0.10271697491407394,
-0.01098967157304287,
0.03960956260561943,
-0.047036945819854736,
0.0924113467335701,
-0.16229310631752014,
0.08429920673370361,
-0.08112035691738129,
-0.0845191702246666,
-0.0966697633266449,
-0.13963837921619415,
0.30748698115348816,
-0.13723453879356384,
0.1279619336128235,
-0.10365240275859833,
0.001050737570039928,
0.08023377507925034,
0.06867150217294693,
0.10600749403238297,
-0.30932921171188354,
0.11860330402851105,
-0.24529966711997986,
0.037404488772153854,
0.02261018194258213,
-0.1114446297287941,
0.0618816614151001,
0.012793187983334064,
-0.015305892564356327,
-0.05692058801651001,
0.029477940872311592,
-0.06781671196222305,
0.06501609086990356,
-0.010964476503431797,
-0.22049877047538757,
0.23342429101467133,
-0.1955794394016266,
-0.12212289869785309,
0.22087930142879486,
0.21493566036224365,
0.027131566777825356,
-0.033693067729473114,
-0.061253324151039124,
-0.1579068899154663,
0.17846016585826874,
0.14479520916938782,
-0.2642159163951874,
-0.17217987775802612,
-0.04657001793384552,
0.06470270454883575,
-0.018625671043992043,
-0.079249806702137,
0.07166218012571335,
-0.10364211350679398,
0.032074060291051865,
0.08169065415859222,
0.05327406898140907,
-0.1817917823791504,
0.03068900853395462,
-0.15382353961467743,
0.024097304791212082,
0.01729721762239933,
0.030150877311825752,
-0.05140324681997299,
-0.03746086359024048,
0.13631683588027954,
-0.016913743689656258,
0.01721322163939476,
-0.10572583228349686,
0.28745236992836,
0.058005981147289276,
0.0760437473654747,
0.02767571434378624,
0.01188042014837265,
-0.16398504376411438,
0.05771799013018608,
-0.022173549979925156,
-0.08636020869016647,
-0.1343684047460556,
-0.23314982652664185,
-0.07896655052900314,
-0.0584183931350708,
0.09413313120603561,
-0.13041825592517853,
0.14488743245601654,
0.03127826005220413,
0.012126819230616093,
0.1034211739897728,
0.06329061090946198,
-0.10825555771589279,
-0.07120388001203537,
-0.1563301831483841,
-0.035629283636808395,
0.09845338016748428,
0.06867476552724838,
0.16711604595184326,
0.22615163028240204,
0.2025832235813141,
0.04252351447939873,
-0.16763576865196228,
-0.004951788578182459,
-0.04022025316953659,
0.01327099185436964,
0.146900936961174,
-0.011412479914724827,
-0.04669187590479851,
0.026599658653140068,
0.24175408482551575,
0.07535847276449203,
0.00883909035474062,
-0.057021018117666245,
-0.10793022066354752,
-0.00041850554407574236,
0.004826806485652924,
0.08374889194965363,
-0.025943821296095848,
-0.1624760925769806,
-0.045352958142757416,
0.14317815005779266,
0.17045475542545319,
-0.2061547338962555,
0.02658125013113022,
0.15896672010421753,
-0.01470503956079483,
-0.10004162788391113,
-0.13912834227085114,
-0.010258892551064491,
0.019979320466518402,
0.0037596605252474546,
-0.03036639653146267,
-0.03454207256436348,
0.23210282623767853,
0.025020752102136612,
0.061780210584402084,
0.00957447662949562,
0.0049712094478309155,
0.12838470935821533,
-0.08250115811824799,
-0.06610386073589325,
-0.0548483245074749,
-0.01507607102394104,
-0.01825232245028019,
0.11456523090600967,
-0.04718494787812233,
0.052838440984487534,
-0.1549231857061386,
-0.008694478310644627,
-0.058571163564920425,
-0.033575594425201416,
-0.12056810408830643,
0.11107639223337173,
-0.03225839510560036,
-0.22489911317825317,
-0.09451193362474442,
-0.07018251717090607,
0.01013050228357315,
0.04385022073984146,
0.053919464349746704,
0.053008127957582474,
-0.09394417703151703,
-0.14375349879264832,
0.11997364461421967,
-0.16556967794895172,
-0.017285963520407677,
-0.07216402888298035,
0.12133247405290604,
-0.07149554044008255,
-0.060273557901382446,
-0.06591744720935822,
0.00718560628592968,
0.033029988408088684,
0.14043313264846802,
-0.06151002645492554,
-0.052556730806827545,
-0.08119956403970718,
0.1673189103603363,
0.038440171629190445,
0.03740374743938446,
-0.11801429837942123,
-0.01202083844691515,
0.006341247819364071,
0.12902478873729706,
-0.09918242692947388,
-0.018047532066702843,
-0.008114872500300407,
-0.03956122696399689,
0.03376040607690811,
-0.05445851385593414,
0.09126395732164383,
-0.13120631873607635,
-0.06878912448883057,
0.0004237033426761627,
-0.07035607844591141,
-0.0018482893938198686,
-0.02483496256172657,
-0.1804855465888977,
0.24693860113620758,
-0.07180006802082062,
0.17442913353443146,
0.2443515509366989,
0.11824929714202881,
-0.05662986636161804,
0.029476221650838852,
0.26770684123039246,
-0.03503832221031189,
0.02924368716776371,
-0.28654807806015015,
0.02302558906376362,
-0.021613752469420433,
0.06422288715839386,
-0.08867538720369339,
-0.05777975544333458,
-0.08919855952262878,
0.03218447417020798,
0.03154176101088524,
0.17406456172466278,
-0.09997068345546722,
0.10763110965490341,
-0.05243019014596939,
0.0202541071921587,
0.13728129863739014,
0.2260179966688156,
0.22565770149230957,
0.052628010511398315,
0.06896942108869553,
-0.07950261980295181,
0.2779514789581299,
0.00817111972719431,
-0.14585314691066742,
-0.11922986805438995,
-0.23221172392368317,
-0.10909311473369598,
0.06340610980987549,
0.1939137876033783,
0.0752241387963295,
-0.06806061416864395,
0.2694145143032074,
0.23536919057369232,
0.2027921825647354,
-0.1545281559228897,
0.0634147971868515,
0.03589698672294617,
-0.0073075504042208195,
0.029871949926018715,
-0.03364710509777069,
0.06412284821271896,
0.06771114468574524,
0.09237657487392426,
0.04590025544166565,
-0.0015190932899713516,
-0.14069294929504395,
0.11208135634660721,
-0.17791210114955902,
-0.1675344556570053,
-0.034821491688489914,
0.1309504359960556,
-0.06251359730958939,
-0.03183186799287796,
0.004328140523284674,
0.09450187534093857,
0.08802991360425949,
0.006143820006400347,
-0.11443891376256943,
-0.051599811762571335,
0.08573494106531143,
0.053686559200286865,
0.10486007481813431,
0.008190394379198551,
0.016227299347519875,
0.17639359831809998,
0.06516793370246887,
0.23598162829875946,
0.03351842239499092,
0.11214228719472885,
0.04454316571354866,
0.03401302918791771,
0.08481048792600632,
-0.37235572934150696,
0.11532887816429138,
0.4038485884666443,
-0.13207074999809265,
0.015433228574693203,
-0.14470233023166656,
-0.03638993203639984,
-0.03836469724774361,
0.13326627016067505,
0.0009641293436288834,
-0.1404423862695694,
0.023214010521769524,
-0.048503462225198746,
-0.15846118330955505,
0.14797848463058472,
-0.09592962265014648,
0.04207782447338104,
-0.08623863756656647,
0.026073450222611427,
0.1400652527809143,
0.023911837488412857,
-0.029293514788150787,
0.20021702349185944,
0.04301314428448677,
-0.1511443704366684,
0.16008879244327545,
0.10977653414011002,
-0.036378346383571625,
-0.07160782068967819,
0.02782841958105564,
-0.153474822640419,
0.07607673853635788,
-0.02165253646671772,
0.10588919371366501,
0.17695535719394684,
0.11193929612636566,
0.016233541071414948,
0.02102864906191826,
0.014130992814898491,
-0.014204692095518112,
0.20574580132961273,
0.07126642763614655,
0.004002824891358614,
0.08792373538017273,
-0.03806045651435852,
0.11800207942724228,
0.06155433505773544,
0.09148873388767242,
-0.24853284657001495,
0.06363588571548462,
0.10221447795629501,
-0.12408355623483658,
-0.12143497914075851,
0.0255323126912117,
0.0371895395219326,
-0.04976701736450195,
-0.1387651115655899,
0.11072365939617157,
0.13736113905906677,
0.1538824588060379,
-0.10567794740200043,
-0.15448985993862152,
-0.13511289656162262,
0.048561643809080124,
-0.06782758235931396,
-0.09082216769456863,
0.010400357656180859,
-0.007640156429260969,
0.10703667998313904,
-0.02047513797879219,
-0.056605808436870575,
0.16848936676979065,
-0.03989963233470917,
-0.18470174074172974,
0.05784452334046364,
-0.06552676111459732,
-0.3117063641548157,
0.05014827474951744,
0.10093490034341812,
-0.038941264152526855,
0.08282005786895752,
0.05035417154431343,
-0.047399260103702545,
-0.18389837443828583,
0.10870257765054703,
0.10362683981657028,
0.03635772317647934,
0.03444637358188629,
0.13173790276050568,
0.11103557795286179,
-0.008166876621544361,
-0.10707051306962967,
0.0742514505982399,
-0.04007275030016899,
-0.0020431005395948887,
-0.0964265838265419,
0.10976184159517288,
-0.05509955435991287,
-0.02587571181356907,
-0.07395119965076447,
0.09145919978618622,
-0.1280294507741928,
-0.04598485678434372,
-0.10763297230005264,
-0.06601622700691223,
0.0019132811576128006,
-0.10859106481075287,
-0.026733728125691414,
-0.04207445681095123,
0.03107663244009018,
0.093923419713974,
0.16849830746650696,
-0.002428264357149601,
-0.11372216045856476,
0.0819089338183403,
-2.5534261673978476e-32,
0.004937272053211927,
0.04068881645798683,
0.058050163090229034,
-0.03853534162044525,
0.008841419592499733,
0.034476131200790405,
0.0017996752867475152,
-0.09536733478307724,
0.023389775305986404,
-0.022216202691197395,
-0.2062593549489975,
0.18433460593223572,
0.12273965775966644,
-0.07747600972652435,
-0.03714785724878311,
-0.06694027781486511,
0.18303240835666656,
-0.007547974120825529,
-0.11025030165910721,
0.21058373153209686,
-0.048086054623126984,
0.19937069714069366,
0.11034193634986877,
-0.04842912033200264,
-0.016522616147994995,
-0.027644744142889977,
-0.0018773394403979182,
-0.09722689539194107,
-0.10448670387268066,
-0.2043571025133133,
-0.18057723343372345,
0.09316759556531906,
-0.08786838501691818,
-0.08445096015930176,
-0.15146110951900482,
-0.03818211331963539,
-0.2814924716949463,
-0.2098766565322876,
0.06867481768131256,
0.12247861921787262,
-0.17060443758964539,
0.1258627474308014,
-0.011395551264286041,
-0.054581236094236374,
0.13122741878032684,
-0.026043793186545372,
-0.038977231830358505,
0.19472993910312653,
-0.17269934713840485,
0.1136772409081459,
0.11630048602819443,
0.16226983070373535,
0.24588477611541748,
0.2419106364250183,
0.1773565709590912,
-0.09619063884019852,
0.15566690266132355,
0.15478584170341492,
-0.3211994767189026,
0.12120570242404938,
0.060325123369693756,
-0.10607335716485977,
0.10341344773769379,
-0.01927705854177475,
0.27997708320617676,
0.0370965451002121,
0.19826659560203552,
0.08572626113891602,
0.1311662793159485,
-0.08206428587436676,
-0.05831710249185562,
-0.17279504239559174,
-0.25946104526519775,
-0.14396603405475616,
-0.13132324814796448,
-0.0022062892094254494,
-0.05198722705245018,
-0.16330742835998535,
-0.06249259039759636,
-0.08627934753894806,
0.02589293383061886,
-0.15597325563430786,
0.04847866669297218,
-0.1200486421585083,
-0.0743536427617073,
-0.2650391161441803,
0.06744079291820526,
0.06704059988260269,
0.05703289806842804,
-0.0016601969255134463,
-0.26256677508354187,
0.2242322713136673,
-0.1517997533082962,
-0.02408030442893505,
-0.09932652860879898,
0.1195664331316948,
-0.018786795437335968,
0.13437193632125854,
0.004905217327177525,
-0.05319349467754364,
-0.12131977826356888,
-0.014024381525814533,
-0.013201873749494553,
-0.028309252113103867,
0.050211407244205475,
-0.005386728793382645,
0.14616768062114716,
0.112906314432621,
-0.028167378157377243,
-0.015422076918184757,
0.018652725964784622,
0.07034411281347275,
-0.005232921801507473,
0.21411053836345673,
0.18058651685714722,
-0.1420978307723999,
0.14656300842761993,
-0.10042374581098557,
0.25409698486328125,
0.25208085775375366,
-0.019397974014282227,
-0.07442193478345871,
-0.20558498799800873,
-0.02610263228416443,
0.17657677829265594,
0.047623008489608765,
-0.13031360507011414,
-0.04034983366727829,
0.054983772337436676,
-0.1405603289604187,
0.11526324599981308,
0.1403937041759491,
6.56156203149294e-7,
-0.00044716233969666064,
0.0515299029648304,
-0.017454100772738457,
-0.10139723122119904,
-0.08748207241296768,
-0.013595839962363243,
0.11618629097938538,
0.04800570756196976,
0.011951897293329239,
0.2053435891866684,
0.20106399059295654,
-0.09524121880531311,
-0.09198027104139328,
-0.029788967221975327,
0.024349279701709747,
-0.07655061781406403,
-0.14529480040073395,
0.12405961006879807,
-0.18102791905403137,
-0.07440648227930069,
-0.11731790751218796,
0.17061524093151093,
-0.030815593898296356,
-0.09922519326210022,
0.06766165792942047,
0.08845587819814682,
-0.21888495981693268,
-0.014363492839038372,
0.16227763891220093,
0.061365265399217606,
0.09891872107982635,
-0.11195641756057739,
0.02395649626851082,
0.08251938968896866,
0.11901738494634628,
0.15231315791606903,
-0.046105433255434036,
0.006520624738186598,
-0.030470555648207664,
0.14499980211257935,
0.1283302903175354,
-0.1964072585105896,
0.0335349477827549,
-0.1439942866563797,
0.14721213281154633,
0.08369263261556625,
-0.1039072722196579,
-0.023743929341435432,
0.03511817380785942,
0.0026889671571552753,
0.07744739949703217,
0.08801952004432678,
0.3403733968734741,
0.29051709175109863,
0.04602322727441788,
-0.11525797098875046,
-0.02330264449119568,
-0.11129212379455566,
0.04890420287847519,
-0.05897536873817444,
-0.1456163227558136,
-0.022285467013716698,
-0.06321331858634949,
0.08861476182937622,
-0.022155022248625755,
-0.07106360793113708,
-0.15732009708881378,
5.858678193794556e-35,
0.05200130492448807,
0.028069663792848587,
-0.01375481765717268,
-0.08705023676156998,
-0.15225940942764282,
-0.22253337502479553,
0.03214333578944206,
0.11792491376399994,
-0.1496870368719101,
-0.2629067301750183,
-0.15602754056453705
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | I print out n_shards, and under multiple GPUs, this value is always 1.
Is this value correct? | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 17 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
I print out n_shards, and under multiple GPUs, this value is always 1.
Is this value correct? | [
0.016827650368213654,
-0.08712450414896011,
-0.11889507621526718,
-0.030190642923116684,
0.067616306245327,
0.04407215118408203,
0.21182765066623688,
-0.06790585070848465,
-0.013104071840643883,
0.21274729073047638,
0.01318631786853075,
-0.05862361565232277,
0.015488937497138977,
-0.04909924045205116,
-0.08547793328762054,
-0.22004209458827972,
0.0337638184428215,
-0.03336604684591293,
-0.08448851853609085,
-0.05896975100040436,
-0.16251565515995026,
0.1609121561050415,
0.10163624584674835,
-0.08000466227531433,
0.09417471289634705,
-0.08008179068565369,
-0.0691915825009346,
-0.02511608600616455,
0.036596376448869705,
-0.00002423128353257198,
0.008774129673838615,
0.07573185116052628,
-0.2166949212551117,
0.023932429030537605,
0.000004678427558246767,
0.17667801678180695,
0.08492780476808548,
-0.01373310200870037,
-0.0026785596273839474,
0.12330912798643112,
0.04692453891038895,
0.009854773059487343,
0.0319669246673584,
0.02385631576180458,
-0.13556617498397827,
-0.07399505376815796,
-0.18127219378948212,
-0.07850665599107742,
0.07754821330308914,
-0.1449522078037262,
-0.045315906405448914,
0.2163119912147522,
-0.11474393308162689,
-0.17554977536201477,
0.04406954348087311,
-0.007899794727563858,
0.04912034049630165,
-0.017310889437794685,
-0.07925227284431458,
0.06557505577802658,
-0.029953865334391594,
0.08704033493995667,
0.09078802168369293,
0.08367496728897095,
0.005438325461000204,
0.09248929470777512,
-0.159345343708992,
-0.17628619074821472,
0.04831858351826668,
0.003310561180114746,
-0.1500691920518875,
-0.01753894053399563,
-0.03329699859023094,
0.06383273005485535,
-0.06283421814441681,
-0.06468945741653442,
-0.10116491466760635,
0.10051277279853821,
-0.1621365249156952,
0.08177437633275986,
-0.07223359495401382,
0.04283192381262779,
0.021591736003756523,
-0.08393551409244537,
-0.13041497766971588,
0.054132767021656036,
-0.10819533467292786,
0.18935562670230865,
-0.031015507876873016,
0.04425925016403198,
-0.08556920289993286,
-0.04722350835800171,
-0.12353482097387314,
-0.16338525712490082,
-0.16416431963443756,
0.039336446672677994,
-0.07370536029338837,
-0.16063204407691956,
0.023451557382941246,
0.08421500027179718,
0.18820351362228394,
-0.061418741941452026,
0.09008384495973587,
0.019495248794555664,
0.15425844490528107,
-0.2915131747722626,
0.12467599660158157,
-0.028461946174502373,
-0.09291096776723862,
-0.07441685348749161,
0.17215611040592194,
0.002745398785918951,
0.14890970289707184,
0.0337391197681427,
-0.08438502997159958,
-0.05628793314099312,
0.13238291442394257,
0.08243940770626068,
-0.17130371928215027,
0.024357983842492104,
0.12200014293193817,
-0.10554458200931549,
0.00765063613653183,
-0.005669731181114912,
0.1943923979997635,
-0.10141654312610626,
-0.28487250208854675,
0.11555032432079315,
-0.07112200558185577,
-0.11091479659080505,
-0.12785689532756805,
-0.0480218380689621,
-0.011736574582755566,
0.07173272222280502,
0.09642260521650314,
-0.1198515072464943,
0.07939793169498444,
-0.1709446758031845,
0.019121555611491203,
-0.07575353235006332,
0.1327892541885376,
-0.00834983866661787,
0.16944466531276703,
-0.008310663513839245,
0.16749858856201172,
0.0951259508728981,
0.023025471717119217,
0.08540799468755722,
-0.016674380749464035,
0.0876069962978363,
-0.1284605711698532,
0.23480597138404846,
-0.0683143362402916,
0.12488701194524765,
-0.14247503876686096,
0.15916703641414642,
0.022619618102908134,
0.008607662282884121,
-0.12349027395248413,
0.04114106297492981,
0.0761486291885376,
-0.02749767154455185,
-0.1594567447900772,
-0.14158806204795837,
0.046795643866062164,
0.040170539170503616,
0.05828026309609413,
-0.08270997554063797,
0.054373640567064285,
-0.19520503282546997,
0.06091033294796944,
-0.08481946587562561,
-0.08213066309690475,
-0.19723455607891083,
-0.15559475123882294,
0.4038306474685669,
-0.14667855203151703,
0.14661526679992676,
-0.16378043591976166,
0.07881071418523788,
0.07792536914348602,
0.031871285289525986,
0.08027290552854538,
-0.2878580391407013,
0.13895557820796967,
-0.29666510224342346,
0.030381513759493828,
0.002111035631969571,
-0.14024288952350616,
0.10971219092607498,
-0.03526993840932846,
0.0015248965937644243,
-0.08496855199337006,
-0.011312917806208134,
-0.05596183240413666,
0.019877638667821884,
-0.004001496825367212,
-0.19885706901550293,
0.24236607551574707,
-0.1627875715494156,
-0.1439555585384369,
0.23752035200595856,
0.19155094027519226,
-0.007200717460364103,
0.04913709685206413,
-0.10624891519546509,
-0.17261995375156403,
0.22007903456687927,
0.09420637786388397,
-0.25910717248916626,
-0.11153215169906616,
-0.038571953773498535,
0.11669696867465973,
-0.005182916298508644,
-0.0787203311920166,
0.13817204535007477,
-0.09422559291124344,
0.061211321502923965,
0.08317478001117706,
0.055875204503536224,
-0.21161487698554993,
0.01693880185484886,
-0.10467614233493805,
0.029614580795168877,
-0.005541130900382996,
0.025258248671889305,
-0.018772749230265617,
-0.039846278727054596,
0.10439584404230118,
-0.03859184682369232,
-0.0008182920282706618,
-0.17146022617816925,
0.22693461179733276,
0.0777241662144661,
0.07277511805295944,
0.03431565314531326,
0.006146226543933153,
-0.18787170946598053,
0.09189844876527786,
0.01200047880411148,
-0.11009924113750458,
-0.06424595415592194,
-0.21464039385318756,
-0.04584677144885063,
-0.03856693580746651,
0.09231873601675034,
-0.13098719716072083,
0.11809829622507095,
-0.006792852655053139,
0.0035170128103345633,
0.17305026948451996,
0.09875436127185822,
-0.1781521588563919,
-0.08833132684230804,
-0.12118325382471085,
-0.0635448768734932,
0.08265500515699387,
0.09226362407207489,
0.222397118806839,
0.204046830534935,
0.18631909787654877,
0.05278899520635605,
-0.11755871027708054,
-0.001041223993524909,
-0.03732963278889656,
0.009295981377363205,
0.1286124885082245,
0.018256900832057,
0.019522443413734436,
0.00020203932945150882,
0.18307413160800934,
0.017747212201356888,
-0.017819589003920555,
-0.04859565198421478,
-0.06462452560663223,
-0.04130852594971657,
-0.02447124756872654,
0.07981632649898529,
-0.014840311370790005,
-0.1825646013021469,
-0.10663903504610062,
0.14879561960697174,
0.2055683583021164,
-0.23193269968032837,
0.0534612238407135,
0.12242812663316727,
-0.0007297551492229104,
-0.07717965543270111,
-0.0841246172785759,
0.00967759545892477,
-0.018901215866208076,
-0.0410386361181736,
-0.049843307584524155,
-0.03423548489809036,
0.19655461609363556,
-0.003052676795050502,
0.06848794966936111,
0.027802977710962296,
-0.006054865196347237,
0.11320341378450394,
-0.09191776812076569,
0.0050868382677435875,
0.0005340788629837334,
-0.017998570576310158,
0.02186071313917637,
0.075167216360569,
-0.02113896794617176,
0.047705426812171936,
-0.21372298896312714,
-0.05793042108416557,
-0.0646514967083931,
-0.05545414239168167,
-0.08188072592020035,
0.10560712963342667,
-0.042405955493450165,
-0.2462768852710724,
-0.08936534821987152,
-0.031221287325024605,
0.006544878240674734,
0.07400646805763245,
0.05191108584403992,
0.09201813489198685,
-0.124873585999012,
-0.11318261176347733,
0.06085360422730446,
-0.10537780821323395,
0.02888532169163227,
-0.03756515681743622,
0.09703957289457321,
-0.08378397673368454,
-0.035136546939611435,
-0.008906273171305656,
-0.016082005575299263,
0.025136340409517288,
0.1349729746580124,
-0.07132038474082947,
-0.09795509278774261,
-0.07608287781476974,
0.13666817545890808,
-0.018775155767798424,
0.010235809721052647,
-0.10551027208566666,
-0.008258814923465252,
-0.0018846879247575998,
0.20382793247699738,
-0.004316683392971754,
-0.01843569427728653,
-0.04467755928635597,
-0.06969760358333588,
0.04287987947463989,
-0.0667952224612236,
0.10357686877250671,
-0.12744662165641785,
-0.08670855313539505,
-0.024116571992635727,
-0.04240679368376732,
0.02384706400334835,
0.0021805402357131243,
-0.18712061643600464,
0.2347635179758072,
-0.05900528281927109,
0.12167085707187653,
0.2568116784095764,
0.0810682401061058,
-0.024171939119696617,
0.05593691021203995,
0.21553440392017365,
-0.014980053529143333,
0.028340382501482964,
-0.25653013586997986,
0.03441212698817253,
-0.0017962000565603375,
0.012041770853102207,
-0.07741215080022812,
-0.01904170773923397,
-0.11782915890216827,
0.01644286885857582,
-0.03416285663843155,
0.15516935288906097,
-0.11815012246370316,
0.061998672783374786,
-0.021260278299450874,
0.016563737764954567,
0.11260025948286057,
0.21698299050331116,
0.21892929077148438,
0.0036748868878930807,
0.0586489699780941,
-0.01968366466462612,
0.301053524017334,
-0.03460894897580147,
-0.16892187297344208,
-0.055456340312957764,
-0.2754587233066559,
-0.04612450674176216,
0.06457427889108658,
0.15900978446006775,
0.028616389259696007,
-0.03747084364295006,
0.23554754257202148,
0.19394588470458984,
0.18040037155151367,
-0.11945130676031113,
0.19938011467456818,
0.049328699707984924,
0.033190689980983734,
0.006429498549550772,
-0.014005959965288639,
0.046290189027786255,
0.08748495578765869,
0.08202952146530151,
-0.0032134857028722763,
-0.005120719317346811,
-0.10929292440414429,
0.1624571979045868,
-0.1613818258047104,
-0.15805476903915405,
-0.03218827769160271,
0.08095201849937439,
-0.04632963985204697,
-0.013647562824189663,
-0.02251426689326763,
0.12919549643993378,
0.09484316408634186,
0.0622001476585865,
-0.11090052872896194,
-0.1339535117149353,
0.038392435759305954,
0.05810016021132469,
0.0565897561609745,
0.008958039805293083,
-0.04099711775779724,
0.18072761595249176,
0.04729539528489113,
0.1506931334733963,
0.006631082855165005,
0.07423007488250732,
0.04339052736759186,
0.024300813674926758,
0.06944501399993896,
-0.4037143588066101,
0.05234450474381447,
0.4629534184932709,
-0.1817956417798996,
0.01971304602921009,
-0.1393464356660843,
0.008268659003078938,
-0.06033174693584442,
0.09102144092321396,
0.030789103358983994,
-0.09767019748687744,
0.049291353672742844,
0.0006592987338081002,
-0.14243170619010925,
0.18795925378799438,
-0.12662523984909058,
0.05475465953350067,
-0.032011404633522034,
0.03771492838859558,
0.1588345319032669,
-0.05944351479411125,
-0.013139217160642147,
0.1388721764087677,
-0.023311909288167953,
-0.15466468036174774,
0.19416747987270355,
0.09384693205356598,
0.03620496019721031,
-0.09463494271039963,
0.03927449882030487,
-0.13633354008197784,
0.0902060866355896,
0.03280617296695709,
0.13127878308296204,
0.1806623935699463,
0.15633679926395416,
0.01678878627717495,
0.048226017504930496,
-0.051978711038827896,
-0.0869385227560997,
0.24165061116218567,
0.03324103355407715,
-0.014059617184102535,
0.15350432693958282,
-0.009317124262452126,
0.13712067902088165,
0.050972290337085724,
0.13554638624191284,
-0.20742641389369965,
0.11855864524841309,
0.052941545844078064,
-0.16220621764659882,
-0.19511553645133972,
0.1359003186225891,
0.044089701026678085,
-0.022902199998497963,
-0.15508896112442017,
0.0511644072830677,
0.055157486349344254,
0.16541174054145813,
-0.10451781004667282,
-0.16497603058815002,
-0.11359092593193054,
0.00027004018193110824,
-0.11697350442409515,
-0.09003232419490814,
0.06364879012107849,
-0.02357831783592701,
0.05761455371975899,
-0.01963517628610134,
-0.13849209249019623,
0.15604521334171295,
-0.08204249292612076,
-0.18717928230762482,
0.09672284126281738,
-0.11590500921010971,
-0.27400004863739014,
0.02496650256216526,
0.1369304060935974,
-0.07621240615844727,
0.08228842914104462,
0.031177548691630363,
-0.05023052543401718,
-0.2117156982421875,
0.08102334290742874,
0.11086802184581757,
0.06015042960643768,
0.07001451402902603,
0.0902068167924881,
0.10240169614553452,
-0.012648246251046658,
-0.0930880606174469,
-0.015260418877005577,
-0.014800278469920158,
0.010775456205010414,
-0.12871778011322021,
0.10289174318313599,
-0.04789470136165619,
-0.014197775162756443,
-0.06408066302537918,
0.1202014908194542,
-0.15741582214832306,
-0.0341908298432827,
-0.10317254811525345,
0.034892771393060684,
0.00751859974116087,
-0.11546503752470016,
0.012610347010195255,
-0.03332507237792015,
0.0035284077748656273,
0.11064733564853668,
0.13157837092876434,
-0.05558750405907631,
-0.07805636525154114,
0.05366132780909538,
-2.5327571563537516e-32,
0.07551681250333786,
0.11549526453018188,
0.08847297728061676,
-0.00003810537600656971,
-0.020120471715927124,
0.00011667807848425582,
-0.047044411301612854,
-0.10716820508241653,
0.05395279452204704,
-0.03578649088740349,
-0.24033227562904358,
0.19065463542938232,
0.12497548013925552,
-0.08215894550085068,
0.007612741086632013,
-0.05192498490214348,
0.14118970930576324,
-0.04790289327502251,
-0.09670738130807877,
0.2061941772699356,
-0.03677450120449066,
0.10996350646018982,
0.05296294763684273,
0.08373604714870453,
-0.059587281197309494,
-0.022624902427196503,
0.031183920800685883,
-0.07049211859703064,
-0.09732931107282639,
-0.23772980272769928,
-0.12139523774385452,
0.07659097760915756,
-0.05047471448779106,
-0.06273434311151505,
-0.1394605189561844,
-0.052419498562812805,
-0.18344596028327942,
-0.2436603158712387,
0.04757804796099663,
0.10603713244199753,
-0.17334266006946564,
0.1534753143787384,
-0.016028650104999542,
-0.046198658645153046,
0.10442600399255753,
-0.03269097954034805,
-0.0038139265961945057,
0.16194380819797516,
-0.1957356482744217,
0.005981029011309147,
0.13652417063713074,
0.17241771519184113,
0.2345150113105774,
0.22417844831943512,
0.13547584414482117,
-0.03995451703667641,
0.18617744743824005,
0.1296090930700302,
-0.27641168236732483,
0.11314604431390762,
0.0804968848824501,
-0.1065879613161087,
0.06396539509296417,
0.0017628900241106749,
0.2307032346725464,
0.06988141685724258,
0.22658002376556396,
0.048954352736473083,
0.15267632901668549,
-0.04997231066226959,
-0.01561909168958664,
-0.09936846047639847,
-0.22192153334617615,
-0.11558271199464798,
-0.12280622124671936,
-0.026441173627972603,
-0.09445859491825104,
-0.08048465102910995,
-0.09588395804166794,
-0.053182002156972885,
0.06956958770751953,
-0.15468339622020721,
0.026929564774036407,
-0.09959141910076141,
-0.0766838937997818,
-0.2594268321990967,
0.05645633488893509,
0.10077668726444244,
0.06497436761856079,
-0.021292533725500107,
-0.20320247113704681,
0.2683756351470947,
-0.12010269612073898,
-0.011695431545376778,
-0.06369657814502716,
0.17524470388889313,
-0.07395102083683014,
0.17751511931419373,
-0.030695350840687752,
-0.031031422317028046,
-0.16396647691726685,
-0.003420062828809023,
0.011280721984803677,
-0.05528678745031357,
0.08028090745210648,
-0.01714022271335125,
0.12450240552425385,
0.1265871673822403,
-0.06473388522863388,
-0.0020944280549883842,
0.026851743459701538,
0.08308826386928558,
-0.0043542226776480675,
0.19478799402713776,
0.1567610204219818,
-0.16625089943408966,
0.18530449271202087,
-0.10767606645822525,
0.20893359184265137,
0.2457098662853241,
-0.0859890952706337,
-0.0448882058262825,
-0.21003301441669464,
-0.04057147726416588,
0.1502004861831665,
0.042281899601221085,
-0.09420662373304367,
-0.11358028650283813,
0.028200536966323853,
-0.16584423184394836,
0.125749409198761,
0.13168206810951233,
6.704063366669288e-7,
-0.03649364039301872,
0.08596204966306686,
-0.0958472192287445,
-0.09000548720359802,
-0.04068876802921295,
0.028994934633374214,
0.06229231134057045,
0.08080458641052246,
0.016209252178668976,
0.2621862590312958,
0.17852090299129486,
-0.042715899646282196,
-0.09667766839265823,
0.032864734530448914,
0.06448111683130264,
-0.0026476318016648293,
-0.1132986769080162,
0.1497131735086441,
-0.18216834962368011,
-0.07491324096918106,
-0.12279721349477768,
0.10981820523738861,
0.011892367154359818,
-0.11789246648550034,
0.08023233711719513,
0.060188230127096176,
-0.18365423381328583,
0.003819882869720459,
0.15013538300991058,
0.09320390969514847,
0.10889270156621933,
-0.09764344990253448,
0.06458857655525208,
0.08633363991975784,
0.12037961930036545,
0.1535169780254364,
-0.048352114856243134,
-0.0068728504702448845,
-0.07202133536338806,
0.09399344772100449,
0.08659946173429489,
-0.22354166209697723,
0.028074191883206367,
-0.13312238454818726,
0.16749922931194305,
0.12870876491069794,
-0.09633175283670425,
0.012657273560762405,
-0.007414098829030991,
0.010453226044774055,
0.08684392273426056,
0.1301775723695755,
0.24383406341075897,
0.28418025374412537,
0.040528811514377594,
-0.16349898278713226,
0.03459060937166214,
-0.10973047465085983,
0.08795199543237686,
-0.07551329582929611,
-0.1348126083612442,
-0.07540487498044968,
-0.046274326741695404,
0.11590564250946045,
-0.058180034160614014,
-0.06075519323348999,
-0.19595278799533844,
3.706534578290518e-35,
0.0835750475525856,
0.01596633717417717,
-0.021375175565481186,
-0.08686640113592148,
-0.16031406819820404,
-0.18939431011676788,
0.0028286664746701717,
0.1282498985528946,
-0.21446892619132996,
-0.22325298190116882,
-0.19392849504947662
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | Yes it's correct, and it explains why you always have the same data passed to your map function (the data can't be split).
But after being passed to `map`, each GPU keeps one example out of n(GPUs) so that you don't end up with duplicate data across GPUs | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 48 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
Yes it's correct, and it explains why you always have the same data passed to your map function (the data can't be split).
But after being passed to `map`, each GPU keeps one example out of n(GPUs) so that you don't end up with duplicate data across GPUs | [
0.05266057699918747,
-0.06393136084079742,
-0.11036045104265213,
-0.033722300082445145,
0.11545872688293457,
0.059638962149620056,
0.1734943687915802,
-0.050231803208589554,
0.02424415573477745,
0.22063519060611725,
-0.053793445229530334,
-0.055065564811229706,
0.04330402612686157,
-0.07589942216873169,
-0.10282823443412781,
-0.23769129812717438,
0.02372204326093197,
0.0022501188796013594,
-0.10667724907398224,
-0.06822652369737625,
-0.156056746840477,
0.1539245992898941,
0.09319912642240524,
-0.08920661360025406,
0.07679935544729233,
-0.1169743686914444,
-0.08745183050632477,
-0.051246996968984604,
0.011228879913687706,
0.04045659676194191,
0.008110432885587215,
0.061245109885931015,
-0.1818186342716217,
0.07659789174795151,
0.000004727742179966299,
0.20796072483062744,
0.10139883309602737,
-0.0373280793428421,
0.007115272339433432,
0.10165562480688095,
0.07884309440851212,
0.006680900696665049,
0.009350709617137909,
0.030476704239845276,
-0.1483178287744522,
-0.10354898124933243,
-0.1725025326013565,
-0.10714714229106903,
0.10099657624959946,
-0.14095495641231537,
-0.04060955345630646,
0.21298633515834808,
-0.16020752489566803,
-0.1496559977531433,
-0.005088688340038061,
-0.05378560349345207,
0.0696021169424057,
0.0016928070690482855,
0.0007073140004649758,
0.01064515020698309,
-0.06651276350021362,
0.06532992422580719,
0.09051382541656494,
0.09699347615242004,
-0.011759866029024124,
0.11872418224811554,
-0.15437307953834534,
-0.1222495287656784,
0.006939450744539499,
0.035140637308359146,
-0.17841793596744537,
-0.04085022583603859,
-0.026809286326169968,
0.08283697068691254,
-0.10529143363237381,
-0.03593229129910469,
-0.12132482975721359,
0.09696115553379059,
-0.19890367984771729,
0.09752453118562698,
-0.0832771584391594,
0.04910079017281532,
0.016286252066493034,
-0.04837803170084953,
-0.1782749891281128,
0.017996400594711304,
-0.09121573716402054,
0.16325587034225464,
0.020073138177394867,
0.0969301238656044,
-0.08077535033226013,
-0.03094719722867012,
-0.1405000388622284,
-0.1164049282670021,
-0.19668878614902496,
0.033569082617759705,
-0.09133899956941605,
-0.20655018091201782,
0.010871602222323418,
0.0715980976819992,
0.16192413866519928,
-0.10141458362340927,
0.09216620773077011,
0.02414614148437977,
0.1210407242178917,
-0.2614385783672333,
0.05643399804830551,
-0.02319197542965412,
-0.10673823952674866,
-0.07424727082252502,
0.09823346883058548,
-0.003029866609722376,
0.1608467400074005,
0.10225317627191544,
-0.07362154126167297,
-0.0732225701212883,
0.1067609041929245,
0.10596363991498947,
-0.1729000359773636,
0.04560062661767006,
0.0861518532037735,
-0.0955812931060791,
0.01650886796414852,
0.012153307907283306,
0.20491351187229156,
-0.1373146027326584,
-0.281319797039032,
0.12757404148578644,
-0.1014687791466713,
-0.07635030150413513,
-0.1133217066526413,
-0.026497479528188705,
0.00378374382853508,
0.10114304721355438,
0.07101835310459137,
-0.12667599320411682,
0.10290499031543732,
-0.1847417652606964,
-0.03372695669531822,
-0.03588739410042763,
0.14912423491477966,
0.04105745255947113,
0.1508019119501114,
0.04094327986240387,
0.19580458104610443,
0.06988847255706787,
0.05824214220046997,
0.06853840500116348,
-0.02621099166572094,
0.022417524829506874,
-0.11523141711950302,
0.2379341870546341,
-0.09288639575242996,
0.14208780229091644,
-0.07773835211992264,
0.17889663577079773,
0.0151349026709795,
-0.024018673226237297,
-0.15293321013450623,
0.012112283147871494,
0.0761817917227745,
-0.019341297447681427,
-0.1498815268278122,
-0.12275282293558121,
0.07073458284139633,
0.058049608021974564,
0.09496103227138519,
-0.056638773530721664,
0.04644826427102089,
-0.162667378783226,
0.07437393814325333,
-0.08993582427501678,
-0.07698849588632584,
-0.10226362198591232,
-0.15411004424095154,
0.31279662251472473,
-0.19630885124206543,
0.1814132034778595,
-0.1689772605895996,
0.01677517779171467,
0.0587029866874218,
0.05311758816242218,
0.09369827061891556,
-0.3118448555469513,
0.12106107920408249,
-0.2867766320705414,
0.06054645776748657,
-0.012911842204630375,
-0.1505631059408188,
0.12187087535858154,
-0.00681664701551199,
-0.041421618312597275,
-0.0489826425909996,
-0.01005034800618887,
-0.08431947231292725,
0.01770315133035183,
-0.000021190313418628648,
-0.16991080343723297,
0.23279882967472076,
-0.19505009055137634,
-0.0823683813214302,
0.2511236369609833,
0.17057456076145172,
-0.038222525268793106,
-0.024616075679659843,
-0.09270772337913513,
-0.16768161952495575,
0.21209633350372314,
0.12301073223352432,
-0.23645608127117157,
-0.12060815095901489,
-0.002274529542773962,
0.06472429633140564,
-0.0024146351497620344,
-0.11556471884250641,
0.09537260234355927,
-0.130057692527771,
0.022221824154257774,
0.09088890999555588,
0.04376775026321411,
-0.22106191515922546,
0.0118687953799963,
-0.030292728915810585,
0.007635732181370258,
-0.016943739727139473,
0.018354544416069984,
-0.05191716551780701,
-0.03649526089429855,
0.15351098775863647,
-0.03195914998650551,
0.013924375176429749,
-0.14171472191810608,
0.22124411165714264,
0.024982798844575882,
0.03830558434128761,
0.036936093121767044,
0.04912185296416283,
-0.2126525342464447,
0.07458958774805069,
-0.017351660877466202,
-0.11540412157773972,
-0.05024213716387749,
-0.22555886209011078,
-0.08416841179132462,
-0.08265804499387741,
0.11536060273647308,
-0.09677045047283173,
0.15624581277370453,
0.009343979880213737,
-0.013776363804936409,
0.15804432332515717,
0.06282645463943481,
-0.1242937222123146,
-0.06720662117004395,
-0.14047838747501373,
-0.07680220901966095,
0.1292470097541809,
0.07987449318170547,
0.20970818400382996,
0.1996748000383377,
0.22678883373737335,
0.06254321336746216,
-0.1587812453508377,
0.01218072697520256,
-0.033975157886743546,
-0.015866385772824287,
0.15284065902233124,
0.01386943832039833,
-0.02594604901969433,
0.012950830161571503,
0.20631039142608643,
0.06427092105150223,
0.002480173949152231,
-0.03917893394827843,
-0.048070523887872696,
-0.039584096521139145,
-0.008620410226285458,
0.07832006365060806,
-0.03686799481511116,
-0.14295460283756256,
-0.06510011851787567,
0.12126173079013824,
0.1740124523639679,
-0.21715813875198364,
0.023308277130126953,
0.15238918364048004,
0.018504580482840538,
-0.029095005244016647,
-0.11788337677717209,
-0.025173140689730644,
-0.019941143691539764,
-0.007873520255088806,
-0.03710875287652016,
-0.02161586843430996,
0.18677353858947754,
0.02605980634689331,
0.08320258557796478,
-0.04018496721982956,
0.021147046238183975,
0.00714987562969327,
-0.08057090640068054,
-0.05647604167461395,
-0.02613910846412182,
-0.04372991621494293,
0.01800944097340107,
0.07931695878505707,
-0.04969699680805206,
0.07359202951192856,
-0.17354366183280945,
-0.07503596693277359,
-0.06399863213300705,
-0.035208653658628464,
-0.09673725068569183,
0.09927669912576675,
-0.042184047400951385,
-0.2454243302345276,
-0.08855811506509781,
-0.06528209149837494,
0.0022865545470267534,
-0.004839919041842222,
0.041840266436338425,
0.11475974321365356,
-0.1129717156291008,
-0.15068969130516052,
0.06404276937246323,
-0.13251689076423645,
0.03285680338740349,
-0.07762438803911209,
0.09482850879430771,
-0.10818338394165039,
-0.05523894727230072,
-0.027890857309103012,
0.05823001638054848,
-0.011820496059954166,
0.10468738526105881,
-0.08558979630470276,
-0.06596498936414719,
-0.0741831585764885,
0.16636957228183746,
0.02327827177941799,
0.024533240124583244,
-0.09936599433422089,
-0.05069873481988907,
-0.03077619895339012,
0.1477096527814865,
-0.02639549784362316,
0.01686100661754608,
0.010442253202199936,
0.0029512965120375156,
0.028459418565034866,
-0.08399072289466858,
0.1009097471833229,
-0.11828456819057465,
-0.07664302736520767,
-0.013861142098903656,
-0.03943559154868126,
-0.030363934114575386,
-0.035441502928733826,
-0.13847626745700836,
0.21131861209869385,
-0.06085073947906494,
0.15487413108348846,
0.2115815430879593,
0.07437971979379654,
-0.046221066266298294,
0.060981281101703644,
0.2416355013847351,
-0.05203810706734657,
0.009509026072919369,
-0.2879505455493927,
0.04128528758883476,
0.009950690902769566,
0.0643203929066658,
-0.07871008664369583,
-0.03736863657832146,
-0.09594040364027023,
0.016558021306991577,
-0.040249429643154144,
0.17744837701320648,
-0.1354079395532608,
0.11844897270202637,
-0.054962169378995895,
0.021358009427785873,
0.14449197053909302,
0.2192656546831131,
0.2003309279680252,
0.018278349190950394,
0.06375639140605927,
-0.0791875571012497,
0.29780277609825134,
0.01933041587471962,
-0.09308737516403198,
-0.05916527286171913,
-0.2537260055541992,
-0.04349948838353157,
0.09068360924720764,
0.1652764230966568,
0.03909290209412575,
-0.05543891340494156,
0.22395414113998413,
0.20219600200653076,
0.18378379940986633,
-0.0825900137424469,
0.16596052050590515,
0.0093366215005517,
0.025778912007808685,
-0.02791721560060978,
-0.004485599230974913,
0.06446530669927597,
0.11987064778804779,
0.1066536232829094,
0.058207470923662186,
0.007428806275129318,
-0.11736683547496796,
0.1157679632306099,
-0.1436692178249359,
-0.12452229112386703,
-0.004810870625078678,
0.1024329662322998,
-0.040017835795879364,
-0.005306322127580643,
-0.03382616862654686,
0.11321333050727844,
0.10608557611703873,
0.07178793847560883,
-0.14059972763061523,
-0.09457801282405853,
0.08579947799444199,
0.09189444035291672,
0.10579558461904526,
0.025360435247421265,
0.007210236042737961,
0.19431942701339722,
0.05722331255674362,
0.21439018845558167,
-0.031097225844860077,
0.12298687547445297,
0.01007067784667015,
0.025925492867827415,
0.04801630973815918,
-0.37729835510253906,
0.08624552935361862,
0.34928053617477417,
-0.1548772007226944,
0.04989003390073776,
-0.10291576385498047,
-0.027186501771211624,
-0.018809739500284195,
0.11145970225334167,
0.013105261139571667,
-0.115406833589077,
0.0362376943230629,
-0.04820241034030914,
-0.1519174575805664,
0.14493174850940704,
-0.10450322926044464,
0.08508577197790146,
-0.06401634961366653,
0.049591388553380966,
0.18595105409622192,
-0.02097940817475319,
-0.0330972895026207,
0.16283459961414337,
0.016168998554348946,
-0.14869695901870728,
0.17897777259349823,
0.06916409730911255,
0.05080152302980423,
-0.06819486618041992,
0.08969669044017792,
-0.10320158302783966,
0.08955372869968414,
0.021996580064296722,
0.12394247949123383,
0.1607884019613266,
0.11832337081432343,
0.0344817191362381,
0.019763097167015076,
0.019978415220975876,
-0.07918030768632889,
0.2607475519180298,
0.07748804241418839,
-0.017005788162350655,
0.11604145169258118,
0.008232119493186474,
0.12121779471635818,
0.07005960494279861,
0.10125484317541122,
-0.21256308257579803,
0.09567388147115707,
0.0864136591553688,
-0.11849632114171982,
-0.15482531487941742,
0.043320249766111374,
0.014981034211814404,
-0.054422639310359955,
-0.07099036127328873,
0.10590488463640213,
0.08781015127897263,
0.10170101374387741,
-0.08730903267860413,
-0.1298658698797226,
-0.1185302659869194,
0.011271961033344269,
-0.08746631443500519,
-0.11477549374103546,
0.016860878095030785,
0.0028373883105814457,
0.08083416521549225,
-0.01951076090335846,
-0.14349035918712616,
0.13152439892292023,
-0.08422818779945374,
-0.17089514434337616,
0.1106172651052475,
-0.11730857193470001,
-0.28218722343444824,
0.07625041157007217,
0.13495992124080658,
-0.05165566876530647,
0.08817259967327118,
0.05417224019765854,
-0.04895787313580513,
-0.21001218259334564,
0.12666216492652893,
0.10711456090211868,
0.026966851204633713,
0.053579382598400116,
0.12796027958393097,
0.08034726232290268,
-0.019674042239785194,
-0.11635850369930267,
0.040391772985458374,
0.013024586252868176,
-0.02877429872751236,
-0.08650562167167664,
0.11289232969284058,
-0.05679721012711525,
-0.02941245213150978,
-0.07020634412765503,
0.07905794680118561,
-0.1156659722328186,
-0.04233040660619736,
-0.14787812530994415,
0.017611585557460785,
0.004159958567470312,
-0.10079240053892136,
-0.020708516240119934,
-0.0630243793129921,
0.013881930150091648,
0.039584286510944366,
0.17927999794483185,
-0.01877886801958084,
-0.1125979796051979,
0.10869283229112625,
-2.5347954635580774e-32,
0.07769707590341568,
0.09657957404851913,
0.051677197217941284,
-0.04278874769806862,
0.0072996364906430244,
0.07232502847909927,
-0.03892286866903305,
-0.07888790220022202,
0.042346492409706116,
-0.08186659961938858,
-0.2567560374736786,
0.1721419095993042,
0.11274521052837372,
-0.111412912607193,
0.012780288234353065,
-0.05275692790746689,
0.19724178314208984,
-0.027542827650904655,
-0.12265357375144958,
0.20534096658229828,
-0.05703289434313774,
0.18047796189785004,
0.03612988814711571,
0.017460517585277557,
-0.07436514645814896,
-0.012188988737761974,
0.007023912388831377,
-0.06852173060178757,
-0.10076571255922318,
-0.2224622517824173,
-0.15197715163230896,
0.1475958377122879,
-0.09818844497203827,
-0.08815600723028183,
-0.1527588814496994,
-0.028798723593354225,
-0.20426227152347565,
-0.21738864481449127,
0.0643465593457222,
0.10138429701328278,
-0.1436060667037964,
0.17497621476650238,
-0.027064740657806396,
-0.06015785038471222,
0.13434453308582306,
-0.047628890722990036,
-0.004242479335516691,
0.1830986887216568,
-0.18943245708942413,
0.0753704309463501,
0.19430838525295258,
0.171756774187088,
0.25863218307495117,
0.19159066677093506,
0.15945839881896973,
-0.09135884046554565,
0.13282716274261475,
0.1476455181837082,
-0.24983356893062592,
0.12590165436267853,
0.052409883588552475,
-0.13488903641700745,
0.03812877833843231,
0.022285277023911476,
0.2589109241962433,
0.04091488569974899,
0.24431878328323364,
0.061655111610889435,
0.10980869084596634,
-0.10656126588582993,
-0.0160873644053936,
-0.14149685204029083,
-0.2362956702709198,
-0.08230641484260559,
-0.11969291418790817,
-0.010050429031252861,
-0.05634639784693718,
-0.08634266257286072,
-0.02920561097562313,
-0.07979673147201538,
0.04433216154575348,
-0.12659379839897156,
0.014292211271822453,
-0.09541641175746918,
-0.045956797897815704,
-0.217336967587471,
0.07168685644865036,
0.11022347211837769,
0.026392804458737373,
-0.010649989359080791,
-0.24953816831111908,
0.24629737436771393,
-0.10147484391927719,
-0.01674026809632778,
-0.06129005551338196,
0.12116287648677826,
-0.07232538610696793,
0.18948428332805634,
-0.04205041006207466,
-0.07968316227197647,
-0.13062117993831635,
-0.0020303912460803986,
0.0012099317973479629,
-0.027276944369077682,
0.053016290068626404,
0.006710487883538008,
0.13223619759082794,
0.10170018672943115,
-0.04646734148263931,
-0.03808128461241722,
0.014177761040627956,
0.05050767585635185,
-0.04085172340273857,
0.18581940233707428,
0.14174732565879822,
-0.17147278785705566,
0.18028360605239868,
-0.09442167729139328,
0.23230524361133575,
0.2820819914340973,
-0.047553133219480515,
-0.055709101259708405,
-0.25630927085876465,
-0.035429731011390686,
0.16741548478603363,
0.044829681515693665,
-0.12589873373508453,
-0.07960712164640427,
0.06508028507232666,
-0.1916370838880539,
0.10441651195287704,
0.0465669110417366,
6.686846063530538e-7,
-0.04818395525217056,
0.09660859405994415,
-0.06481681019067764,
-0.09743205457925797,
-0.10711014270782471,
-0.006975003983825445,
0.030530693009495735,
0.07431589812040329,
-0.03562236577272415,
0.2343783676624298,
0.23590339720249176,
-0.06160643324255943,
-0.08366405218839645,
-0.005424648988991976,
0.07545436173677444,
-0.09203816205263138,
-0.15782280266284943,
0.09903862327337265,
-0.20119763910770416,
-0.06844241172075272,
-0.11665836721658707,
0.12764163315296173,
0.06441861391067505,
-0.12138007581233978,
0.05969813093543053,
0.07679709047079086,
-0.17807602882385254,
0.00017726320947986096,
0.18400658667087555,
0.041515763849020004,
0.09205383062362671,
-0.09957817196846008,
0.07774008810520172,
0.07466064393520355,
0.11110390722751617,
0.14376412332057953,
-0.040988706052303314,
-0.0019481510389596224,
-0.047330763190984726,
0.11504725366830826,
0.1238456666469574,
-0.17267505824565887,
0.025495396926999092,
-0.13052944839000702,
0.13691185414791107,
0.07337240874767303,
-0.0953291729092598,
0.013941554352641106,
-0.003300462383776903,
0.06912106275558472,
0.053888749331235886,
0.13210418820381165,
0.2882322669029236,
0.33066749572753906,
0.02794419229030609,
-0.1421215832233429,
0.0005593657842837274,
-0.12548474967479706,
0.07699374854564667,
-0.08259090781211853,
-0.16009674966335297,
-0.04537683352828026,
-0.04503883421421051,
0.06957776844501495,
-0.06754456460475922,
-0.07560960948467255,
-0.20459973812103271,
5.68299172389766e-35,
0.046012427657842636,
0.009357647970318794,
-0.01983715035021305,
-0.13959333300590515,
-0.1325276643037796,
-0.21786068379878998,
0.06278763711452484,
0.15285630524158478,
-0.16483409702777863,
-0.2315542846918106,
-0.15899161994457245
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | > > For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
> > Is my understanding correct?
>
> Yes exactly :)
>
> > Where can I print the actual training data for each GPU?
>
> You should call print in the data_collator
OK, when printing the train data in the data collator, each GPU sees different data.
Thanks for your reply | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 77 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
> > For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
> > Is my understanding correct?
>
> Yes exactly :)
>
> > Where can I print the actual training data for each GPU?
>
> You should call print in the data_collator
OK, when printing the train data in the data collator, each GPU sees different data.
Thanks for your reply | [
0.07320616394281387,
-0.05622569099068642,
-0.07174582779407501,
-0.023021822795271873,
0.09351715445518494,
0.11300718784332275,
0.19704823195934296,
-0.04543899744749069,
-0.033541612327098846,
0.19918733835220337,
-0.11489645391702652,
-0.04940050467848778,
0.05816112831234932,
-0.06171484664082527,
-0.0818142369389534,
-0.24727991223335266,
-0.016623925417661667,
-0.019773200154304504,
-0.09360538423061371,
-0.08154870569705963,
-0.16159099340438843,
0.14580361545085907,
0.12378165870904922,
-0.06712184101343155,
0.10934365540742874,
-0.10894366353750229,
-0.07699514925479889,
-0.04600540176033974,
0.007762608118355274,
0.03126770257949829,
-0.005786064546555281,
0.07380069047212601,
-0.11262944340705872,
0.028117680922150612,
0.000004578745119943051,
0.20043493807315826,
0.06557122617959976,
0.015451997518539429,
-0.029767876490950584,
0.08924805372953415,
0.09968268871307373,
0.001707336283288896,
0.044214703142642975,
-0.0012322734110057354,
-0.13880398869514465,
-0.15765133500099182,
-0.1853058785200119,
-0.06091603636741638,
0.1095312312245369,
-0.10124322026968002,
-0.011000996455550194,
0.1820874959230423,
-0.2041836977005005,
-0.18418939411640167,
0.022467005997896194,
-0.058478303253650665,
0.06646416336297989,
0.009333969093859196,
-0.004630237352102995,
0.04803071171045303,
-0.026956146582961082,
0.06994767487049103,
0.09378443658351898,
0.05214258283376694,
-0.025825640186667442,
0.08031629770994186,
-0.1169615238904953,
-0.16919299960136414,
0.027081385254859924,
-0.03830792009830475,
-0.1078149601817131,
-0.10642685741186142,
0.008427420631051064,
0.13466504216194153,
-0.07873384654521942,
-0.12728609144687653,
-0.12660932540893555,
0.12178108096122742,
-0.13288229703903198,
0.09241916239261627,
-0.0815688967704773,
0.048171911388635635,
-0.026896055787801743,
-0.0762786716222763,
-0.19238442182540894,
0.06282645463943481,
-0.13867303729057312,
0.1459522396326065,
-0.014407503418624401,
0.09778979420661926,
-0.008233661763370037,
-0.062497206032276154,
-0.06410354375839233,
-0.10527710616588593,
-0.2045164555311203,
0.018958939239382744,
-0.11726763099431992,
-0.21459925174713135,
0.002057764446362853,
0.10375478863716125,
0.2027021199464798,
-0.06257764995098114,
0.11054359376430511,
0.003326333360746503,
0.15625588595867157,
-0.2486317902803421,
0.06340738385915756,
-0.0304222721606493,
-0.12725475430488586,
-0.024341722950339317,
0.131999671459198,
-0.011940537951886654,
0.13661153614521027,
0.10439180582761765,
-0.06801197677850723,
-0.0835830345749855,
0.1014382541179657,
0.11694083362817764,
-0.19339855015277863,
0.025407699868083,
0.1032901331782341,
-0.09928863495588303,
0.015463211573660374,
-0.0066630784422159195,
0.17530900239944458,
-0.14998289942741394,
-0.2945641279220581,
0.12755924463272095,
-0.0797397643327713,
-0.08741457015275955,
-0.11949115246534348,
0.0021755576599389315,
-0.006876704748719931,
0.10158543288707733,
0.034544091671705246,
-0.0812540054321289,
0.1061285212635994,
-0.1514243334531784,
-0.027291089296340942,
-0.013774986378848553,
0.15210716426372528,
-0.01484960038214922,
0.13227203488349915,
0.013322750106453896,
0.19025400280952454,
0.11329057812690735,
0.07424076646566391,
0.1012130156159401,
-0.04314460605382919,
0.04492941126227379,
-0.061699092388153076,
0.24326172471046448,
-0.11017699539661407,
0.13014425337314606,
-0.06655590236186981,
0.15682153403759003,
0.02871360071003437,
-0.06613578647375107,
-0.13298209011554718,
0.04749380052089691,
0.049071673303842545,
-0.059958212077617645,
-0.1289336383342743,
-0.14686739444732666,
0.10403139889240265,
-0.011860944330692291,
0.04582567140460014,
-0.040724754333496094,
0.0937478244304657,
-0.1636841893196106,
0.07537190616130829,
-0.0760902687907219,
-0.09469727426767349,
-0.09404797106981277,
-0.15658389031887054,
0.3184950649738312,
-0.12387944757938385,
0.11243093758821487,
-0.0983782485127449,
0.027831366285681725,
0.08453971147537231,
0.08783958852291107,
0.09931676834821701,
-0.31256332993507385,
0.13257832825183868,
-0.2539803683757782,
0.022873518988490105,
0.021563546732068062,
-0.10752589255571365,
0.07551836222410202,
0.00157646753359586,
-0.008855060674250126,
-0.046666283160448074,
0.01790444925427437,
-0.05506432428956032,
0.0570777952671051,
-0.005204105284065008,
-0.21637344360351562,
0.24048471450805664,
-0.19397489726543427,
-0.14982733130455017,
0.22116516530513763,
0.21905316412448883,
0.04508448764681816,
-0.028216838836669922,
-0.04581775143742561,
-0.14998693764209747,
0.17481128871440887,
0.14132565259933472,
-0.24962261319160461,
-0.1639736443758011,
-0.05814288556575775,
0.06674928963184357,
-0.019358253106474876,
-0.07967471331357956,
0.0721084326505661,
-0.11082932353019714,
0.04272575303912163,
0.08039779216051102,
0.05967285484075546,
-0.1951783448457718,
0.034506797790527344,
-0.16220656037330627,
0.03441105782985687,
0.020473001524806023,
0.042434558272361755,
-0.06416726112365723,
-0.017185702919960022,
0.12150797247886658,
-0.021486610174179077,
0.013517693616449833,
-0.11672947555780411,
0.28668659925460815,
0.05841310694813728,
0.0970195010304451,
0.03435666859149933,
-0.0035713708493858576,
-0.1430361568927765,
0.06354130804538727,
-0.01520067360252142,
-0.07767697423696518,
-0.1460404247045517,
-0.22385011613368988,
-0.08790400624275208,
-0.06184133142232895,
0.10071840137243271,
-0.13883817195892334,
0.1414744108915329,
0.022908121347427368,
0.00047133973566815257,
0.10134708881378174,
0.06294968724250793,
-0.11147934198379517,
-0.0686192512512207,
-0.16514340043067932,
-0.0338086374104023,
0.10477542132139206,
0.08697787672281265,
0.17287534475326538,
0.2285388559103012,
0.2023288458585739,
0.0397864393889904,
-0.1654633730649948,
-0.020745210349559784,
-0.05304175242781639,
0.01592176966369152,
0.1462474763393402,
-0.002053550910204649,
-0.0370686799287796,
0.02251884900033474,
0.23648014664649963,
0.07927481830120087,
0.0063222674652934074,
-0.06331859529018402,
-0.1041070744395256,
0.0022930006962269545,
0.00873017217963934,
0.08823186904191971,
-0.032770030200481415,
-0.15270058810710907,
-0.03491611033678055,
0.1445625126361847,
0.1676071137189865,
-0.19811689853668213,
0.031534355133771896,
0.1588374376296997,
-0.01010961551219225,
-0.11972823739051819,
-0.13731397688388824,
-0.0075396583415567875,
0.027362152934074402,
0.008593154139816761,
-0.03127405419945717,
-0.05121297761797905,
0.24242016673088074,
0.02454749122262001,
0.054948318749666214,
0.021809479221701622,
-0.012581655755639076,
0.15227776765823364,
-0.07256538420915604,
-0.0723329558968544,
-0.06361940503120422,
-0.008462591096758842,
-0.009552509523928165,
0.12312635034322739,
-0.054717741906642914,
0.049861226230859756,
-0.16401372849941254,
-0.008145821280777454,
-0.06225636228919029,
-0.03258603438735008,
-0.11157628893852234,
0.10918493568897247,
-0.022184103727340698,
-0.22068768739700317,
-0.10193628072738647,
-0.05596992000937462,
0.010778229683637619,
0.05008472874760628,
0.04744403436779976,
0.04142875224351883,
-0.09833978861570358,
-0.1566886007785797,
0.10774468630552292,
-0.1746872067451477,
-0.006385738030076027,
-0.05969877541065216,
0.14492376148700714,
-0.05702703073620796,
-0.05891537293791771,
-0.06603678315877914,
0.0012703404063358903,
0.04022517427802086,
0.1469125747680664,
-0.05341976508498192,
-0.04487042874097824,
-0.09843233972787857,
0.16694581508636475,
0.03257407620549202,
0.021885214373469353,
-0.11307645589113235,
-0.00232740119099617,
0.015972429886460304,
0.13549268245697021,
-0.11429940909147263,
-0.015578879974782467,
-0.019765835255384445,
-0.04517805948853493,
0.03763195499777794,
-0.04462772607803345,
0.08671912550926208,
-0.14543847739696503,
-0.05606726557016373,
0.006625641603022814,
-0.06703417748212814,
-0.010631910525262356,
-0.03539717569947243,
-0.18573154509067535,
0.2568366229534149,
-0.08519070595502853,
0.14903302490711212,
0.24194732308387756,
0.11375819891691208,
-0.049517158418893814,
0.0052422089502215385,
0.2702409029006958,
-0.03043566271662712,
0.042346712201833725,
-0.28280696272850037,
0.028519030660390854,
-0.021285492926836014,
0.06129539757966995,
-0.09869417548179626,
-0.058100707828998566,
-0.09242992103099823,
0.019689124077558517,
0.03545883670449257,
0.15496088564395905,
-0.09421775490045547,
0.10535481572151184,
-0.055148813873529434,
0.02169092185795307,
0.13146238029003143,
0.22887055575847626,
0.23313571512699127,
0.057013772428035736,
0.06202574446797371,
-0.069515161216259,
0.2692910134792328,
-0.009648676961660385,
-0.15859265625476837,
-0.12404294312000275,
-0.22877243161201477,
-0.11347799003124237,
0.0822945311665535,
0.1856195479631424,
0.082286536693573,
-0.07274743169546127,
0.27536362409591675,
0.23821446299552917,
0.198895663022995,
-0.15270917117595673,
0.059172123670578,
0.0385456457734108,
-0.016575006768107414,
0.02831466682255268,
-0.024388512596488,
0.052232496440410614,
0.06737834960222244,
0.08472765237092972,
0.04955008625984192,
-0.0037368431221693754,
-0.15053550899028778,
0.10152877867221832,
-0.16523487865924835,
-0.16781364381313324,
-0.040761515498161316,
0.1374625563621521,
-0.05033857002854347,
-0.009649601764976978,
0.010972727090120316,
0.08880802243947983,
0.08414717763662338,
-0.01734561286866665,
-0.11336863785982132,
-0.04972182586789131,
0.08674529194831848,
0.05193355306982994,
0.11492175608873367,
0.017421571537852287,
0.0014921672409400344,
0.17171798646450043,
0.06424229592084885,
0.24657943844795227,
0.039370447397232056,
0.10851075500249863,
0.03449070081114769,
0.0408320426940918,
0.0814582109451294,
-0.3692120611667633,
0.09466295689344406,
0.4119628667831421,
-0.12649503350257874,
0.003955029416829348,
-0.15441620349884033,
-0.02602328360080719,
-0.02931293100118637,
0.11474262923002243,
0.00848352536559105,
-0.1450847089290619,
0.031449075788259506,
-0.05940000340342522,
-0.15036465227603912,
0.1428374946117401,
-0.10099027305841446,
0.022735634818673134,
-0.09804689884185791,
0.01768692210316658,
0.15537557005882263,
0.011666737496852875,
-0.023101409897208214,
0.21288955211639404,
0.05007461458444595,
-0.1558951437473297,
0.14592784643173218,
0.10871708393096924,
-0.03920801356434822,
-0.08209013193845749,
0.01064961776137352,
-0.14781959354877472,
0.07064638286828995,
-0.022409655153751373,
0.10367042571306229,
0.1816098839044571,
0.11305906623601913,
-0.011265816166996956,
0.030496710911393166,
0.01984284445643425,
-0.019771575927734375,
0.2068394422531128,
0.08254649490118027,
0.021277444437146187,
0.10113261640071869,
-0.03060813806951046,
0.12243421375751495,
0.07481648772954941,
0.08975013345479965,
-0.2496892809867859,
0.04476812481880188,
0.10179134458303452,
-0.13221906125545502,
-0.12302795797586441,
0.024792058393359184,
0.04324338957667351,
-0.033941395580768585,
-0.12550188601016998,
0.11970556527376175,
0.15116998553276062,
0.15634804964065552,
-0.11015186458826065,
-0.15706253051757812,
-0.12511305510997772,
0.06543318182229996,
-0.06934240460395813,
-0.08135151118040085,
0.016845159232616425,
-0.01299908198416233,
0.10004043579101562,
-0.021899597719311714,
-0.045524485409259796,
0.16911384463310242,
-0.03869121894240379,
-0.18804539740085602,
0.0721089318394661,
-0.06612199544906616,
-0.307186096906662,
0.04599051922559738,
0.10671599954366684,
-0.04339582100510597,
0.08883163332939148,
0.05253374204039574,
-0.04909496381878853,
-0.1926235556602478,
0.11555811017751694,
0.09994816780090332,
0.017103929072618484,
0.04448061063885689,
0.13023072481155396,
0.12226182967424393,
-0.012150130234658718,
-0.11708778142929077,
0.08162197470664978,
-0.0466570109128952,
0.0019041128689423203,
-0.10318274796009064,
0.12818790972232819,
-0.05612097308039665,
-0.029662588611245155,
-0.06708451360464096,
0.1151721328496933,
-0.10971976816654205,
-0.031110038980841637,
-0.11442707479000092,
-0.0588470958173275,
-0.010657726787030697,
-0.11059214919805527,
-0.007660501636564732,
-0.02829868160188198,
0.034554190933704376,
0.10723663866519928,
0.16993936896324158,
-0.007336413953453302,
-0.11115919053554535,
0.07919487357139587,
-2.561659329831007e-32,
0.005560750607401133,
0.04399256035685539,
0.0638827234506607,
-0.028082970529794693,
0.016745712608098984,
0.024787643924355507,
0.00029060195083729923,
-0.10763491690158844,
0.009916908107697964,
-0.019037051126360893,
-0.20124909281730652,
0.19733256101608276,
0.11814815551042557,
-0.06345481425523758,
-0.05291843041777611,
-0.06232684850692749,
0.18282346427440643,
-0.017360612750053406,
-0.11395379155874252,
0.2048201709985733,
-0.04317541792988777,
0.2068043202161789,
0.10731805115938187,
-0.047501131892204285,
-0.006054979283362627,
-0.05040492117404938,
-0.0019521198701113462,
-0.102320596575737,
-0.10783658921718597,
-0.20892098546028137,
-0.1831454336643219,
0.082408107817173,
-0.08645418286323547,
-0.08658361434936523,
-0.14679540693759918,
-0.031031284481287003,
-0.2880215048789978,
-0.21818313002586365,
0.07198508083820343,
0.1420745998620987,
-0.18701329827308655,
0.12720224261283875,
0.014950781129300594,
-0.05907377973198891,
0.11496192216873169,
-0.010755750350654125,
-0.05075114220380783,
0.19757398962974548,
-0.17164842784404755,
0.11482486873865128,
0.10161907225847244,
0.16127042472362518,
0.24315965175628662,
0.24634389579296112,
0.18750837445259094,
-0.0932980328798294,
0.14863239228725433,
0.1528366059064865,
-0.3294083774089813,
0.11551353335380554,
0.06308043003082275,
-0.11882540583610535,
0.10477310419082642,
-0.013204565271735191,
0.28181469440460205,
0.035229600965976715,
0.19378846883773804,
0.08365817368030548,
0.12317819148302078,
-0.06307030469179153,
-0.059921860694885254,
-0.16335231065750122,
-0.25147151947021484,
-0.15177927911281586,
-0.14573009312152863,
-0.0001799973688321188,
-0.04506388679146767,
-0.1666308045387268,
-0.0643591359257698,
-0.08165155351161957,
0.024549033492803574,
-0.1589765101671219,
0.04742256551980972,
-0.11931992322206497,
-0.06896716356277466,
-0.2788514494895935,
0.06860490888357162,
0.06665150076150894,
0.05350453779101372,
-0.010897698812186718,
-0.2567473351955414,
0.20969592034816742,
-0.14829744398593903,
-0.029925890266895294,
-0.11522966623306274,
0.12040694802999496,
-0.02693181298673153,
0.12968480587005615,
0.00985878799110651,
-0.0554390549659729,
-0.12813565135002136,
-0.005248327273875475,
-0.02572632022202015,
-0.028235819190740585,
0.041741807013750076,
-0.004928864538669586,
0.14178688824176788,
0.10188465565443039,
-0.028654353693127632,
-0.006221381016075611,
0.03554430603981018,
0.07855314761400223,
-0.018310299143195152,
0.1980171799659729,
0.18063978850841522,
-0.13126379251480103,
0.14226630330085754,
-0.09969101846218109,
0.2539890706539154,
0.2576594352722168,
-0.01092392485588789,
-0.08332426100969315,
-0.21163257956504822,
-0.029540060088038445,
0.14784759283065796,
0.04683689773082733,
-0.1392093151807785,
-0.03949600085616112,
0.043356385082006454,
-0.14115990698337555,
0.12408182770013809,
0.14778347313404083,
6.476959129031457e-7,
0.017176970839500427,
0.05840310454368591,
-0.007775421254336834,
-0.08531398326158524,
-0.08007308095693588,
-0.014774532988667488,
0.10141406208276749,
0.06209096685051918,
0.012942939065396786,
0.2085142731666565,
0.18799130618572235,
-0.10128486156463623,
-0.10510176420211792,
-0.03246568515896797,
0.029284410178661346,
-0.07470045983791351,
-0.14807955920696259,
0.12990093231201172,
-0.19401203095912933,
-0.06042902171611786,
-0.11117400974035263,
0.17060507833957672,
-0.054150260984897614,
-0.09333904087543488,
0.0741741880774498,
0.09175167232751846,
-0.21889007091522217,
-0.010797394439578056,
0.17016316950321198,
0.05932953581213951,
0.10393881797790527,
-0.09496819227933884,
0.027495285496115685,
0.06888748705387115,
0.1342143565416336,
0.1646629273891449,
-0.05311531573534012,
0.005408898927271366,
-0.030985895544290543,
0.15594284236431122,
0.13655433058738708,
-0.2195359617471695,
0.029505077749490738,
-0.15005137026309967,
0.1575452834367752,
0.09212882816791534,
-0.10422690957784653,
-0.052334196865558624,
0.039184246212244034,
-0.008504928089678288,
0.07797108590602875,
0.08308149129152298,
0.3410666286945343,
0.29189208149909973,
0.04566076025366783,
-0.12213797122240067,
-0.008516466245055199,
-0.09599515795707703,
0.04492896795272827,
-0.071913942694664,
-0.14293771982192993,
-0.024776702746748924,
-0.07020041346549988,
0.07935484498739243,
-0.030724355950951576,
-0.0650399923324585,
-0.1548360139131546,
3.1840617776610706e-35,
0.03776302561163902,
0.02848110906779766,
-0.01592695154249668,
-0.09582945704460144,
-0.15451215207576752,
-0.23403917253017426,
0.035149455070495605,
0.1141003742814064,
-0.15940968692302704,
-0.2596679925918579,
-0.14131370186805725
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | Do we have a solution for this one? Or it's required to get "number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU" | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 33 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
Do we have a solution for this one? Or it's required to get "number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU" | [
0.008460690267384052,
0.001283521531149745,
-0.12102203816175461,
-0.052478816360235214,
0.10759877413511276,
0.06597121804952621,
0.181810662150383,
-0.02598884515464306,
-0.005523930303752422,
0.1883968561887741,
0.022623304277658463,
-0.018574856221675873,
-0.007831962779164314,
-0.05127134919166565,
-0.08687126636505127,
-0.26715782284736633,
0.040554456412792206,
-0.0347851887345314,
-0.08622447401285172,
-0.05839072912931442,
-0.1735410839319229,
0.16634105145931244,
0.09349482506513596,
-0.1374916434288025,
0.084142304956913,
-0.1099902093410492,
-0.06703106313943863,
-0.04920328035950661,
0.02270047925412655,
0.018817530944943428,
0.009640257805585861,
0.08041732013225555,
-0.1957019567489624,
0.025283871218562126,
0.000004916001216770383,
0.21887360513210297,
0.08393943309783936,
-0.046536751091480255,
0.008600208908319473,
0.10021727532148361,
0.0639740526676178,
0.011991324834525585,
0.03544020280241966,
0.0027827296871691942,
-0.13883621990680695,
-0.10754932463169098,
-0.1635926365852356,
-0.08579147607088089,
0.11178257316350937,
-0.14498624205589294,
-0.047483254224061966,
0.21102449297904968,
-0.10877496004104614,
-0.18205511569976807,
0.03341429680585861,
-0.03604705259203911,
0.04580146074295044,
-0.014784206636250019,
-0.03255624696612358,
0.05158653482794762,
-0.0595354363322258,
0.09262159466743469,
0.09749642014503479,
0.1026996448636055,
0.008077607490122318,
0.10347282141447067,
-0.170429065823555,
-0.14173775911331177,
0.051867734640836716,
0.03794687241315842,
-0.14507350325584412,
-0.021370192989706993,
-0.02389785274863243,
0.02641903981566429,
-0.05049270763993263,
-0.07664980739355087,
-0.10582020878791809,
0.08455134183168411,
-0.19289380311965942,
0.11887235939502716,
-0.061472684144973755,
0.05439775809645653,
0.0375511609017849,
-0.04654189571738243,
-0.14355209469795227,
-0.002386355772614479,
-0.10640784353017807,
0.176140695810318,
-0.007232025731354952,
0.06816793233156204,
-0.06305239349603653,
-0.018902046605944633,
-0.15644636750221252,
-0.15256045758724213,
-0.17076705396175385,
0.006062858738005161,
-0.07393442094326019,
-0.1934199184179306,
0.00973093044012785,
0.10083651542663574,
0.17932571470737457,
-0.10559400916099548,
0.10773780196905136,
0.018901200965046883,
0.12555623054504395,
-0.2834041118621826,
0.08130183070898056,
-0.028494274243712425,
-0.10225025564432144,
-0.05233947932720184,
0.1521228551864624,
-0.000561626860871911,
0.11926944553852081,
0.02854478545486927,
-0.08023945242166519,
-0.045385148376226425,
0.14490388333797455,
0.09592349082231522,
-0.20341941714286804,
0.0003113435523118824,
0.10692986845970154,
-0.1231975257396698,
0.007852720096707344,
0.009510586969554424,
0.2306600958108902,
-0.11706951260566711,
-0.2521376311779022,
0.13043656945228577,
-0.07059531658887863,
-0.08015601336956024,
-0.12171614170074463,
0.010524501092731953,
0.019333677366375923,
0.0591273307800293,
0.07168600708246231,
-0.10940226167440414,
0.12158123403787613,
-0.1849408596754074,
-0.021523408591747284,
-0.05646376684308052,
0.13726499676704407,
0.04387671872973442,
0.17026354372501373,
0.008303639478981495,
0.1640811711549759,
0.0327473022043705,
0.04057792201638222,
0.06199971213936806,
-0.042559072375297546,
0.04214462637901306,
-0.12696611881256104,
0.22846566140651703,
-0.08362343907356262,
0.1117442324757576,
-0.1294790357351303,
0.173767551779747,
-0.001925177755765617,
-0.02887726202607155,
-0.16381748020648956,
0.03185679018497467,
0.07003538310527802,
0.02265411615371704,
-0.15353058278560638,
-0.12152449786663055,
0.062311746180057526,
0.017444230616092682,
0.06059342622756958,
-0.07315050810575485,
0.0381058044731617,
-0.1670425832271576,
0.08226098865270615,
-0.09748053550720215,
-0.05847780406475067,
-0.15080526471138,
-0.1569194793701172,
0.3312456011772156,
-0.18793684244155884,
0.1663512885570526,
-0.12891420722007751,
0.031827691942453384,
0.041510969400405884,
0.06169361621141434,
0.07900816947221756,
-0.3159051239490509,
0.10065293312072754,
-0.2566807270050049,
0.040546320378780365,
-0.013487705029547215,
-0.17154787480831146,
0.07379661500453949,
0.0024462656583637,
-0.031062226742506027,
-0.05820024013519287,
0.029469547793269157,
-0.06002550944685936,
0.05313528701663017,
-0.020350966602563858,
-0.1660860776901245,
0.23297467827796936,
-0.17067842185497284,
-0.0779598206281662,
0.21860741078853607,
0.18129292130470276,
-0.02740032598376274,
-0.008807583712041378,
-0.1414794921875,
-0.15322862565517426,
0.24149157106876373,
0.11522788554430008,
-0.2542698085308075,
-0.13855913281440735,
-0.007910012267529964,
0.06846612691879272,
-0.0034020831808447838,
-0.07727474719285965,
0.12791012227535248,
-0.09448488801717758,
0.02070009894669056,
0.09265779703855515,
0.04362943395972252,
-0.18463261425495148,
-0.004169145133346319,
-0.0852237120270729,
0.009476110339164734,
-0.0028821418527513742,
0.004590804222971201,
0.008491817861795425,
-0.03668956831097603,
0.13429485261440277,
-0.03739370405673981,
0.011743005365133286,
-0.13758552074432373,
0.22737020254135132,
0.05418497696518898,
0.011937562376260757,
0.019973311573266983,
0.04300202801823616,
-0.23198918998241425,
0.047819834202528,
-0.005851883441209793,
-0.14314202964305878,
-0.059420064091682434,
-0.22745703160762787,
-0.04865895211696625,
-0.07411991059780121,
0.09255364537239075,
-0.1129402443766594,
0.17430996894836426,
0.016950856894254684,
0.0039061426650732756,
0.1917189508676529,
0.05413941666483879,
-0.15146711468696594,
-0.08281615376472473,
-0.1500568836927414,
-0.07927156239748001,
0.08351477235555649,
0.032262172549963,
0.18080468475818634,
0.18958285450935364,
0.21384136378765106,
0.0779191330075264,
-0.14793476462364197,
0.014972886070609093,
0.0049039446748793125,
0.0014536094386130571,
0.12991419434547424,
0.014961832202970982,
-0.03285692259669304,
0.007013434544205666,
0.1911276876926422,
0.03023623302578926,
0.024639537557959557,
-0.03924209624528885,
-0.05527085065841675,
-0.021678853780031204,
0.01913411356508732,
0.09484651684761047,
-0.023876747116446495,
-0.16439282894134521,
-0.09929826855659485,
0.11522327363491058,
0.2041609138250351,
-0.2640397846698761,
0.03779802843928337,
0.1224585771560669,
-0.01644410565495491,
-0.023981411010026932,
-0.09405747801065445,
0.0118923494592309,
-0.0005505413864739239,
-0.00901259109377861,
-0.018153240904211998,
0.00712516438215971,
0.16380983591079712,
-0.0033893610816448927,
0.08015397191047668,
0.0014894962077960372,
0.032270122319459915,
0.021196098998188972,
-0.10919202119112015,
-0.05292701721191406,
0.010527759790420532,
-0.03125400468707085,
0.019548915326595306,
0.09573376923799515,
0.0010202088160440326,
0.05289332568645477,
-0.15934529900550842,
-0.09067797660827637,
-0.06528602540493011,
-0.054584015160799026,
-0.08182433992624283,
0.11252284795045853,
-0.06345432996749878,
-0.23625947535037994,
-0.0418483205139637,
-0.08985202759504318,
0.008382812142372131,
0.038267526775598526,
0.056577760726213455,
0.11507877707481384,
-0.09423533082008362,
-0.1105019822716713,
0.07232704013586044,
-0.10965201258659363,
-0.004243539646267891,
-0.10315842926502228,
0.06414986401796341,
-0.10611915588378906,
-0.0535966195166111,
-0.009309353306889534,
0.016986820846796036,
0.007777367252856493,
0.1302509605884552,
-0.08040501922369003,
-0.0646439641714096,
-0.028312627226114273,
0.14449699223041534,
-0.0014047565637156367,
0.0329989418387413,
-0.0992741584777832,
-0.04636223241686821,
-0.02826852537691593,
0.1651773899793625,
0.002030896255746484,
-0.01786988228559494,
-0.01876811496913433,
-0.04320571944117546,
0.03269195556640625,
-0.10617724061012268,
0.12514890730381012,
-0.09928737580776215,
-0.0949074998497963,
-0.05561898648738861,
-0.022760286927223206,
-0.015439492650330067,
-0.009301275946199894,
-0.17501792311668396,
0.212714284658432,
-0.0192984938621521,
0.16926825046539307,
0.26973989605903625,
0.047284990549087524,
-0.016406932845711708,
0.09213505685329437,
0.24024277925491333,
-0.03240501135587692,
-0.04715899005532265,
-0.2949235737323761,
0.03594496473670006,
-0.03654720261693001,
0.04006406292319298,
-0.05178684741258621,
-0.04571250453591347,
-0.1121661514043808,
0.006553217303007841,
-0.03486735746264458,
0.20152240991592407,
-0.1541820615530014,
0.10819866508245468,
-0.06924141943454742,
0.03173493221402168,
0.14823219180107117,
0.20841240882873535,
0.2092970907688141,
0.03840234875679016,
0.06094059348106384,
-0.054908636957407,
0.3078922629356384,
0.04168333485722542,
-0.13383840024471283,
-0.057699184864759445,
-0.23615556955337524,
-0.06864283233880997,
0.04089539870619774,
0.17854878306388855,
0.02711724489927292,
-0.06385811418294907,
0.20612481236457825,
0.1972767561674118,
0.17194096744060516,
-0.10284873098134995,
0.1732066124677658,
0.06881926953792572,
0.01227779220789671,
-0.006476233713328838,
-0.017592035233974457,
0.04522887244820595,
0.10324030369520187,
0.1026349887251854,
0.006038285791873932,
-0.027501609176397324,
-0.11307878792285919,
0.13195545971393585,
-0.1470509022474289,
-0.12843233346939087,
0.005217236932367086,
0.08507882803678513,
-0.04009566456079483,
-0.05951884761452675,
-0.025595374405384064,
0.1939825862646103,
0.10063309967517853,
0.059431858360767365,
-0.12100514024496078,
-0.11476463824510574,
0.07051316648721695,
0.06262251734733582,
0.06751076132059097,
-0.007843319326639175,
0.0007224366418085992,
0.2352454662322998,
0.039636965841054916,
0.15991322696208954,
0.006190021056681871,
0.1092987060546875,
0.04620247706770897,
0.024204544723033905,
0.043338339775800705,
-0.3876270055770874,
0.07574766874313354,
0.43704497814178467,
-0.16388975083827972,
0.06518968194723129,
-0.11026114970445633,
-0.030398549512028694,
-0.06576266139745712,
0.13156305253505707,
0.02167842723429203,
-0.12650547921657562,
0.025989416986703873,
-0.008634255267679691,
-0.15081439912319183,
0.1743302047252655,
-0.09821624308824539,
0.09286234527826309,
-0.02262347750365734,
0.029824042692780495,
0.16780801117420197,
-0.015220515429973602,
-0.03682335838675499,
0.13609839975833893,
-0.043195728212594986,
-0.15704528987407684,
0.21003316342830658,
0.09390177577733994,
0.008222738280892372,
-0.08631633967161179,
0.1148221418261528,
-0.12520714104175568,
0.09665309637784958,
0.032221339643001556,
0.14201416075229645,
0.19492127001285553,
0.1310812383890152,
0.03911964222788811,
-0.01354752853512764,
-0.045470286160707474,
-0.0770215168595314,
0.2239220142364502,
0.001306055230088532,
-0.02959754690527916,
0.12362030893564224,
-0.012089816853404045,
0.1372334063053131,
0.04620862752199173,
0.11521188169717789,
-0.2251398116350174,
0.13694709539413452,
0.04190646484494209,
-0.11458836495876312,
-0.14879798889160156,
0.08009044826030731,
0.015317747369408607,
-0.06738047301769257,
-0.13658592104911804,
0.08903947472572327,
0.06349371373653412,
0.13395091891288757,
-0.09300848096609116,
-0.14040978252887726,
-0.09630954265594482,
-0.0005305444938130677,
-0.10326438397169113,
-0.10080743581056595,
0.013384626246988773,
0.022758519276976585,
0.06816371530294418,
-0.012715399265289307,
-0.1529402881860733,
0.12669022381305695,
-0.08396434783935547,
-0.17318379878997803,
0.0817287489771843,
-0.0853501558303833,
-0.27728867530822754,
0.04463846608996391,
0.11073867976665497,
-0.032463252544403076,
0.07356275618076324,
0.03201479837298393,
-0.06504040956497192,
-0.1753578633069992,
0.06842599809169769,
0.0842457264661789,
0.08405297994613647,
0.07553339004516602,
0.06466709077358246,
0.08625534176826477,
0.005415392108261585,
-0.08853089064359665,
-0.020901842042803764,
0.02378981001675129,
-0.01273663155734539,
-0.10930099338293076,
0.09638722240924835,
-0.0698925033211708,
0.0036711706779897213,
-0.07453993707895279,
0.05974574387073517,
-0.16349446773529053,
-0.06819198280572891,
-0.1070328950881958,
0.008399010635912418,
0.017142558470368385,
-0.10372006893157959,
-0.02572086825966835,
-0.04318473860621452,
0.004525667522102594,
0.08023251593112946,
0.1462738960981369,
-0.004405985586345196,
-0.12318427860736847,
0.0948985144495964,
-2.563955658045338e-32,
0.053168684244155884,
0.08730550110340118,
0.06493981182575226,
-0.012728269211947918,
-0.04783782362937927,
0.020026255398988724,
-0.04237684607505798,
-0.08733415603637695,
0.04187595471739769,
-0.06803715229034424,
-0.25374117493629456,
0.15947115421295166,
0.12973958253860474,
-0.08013541251420975,
0.04949262738227844,
-0.03388294577598572,
0.18109211325645447,
-0.022471345961093903,
-0.10600633919239044,
0.20937161147594452,
-0.04644310101866722,
0.12729737162590027,
0.03903582692146301,
0.06605299562215805,
-0.07688368856906891,
0.007938656024634838,
0.009450539015233517,
-0.06437016278505325,
-0.08989544957876205,
-0.22364364564418793,
-0.11406822502613068,
0.10160678625106812,
-0.06124493479728699,
-0.04309993237257004,
-0.16252893209457397,
-0.0018012583022937179,
-0.21431145071983337,
-0.1938353031873703,
0.05142262578010559,
0.12696675956249237,
-0.13129007816314697,
0.1375894546508789,
-0.04663752391934395,
-0.040753528475761414,
0.170080304145813,
-0.028136933222413063,
0.004470535553991795,
0.15783259272575378,
-0.15177875757217407,
0.04534175246953964,
0.17067718505859375,
0.15260137617588043,
0.22479265928268433,
0.2169329673051834,
0.15639391541481018,
-0.018544035032391548,
0.18372191488742828,
0.13013526797294617,
-0.2633429765701294,
0.1376514732837677,
0.07830286771059036,
-0.0994964987039566,
0.051518406718969345,
-0.0005703381029888988,
0.21199727058410645,
0.06149523705244064,
0.19740580022335052,
0.02467389777302742,
0.15887223184108734,
-0.08011691272258759,
-0.006288453470915556,
-0.12027370929718018,
-0.22861166298389435,
-0.10219941288232803,
-0.10346278548240662,
-0.0008983248844742775,
-0.103302001953125,
-0.10530900955200195,
-0.09665920585393906,
-0.053881917148828506,
0.0471293143928051,
-0.11879789084196091,
0.03372267633676529,
-0.09222430735826492,
-0.0706958919763565,
-0.22514957189559937,
0.060377221554517746,
0.07878368347883224,
0.03249415382742882,
-0.007860608398914337,
-0.21158461272716522,
0.25788018107414246,
-0.09422251582145691,
-0.03521515056490898,
-0.05955091491341591,
0.15553519129753113,
-0.06271204352378845,
0.17238101363182068,
-0.05148524045944214,
-0.06446360796689987,
-0.12381569296121597,
-0.03707113116979599,
0.02969502843916416,
-0.010581443086266518,
0.09251375496387482,
-0.011887259781360626,
0.1122586652636528,
0.10907323658466339,
-0.054105304181575775,
-0.040657177567481995,
-0.005209741648286581,
0.08128603547811508,
-0.025125065818428993,
0.2022574245929718,
0.1694415658712387,
-0.16027607023715973,
0.17660261690616608,
-0.07374026626348495,
0.1986972689628601,
0.2279234230518341,
-0.0819954127073288,
-0.023607444018125534,
-0.21087561547756195,
-0.012003529816865921,
0.1823393702507019,
0.04213776811957359,
-0.0547262579202652,
-0.09445738047361374,
0.03450433909893036,
-0.1964620053768158,
0.11704759299755096,
0.0802420824766159,
6.776989494028385e-7,
-0.09331458806991577,
0.08166414499282837,
-0.09094984084367752,
-0.10208061337471008,
-0.08457904309034348,
-0.004238349851220846,
0.07016945630311966,
0.022025328129529953,
-0.015540625900030136,
0.23593449592590332,
0.23882152140140533,
-0.038327932357788086,
-0.06418175250291824,
0.03192064166069031,
0.010037874802947044,
-0.019601939246058464,
-0.13427132368087769,
0.12445592135190964,
-0.17556262016296387,
-0.12049787491559982,
-0.10033509135246277,
0.11238117516040802,
0.05562472343444824,
-0.15468746423721313,
0.0596223883330822,
0.0788271427154541,
-0.19261246919631958,
0.016662374138832092,
0.1264948695898056,
0.09618959575891495,
0.09743509441614151,
-0.1052221953868866,
0.06826911866664886,
0.09377062320709229,
0.08843885362148285,
0.12773312628269196,
-0.04685494303703308,
-0.006670632399618626,
-0.04688158258795738,
0.09049411863088608,
0.1143597736954689,
-0.15600179135799408,
0.02824776992201805,
-0.11059247702360153,
0.158846914768219,
0.09275268018245697,
-0.09352082759141922,
0.034945301711559296,
-0.03248148411512375,
0.0524577759206295,
0.05305955559015274,
0.1434866189956665,
0.23824526369571686,
0.27546945214271545,
0.03654506430029869,
-0.15029877424240112,
0.016202276572585106,
-0.13254591822624207,
0.08781515061855316,
-0.043256260454654694,
-0.16142810881137848,
-0.03728437051177025,
-0.020382465794682503,
0.10574202984571457,
-0.05411095917224884,
-0.04302209988236427,
-0.19440267980098724,
7.340850296374243e-35,
0.08691293001174927,
0.000001019574824567826,
-0.04645013436675072,
-0.08053203672170639,
-0.16899041831493378,
-0.17879384756088257,
-0.0016810147790238261,
0.14485126733779907,
-0.12684400379657745,
-0.25258052349090576,
-0.20168572664260864
] |