html_url stringlengths 48 51 | title stringlengths 5 280 | comments stringlengths 63 51.8k | body stringlengths 0 36.2k ⌀ | comment_length int64 16 1.52k | text stringlengths 159 54.1k | embeddings listlengths 768 768 |
|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/686 | Dataset browser url is still https://huggingface.co/nlp/viewer/ | Yes! might do it with @srush one of these days. Hopefully it won't break too many links (we can always redirect from old url to new) | Might be worth updating to https://huggingface.co/datasets/viewer/ | 26 | Dataset browser url is still https://huggingface.co/nlp/viewer/
Might be worth updating to https://huggingface.co/datasets/viewer/
Yes! might do it with @srush one of these days. Hopefully it won't break too many links (we can always redirect from old url to new) | [
-0.1529245525598526,
0.20321422815322876,
-0.09984323382377625,
-0.17287211120128632,
0.10617002099752426,
0.04673740267753601,
0.17942596971988678,
0.23907019197940826,
-0.050067052245140076,
-0.0185793936252594,
-0.15655772387981415,
0.3058706223964691,
0.12803825736045837,
0.17247365415... |
https://github.com/huggingface/datasets/issues/678 | The download instructions for c4 datasets are not contained in the error message | Also not that C4 is a dataset that needs an Apache Beam runtime to be generated.
For example Dataflow, Spark, Flink etc.
Usually we generate the dataset on our side once and for all, but we haven't done it for C4 yet.
More info about beam datasets [here](https://huggingface.co/docs/datasets/beam_dataset.html)
L... | The manual download instructions are not clear
```The dataset c4 with config en requires manual data.
Please follow the manual download instructions: <bound method C4.manual_download_instructions of <datasets_modules.datasets.c4.830b0c218bd41fed439812c8dd19dbd4767d2a3faa385eb695cf8666c982b1b3.c4.C4 object at 0x7ff... | 56 | The download instructions for c4 datasets are not contained in the error message
The manual download instructions are not clear
```The dataset c4 with config en requires manual data.
Please follow the manual download instructions: <bound method C4.manual_download_instructions of <datasets_modules.datasets.c4.830... | [
-0.1576070785522461,
-0.25204694271087646,
-0.044344112277030945,
0.24197342991828918,
0.3052387833595276,
-0.01730603352189064,
0.04620017856359482,
0.1740139275789261,
-0.09261663258075714,
0.15250995755195618,
0.011208152398467064,
-0.031105192378163338,
-0.12809939682483673,
0.57979631... |
https://github.com/huggingface/datasets/issues/676 | train_test_split returns empty dataset item | Can you reproduce this example in a Colab so we can investigate? (or give more information on your software/hardware config) | I try to split my dataset by `train_test_split`, but after that the item in `train` and `test` `Dataset` is empty.
The codes:
```
yelp_data = datasets.load_from_disk('/home/ssd4/huanglianzhe/test_yelp')
print(yelp_data[0])
yelp_data = yelp_data.train_test_split(test_size=0.1)
print(yelp_data)
pri... | 20 | train_test_split returns empty dataset item
I try to split my dataset by `train_test_split`, but after that the item in `train` and `test` `Dataset` is empty.
The codes:
```
yelp_data = datasets.load_from_disk('/home/ssd4/huanglianzhe/test_yelp')
print(yelp_data[0])
yelp_data = yelp_data.train_test_split... | [
-0.11503510177135468,
-0.05038123577833176,
-0.038193464279174805,
0.37564629316329956,
-0.008087974041700363,
0.2310481071472168,
0.6476925611495972,
0.2886786460876465,
-0.02226811833679676,
0.16844365000724792,
-0.08318229764699936,
0.49569815397262573,
-0.15546277165412903,
0.223628088... |
https://github.com/huggingface/datasets/issues/676 | train_test_split returns empty dataset item | We'll do a release pretty soon to include the fix :)
In the meantime you can install the lib from source if you want to | I try to split my dataset by `train_test_split`, but after that the item in `train` and `test` `Dataset` is empty.
The codes:
```
yelp_data = datasets.load_from_disk('/home/ssd4/huanglianzhe/test_yelp')
print(yelp_data[0])
yelp_data = yelp_data.train_test_split(test_size=0.1)
print(yelp_data)
pri... | 25 | train_test_split returns empty dataset item
I try to split my dataset by `train_test_split`, but after that the item in `train` and `test` `Dataset` is empty.
The codes:
```
yelp_data = datasets.load_from_disk('/home/ssd4/huanglianzhe/test_yelp')
print(yelp_data[0])
yelp_data = yelp_data.train_test_split... | [
-0.11764197051525116,
-0.0009297430515289307,
-0.13349345326423645,
0.2837666869163513,
0.03164158761501312,
0.24874547123908997,
0.5152361392974854,
0.5261701941490173,
0.06058869883418083,
0.08247885853052139,
0.02234886959195137,
0.3803648352622986,
-0.17831765115261078,
0.1184175983071... |
https://github.com/huggingface/datasets/issues/674 | load_dataset() won't download in Windows | I have the same issue. Tried to download a few of them and not a single one is downloaded successfully.
This is the output:
```
>>> dataset = load_dataset('blended_skill_talk', split='train')
Using custom data configuration default <-- This step never ends
``` | I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefinitely without downloading anything. I've wa... | 41 | load_dataset() won't download in Windows
I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefin... | [
-0.4348374605178833,
0.26388904452323914,
-0.09682497382164001,
0.3132835328578949,
0.2672566771507263,
0.307550311088562,
0.3540584146976471,
0.1106313169002533,
0.4425588846206665,
-0.016528651118278503,
0.11968876421451569,
-0.10646166652441025,
-0.06712810695171356,
0.2139160931110382,... |
https://github.com/huggingface/datasets/issues/674 | load_dataset() won't download in Windows | This was fixed in #644
I'll do a new release soon :)
In the meantime you can run it by installing from source | I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefinitely without downloading anything. I've wa... | 23 | load_dataset() won't download in Windows
I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefin... | [
-0.5447326302528381,
0.29377633333206177,
-0.07057070732116699,
0.2974260747432709,
0.14205163717269897,
0.32118088006973267,
0.27409040927886963,
0.21087980270385742,
0.37623652815818787,
-0.03033946454524994,
0.1460884064435959,
-0.05348750203847885,
-0.0536382719874382,
0.09938105195760... |
https://github.com/huggingface/datasets/issues/674 | load_dataset() won't download in Windows | Closing since version 1.1.0 got released with Windows support :)
Let me know if it works for you now | I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefinitely without downloading anything. I've wa... | 19 | load_dataset() won't download in Windows
I don't know if this is just me or Windows. Maybe other Windows users can chime in if they don't have this problem. I've been trying to get some of the tutorials working on Windows, but when I use the load_dataset() function, it just stalls and the script keeps running indefin... | [
-0.5312042236328125,
0.2285068929195404,
-0.057598695158958435,
0.26664912700653076,
0.1350669264793396,
0.32391873002052307,
0.256195992231369,
0.21989323198795319,
0.3572814464569092,
0.04361720383167267,
0.18822167813777924,
-0.0625392347574234,
-0.05459009110927582,
0.1764082908630371,... |
https://github.com/huggingface/datasets/issues/672 | Questions about XSUM | We should try to regenerate the data using the official script.
But iirc that's what we used in the first place, so not sure why it didn't match in the first place.
I'll let you know when the dataset is updated | Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, nu... | 41 | Questions about XSUM
Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype... | [
-0.09429459273815155,
-0.36811700463294983,
-0.14567513763904572,
0.484241783618927,
0.3399181365966797,
-0.005832970142364502,
0.11150367558002472,
-0.01865457370877266,
0.2138754278421402,
0.2600373923778534,
-0.2300763577222824,
0.22797611355781555,
0.11959701776504517,
0.42903918027877... |
https://github.com/huggingface/datasets/issues/672 | Questions about XSUM | Thanks, looking forward to hearing your update on this thread.
This is a blocking issue for us; would appreciate any progress on this front. We can also help with the fix, if you deem it appropriately. | Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, nu... | 36 | Questions about XSUM
Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype... | [
-0.08709438145160675,
-0.37684544920921326,
-0.1521643102169037,
0.4688608646392822,
0.3402542471885681,
-0.00788416713476181,
0.1615419238805771,
-0.030764717608690262,
0.2476973533630371,
0.283265084028244,
-0.22370077669620514,
0.24992844462394714,
0.10184461623430252,
0.453922599554061... |
https://github.com/huggingface/datasets/issues/672 | Questions about XSUM | I just started the generation on my side, I'll let you know how it goes :) | Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, nu... | 16 | Questions about XSUM
Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype... | [
-0.09919890761375427,
-0.3942703306674957,
-0.15124885737895966,
0.499251127243042,
0.3250367045402527,
0.008215084671974182,
0.1899511069059372,
-0.03340330347418785,
0.2197483628988266,
0.297578901052475,
-0.18567997217178345,
0.2214597463607788,
0.09753703325986862,
0.4401785135269165,
... |
https://github.com/huggingface/datasets/issues/672 | Questions about XSUM | Hmm after a first run I'm still missing 136668/226711 urls.
I'll relaunch it tomorrow to try to get the remaining ones. | Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, nu... | 21 | Questions about XSUM
Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype... | [
-0.019233573228120804,
-0.27874845266342163,
-0.13158796727657318,
0.45143795013427734,
0.3294110894203186,
0.013247646391391754,
0.08347151428461075,
-0.03241093084216118,
0.16328845918178558,
0.2532368004322052,
-0.2140221744775772,
0.18124085664749146,
0.10411800444126129,
0.34332129359... |
https://github.com/huggingface/datasets/issues/672 | Questions about XSUM | So I managed to download them all but when parsing only 226,181/226,711 worked.
Not sure if it's worth digging and debugging parsing at this point :/ | Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, nu... | 26 | Questions about XSUM
Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype... | [
-0.0844026505947113,
-0.3709561824798584,
-0.15182113647460938,
0.5515391230583191,
0.3594370484352112,
0.04052408039569855,
0.0683167353272438,
0.05969962105154991,
0.134743332862854,
0.2831321358680725,
-0.26395538449287415,
0.22201290726661682,
0.1665133833885193,
0.3795989155769348,
... |
https://github.com/huggingface/datasets/issues/672 | Questions about XSUM | Thanks @lhoestq
It would be great to improve coverage, but IDs are the really crucial part for us. We'd really appreciate an update to the dataset with IDs either way! | Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, nu... | 30 | Questions about XSUM
Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype... | [
-0.12053832411766052,
-0.3434898555278778,
-0.157283216714859,
0.4010956883430481,
0.31504589319229126,
0.05394131690263748,
0.16806741058826447,
0.018259700387716293,
0.22903048992156982,
0.20511943101882935,
-0.17855006456375122,
0.24757477641105652,
0.1144535019993782,
0.443674117326736... |
https://github.com/huggingface/datasets/issues/672 | Questions about XSUM | I gave up at an even earlier point. The dataset I use has 204,017 train examples. | Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, nu... | 16 | Questions about XSUM
Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype... | [
-0.09927358478307724,
-0.37248048186302185,
-0.13977505266666412,
0.4924609065055847,
0.32378292083740234,
-0.0019079744815826416,
0.17883434891700745,
-0.030592817813158035,
0.2268306016921997,
0.2765001654624939,
-0.19577288627624512,
0.236250638961792,
0.08172466605901718,
0.41625183820... |
https://github.com/huggingface/datasets/issues/672 | Questions about XSUM | @lhoestq @sshleifer like @jbragg said earlier, the main issue for us is that the current XSUM dataset (in your package) does not have IDs suggested by the original dataset ([here is the file](https://raw.githubusercontent.com/EdinburghNLP/XSum/master/XSum-Dataset/XSum-TRAINING-DEV-TEST-SPLIT-90-5-5.json).) Would apprec... | Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, nu... | 63 | Questions about XSUM
Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype... | [
-0.1664319485425949,
-0.3865365982055664,
-0.14755186438560486,
0.41031551361083984,
0.3375101685523987,
-0.005333825945854187,
0.13421602547168732,
0.04272174462676048,
0.2139723300933838,
0.2906925678253174,
-0.2072107046842575,
0.3043749928474426,
0.05202582851052284,
0.3954084813594818... |
https://github.com/huggingface/datasets/issues/672 | Questions about XSUM | >So I managed to download them all but when parsing only 226,181/226,711 worked.
@lhoestq any chance we could update the HF-hosted dataset with the IDs in your new version? Happy to help if there's something I can do. | Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, nu... | 38 | Questions about XSUM
Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype... | [
-0.11086814850568771,
-0.2911376655101776,
-0.13783489167690277,
0.4550743103027344,
0.28178027272224426,
0.07282999902963638,
0.054408907890319824,
0.09135876595973969,
0.2821638584136963,
0.26557010412216187,
-0.43892839550971985,
0.06820141524076462,
0.20143002271652222,
0.3437096178531... |
https://github.com/huggingface/datasets/issues/672 | Questions about XSUM | Well I couldn't parse what I downloaded.
Unfortunately I think I won't be able to take a look at it this week.
I can try to send you what I got if you want to give it a shot @jbragg
Otherwise feel free to re-run the xsum download script, maybe you'll be luckier than me | Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype='string', id=None)}, nu... | 55 | Questions about XSUM
Hi there ✋
I'm looking into your `xsum` dataset and I have several questions on that.
So here is how I loaded the data:
```
>>> data = datasets.load_dataset('xsum', version='1.0.1')
>>> data['train']
Dataset(features: {'document': Value(dtype='string', id=None), 'summary': Value(dtype... | [
-0.07263363152742386,
-0.40362071990966797,
-0.16236567497253418,
0.5180845856666565,
0.3325613737106323,
0.02856406569480896,
0.12278130650520325,
-0.03300492838025093,
0.2053791880607605,
0.26137182116508484,
-0.2468283474445343,
0.23382019996643066,
0.0877346321940422,
0.426371842622756... |
https://github.com/huggingface/datasets/issues/669 | How to skip a example when running dataset.map | Hi @xixiaoyao,
Depending on what you want to do you can:
- use a first step of `filter` to filter out the invalid examples: https://huggingface.co/docs/datasets/processing.html#filtering-rows-select-and-filter
- or directly detect the invalid examples inside the callable used with `map` and return them unchanged or ... | in processing func, I process examples and detect some invalid examples, which I did not want it to be added into train dataset. However I did not find how to skip this recognized invalid example when doing dataset.map. | 95 | How to skip a example when running dataset.map
in processing func, I process examples and detect some invalid examples, which I did not want it to be added into train dataset. However I did not find how to skip this recognized invalid example when doing dataset.map.
Hi @xixiaoyao,
Depending on what you want to do... | [
-0.3242635130882263,
-0.22462068498134613,
0.03135393187403679,
0.00025773048400878906,
0.08961531519889832,
0.33322224020957947,
0.03006943129003048,
0.1055707186460495,
0.14229761064052582,
0.25204235315322876,
0.6323104500770569,
0.4480099081993103,
-0.260084867477417,
0.490813493728637... |
https://github.com/huggingface/datasets/issues/667 | Loss not decrease with Datasets and Transformers | Hi did you manage to fix your issue ?
If so feel free to share your fix and close this thread | HI,
The following script is used to fine-tune a BertForSequenceClassification model on SST2.
The script is adapted from [this colab](https://colab.research.google.com/github/huggingface/datasets/blob/master/notebooks/Overview.ipynb) that presents an example of fine-tuning BertForQuestionAnswering using squad data... | 21 | Loss not decrease with Datasets and Transformers
HI,
The following script is used to fine-tune a BertForSequenceClassification model on SST2.
The script is adapted from [this colab](https://colab.research.google.com/github/huggingface/datasets/blob/master/notebooks/Overview.ipynb) that presents an example of fi... | [
0.014327306300401688,
-0.01783992350101471,
0.07662586867809296,
0.2709599435329437,
0.19093330204486847,
-0.21145829558372498,
0.32164451479911804,
0.18336591124534607,
-0.3186628520488739,
0.14407065510749817,
-0.1105743870139122,
0.22517700493335724,
0.0432986281812191,
-0.3711666166782... |
https://github.com/huggingface/datasets/issues/666 | Does both 'bookcorpus' and 'wikipedia' belong to the same datasets which Google used for pretraining BERT? | No they are other similar copies but they are not provided by the official Bert models authors. | 17 | Does both 'bookcorpus' and 'wikipedia' belong to the same datasets which Google used for pretraining BERT?
No they are other similar copies but they are not provided by the official Bert models authors. | [
0.1324196755886078,
-0.1332351118326187,
-0.08413006365299225,
0.41013240814208984,
-0.06199268996715546,
0.068628691136837,
0.4990639388561249,
0.050850823521614075,
0.05872773751616478,
-0.18183620274066925,
-0.5121811628341675,
0.010585624724626541,
0.16044260561466217,
0.26349452137947... | |
https://github.com/huggingface/datasets/issues/665 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects | Hi !
It works on my side with both the LongFormerTokenizer and the LongFormerTokenizerFast.
Which version of transformers/datasets are you using ? | I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [example['question'], example['context']]
encodings = tokenizer.encode... | 22 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [... | [
-0.2387792468070984,
-0.29784899950027466,
-0.01968042179942131,
0.23303498327732086,
0.4450329542160034,
-0.1729922890663147,
0.285151869058609,
0.1309390813112259,
-0.27609169483184814,
0.11031325161457062,
-0.06978636234998703,
0.4891909956932068,
-0.008726135827600956,
-0.0467343218624... |
https://github.com/huggingface/datasets/issues/665 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects | Then I guess you need to give us more informations on your setup (OS, python, GPU, etc) or a Google Colab reproducing the error for us to be able to debug this error. | I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [example['question'], example['context']]
encodings = tokenizer.encode... | 33 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [... | [
-0.2387792468070984,
-0.29784899950027466,
-0.01968042179942131,
0.23303498327732086,
0.4450329542160034,
-0.1729922890663147,
0.285151869058609,
0.1309390813112259,
-0.27609169483184814,
0.11031325161457062,
-0.06978636234998703,
0.4891909956932068,
-0.008726135827600956,
-0.0467343218624... |
https://github.com/huggingface/datasets/issues/665 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects | I have the same issue with `transformers/BertJapaneseTokenizer`.
```python
# train_ds = Dataset(features: {
# 'title': Value(dtype='string', id=None),
# 'score': Value(dtype='float64', id=None)
# }, num_rows: 99999)
t = BertJapaneseTokenizer.from_pretrained('bert-base-japanese-whole-word-masking'... | I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [example['question'], example['context']]
encodings = tokenizer.encode... | 861 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [... | [
-0.2387792468070984,
-0.29784899950027466,
-0.01968042179942131,
0.23303498327732086,
0.4450329542160034,
-0.1729922890663147,
0.285151869058609,
0.1309390813112259,
-0.27609169483184814,
0.11031325161457062,
-0.06978636234998703,
0.4891909956932068,
-0.008726135827600956,
-0.0467343218624... |
https://github.com/huggingface/datasets/issues/665 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects | > I have the same issue with `transformers/BertJapaneseTokenizer`.
It looks like it this tokenizer is not supported unfortunately.
This is because `t.word_tokenizer.mecab` is a `fugashi.fugashi.GenericTagger` which is not compatible with pickle nor dill.
We need objects passes to `map` to be picklable for our ca... | I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [example['question'], example['context']]
encodings = tokenizer.encode... | 153 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [... | [
-0.2387792468070984,
-0.29784899950027466,
-0.01968042179942131,
0.23303498327732086,
0.4450329542160034,
-0.1729922890663147,
0.285151869058609,
0.1309390813112259,
-0.27609169483184814,
0.11031325161457062,
-0.06978636234998703,
0.4891909956932068,
-0.008726135827600956,
-0.0467343218624... |
https://github.com/huggingface/datasets/issues/665 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects | We can also update the `BertJapaneseTokenizer` in `transformers` as you just shown @lhoestq to make it compatible with pickle. It will be faster than asking on fugashi 's repo and good for the other users of `transformers` as well.
I'm currently working on `transformers` I'll include it in the https://github.com/hug... | I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [example['question'], example['context']]
encodings = tokenizer.encode... | 57 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [... | [
-0.2387792468070984,
-0.29784899950027466,
-0.01968042179942131,
0.23303498327732086,
0.4450329542160034,
-0.1729922890663147,
0.285151869058609,
0.1309390813112259,
-0.27609169483184814,
0.11031325161457062,
-0.06978636234998703,
0.4891909956932068,
-0.008726135827600956,
-0.0467343218624... |
https://github.com/huggingface/datasets/issues/665 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects | Thank you for the rapid and polite response!
@lhoestq Thanks for the suggestion! I've passed the pickle phase, but another `ArrowInvalid` problem occored. I created another issue #687 .
@thomwolf Wow, really fast work. I'm looking forward to the next release 🤗 | I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [example['question'], example['context']]
encodings = tokenizer.encode... | 42 | runing dataset.map, it raises TypeError: can't pickle Tokenizer objects
I load squad dataset. Then want to process data use following function with `Huggingface Transformers LongformerTokenizer`.
```
def convert_to_features(example):
# Tokenize contexts and questions (as pairs of inputs)
input_pairs = [... | [
-0.2387792468070984,
-0.29784899950027466,
-0.01968042179942131,
0.23303498327732086,
0.4450329542160034,
-0.1729922890663147,
0.285151869058609,
0.1309390813112259,
-0.27609169483184814,
0.11031325161457062,
-0.06978636234998703,
0.4891909956932068,
-0.008726135827600956,
-0.0467343218624... |
https://github.com/huggingface/datasets/issues/664 | load_dataset from local squad.py, raise error: TypeError: 'NoneType' object is not callable | Hi !
Thanks for reporting.
It looks like no object inherits from `datasets.GeneratorBasedBuilder` (or more generally from `datasets.DatasetBuilder`) in your script.
Could you check that there exist at least one dataset builder class ? |
version: 1.0.2
```
train_dataset = datasets.load_dataset('squad')
```
The above code can works. However, when I download the squad.py from your server, and saved as `my_squad.py` to local. I run followings raise errors.
```
train_dataset = datasets.load_dataset('./my_squad.py') ... | 34 | load_dataset from local squad.py, raise error: TypeError: 'NoneType' object is not callable
version: 1.0.2
```
train_dataset = datasets.load_dataset('squad')
```
The above code can works. However, when I download the squad.py from your server, and saved as `my_squad.py` to local. I run followings raise e... | [
-0.22435887157917023,
0.32966285943984985,
0.1114712804555893,
0.15808042883872986,
0.3371320962905884,
-0.025465749204158783,
0.6201823949813843,
0.3964117765426636,
-0.1371881365776062,
0.05467928946018219,
-0.08272508531808853,
0.41127142310142517,
-0.12458264082670212,
-0.0242637842893... |
https://github.com/huggingface/datasets/issues/664 | load_dataset from local squad.py, raise error: TypeError: 'NoneType' object is not callable | It happened when try to change the old project which use 'nlp' to new project which use 'datasets'. You should check you old 'my_squad.py' file, change the inherit class from `nlp.xxx` to `datasets.xxx`. Otherwise datasets - load.py - import_main_class() `if inspect.isclass(obj) and issubclass(obj, main_cls_type):` can... |
version: 1.0.2
```
train_dataset = datasets.load_dataset('squad')
```
The above code can works. However, when I download the squad.py from your server, and saved as `my_squad.py` to local. I run followings raise errors.
```
train_dataset = datasets.load_dataset('./my_squad.py') ... | 49 | load_dataset from local squad.py, raise error: TypeError: 'NoneType' object is not callable
version: 1.0.2
```
train_dataset = datasets.load_dataset('squad')
```
The above code can works. However, when I download the squad.py from your server, and saved as `my_squad.py` to local. I run followings raise e... | [
-0.13541154563426971,
0.23297595977783203,
0.11986011266708374,
0.20221759378910065,
0.27362075448036194,
-0.14289337396621704,
0.49727490544319153,
0.3231872022151947,
-0.1525464504957199,
-0.004757590591907501,
-0.2818792760372162,
0.48221853375434875,
-0.0662124827504158,
-0.02401315979... |
https://github.com/huggingface/datasets/issues/657 | Squad Metric Description & Feature Mismatch | Thanks for reporting !
There indeed a mismatch between the features and the kwargs description
I believe `answer_start` was added to match the squad dataset format for consistency, even though it is not used in the metric computation. I think I'd rather keep it this way, so that you can just give `references=squad[... | The [description](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L39) doesn't mention `answer_start` in squad. However the `datasets.features` require [it](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L68). It's also not used in the evaluation. | 63 | Squad Metric Description & Feature Mismatch
The [description](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L39) doesn't mention `answer_start` in squad. However the `datasets.features` require [it](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L68). It's also... | [
0.03843475505709648,
-0.1900423765182495,
-0.05375976860523224,
-0.07253237068653107,
0.41921716928482056,
-0.042600151151418686,
0.10886429250240326,
0.07943778485059738,
-0.2159089744091034,
0.1062573790550232,
-0.181974858045578,
0.4140360355377197,
0.3362867832183838,
-0.06046155840158... |
https://github.com/huggingface/datasets/issues/657 | Squad Metric Description & Feature Mismatch | But then providing the `answer_start` becomes mandatory since the format of the features is checked against the one provided in the squad [file](https://github.com/huggingface/datasets/pull/658/files). | The [description](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L39) doesn't mention `answer_start` in squad. However the `datasets.features` require [it](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L68). It's also not used in the evaluation. | 23 | Squad Metric Description & Feature Mismatch
The [description](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L39) doesn't mention `answer_start` in squad. However the `datasets.features` require [it](https://github.com/huggingface/datasets/blob/master/metrics/squad/squad.py#L68). It's also... | [
0.07148385047912598,
-0.368669331073761,
-0.08562180399894714,
-0.09630407392978668,
0.40952473878860474,
-0.10431189835071564,
0.12534356117248535,
0.03956548124551773,
-0.28089192509651184,
0.01617187261581421,
-0.015553915873169899,
0.35087329149246216,
0.2142234891653061,
0.08771615475... |
https://github.com/huggingface/datasets/issues/651 | Problem with JSON dataset format | Currently the `json` dataset doesn't support this format unfortunately.
However you could load it with
```python
from datasets import Dataset
import pandas as pd
df = pd.read_json("path_to_local.json", orient="index")
dataset = Dataset.from_pandas(df)
``` | I have a local json dataset with the following form.
{
'id01234': {'key1': value1, 'key2': value2, 'key3': value3},
'id01235': {'key1': value1, 'key2': value2, 'key3': value3},
.
.
.
'id09999': {'key1': value1, 'key2': value2, 'key3': value3}
}
Note that instead of a list of records i... | 32 | Problem with JSON dataset format
I have a local json dataset with the following form.
{
'id01234': {'key1': value1, 'key2': value2, 'key3': value3},
'id01235': {'key1': value1, 'key2': value2, 'key3': value3},
.
.
.
'id09999': {'key1': value1, 'key2': value2, 'key3': value3}
}
Note ... | [
0.14586959779262543,
0.1199864000082016,
-0.06581166386604309,
0.38023847341537476,
-0.09949307143688202,
0.2573181986808777,
0.2378648966550827,
0.45176005363464355,
0.45882678031921387,
-0.06212310492992401,
0.1368803083896637,
0.48565277457237244,
-0.1455083042383194,
0.2548019289970398... |
https://github.com/huggingface/datasets/issues/650 | dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators` | Hi :)
In your dummy data zip file you can just have `subset000.xz` as directories instead of compressed files.
Let me know if it helps | Hi, I recently want to add a dataset whose source data is like this
```
openwebtext.tar.xz
|__ openwebtext
|__subset000.xz
| |__ ....txt
| |__ ....txt
| ...
|__ subset001.xz
|
....
```
So I wrote `openwebtext.py` like this
```
d... | 25 | dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators`
Hi, I recently want to add a dataset whose source data is like this
```
openwebtext.tar.xz
|__ openwebtext
|__subset000.xz
| |__ ....txt
| |__ ....txt
| ...
|__ s... | [
-0.27755504846572876,
0.053498342633247375,
0.013497132807970047,
0.3913991451263428,
-0.07236066460609436,
0.1356922686100006,
0.45223426818847656,
0.3349652886390686,
-0.0165996216237545,
0.08433191478252411,
-0.05750950425863266,
0.2236393839120865,
-0.16328419744968414,
-0.048292070627... |
https://github.com/huggingface/datasets/issues/650 | dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators` | Thanks for your comment @lhoestq ,
Just for confirmation, changing dummy data like this won't make dummy test test the functionality to extract `subsetxxx.xz` but actually kind of circumvent it. But since we will test the real data so it is ok ? | Hi, I recently want to add a dataset whose source data is like this
```
openwebtext.tar.xz
|__ openwebtext
|__subset000.xz
| |__ ....txt
| |__ ....txt
| ...
|__ subset001.xz
|
....
```
So I wrote `openwebtext.py` like this
```
d... | 43 | dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators`
Hi, I recently want to add a dataset whose source data is like this
```
openwebtext.tar.xz
|__ openwebtext
|__subset000.xz
| |__ ....txt
| |__ ....txt
| ...
|__ s... | [
-0.27755504846572876,
0.053498342633247375,
0.013497132807970047,
0.3913991451263428,
-0.07236066460609436,
0.1356922686100006,
0.45223426818847656,
0.3349652886390686,
-0.0165996216237545,
0.08433191478252411,
-0.05750950425863266,
0.2236393839120865,
-0.16328419744968414,
-0.048292070627... |
https://github.com/huggingface/datasets/issues/650 | dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators` | Yes it's fine for now. We plan to add a job for slow tests.
And at one point we'll also do another pass on the dummy data handling and consider extracting files. | Hi, I recently want to add a dataset whose source data is like this
```
openwebtext.tar.xz
|__ openwebtext
|__subset000.xz
| |__ ....txt
| |__ ....txt
| ...
|__ subset001.xz
|
....
```
So I wrote `openwebtext.py` like this
```
d... | 32 | dummy data testing can't test datasets using `dl_manager.extract` in `_split_generators`
Hi, I recently want to add a dataset whose source data is like this
```
openwebtext.tar.xz
|__ openwebtext
|__subset000.xz
| |__ ....txt
| |__ ....txt
| ...
|__ s... | [
-0.27755504846572876,
0.053498342633247375,
0.013497132807970047,
0.3913991451263428,
-0.07236066460609436,
0.1356922686100006,
0.45223426818847656,
0.3349652886390686,
-0.0165996216237545,
0.08433191478252411,
-0.05750950425863266,
0.2236393839120865,
-0.16328419744968414,
-0.048292070627... |
https://github.com/huggingface/datasets/issues/649 | Inconsistent behavior in map | Thanks for reporting !
This issue must have appeared when we refactored type inference in `nlp`
By default the library tries to keep the same feature types when applying `map` but apparently it has troubles with nested structures. I'll try to fix that next week | I'm observing inconsistent behavior when applying .map(). This happens specifically when I'm incrementally adding onto a feature that is a nested dictionary. Here's a simple example that reproduces the problem.
```python
import datasets
# Dataset with a single feature called 'field' consisting of two examples
d... | 45 | Inconsistent behavior in map
I'm observing inconsistent behavior when applying .map(). This happens specifically when I'm incrementally adding onto a feature that is a nested dictionary. Here's a simple example that reproduces the problem.
```python
import datasets
# Dataset with a single feature called 'field... | [
0.3283729553222656,
-0.2924293279647827,
-0.07196904718875885,
0.08141149580478668,
-0.07207600027322769,
-0.20643606781959534,
0.06377164274454117,
0.01955355517566204,
0.20414860546588898,
-0.005322366952896118,
0.29203158617019653,
0.5868220925331116,
0.20928767323493958,
0.117840267717... |
https://github.com/huggingface/datasets/issues/647 | Cannot download dataset_info.json | Thanks for reporting !
We should add support for servers without internet connection indeed
I'll do that early next week | I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this:
```
ConnectionError: Couldn't reach https://storage.googleapis.com/huggingface-nlp/cache/datasets/text... | 20 | Cannot download dataset_info.json
I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this:
```
ConnectionError: Couldn't reach https://storage.googleapis.com... | [
-0.25816893577575684,
0.02437390387058258,
-0.05948873236775398,
0.2031504213809967,
0.07885235548019409,
0.12885937094688416,
0.09597358852624893,
0.2360111027956009,
0.19916678965091705,
0.0795682743191719,
0.14541953802108765,
0.2383173257112503,
0.2438558042049408,
0.18965166807174683,... |
https://github.com/huggingface/datasets/issues/647 | Cannot download dataset_info.json | Right now the recommended way is to create the dataset on a server with internet connection and then to save it and copy the serialized dataset to the server without internet connection. | I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this:
```
ConnectionError: Couldn't reach https://storage.googleapis.com/huggingface-nlp/cache/datasets/text... | 32 | Cannot download dataset_info.json
I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this:
```
ConnectionError: Couldn't reach https://storage.googleapis.com... | [
-0.2739141583442688,
0.05753108859062195,
-0.03478338196873665,
0.1870901882648468,
0.09355466067790985,
0.18032541871070862,
0.09541946649551392,
0.2747618854045868,
0.0829552561044693,
0.08681342005729675,
0.11729248613119125,
0.24106460809707642,
0.20684422552585602,
0.1972000151872635,... |
https://github.com/huggingface/datasets/issues/647 | Cannot download dataset_info.json | #652 should allow you to load text/json/csv/pandas datasets without an internet connection **IF** you've the dataset script locally.
Example:
If you have `datasets/text/text.py` locally, then you can do `load_dataset("./datasets/text", data_files=...)` | I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this:
```
ConnectionError: Couldn't reach https://storage.googleapis.com/huggingface-nlp/cache/datasets/text... | 30 | Cannot download dataset_info.json
I am running my job on a cloud server where does not provide for connections from the standard compute nodes to outside resources. Hence, when I use `dataset.load_dataset()` to load data, I got an error like this:
```
ConnectionError: Couldn't reach https://storage.googleapis.com... | [
-0.2791208028793335,
0.05780690908432007,
-0.04657020792365074,
0.1835986077785492,
0.12291248887777328,
0.18686729669570923,
0.15476647019386292,
0.2711954414844513,
0.20814092457294464,
0.041916683316230774,
0.048986002802848816,
0.2596799433231354,
0.2826950252056122,
0.1925578564405441... |
https://github.com/huggingface/datasets/issues/643 | Caching processed dataset at wrong folder | Thanks for reporting !
It uses a temporary file to write the data.
However it looks like the temporary file is not placed in the right directory during the processing | Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncation=True, padding='max_length')
dataset = ... | 30 | Caching processed dataset at wrong folder
Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncati... | [
-0.05628242343664169,
0.17550355195999146,
-0.04873049259185791,
0.39088505506515503,
-0.03564659506082535,
-0.05728080868721008,
0.2760777175426483,
-0.024447061121463776,
0.040812280029058456,
0.15739372372627258,
0.050647564232349396,
0.17668648064136505,
0.05192212015390396,
0.36383628... |
https://github.com/huggingface/datasets/issues/643 | Caching processed dataset at wrong folder | Well actually I just tested and the temporary file is placed in the same directory, so it should work as expected.
Which version of `datasets` are you using ? | Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncation=True, padding='max_length')
dataset = ... | 29 | Caching processed dataset at wrong folder
Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncati... | [
-0.09802588820457458,
0.18809384107589722,
-0.028087181970477104,
0.38901108503341675,
-0.01529846340417862,
-0.011468105018138885,
0.32723358273506165,
-0.00962837040424347,
0.03386711701750755,
0.22865694761276245,
0.005428170785307884,
0.227529838681221,
0.027003604918718338,
0.35960721... |
https://github.com/huggingface/datasets/issues/643 | Caching processed dataset at wrong folder | It looks like a pyarrow issue with google colab.
For some reason this code increases the disk usage of google colab while it actually writes into google drive:
```python
import pyarrow as pa
stream = pa.OSFile("/content/drive/My Drive/path/to/file.arrow", "wb")
writer = pa.RecordBatchStreamWriter(stream, schem... | Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncation=True, padding='max_length')
dataset = ... | 74 | Caching processed dataset at wrong folder
Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncati... | [
0.02142048254609108,
0.25080978870391846,
-0.004486246034502983,
0.40462225675582886,
-0.05932916700839996,
-0.0976661741733551,
0.3005954623222351,
0.00513562373816967,
-0.21525894105434418,
0.12719640135765076,
-0.045128993690013885,
0.3386109173297882,
0.10689106583595276,
0.29341217875... |
https://github.com/huggingface/datasets/issues/643 | Caching processed dataset at wrong folder | Actually I did more tests it doesn't >.<
I'll let you know if I find a way to fix that | Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncation=True, padding='max_length')
dataset = ... | 20 | Caching processed dataset at wrong folder
Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncati... | [
-0.10019710659980774,
0.1869409680366516,
-0.01998027041554451,
0.458135724067688,
-0.0414949506521225,
-0.03286110982298851,
0.31075140833854675,
0.013784307986497879,
0.006922680884599686,
0.19623681902885437,
0.015261035412549973,
0.2812226712703705,
0.053010083734989166,
0.445321053266... |
https://github.com/huggingface/datasets/issues/643 | Caching processed dataset at wrong folder | Actually I also have the issue when writing a regular text file
```python
f = open("/content/drive/My Drive/path/to/file", "w")
f.write(("a"*511 + "\n") * ((1 << 30) // 512)) # 1GiB
f.close()
```
Is that supposed to happen ? | Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncation=True, padding='max_length')
dataset = ... | 37 | Caching processed dataset at wrong folder
Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncati... | [
-0.08096203207969666,
0.15093427896499634,
-0.004715915769338608,
0.4641733169555664,
-0.007445380091667175,
-0.0837901309132576,
0.37827709317207336,
-0.01606573536992073,
-0.012285307049751282,
0.15142349898815155,
0.022320633754134178,
0.2040354311466217,
0.12372218817472458,
0.45949265... |
https://github.com/huggingface/datasets/issues/643 | Caching processed dataset at wrong folder | The code you wrote should write a 1GB file in the Google Drive folder. Doesn't it? | Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncation=True, padding='max_length')
dataset = ... | 16 | Caching processed dataset at wrong folder
Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncati... | [
-0.04469699412584305,
0.17951232194900513,
-0.04743408411741257,
0.40678858757019043,
-0.03534640371799469,
-0.01586049795150757,
0.3132927417755127,
0.026928357779979706,
-0.0032727811485528946,
0.2124624103307724,
0.052783846855163574,
0.23325680196285248,
0.017306184396147728,
0.4683631... |
https://github.com/huggingface/datasets/issues/643 | Caching processed dataset at wrong folder | I could check it and as you say as I write to te Drive disk the colab disk also increases... | Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncation=True, padding='max_length')
dataset = ... | 20 | Caching processed dataset at wrong folder
Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncati... | [
-0.09090013802051544,
0.08981896936893463,
-0.0347919836640358,
0.49087226390838623,
-0.06337078660726547,
-0.02706298604607582,
0.26767855882644653,
0.004958542063832283,
0.02421559765934944,
0.22792348265647888,
-0.014807101339101791,
0.2577185332775116,
0.06507819145917892,
0.4686148464... |
https://github.com/huggingface/datasets/issues/643 | Caching processed dataset at wrong folder | To reproduce it:
```bash
!df -h | grep sda1
```
```python
f = open("/content/drive/My Drive/test_to_remove.txt", "w")
f.write(("a"*511 + "\n") * ((1 << 30) // 512)) # 1GiB
f.write(("a"*511 + "\n") * ((1 << 30) // 512)) # 1GiB
f.close()
```
```bash
!ls -lh /content/drive/My\ Drive/test_to_remove.txt
!df... | Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncation=True, padding='max_length')
dataset = ... | 56 | Caching processed dataset at wrong folder
Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncati... | [
-0.08412209153175354,
0.19454526901245117,
-0.016326352953910828,
0.4593133330345154,
-0.04390528053045273,
-0.07286743819713593,
0.3859434425830841,
0.030553914606571198,
0.03372136503458023,
0.20726615190505981,
-0.03545251488685608,
0.2843727469444275,
0.04713255912065506,
0.40580239892... |
https://github.com/huggingface/datasets/issues/643 | Caching processed dataset at wrong folder | Apparently, Colab uses a local cache of the data files read/written from Google Drive. See:
- https://github.com/googlecolab/colabtools/issues/2087#issuecomment-860818457
- https://github.com/googlecolab/colabtools/issues/1915#issuecomment-804234540
- https://github.com/googlecolab/colabtools/issues/2147#issuecommen... | Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncation=True, padding='max_length')
dataset = ... | 21 | Caching processed dataset at wrong folder
Hi guys, I run this on my Colab (PRO):
```python
from datasets import load_dataset
dataset = load_dataset('text', data_files='/content/corpus.txt', cache_dir='/content/drive/My Drive', split='train')
def encode(examples):
return tokenizer(examples['text'], truncati... | [
-0.06103435903787613,
0.27208411693573,
-0.028377313166856766,
0.4453434944152832,
-0.08153101801872253,
-0.02102949097752571,
0.33343735337257385,
0.035966549068689346,
-0.04892965033650398,
0.23377639055252075,
-0.013697903603315353,
0.27560269832611084,
0.0365145318210125,
0.39523112773... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | Not sure what could cause that on the `datasets` side. Could this be a `Trainer` issue ? cc @julien-c @sgugger ? | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 21 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | There was a memory leak issue fixed recently in master. You should install from source and see if it fixes your problem. | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 22 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | @lhoestq @sgugger Thanks for your comments. I have install from source code as you told, but the problem is still there.
To reproduce the issue, just replace [these lines](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py#L241-L258) with:
(load_dataset and Da... | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 80 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | Same here. Pre-training on wikitext-103 to do some test. At the end of the training it takes 32GB of RAM + ~30GB of SWAP. I installed dataset==1.1.0, not built from source. I will try uninstalling and building from source when it finish. | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 42 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | This seems to be on the `transformers` library side.
If you have more informations (pip env) or even better, a colab reproducing the error we can investigate. | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 27 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | It seems like it's solved with freshed versions of transformers. I have tried to replicate the error doing a fresh pip install transformers & datasets on colab and the error doesn't continue. On colab it keeps stable on 5GB! (Y)
Edit: **Thanks for your great work**. Have a good day. | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 50 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | @gaceladri witch version transformers and datasets are you using now? I want to try again. Thanks. | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 16 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | It's happening to me again. After 4 hours of pre-training, my ram memory gets full and the kernel dies. I am using the last transformers version as today. 4.4.0 and the last version of datasets 1.2.1, both installed from master. The memory consumption keeps increasing. | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 45 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | Thanks for the investigation @gaceladri
Apparently this happens when `num_workers>0` and has to do with objects being copied-on-write.
Did you try setting num_workers to 0 @gaceladri ?
If the issue doesn't happen with `num_workers=0` then this would confirm that it's indeed related to this python/pytorch issue.
... | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 114 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | Hmmm so this might come from another issue...
Since it doesn't seem to be related to multiprocessing it should be easier to investigate though.
Do you have some ideas @gaceladri ? | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 31 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | @lhoestq I looked quickly to a previously spoted bug in my env wandb /sdk/interface/interface.py, because sometimes when I load the dataset I got a multiprocessing error at line 510 in wandb...interface.py
This bug is reported here https://github.com/huggingface/datasets/issues/847
```
--------------------------... | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 396 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | @lhoestq But despite this, I got lost into the [class Dataset()](https://huggingface.co/docs/datasets/_modules/datasets/arrow_dataset.html#Dataset) reading the pyarrow files.
Edit: but you should be rigth, that it does not have to be related to multiprocessing since it keeps happening when `num_workers=0` | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 37 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | Or maybe wandb uses multiprocessing ? One process for wandb logging and one for actual training ? If this is the case then even setting `num_workers=0` would cause the process to be forked for wandb and therefore cause the memory issue. | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 41 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | @lhoestq could be, but if we set wandb to false this should not happen. I am going to try. | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 19 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | @lhoestq It keeps happening. I have uninstalled wandb from my env, setted `%env WANDB_DISABLED=true` on my notebook, and commented this func:
```
def get_available_reporting_integrations():
integrations = []
if is_azureml_available():
integrations.append("azure_ml")
if is_comet_available():
... | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 65 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | Thanks for checking @gaceladri . Let's investigate the single process setting then.
If you have some sort of colab notebook with a minimal code example that shows this behavior feel free to share it @gaceladri so that we can play around with it to find what causes this. Otherwise I'll probably try to reproduce on my s... | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 60 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | @lhoestq sure. Here you have https://colab.research.google.com/drive/1ba09ZOpyHGAOQLcsxiQAHRXl10qnMU5o?usp=sharing let me know if the link works and it reproduces the issue. To me, it reproduces the issue, since if you start the training the ram memory keeps increasing.
Let me know. Thanks! | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 39 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | Could the bug be comming from tokenizers?
I got this warning at the terminal from my jupyter notebook:
```
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
- Avoid using `to... | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 63 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | I've never experienced memory issues with tokenizers so I don't know
Cc @n1t0 are you aware of any issue that would cause memory to keep increasing when the tokenizer is used in the Data Collator for language modeling ? | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 39 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | @lhoestq Thanks for pointing to n1t0, just to clarify. That warning was doing fine-tuning, without collator:
```
from datasets import load_dataset, load_metric
import numpy as np
GLUE_TASKS = [
"cola",
"mnli",
"mnli-mm",
"mrpc",
"qnli",
"qqp",
"rte",
"sst2",
"stsb",
... | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 468 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | Thanks for sharing your results.
So you still had the issue for fine-tuning ?
And the issue still appears with a bare-bone dataset from an arrow file... | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 27 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/633 | Load large text file for LM pre-training resulting in OOM | Yes, on both cases. Fine-tuning a pre-trained model and pre-training from scratch with a local arrow file already pre-processed. | I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(DataCollatorForLanguageModeling):
"""
Data collator u... | 19 | Load large text file for LM pre-training resulting in OOM
I tried to pretrain Longformer using transformers and datasets. But I got OOM issues with loading a large text file. My script is almost like this:
```python
from datasets import load_dataset
@dataclass
class DataCollatorForDatasetsLanguageModeling(Dat... | [
-0.6339283585548401,
-0.47753778100013733,
0.010693363845348358,
0.29863524436950684,
0.36004769802093506,
-0.1518251597881317,
0.5567324757575989,
0.37380579113960266,
0.01088225468993187,
0.010719746351242065,
-0.1295929253101349,
-0.1828002780675888,
-0.26698487997055054,
-0.16208980977... |
https://github.com/huggingface/datasets/issues/630 | Text dataset not working with large files | Basically ~600MB txt files(UTF-8) * 59.
contents like ```안녕하세요, 이것은 예제로 한번 말해보는 텍스트입니다. 그냥 이렇다고요.<|endoftext|>\n```
Also, it gets stuck for a loooong time at ```Testing the mapped function outputs```, for more than 12 hours(currently ongoing) | ```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_t... | 36 | Text dataset not working with large files
```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir... | [
-0.4925670027732849,
-0.23102402687072754,
-0.11986441910266876,
0.28360170125961304,
0.46635645627975464,
-0.0735015794634819,
0.305368036031723,
0.5961019992828369,
-0.11382582783699036,
0.04616520553827286,
-0.06241992115974426,
-0.030405322089791298,
-0.10334224998950958,
0.31017932295... |
https://github.com/huggingface/datasets/issues/630 | Text dataset not working with large files | It gets stuck while doing `.map()` ? Are you using multiprocessing ?
If you could provide a code snippet it could be very useful | ```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_t... | 24 | Text dataset not working with large files
```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir... | [
-0.4925670027732849,
-0.23102402687072754,
-0.11986441910266876,
0.28360170125961304,
0.46635645627975464,
-0.0735015794634819,
0.305368036031723,
0.5961019992828369,
-0.11382582783699036,
0.04616520553827286,
-0.06241992115974426,
-0.030405322089791298,
-0.10334224998950958,
0.31017932295... |
https://github.com/huggingface/datasets/issues/630 | Text dataset not working with large files | From transformers/examples/language-modeling/run-language-modeling.py :
```
def get_dataset(
args: DataTrainingArguments,
tokenizer: PreTrainedTokenizer,
evaluate: bool = False,
cache_dir: Optional[str] = None,
):
file_path = args.eval_data_file if evaluate else args.train_data_file
if ... | ```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_t... | 71 | Text dataset not working with large files
```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir... | [
-0.4925670027732849,
-0.23102402687072754,
-0.11986441910266876,
0.28360170125961304,
0.46635645627975464,
-0.0735015794634819,
0.305368036031723,
0.5961019992828369,
-0.11382582783699036,
0.04616520553827286,
-0.06241992115974426,
-0.030405322089791298,
-0.10334224998950958,
0.31017932295... |
https://github.com/huggingface/datasets/issues/630 | Text dataset not working with large files | I am not able to reproduce on my side :/
Could you send the version of `datasets` and `pyarrow` you're using ?
Could you try to update the lib and try again ?
Or do you think you could try to reproduce it on google colab ? | ```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_t... | 47 | Text dataset not working with large files
```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir... | [
-0.4925670027732849,
-0.23102402687072754,
-0.11986441910266876,
0.28360170125961304,
0.46635645627975464,
-0.0735015794634819,
0.305368036031723,
0.5961019992828369,
-0.11382582783699036,
0.04616520553827286,
-0.06241992115974426,
-0.030405322089791298,
-0.10334224998950958,
0.31017932295... |
https://github.com/huggingface/datasets/issues/630 | Text dataset not working with large files | Huh, weird. It's fixed on my side too.
But now ```Caching processed dataset``` is taking forever - how can I disable it? Any flags? | ```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_t... | 24 | Text dataset not working with large files
```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir... | [
-0.4925670027732849,
-0.23102402687072754,
-0.11986441910266876,
0.28360170125961304,
0.46635645627975464,
-0.0735015794634819,
0.305368036031723,
0.5961019992828369,
-0.11382582783699036,
0.04616520553827286,
-0.06241992115974426,
-0.030405322089791298,
-0.10334224998950958,
0.31017932295... |
https://github.com/huggingface/datasets/issues/630 | Text dataset not working with large files | Right after `Caching processed dataset`, your function is applied to the dataset and there's a progress bar that shows how much time is left. How much time does it take for you ?
Also caching isn't supposed to slow down your processing. But if you still want to disable it you can do `.map(..., load_from_cache_file=F... | ```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_t... | 55 | Text dataset not working with large files
```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir... | [
-0.4925670027732849,
-0.23102402687072754,
-0.11986441910266876,
0.28360170125961304,
0.46635645627975464,
-0.0735015794634819,
0.305368036031723,
0.5961019992828369,
-0.11382582783699036,
0.04616520553827286,
-0.06241992115974426,
-0.030405322089791298,
-0.10334224998950958,
0.31017932295... |
https://github.com/huggingface/datasets/issues/630 | Text dataset not working with large files | Ah, it’s much faster now(Takes around 15~20min).
BTW, any way to set default tensor output as plain tensors with distributed training? The ragged tensors are incompatible with tpustrategy :( | ```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_t... | 29 | Text dataset not working with large files
```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir... | [
-0.4925670027732849,
-0.23102402687072754,
-0.11986441910266876,
0.28360170125961304,
0.46635645627975464,
-0.0735015794634819,
0.305368036031723,
0.5961019992828369,
-0.11382582783699036,
0.04616520553827286,
-0.06241992115974426,
-0.030405322089791298,
-0.10334224998950958,
0.31017932295... |
https://github.com/huggingface/datasets/issues/630 | Text dataset not working with large files | > Ah, it’s much faster now(Takes around 15~20min).
Glad to see that it's faster now. What did you change exactly ?
> BTW, any way to set default tensor output as plain tensors with distributed training? The ragged tensors are incompatible with tpustrategy :(
Oh I didn't know about that. Feel free to open an is... | ```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_t... | 92 | Text dataset not working with large files
```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir... | [
-0.4925670027732849,
-0.23102402687072754,
-0.11986441910266876,
0.28360170125961304,
0.46635645627975464,
-0.0735015794634819,
0.305368036031723,
0.5961019992828369,
-0.11382582783699036,
0.04616520553827286,
-0.06241992115974426,
-0.030405322089791298,
-0.10334224998950958,
0.31017932295... |
https://github.com/huggingface/datasets/issues/630 | Text dataset not working with large files | >>> Glad to see that it's faster now. What did you change exactly ?
I don't know, it just worked...? Sorry I couldn't be more helpful.
Setting with numpy array is a great idea! Thanks. | ```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_t... | 35 | Text dataset not working with large files
```
Traceback (most recent call last):
File "examples/language-modeling/run_language_modeling.py", line 333, in <module>
main()
File "examples/language-modeling/run_language_modeling.py", line 262, in main
get_dataset(data_args, tokenizer=tokenizer, cache_dir... | [
-0.4925670027732849,
-0.23102402687072754,
-0.11986441910266876,
0.28360170125961304,
0.46635645627975464,
-0.0735015794634819,
0.305368036031723,
0.5961019992828369,
-0.11382582783699036,
0.04616520553827286,
-0.06241992115974426,
-0.030405322089791298,
-0.10334224998950958,
0.31017932295... |
https://github.com/huggingface/datasets/issues/625 | dtype of tensors should be preserved | Indeed we convert tensors to list to be able to write in arrow format. Because of this conversion we lose the dtype information. We should add the dtype detection when we do type inference. However it would require a bit of refactoring since currently the conversion happens before the type inference..
And then for y... | After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-required-that-input-and-hidden-for-gru-... | 156 | dtype of tensors should be preserved
After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-... | [
-0.11343346536159515,
-0.22111466526985168,
-0.009710624814033508,
0.2073049545288086,
0.5532287955284119,
0.17301321029663086,
0.5313699841499329,
0.12258078157901764,
0.150482639670372,
-0.06653907895088196,
-0.08439914882183075,
0.24571450054645538,
-0.11755191534757614,
-0.175145193934... |
https://github.com/huggingface/datasets/issues/625 | dtype of tensors should be preserved | If the arrow format is basically lists, why is the intermediate step to numpy necessary? I am a bit confused about that part.
Thanks for your suggestion. as I have currently implemented this, I cast to torch.Tensor in my collate_fn to save disk space (so I do not have to save padded tensors to max_len but can pad up... | After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-required-that-input-and-hidden-for-gru-... | 89 | dtype of tensors should be preserved
After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-... | [
-0.11343346536159515,
-0.22111466526985168,
-0.009710624814033508,
0.2073049545288086,
0.5532287955284119,
0.17301321029663086,
0.5313699841499329,
0.12258078157901764,
0.150482639670372,
-0.06653907895088196,
-0.08439914882183075,
0.24571450054645538,
-0.11755191534757614,
-0.175145193934... |
https://github.com/huggingface/datasets/issues/625 | dtype of tensors should be preserved | I'm glad you managed to figure something out :)
Casting from arrow to numpy can be 100x faster than casting from arrow to list.
This is because arrow has an integration with numpy that allows it to instantiate numpy arrays with zero-copy from arrow.
On the other hand to create python lists it is slow since it has ... | After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-required-that-input-and-hidden-for-gru-... | 70 | dtype of tensors should be preserved
After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-... | [
-0.11343346536159515,
-0.22111466526985168,
-0.009710624814033508,
0.2073049545288086,
0.5532287955284119,
0.17301321029663086,
0.5313699841499329,
0.12258078157901764,
0.150482639670372,
-0.06653907895088196,
-0.08439914882183075,
0.24571450054645538,
-0.11755191534757614,
-0.175145193934... |
https://github.com/huggingface/datasets/issues/625 | dtype of tensors should be preserved | I encountered a simliar issue: `datasets` converted my float numpy array to `torch.float64` tensors, while many pytorch operations require `torch.float32` inputs and it's very troublesome.
I tried @lhoestq 's solution, but since it's mixed with the preprocess function, it's not very intuitive.
I just want to sh... | After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-required-that-input-and-hidden-for-gru-... | 96 | dtype of tensors should be preserved
After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-... | [
-0.11343346536159515,
-0.22111466526985168,
-0.009710624814033508,
0.2073049545288086,
0.5532287955284119,
0.17301321029663086,
0.5313699841499329,
0.12258078157901764,
0.150482639670372,
-0.06653907895088196,
-0.08439914882183075,
0.24571450054645538,
-0.11755191534757614,
-0.175145193934... |
https://github.com/huggingface/datasets/issues/625 | dtype of tensors should be preserved | Reopening since @bhavitvyamalik started looking into it !
Also I'm posting here a function that could be helpful to support preserving the dtype of tensors.
It's used to build a pyarrow array out of a numpy array and:
- it doesn't convert the numpy array to a python list
- it keeps the precision of the numpy ar... | After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-required-that-input-and-hidden-for-gru-... | 206 | dtype of tensors should be preserved
After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-... | [
-0.11343346536159515,
-0.22111466526985168,
-0.009710624814033508,
0.2073049545288086,
0.5532287955284119,
0.17301321029663086,
0.5313699841499329,
0.12258078157901764,
0.150482639670372,
-0.06653907895088196,
-0.08439914882183075,
0.24571450054645538,
-0.11755191534757614,
-0.175145193934... |
https://github.com/huggingface/datasets/issues/625 | dtype of tensors should be preserved | @lhoestq Have you thought about this further?
We have a use case where we're attempting to load data containing numpy arrays using the `datasets` library.
When using one of the "standard" methods (`[Value(...)]` or `Sequence()`) we see ~200 samples processed per second during the call to `_prepare_split`. This sl... | After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-required-that-input-and-hidden-for-gru-... | 239 | dtype of tensors should be preserved
After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-... | [
-0.11343346536159515,
-0.22111466526985168,
-0.009710624814033508,
0.2073049545288086,
0.5532287955284119,
0.17301321029663086,
0.5313699841499329,
0.12258078157901764,
0.150482639670372,
-0.06653907895088196,
-0.08439914882183075,
0.24571450054645538,
-0.11755191534757614,
-0.175145193934... |
https://github.com/huggingface/datasets/issues/625 | dtype of tensors should be preserved | Hi !
It would be awesome to achieve this speed for numpy arrays !
For now we have to use `encode_nested_example` to convert numpy arrays to python lists since pyarrow doesn't support multidimensional numpy arrays (only 1D).
Maybe let's start a new PR from your PR @bhavitvyamalik (idk why we didn't answer your PR... | After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-required-that-input-and-hidden-for-gru-... | 185 | dtype of tensors should be preserved
After switching to `datasets` my model just broke. After a weekend of debugging, the issue was that my model could not handle the double that the Dataset provided, as it expected a float (but didn't give a warning, which seems a [PyTorch issue](https://discuss.pytorch.org/t/is-it-... | [
-0.11343346536159515,
-0.22111466526985168,
-0.009710624814033508,
0.2073049545288086,
0.5532287955284119,
0.17301321029663086,
0.5313699841499329,
0.12258078157901764,
0.150482639670372,
-0.06653907895088196,
-0.08439914882183075,
0.24571450054645538,
-0.11755191534757614,
-0.175145193934... |
https://github.com/huggingface/datasets/issues/623 | Custom feature types in `load_dataset` from CSV | Currently `csv` doesn't support the `features` attribute (unlike `json`).
What you can do for now is cast the features using the in-place transform `cast_`
```python
from datasets import load_dataset
dataset = load_dataset('csv', data_files=file_dict, delimiter=';', column_names=['text', 'label'])
dataset.cast... | I am trying to load a local file with the `load_dataset` function and I want to predefine the feature types with the `features` argument. However, the types are always the same independent of the value of `features`.
I am working with the local files from the emotion dataset. To get the data you can use the followi... | 38 | Custom feature types in `load_dataset` from CSV
I am trying to load a local file with the `load_dataset` function and I want to predefine the feature types with the `features` argument. However, the types are always the same independent of the value of `features`.
I am working with the local files from the emotio... | [
0.08020319044589996,
-0.2782894968986511,
-0.053178947418928146,
0.35092276334762573,
0.31722939014434814,
-0.19431041181087494,
0.5701335072517395,
0.11138424277305603,
0.44612523913383484,
0.025330446660518646,
0.09474451839923859,
0.31617727875709534,
-0.09191003441810608,
0.39011546969... |
https://github.com/huggingface/datasets/issues/623 | Custom feature types in `load_dataset` from CSV | Hi @lhoestq we've tried out your suggestion but are now running into the following error:
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-163-81ffd5ac18c9> in <module>
----> 1 dataset.cast_(... | I am trying to load a local file with the `load_dataset` function and I want to predefine the feature types with the `features` argument. However, the types are always the same independent of the value of `features`.
I am working with the local files from the emotion dataset. To get the data you can use the followi... | 168 | Custom feature types in `load_dataset` from CSV
I am trying to load a local file with the `load_dataset` function and I want to predefine the feature types with the `features` argument. However, the types are always the same independent of the value of `features`.
I am working with the local files from the emotio... | [
0.08020319044589996,
-0.2782894968986511,
-0.053178947418928146,
0.35092276334762573,
0.31722939014434814,
-0.19431041181087494,
0.5701335072517395,
0.11138424277305603,
0.44612523913383484,
0.025330446660518646,
0.09474451839923859,
0.31617727875709534,
-0.09191003441810608,
0.39011546969... |
https://github.com/huggingface/datasets/issues/623 | Custom feature types in `load_dataset` from CSV | In general, I don't think there is any hard reason we don't allow to use `features` in the csv script, right @lhoestq?
Should I add it? | I am trying to load a local file with the `load_dataset` function and I want to predefine the feature types with the `features` argument. However, the types are always the same independent of the value of `features`.
I am working with the local files from the emotion dataset. To get the data you can use the followi... | 26 | Custom feature types in `load_dataset` from CSV
I am trying to load a local file with the `load_dataset` function and I want to predefine the feature types with the `features` argument. However, the types are always the same independent of the value of `features`.
I am working with the local files from the emotio... | [
0.08020319044589996,
-0.2782894968986511,
-0.053178947418928146,
0.35092276334762573,
0.31722939014434814,
-0.19431041181087494,
0.5701335072517395,
0.11138424277305603,
0.44612523913383484,
0.025330446660518646,
0.09474451839923859,
0.31617727875709534,
-0.09191003441810608,
0.39011546969... |
https://github.com/huggingface/datasets/issues/623 | Custom feature types in `load_dataset` from CSV | > In general, I don't think there is any hard reason we don't allow to use `features` in the csv script, right @lhoestq?
>
> Should I add it?
Sure let's add it. Setting the convert options should do the job
> Hi @lhoestq we've tried out your suggestion but are now running into the following error:
>
> ```
... | I am trying to load a local file with the `load_dataset` function and I want to predefine the feature types with the `features` argument. However, the types are always the same independent of the value of `features`.
I am working with the local files from the emotion dataset. To get the data you can use the followi... | 136 | Custom feature types in `load_dataset` from CSV
I am trying to load a local file with the `load_dataset` function and I want to predefine the feature types with the `features` argument. However, the types are always the same independent of the value of `features`.
I am working with the local files from the emotio... | [
0.08020319044589996,
-0.2782894968986511,
-0.053178947418928146,
0.35092276334762573,
0.31722939014434814,
-0.19431041181087494,
0.5701335072517395,
0.11138424277305603,
0.44612523913383484,
0.025330446660518646,
0.09474451839923859,
0.31617727875709534,
-0.09191003441810608,
0.39011546969... |
https://github.com/huggingface/datasets/issues/623 | Custom feature types in `load_dataset` from CSV | PR is open for the `ValueError: Target schema's field names are not matching the table's field names` error.
I'm adding the features parameter to csv | I am trying to load a local file with the `load_dataset` function and I want to predefine the feature types with the `features` argument. However, the types are always the same independent of the value of `features`.
I am working with the local files from the emotion dataset. To get the data you can use the followi... | 25 | Custom feature types in `load_dataset` from CSV
I am trying to load a local file with the `load_dataset` function and I want to predefine the feature types with the `features` argument. However, the types are always the same independent of the value of `features`.
I am working with the local files from the emotio... | [
0.08020319044589996,
-0.2782894968986511,
-0.053178947418928146,
0.35092276334762573,
0.31722939014434814,
-0.19431041181087494,
0.5701335072517395,
0.11138424277305603,
0.44612523913383484,
0.025330446660518646,
0.09474451839923859,
0.31617727875709534,
-0.09191003441810608,
0.39011546969... |
https://github.com/huggingface/datasets/issues/622 | load_dataset for text files not working | @thomwolf Sure. I'll try downgrading to 3.7 now even though Arrow say they support >=3.5.
Linux (Ubuntu 18.04) - Python 3.8
======================
Package - Version
---------------------
certifi 2020.6.20
chardet 3.0.4
click 7.1.2
datasets 1.0.1
di... | Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loading_datasets.html#json-files) shows that ... | 194 | load_dataset for text files not working
Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loa... | [
-0.27466508746147156,
-0.4020572602748871,
0.01756073161959648,
0.38725215196609497,
0.26964259147644043,
-0.038661353290081024,
0.318887859582901,
-0.05435653403401375,
0.4263593256473541,
-0.058048903942108154,
0.06597194820642471,
0.14552471041679382,
-0.15576286613941193,
0.27420055866... |
https://github.com/huggingface/datasets/issues/622 | load_dataset for text files not working | Downgrading to 3.7 does not help. Here is a dummy text file:
```text
Verzekering weigert vaker te betalen
Bedrijven van verzekeringen erkennen steeds minder arbeidsongevallen .
In 2012 weigerden de bedrijven te betalen voor 21.055 ongevallen op het werk .
Dat is 11,8 % van alle ongevallen op het werk .
Nog nooi... | Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loading_datasets.html#json-files) shows that ... | 120 | load_dataset for text files not working
Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loa... | [
-0.27466508746147156,
-0.4020572602748871,
0.01756073161959648,
0.38725215196609497,
0.26964259147644043,
-0.038661353290081024,
0.318887859582901,
-0.05435653403401375,
0.4263593256473541,
-0.058048903942108154,
0.06597194820642471,
0.14552471041679382,
-0.15576286613941193,
0.27420055866... |
https://github.com/huggingface/datasets/issues/622 | load_dataset for text files not working | @banunitte Please do not post screenshots in the future but copy-paste your code and the errors. That allows others to copy-and-paste your code and test it. You may also want to provide the Python version that you are using. | Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loading_datasets.html#json-files) shows that ... | 39 | load_dataset for text files not working
Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loa... | [
-0.27466508746147156,
-0.4020572602748871,
0.01756073161959648,
0.38725215196609497,
0.26964259147644043,
-0.038661353290081024,
0.318887859582901,
-0.05435653403401375,
0.4263593256473541,
-0.058048903942108154,
0.06597194820642471,
0.14552471041679382,
-0.15576286613941193,
0.27420055866... |
https://github.com/huggingface/datasets/issues/622 | load_dataset for text files not working | I have the same problem on Linux of the script crashing with a CSV error. This may be caused by 'CRLF', when changed 'CRLF' to 'LF', the problem solved. | Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loading_datasets.html#json-files) shows that ... | 29 | load_dataset for text files not working
Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loa... | [
-0.27466508746147156,
-0.4020572602748871,
0.01756073161959648,
0.38725215196609497,
0.26964259147644043,
-0.038661353290081024,
0.318887859582901,
-0.05435653403401375,
0.4263593256473541,
-0.058048903942108154,
0.06597194820642471,
0.14552471041679382,
-0.15576286613941193,
0.27420055866... |
https://github.com/huggingface/datasets/issues/622 | load_dataset for text files not working | I pushed a fix for `pyarrow.lib.ArrowInvalid: CSV parse error`. Let me know if you still have this issue.
Not sure about the windows one yet | Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loading_datasets.html#json-files) shows that ... | 25 | load_dataset for text files not working
Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loa... | [
-0.27466508746147156,
-0.4020572602748871,
0.01756073161959648,
0.38725215196609497,
0.26964259147644043,
-0.038661353290081024,
0.318887859582901,
-0.05435653403401375,
0.4263593256473541,
-0.058048903942108154,
0.06597194820642471,
0.14552471041679382,
-0.15576286613941193,
0.27420055866... |
https://github.com/huggingface/datasets/issues/622 | load_dataset for text files not working | To complete what @lhoestq is saying, I think that to use the new version of the `text` processing script (which is on master right now) you need to either specify the version of the script to be the `master` one or to install the lib from source (in which case it uses the `master` version of the script by default):
``... | Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loading_datasets.html#json-files) shows that ... | 107 | load_dataset for text files not working
Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loa... | [
-0.27466508746147156,
-0.4020572602748871,
0.01756073161959648,
0.38725215196609497,
0.26964259147644043,
-0.038661353290081024,
0.318887859582901,
-0.05435653403401375,
0.4263593256473541,
-0.058048903942108154,
0.06597194820642471,
0.14552471041679382,
-0.15576286613941193,
0.27420055866... |
https://github.com/huggingface/datasets/issues/622 | load_dataset for text files not working | 
win10, py3.6
```
from datasets import Features, Value, ClassLabel, load_dataset
features = Features({'text': Value('string'), 'ctext': Value('string')})
file_dict = {'train': PATH/'summary.csv'}
... | Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loading_datasets.html#json-files) shows that ... | 31 | load_dataset for text files not working
Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loa... | [
-0.27466508746147156,
-0.4020572602748871,
0.01756073161959648,
0.38725215196609497,
0.26964259147644043,
-0.038661353290081024,
0.318887859582901,
-0.05435653403401375,
0.4263593256473541,
-0.058048903942108154,
0.06597194820642471,
0.14552471041679382,
-0.15576286613941193,
0.27420055866... |
https://github.com/huggingface/datasets/issues/622 | load_dataset for text files not working | ```python
Traceback` (most recent call last):
File "main.py", line 281, in <module>
main()
File "main.py", line 190, in main
train_data, test_data = data_factory(
File "main.py", line 129, in data_factory
train_data = load_dataset('text',
File "/home/me/Downloads/datasets/src/datasets/load.... | Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loading_datasets.html#json-files) shows that ... | 135 | load_dataset for text files not working
Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loa... | [
-0.27466508746147156,
-0.4020572602748871,
0.01756073161959648,
0.38725215196609497,
0.26964259147644043,
-0.038661353290081024,
0.318887859582901,
-0.05435653403401375,
0.4263593256473541,
-0.058048903942108154,
0.06597194820642471,
0.14552471041679382,
-0.15576286613941193,
0.27420055866... |
https://github.com/huggingface/datasets/issues/622 | load_dataset for text files not working | > 
> win10, py3.6
>
> ```
> from datasets import Features, Value, ClassLabel, load_dataset
>
>
> features = Features({'text': Value('string'), 'ctext': Value('string')})
> file_dict = {'train': PATH/... | Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loading_datasets.html#json-files) shows that ... | 184 | load_dataset for text files not working
Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loa... | [
-0.27466508746147156,
-0.4020572602748871,
0.01756073161959648,
0.38725215196609497,
0.26964259147644043,
-0.038661353290081024,
0.318887859582901,
-0.05435653403401375,
0.4263593256473541,
-0.058048903942108154,
0.06597194820642471,
0.14552471041679382,
-0.15576286613941193,
0.27420055866... |
https://github.com/huggingface/datasets/issues/622 | load_dataset for text files not working | > To complete what @lhoestq is saying, I think that to use the new version of the `text` processing script (which is on master right now) you need to either specify the version of the script to be the `master` one or to install the lib from source (in which case it uses the `master` version of the script by default):
... | Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loading_datasets.html#json-files) shows that ... | 206 | load_dataset for text files not working
Trying the following snippet, I get different problems on Linux and Windows.
```python
dataset = load_dataset("text", data_files="data.txt")
# or
dataset = load_dataset("text", data_files=["data.txt"])
```
(ps [This example](https://huggingface.co/docs/datasets/loa... | [
-0.27466508746147156,
-0.4020572602748871,
0.01756073161959648,
0.38725215196609497,
0.26964259147644043,
-0.038661353290081024,
0.318887859582901,
-0.05435653403401375,
0.4263593256473541,
-0.058048903942108154,
0.06597194820642471,
0.14552471041679382,
-0.15576286613941193,
0.27420055866... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.