html_url
stringlengths 48
51
| title
stringlengths 5
268
| comments
stringlengths 63
51.8k
| body
stringlengths 0
36.2k
β | comment_length
int64 16
1.52k
| text
stringlengths 164
54.1k
| embeddings
sequence |
---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/3178 | "Property couldn't be hashed properly" even though fully picklable | I do not quite understand what you mean. as far as I can tell, using `to_bytes` does a pickle dump behind the scene (with `srsly`), recursively using `to_bytes` on the required objects. Therefore, the result of `to_bytes` is a deterministic pickle dump AFAICT. Or do you mean that you wish that using your own pickler and running `dumps(nlp)` should also be deterministic? I guess that would require `__setstate__` and `__getstate__` methods on all the objects that have to/from_bytes. I'll have a listen over at spaCy what they think, and if that would solve the issue. I'll try this locally first, if I find the time.
I agree that having the option to use a custom hasher would be useful. I like your suggestion!
EDIT: after trying some things and reading through their API, it seems that they explicitly do not want this. https://spacy.io/usage/saving-loading#pipeline
> When serializing the pipeline, keep in mind that this will only save out the binary data for the individual components to allow spaCy to restore them β not the entire objects. This is a good thing, because it makes serialization safe. But it also means that you have to take care of storing the config, which contains the pipeline configuration and all the relevant settings.
Best way forward therefore seems to implement the ability to specify a hasher depending on the objects that are pickled, as you suggested. I can work on this if that is useful. I could use some pointers as to how you would like to implement the `register_hash` functionality though. I assume using `catalogue` over at Explosion might be a good starting point.
| ## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 271 | "Property couldn't be hashed properly" even though fully picklable
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
I do not quite understand what you mean. as far as I can tell, using `to_bytes` does a pickle dump behind the scene (with `srsly`), recursively using `to_bytes` on the required objects. Therefore, the result of `to_bytes` is a deterministic pickle dump AFAICT. Or do you mean that you wish that using your own pickler and running `dumps(nlp)` should also be deterministic? I guess that would require `__setstate__` and `__getstate__` methods on all the objects that have to/from_bytes. I'll have a listen over at spaCy what they think, and if that would solve the issue. I'll try this locally first, if I find the time.
I agree that having the option to use a custom hasher would be useful. I like your suggestion!
EDIT: after trying some things and reading through their API, it seems that they explicitly do not want this. https://spacy.io/usage/saving-loading#pipeline
> When serializing the pipeline, keep in mind that this will only save out the binary data for the individual components to allow spaCy to restore them β not the entire objects. This is a good thing, because it makes serialization safe. But it also means that you have to take care of storing the config, which contains the pipeline configuration and all the relevant settings.
Best way forward therefore seems to implement the ability to specify a hasher depending on the objects that are pickled, as you suggested. I can work on this if that is useful. I could use some pointers as to how you would like to implement the `register_hash` functionality though. I assume using `catalogue` over at Explosion might be a good starting point.
| [
-0.0547037572,
-0.0296596158,
0.1383616775,
0.1674575657,
0.2572079003,
-0.1886388958,
0.3345493674,
0.0546137951,
0.0525931679,
0.1248953864,
0.0389523171,
0.5095518827,
-0.2360349447,
0.3779696524,
-0.1779329479,
0.0818778947,
0.0879114941,
-0.0570349731,
0.0878298432,
-0.1197966412,
-0.0697439685,
-0.0256732684,
-0.3639787436,
0.0150344642,
-0.5814357996,
-0.2471628636,
0.1233717129,
-0.0043504587,
-0.1769182086,
-0.3019955456,
0.1507757157,
-0.0842573196,
-0.0198123567,
0.0914173946,
-0.0001276944,
-0.0400400944,
0.2713608742,
-0.0208546668,
-0.0257947762,
-0.4120488167,
0.1907008439,
-0.3608407974,
0.0740303248,
-0.211347267,
-0.1636205316,
0.3611479104,
-0.2467535585,
-0.2143102884,
0.260607183,
0.0114906086,
0.0392241217,
0.3941231072,
0.0432313383,
0.2574501336,
-0.0588377379,
-0.0148635246,
-0.4733221233,
0.109114565,
0.1186906546,
0.1557988673,
-0.0484532043,
-0.019749077,
0.0093573071,
-0.1011296362,
-0.0401526913,
0.1538345963,
-0.237302959,
-0.0516985804,
0.1653799862,
0.0052834945,
0.0333908945,
-0.3204625547,
-0.3859625161,
-0.1491619647,
0.0474647768,
-0.5314664841,
0.4600654542,
0.0664499253,
0.1255585104,
0.1659148633,
-0.0848168954,
0.0914708599,
0.1008479819,
0.164870128,
0.2551167011,
0.4194827676,
-0.0190647002,
0.2278356701,
-0.0405594781,
-0.1689594835,
0.2658732235,
0.0705322027,
0.1795156002,
0.0836890414,
-0.0195625331,
-0.0307151452,
-0.1670056432,
0.2477212697,
0.2644006908,
-0.0484205522,
0.007160774,
0.1911672354,
-0.33025226,
0.0856915861,
0.1315112412,
-0.265206784,
0.2935669422,
0.4055650532,
-0.0374953933,
0.0583079755,
-0.4280025661,
0.0356123522,
0.0313389413,
-0.0029143307,
0.114661321,
0.1762257218,
0.202796936,
-0.1554870158,
-0.1113362238,
0.2510730624,
-0.4037123024,
-0.0514079742,
0.1103123873,
0.1127123684,
-0.1159863397,
-0.2407061011,
-0.192309469,
0.241377309,
-0.337374419,
-0.3447399735,
-0.0766617879,
0.0834250227,
-0.4073736072,
-0.0222928561,
0.0333841667,
0.1963319182,
0.377796948,
0.1117832139,
-0.1122461334,
0.1048943773,
-0.0382502154,
-0.2463395,
0.1190531179,
0.0087581398,
-0.159172371,
0.1909403354,
0.1781331003,
-0.4805569351,
-0.2565742433,
0.0611921549,
-0.2101026773,
0.0271804929,
-0.0223347694,
-0.0561760366,
-0.3674880564,
-0.103926219,
-0.010629083,
0.2302388847,
0.3314209282,
0.0433118492,
0.0690918565,
-0.3608968258,
-0.3603518009,
-0.2394995093,
0.0475333519,
0.2380011231,
-0.2766398787,
-0.2168492526,
-0.2440198362,
0.0189822223,
0.9000562429,
0.2183276415,
-0.0556712486,
0.0234984681,
-0.2343845814,
0.7594913244,
0.0905847177,
-0.1478681713,
-0.5776648521,
-0.167631045,
-0.0203919969,
0.1384986192,
0.0229974706,
0.0227617323,
0.3518770039,
0.0264439993,
0.3190077543,
0.3026783466,
0.1961114109,
-0.302872628,
-0.3790924549,
-0.142558828,
0.3757954538,
-0.3132485449,
0.1351573169,
0.1308348775,
0.3068951368,
0.4246308804,
0.2254492939,
0.2583018839,
0.1783137918,
-0.0941027328,
0.3221184313,
-0.0918224007,
-0.1540010273,
-0.1793636531,
-0.1915613562,
0.2066816986,
0.023735825,
0.2731806338,
-0.3610523045,
-0.1430864185,
0.0524439774,
0.176856339,
-0.1652963012,
-0.3081740141,
-0.0823015496,
0.0367540531,
-0.1271738857,
0.0828393549,
-0.1993957609,
-0.0555443875,
-0.1569062918,
0.0780029073,
0.119815439,
0.0761380196,
-0.1625960618,
-0.4827044308,
-0.1736913025,
0.2461585402,
0.3014327884,
0.0034809171,
-0.2449755818,
-0.0888495892,
0.1731424034,
-0.3360346854,
-0.1316605508,
0.2585936785,
0.3164643347,
0.0204325486,
0.0327867754,
0.010144542,
-0.0102995848,
-0.0306296796,
0.2863678038,
0.284411788,
-0.1854794919,
0.0013758254,
-0.1170924157,
0.1922469139,
0.4385982752,
-0.0604097769,
0.005020828,
-0.4889424145,
0.1553365141,
-0.0615307167,
0.4590315819,
0.3527908623,
-0.3520230651,
0.3137389719,
0.7528020144,
0.1944844574,
0.3439007401,
-0.0378361195,
0.0523134544,
0.0474330261,
0.1562965661,
-0.0160856824,
0.1846254468,
-0.0083616348,
0.1808769405,
0.1700421125,
-0.210577473,
-0.1544239074,
0.0091514932,
-0.0678443611,
-0.1412783265,
0.2443773746,
0.0432107039,
0.1253934354,
-0.170493111,
-0.1573505849,
0.0509857908,
0.306831181,
-0.3004431427,
-0.090945676,
-0.7436493635,
0.3857062459,
-0.0108448761,
-0.0645975247,
-0.1444186568,
-0.1175103709,
0.0300632454,
0.1875724941,
-0.1544266492,
0.2837776244,
-0.3315267563,
0.1442704648,
-0.0231079198,
-0.1037352756,
-0.0666976497,
0.0035622192,
-0.3922694623,
-0.0960427821,
0.1824147403,
0.0437409021,
0.158203274,
0.0307286568,
-0.1245734394,
-0.1211785525,
-0.1619984806,
0.207660377,
-0.101419501,
0.6599536538,
0.015188084,
-0.0401160829,
-0.2227500677,
-0.042441681,
0.3229544759,
0.0481723547,
-0.1957854331,
0.0668941289,
0.1534006298,
-0.2971335053,
-0.1280110329,
-0.0810010433,
-0.398724407,
-0.2029238939,
-0.0015435937,
0.0409982875,
0.1024120972,
0.1651544869,
-0.0439473428,
0.039993383,
-0.1767993867,
0.1112605929,
-0.1959138364,
-0.5463487506,
0.1524967402,
-0.0229182374,
-0.2902197242,
-0.1396175772,
-0.0799594223,
0.1385860592,
0.2206831872,
-0.0128688039,
0.115886189,
-0.2101252079,
0.4909321964,
0.0909305438,
-0.0949427634,
0.1557549387,
0.1762556434,
0.1384196877,
-0.2511658669,
-0.1176665872,
0.2310352772,
-0.3556729257,
0.283018142,
0.2095107585,
-0.1625982523,
0.3103232682,
0.5404540896,
0.0646587536,
-0.4485714436,
0.658018589,
-0.0632330701,
0.0367329642,
-0.0528674424,
-0.5302308798,
-0.1007553488,
0.0489967875,
-0.1999997497,
0.1675212532,
-0.2166356891,
0.3675014973,
0.2530467808,
-0.0938391387,
-0.4194611311,
-0.2844651639,
0.1701907665,
0.0100753186,
0.023203345,
0.018644521,
0.0716274157,
0.0931468233,
-0.2374302447,
0.0882018059,
0.1123885363,
-0.0080092251,
0.2254105508,
-0.3480645418,
-0.1606261879,
-0.0121608563,
0.1516553462,
0.0018499478,
0.6496222019,
-0.3341351151,
-0.0326856337,
0.0116718356,
0.1500446945,
0.5063470006,
-0.3134467602,
0.2174639851,
0.2441744208,
-0.1328842342,
0.2730717957,
-0.3095413744,
-0.2748121321,
0.4669102132,
0.151848644,
0.4360796511,
-0.2806734145,
0.089700073,
-0.0260195527,
0.1104194149,
0.0163213816,
0.0398565345,
-0.2078765035,
0.0274157599,
-0.2544297874,
0.1486523598,
-0.0139431125,
0.3509781957,
0.1144280434,
0.1137029156,
-0.2285264134,
-0.3311949968,
0.0212135985,
0.1344624609,
0.0931417122,
-0.1248481125,
0.3866323829,
-0.2869854867,
0.1531801671,
0.0576768927,
0.3597967327,
0.1018457413,
-0.4830713272,
-0.2248996049,
-0.1058279499,
0.1986412406,
0.2728036642,
-0.0880790949,
0.322096318,
-0.1087870523,
0.028251905,
0.0867958218,
0.2104933411,
0.1615778059,
0.1686565727,
-0.4326957464,
0.0554656982,
0.3112519085,
0.171020627,
-0.0361163542,
-0.022772342,
0.1751399785,
-0.3406805396,
0.4461533129,
0.2815915942,
1.2980004549,
-0.1158357859,
-0.0815618336,
-0.0376719497,
0.3427511454,
0.6281681657,
-0.0047751153,
-0.0637118965,
-0.2960307598,
-0.0373425521,
-0.0196647532,
-0.0832910836,
0.4282989502,
0.0768294036,
-0.110401392,
0.1596340835,
-0.4422547221,
-0.2462898344,
-0.0062782853,
0.0995812193,
-0.2199065089,
-0.1601839811,
0.1497466415,
-0.0449612848,
-0.3405068517,
0.3380144238,
-0.0139570013,
-0.0397674665,
-0.2785816789,
-0.1287188679,
-0.5075514913,
0.1321091056,
-0.2401426733,
0.077969633,
0.1785475165,
0.1499052346,
0.002595281,
-0.3315670788,
0.4971368909,
0.397376895,
-0.0863510743,
0.0583578572,
-0.0053254063,
-0.2267412841,
0.2406246066,
-0.0009640727,
0.5052663088,
0.1125775054,
-0.0049079708,
-0.2517134249,
0.0071727601,
-0.0144628156,
-0.2387796789,
-0.0017566568,
0.2449572682,
-0.3661653697,
-0.4907000661,
-0.0895317048,
0.0124477968,
-0.2250330448,
-0.0155829266,
0.0913009644,
-0.0856952518,
0.2112417519,
0.0587833337,
-0.1739728302,
-0.0077851992,
0.1336868703,
0.0580744855,
0.2336702049,
0.4034205675,
-0.0270993896,
-0.2810717523,
-0.065806061,
-0.050757613,
-0.1043203026,
0.0212903302,
0.0201701932,
-0.0487438813,
-0.2473257929,
-0.424144268,
0.4363887608,
0.3371751308,
0.1167273819,
-0.1022853702,
-0.4436214864,
-0.1478161514,
0.1858899593,
-0.1083173975,
-0.0321706422,
-0.1761490852,
0.8972696662,
-0.1178735048,
-0.1244419962,
-0.0896608382,
-0.0607659854,
-0.252043575,
0.0429904498,
0.2539970875,
0.1062388271,
-0.2125083655,
-0.0547054522,
-0.0610696971,
0.2394860685,
0.0623016544,
-0.0029367607,
-0.4034935534,
0.1946725547,
0.4432670474,
0.0760604963,
-0.1604299694,
-0.1373716891,
0.1805870533,
-0.2636670768,
-0.2539542019,
0.4749056697,
0.2321776003,
0.4184497595,
0.1967936158,
0.2749226987,
-0.0653802231,
0.0270640384,
-0.0921382904,
0.1749438047,
0.0017400493,
0.0215360802,
0.2186419815,
0.1148916781,
-0.204926759,
-0.1758001298,
-0.2116881907,
0.3480989933,
0.0008483459,
0.0011611009,
0.3057721853,
0.0638405457,
0.1857886165,
0.2191876024,
-0.0020264396,
-0.5876792073,
0.4587335289,
0.0280445293,
-0.4276821017,
-0.147218734,
0.0309781134,
0.0807972476,
-0.0735364631,
0.2868472934,
-0.2121807784,
0.2877137065,
-0.7462058067,
-0.0635889471,
0.5026014447,
-0.1601416469,
-0.0615712889,
-0.1991842091,
-0.1536071748,
0.3174808323,
0.28349787,
-0.0587094687,
0.0185796786,
0.4506964087,
-0.2275973707,
0.4550673664,
0.2652670741,
0.1009547412,
-0.0410911962,
-0.3341942132,
0.431022346,
0.2582305372,
0.2840678096,
0.1921057254,
-0.0064201425,
0.0553124249,
-0.0671324283,
-0.284339726,
0.0628115535,
0.3188642263,
-0.2507953048,
-0.1182130277,
-0.1136940941,
0.0208654497,
-0.323400259,
0.0282415543,
-0.0000111144,
0.3174370229,
0.3843381703,
-0.0727047101,
-0.2046419531,
-0.3929638565,
-0.0689787045,
0.1495275795,
0.0466881394,
-0.3392073512,
0.1224664226,
-0.1451081634,
-0.0543557666,
-0.2438494265,
0.1802670658,
0.3568904996,
0.4325848222,
0.1198400557,
-0.1940246522,
-0.3718809187,
0.1307142079,
-0.2088869661,
0.4987926483,
0.2577508092,
0.0108773643,
0.0827217922,
-0.115213275,
-0.0966749117,
0.3931744993,
0.3485361338,
0.1090464443,
-0.0801922008,
0.1890759766,
0.0699377954,
-0.1930680424,
0.0417050943,
0.0294961948,
-0.1845296323,
-0.0385489017,
0.4466285408,
0.1294782311,
0.3553231359,
-0.3326562941,
0.0218980368,
0.3511330783,
0.0810933858,
0.5432698131,
-0.0535807051,
-0.4718731046,
0.6238460541,
-0.5803315639,
0.3404592872,
-0.1978703886,
-0.3355073035,
-0.2210291475,
0.1417924166,
0.0583970137,
0.1976752281,
-0.1559436619,
0.5343947411,
-0.0876789615,
0.0118968263,
-0.1175985262,
0.0271564759,
-0.1152742282,
-0.1859707236,
0.0591473356,
-0.4235768616,
0.3720368445,
-0.162925899,
-0.0777222514,
-0.1368248016,
-0.4115264714,
0.3600969613,
0.1749584526,
0.2012335807,
0.4671104252,
0.5732735991,
-0.0765715986,
0.1230083928,
-0.3830678463,
-0.2349012792,
-0.1785785854,
0.3983487487,
-0.1059957221,
0.0254362319,
-0.041132655,
0.176678732,
-0.4238360822,
0.1713766158,
-0.3041483164,
-0.0763450265,
-0.1750941426,
0.2838480473,
-0.0343426019,
0.0743419528,
-0.2653817534,
0.4218532741,
-0.1129603907,
0.3408609033,
-0.2827915251,
-0.4867301285,
0.4779389501,
-0.5187080503,
-0.171952188,
0.0099418517,
0.1570142359,
0.2735477984,
-0.1657187194,
-0.4894462526,
-0.4313940704,
0.3024000525,
-0.1926945299,
-0.1562816948,
0.0346319228,
0.2694478929,
-0.0029802034,
-0.0985471159,
0.561190486,
-0.1310111433,
-0.224154368,
0.5392277241,
0.0612847582
] |
https://github.com/huggingface/datasets/issues/3178 | "Property couldn't be hashed properly" even though fully picklable | Interestingly, my PR does not solve the issue discussed above. The `tokenize` function hash is different on every run, because for some reason `nlp.__call__` has a different hash every time. The issue therefore seems to run much deeper than I thought. If you have any ideas, I'm all ears.
```shell
git clone https://github.com/explosion/spaCy.git
cd spaCy/
git checkout cab9209c3dfcd1b75dfe5657f10e52c4d847a3cf
cd ..
git clone https://github.com/BramVanroy/datasets.git
cd datasets
git checkout registry
pip install -e .
pip install ../spaCy
spacy download en_core_web_sm
```
```python
import spacy
from datasets import load_dataset
from datasets.fingerprint import Hasher
from datasets.utils.registry import hashers
@hashers.register(spacy.Language)
def hash_spacy_language(nlp):
return Hasher.hash(nlp.to_bytes())
def main():
fin = r"your/large/file"
nlp = spacy.load("en_core_web_sm")
# This is now always the same yay!
print(Hasher.hash(nlp))
def tokenize(l):
return {"tok": [t.text for t in nlp(l["text"])]}
ds = load_dataset("text", data_files=fin)
# But this is not...
print(Hasher.hash(tokenize))
# ... because of this
print(Hasher.hash(nlp.__call__))
ds = ds["train"].map(tokenize)
print(ds[0:2])
if __name__ == '__main__':
main()
``` | ## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 151 | "Property couldn't be hashed properly" even though fully picklable
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
Interestingly, my PR does not solve the issue discussed above. The `tokenize` function hash is different on every run, because for some reason `nlp.__call__` has a different hash every time. The issue therefore seems to run much deeper than I thought. If you have any ideas, I'm all ears.
```shell
git clone https://github.com/explosion/spaCy.git
cd spaCy/
git checkout cab9209c3dfcd1b75dfe5657f10e52c4d847a3cf
cd ..
git clone https://github.com/BramVanroy/datasets.git
cd datasets
git checkout registry
pip install -e .
pip install ../spaCy
spacy download en_core_web_sm
```
```python
import spacy
from datasets import load_dataset
from datasets.fingerprint import Hasher
from datasets.utils.registry import hashers
@hashers.register(spacy.Language)
def hash_spacy_language(nlp):
return Hasher.hash(nlp.to_bytes())
def main():
fin = r"your/large/file"
nlp = spacy.load("en_core_web_sm")
# This is now always the same yay!
print(Hasher.hash(nlp))
def tokenize(l):
return {"tok": [t.text for t in nlp(l["text"])]}
ds = load_dataset("text", data_files=fin)
# But this is not...
print(Hasher.hash(tokenize))
# ... because of this
print(Hasher.hash(nlp.__call__))
ds = ds["train"].map(tokenize)
print(ds[0:2])
if __name__ == '__main__':
main()
``` | [
-0.0547037572,
-0.0296596158,
0.1383616775,
0.1674575657,
0.2572079003,
-0.1886388958,
0.3345493674,
0.0546137951,
0.0525931679,
0.1248953864,
0.0389523171,
0.5095518827,
-0.2360349447,
0.3779696524,
-0.1779329479,
0.0818778947,
0.0879114941,
-0.0570349731,
0.0878298432,
-0.1197966412,
-0.0697439685,
-0.0256732684,
-0.3639787436,
0.0150344642,
-0.5814357996,
-0.2471628636,
0.1233717129,
-0.0043504587,
-0.1769182086,
-0.3019955456,
0.1507757157,
-0.0842573196,
-0.0198123567,
0.0914173946,
-0.0001276944,
-0.0400400944,
0.2713608742,
-0.0208546668,
-0.0257947762,
-0.4120488167,
0.1907008439,
-0.3608407974,
0.0740303248,
-0.211347267,
-0.1636205316,
0.3611479104,
-0.2467535585,
-0.2143102884,
0.260607183,
0.0114906086,
0.0392241217,
0.3941231072,
0.0432313383,
0.2574501336,
-0.0588377379,
-0.0148635246,
-0.4733221233,
0.109114565,
0.1186906546,
0.1557988673,
-0.0484532043,
-0.019749077,
0.0093573071,
-0.1011296362,
-0.0401526913,
0.1538345963,
-0.237302959,
-0.0516985804,
0.1653799862,
0.0052834945,
0.0333908945,
-0.3204625547,
-0.3859625161,
-0.1491619647,
0.0474647768,
-0.5314664841,
0.4600654542,
0.0664499253,
0.1255585104,
0.1659148633,
-0.0848168954,
0.0914708599,
0.1008479819,
0.164870128,
0.2551167011,
0.4194827676,
-0.0190647002,
0.2278356701,
-0.0405594781,
-0.1689594835,
0.2658732235,
0.0705322027,
0.1795156002,
0.0836890414,
-0.0195625331,
-0.0307151452,
-0.1670056432,
0.2477212697,
0.2644006908,
-0.0484205522,
0.007160774,
0.1911672354,
-0.33025226,
0.0856915861,
0.1315112412,
-0.265206784,
0.2935669422,
0.4055650532,
-0.0374953933,
0.0583079755,
-0.4280025661,
0.0356123522,
0.0313389413,
-0.0029143307,
0.114661321,
0.1762257218,
0.202796936,
-0.1554870158,
-0.1113362238,
0.2510730624,
-0.4037123024,
-0.0514079742,
0.1103123873,
0.1127123684,
-0.1159863397,
-0.2407061011,
-0.192309469,
0.241377309,
-0.337374419,
-0.3447399735,
-0.0766617879,
0.0834250227,
-0.4073736072,
-0.0222928561,
0.0333841667,
0.1963319182,
0.377796948,
0.1117832139,
-0.1122461334,
0.1048943773,
-0.0382502154,
-0.2463395,
0.1190531179,
0.0087581398,
-0.159172371,
0.1909403354,
0.1781331003,
-0.4805569351,
-0.2565742433,
0.0611921549,
-0.2101026773,
0.0271804929,
-0.0223347694,
-0.0561760366,
-0.3674880564,
-0.103926219,
-0.010629083,
0.2302388847,
0.3314209282,
0.0433118492,
0.0690918565,
-0.3608968258,
-0.3603518009,
-0.2394995093,
0.0475333519,
0.2380011231,
-0.2766398787,
-0.2168492526,
-0.2440198362,
0.0189822223,
0.9000562429,
0.2183276415,
-0.0556712486,
0.0234984681,
-0.2343845814,
0.7594913244,
0.0905847177,
-0.1478681713,
-0.5776648521,
-0.167631045,
-0.0203919969,
0.1384986192,
0.0229974706,
0.0227617323,
0.3518770039,
0.0264439993,
0.3190077543,
0.3026783466,
0.1961114109,
-0.302872628,
-0.3790924549,
-0.142558828,
0.3757954538,
-0.3132485449,
0.1351573169,
0.1308348775,
0.3068951368,
0.4246308804,
0.2254492939,
0.2583018839,
0.1783137918,
-0.0941027328,
0.3221184313,
-0.0918224007,
-0.1540010273,
-0.1793636531,
-0.1915613562,
0.2066816986,
0.023735825,
0.2731806338,
-0.3610523045,
-0.1430864185,
0.0524439774,
0.176856339,
-0.1652963012,
-0.3081740141,
-0.0823015496,
0.0367540531,
-0.1271738857,
0.0828393549,
-0.1993957609,
-0.0555443875,
-0.1569062918,
0.0780029073,
0.119815439,
0.0761380196,
-0.1625960618,
-0.4827044308,
-0.1736913025,
0.2461585402,
0.3014327884,
0.0034809171,
-0.2449755818,
-0.0888495892,
0.1731424034,
-0.3360346854,
-0.1316605508,
0.2585936785,
0.3164643347,
0.0204325486,
0.0327867754,
0.010144542,
-0.0102995848,
-0.0306296796,
0.2863678038,
0.284411788,
-0.1854794919,
0.0013758254,
-0.1170924157,
0.1922469139,
0.4385982752,
-0.0604097769,
0.005020828,
-0.4889424145,
0.1553365141,
-0.0615307167,
0.4590315819,
0.3527908623,
-0.3520230651,
0.3137389719,
0.7528020144,
0.1944844574,
0.3439007401,
-0.0378361195,
0.0523134544,
0.0474330261,
0.1562965661,
-0.0160856824,
0.1846254468,
-0.0083616348,
0.1808769405,
0.1700421125,
-0.210577473,
-0.1544239074,
0.0091514932,
-0.0678443611,
-0.1412783265,
0.2443773746,
0.0432107039,
0.1253934354,
-0.170493111,
-0.1573505849,
0.0509857908,
0.306831181,
-0.3004431427,
-0.090945676,
-0.7436493635,
0.3857062459,
-0.0108448761,
-0.0645975247,
-0.1444186568,
-0.1175103709,
0.0300632454,
0.1875724941,
-0.1544266492,
0.2837776244,
-0.3315267563,
0.1442704648,
-0.0231079198,
-0.1037352756,
-0.0666976497,
0.0035622192,
-0.3922694623,
-0.0960427821,
0.1824147403,
0.0437409021,
0.158203274,
0.0307286568,
-0.1245734394,
-0.1211785525,
-0.1619984806,
0.207660377,
-0.101419501,
0.6599536538,
0.015188084,
-0.0401160829,
-0.2227500677,
-0.042441681,
0.3229544759,
0.0481723547,
-0.1957854331,
0.0668941289,
0.1534006298,
-0.2971335053,
-0.1280110329,
-0.0810010433,
-0.398724407,
-0.2029238939,
-0.0015435937,
0.0409982875,
0.1024120972,
0.1651544869,
-0.0439473428,
0.039993383,
-0.1767993867,
0.1112605929,
-0.1959138364,
-0.5463487506,
0.1524967402,
-0.0229182374,
-0.2902197242,
-0.1396175772,
-0.0799594223,
0.1385860592,
0.2206831872,
-0.0128688039,
0.115886189,
-0.2101252079,
0.4909321964,
0.0909305438,
-0.0949427634,
0.1557549387,
0.1762556434,
0.1384196877,
-0.2511658669,
-0.1176665872,
0.2310352772,
-0.3556729257,
0.283018142,
0.2095107585,
-0.1625982523,
0.3103232682,
0.5404540896,
0.0646587536,
-0.4485714436,
0.658018589,
-0.0632330701,
0.0367329642,
-0.0528674424,
-0.5302308798,
-0.1007553488,
0.0489967875,
-0.1999997497,
0.1675212532,
-0.2166356891,
0.3675014973,
0.2530467808,
-0.0938391387,
-0.4194611311,
-0.2844651639,
0.1701907665,
0.0100753186,
0.023203345,
0.018644521,
0.0716274157,
0.0931468233,
-0.2374302447,
0.0882018059,
0.1123885363,
-0.0080092251,
0.2254105508,
-0.3480645418,
-0.1606261879,
-0.0121608563,
0.1516553462,
0.0018499478,
0.6496222019,
-0.3341351151,
-0.0326856337,
0.0116718356,
0.1500446945,
0.5063470006,
-0.3134467602,
0.2174639851,
0.2441744208,
-0.1328842342,
0.2730717957,
-0.3095413744,
-0.2748121321,
0.4669102132,
0.151848644,
0.4360796511,
-0.2806734145,
0.089700073,
-0.0260195527,
0.1104194149,
0.0163213816,
0.0398565345,
-0.2078765035,
0.0274157599,
-0.2544297874,
0.1486523598,
-0.0139431125,
0.3509781957,
0.1144280434,
0.1137029156,
-0.2285264134,
-0.3311949968,
0.0212135985,
0.1344624609,
0.0931417122,
-0.1248481125,
0.3866323829,
-0.2869854867,
0.1531801671,
0.0576768927,
0.3597967327,
0.1018457413,
-0.4830713272,
-0.2248996049,
-0.1058279499,
0.1986412406,
0.2728036642,
-0.0880790949,
0.322096318,
-0.1087870523,
0.028251905,
0.0867958218,
0.2104933411,
0.1615778059,
0.1686565727,
-0.4326957464,
0.0554656982,
0.3112519085,
0.171020627,
-0.0361163542,
-0.022772342,
0.1751399785,
-0.3406805396,
0.4461533129,
0.2815915942,
1.2980004549,
-0.1158357859,
-0.0815618336,
-0.0376719497,
0.3427511454,
0.6281681657,
-0.0047751153,
-0.0637118965,
-0.2960307598,
-0.0373425521,
-0.0196647532,
-0.0832910836,
0.4282989502,
0.0768294036,
-0.110401392,
0.1596340835,
-0.4422547221,
-0.2462898344,
-0.0062782853,
0.0995812193,
-0.2199065089,
-0.1601839811,
0.1497466415,
-0.0449612848,
-0.3405068517,
0.3380144238,
-0.0139570013,
-0.0397674665,
-0.2785816789,
-0.1287188679,
-0.5075514913,
0.1321091056,
-0.2401426733,
0.077969633,
0.1785475165,
0.1499052346,
0.002595281,
-0.3315670788,
0.4971368909,
0.397376895,
-0.0863510743,
0.0583578572,
-0.0053254063,
-0.2267412841,
0.2406246066,
-0.0009640727,
0.5052663088,
0.1125775054,
-0.0049079708,
-0.2517134249,
0.0071727601,
-0.0144628156,
-0.2387796789,
-0.0017566568,
0.2449572682,
-0.3661653697,
-0.4907000661,
-0.0895317048,
0.0124477968,
-0.2250330448,
-0.0155829266,
0.0913009644,
-0.0856952518,
0.2112417519,
0.0587833337,
-0.1739728302,
-0.0077851992,
0.1336868703,
0.0580744855,
0.2336702049,
0.4034205675,
-0.0270993896,
-0.2810717523,
-0.065806061,
-0.050757613,
-0.1043203026,
0.0212903302,
0.0201701932,
-0.0487438813,
-0.2473257929,
-0.424144268,
0.4363887608,
0.3371751308,
0.1167273819,
-0.1022853702,
-0.4436214864,
-0.1478161514,
0.1858899593,
-0.1083173975,
-0.0321706422,
-0.1761490852,
0.8972696662,
-0.1178735048,
-0.1244419962,
-0.0896608382,
-0.0607659854,
-0.252043575,
0.0429904498,
0.2539970875,
0.1062388271,
-0.2125083655,
-0.0547054522,
-0.0610696971,
0.2394860685,
0.0623016544,
-0.0029367607,
-0.4034935534,
0.1946725547,
0.4432670474,
0.0760604963,
-0.1604299694,
-0.1373716891,
0.1805870533,
-0.2636670768,
-0.2539542019,
0.4749056697,
0.2321776003,
0.4184497595,
0.1967936158,
0.2749226987,
-0.0653802231,
0.0270640384,
-0.0921382904,
0.1749438047,
0.0017400493,
0.0215360802,
0.2186419815,
0.1148916781,
-0.204926759,
-0.1758001298,
-0.2116881907,
0.3480989933,
0.0008483459,
0.0011611009,
0.3057721853,
0.0638405457,
0.1857886165,
0.2191876024,
-0.0020264396,
-0.5876792073,
0.4587335289,
0.0280445293,
-0.4276821017,
-0.147218734,
0.0309781134,
0.0807972476,
-0.0735364631,
0.2868472934,
-0.2121807784,
0.2877137065,
-0.7462058067,
-0.0635889471,
0.5026014447,
-0.1601416469,
-0.0615712889,
-0.1991842091,
-0.1536071748,
0.3174808323,
0.28349787,
-0.0587094687,
0.0185796786,
0.4506964087,
-0.2275973707,
0.4550673664,
0.2652670741,
0.1009547412,
-0.0410911962,
-0.3341942132,
0.431022346,
0.2582305372,
0.2840678096,
0.1921057254,
-0.0064201425,
0.0553124249,
-0.0671324283,
-0.284339726,
0.0628115535,
0.3188642263,
-0.2507953048,
-0.1182130277,
-0.1136940941,
0.0208654497,
-0.323400259,
0.0282415543,
-0.0000111144,
0.3174370229,
0.3843381703,
-0.0727047101,
-0.2046419531,
-0.3929638565,
-0.0689787045,
0.1495275795,
0.0466881394,
-0.3392073512,
0.1224664226,
-0.1451081634,
-0.0543557666,
-0.2438494265,
0.1802670658,
0.3568904996,
0.4325848222,
0.1198400557,
-0.1940246522,
-0.3718809187,
0.1307142079,
-0.2088869661,
0.4987926483,
0.2577508092,
0.0108773643,
0.0827217922,
-0.115213275,
-0.0966749117,
0.3931744993,
0.3485361338,
0.1090464443,
-0.0801922008,
0.1890759766,
0.0699377954,
-0.1930680424,
0.0417050943,
0.0294961948,
-0.1845296323,
-0.0385489017,
0.4466285408,
0.1294782311,
0.3553231359,
-0.3326562941,
0.0218980368,
0.3511330783,
0.0810933858,
0.5432698131,
-0.0535807051,
-0.4718731046,
0.6238460541,
-0.5803315639,
0.3404592872,
-0.1978703886,
-0.3355073035,
-0.2210291475,
0.1417924166,
0.0583970137,
0.1976752281,
-0.1559436619,
0.5343947411,
-0.0876789615,
0.0118968263,
-0.1175985262,
0.0271564759,
-0.1152742282,
-0.1859707236,
0.0591473356,
-0.4235768616,
0.3720368445,
-0.162925899,
-0.0777222514,
-0.1368248016,
-0.4115264714,
0.3600969613,
0.1749584526,
0.2012335807,
0.4671104252,
0.5732735991,
-0.0765715986,
0.1230083928,
-0.3830678463,
-0.2349012792,
-0.1785785854,
0.3983487487,
-0.1059957221,
0.0254362319,
-0.041132655,
0.176678732,
-0.4238360822,
0.1713766158,
-0.3041483164,
-0.0763450265,
-0.1750941426,
0.2838480473,
-0.0343426019,
0.0743419528,
-0.2653817534,
0.4218532741,
-0.1129603907,
0.3408609033,
-0.2827915251,
-0.4867301285,
0.4779389501,
-0.5187080503,
-0.171952188,
0.0099418517,
0.1570142359,
0.2735477984,
-0.1657187194,
-0.4894462526,
-0.4313940704,
0.3024000525,
-0.1926945299,
-0.1562816948,
0.0346319228,
0.2694478929,
-0.0029802034,
-0.0985471159,
0.561190486,
-0.1310111433,
-0.224154368,
0.5392277241,
0.0612847582
] |
https://github.com/huggingface/datasets/issues/3178 | "Property couldn't be hashed properly" even though fully picklable | Hi ! I just answered in your PR :) In order for your custom hashing to be used for nested objects, you must integrate it into our recursive pickler that we use for hashing. | ## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 34 | "Property couldn't be hashed properly" even though fully picklable
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
Hi ! I just answered in your PR :) In order for your custom hashing to be used for nested objects, you must integrate it into our recursive pickler that we use for hashing. | [
-0.0547037572,
-0.0296596158,
0.1383616775,
0.1674575657,
0.2572079003,
-0.1886388958,
0.3345493674,
0.0546137951,
0.0525931679,
0.1248953864,
0.0389523171,
0.5095518827,
-0.2360349447,
0.3779696524,
-0.1779329479,
0.0818778947,
0.0879114941,
-0.0570349731,
0.0878298432,
-0.1197966412,
-0.0697439685,
-0.0256732684,
-0.3639787436,
0.0150344642,
-0.5814357996,
-0.2471628636,
0.1233717129,
-0.0043504587,
-0.1769182086,
-0.3019955456,
0.1507757157,
-0.0842573196,
-0.0198123567,
0.0914173946,
-0.0001276944,
-0.0400400944,
0.2713608742,
-0.0208546668,
-0.0257947762,
-0.4120488167,
0.1907008439,
-0.3608407974,
0.0740303248,
-0.211347267,
-0.1636205316,
0.3611479104,
-0.2467535585,
-0.2143102884,
0.260607183,
0.0114906086,
0.0392241217,
0.3941231072,
0.0432313383,
0.2574501336,
-0.0588377379,
-0.0148635246,
-0.4733221233,
0.109114565,
0.1186906546,
0.1557988673,
-0.0484532043,
-0.019749077,
0.0093573071,
-0.1011296362,
-0.0401526913,
0.1538345963,
-0.237302959,
-0.0516985804,
0.1653799862,
0.0052834945,
0.0333908945,
-0.3204625547,
-0.3859625161,
-0.1491619647,
0.0474647768,
-0.5314664841,
0.4600654542,
0.0664499253,
0.1255585104,
0.1659148633,
-0.0848168954,
0.0914708599,
0.1008479819,
0.164870128,
0.2551167011,
0.4194827676,
-0.0190647002,
0.2278356701,
-0.0405594781,
-0.1689594835,
0.2658732235,
0.0705322027,
0.1795156002,
0.0836890414,
-0.0195625331,
-0.0307151452,
-0.1670056432,
0.2477212697,
0.2644006908,
-0.0484205522,
0.007160774,
0.1911672354,
-0.33025226,
0.0856915861,
0.1315112412,
-0.265206784,
0.2935669422,
0.4055650532,
-0.0374953933,
0.0583079755,
-0.4280025661,
0.0356123522,
0.0313389413,
-0.0029143307,
0.114661321,
0.1762257218,
0.202796936,
-0.1554870158,
-0.1113362238,
0.2510730624,
-0.4037123024,
-0.0514079742,
0.1103123873,
0.1127123684,
-0.1159863397,
-0.2407061011,
-0.192309469,
0.241377309,
-0.337374419,
-0.3447399735,
-0.0766617879,
0.0834250227,
-0.4073736072,
-0.0222928561,
0.0333841667,
0.1963319182,
0.377796948,
0.1117832139,
-0.1122461334,
0.1048943773,
-0.0382502154,
-0.2463395,
0.1190531179,
0.0087581398,
-0.159172371,
0.1909403354,
0.1781331003,
-0.4805569351,
-0.2565742433,
0.0611921549,
-0.2101026773,
0.0271804929,
-0.0223347694,
-0.0561760366,
-0.3674880564,
-0.103926219,
-0.010629083,
0.2302388847,
0.3314209282,
0.0433118492,
0.0690918565,
-0.3608968258,
-0.3603518009,
-0.2394995093,
0.0475333519,
0.2380011231,
-0.2766398787,
-0.2168492526,
-0.2440198362,
0.0189822223,
0.9000562429,
0.2183276415,
-0.0556712486,
0.0234984681,
-0.2343845814,
0.7594913244,
0.0905847177,
-0.1478681713,
-0.5776648521,
-0.167631045,
-0.0203919969,
0.1384986192,
0.0229974706,
0.0227617323,
0.3518770039,
0.0264439993,
0.3190077543,
0.3026783466,
0.1961114109,
-0.302872628,
-0.3790924549,
-0.142558828,
0.3757954538,
-0.3132485449,
0.1351573169,
0.1308348775,
0.3068951368,
0.4246308804,
0.2254492939,
0.2583018839,
0.1783137918,
-0.0941027328,
0.3221184313,
-0.0918224007,
-0.1540010273,
-0.1793636531,
-0.1915613562,
0.2066816986,
0.023735825,
0.2731806338,
-0.3610523045,
-0.1430864185,
0.0524439774,
0.176856339,
-0.1652963012,
-0.3081740141,
-0.0823015496,
0.0367540531,
-0.1271738857,
0.0828393549,
-0.1993957609,
-0.0555443875,
-0.1569062918,
0.0780029073,
0.119815439,
0.0761380196,
-0.1625960618,
-0.4827044308,
-0.1736913025,
0.2461585402,
0.3014327884,
0.0034809171,
-0.2449755818,
-0.0888495892,
0.1731424034,
-0.3360346854,
-0.1316605508,
0.2585936785,
0.3164643347,
0.0204325486,
0.0327867754,
0.010144542,
-0.0102995848,
-0.0306296796,
0.2863678038,
0.284411788,
-0.1854794919,
0.0013758254,
-0.1170924157,
0.1922469139,
0.4385982752,
-0.0604097769,
0.005020828,
-0.4889424145,
0.1553365141,
-0.0615307167,
0.4590315819,
0.3527908623,
-0.3520230651,
0.3137389719,
0.7528020144,
0.1944844574,
0.3439007401,
-0.0378361195,
0.0523134544,
0.0474330261,
0.1562965661,
-0.0160856824,
0.1846254468,
-0.0083616348,
0.1808769405,
0.1700421125,
-0.210577473,
-0.1544239074,
0.0091514932,
-0.0678443611,
-0.1412783265,
0.2443773746,
0.0432107039,
0.1253934354,
-0.170493111,
-0.1573505849,
0.0509857908,
0.306831181,
-0.3004431427,
-0.090945676,
-0.7436493635,
0.3857062459,
-0.0108448761,
-0.0645975247,
-0.1444186568,
-0.1175103709,
0.0300632454,
0.1875724941,
-0.1544266492,
0.2837776244,
-0.3315267563,
0.1442704648,
-0.0231079198,
-0.1037352756,
-0.0666976497,
0.0035622192,
-0.3922694623,
-0.0960427821,
0.1824147403,
0.0437409021,
0.158203274,
0.0307286568,
-0.1245734394,
-0.1211785525,
-0.1619984806,
0.207660377,
-0.101419501,
0.6599536538,
0.015188084,
-0.0401160829,
-0.2227500677,
-0.042441681,
0.3229544759,
0.0481723547,
-0.1957854331,
0.0668941289,
0.1534006298,
-0.2971335053,
-0.1280110329,
-0.0810010433,
-0.398724407,
-0.2029238939,
-0.0015435937,
0.0409982875,
0.1024120972,
0.1651544869,
-0.0439473428,
0.039993383,
-0.1767993867,
0.1112605929,
-0.1959138364,
-0.5463487506,
0.1524967402,
-0.0229182374,
-0.2902197242,
-0.1396175772,
-0.0799594223,
0.1385860592,
0.2206831872,
-0.0128688039,
0.115886189,
-0.2101252079,
0.4909321964,
0.0909305438,
-0.0949427634,
0.1557549387,
0.1762556434,
0.1384196877,
-0.2511658669,
-0.1176665872,
0.2310352772,
-0.3556729257,
0.283018142,
0.2095107585,
-0.1625982523,
0.3103232682,
0.5404540896,
0.0646587536,
-0.4485714436,
0.658018589,
-0.0632330701,
0.0367329642,
-0.0528674424,
-0.5302308798,
-0.1007553488,
0.0489967875,
-0.1999997497,
0.1675212532,
-0.2166356891,
0.3675014973,
0.2530467808,
-0.0938391387,
-0.4194611311,
-0.2844651639,
0.1701907665,
0.0100753186,
0.023203345,
0.018644521,
0.0716274157,
0.0931468233,
-0.2374302447,
0.0882018059,
0.1123885363,
-0.0080092251,
0.2254105508,
-0.3480645418,
-0.1606261879,
-0.0121608563,
0.1516553462,
0.0018499478,
0.6496222019,
-0.3341351151,
-0.0326856337,
0.0116718356,
0.1500446945,
0.5063470006,
-0.3134467602,
0.2174639851,
0.2441744208,
-0.1328842342,
0.2730717957,
-0.3095413744,
-0.2748121321,
0.4669102132,
0.151848644,
0.4360796511,
-0.2806734145,
0.089700073,
-0.0260195527,
0.1104194149,
0.0163213816,
0.0398565345,
-0.2078765035,
0.0274157599,
-0.2544297874,
0.1486523598,
-0.0139431125,
0.3509781957,
0.1144280434,
0.1137029156,
-0.2285264134,
-0.3311949968,
0.0212135985,
0.1344624609,
0.0931417122,
-0.1248481125,
0.3866323829,
-0.2869854867,
0.1531801671,
0.0576768927,
0.3597967327,
0.1018457413,
-0.4830713272,
-0.2248996049,
-0.1058279499,
0.1986412406,
0.2728036642,
-0.0880790949,
0.322096318,
-0.1087870523,
0.028251905,
0.0867958218,
0.2104933411,
0.1615778059,
0.1686565727,
-0.4326957464,
0.0554656982,
0.3112519085,
0.171020627,
-0.0361163542,
-0.022772342,
0.1751399785,
-0.3406805396,
0.4461533129,
0.2815915942,
1.2980004549,
-0.1158357859,
-0.0815618336,
-0.0376719497,
0.3427511454,
0.6281681657,
-0.0047751153,
-0.0637118965,
-0.2960307598,
-0.0373425521,
-0.0196647532,
-0.0832910836,
0.4282989502,
0.0768294036,
-0.110401392,
0.1596340835,
-0.4422547221,
-0.2462898344,
-0.0062782853,
0.0995812193,
-0.2199065089,
-0.1601839811,
0.1497466415,
-0.0449612848,
-0.3405068517,
0.3380144238,
-0.0139570013,
-0.0397674665,
-0.2785816789,
-0.1287188679,
-0.5075514913,
0.1321091056,
-0.2401426733,
0.077969633,
0.1785475165,
0.1499052346,
0.002595281,
-0.3315670788,
0.4971368909,
0.397376895,
-0.0863510743,
0.0583578572,
-0.0053254063,
-0.2267412841,
0.2406246066,
-0.0009640727,
0.5052663088,
0.1125775054,
-0.0049079708,
-0.2517134249,
0.0071727601,
-0.0144628156,
-0.2387796789,
-0.0017566568,
0.2449572682,
-0.3661653697,
-0.4907000661,
-0.0895317048,
0.0124477968,
-0.2250330448,
-0.0155829266,
0.0913009644,
-0.0856952518,
0.2112417519,
0.0587833337,
-0.1739728302,
-0.0077851992,
0.1336868703,
0.0580744855,
0.2336702049,
0.4034205675,
-0.0270993896,
-0.2810717523,
-0.065806061,
-0.050757613,
-0.1043203026,
0.0212903302,
0.0201701932,
-0.0487438813,
-0.2473257929,
-0.424144268,
0.4363887608,
0.3371751308,
0.1167273819,
-0.1022853702,
-0.4436214864,
-0.1478161514,
0.1858899593,
-0.1083173975,
-0.0321706422,
-0.1761490852,
0.8972696662,
-0.1178735048,
-0.1244419962,
-0.0896608382,
-0.0607659854,
-0.252043575,
0.0429904498,
0.2539970875,
0.1062388271,
-0.2125083655,
-0.0547054522,
-0.0610696971,
0.2394860685,
0.0623016544,
-0.0029367607,
-0.4034935534,
0.1946725547,
0.4432670474,
0.0760604963,
-0.1604299694,
-0.1373716891,
0.1805870533,
-0.2636670768,
-0.2539542019,
0.4749056697,
0.2321776003,
0.4184497595,
0.1967936158,
0.2749226987,
-0.0653802231,
0.0270640384,
-0.0921382904,
0.1749438047,
0.0017400493,
0.0215360802,
0.2186419815,
0.1148916781,
-0.204926759,
-0.1758001298,
-0.2116881907,
0.3480989933,
0.0008483459,
0.0011611009,
0.3057721853,
0.0638405457,
0.1857886165,
0.2191876024,
-0.0020264396,
-0.5876792073,
0.4587335289,
0.0280445293,
-0.4276821017,
-0.147218734,
0.0309781134,
0.0807972476,
-0.0735364631,
0.2868472934,
-0.2121807784,
0.2877137065,
-0.7462058067,
-0.0635889471,
0.5026014447,
-0.1601416469,
-0.0615712889,
-0.1991842091,
-0.1536071748,
0.3174808323,
0.28349787,
-0.0587094687,
0.0185796786,
0.4506964087,
-0.2275973707,
0.4550673664,
0.2652670741,
0.1009547412,
-0.0410911962,
-0.3341942132,
0.431022346,
0.2582305372,
0.2840678096,
0.1921057254,
-0.0064201425,
0.0553124249,
-0.0671324283,
-0.284339726,
0.0628115535,
0.3188642263,
-0.2507953048,
-0.1182130277,
-0.1136940941,
0.0208654497,
-0.323400259,
0.0282415543,
-0.0000111144,
0.3174370229,
0.3843381703,
-0.0727047101,
-0.2046419531,
-0.3929638565,
-0.0689787045,
0.1495275795,
0.0466881394,
-0.3392073512,
0.1224664226,
-0.1451081634,
-0.0543557666,
-0.2438494265,
0.1802670658,
0.3568904996,
0.4325848222,
0.1198400557,
-0.1940246522,
-0.3718809187,
0.1307142079,
-0.2088869661,
0.4987926483,
0.2577508092,
0.0108773643,
0.0827217922,
-0.115213275,
-0.0966749117,
0.3931744993,
0.3485361338,
0.1090464443,
-0.0801922008,
0.1890759766,
0.0699377954,
-0.1930680424,
0.0417050943,
0.0294961948,
-0.1845296323,
-0.0385489017,
0.4466285408,
0.1294782311,
0.3553231359,
-0.3326562941,
0.0218980368,
0.3511330783,
0.0810933858,
0.5432698131,
-0.0535807051,
-0.4718731046,
0.6238460541,
-0.5803315639,
0.3404592872,
-0.1978703886,
-0.3355073035,
-0.2210291475,
0.1417924166,
0.0583970137,
0.1976752281,
-0.1559436619,
0.5343947411,
-0.0876789615,
0.0118968263,
-0.1175985262,
0.0271564759,
-0.1152742282,
-0.1859707236,
0.0591473356,
-0.4235768616,
0.3720368445,
-0.162925899,
-0.0777222514,
-0.1368248016,
-0.4115264714,
0.3600969613,
0.1749584526,
0.2012335807,
0.4671104252,
0.5732735991,
-0.0765715986,
0.1230083928,
-0.3830678463,
-0.2349012792,
-0.1785785854,
0.3983487487,
-0.1059957221,
0.0254362319,
-0.041132655,
0.176678732,
-0.4238360822,
0.1713766158,
-0.3041483164,
-0.0763450265,
-0.1750941426,
0.2838480473,
-0.0343426019,
0.0743419528,
-0.2653817534,
0.4218532741,
-0.1129603907,
0.3408609033,
-0.2827915251,
-0.4867301285,
0.4779389501,
-0.5187080503,
-0.171952188,
0.0099418517,
0.1570142359,
0.2735477984,
-0.1657187194,
-0.4894462526,
-0.4313940704,
0.3024000525,
-0.1926945299,
-0.1562816948,
0.0346319228,
0.2694478929,
-0.0029802034,
-0.0985471159,
0.561190486,
-0.1310111433,
-0.224154368,
0.5392277241,
0.0612847582
] |
https://github.com/huggingface/datasets/issues/3178 | "Property couldn't be hashed properly" even though fully picklable | I don't quite understand the design constraints of `datasets` or the script that you're running, but my usual advice is to avoid using pickle unless you _absolutely_ have to. So for instance instead of doing your `partial` over the `nlp` object itself, can you just pass the string `en_core_web_sm` in? This will mean calling `spacy.load()` inside the work function, but this is no worse than having to call `pickle.load()` on the contents of the NLP object anyway -- in fact you'll generally find `spacy.load()` faster, apart from the disk read.
If you need to pass in the bytes data and don't want to read from disk, you could do something like this:
```
msg = (nlp.lang, nlp.to_bytes())
def unpack(lang, bytes_data):
return spacy.blank(lang).from_bytes(bytes_data)
```
I think that should probably work: the Thinc `model.to_dict()` method (which is used by the `model.to_bytes()` method) doesn't pack the model's ID into the message, so the `nlp.to_bytes()` that you get shouldn't be affected by the global IDs. So you should get a clean message from `nlp.to_bytes()` that doesn't depend on the global state. | ## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 177 | "Property couldn't be hashed properly" even though fully picklable
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
I don't quite understand the design constraints of `datasets` or the script that you're running, but my usual advice is to avoid using pickle unless you _absolutely_ have to. So for instance instead of doing your `partial` over the `nlp` object itself, can you just pass the string `en_core_web_sm` in? This will mean calling `spacy.load()` inside the work function, but this is no worse than having to call `pickle.load()` on the contents of the NLP object anyway -- in fact you'll generally find `spacy.load()` faster, apart from the disk read.
If you need to pass in the bytes data and don't want to read from disk, you could do something like this:
```
msg = (nlp.lang, nlp.to_bytes())
def unpack(lang, bytes_data):
return spacy.blank(lang).from_bytes(bytes_data)
```
I think that should probably work: the Thinc `model.to_dict()` method (which is used by the `model.to_bytes()` method) doesn't pack the model's ID into the message, so the `nlp.to_bytes()` that you get shouldn't be affected by the global IDs. So you should get a clean message from `nlp.to_bytes()` that doesn't depend on the global state. | [
-0.0547037572,
-0.0296596158,
0.1383616775,
0.1674575657,
0.2572079003,
-0.1886388958,
0.3345493674,
0.0546137951,
0.0525931679,
0.1248953864,
0.0389523171,
0.5095518827,
-0.2360349447,
0.3779696524,
-0.1779329479,
0.0818778947,
0.0879114941,
-0.0570349731,
0.0878298432,
-0.1197966412,
-0.0697439685,
-0.0256732684,
-0.3639787436,
0.0150344642,
-0.5814357996,
-0.2471628636,
0.1233717129,
-0.0043504587,
-0.1769182086,
-0.3019955456,
0.1507757157,
-0.0842573196,
-0.0198123567,
0.0914173946,
-0.0001276944,
-0.0400400944,
0.2713608742,
-0.0208546668,
-0.0257947762,
-0.4120488167,
0.1907008439,
-0.3608407974,
0.0740303248,
-0.211347267,
-0.1636205316,
0.3611479104,
-0.2467535585,
-0.2143102884,
0.260607183,
0.0114906086,
0.0392241217,
0.3941231072,
0.0432313383,
0.2574501336,
-0.0588377379,
-0.0148635246,
-0.4733221233,
0.109114565,
0.1186906546,
0.1557988673,
-0.0484532043,
-0.019749077,
0.0093573071,
-0.1011296362,
-0.0401526913,
0.1538345963,
-0.237302959,
-0.0516985804,
0.1653799862,
0.0052834945,
0.0333908945,
-0.3204625547,
-0.3859625161,
-0.1491619647,
0.0474647768,
-0.5314664841,
0.4600654542,
0.0664499253,
0.1255585104,
0.1659148633,
-0.0848168954,
0.0914708599,
0.1008479819,
0.164870128,
0.2551167011,
0.4194827676,
-0.0190647002,
0.2278356701,
-0.0405594781,
-0.1689594835,
0.2658732235,
0.0705322027,
0.1795156002,
0.0836890414,
-0.0195625331,
-0.0307151452,
-0.1670056432,
0.2477212697,
0.2644006908,
-0.0484205522,
0.007160774,
0.1911672354,
-0.33025226,
0.0856915861,
0.1315112412,
-0.265206784,
0.2935669422,
0.4055650532,
-0.0374953933,
0.0583079755,
-0.4280025661,
0.0356123522,
0.0313389413,
-0.0029143307,
0.114661321,
0.1762257218,
0.202796936,
-0.1554870158,
-0.1113362238,
0.2510730624,
-0.4037123024,
-0.0514079742,
0.1103123873,
0.1127123684,
-0.1159863397,
-0.2407061011,
-0.192309469,
0.241377309,
-0.337374419,
-0.3447399735,
-0.0766617879,
0.0834250227,
-0.4073736072,
-0.0222928561,
0.0333841667,
0.1963319182,
0.377796948,
0.1117832139,
-0.1122461334,
0.1048943773,
-0.0382502154,
-0.2463395,
0.1190531179,
0.0087581398,
-0.159172371,
0.1909403354,
0.1781331003,
-0.4805569351,
-0.2565742433,
0.0611921549,
-0.2101026773,
0.0271804929,
-0.0223347694,
-0.0561760366,
-0.3674880564,
-0.103926219,
-0.010629083,
0.2302388847,
0.3314209282,
0.0433118492,
0.0690918565,
-0.3608968258,
-0.3603518009,
-0.2394995093,
0.0475333519,
0.2380011231,
-0.2766398787,
-0.2168492526,
-0.2440198362,
0.0189822223,
0.9000562429,
0.2183276415,
-0.0556712486,
0.0234984681,
-0.2343845814,
0.7594913244,
0.0905847177,
-0.1478681713,
-0.5776648521,
-0.167631045,
-0.0203919969,
0.1384986192,
0.0229974706,
0.0227617323,
0.3518770039,
0.0264439993,
0.3190077543,
0.3026783466,
0.1961114109,
-0.302872628,
-0.3790924549,
-0.142558828,
0.3757954538,
-0.3132485449,
0.1351573169,
0.1308348775,
0.3068951368,
0.4246308804,
0.2254492939,
0.2583018839,
0.1783137918,
-0.0941027328,
0.3221184313,
-0.0918224007,
-0.1540010273,
-0.1793636531,
-0.1915613562,
0.2066816986,
0.023735825,
0.2731806338,
-0.3610523045,
-0.1430864185,
0.0524439774,
0.176856339,
-0.1652963012,
-0.3081740141,
-0.0823015496,
0.0367540531,
-0.1271738857,
0.0828393549,
-0.1993957609,
-0.0555443875,
-0.1569062918,
0.0780029073,
0.119815439,
0.0761380196,
-0.1625960618,
-0.4827044308,
-0.1736913025,
0.2461585402,
0.3014327884,
0.0034809171,
-0.2449755818,
-0.0888495892,
0.1731424034,
-0.3360346854,
-0.1316605508,
0.2585936785,
0.3164643347,
0.0204325486,
0.0327867754,
0.010144542,
-0.0102995848,
-0.0306296796,
0.2863678038,
0.284411788,
-0.1854794919,
0.0013758254,
-0.1170924157,
0.1922469139,
0.4385982752,
-0.0604097769,
0.005020828,
-0.4889424145,
0.1553365141,
-0.0615307167,
0.4590315819,
0.3527908623,
-0.3520230651,
0.3137389719,
0.7528020144,
0.1944844574,
0.3439007401,
-0.0378361195,
0.0523134544,
0.0474330261,
0.1562965661,
-0.0160856824,
0.1846254468,
-0.0083616348,
0.1808769405,
0.1700421125,
-0.210577473,
-0.1544239074,
0.0091514932,
-0.0678443611,
-0.1412783265,
0.2443773746,
0.0432107039,
0.1253934354,
-0.170493111,
-0.1573505849,
0.0509857908,
0.306831181,
-0.3004431427,
-0.090945676,
-0.7436493635,
0.3857062459,
-0.0108448761,
-0.0645975247,
-0.1444186568,
-0.1175103709,
0.0300632454,
0.1875724941,
-0.1544266492,
0.2837776244,
-0.3315267563,
0.1442704648,
-0.0231079198,
-0.1037352756,
-0.0666976497,
0.0035622192,
-0.3922694623,
-0.0960427821,
0.1824147403,
0.0437409021,
0.158203274,
0.0307286568,
-0.1245734394,
-0.1211785525,
-0.1619984806,
0.207660377,
-0.101419501,
0.6599536538,
0.015188084,
-0.0401160829,
-0.2227500677,
-0.042441681,
0.3229544759,
0.0481723547,
-0.1957854331,
0.0668941289,
0.1534006298,
-0.2971335053,
-0.1280110329,
-0.0810010433,
-0.398724407,
-0.2029238939,
-0.0015435937,
0.0409982875,
0.1024120972,
0.1651544869,
-0.0439473428,
0.039993383,
-0.1767993867,
0.1112605929,
-0.1959138364,
-0.5463487506,
0.1524967402,
-0.0229182374,
-0.2902197242,
-0.1396175772,
-0.0799594223,
0.1385860592,
0.2206831872,
-0.0128688039,
0.115886189,
-0.2101252079,
0.4909321964,
0.0909305438,
-0.0949427634,
0.1557549387,
0.1762556434,
0.1384196877,
-0.2511658669,
-0.1176665872,
0.2310352772,
-0.3556729257,
0.283018142,
0.2095107585,
-0.1625982523,
0.3103232682,
0.5404540896,
0.0646587536,
-0.4485714436,
0.658018589,
-0.0632330701,
0.0367329642,
-0.0528674424,
-0.5302308798,
-0.1007553488,
0.0489967875,
-0.1999997497,
0.1675212532,
-0.2166356891,
0.3675014973,
0.2530467808,
-0.0938391387,
-0.4194611311,
-0.2844651639,
0.1701907665,
0.0100753186,
0.023203345,
0.018644521,
0.0716274157,
0.0931468233,
-0.2374302447,
0.0882018059,
0.1123885363,
-0.0080092251,
0.2254105508,
-0.3480645418,
-0.1606261879,
-0.0121608563,
0.1516553462,
0.0018499478,
0.6496222019,
-0.3341351151,
-0.0326856337,
0.0116718356,
0.1500446945,
0.5063470006,
-0.3134467602,
0.2174639851,
0.2441744208,
-0.1328842342,
0.2730717957,
-0.3095413744,
-0.2748121321,
0.4669102132,
0.151848644,
0.4360796511,
-0.2806734145,
0.089700073,
-0.0260195527,
0.1104194149,
0.0163213816,
0.0398565345,
-0.2078765035,
0.0274157599,
-0.2544297874,
0.1486523598,
-0.0139431125,
0.3509781957,
0.1144280434,
0.1137029156,
-0.2285264134,
-0.3311949968,
0.0212135985,
0.1344624609,
0.0931417122,
-0.1248481125,
0.3866323829,
-0.2869854867,
0.1531801671,
0.0576768927,
0.3597967327,
0.1018457413,
-0.4830713272,
-0.2248996049,
-0.1058279499,
0.1986412406,
0.2728036642,
-0.0880790949,
0.322096318,
-0.1087870523,
0.028251905,
0.0867958218,
0.2104933411,
0.1615778059,
0.1686565727,
-0.4326957464,
0.0554656982,
0.3112519085,
0.171020627,
-0.0361163542,
-0.022772342,
0.1751399785,
-0.3406805396,
0.4461533129,
0.2815915942,
1.2980004549,
-0.1158357859,
-0.0815618336,
-0.0376719497,
0.3427511454,
0.6281681657,
-0.0047751153,
-0.0637118965,
-0.2960307598,
-0.0373425521,
-0.0196647532,
-0.0832910836,
0.4282989502,
0.0768294036,
-0.110401392,
0.1596340835,
-0.4422547221,
-0.2462898344,
-0.0062782853,
0.0995812193,
-0.2199065089,
-0.1601839811,
0.1497466415,
-0.0449612848,
-0.3405068517,
0.3380144238,
-0.0139570013,
-0.0397674665,
-0.2785816789,
-0.1287188679,
-0.5075514913,
0.1321091056,
-0.2401426733,
0.077969633,
0.1785475165,
0.1499052346,
0.002595281,
-0.3315670788,
0.4971368909,
0.397376895,
-0.0863510743,
0.0583578572,
-0.0053254063,
-0.2267412841,
0.2406246066,
-0.0009640727,
0.5052663088,
0.1125775054,
-0.0049079708,
-0.2517134249,
0.0071727601,
-0.0144628156,
-0.2387796789,
-0.0017566568,
0.2449572682,
-0.3661653697,
-0.4907000661,
-0.0895317048,
0.0124477968,
-0.2250330448,
-0.0155829266,
0.0913009644,
-0.0856952518,
0.2112417519,
0.0587833337,
-0.1739728302,
-0.0077851992,
0.1336868703,
0.0580744855,
0.2336702049,
0.4034205675,
-0.0270993896,
-0.2810717523,
-0.065806061,
-0.050757613,
-0.1043203026,
0.0212903302,
0.0201701932,
-0.0487438813,
-0.2473257929,
-0.424144268,
0.4363887608,
0.3371751308,
0.1167273819,
-0.1022853702,
-0.4436214864,
-0.1478161514,
0.1858899593,
-0.1083173975,
-0.0321706422,
-0.1761490852,
0.8972696662,
-0.1178735048,
-0.1244419962,
-0.0896608382,
-0.0607659854,
-0.252043575,
0.0429904498,
0.2539970875,
0.1062388271,
-0.2125083655,
-0.0547054522,
-0.0610696971,
0.2394860685,
0.0623016544,
-0.0029367607,
-0.4034935534,
0.1946725547,
0.4432670474,
0.0760604963,
-0.1604299694,
-0.1373716891,
0.1805870533,
-0.2636670768,
-0.2539542019,
0.4749056697,
0.2321776003,
0.4184497595,
0.1967936158,
0.2749226987,
-0.0653802231,
0.0270640384,
-0.0921382904,
0.1749438047,
0.0017400493,
0.0215360802,
0.2186419815,
0.1148916781,
-0.204926759,
-0.1758001298,
-0.2116881907,
0.3480989933,
0.0008483459,
0.0011611009,
0.3057721853,
0.0638405457,
0.1857886165,
0.2191876024,
-0.0020264396,
-0.5876792073,
0.4587335289,
0.0280445293,
-0.4276821017,
-0.147218734,
0.0309781134,
0.0807972476,
-0.0735364631,
0.2868472934,
-0.2121807784,
0.2877137065,
-0.7462058067,
-0.0635889471,
0.5026014447,
-0.1601416469,
-0.0615712889,
-0.1991842091,
-0.1536071748,
0.3174808323,
0.28349787,
-0.0587094687,
0.0185796786,
0.4506964087,
-0.2275973707,
0.4550673664,
0.2652670741,
0.1009547412,
-0.0410911962,
-0.3341942132,
0.431022346,
0.2582305372,
0.2840678096,
0.1921057254,
-0.0064201425,
0.0553124249,
-0.0671324283,
-0.284339726,
0.0628115535,
0.3188642263,
-0.2507953048,
-0.1182130277,
-0.1136940941,
0.0208654497,
-0.323400259,
0.0282415543,
-0.0000111144,
0.3174370229,
0.3843381703,
-0.0727047101,
-0.2046419531,
-0.3929638565,
-0.0689787045,
0.1495275795,
0.0466881394,
-0.3392073512,
0.1224664226,
-0.1451081634,
-0.0543557666,
-0.2438494265,
0.1802670658,
0.3568904996,
0.4325848222,
0.1198400557,
-0.1940246522,
-0.3718809187,
0.1307142079,
-0.2088869661,
0.4987926483,
0.2577508092,
0.0108773643,
0.0827217922,
-0.115213275,
-0.0966749117,
0.3931744993,
0.3485361338,
0.1090464443,
-0.0801922008,
0.1890759766,
0.0699377954,
-0.1930680424,
0.0417050943,
0.0294961948,
-0.1845296323,
-0.0385489017,
0.4466285408,
0.1294782311,
0.3553231359,
-0.3326562941,
0.0218980368,
0.3511330783,
0.0810933858,
0.5432698131,
-0.0535807051,
-0.4718731046,
0.6238460541,
-0.5803315639,
0.3404592872,
-0.1978703886,
-0.3355073035,
-0.2210291475,
0.1417924166,
0.0583970137,
0.1976752281,
-0.1559436619,
0.5343947411,
-0.0876789615,
0.0118968263,
-0.1175985262,
0.0271564759,
-0.1152742282,
-0.1859707236,
0.0591473356,
-0.4235768616,
0.3720368445,
-0.162925899,
-0.0777222514,
-0.1368248016,
-0.4115264714,
0.3600969613,
0.1749584526,
0.2012335807,
0.4671104252,
0.5732735991,
-0.0765715986,
0.1230083928,
-0.3830678463,
-0.2349012792,
-0.1785785854,
0.3983487487,
-0.1059957221,
0.0254362319,
-0.041132655,
0.176678732,
-0.4238360822,
0.1713766158,
-0.3041483164,
-0.0763450265,
-0.1750941426,
0.2838480473,
-0.0343426019,
0.0743419528,
-0.2653817534,
0.4218532741,
-0.1129603907,
0.3408609033,
-0.2827915251,
-0.4867301285,
0.4779389501,
-0.5187080503,
-0.171952188,
0.0099418517,
0.1570142359,
0.2735477984,
-0.1657187194,
-0.4894462526,
-0.4313940704,
0.3024000525,
-0.1926945299,
-0.1562816948,
0.0346319228,
0.2694478929,
-0.0029802034,
-0.0985471159,
0.561190486,
-0.1310111433,
-0.224154368,
0.5392277241,
0.0612847582
] |
https://github.com/huggingface/datasets/issues/3178 | "Property couldn't be hashed properly" even though fully picklable | Hi Matthew, thanks for chiming in! We are currently implementing exactly what you suggest: `to_bytes()` as a default before pickling - but we may prefer `to_dict` to avoid double dumping.
`datasets` uses pickle dumps (actually dill) to get unique representations of processing steps (a "fingerprint" or hash). So it never needs to re-load that dump - it just needs its value to create a hash. If a fingerprint is identical to a cached fingerprint, then the result can be retrieved from the on-disk cache. (@lhoestq or @mariosasko can correct me if I'm wrong.)
I was experiencing the issue that parsing with spaCy gave me a different fingerprint on every run of the script and thus it could never load the processed dataset from cache. At first I thought the reason was that spaCy Language objects were not picklable with recursive dill, but even after [adjusting for that](https://github.com/explosion/spaCy/pull/9593) the issue persisted. @lhoestq found that this is due to the changing `id`, which you discussed [here](https://github.com/explosion/spaCy/discussions/9609#discussioncomment-1661081). So yes, you are right. On the surface there simply seems to be an incompatibility between `datasets` default caching functionality as it is currently implemented and `spacy.Language`.
The [linked PR](https://github.com/huggingface/datasets/pull/3224) aims to remedy that, though. Up to now I have put some effort into making it easier to define your own "pickling" function for a given type (and optionally any of its subclasses). That allows us to tell `datasets` that instead of doing `dill.save(nlp)` (non-deterministic), to use `dill.save(nlp.to_bytes())` (deterministic). When I find some more time, the PR [will be expanded](https://github.com/huggingface/datasets/pull/3224#issuecomment-968958528) to improve the user-experience a bit and add a built-in function to pickle `spacy.Language` as one of the defaults (using `to_bytes()`). | ## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 275 | "Property couldn't be hashed properly" even though fully picklable
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
Hi Matthew, thanks for chiming in! We are currently implementing exactly what you suggest: `to_bytes()` as a default before pickling - but we may prefer `to_dict` to avoid double dumping.
`datasets` uses pickle dumps (actually dill) to get unique representations of processing steps (a "fingerprint" or hash). So it never needs to re-load that dump - it just needs its value to create a hash. If a fingerprint is identical to a cached fingerprint, then the result can be retrieved from the on-disk cache. (@lhoestq or @mariosasko can correct me if I'm wrong.)
I was experiencing the issue that parsing with spaCy gave me a different fingerprint on every run of the script and thus it could never load the processed dataset from cache. At first I thought the reason was that spaCy Language objects were not picklable with recursive dill, but even after [adjusting for that](https://github.com/explosion/spaCy/pull/9593) the issue persisted. @lhoestq found that this is due to the changing `id`, which you discussed [here](https://github.com/explosion/spaCy/discussions/9609#discussioncomment-1661081). So yes, you are right. On the surface there simply seems to be an incompatibility between `datasets` default caching functionality as it is currently implemented and `spacy.Language`.
The [linked PR](https://github.com/huggingface/datasets/pull/3224) aims to remedy that, though. Up to now I have put some effort into making it easier to define your own "pickling" function for a given type (and optionally any of its subclasses). That allows us to tell `datasets` that instead of doing `dill.save(nlp)` (non-deterministic), to use `dill.save(nlp.to_bytes())` (deterministic). When I find some more time, the PR [will be expanded](https://github.com/huggingface/datasets/pull/3224#issuecomment-968958528) to improve the user-experience a bit and add a built-in function to pickle `spacy.Language` as one of the defaults (using `to_bytes()`). | [
-0.0547037572,
-0.0296596158,
0.1383616775,
0.1674575657,
0.2572079003,
-0.1886388958,
0.3345493674,
0.0546137951,
0.0525931679,
0.1248953864,
0.0389523171,
0.5095518827,
-0.2360349447,
0.3779696524,
-0.1779329479,
0.0818778947,
0.0879114941,
-0.0570349731,
0.0878298432,
-0.1197966412,
-0.0697439685,
-0.0256732684,
-0.3639787436,
0.0150344642,
-0.5814357996,
-0.2471628636,
0.1233717129,
-0.0043504587,
-0.1769182086,
-0.3019955456,
0.1507757157,
-0.0842573196,
-0.0198123567,
0.0914173946,
-0.0001276944,
-0.0400400944,
0.2713608742,
-0.0208546668,
-0.0257947762,
-0.4120488167,
0.1907008439,
-0.3608407974,
0.0740303248,
-0.211347267,
-0.1636205316,
0.3611479104,
-0.2467535585,
-0.2143102884,
0.260607183,
0.0114906086,
0.0392241217,
0.3941231072,
0.0432313383,
0.2574501336,
-0.0588377379,
-0.0148635246,
-0.4733221233,
0.109114565,
0.1186906546,
0.1557988673,
-0.0484532043,
-0.019749077,
0.0093573071,
-0.1011296362,
-0.0401526913,
0.1538345963,
-0.237302959,
-0.0516985804,
0.1653799862,
0.0052834945,
0.0333908945,
-0.3204625547,
-0.3859625161,
-0.1491619647,
0.0474647768,
-0.5314664841,
0.4600654542,
0.0664499253,
0.1255585104,
0.1659148633,
-0.0848168954,
0.0914708599,
0.1008479819,
0.164870128,
0.2551167011,
0.4194827676,
-0.0190647002,
0.2278356701,
-0.0405594781,
-0.1689594835,
0.2658732235,
0.0705322027,
0.1795156002,
0.0836890414,
-0.0195625331,
-0.0307151452,
-0.1670056432,
0.2477212697,
0.2644006908,
-0.0484205522,
0.007160774,
0.1911672354,
-0.33025226,
0.0856915861,
0.1315112412,
-0.265206784,
0.2935669422,
0.4055650532,
-0.0374953933,
0.0583079755,
-0.4280025661,
0.0356123522,
0.0313389413,
-0.0029143307,
0.114661321,
0.1762257218,
0.202796936,
-0.1554870158,
-0.1113362238,
0.2510730624,
-0.4037123024,
-0.0514079742,
0.1103123873,
0.1127123684,
-0.1159863397,
-0.2407061011,
-0.192309469,
0.241377309,
-0.337374419,
-0.3447399735,
-0.0766617879,
0.0834250227,
-0.4073736072,
-0.0222928561,
0.0333841667,
0.1963319182,
0.377796948,
0.1117832139,
-0.1122461334,
0.1048943773,
-0.0382502154,
-0.2463395,
0.1190531179,
0.0087581398,
-0.159172371,
0.1909403354,
0.1781331003,
-0.4805569351,
-0.2565742433,
0.0611921549,
-0.2101026773,
0.0271804929,
-0.0223347694,
-0.0561760366,
-0.3674880564,
-0.103926219,
-0.010629083,
0.2302388847,
0.3314209282,
0.0433118492,
0.0690918565,
-0.3608968258,
-0.3603518009,
-0.2394995093,
0.0475333519,
0.2380011231,
-0.2766398787,
-0.2168492526,
-0.2440198362,
0.0189822223,
0.9000562429,
0.2183276415,
-0.0556712486,
0.0234984681,
-0.2343845814,
0.7594913244,
0.0905847177,
-0.1478681713,
-0.5776648521,
-0.167631045,
-0.0203919969,
0.1384986192,
0.0229974706,
0.0227617323,
0.3518770039,
0.0264439993,
0.3190077543,
0.3026783466,
0.1961114109,
-0.302872628,
-0.3790924549,
-0.142558828,
0.3757954538,
-0.3132485449,
0.1351573169,
0.1308348775,
0.3068951368,
0.4246308804,
0.2254492939,
0.2583018839,
0.1783137918,
-0.0941027328,
0.3221184313,
-0.0918224007,
-0.1540010273,
-0.1793636531,
-0.1915613562,
0.2066816986,
0.023735825,
0.2731806338,
-0.3610523045,
-0.1430864185,
0.0524439774,
0.176856339,
-0.1652963012,
-0.3081740141,
-0.0823015496,
0.0367540531,
-0.1271738857,
0.0828393549,
-0.1993957609,
-0.0555443875,
-0.1569062918,
0.0780029073,
0.119815439,
0.0761380196,
-0.1625960618,
-0.4827044308,
-0.1736913025,
0.2461585402,
0.3014327884,
0.0034809171,
-0.2449755818,
-0.0888495892,
0.1731424034,
-0.3360346854,
-0.1316605508,
0.2585936785,
0.3164643347,
0.0204325486,
0.0327867754,
0.010144542,
-0.0102995848,
-0.0306296796,
0.2863678038,
0.284411788,
-0.1854794919,
0.0013758254,
-0.1170924157,
0.1922469139,
0.4385982752,
-0.0604097769,
0.005020828,
-0.4889424145,
0.1553365141,
-0.0615307167,
0.4590315819,
0.3527908623,
-0.3520230651,
0.3137389719,
0.7528020144,
0.1944844574,
0.3439007401,
-0.0378361195,
0.0523134544,
0.0474330261,
0.1562965661,
-0.0160856824,
0.1846254468,
-0.0083616348,
0.1808769405,
0.1700421125,
-0.210577473,
-0.1544239074,
0.0091514932,
-0.0678443611,
-0.1412783265,
0.2443773746,
0.0432107039,
0.1253934354,
-0.170493111,
-0.1573505849,
0.0509857908,
0.306831181,
-0.3004431427,
-0.090945676,
-0.7436493635,
0.3857062459,
-0.0108448761,
-0.0645975247,
-0.1444186568,
-0.1175103709,
0.0300632454,
0.1875724941,
-0.1544266492,
0.2837776244,
-0.3315267563,
0.1442704648,
-0.0231079198,
-0.1037352756,
-0.0666976497,
0.0035622192,
-0.3922694623,
-0.0960427821,
0.1824147403,
0.0437409021,
0.158203274,
0.0307286568,
-0.1245734394,
-0.1211785525,
-0.1619984806,
0.207660377,
-0.101419501,
0.6599536538,
0.015188084,
-0.0401160829,
-0.2227500677,
-0.042441681,
0.3229544759,
0.0481723547,
-0.1957854331,
0.0668941289,
0.1534006298,
-0.2971335053,
-0.1280110329,
-0.0810010433,
-0.398724407,
-0.2029238939,
-0.0015435937,
0.0409982875,
0.1024120972,
0.1651544869,
-0.0439473428,
0.039993383,
-0.1767993867,
0.1112605929,
-0.1959138364,
-0.5463487506,
0.1524967402,
-0.0229182374,
-0.2902197242,
-0.1396175772,
-0.0799594223,
0.1385860592,
0.2206831872,
-0.0128688039,
0.115886189,
-0.2101252079,
0.4909321964,
0.0909305438,
-0.0949427634,
0.1557549387,
0.1762556434,
0.1384196877,
-0.2511658669,
-0.1176665872,
0.2310352772,
-0.3556729257,
0.283018142,
0.2095107585,
-0.1625982523,
0.3103232682,
0.5404540896,
0.0646587536,
-0.4485714436,
0.658018589,
-0.0632330701,
0.0367329642,
-0.0528674424,
-0.5302308798,
-0.1007553488,
0.0489967875,
-0.1999997497,
0.1675212532,
-0.2166356891,
0.3675014973,
0.2530467808,
-0.0938391387,
-0.4194611311,
-0.2844651639,
0.1701907665,
0.0100753186,
0.023203345,
0.018644521,
0.0716274157,
0.0931468233,
-0.2374302447,
0.0882018059,
0.1123885363,
-0.0080092251,
0.2254105508,
-0.3480645418,
-0.1606261879,
-0.0121608563,
0.1516553462,
0.0018499478,
0.6496222019,
-0.3341351151,
-0.0326856337,
0.0116718356,
0.1500446945,
0.5063470006,
-0.3134467602,
0.2174639851,
0.2441744208,
-0.1328842342,
0.2730717957,
-0.3095413744,
-0.2748121321,
0.4669102132,
0.151848644,
0.4360796511,
-0.2806734145,
0.089700073,
-0.0260195527,
0.1104194149,
0.0163213816,
0.0398565345,
-0.2078765035,
0.0274157599,
-0.2544297874,
0.1486523598,
-0.0139431125,
0.3509781957,
0.1144280434,
0.1137029156,
-0.2285264134,
-0.3311949968,
0.0212135985,
0.1344624609,
0.0931417122,
-0.1248481125,
0.3866323829,
-0.2869854867,
0.1531801671,
0.0576768927,
0.3597967327,
0.1018457413,
-0.4830713272,
-0.2248996049,
-0.1058279499,
0.1986412406,
0.2728036642,
-0.0880790949,
0.322096318,
-0.1087870523,
0.028251905,
0.0867958218,
0.2104933411,
0.1615778059,
0.1686565727,
-0.4326957464,
0.0554656982,
0.3112519085,
0.171020627,
-0.0361163542,
-0.022772342,
0.1751399785,
-0.3406805396,
0.4461533129,
0.2815915942,
1.2980004549,
-0.1158357859,
-0.0815618336,
-0.0376719497,
0.3427511454,
0.6281681657,
-0.0047751153,
-0.0637118965,
-0.2960307598,
-0.0373425521,
-0.0196647532,
-0.0832910836,
0.4282989502,
0.0768294036,
-0.110401392,
0.1596340835,
-0.4422547221,
-0.2462898344,
-0.0062782853,
0.0995812193,
-0.2199065089,
-0.1601839811,
0.1497466415,
-0.0449612848,
-0.3405068517,
0.3380144238,
-0.0139570013,
-0.0397674665,
-0.2785816789,
-0.1287188679,
-0.5075514913,
0.1321091056,
-0.2401426733,
0.077969633,
0.1785475165,
0.1499052346,
0.002595281,
-0.3315670788,
0.4971368909,
0.397376895,
-0.0863510743,
0.0583578572,
-0.0053254063,
-0.2267412841,
0.2406246066,
-0.0009640727,
0.5052663088,
0.1125775054,
-0.0049079708,
-0.2517134249,
0.0071727601,
-0.0144628156,
-0.2387796789,
-0.0017566568,
0.2449572682,
-0.3661653697,
-0.4907000661,
-0.0895317048,
0.0124477968,
-0.2250330448,
-0.0155829266,
0.0913009644,
-0.0856952518,
0.2112417519,
0.0587833337,
-0.1739728302,
-0.0077851992,
0.1336868703,
0.0580744855,
0.2336702049,
0.4034205675,
-0.0270993896,
-0.2810717523,
-0.065806061,
-0.050757613,
-0.1043203026,
0.0212903302,
0.0201701932,
-0.0487438813,
-0.2473257929,
-0.424144268,
0.4363887608,
0.3371751308,
0.1167273819,
-0.1022853702,
-0.4436214864,
-0.1478161514,
0.1858899593,
-0.1083173975,
-0.0321706422,
-0.1761490852,
0.8972696662,
-0.1178735048,
-0.1244419962,
-0.0896608382,
-0.0607659854,
-0.252043575,
0.0429904498,
0.2539970875,
0.1062388271,
-0.2125083655,
-0.0547054522,
-0.0610696971,
0.2394860685,
0.0623016544,
-0.0029367607,
-0.4034935534,
0.1946725547,
0.4432670474,
0.0760604963,
-0.1604299694,
-0.1373716891,
0.1805870533,
-0.2636670768,
-0.2539542019,
0.4749056697,
0.2321776003,
0.4184497595,
0.1967936158,
0.2749226987,
-0.0653802231,
0.0270640384,
-0.0921382904,
0.1749438047,
0.0017400493,
0.0215360802,
0.2186419815,
0.1148916781,
-0.204926759,
-0.1758001298,
-0.2116881907,
0.3480989933,
0.0008483459,
0.0011611009,
0.3057721853,
0.0638405457,
0.1857886165,
0.2191876024,
-0.0020264396,
-0.5876792073,
0.4587335289,
0.0280445293,
-0.4276821017,
-0.147218734,
0.0309781134,
0.0807972476,
-0.0735364631,
0.2868472934,
-0.2121807784,
0.2877137065,
-0.7462058067,
-0.0635889471,
0.5026014447,
-0.1601416469,
-0.0615712889,
-0.1991842091,
-0.1536071748,
0.3174808323,
0.28349787,
-0.0587094687,
0.0185796786,
0.4506964087,
-0.2275973707,
0.4550673664,
0.2652670741,
0.1009547412,
-0.0410911962,
-0.3341942132,
0.431022346,
0.2582305372,
0.2840678096,
0.1921057254,
-0.0064201425,
0.0553124249,
-0.0671324283,
-0.284339726,
0.0628115535,
0.3188642263,
-0.2507953048,
-0.1182130277,
-0.1136940941,
0.0208654497,
-0.323400259,
0.0282415543,
-0.0000111144,
0.3174370229,
0.3843381703,
-0.0727047101,
-0.2046419531,
-0.3929638565,
-0.0689787045,
0.1495275795,
0.0466881394,
-0.3392073512,
0.1224664226,
-0.1451081634,
-0.0543557666,
-0.2438494265,
0.1802670658,
0.3568904996,
0.4325848222,
0.1198400557,
-0.1940246522,
-0.3718809187,
0.1307142079,
-0.2088869661,
0.4987926483,
0.2577508092,
0.0108773643,
0.0827217922,
-0.115213275,
-0.0966749117,
0.3931744993,
0.3485361338,
0.1090464443,
-0.0801922008,
0.1890759766,
0.0699377954,
-0.1930680424,
0.0417050943,
0.0294961948,
-0.1845296323,
-0.0385489017,
0.4466285408,
0.1294782311,
0.3553231359,
-0.3326562941,
0.0218980368,
0.3511330783,
0.0810933858,
0.5432698131,
-0.0535807051,
-0.4718731046,
0.6238460541,
-0.5803315639,
0.3404592872,
-0.1978703886,
-0.3355073035,
-0.2210291475,
0.1417924166,
0.0583970137,
0.1976752281,
-0.1559436619,
0.5343947411,
-0.0876789615,
0.0118968263,
-0.1175985262,
0.0271564759,
-0.1152742282,
-0.1859707236,
0.0591473356,
-0.4235768616,
0.3720368445,
-0.162925899,
-0.0777222514,
-0.1368248016,
-0.4115264714,
0.3600969613,
0.1749584526,
0.2012335807,
0.4671104252,
0.5732735991,
-0.0765715986,
0.1230083928,
-0.3830678463,
-0.2349012792,
-0.1785785854,
0.3983487487,
-0.1059957221,
0.0254362319,
-0.041132655,
0.176678732,
-0.4238360822,
0.1713766158,
-0.3041483164,
-0.0763450265,
-0.1750941426,
0.2838480473,
-0.0343426019,
0.0743419528,
-0.2653817534,
0.4218532741,
-0.1129603907,
0.3408609033,
-0.2827915251,
-0.4867301285,
0.4779389501,
-0.5187080503,
-0.171952188,
0.0099418517,
0.1570142359,
0.2735477984,
-0.1657187194,
-0.4894462526,
-0.4313940704,
0.3024000525,
-0.1926945299,
-0.1562816948,
0.0346319228,
0.2694478929,
-0.0029802034,
-0.0985471159,
0.561190486,
-0.1310111433,
-0.224154368,
0.5392277241,
0.0612847582
] |
https://github.com/huggingface/datasets/issues/3178 | "Property couldn't be hashed properly" even though fully picklable | Is there a workaround for this? maybe by explicitly requesting datasets to cache the result of `.map()`? | ## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 17 | "Property couldn't be hashed properly" even though fully picklable
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
Is there a workaround for this? maybe by explicitly requesting datasets to cache the result of `.map()`? | [
-0.0547037572,
-0.0296596158,
0.1383616775,
0.1674575657,
0.2572079003,
-0.1886388958,
0.3345493674,
0.0546137951,
0.0525931679,
0.1248953864,
0.0389523171,
0.5095518827,
-0.2360349447,
0.3779696524,
-0.1779329479,
0.0818778947,
0.0879114941,
-0.0570349731,
0.0878298432,
-0.1197966412,
-0.0697439685,
-0.0256732684,
-0.3639787436,
0.0150344642,
-0.5814357996,
-0.2471628636,
0.1233717129,
-0.0043504587,
-0.1769182086,
-0.3019955456,
0.1507757157,
-0.0842573196,
-0.0198123567,
0.0914173946,
-0.0001276944,
-0.0400400944,
0.2713608742,
-0.0208546668,
-0.0257947762,
-0.4120488167,
0.1907008439,
-0.3608407974,
0.0740303248,
-0.211347267,
-0.1636205316,
0.3611479104,
-0.2467535585,
-0.2143102884,
0.260607183,
0.0114906086,
0.0392241217,
0.3941231072,
0.0432313383,
0.2574501336,
-0.0588377379,
-0.0148635246,
-0.4733221233,
0.109114565,
0.1186906546,
0.1557988673,
-0.0484532043,
-0.019749077,
0.0093573071,
-0.1011296362,
-0.0401526913,
0.1538345963,
-0.237302959,
-0.0516985804,
0.1653799862,
0.0052834945,
0.0333908945,
-0.3204625547,
-0.3859625161,
-0.1491619647,
0.0474647768,
-0.5314664841,
0.4600654542,
0.0664499253,
0.1255585104,
0.1659148633,
-0.0848168954,
0.0914708599,
0.1008479819,
0.164870128,
0.2551167011,
0.4194827676,
-0.0190647002,
0.2278356701,
-0.0405594781,
-0.1689594835,
0.2658732235,
0.0705322027,
0.1795156002,
0.0836890414,
-0.0195625331,
-0.0307151452,
-0.1670056432,
0.2477212697,
0.2644006908,
-0.0484205522,
0.007160774,
0.1911672354,
-0.33025226,
0.0856915861,
0.1315112412,
-0.265206784,
0.2935669422,
0.4055650532,
-0.0374953933,
0.0583079755,
-0.4280025661,
0.0356123522,
0.0313389413,
-0.0029143307,
0.114661321,
0.1762257218,
0.202796936,
-0.1554870158,
-0.1113362238,
0.2510730624,
-0.4037123024,
-0.0514079742,
0.1103123873,
0.1127123684,
-0.1159863397,
-0.2407061011,
-0.192309469,
0.241377309,
-0.337374419,
-0.3447399735,
-0.0766617879,
0.0834250227,
-0.4073736072,
-0.0222928561,
0.0333841667,
0.1963319182,
0.377796948,
0.1117832139,
-0.1122461334,
0.1048943773,
-0.0382502154,
-0.2463395,
0.1190531179,
0.0087581398,
-0.159172371,
0.1909403354,
0.1781331003,
-0.4805569351,
-0.2565742433,
0.0611921549,
-0.2101026773,
0.0271804929,
-0.0223347694,
-0.0561760366,
-0.3674880564,
-0.103926219,
-0.010629083,
0.2302388847,
0.3314209282,
0.0433118492,
0.0690918565,
-0.3608968258,
-0.3603518009,
-0.2394995093,
0.0475333519,
0.2380011231,
-0.2766398787,
-0.2168492526,
-0.2440198362,
0.0189822223,
0.9000562429,
0.2183276415,
-0.0556712486,
0.0234984681,
-0.2343845814,
0.7594913244,
0.0905847177,
-0.1478681713,
-0.5776648521,
-0.167631045,
-0.0203919969,
0.1384986192,
0.0229974706,
0.0227617323,
0.3518770039,
0.0264439993,
0.3190077543,
0.3026783466,
0.1961114109,
-0.302872628,
-0.3790924549,
-0.142558828,
0.3757954538,
-0.3132485449,
0.1351573169,
0.1308348775,
0.3068951368,
0.4246308804,
0.2254492939,
0.2583018839,
0.1783137918,
-0.0941027328,
0.3221184313,
-0.0918224007,
-0.1540010273,
-0.1793636531,
-0.1915613562,
0.2066816986,
0.023735825,
0.2731806338,
-0.3610523045,
-0.1430864185,
0.0524439774,
0.176856339,
-0.1652963012,
-0.3081740141,
-0.0823015496,
0.0367540531,
-0.1271738857,
0.0828393549,
-0.1993957609,
-0.0555443875,
-0.1569062918,
0.0780029073,
0.119815439,
0.0761380196,
-0.1625960618,
-0.4827044308,
-0.1736913025,
0.2461585402,
0.3014327884,
0.0034809171,
-0.2449755818,
-0.0888495892,
0.1731424034,
-0.3360346854,
-0.1316605508,
0.2585936785,
0.3164643347,
0.0204325486,
0.0327867754,
0.010144542,
-0.0102995848,
-0.0306296796,
0.2863678038,
0.284411788,
-0.1854794919,
0.0013758254,
-0.1170924157,
0.1922469139,
0.4385982752,
-0.0604097769,
0.005020828,
-0.4889424145,
0.1553365141,
-0.0615307167,
0.4590315819,
0.3527908623,
-0.3520230651,
0.3137389719,
0.7528020144,
0.1944844574,
0.3439007401,
-0.0378361195,
0.0523134544,
0.0474330261,
0.1562965661,
-0.0160856824,
0.1846254468,
-0.0083616348,
0.1808769405,
0.1700421125,
-0.210577473,
-0.1544239074,
0.0091514932,
-0.0678443611,
-0.1412783265,
0.2443773746,
0.0432107039,
0.1253934354,
-0.170493111,
-0.1573505849,
0.0509857908,
0.306831181,
-0.3004431427,
-0.090945676,
-0.7436493635,
0.3857062459,
-0.0108448761,
-0.0645975247,
-0.1444186568,
-0.1175103709,
0.0300632454,
0.1875724941,
-0.1544266492,
0.2837776244,
-0.3315267563,
0.1442704648,
-0.0231079198,
-0.1037352756,
-0.0666976497,
0.0035622192,
-0.3922694623,
-0.0960427821,
0.1824147403,
0.0437409021,
0.158203274,
0.0307286568,
-0.1245734394,
-0.1211785525,
-0.1619984806,
0.207660377,
-0.101419501,
0.6599536538,
0.015188084,
-0.0401160829,
-0.2227500677,
-0.042441681,
0.3229544759,
0.0481723547,
-0.1957854331,
0.0668941289,
0.1534006298,
-0.2971335053,
-0.1280110329,
-0.0810010433,
-0.398724407,
-0.2029238939,
-0.0015435937,
0.0409982875,
0.1024120972,
0.1651544869,
-0.0439473428,
0.039993383,
-0.1767993867,
0.1112605929,
-0.1959138364,
-0.5463487506,
0.1524967402,
-0.0229182374,
-0.2902197242,
-0.1396175772,
-0.0799594223,
0.1385860592,
0.2206831872,
-0.0128688039,
0.115886189,
-0.2101252079,
0.4909321964,
0.0909305438,
-0.0949427634,
0.1557549387,
0.1762556434,
0.1384196877,
-0.2511658669,
-0.1176665872,
0.2310352772,
-0.3556729257,
0.283018142,
0.2095107585,
-0.1625982523,
0.3103232682,
0.5404540896,
0.0646587536,
-0.4485714436,
0.658018589,
-0.0632330701,
0.0367329642,
-0.0528674424,
-0.5302308798,
-0.1007553488,
0.0489967875,
-0.1999997497,
0.1675212532,
-0.2166356891,
0.3675014973,
0.2530467808,
-0.0938391387,
-0.4194611311,
-0.2844651639,
0.1701907665,
0.0100753186,
0.023203345,
0.018644521,
0.0716274157,
0.0931468233,
-0.2374302447,
0.0882018059,
0.1123885363,
-0.0080092251,
0.2254105508,
-0.3480645418,
-0.1606261879,
-0.0121608563,
0.1516553462,
0.0018499478,
0.6496222019,
-0.3341351151,
-0.0326856337,
0.0116718356,
0.1500446945,
0.5063470006,
-0.3134467602,
0.2174639851,
0.2441744208,
-0.1328842342,
0.2730717957,
-0.3095413744,
-0.2748121321,
0.4669102132,
0.151848644,
0.4360796511,
-0.2806734145,
0.089700073,
-0.0260195527,
0.1104194149,
0.0163213816,
0.0398565345,
-0.2078765035,
0.0274157599,
-0.2544297874,
0.1486523598,
-0.0139431125,
0.3509781957,
0.1144280434,
0.1137029156,
-0.2285264134,
-0.3311949968,
0.0212135985,
0.1344624609,
0.0931417122,
-0.1248481125,
0.3866323829,
-0.2869854867,
0.1531801671,
0.0576768927,
0.3597967327,
0.1018457413,
-0.4830713272,
-0.2248996049,
-0.1058279499,
0.1986412406,
0.2728036642,
-0.0880790949,
0.322096318,
-0.1087870523,
0.028251905,
0.0867958218,
0.2104933411,
0.1615778059,
0.1686565727,
-0.4326957464,
0.0554656982,
0.3112519085,
0.171020627,
-0.0361163542,
-0.022772342,
0.1751399785,
-0.3406805396,
0.4461533129,
0.2815915942,
1.2980004549,
-0.1158357859,
-0.0815618336,
-0.0376719497,
0.3427511454,
0.6281681657,
-0.0047751153,
-0.0637118965,
-0.2960307598,
-0.0373425521,
-0.0196647532,
-0.0832910836,
0.4282989502,
0.0768294036,
-0.110401392,
0.1596340835,
-0.4422547221,
-0.2462898344,
-0.0062782853,
0.0995812193,
-0.2199065089,
-0.1601839811,
0.1497466415,
-0.0449612848,
-0.3405068517,
0.3380144238,
-0.0139570013,
-0.0397674665,
-0.2785816789,
-0.1287188679,
-0.5075514913,
0.1321091056,
-0.2401426733,
0.077969633,
0.1785475165,
0.1499052346,
0.002595281,
-0.3315670788,
0.4971368909,
0.397376895,
-0.0863510743,
0.0583578572,
-0.0053254063,
-0.2267412841,
0.2406246066,
-0.0009640727,
0.5052663088,
0.1125775054,
-0.0049079708,
-0.2517134249,
0.0071727601,
-0.0144628156,
-0.2387796789,
-0.0017566568,
0.2449572682,
-0.3661653697,
-0.4907000661,
-0.0895317048,
0.0124477968,
-0.2250330448,
-0.0155829266,
0.0913009644,
-0.0856952518,
0.2112417519,
0.0587833337,
-0.1739728302,
-0.0077851992,
0.1336868703,
0.0580744855,
0.2336702049,
0.4034205675,
-0.0270993896,
-0.2810717523,
-0.065806061,
-0.050757613,
-0.1043203026,
0.0212903302,
0.0201701932,
-0.0487438813,
-0.2473257929,
-0.424144268,
0.4363887608,
0.3371751308,
0.1167273819,
-0.1022853702,
-0.4436214864,
-0.1478161514,
0.1858899593,
-0.1083173975,
-0.0321706422,
-0.1761490852,
0.8972696662,
-0.1178735048,
-0.1244419962,
-0.0896608382,
-0.0607659854,
-0.252043575,
0.0429904498,
0.2539970875,
0.1062388271,
-0.2125083655,
-0.0547054522,
-0.0610696971,
0.2394860685,
0.0623016544,
-0.0029367607,
-0.4034935534,
0.1946725547,
0.4432670474,
0.0760604963,
-0.1604299694,
-0.1373716891,
0.1805870533,
-0.2636670768,
-0.2539542019,
0.4749056697,
0.2321776003,
0.4184497595,
0.1967936158,
0.2749226987,
-0.0653802231,
0.0270640384,
-0.0921382904,
0.1749438047,
0.0017400493,
0.0215360802,
0.2186419815,
0.1148916781,
-0.204926759,
-0.1758001298,
-0.2116881907,
0.3480989933,
0.0008483459,
0.0011611009,
0.3057721853,
0.0638405457,
0.1857886165,
0.2191876024,
-0.0020264396,
-0.5876792073,
0.4587335289,
0.0280445293,
-0.4276821017,
-0.147218734,
0.0309781134,
0.0807972476,
-0.0735364631,
0.2868472934,
-0.2121807784,
0.2877137065,
-0.7462058067,
-0.0635889471,
0.5026014447,
-0.1601416469,
-0.0615712889,
-0.1991842091,
-0.1536071748,
0.3174808323,
0.28349787,
-0.0587094687,
0.0185796786,
0.4506964087,
-0.2275973707,
0.4550673664,
0.2652670741,
0.1009547412,
-0.0410911962,
-0.3341942132,
0.431022346,
0.2582305372,
0.2840678096,
0.1921057254,
-0.0064201425,
0.0553124249,
-0.0671324283,
-0.284339726,
0.0628115535,
0.3188642263,
-0.2507953048,
-0.1182130277,
-0.1136940941,
0.0208654497,
-0.323400259,
0.0282415543,
-0.0000111144,
0.3174370229,
0.3843381703,
-0.0727047101,
-0.2046419531,
-0.3929638565,
-0.0689787045,
0.1495275795,
0.0466881394,
-0.3392073512,
0.1224664226,
-0.1451081634,
-0.0543557666,
-0.2438494265,
0.1802670658,
0.3568904996,
0.4325848222,
0.1198400557,
-0.1940246522,
-0.3718809187,
0.1307142079,
-0.2088869661,
0.4987926483,
0.2577508092,
0.0108773643,
0.0827217922,
-0.115213275,
-0.0966749117,
0.3931744993,
0.3485361338,
0.1090464443,
-0.0801922008,
0.1890759766,
0.0699377954,
-0.1930680424,
0.0417050943,
0.0294961948,
-0.1845296323,
-0.0385489017,
0.4466285408,
0.1294782311,
0.3553231359,
-0.3326562941,
0.0218980368,
0.3511330783,
0.0810933858,
0.5432698131,
-0.0535807051,
-0.4718731046,
0.6238460541,
-0.5803315639,
0.3404592872,
-0.1978703886,
-0.3355073035,
-0.2210291475,
0.1417924166,
0.0583970137,
0.1976752281,
-0.1559436619,
0.5343947411,
-0.0876789615,
0.0118968263,
-0.1175985262,
0.0271564759,
-0.1152742282,
-0.1859707236,
0.0591473356,
-0.4235768616,
0.3720368445,
-0.162925899,
-0.0777222514,
-0.1368248016,
-0.4115264714,
0.3600969613,
0.1749584526,
0.2012335807,
0.4671104252,
0.5732735991,
-0.0765715986,
0.1230083928,
-0.3830678463,
-0.2349012792,
-0.1785785854,
0.3983487487,
-0.1059957221,
0.0254362319,
-0.041132655,
0.176678732,
-0.4238360822,
0.1713766158,
-0.3041483164,
-0.0763450265,
-0.1750941426,
0.2838480473,
-0.0343426019,
0.0743419528,
-0.2653817534,
0.4218532741,
-0.1129603907,
0.3408609033,
-0.2827915251,
-0.4867301285,
0.4779389501,
-0.5187080503,
-0.171952188,
0.0099418517,
0.1570142359,
0.2735477984,
-0.1657187194,
-0.4894462526,
-0.4313940704,
0.3024000525,
-0.1926945299,
-0.1562816948,
0.0346319228,
0.2694478929,
-0.0029802034,
-0.0985471159,
0.561190486,
-0.1310111433,
-0.224154368,
0.5392277241,
0.0612847582
] |
https://github.com/huggingface/datasets/issues/3178 | "Property couldn't be hashed properly" even though fully picklable | Hi ! If your function is not picklable, then the fingerprint of the resulting dataset can't be computed. The fingerprint is a hash that is used by the cache to reload previously computed datasets: the dataset file is named `cache-<fingerprint>.arrow` in your dataset's cache directory.
As a workaround you can set the fingerprint that is going to be used by the cache:
```python
result = my_dataset.map(func, new_fingerprint=new_fingerprint)
```
Any future call to `map` with the same `new_fingerprint` will reload the result from the cache.
**Be careful using this though: if you change your `func`, be sure to change the `new_fingerprint` as well.** | ## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 102 | "Property couldn't be hashed properly" even though fully picklable
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
Hi ! If your function is not picklable, then the fingerprint of the resulting dataset can't be computed. The fingerprint is a hash that is used by the cache to reload previously computed datasets: the dataset file is named `cache-<fingerprint>.arrow` in your dataset's cache directory.
As a workaround you can set the fingerprint that is going to be used by the cache:
```python
result = my_dataset.map(func, new_fingerprint=new_fingerprint)
```
Any future call to `map` with the same `new_fingerprint` will reload the result from the cache.
**Be careful using this though: if you change your `func`, be sure to change the `new_fingerprint` as well.** | [
-0.0547037572,
-0.0296596158,
0.1383616775,
0.1674575657,
0.2572079003,
-0.1886388958,
0.3345493674,
0.0546137951,
0.0525931679,
0.1248953864,
0.0389523171,
0.5095518827,
-0.2360349447,
0.3779696524,
-0.1779329479,
0.0818778947,
0.0879114941,
-0.0570349731,
0.0878298432,
-0.1197966412,
-0.0697439685,
-0.0256732684,
-0.3639787436,
0.0150344642,
-0.5814357996,
-0.2471628636,
0.1233717129,
-0.0043504587,
-0.1769182086,
-0.3019955456,
0.1507757157,
-0.0842573196,
-0.0198123567,
0.0914173946,
-0.0001276944,
-0.0400400944,
0.2713608742,
-0.0208546668,
-0.0257947762,
-0.4120488167,
0.1907008439,
-0.3608407974,
0.0740303248,
-0.211347267,
-0.1636205316,
0.3611479104,
-0.2467535585,
-0.2143102884,
0.260607183,
0.0114906086,
0.0392241217,
0.3941231072,
0.0432313383,
0.2574501336,
-0.0588377379,
-0.0148635246,
-0.4733221233,
0.109114565,
0.1186906546,
0.1557988673,
-0.0484532043,
-0.019749077,
0.0093573071,
-0.1011296362,
-0.0401526913,
0.1538345963,
-0.237302959,
-0.0516985804,
0.1653799862,
0.0052834945,
0.0333908945,
-0.3204625547,
-0.3859625161,
-0.1491619647,
0.0474647768,
-0.5314664841,
0.4600654542,
0.0664499253,
0.1255585104,
0.1659148633,
-0.0848168954,
0.0914708599,
0.1008479819,
0.164870128,
0.2551167011,
0.4194827676,
-0.0190647002,
0.2278356701,
-0.0405594781,
-0.1689594835,
0.2658732235,
0.0705322027,
0.1795156002,
0.0836890414,
-0.0195625331,
-0.0307151452,
-0.1670056432,
0.2477212697,
0.2644006908,
-0.0484205522,
0.007160774,
0.1911672354,
-0.33025226,
0.0856915861,
0.1315112412,
-0.265206784,
0.2935669422,
0.4055650532,
-0.0374953933,
0.0583079755,
-0.4280025661,
0.0356123522,
0.0313389413,
-0.0029143307,
0.114661321,
0.1762257218,
0.202796936,
-0.1554870158,
-0.1113362238,
0.2510730624,
-0.4037123024,
-0.0514079742,
0.1103123873,
0.1127123684,
-0.1159863397,
-0.2407061011,
-0.192309469,
0.241377309,
-0.337374419,
-0.3447399735,
-0.0766617879,
0.0834250227,
-0.4073736072,
-0.0222928561,
0.0333841667,
0.1963319182,
0.377796948,
0.1117832139,
-0.1122461334,
0.1048943773,
-0.0382502154,
-0.2463395,
0.1190531179,
0.0087581398,
-0.159172371,
0.1909403354,
0.1781331003,
-0.4805569351,
-0.2565742433,
0.0611921549,
-0.2101026773,
0.0271804929,
-0.0223347694,
-0.0561760366,
-0.3674880564,
-0.103926219,
-0.010629083,
0.2302388847,
0.3314209282,
0.0433118492,
0.0690918565,
-0.3608968258,
-0.3603518009,
-0.2394995093,
0.0475333519,
0.2380011231,
-0.2766398787,
-0.2168492526,
-0.2440198362,
0.0189822223,
0.9000562429,
0.2183276415,
-0.0556712486,
0.0234984681,
-0.2343845814,
0.7594913244,
0.0905847177,
-0.1478681713,
-0.5776648521,
-0.167631045,
-0.0203919969,
0.1384986192,
0.0229974706,
0.0227617323,
0.3518770039,
0.0264439993,
0.3190077543,
0.3026783466,
0.1961114109,
-0.302872628,
-0.3790924549,
-0.142558828,
0.3757954538,
-0.3132485449,
0.1351573169,
0.1308348775,
0.3068951368,
0.4246308804,
0.2254492939,
0.2583018839,
0.1783137918,
-0.0941027328,
0.3221184313,
-0.0918224007,
-0.1540010273,
-0.1793636531,
-0.1915613562,
0.2066816986,
0.023735825,
0.2731806338,
-0.3610523045,
-0.1430864185,
0.0524439774,
0.176856339,
-0.1652963012,
-0.3081740141,
-0.0823015496,
0.0367540531,
-0.1271738857,
0.0828393549,
-0.1993957609,
-0.0555443875,
-0.1569062918,
0.0780029073,
0.119815439,
0.0761380196,
-0.1625960618,
-0.4827044308,
-0.1736913025,
0.2461585402,
0.3014327884,
0.0034809171,
-0.2449755818,
-0.0888495892,
0.1731424034,
-0.3360346854,
-0.1316605508,
0.2585936785,
0.3164643347,
0.0204325486,
0.0327867754,
0.010144542,
-0.0102995848,
-0.0306296796,
0.2863678038,
0.284411788,
-0.1854794919,
0.0013758254,
-0.1170924157,
0.1922469139,
0.4385982752,
-0.0604097769,
0.005020828,
-0.4889424145,
0.1553365141,
-0.0615307167,
0.4590315819,
0.3527908623,
-0.3520230651,
0.3137389719,
0.7528020144,
0.1944844574,
0.3439007401,
-0.0378361195,
0.0523134544,
0.0474330261,
0.1562965661,
-0.0160856824,
0.1846254468,
-0.0083616348,
0.1808769405,
0.1700421125,
-0.210577473,
-0.1544239074,
0.0091514932,
-0.0678443611,
-0.1412783265,
0.2443773746,
0.0432107039,
0.1253934354,
-0.170493111,
-0.1573505849,
0.0509857908,
0.306831181,
-0.3004431427,
-0.090945676,
-0.7436493635,
0.3857062459,
-0.0108448761,
-0.0645975247,
-0.1444186568,
-0.1175103709,
0.0300632454,
0.1875724941,
-0.1544266492,
0.2837776244,
-0.3315267563,
0.1442704648,
-0.0231079198,
-0.1037352756,
-0.0666976497,
0.0035622192,
-0.3922694623,
-0.0960427821,
0.1824147403,
0.0437409021,
0.158203274,
0.0307286568,
-0.1245734394,
-0.1211785525,
-0.1619984806,
0.207660377,
-0.101419501,
0.6599536538,
0.015188084,
-0.0401160829,
-0.2227500677,
-0.042441681,
0.3229544759,
0.0481723547,
-0.1957854331,
0.0668941289,
0.1534006298,
-0.2971335053,
-0.1280110329,
-0.0810010433,
-0.398724407,
-0.2029238939,
-0.0015435937,
0.0409982875,
0.1024120972,
0.1651544869,
-0.0439473428,
0.039993383,
-0.1767993867,
0.1112605929,
-0.1959138364,
-0.5463487506,
0.1524967402,
-0.0229182374,
-0.2902197242,
-0.1396175772,
-0.0799594223,
0.1385860592,
0.2206831872,
-0.0128688039,
0.115886189,
-0.2101252079,
0.4909321964,
0.0909305438,
-0.0949427634,
0.1557549387,
0.1762556434,
0.1384196877,
-0.2511658669,
-0.1176665872,
0.2310352772,
-0.3556729257,
0.283018142,
0.2095107585,
-0.1625982523,
0.3103232682,
0.5404540896,
0.0646587536,
-0.4485714436,
0.658018589,
-0.0632330701,
0.0367329642,
-0.0528674424,
-0.5302308798,
-0.1007553488,
0.0489967875,
-0.1999997497,
0.1675212532,
-0.2166356891,
0.3675014973,
0.2530467808,
-0.0938391387,
-0.4194611311,
-0.2844651639,
0.1701907665,
0.0100753186,
0.023203345,
0.018644521,
0.0716274157,
0.0931468233,
-0.2374302447,
0.0882018059,
0.1123885363,
-0.0080092251,
0.2254105508,
-0.3480645418,
-0.1606261879,
-0.0121608563,
0.1516553462,
0.0018499478,
0.6496222019,
-0.3341351151,
-0.0326856337,
0.0116718356,
0.1500446945,
0.5063470006,
-0.3134467602,
0.2174639851,
0.2441744208,
-0.1328842342,
0.2730717957,
-0.3095413744,
-0.2748121321,
0.4669102132,
0.151848644,
0.4360796511,
-0.2806734145,
0.089700073,
-0.0260195527,
0.1104194149,
0.0163213816,
0.0398565345,
-0.2078765035,
0.0274157599,
-0.2544297874,
0.1486523598,
-0.0139431125,
0.3509781957,
0.1144280434,
0.1137029156,
-0.2285264134,
-0.3311949968,
0.0212135985,
0.1344624609,
0.0931417122,
-0.1248481125,
0.3866323829,
-0.2869854867,
0.1531801671,
0.0576768927,
0.3597967327,
0.1018457413,
-0.4830713272,
-0.2248996049,
-0.1058279499,
0.1986412406,
0.2728036642,
-0.0880790949,
0.322096318,
-0.1087870523,
0.028251905,
0.0867958218,
0.2104933411,
0.1615778059,
0.1686565727,
-0.4326957464,
0.0554656982,
0.3112519085,
0.171020627,
-0.0361163542,
-0.022772342,
0.1751399785,
-0.3406805396,
0.4461533129,
0.2815915942,
1.2980004549,
-0.1158357859,
-0.0815618336,
-0.0376719497,
0.3427511454,
0.6281681657,
-0.0047751153,
-0.0637118965,
-0.2960307598,
-0.0373425521,
-0.0196647532,
-0.0832910836,
0.4282989502,
0.0768294036,
-0.110401392,
0.1596340835,
-0.4422547221,
-0.2462898344,
-0.0062782853,
0.0995812193,
-0.2199065089,
-0.1601839811,
0.1497466415,
-0.0449612848,
-0.3405068517,
0.3380144238,
-0.0139570013,
-0.0397674665,
-0.2785816789,
-0.1287188679,
-0.5075514913,
0.1321091056,
-0.2401426733,
0.077969633,
0.1785475165,
0.1499052346,
0.002595281,
-0.3315670788,
0.4971368909,
0.397376895,
-0.0863510743,
0.0583578572,
-0.0053254063,
-0.2267412841,
0.2406246066,
-0.0009640727,
0.5052663088,
0.1125775054,
-0.0049079708,
-0.2517134249,
0.0071727601,
-0.0144628156,
-0.2387796789,
-0.0017566568,
0.2449572682,
-0.3661653697,
-0.4907000661,
-0.0895317048,
0.0124477968,
-0.2250330448,
-0.0155829266,
0.0913009644,
-0.0856952518,
0.2112417519,
0.0587833337,
-0.1739728302,
-0.0077851992,
0.1336868703,
0.0580744855,
0.2336702049,
0.4034205675,
-0.0270993896,
-0.2810717523,
-0.065806061,
-0.050757613,
-0.1043203026,
0.0212903302,
0.0201701932,
-0.0487438813,
-0.2473257929,
-0.424144268,
0.4363887608,
0.3371751308,
0.1167273819,
-0.1022853702,
-0.4436214864,
-0.1478161514,
0.1858899593,
-0.1083173975,
-0.0321706422,
-0.1761490852,
0.8972696662,
-0.1178735048,
-0.1244419962,
-0.0896608382,
-0.0607659854,
-0.252043575,
0.0429904498,
0.2539970875,
0.1062388271,
-0.2125083655,
-0.0547054522,
-0.0610696971,
0.2394860685,
0.0623016544,
-0.0029367607,
-0.4034935534,
0.1946725547,
0.4432670474,
0.0760604963,
-0.1604299694,
-0.1373716891,
0.1805870533,
-0.2636670768,
-0.2539542019,
0.4749056697,
0.2321776003,
0.4184497595,
0.1967936158,
0.2749226987,
-0.0653802231,
0.0270640384,
-0.0921382904,
0.1749438047,
0.0017400493,
0.0215360802,
0.2186419815,
0.1148916781,
-0.204926759,
-0.1758001298,
-0.2116881907,
0.3480989933,
0.0008483459,
0.0011611009,
0.3057721853,
0.0638405457,
0.1857886165,
0.2191876024,
-0.0020264396,
-0.5876792073,
0.4587335289,
0.0280445293,
-0.4276821017,
-0.147218734,
0.0309781134,
0.0807972476,
-0.0735364631,
0.2868472934,
-0.2121807784,
0.2877137065,
-0.7462058067,
-0.0635889471,
0.5026014447,
-0.1601416469,
-0.0615712889,
-0.1991842091,
-0.1536071748,
0.3174808323,
0.28349787,
-0.0587094687,
0.0185796786,
0.4506964087,
-0.2275973707,
0.4550673664,
0.2652670741,
0.1009547412,
-0.0410911962,
-0.3341942132,
0.431022346,
0.2582305372,
0.2840678096,
0.1921057254,
-0.0064201425,
0.0553124249,
-0.0671324283,
-0.284339726,
0.0628115535,
0.3188642263,
-0.2507953048,
-0.1182130277,
-0.1136940941,
0.0208654497,
-0.323400259,
0.0282415543,
-0.0000111144,
0.3174370229,
0.3843381703,
-0.0727047101,
-0.2046419531,
-0.3929638565,
-0.0689787045,
0.1495275795,
0.0466881394,
-0.3392073512,
0.1224664226,
-0.1451081634,
-0.0543557666,
-0.2438494265,
0.1802670658,
0.3568904996,
0.4325848222,
0.1198400557,
-0.1940246522,
-0.3718809187,
0.1307142079,
-0.2088869661,
0.4987926483,
0.2577508092,
0.0108773643,
0.0827217922,
-0.115213275,
-0.0966749117,
0.3931744993,
0.3485361338,
0.1090464443,
-0.0801922008,
0.1890759766,
0.0699377954,
-0.1930680424,
0.0417050943,
0.0294961948,
-0.1845296323,
-0.0385489017,
0.4466285408,
0.1294782311,
0.3553231359,
-0.3326562941,
0.0218980368,
0.3511330783,
0.0810933858,
0.5432698131,
-0.0535807051,
-0.4718731046,
0.6238460541,
-0.5803315639,
0.3404592872,
-0.1978703886,
-0.3355073035,
-0.2210291475,
0.1417924166,
0.0583970137,
0.1976752281,
-0.1559436619,
0.5343947411,
-0.0876789615,
0.0118968263,
-0.1175985262,
0.0271564759,
-0.1152742282,
-0.1859707236,
0.0591473356,
-0.4235768616,
0.3720368445,
-0.162925899,
-0.0777222514,
-0.1368248016,
-0.4115264714,
0.3600969613,
0.1749584526,
0.2012335807,
0.4671104252,
0.5732735991,
-0.0765715986,
0.1230083928,
-0.3830678463,
-0.2349012792,
-0.1785785854,
0.3983487487,
-0.1059957221,
0.0254362319,
-0.041132655,
0.176678732,
-0.4238360822,
0.1713766158,
-0.3041483164,
-0.0763450265,
-0.1750941426,
0.2838480473,
-0.0343426019,
0.0743419528,
-0.2653817534,
0.4218532741,
-0.1129603907,
0.3408609033,
-0.2827915251,
-0.4867301285,
0.4779389501,
-0.5187080503,
-0.171952188,
0.0099418517,
0.1570142359,
0.2735477984,
-0.1657187194,
-0.4894462526,
-0.4313940704,
0.3024000525,
-0.1926945299,
-0.1562816948,
0.0346319228,
0.2694478929,
-0.0029802034,
-0.0985471159,
0.561190486,
-0.1310111433,
-0.224154368,
0.5392277241,
0.0612847582
] |
https://github.com/huggingface/datasets/issues/3177 | More control over TQDM when using map/filter with multiple processes | Hi,
It's hard to provide an API that would cover all use-cases with tqdm in this project.
However, you can make it work by defining a custom decorator (a bit hacky tho) as follows:
```python
import datasets
def progress_only_on_rank_0(func):
def wrapper(*args, **kwargs):
rank = kwargs.get("rank")
disable_tqdm = kwargs.get("disable_tqdm", False)
disable_tqdm = True if rank is not None and rank > 0 else disable_tqdm
kwargs["disable_tqdm"] = disable_tqdm
return func(*args, **kwargs)
return wrapper
datasets.Dataset._map_single = progress_only_on_rank_0(datasets.Dataset._map_single)
```
EDIT: Ups, closed by accident.
Thanks for the provided links. `Trainer` requires this for training in multi-node distributed setting. However, `Dataset.map` doesn't support that yet.
Do you have an API for this in mind? `Dataset.map` is already bloated with the arguments, so IMO it's not a good idea to add a new arg there.
| It would help with the clutter in my terminal if tqdm is only shown for rank 0 when using `num_proces>0` in the map and filter methods of datasets.
```python
dataset.map(lambda examples: tokenize(examples["text"]), batched=True, num_proc=6)
```
The above snippet leads to a lot of TQDM bars and depending on your terminal, these will not overwrite but keep pushing each other down.
```
#0: 0%| | 0/13 [00:00<?, ?ba/s]
#1: 0%| | 0/13 [00:00<?, ?ba/s]
#2: 0%| | 0/13 [00:00<?, ?ba/s]
#3: 0%| | 0/13 [00:00<?, ?ba/s]
#4: 0%| | 0/13 [00:00<?, ?ba/s]
#5: 0%| | 0/13 [00:00<?, ?ba/s]
#0: 8%| | 1/13 [00:00<?, ?ba/s]
#1: 8%| | 1/13 [00:00<?, ?ba/s]
...
```
Instead, it would be welcome if we had the option to only show the progress of rank 0. | 129 | More control over TQDM when using map/filter with multiple processes
It would help with the clutter in my terminal if tqdm is only shown for rank 0 when using `num_proces>0` in the map and filter methods of datasets.
```python
dataset.map(lambda examples: tokenize(examples["text"]), batched=True, num_proc=6)
```
The above snippet leads to a lot of TQDM bars and depending on your terminal, these will not overwrite but keep pushing each other down.
```
#0: 0%| | 0/13 [00:00<?, ?ba/s]
#1: 0%| | 0/13 [00:00<?, ?ba/s]
#2: 0%| | 0/13 [00:00<?, ?ba/s]
#3: 0%| | 0/13 [00:00<?, ?ba/s]
#4: 0%| | 0/13 [00:00<?, ?ba/s]
#5: 0%| | 0/13 [00:00<?, ?ba/s]
#0: 8%| | 1/13 [00:00<?, ?ba/s]
#1: 8%| | 1/13 [00:00<?, ?ba/s]
...
```
Instead, it would be welcome if we had the option to only show the progress of rank 0.
Hi,
It's hard to provide an API that would cover all use-cases with tqdm in this project.
However, you can make it work by defining a custom decorator (a bit hacky tho) as follows:
```python
import datasets
def progress_only_on_rank_0(func):
def wrapper(*args, **kwargs):
rank = kwargs.get("rank")
disable_tqdm = kwargs.get("disable_tqdm", False)
disable_tqdm = True if rank is not None and rank > 0 else disable_tqdm
kwargs["disable_tqdm"] = disable_tqdm
return func(*args, **kwargs)
return wrapper
datasets.Dataset._map_single = progress_only_on_rank_0(datasets.Dataset._map_single)
```
EDIT: Ups, closed by accident.
Thanks for the provided links. `Trainer` requires this for training in multi-node distributed setting. However, `Dataset.map` doesn't support that yet.
Do you have an API for this in mind? `Dataset.map` is already bloated with the arguments, so IMO it's not a good idea to add a new arg there.
| [
-0.4308310151,
-0.1890668422,
-0.1275618821,
-0.2148895264,
0.2067866921,
-0.4247946143,
0.2956124842,
0.2832436264,
-0.0885269493,
0.1811400056,
0.0224597193,
0.5895184278,
-0.3055741787,
0.3410098851,
-0.1393373013,
-0.0427788869,
-0.2126195729,
-0.0323361456,
-0.055747021,
0.3033629656,
-0.3115524054,
0.1690870821,
-0.1908486187,
-0.016902538,
0.0833741277,
-0.1881309897,
0.2211443186,
-0.0185970906,
0.0988404304,
-0.5225309134,
-0.2091057301,
0.5296832323,
-0.0627196208,
0.4850276411,
-0.0001148572,
0.001358458,
0.1195264682,
0.1042942032,
-0.0476055816,
-0.1225528196,
0.0642663687,
-0.5208237767,
0.1492706388,
-0.219939366,
0.1000953019,
0.225867942,
-0.3060848415,
-0.4031674266,
0.4587510228,
-0.0706014186,
0.0965236649,
0.4603017271,
-0.6107487679,
0.3124437034,
0.0127602173,
-0.2070990205,
-0.1807242483,
-0.211284101,
0.649604857,
-0.0543534011,
-0.2045799643,
0.5371059775,
-0.3084450364,
-0.0040307306,
0.0602236502,
0.0687543899,
0.8249091506,
-0.755376637,
0.182038635,
0.3523980677,
-0.1085854098,
-0.2747581303,
-0.2967471182,
-0.2797620296,
-0.0472388342,
-0.4471068382,
-0.0331499241,
0.0151952347,
-0.1512000114,
0.0797239989,
-0.8251958489,
0.1631238163,
0.0519005209,
0.0735422522,
-0.4492526948,
0.2472910136,
0.0151402848,
0.0163531117,
0.2508831918,
0.0327076428,
0.0431398116,
-0.0578360371,
0.1835709214,
0.3129428327,
-0.3747931123,
-0.2459419072,
0.3771613836,
-0.0692538172,
-0.0130393375,
0.1626440883,
-0.1077456474,
0.3663347363,
0.0358353406,
0.1256349236,
0.0610054843,
-0.0421718545,
0.3635255992,
-0.0087996544,
0.4548891783,
-0.3369383812,
0.2452256083,
0.1936722398,
0.2445548475,
-0.2460110486,
0.1326202303,
0.2575455308,
-0.1277340055,
0.1611260921,
-0.1085957438,
0.1317789555,
0.2498380095,
0.0827216804,
0.2349218279,
0.0705910549,
0.406945914,
0.4860849977,
-0.0855149999,
0.1643734872,
-0.1270091832,
-0.1030369699,
0.0207836293,
-0.3312842846,
-0.1116860062,
-0.0571598709,
-0.0351044722,
0.1304403096,
-0.085985966,
-0.0285227746,
0.232569322,
0.2945731282,
0.4892118871,
-0.0318103842,
0.3284105957,
0.6149433255,
-0.1570801735,
0.0181028973,
0.3410225809,
0.0156684369,
-0.3508783579,
0.4715285897,
-0.0816503391,
-0.1453631818,
0.1368790716,
0.0986035764,
0.038321007,
0.1980010271,
-0.43754071,
0.5194073319,
-0.2131970823,
0.1697738022,
0.0347332358,
-0.046957463,
-0.4323512018,
-0.2168845832,
0.2196734101,
0.3428822458,
-0.3551807404,
-0.2892402112,
-0.3879411817,
-0.037548624,
0.1254657805,
-0.0011684876,
-0.1117362827,
0.0879136547,
0.1021297276,
0.1766674221,
0.640273571,
-0.5258668065,
-0.2805989385,
0.5152551532,
-0.3983385861,
-0.0656130314,
-0.0379132479,
0.1497617662,
0.3066086471,
-0.1166173592,
-0.0034483273,
0.2129358202,
-0.2427794486,
0.3387229443,
-0.0791481063,
0.00305144,
0.2799411416,
-0.0328503922,
0.1697033495,
-0.0766260028,
-0.0455939546,
-0.7425558567,
0.2315540165,
0.0691490918,
0.0939861387,
0.0542090014,
0.1477712095,
-0.154244557,
-0.2021474391,
-0.3261947632,
-0.0590640493,
0.2479391545,
0.0725215971,
0.0655875802,
-0.2830641568,
-0.2511856854,
-0.0379135199,
-0.0476736985,
-0.0562172681,
0.039590843,
0.1156695411,
-0.3136799634,
-0.3568829298,
-0.1668849587,
-0.2195765376,
-0.1592024118,
0.3167144656,
-0.0602468848,
0.5436050892,
0.2269660085,
0.299115181,
-0.0678443313,
-0.1496877968,
0.1506828368,
0.1089188904,
-0.0509542897,
0.1356013119,
0.6246916652,
0.252722621,
-0.1727449,
0.2495178133,
0.3853091598,
0.2987549007,
0.2346539944,
-0.0092480984,
0.2948200107,
-0.2537184656,
0.0516787209,
0.0321503766,
0.6309401393,
-0.0149317626,
0.3147056401,
-0.1267744303,
0.1278657317,
0.0360465646,
-0.0309857409,
-0.2166048288,
-0.3182307482,
0.0765561163,
0.5746427178,
0.032406006,
-0.3334641755,
-0.0195966717,
0.4699487388,
0.0585663207,
0.080967173,
0.0481168814,
-0.212570399,
-0.0960640982,
0.325428009,
-0.0657028109,
0.0461692289,
0.1034180596,
0.2440157086,
0.027008757,
0.0495727845,
-0.1090701148,
-0.0239256416,
0.0646369681,
0.3734880984,
-0.1742325872,
0.0894105211,
0.0581408851,
0.1088734642,
-0.0745347366,
-0.4096828401,
-0.0308724064,
0.1270200312,
-0.21957165,
-0.1059784144,
-0.1564871073,
0.0310421009,
0.2368574291,
-0.0612479933,
-0.1958819926,
-0.3607875109,
0.2704037428,
0.0002102629,
-0.2369710654,
0.3326044977,
-0.0445934609,
0.2200142294,
0.0132759055,
-0.086817652,
0.1145736948,
-0.3643333614,
-0.0914064795,
-0.0024242434,
0.2999728918,
-0.0423786864,
0.6094267964,
-0.0259926487,
-0.0687722638,
-0.1498768628,
-0.4431316853,
-0.0279218592,
-0.1625175327,
0.4117762446,
-0.023346059,
0.2589908242,
-0.3701541722,
0.3188964427,
0.1239783466,
-0.1208256111,
-0.2365746647,
-0.0136081679,
0.0735202506,
0.053770531,
-0.3301969767,
0.1379595697,
-0.0903059989,
-0.3353258967,
-0.0142627349,
-0.2883004844,
0.349357903,
-0.1686572284,
-0.2898529768,
-0.0202122275,
0.1597473919,
-0.2690551579,
0.0729826018,
-0.3323302865,
0.0548887216,
-0.1665712297,
0.0502764322,
0.2083735466,
-0.0962055102,
-0.0410932824,
0.40766868,
-0.1494535357,
-0.4140760899,
0.1039565206,
0.425542295,
-0.0408837013,
0.0547971465,
0.4998473525,
0.25529176,
-0.0905970037,
0.0226901677,
-0.1846679002,
-0.2942546606,
-0.033581607,
-0.1943853945,
-0.1103773713,
0.2154735774,
0.1443075836,
0.7530950308,
0.0798754022,
0.2324293107,
-0.1291090846,
0.0441983454,
0.0942308754,
0.1052308232,
-0.0685763732,
-0.3313328326,
0.1100900695,
0.1373903304,
0.2463543266,
0.0820680037,
-0.031130055,
0.1142234579,
0.1498117596,
-0.3852807879,
-0.3363003433,
-0.0336203799,
-0.3030409515,
0.4456424415,
-0.2631607652,
0.0019409594,
-0.2232056409,
0.0769894272,
0.1038193628,
0.1736557186,
0.1909235418,
-0.2019303143,
-0.287681371,
0.1719213426,
-0.206338346,
0.238124609,
0.1619803756,
-0.2831714749,
0.0986716598,
-0.1767017245,
-0.0410734825,
0.0780217722,
0.6865014434,
-0.5438628197,
0.0688265339,
0.2146529257,
-0.4480089843,
-0.3807351887,
0.0378913283,
-0.1101987064,
-0.1300305724,
0.6425395012,
0.4013277292,
-0.1195617467,
-0.2323408872,
-0.2657984495,
-0.0428179577,
-0.1700270921,
-0.3527816832,
-0.1957251728,
-0.0367371663,
-0.1234207898,
0.3520954549,
0.1796111614,
-0.0416388288,
-0.241516903,
-0.2184573561,
0.0256137382,
-0.2747449875,
0.1475149393,
0.1760704815,
0.1664403379,
0.0861361772,
0.1351898611,
0.2647463381,
-0.1165720895,
-0.1884260029,
0.0071450323,
-0.0729647279,
0.0380234122,
0.089348793,
-0.0790291503,
0.2048985511,
0.4297777414,
0.2128670365,
0.2863310874,
-0.0772850811,
0.3741732538,
0.0300183501,
0.1620013118,
-0.0063154208,
0.0333501622,
-0.0741985515,
-0.0434121639,
0.2998906672,
0.2862183452,
-0.2291557342,
0.1596321613,
-0.058326818,
-0.245119676,
-0.1848119795,
0.3225052059,
0.7665419579,
-0.3316269517,
0.1501496285,
-0.1969251484,
0.1467068791,
-0.1341458559,
-0.0840591192,
0.2120922357,
-0.2035773546,
-0.0139604863,
-0.1969185919,
0.0044356687,
0.369119972,
0.2431994975,
-0.216109395,
0.2082955986,
-0.1251951009,
0.1503168344,
-0.0537778661,
-0.0935743973,
0.0527349971,
-0.2973833978,
-0.2061636746,
0.0658343136,
0.1763323396,
-0.5113732219,
-0.1461710483,
0.0080613559,
0.2075695992,
0.1693142354,
-0.0204610191,
-0.416639626,
-0.6406157017,
0.0861415565,
0.159448728,
-0.2495946437,
-0.0063112909,
0.0036948004,
0.0978794396,
0.2260836363,
0.0006404306,
0.0043045254,
0.3239002228,
0.3471233249,
0.1543640941,
-0.1259569228,
0.2623118758,
-0.022670513,
-0.0758227482,
0.2061664611,
0.0603430569,
-0.086866647,
-0.1755895317,
0.3150214255,
0.370682478,
0.3845092654,
0.4862972796,
0.1055724099,
0.1456052661,
-0.0722610205,
0.0727663487,
0.2309440821,
0.013133022,
0.3141043484,
-0.338231951,
-0.1284605265,
-0.0045911781,
-0.041730091,
0.0483705625,
0.0710841119,
-0.0713839829,
-0.1461794823,
-0.2748232186,
-0.2100498229,
0.1390227973,
-0.2031654119,
0.4756456912,
0.3858188689,
0.028741654,
-0.1843609512,
0.3532262743,
0.2297207862,
-0.0962179452,
-0.0063137566,
-0.3468392491,
-0.2678722739,
-0.4179829359,
-0.0707437098,
-0.2213482261,
0.1008652598,
-0.2493992746,
0.491471827,
-0.0937991366,
-0.0712429658,
-0.3085667491,
-0.2708158493,
0.0434804522,
0.1542228758,
0.2227052152,
0.1402250826,
0.0131168608,
-0.0627256557,
-0.0825480372,
0.0326313116,
-0.4642155766,
-0.2491562217,
-0.1854700148,
0.1354643106,
-0.0790495351,
-0.3070700169,
0.3205871582,
0.0986735821,
0.0255466215,
-0.2482574582,
0.1563764811,
0.2478354722,
0.0454148687,
-0.0666568652,
0.2596554458,
-0.0633798689,
0.0494038537,
0.0929333568,
0.0597196147,
-0.0812009722,
0.0679546967,
0.2734104991,
-0.0850959271,
0.0954528451,
0.1196252853,
-0.0533440597,
0.3537808657,
0.0834016874,
0.1719777286,
0.0648918003,
-0.1126004383,
0.2653312683,
0.1680529416,
0.0667035282,
-0.1681688428,
-0.2863360345,
0.2885406017,
0.154861629,
-0.2120993584,
-0.0974818245,
0.2179534733,
0.1371529102,
0.3699251711,
0.271276623,
-0.011820239,
0.1171556562,
0.231899187,
0.2284831852,
-0.0700562894,
-0.5980910659,
0.0383906513,
-0.0077222893,
0.1476759762,
0.0018423456,
0.3458790183,
0.0663148686,
-0.1158098653,
-0.1652284861,
0.0941052884,
0.2758262157,
-0.0301939491,
-0.1930519193,
-0.3406192064,
-0.0632768571,
-0.2115933299,
-0.0661827773,
-0.280153662,
0.0430860519,
0.1561555713,
-0.1930808574,
0.1221652627,
-0.3020127416,
-0.0154763581,
0.3262811899,
0.0402528159,
-0.3108184934,
0.0181960203,
-0.0791394785,
0.0800840631,
0.0102204494,
0.121706523,
-0.1059051603,
0.4767225385,
0.1936995238,
0.2732802927,
-0.3330129087,
-0.3469904661,
0.092055358,
0.3362341821,
-0.2090103626,
-0.3653479218,
-0.0925732926,
0.1584281921,
0.2232595831,
0.0079193339,
0.1118977889,
0.2188560516,
-0.5211766362,
-0.2835444212,
-0.0337070785,
0.0498511381,
-0.2006530762,
-0.0270164162,
-0.1148115471,
0.2158549279,
0.1922077686,
0.0605352074,
-0.1011594608,
0.0881113783,
0.0030149871,
0.1353210956,
-0.0763149932,
0.4845469892,
0.2619417608,
-0.0938853025,
0.1909406781,
-0.0934404433,
-0.0914553925,
-0.115631789,
0.4493623972,
-0.0976894125,
0.1405595541,
-0.1483159065,
0.0855533108,
0.179046154,
0.075468868,
-0.0201883968,
0.0062136315,
-0.4910117984,
-0.0646955818,
-0.6742827296,
-0.1775180548,
0.0205470622,
-0.2066100389,
0.015341646,
0.1503042579,
0.0287598148,
0.5615908504,
0.1705821753,
-0.5960322022,
-0.0024992132,
-0.0052038771,
-0.4192695022,
0.2556797564,
-0.1256842911,
0.0077716224,
0.1255417168,
-0.2336449474,
0.1472595483,
0.1125839129,
0.0735933632,
0.1184525043,
0.1695950627,
0.2334463447,
0.5074121356,
-0.0580972843,
-0.0108549846,
0.2157550603,
-0.0001877785,
0.2268754095,
-0.0217953455,
0.2485585809,
-0.3523628116,
0.0007240865,
0.1049280912,
0.2295539528,
-0.2563163042,
-0.168278411,
-0.0837112963,
-0.0355900191,
0.1861155331,
-0.0004250317,
-0.11142876,
-0.0358911492,
0.4071733654,
0.0949408859,
-0.2953317761,
0.1882798821,
0.1933804154,
0.5045642257,
-0.0661421418,
-0.3454596698,
0.2724805772,
-0.5454987884,
-0.4275092483,
-0.294942677,
0.1608918905,
-0.0883222148,
0.1016665325,
-0.292319864,
-0.2548891306,
0.2855874896,
-0.0782548189,
-0.2348378003,
0.4086790383,
-0.2631020546,
-0.2392437458,
-0.0693146661,
-0.1275602132,
-0.1518551409,
0.0137772756,
-0.2471550107,
-0.2126528323
] |
https://github.com/huggingface/datasets/issues/3177 | More control over TQDM when using map/filter with multiple processes | Inspiration may be found at `transformers`.
https://github.com/huggingface/transformers/blob/4a394cf53f05e73ab9bbb4b179a40236a5ffe45a/src/transformers/trainer.py#L1231-L1233
To get unique IDs for each worker, see https://stackoverflow.com/a/10192611/1150683 | It would help with the clutter in my terminal if tqdm is only shown for rank 0 when using `num_proces>0` in the map and filter methods of datasets.
```python
dataset.map(lambda examples: tokenize(examples["text"]), batched=True, num_proc=6)
```
The above snippet leads to a lot of TQDM bars and depending on your terminal, these will not overwrite but keep pushing each other down.
```
#0: 0%| | 0/13 [00:00<?, ?ba/s]
#1: 0%| | 0/13 [00:00<?, ?ba/s]
#2: 0%| | 0/13 [00:00<?, ?ba/s]
#3: 0%| | 0/13 [00:00<?, ?ba/s]
#4: 0%| | 0/13 [00:00<?, ?ba/s]
#5: 0%| | 0/13 [00:00<?, ?ba/s]
#0: 8%| | 1/13 [00:00<?, ?ba/s]
#1: 8%| | 1/13 [00:00<?, ?ba/s]
...
```
Instead, it would be welcome if we had the option to only show the progress of rank 0. | 16 | More control over TQDM when using map/filter with multiple processes
It would help with the clutter in my terminal if tqdm is only shown for rank 0 when using `num_proces>0` in the map and filter methods of datasets.
```python
dataset.map(lambda examples: tokenize(examples["text"]), batched=True, num_proc=6)
```
The above snippet leads to a lot of TQDM bars and depending on your terminal, these will not overwrite but keep pushing each other down.
```
#0: 0%| | 0/13 [00:00<?, ?ba/s]
#1: 0%| | 0/13 [00:00<?, ?ba/s]
#2: 0%| | 0/13 [00:00<?, ?ba/s]
#3: 0%| | 0/13 [00:00<?, ?ba/s]
#4: 0%| | 0/13 [00:00<?, ?ba/s]
#5: 0%| | 0/13 [00:00<?, ?ba/s]
#0: 8%| | 1/13 [00:00<?, ?ba/s]
#1: 8%| | 1/13 [00:00<?, ?ba/s]
...
```
Instead, it would be welcome if we had the option to only show the progress of rank 0.
Inspiration may be found at `transformers`.
https://github.com/huggingface/transformers/blob/4a394cf53f05e73ab9bbb4b179a40236a5ffe45a/src/transformers/trainer.py#L1231-L1233
To get unique IDs for each worker, see https://stackoverflow.com/a/10192611/1150683 | [
-0.38911587,
-0.2537093163,
-0.1010459661,
-0.1923469156,
0.2609188259,
-0.449105531,
0.5612116456,
0.3046912253,
-0.1326827705,
0.2505338788,
0.0430045575,
0.4588483572,
-0.3234093189,
0.3719583452,
-0.075382553,
-0.0509360023,
-0.1899889708,
-0.0078426553,
-0.0903167427,
0.252021879,
-0.2570383251,
0.211347729,
-0.1396318227,
-0.0092127081,
-0.1701570302,
-0.1101574302,
0.2882324159,
0.0243732948,
0.1481698155,
-0.4589737058,
-0.2807813287,
0.5592170954,
-0.0881316289,
0.4915172756,
-0.0001185518,
0.0586646199,
0.0643323213,
0.1580015123,
-0.0678700209,
-0.1461372375,
0.0228629243,
-0.5203014016,
0.1783991158,
-0.2469513118,
0.1389306784,
0.302803278,
-0.1758897901,
-0.2331065536,
0.4582579136,
-0.0854632854,
0.061794363,
0.5493258238,
-0.6976991296,
0.3524906933,
0.0275906511,
-0.1426094174,
-0.1743514538,
-0.1831695586,
0.6869822145,
-0.0292384997,
-0.2020935118,
0.5249747634,
-0.2025718838,
-0.048735071,
-0.0005854949,
0.1074929386,
0.9600200653,
-0.7401765585,
0.2662088871,
0.434789896,
-0.1880081296,
-0.1738137603,
-0.2002180219,
-0.2800693214,
-0.0116347503,
-0.3009384871,
-0.006667417,
0.1240595952,
-0.0772035122,
0.1499624848,
-0.8625447154,
0.2114996016,
0.0475513004,
0.0566546693,
-0.465313524,
0.3657105565,
0.0730062276,
-0.004960984,
0.3385875821,
0.083179228,
0.1302760243,
0.0254145414,
0.1679088175,
0.2480477989,
-0.285079211,
-0.2479435354,
0.2617898285,
-0.1502369642,
-0.0304845385,
0.0922304913,
-0.1614448726,
0.3531846106,
0.0599271618,
0.0575617179,
0.0926546231,
-0.1398378164,
0.3090636432,
0.0671842843,
0.4235622585,
-0.3416371346,
0.1733919233,
0.1627538353,
0.1811368167,
-0.2295928597,
0.0731632337,
0.2768247128,
-0.1533474922,
0.197362408,
-0.0382856429,
0.0711900815,
0.2002169341,
0.0105182845,
0.202400893,
0.1017095894,
0.3765787184,
0.5593299866,
-0.1060843244,
0.1870785505,
-0.1884036511,
-0.1521339715,
0.0080375066,
-0.3840084374,
-0.0144263562,
-0.154758811,
-0.0832019299,
0.0654363036,
0.0224202145,
-0.0207370333,
0.2590895891,
0.1906213909,
0.4199030399,
0.0008651969,
0.2464149594,
0.6163261533,
-0.1648916006,
-0.0123428749,
0.2770442963,
-0.0219169296,
-0.2753281891,
0.4926714897,
-0.1023094803,
-0.1826322824,
0.010040422,
0.0464343652,
0.0561837964,
0.2681394517,
-0.3590458632,
0.4042214155,
-0.1780249178,
0.2227260768,
-0.0524661168,
-0.046678856,
-0.3326430917,
-0.1200271472,
0.0870891139,
0.3319005966,
-0.3201569021,
-0.3935421109,
-0.3440549672,
0.0089243222,
0.245426178,
0.0708915964,
-0.1899323463,
0.1174932122,
0.1053167507,
0.202767998,
0.5642050505,
-0.4466155469,
-0.207700178,
0.5597566366,
-0.4824496508,
-0.0861885399,
0.1295087785,
0.1725864261,
0.3200224638,
-0.0432285741,
-0.1812172979,
0.1060204804,
-0.2086607516,
0.4496415257,
-0.1057197079,
-0.0511742868,
0.2757214606,
-0.0211134553,
0.2137646973,
0.0126354657,
-0.0883577913,
-0.4926644266,
0.3617993593,
0.0064285938,
0.0275254007,
-0.0478535444,
0.0997065231,
-0.1992168576,
-0.1829973608,
-0.2052147388,
-0.0755682886,
0.1542928815,
0.0144555373,
0.2087355554,
-0.2537457049,
-0.20307073,
-0.0044667716,
-0.1185344458,
-0.0569651052,
0.0839952454,
0.0381485447,
-0.3131381273,
-0.5101326108,
-0.2995295823,
-0.1969640553,
-0.0955089405,
0.2695786655,
-0.029415952,
0.5302408934,
0.3033756316,
0.1727114767,
0.0543764606,
-0.1886643767,
0.1555586159,
0.1192021966,
-0.112651661,
0.1578167975,
0.5909389257,
0.205424577,
-0.1762369573,
0.2570673227,
0.473816067,
0.4173780978,
0.1827252358,
-0.0091143278,
0.2500741482,
-0.2937289476,
0.0543219969,
-0.006907518,
0.5941433311,
0.0038705217,
0.2458103448,
-0.1593246013,
0.1527005434,
0.0057526794,
-0.102463223,
-0.1839679927,
-0.3400194645,
0.083326444,
0.664758563,
-0.042983491,
-0.171374768,
-0.1390771866,
0.4642449021,
0.1071720794,
0.0929108262,
0.0636564866,
-0.217775628,
-0.063228339,
0.3123137355,
-0.150160566,
0.0290050656,
-0.0164655522,
0.2546281815,
-0.0806782544,
-0.010835737,
-0.0648141354,
-0.1081980243,
0.0514830761,
0.3043226302,
-0.0854586735,
0.1056125164,
0.0773887709,
0.0210355259,
-0.1193186715,
-0.4288007915,
0.0038737361,
0.1477965117,
-0.3083959818,
-0.1254992038,
-0.0869309753,
0.1349985749,
0.1600981802,
-0.0002257686,
-0.2952759266,
-0.3686133921,
0.2851700485,
0.098194629,
-0.1707388759,
0.3687419593,
0.0090118414,
0.2567465305,
-0.0256631803,
0.1143566743,
0.0892861709,
-0.274428308,
-0.1000492573,
-0.0491774268,
0.2954654992,
-0.0690149069,
0.4327449501,
-0.0747946203,
-0.1313676536,
-0.2113611102,
-0.4130221903,
-0.0668222457,
-0.137102291,
0.4504960477,
-0.0463076159,
0.2709873319,
-0.4300174713,
0.214660272,
0.0570701621,
-0.1451870501,
-0.2291474491,
-0.0239734724,
0.0309009943,
0.0508559309,
-0.2485609502,
0.0661578178,
-0.1011807323,
-0.2414948195,
0.0072096107,
-0.2861693203,
0.3770838082,
-0.0816247016,
-0.2183853388,
-0.1367138028,
0.1966685653,
-0.2821016908,
0.0489801466,
-0.434412986,
0.0388191976,
-0.1085398942,
0.0501246415,
0.1083354875,
-0.0631528199,
-0.0887397453,
0.3546780348,
-0.1685388237,
-0.2654784918,
0.0951211974,
0.2687970102,
0.0296842121,
0.0785839483,
0.4544782341,
0.3423356414,
-0.0873147845,
0.130494222,
-0.1603885293,
-0.2848637998,
0.1354693174,
-0.0948130935,
-0.1525226235,
0.1465717852,
0.1170560271,
0.758241415,
0.024584081,
0.2541175783,
-0.2149054706,
-0.0497988686,
0.0475246832,
0.2085901946,
-0.1434073001,
-0.2690934837,
0.1645692289,
0.1064552739,
0.3016596735,
0.021129217,
-0.0865328461,
0.252679348,
0.2673391402,
-0.5005757213,
-0.3232829273,
0.0914258584,
-0.2956824303,
0.4084461927,
-0.2588526607,
0.0457434542,
-0.1991983801,
-0.0155239692,
0.0030642471,
0.1561243534,
0.1778429598,
-0.2293095887,
-0.2677212954,
0.1086860746,
-0.2029832155,
0.1095370799,
0.1526562423,
-0.2159896493,
0.0679310411,
-0.2058665752,
0.0300131794,
0.1713931262,
0.8418842554,
-0.4375258982,
0.0845860839,
0.0978585705,
-0.4899410605,
-0.3481968343,
0.0279599503,
-0.0867730677,
-0.1615941226,
0.6983283758,
0.3732483089,
-0.0670838133,
-0.2921624482,
-0.1196864843,
-0.1560244709,
-0.2280293256,
-0.3928213716,
-0.2110572904,
0.0353689976,
-0.0733152702,
0.2904889584,
0.1473674923,
0.0126687856,
-0.3388570547,
-0.2556131184,
0.0954770297,
-0.3017023802,
0.1644884944,
0.1984921694,
0.1613894552,
0.1672130823,
-0.0103671513,
0.4107859135,
-0.0950201824,
-0.2996285856,
-0.0780317858,
-0.06244535,
0.1353492886,
0.107482098,
-0.1276284754,
0.2468713522,
0.5825628042,
0.2502467334,
0.1603529751,
0.1006487608,
0.4348798692,
0.1532624811,
0.2029697448,
-0.0486424118,
0.049679134,
-0.0669717565,
0.0114076706,
0.2427914292,
0.2551116943,
-0.1207129955,
0.0261289086,
-0.151102826,
-0.2132668495,
-0.1433131993,
0.2950484753,
0.9154860973,
-0.4674292207,
0.2194342911,
-0.2604093254,
0.1588884145,
-0.126725629,
-0.2992579639,
0.3151628673,
-0.2772920132,
-0.020341577,
-0.1926441491,
-0.0055751419,
0.2884958684,
0.3479523361,
-0.1848609895,
0.1389752775,
-0.1170695797,
0.1146100834,
-0.0925142094,
-0.1042924002,
0.0892273635,
-0.2853250206,
-0.1751136482,
-0.0123889344,
0.1834778637,
-0.4863048196,
-0.1379461735,
-0.0306642223,
0.1339401901,
0.1644096375,
0.0342611969,
-0.4062950015,
-0.6051502824,
0.1430425793,
0.3014800549,
-0.1604112685,
-0.0164136738,
0.0060464069,
0.0359403864,
0.2560423315,
0.0262639318,
-0.012050624,
0.3010593951,
0.3211570978,
0.1350071877,
0.0031610103,
0.1324310154,
-0.0082524233,
-0.1720573902,
0.1055917665,
0.0576318651,
-0.1960266382,
-0.2223438025,
0.3243256807,
0.2516051829,
0.4120495021,
0.5506590605,
0.1888282895,
-0.0206884909,
-0.1320136189,
0.0361610018,
0.1452041268,
-0.0492289476,
0.3306541741,
-0.237377122,
-0.2239301354,
0.0185698308,
-0.0113675985,
0.2225938141,
0.1858411729,
-0.0839378387,
-0.0740072206,
-0.2041687071,
-0.2340420187,
0.1400861144,
-0.1456966251,
0.3757303655,
0.3643316627,
-0.0323822759,
-0.2988889813,
0.3109918535,
0.2525811791,
-0.0569516607,
0.1158809513,
-0.4001502693,
-0.1884637028,
-0.4984309077,
-0.1231772378,
-0.2396868616,
0.1653192192,
-0.2134907395,
0.599486053,
-0.0480389521,
-0.0663298443,
-0.2559880018,
-0.2753861248,
-0.1017805561,
0.1958424896,
0.2002506852,
0.047714144,
0.0266362745,
-0.0550394282,
-0.1025660411,
-0.0431044288,
-0.48825562,
-0.1963012666,
-0.1860303879,
0.1581851095,
-0.0110602118,
-0.3502096236,
0.2540569305,
0.2842298448,
0.0651787147,
-0.2460328788,
0.1709335446,
0.2645646036,
0.134590432,
-0.0071339826,
0.2880918086,
-0.1944213659,
-0.0063068527,
0.0465444215,
0.1371365786,
-0.0973928869,
0.1170483008,
0.2945404053,
-0.0299489349,
0.1055300683,
0.1645984799,
-0.0386911891,
0.3572491109,
0.1805336326,
0.0528882332,
0.021413533,
-0.1621692479,
0.327989161,
0.0845104903,
0.038968876,
-0.1328814626,
-0.3172563016,
0.2967633307,
0.1269910783,
-0.2341636568,
-0.2128888369,
0.2690897286,
0.1256725192,
0.3352079391,
0.3320795596,
0.0965769961,
0.0721660927,
0.2675558925,
0.3034284115,
-0.2221042961,
-0.7685362697,
0.1306214482,
-0.0497044735,
0.1229927763,
0.0609560236,
0.4181328118,
-0.0529886819,
-0.1362335831,
-0.1532372087,
0.1836544424,
0.2500224113,
-0.0819922388,
-0.1897193044,
-0.2697096467,
0.0544010997,
-0.3780250251,
-0.0458788164,
-0.3714136183,
-0.0508853085,
0.1906279027,
-0.1675582826,
0.2007522881,
-0.3306801319,
-0.0983486846,
0.2585294247,
-0.0273690894,
-0.3216257989,
0.018139625,
-0.0518999994,
0.0610235408,
0.0245068632,
0.1508387625,
-0.1044497564,
0.5497585535,
0.2206370234,
0.1856085062,
-0.3591706753,
-0.3166953623,
0.1054165289,
0.327601403,
-0.2333043814,
-0.4405397475,
-0.1933665127,
0.1533294469,
0.1930601001,
0.0854097977,
0.0922421366,
0.2210784107,
-0.3343649507,
-0.3848135471,
0.0037981563,
0.0293670166,
-0.2083681822,
-0.050518468,
-0.0758160576,
0.2109811902,
0.0891627669,
0.0223655719,
-0.051605057,
0.0521302707,
0.0970535949,
0.0832967833,
0.0696936399,
0.4015187323,
0.2838950157,
-0.2122601122,
0.1909360439,
-0.1078470647,
-0.1341764182,
-0.0203227084,
0.5049072504,
-0.1652362049,
0.2085231841,
-0.1287367642,
0.0559063293,
0.2475203425,
0.0857690871,
0.0166572277,
-0.0920776352,
-0.5144255757,
0.0076158768,
-0.5085467696,
-0.1294489801,
-0.0438819304,
-0.0627092123,
0.0502087735,
0.2718499303,
-0.0371617526,
0.4494250417,
0.1701127291,
-0.6974037886,
-0.0170448292,
0.0139852762,
-0.4215818644,
0.3286935687,
0.0045661405,
0.0699894279,
0.0929951668,
-0.1636538506,
0.2138977796,
0.1139935106,
0.0426109768,
0.08320041,
0.2343348861,
0.1423758566,
0.5474119186,
-0.1803428233,
-0.0439572558,
0.1766676009,
0.0284835622,
0.3055345714,
-0.1264450252,
0.124496609,
-0.3322280347,
-0.0080770561,
0.2304760814,
0.2452610284,
-0.2279092073,
-0.0216128025,
-0.1237872392,
-0.1127991825,
0.1668330282,
0.0930949822,
-0.1122654527,
-0.0391628332,
0.3435001075,
0.1410677433,
-0.3629162312,
0.1543611437,
0.2128589749,
0.3500190973,
-0.0294628292,
-0.3380789459,
0.1899281889,
-0.4493823647,
-0.5179111958,
-0.4146440029,
0.2104440033,
-0.026816126,
0.1781372428,
-0.2696576416,
-0.2386586815,
0.2246345431,
-0.1295058727,
-0.2185190469,
0.3859246075,
-0.1782838553,
-0.2450935692,
-0.0870832354,
-0.2411431372,
-0.1024531201,
-0.0756801292,
-0.2612555921,
-0.275418222
] |
https://github.com/huggingface/datasets/issues/3172 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1` | NB: even if the error is raised, the dataset is successfully cached. So restarting the script after every `map()` allows to ultimately run the whole preprocessing. But this prevents to realistically run the code over multiple nodes. | ## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 37 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
NB: even if the error is raised, the dataset is successfully cached. So restarting the script after every `map()` allows to ultimately run the whole preprocessing. But this prevents to realistically run the code over multiple nodes. | [
-0.4948825538,
0.0149980877,
0.1314036548,
0.2600641847,
0.3205186129,
0.0034364853,
0.4633168578,
0.0224105176,
0.020504212,
0.1974067092,
0.1711901277,
0.5095179677,
-0.2995520234,
-0.264898479,
-0.2079024166,
0.20999071,
0.0466203913,
-0.1581077874,
-0.2430632859,
0.4450131059,
-0.4338950813,
0.1656219661,
-0.2789233029,
0.1814817935,
-0.1627854258,
0.037097007,
-0.0776935667,
0.3484530449,
0.086063616,
-0.4888786376,
0.2598611414,
-0.1325255781,
0.2476995438,
0.5398383737,
-0.0001272483,
0.0460722372,
0.2578923106,
-0.1024022028,
-0.3156310916,
-0.0267750658,
-0.3072264791,
0.1170792803,
0.0201555807,
-0.0358047523,
0.2532773614,
0.1260475665,
-0.0460105874,
-0.3230039179,
0.1596812457,
0.4001817703,
0.0492290296,
0.2706770897,
-0.1699385196,
-0.0399687663,
0.1190547645,
0.2666268945,
-0.0602310933,
0.3845189214,
0.2321909517,
-0.2951949835,
0.1350496411,
-0.0893990919,
-0.1739122272,
-0.0045469617,
0.3510588109,
-0.040984042,
0.0232143812,
-0.4895768762,
-0.1028225273,
0.1353897154,
-0.0613663904,
-0.3817996681,
-0.2259421498,
-0.074259758,
-0.1902290136,
-0.2047741115,
-0.0998716056,
-0.0249887556,
-0.1718675345,
0.2097604126,
0.0638547093,
-0.0485783108,
-0.2467311025,
0.1295648515,
0.0103537468,
0.4980972111,
0.028983606,
0.3650413454,
-0.1222733855,
-0.0264729783,
-0.4142026305,
0.1232841834,
-0.0591074862,
0.0954193994,
-0.0946487486,
-0.0601428933,
0.029420143,
-0.4986715019,
0.3885610998,
-0.3821170032,
0.2268929482,
0.1152440906,
0.4275253117,
0.3449109495,
0.3994285762,
-0.2721118331,
0.2052561045,
0.4494012594,
0.3322502971,
0.1261998415,
0.2210259736,
-0.0018743156,
0.1574819833,
-0.1251470596,
0.2052963227,
0.431799233,
0.241381526,
-0.2272038907,
-0.0174590219,
0.3960925043,
-0.1598087251,
0.0779932067,
0.1089990214,
0.1883090734,
0.4819608033,
-0.0319109149,
0.097362414,
0.0852163509,
-0.3469713032,
0.069705449,
-0.0165418461,
-0.1447065622,
-0.2634493709,
0.1307265162,
0.1109899133,
0.1422279328,
0.0236046854,
0.0288851876,
-0.2137299776,
-0.1220510453,
0.3333073556,
-0.1442388445,
0.042644646,
0.4357181489,
-0.3199975789,
0.2193747163,
0.1305710971,
0.1577418447,
-0.1090303287,
0.4621479809,
-0.0068931812,
-0.4316523969,
-0.1327647418,
0.0437070057,
-0.1331689358,
0.3940793872,
-0.1725142747,
-0.0378822275,
0.5560599566,
-0.2402357757,
0.1401233077,
-0.4384782612,
-0.5609032512,
-0.1854166538,
-0.0538089052,
0.3940499127,
-0.0901180506,
-0.0324345492,
-0.0583023615,
-0.2039723098,
-0.0181757491,
-0.1308778226,
-0.2065330744,
0.2350629568,
-0.2520934939,
0.0857779235,
0.3741843998,
-0.1164215356,
-0.5244369507,
0.2536508441,
-0.4085045755,
-0.1177069843,
-0.4146102071,
0.1758605093,
0.0633688569,
-0.0385135524,
0.1088755876,
0.1612367481,
-0.1654226333,
0.042291306,
-0.2292448729,
-0.0202572122,
-0.0226202644,
0.1228499562,
0.3228341937,
0.0421641506,
0.1730149984,
0.1101935208,
0.2251439542,
-0.0360024199,
0.0431245752,
0.3198364973,
0.2104032189,
-0.1014229283,
-0.0388899557,
-0.5471795797,
-0.090444386,
0.2984938323,
-0.2046452016,
-0.0949443504,
-0.4452670217,
0.0026962766,
0.0058617578,
0.340518415,
-0.0987058952,
-0.3571216166,
-0.0807114094,
0.0995008722,
-0.3186140358,
-0.2070307583,
0.0025406936,
0.2276994735,
-0.1679099649,
0.1404096782,
-0.5382887125,
-0.1865255088,
0.0094540333,
-0.4891037941,
-0.2562517822,
-0.052723676,
-0.0526048169,
-0.0540935434,
-0.2584121525,
0.3309264183,
0.3661315441,
-0.5121657252,
-0.2837772965,
0.0160828736,
0.0031391773,
0.0102091385,
-0.1074363515,
0.1130136624,
0.1510251909,
0.1967197061,
-0.0199705102,
0.2717967331,
-0.3765307665,
0.3035851717,
-0.1066413298,
0.1059917808,
0.0149018308,
0.2249100804,
-0.1494158506,
-0.301830709,
-0.0715532899,
0.2841206789,
-0.0581324287,
0.0478569455,
0.2563275993,
0.0223193429,
0.1165336594,
0.0069209449,
0.1036122441,
0.0942058265,
0.0301587582,
0.1494591832,
0.1820777655,
-0.0936223716,
0.7560115457,
-0.0835572109,
-0.1237431541,
0.1788657606,
-0.0323518328,
0.0961246043,
0.0169203002,
0.3523865044,
0.4663641751,
0.2155162543,
0.2119995803,
0.2142360657,
0.0836378708,
-0.5376945138,
-0.1756772548,
0.2406242192,
-0.4153204262,
0.5134966373,
-0.2037621289,
0.0930119455,
-0.1981105804,
-0.0625841394,
-0.1029865295,
-0.422391206,
-0.2592754364,
0.3001411259,
-0.3008063138,
0.1081114337,
0.0544907227,
-0.159430638,
0.0861884505,
0.1013751701,
0.3512023389,
-0.2590730786,
-0.0052100834,
-0.2097328454,
0.2074592859,
0.0198078211,
0.2121816278,
0.1231953353,
-0.3192383647,
0.0487811491,
-0.33656618,
0.1015573144,
0.1328026801,
0.6923866272,
0.2072793096,
0.0852454603,
-0.1494085938,
0.0258820597,
0.2258658409,
-0.1865837723,
0.0009124022,
0.3407762349,
0.1408566684,
0.045564428,
-0.3188872039,
-0.1834887564,
-0.1682406366,
-0.270342797,
-0.0995852724,
-0.3767811656,
0.1229390427,
0.1574546099,
0.1579884589,
0.2216858715,
-0.0129298586,
0.0073680351,
0.1126240045,
0.3374051154,
-0.0788992345,
-0.2735808492,
-0.1783544719,
-0.0092282603,
-0.0247023515,
-0.1286478639,
0.2723335922,
-0.3488797247,
-0.243644163,
0.0243684314,
0.1317640245,
-0.0563963018,
-0.2671625614,
0.5877299905,
0.0857557952,
0.1951409876,
-0.1148174033,
-0.187913835,
0.1556042582,
-0.294072181,
0.003264142,
0.1971102357,
0.67818892,
0.0620538518,
0.9768183231,
0.3290991485,
-0.1423387676,
0.0260339417,
-0.0972262695,
0.0620756261,
-0.1731203496,
-0.2154791504,
-0.0603203215,
0.1031091958,
-0.1072254479,
0.187648505,
-0.1932964623,
-0.1414006054,
0.0314606093,
-0.2449008822,
-0.0501985289,
-0.382968992,
0.2576635778,
-0.1022965014,
0.2845242918,
0.0066037714,
-0.1052430049,
-0.0394718051,
0.017090885,
-0.2345443964,
0.2913269103,
0.1789411604,
0.0499077104,
0.1823030114,
-0.2426895052,
-0.4169843793,
0.2355182171,
0.1996058077,
0.8556868434,
-0.2914413214,
-0.1626004279,
-0.376548171,
-0.1890307367,
0.3463118076,
-0.3203761876,
0.0756434128,
-0.0535490997,
-0.0761575103,
-0.6055014133,
-0.2138319463,
-0.1817930788,
0.3289915025,
-0.080714941,
0.1809557825,
0.0476160347,
-0.0206205081,
0.3977997899,
0.1083732024,
-0.1189278513,
-0.0844883323,
-0.4585122466,
-0.2879629433,
-0.4599941075,
0.1135036498,
0.1844422817,
-0.1448991001,
0.1122370586,
-0.1597159654,
0.0460236445,
-0.1787990481,
0.0670286566,
0.1180576161,
-0.0973421261,
-0.2216076851,
0.2358569205,
-0.1230114028,
0.0314558782,
0.4571040869,
0.2976825833,
0.0777771473,
-0.3232281208,
0.5040935874,
-0.0095885843,
0.3939349055,
0.274541527,
-0.0331511348,
0.0252192635,
-0.1358571947,
0.1487317085,
-0.2897136509,
0.0074729994,
0.2463853508,
0.0577338785,
-0.0589236319,
-0.0225334391,
0.1207696274,
0.3456435502,
-0.1381041706,
0.2780246437,
-0.2659444213,
-0.2247655541,
0.5866340995,
0.2790298462,
0.7352151871,
-0.0209480189,
0.0485673994,
-0.0783497915,
-0.1783870906,
0.059728086,
0.3720564544,
0.1332145184,
-0.5092824101,
-0.4189901352,
-0.0522722304,
-0.2977716625,
0.1734293401,
-0.004212745,
0.0000237749,
0.2661078274,
-0.3108479679,
0.2485472858,
0.0263080895,
0.0798367932,
0.1531869918,
-0.1122225448,
-0.002374857,
0.0314305313,
-0.0392122865,
-0.2556895018,
-0.2904174924,
0.1522657871,
-0.1863823235,
-0.1586299241,
-0.3658851683,
0.0230388399,
0.0497672297,
0.3503794372,
0.0235393774,
0.2082855701,
-0.0349107087,
0.40045771,
0.0840862319,
0.2828443646,
0.1042817906,
-0.167769894,
-0.0745417699,
0.1363827288,
0.0949862003,
-0.0010769728,
0.2390249074,
0.030185096,
-0.2571736276,
-0.0871277079,
0.019752061,
-0.0939238146,
-0.0276466236,
0.132452473,
0.2831028998,
-0.259221822,
0.1062514335,
-0.2190851569,
-0.2358784527,
-0.0836267099,
-0.0020864478,
0.2793975472,
-0.1376195848,
0.2402713001,
-0.3386164606,
-0.3843049109,
-0.0225932561,
0.3351632059,
-0.1534478664,
0.1905505806,
0.0700164363,
0.1095100269,
-0.1174016148,
-0.0930841565,
0.4142432809,
-0.0750810727,
-0.4553853273,
-0.0493946448,
-0.0441564582,
-0.117678076,
0.0146504147,
-0.0403106399,
-0.1042328924,
-0.1789651215,
-0.1251273453,
-0.5647389293,
-0.5011954308,
0.1040916443,
-0.1844216138,
0.3103720844,
-0.0923370048,
-0.2819031775,
-0.4639461637,
0.0545232445,
-0.1257538795,
-0.1608896703,
0.0592507273,
0.2837460041,
-0.1096071377,
0.1030653268,
-0.2700548172,
-0.2716081738,
-0.0812648311,
0.5102872849,
-0.1264069676,
-0.0312650576,
0.0581251271,
0.2318339646,
-0.0472484604,
-0.1240467504,
-0.0733814538,
0.016511105,
-0.0990744308,
-0.1423505992,
0.5031332374,
0.2737665772,
-0.0621350408,
0.1874612868,
0.3553144336,
0.3284831941,
0.0009875667,
0.4864467978,
-0.0433416106,
0.3586205542,
-0.1149697304,
0.2920767665,
-0.0773061216,
-0.0562083647,
-0.0538049303,
0.1092747077,
0.1868922412,
0.1860325336,
0.3210430741,
-0.2804486156,
0.1834419668,
-0.1124284714,
0.1428297311,
0.0881293565,
-0.4986716211,
-0.0356715284,
-0.1091016233,
-0.0138736628,
0.0355330706,
0.0123796565,
0.244953528,
-0.0690063536,
-0.0821985006,
0.686950624,
-0.0896802396,
-0.0840898454,
0.1354921311,
0.1639263779,
0.1592285186,
0.1106757,
0.0192875005,
0.2401156723,
-0.3238706291,
0.1686413735,
0.3113876879,
0.1183894724,
0.5803939104,
0.4042428732,
0.0576299131,
0.2036657482,
-0.0349059291,
0.0348416977,
0.0741833076,
-0.3247688413,
0.3195769787,
0.3149088025,
0.10074348,
0.1979737431,
0.1184076145,
-0.0335708149,
-0.4267123342,
-0.0833030865,
0.1328280568,
-0.0805061534,
-0.2566769123,
-0.0388739407,
0.0223952718,
0.0061740247,
-0.1746213883,
-0.0213341508,
-0.0692472234,
-0.0398702957,
0.0858879685,
0.1742095649,
-0.4083405733,
0.0198865719,
0.1184697002,
0.4771023691,
0.0042301132,
-0.2046847343,
0.1234880835,
0.0541070923,
0.269230932,
0.1037663594,
0.046544265,
0.4305724502,
0.2879207134,
-0.5157394409,
0.3383883834,
0.1480319351,
0.0708647296,
0.1262989044,
0.1177180335,
-0.2951897681,
0.2930136025,
0.2499593347,
-0.0660065487,
0.0114066536,
0.0691899434,
0.2954418957,
0.5416063666,
0.0693320408,
0.3217765987,
-0.0830954164,
-0.1034925878,
0.4112060368,
0.0532353334,
-0.3087320626,
-0.0826195553,
0.4603152573,
-0.1337614655,
0.4010569155,
0.0543255843,
-0.022659773,
-0.0943126082,
0.2808870077,
0.2044992745,
-0.0058555417,
-0.2046144307,
0.1194214523,
-0.452462405,
0.2533147931,
-0.0256187953,
-0.1043338105,
0.2665589452,
-0.479054749,
-0.0075266482,
0.2800281942,
0.2832074463,
-0.3265571296,
-0.1897300184,
0.4312444031,
-0.3023914695,
-0.4885341525,
-0.2659198046,
-0.1079019308,
0.1922406405,
-0.4020412266,
0.1028378233,
-0.3092484176,
-0.0865707695,
-0.1092373207,
-0.4814180434,
0.1412682682,
0.0339179449,
0.1487731934,
0.3193033934,
0.2610315084,
-0.0968658254,
-0.1705332249,
-0.0931926146,
-0.0187913068,
-0.0070103393,
0.3835403621,
-0.0335635021,
0.5110216737,
-0.154703483,
-0.1943015903,
-0.3124758899,
-0.3725011051,
-0.2141076475,
0.0881566852,
-0.2451634854,
0.2228191644,
-0.2427801937,
0.2626276314,
-0.2554142773,
0.1942519397,
0.1928977221,
0.2545521259,
-0.13316603,
-0.1336843073,
0.5435534716,
0.1985754669,
-0.2246309221,
-0.0918726176,
0.22640495,
-0.7421174049,
-0.0918049067,
-0.6218990684,
-0.1301677823,
0.2264228761,
0.048894193,
-0.6048377156,
-0.1109023765,
0.0048906249,
-0.0846340954,
-0.0709502771,
0.5546088815,
-0.256450206,
0.1584331393,
0.3368352056,
-0.0841836929
] |
https://github.com/huggingface/datasets/issues/3172 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1` | Hi,
It's not easy to debug the problem without the script. I may be wrong since I'm not very familiar with PyTorch Lightning, but shouldn't you preprocess the data in the `prepare_data` function of `LightningDataModule` and not in the `setup` function.
As you can't modify the module state in `prepare_data` (according to the docs), use the `cache_file_name` argument in `Dataset.map` there, and reload the processed data in `setup` with `Dataset.from_file(cache_file_name)`. If `num_proc>1`, check the docs on the `suffix_template` argument of `Dataset.map` to get an idea what the final `cache_file_names` are going to be.
Let me know if this helps. | ## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 99 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
Hi,
It's not easy to debug the problem without the script. I may be wrong since I'm not very familiar with PyTorch Lightning, but shouldn't you preprocess the data in the `prepare_data` function of `LightningDataModule` and not in the `setup` function.
As you can't modify the module state in `prepare_data` (according to the docs), use the `cache_file_name` argument in `Dataset.map` there, and reload the processed data in `setup` with `Dataset.from_file(cache_file_name)`. If `num_proc>1`, check the docs on the `suffix_template` argument of `Dataset.map` to get an idea what the final `cache_file_names` are going to be.
Let me know if this helps. | [
-0.4948825538,
0.0149980877,
0.1314036548,
0.2600641847,
0.3205186129,
0.0034364853,
0.4633168578,
0.0224105176,
0.020504212,
0.1974067092,
0.1711901277,
0.5095179677,
-0.2995520234,
-0.264898479,
-0.2079024166,
0.20999071,
0.0466203913,
-0.1581077874,
-0.2430632859,
0.4450131059,
-0.4338950813,
0.1656219661,
-0.2789233029,
0.1814817935,
-0.1627854258,
0.037097007,
-0.0776935667,
0.3484530449,
0.086063616,
-0.4888786376,
0.2598611414,
-0.1325255781,
0.2476995438,
0.5398383737,
-0.0001272483,
0.0460722372,
0.2578923106,
-0.1024022028,
-0.3156310916,
-0.0267750658,
-0.3072264791,
0.1170792803,
0.0201555807,
-0.0358047523,
0.2532773614,
0.1260475665,
-0.0460105874,
-0.3230039179,
0.1596812457,
0.4001817703,
0.0492290296,
0.2706770897,
-0.1699385196,
-0.0399687663,
0.1190547645,
0.2666268945,
-0.0602310933,
0.3845189214,
0.2321909517,
-0.2951949835,
0.1350496411,
-0.0893990919,
-0.1739122272,
-0.0045469617,
0.3510588109,
-0.040984042,
0.0232143812,
-0.4895768762,
-0.1028225273,
0.1353897154,
-0.0613663904,
-0.3817996681,
-0.2259421498,
-0.074259758,
-0.1902290136,
-0.2047741115,
-0.0998716056,
-0.0249887556,
-0.1718675345,
0.2097604126,
0.0638547093,
-0.0485783108,
-0.2467311025,
0.1295648515,
0.0103537468,
0.4980972111,
0.028983606,
0.3650413454,
-0.1222733855,
-0.0264729783,
-0.4142026305,
0.1232841834,
-0.0591074862,
0.0954193994,
-0.0946487486,
-0.0601428933,
0.029420143,
-0.4986715019,
0.3885610998,
-0.3821170032,
0.2268929482,
0.1152440906,
0.4275253117,
0.3449109495,
0.3994285762,
-0.2721118331,
0.2052561045,
0.4494012594,
0.3322502971,
0.1261998415,
0.2210259736,
-0.0018743156,
0.1574819833,
-0.1251470596,
0.2052963227,
0.431799233,
0.241381526,
-0.2272038907,
-0.0174590219,
0.3960925043,
-0.1598087251,
0.0779932067,
0.1089990214,
0.1883090734,
0.4819608033,
-0.0319109149,
0.097362414,
0.0852163509,
-0.3469713032,
0.069705449,
-0.0165418461,
-0.1447065622,
-0.2634493709,
0.1307265162,
0.1109899133,
0.1422279328,
0.0236046854,
0.0288851876,
-0.2137299776,
-0.1220510453,
0.3333073556,
-0.1442388445,
0.042644646,
0.4357181489,
-0.3199975789,
0.2193747163,
0.1305710971,
0.1577418447,
-0.1090303287,
0.4621479809,
-0.0068931812,
-0.4316523969,
-0.1327647418,
0.0437070057,
-0.1331689358,
0.3940793872,
-0.1725142747,
-0.0378822275,
0.5560599566,
-0.2402357757,
0.1401233077,
-0.4384782612,
-0.5609032512,
-0.1854166538,
-0.0538089052,
0.3940499127,
-0.0901180506,
-0.0324345492,
-0.0583023615,
-0.2039723098,
-0.0181757491,
-0.1308778226,
-0.2065330744,
0.2350629568,
-0.2520934939,
0.0857779235,
0.3741843998,
-0.1164215356,
-0.5244369507,
0.2536508441,
-0.4085045755,
-0.1177069843,
-0.4146102071,
0.1758605093,
0.0633688569,
-0.0385135524,
0.1088755876,
0.1612367481,
-0.1654226333,
0.042291306,
-0.2292448729,
-0.0202572122,
-0.0226202644,
0.1228499562,
0.3228341937,
0.0421641506,
0.1730149984,
0.1101935208,
0.2251439542,
-0.0360024199,
0.0431245752,
0.3198364973,
0.2104032189,
-0.1014229283,
-0.0388899557,
-0.5471795797,
-0.090444386,
0.2984938323,
-0.2046452016,
-0.0949443504,
-0.4452670217,
0.0026962766,
0.0058617578,
0.340518415,
-0.0987058952,
-0.3571216166,
-0.0807114094,
0.0995008722,
-0.3186140358,
-0.2070307583,
0.0025406936,
0.2276994735,
-0.1679099649,
0.1404096782,
-0.5382887125,
-0.1865255088,
0.0094540333,
-0.4891037941,
-0.2562517822,
-0.052723676,
-0.0526048169,
-0.0540935434,
-0.2584121525,
0.3309264183,
0.3661315441,
-0.5121657252,
-0.2837772965,
0.0160828736,
0.0031391773,
0.0102091385,
-0.1074363515,
0.1130136624,
0.1510251909,
0.1967197061,
-0.0199705102,
0.2717967331,
-0.3765307665,
0.3035851717,
-0.1066413298,
0.1059917808,
0.0149018308,
0.2249100804,
-0.1494158506,
-0.301830709,
-0.0715532899,
0.2841206789,
-0.0581324287,
0.0478569455,
0.2563275993,
0.0223193429,
0.1165336594,
0.0069209449,
0.1036122441,
0.0942058265,
0.0301587582,
0.1494591832,
0.1820777655,
-0.0936223716,
0.7560115457,
-0.0835572109,
-0.1237431541,
0.1788657606,
-0.0323518328,
0.0961246043,
0.0169203002,
0.3523865044,
0.4663641751,
0.2155162543,
0.2119995803,
0.2142360657,
0.0836378708,
-0.5376945138,
-0.1756772548,
0.2406242192,
-0.4153204262,
0.5134966373,
-0.2037621289,
0.0930119455,
-0.1981105804,
-0.0625841394,
-0.1029865295,
-0.422391206,
-0.2592754364,
0.3001411259,
-0.3008063138,
0.1081114337,
0.0544907227,
-0.159430638,
0.0861884505,
0.1013751701,
0.3512023389,
-0.2590730786,
-0.0052100834,
-0.2097328454,
0.2074592859,
0.0198078211,
0.2121816278,
0.1231953353,
-0.3192383647,
0.0487811491,
-0.33656618,
0.1015573144,
0.1328026801,
0.6923866272,
0.2072793096,
0.0852454603,
-0.1494085938,
0.0258820597,
0.2258658409,
-0.1865837723,
0.0009124022,
0.3407762349,
0.1408566684,
0.045564428,
-0.3188872039,
-0.1834887564,
-0.1682406366,
-0.270342797,
-0.0995852724,
-0.3767811656,
0.1229390427,
0.1574546099,
0.1579884589,
0.2216858715,
-0.0129298586,
0.0073680351,
0.1126240045,
0.3374051154,
-0.0788992345,
-0.2735808492,
-0.1783544719,
-0.0092282603,
-0.0247023515,
-0.1286478639,
0.2723335922,
-0.3488797247,
-0.243644163,
0.0243684314,
0.1317640245,
-0.0563963018,
-0.2671625614,
0.5877299905,
0.0857557952,
0.1951409876,
-0.1148174033,
-0.187913835,
0.1556042582,
-0.294072181,
0.003264142,
0.1971102357,
0.67818892,
0.0620538518,
0.9768183231,
0.3290991485,
-0.1423387676,
0.0260339417,
-0.0972262695,
0.0620756261,
-0.1731203496,
-0.2154791504,
-0.0603203215,
0.1031091958,
-0.1072254479,
0.187648505,
-0.1932964623,
-0.1414006054,
0.0314606093,
-0.2449008822,
-0.0501985289,
-0.382968992,
0.2576635778,
-0.1022965014,
0.2845242918,
0.0066037714,
-0.1052430049,
-0.0394718051,
0.017090885,
-0.2345443964,
0.2913269103,
0.1789411604,
0.0499077104,
0.1823030114,
-0.2426895052,
-0.4169843793,
0.2355182171,
0.1996058077,
0.8556868434,
-0.2914413214,
-0.1626004279,
-0.376548171,
-0.1890307367,
0.3463118076,
-0.3203761876,
0.0756434128,
-0.0535490997,
-0.0761575103,
-0.6055014133,
-0.2138319463,
-0.1817930788,
0.3289915025,
-0.080714941,
0.1809557825,
0.0476160347,
-0.0206205081,
0.3977997899,
0.1083732024,
-0.1189278513,
-0.0844883323,
-0.4585122466,
-0.2879629433,
-0.4599941075,
0.1135036498,
0.1844422817,
-0.1448991001,
0.1122370586,
-0.1597159654,
0.0460236445,
-0.1787990481,
0.0670286566,
0.1180576161,
-0.0973421261,
-0.2216076851,
0.2358569205,
-0.1230114028,
0.0314558782,
0.4571040869,
0.2976825833,
0.0777771473,
-0.3232281208,
0.5040935874,
-0.0095885843,
0.3939349055,
0.274541527,
-0.0331511348,
0.0252192635,
-0.1358571947,
0.1487317085,
-0.2897136509,
0.0074729994,
0.2463853508,
0.0577338785,
-0.0589236319,
-0.0225334391,
0.1207696274,
0.3456435502,
-0.1381041706,
0.2780246437,
-0.2659444213,
-0.2247655541,
0.5866340995,
0.2790298462,
0.7352151871,
-0.0209480189,
0.0485673994,
-0.0783497915,
-0.1783870906,
0.059728086,
0.3720564544,
0.1332145184,
-0.5092824101,
-0.4189901352,
-0.0522722304,
-0.2977716625,
0.1734293401,
-0.004212745,
0.0000237749,
0.2661078274,
-0.3108479679,
0.2485472858,
0.0263080895,
0.0798367932,
0.1531869918,
-0.1122225448,
-0.002374857,
0.0314305313,
-0.0392122865,
-0.2556895018,
-0.2904174924,
0.1522657871,
-0.1863823235,
-0.1586299241,
-0.3658851683,
0.0230388399,
0.0497672297,
0.3503794372,
0.0235393774,
0.2082855701,
-0.0349107087,
0.40045771,
0.0840862319,
0.2828443646,
0.1042817906,
-0.167769894,
-0.0745417699,
0.1363827288,
0.0949862003,
-0.0010769728,
0.2390249074,
0.030185096,
-0.2571736276,
-0.0871277079,
0.019752061,
-0.0939238146,
-0.0276466236,
0.132452473,
0.2831028998,
-0.259221822,
0.1062514335,
-0.2190851569,
-0.2358784527,
-0.0836267099,
-0.0020864478,
0.2793975472,
-0.1376195848,
0.2402713001,
-0.3386164606,
-0.3843049109,
-0.0225932561,
0.3351632059,
-0.1534478664,
0.1905505806,
0.0700164363,
0.1095100269,
-0.1174016148,
-0.0930841565,
0.4142432809,
-0.0750810727,
-0.4553853273,
-0.0493946448,
-0.0441564582,
-0.117678076,
0.0146504147,
-0.0403106399,
-0.1042328924,
-0.1789651215,
-0.1251273453,
-0.5647389293,
-0.5011954308,
0.1040916443,
-0.1844216138,
0.3103720844,
-0.0923370048,
-0.2819031775,
-0.4639461637,
0.0545232445,
-0.1257538795,
-0.1608896703,
0.0592507273,
0.2837460041,
-0.1096071377,
0.1030653268,
-0.2700548172,
-0.2716081738,
-0.0812648311,
0.5102872849,
-0.1264069676,
-0.0312650576,
0.0581251271,
0.2318339646,
-0.0472484604,
-0.1240467504,
-0.0733814538,
0.016511105,
-0.0990744308,
-0.1423505992,
0.5031332374,
0.2737665772,
-0.0621350408,
0.1874612868,
0.3553144336,
0.3284831941,
0.0009875667,
0.4864467978,
-0.0433416106,
0.3586205542,
-0.1149697304,
0.2920767665,
-0.0773061216,
-0.0562083647,
-0.0538049303,
0.1092747077,
0.1868922412,
0.1860325336,
0.3210430741,
-0.2804486156,
0.1834419668,
-0.1124284714,
0.1428297311,
0.0881293565,
-0.4986716211,
-0.0356715284,
-0.1091016233,
-0.0138736628,
0.0355330706,
0.0123796565,
0.244953528,
-0.0690063536,
-0.0821985006,
0.686950624,
-0.0896802396,
-0.0840898454,
0.1354921311,
0.1639263779,
0.1592285186,
0.1106757,
0.0192875005,
0.2401156723,
-0.3238706291,
0.1686413735,
0.3113876879,
0.1183894724,
0.5803939104,
0.4042428732,
0.0576299131,
0.2036657482,
-0.0349059291,
0.0348416977,
0.0741833076,
-0.3247688413,
0.3195769787,
0.3149088025,
0.10074348,
0.1979737431,
0.1184076145,
-0.0335708149,
-0.4267123342,
-0.0833030865,
0.1328280568,
-0.0805061534,
-0.2566769123,
-0.0388739407,
0.0223952718,
0.0061740247,
-0.1746213883,
-0.0213341508,
-0.0692472234,
-0.0398702957,
0.0858879685,
0.1742095649,
-0.4083405733,
0.0198865719,
0.1184697002,
0.4771023691,
0.0042301132,
-0.2046847343,
0.1234880835,
0.0541070923,
0.269230932,
0.1037663594,
0.046544265,
0.4305724502,
0.2879207134,
-0.5157394409,
0.3383883834,
0.1480319351,
0.0708647296,
0.1262989044,
0.1177180335,
-0.2951897681,
0.2930136025,
0.2499593347,
-0.0660065487,
0.0114066536,
0.0691899434,
0.2954418957,
0.5416063666,
0.0693320408,
0.3217765987,
-0.0830954164,
-0.1034925878,
0.4112060368,
0.0532353334,
-0.3087320626,
-0.0826195553,
0.4603152573,
-0.1337614655,
0.4010569155,
0.0543255843,
-0.022659773,
-0.0943126082,
0.2808870077,
0.2044992745,
-0.0058555417,
-0.2046144307,
0.1194214523,
-0.452462405,
0.2533147931,
-0.0256187953,
-0.1043338105,
0.2665589452,
-0.479054749,
-0.0075266482,
0.2800281942,
0.2832074463,
-0.3265571296,
-0.1897300184,
0.4312444031,
-0.3023914695,
-0.4885341525,
-0.2659198046,
-0.1079019308,
0.1922406405,
-0.4020412266,
0.1028378233,
-0.3092484176,
-0.0865707695,
-0.1092373207,
-0.4814180434,
0.1412682682,
0.0339179449,
0.1487731934,
0.3193033934,
0.2610315084,
-0.0968658254,
-0.1705332249,
-0.0931926146,
-0.0187913068,
-0.0070103393,
0.3835403621,
-0.0335635021,
0.5110216737,
-0.154703483,
-0.1943015903,
-0.3124758899,
-0.3725011051,
-0.2141076475,
0.0881566852,
-0.2451634854,
0.2228191644,
-0.2427801937,
0.2626276314,
-0.2554142773,
0.1942519397,
0.1928977221,
0.2545521259,
-0.13316603,
-0.1336843073,
0.5435534716,
0.1985754669,
-0.2246309221,
-0.0918726176,
0.22640495,
-0.7421174049,
-0.0918049067,
-0.6218990684,
-0.1301677823,
0.2264228761,
0.048894193,
-0.6048377156,
-0.1109023765,
0.0048906249,
-0.0846340954,
-0.0709502771,
0.5546088815,
-0.256450206,
0.1584331393,
0.3368352056,
-0.0841836929
] |
https://github.com/huggingface/datasets/issues/3172 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1` | Hi @mariosasko, thank you for the hint, that helped me to move forward with that issue.
I did a major refactoring of my project to disentangle my `LightningDataModule` and `Dataset`. Just FYI, it looks like:
```python
class Builder():
def __call__() -> DatasetDict:
# load and preprocess the data
return dataset
class DataModule(LightningDataModule):
def prepare_data():
self.builder()
def setup():
self.dataset = self.builder()
```
Unfortunately, the entanglement between `LightningDataModule` and `Dataset` was not the issue.
The culprit was `hydra` and a slight adjustment of the structure of my project solved this issue. The problematic project structure was:
```
src/
| - cli.py
| - training/
| -experiment.py
# code in experiment.py
def run_experiment(config):
# preprocess data and run
# code in cli.py
@hydra.main(...)
def run(config):
return run_experiment(config)
```
Moving `run()` from `clip.py` to `training.experiment.py` solved the issue with `SystemError 15`. No idea why.
Even if the traceback was referring to `Dataset.__del__`, the problem does not seem to be primarily related to `datasets`, so I will close this issue. Thank you for your help! | ## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 170 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
Hi @mariosasko, thank you for the hint, that helped me to move forward with that issue.
I did a major refactoring of my project to disentangle my `LightningDataModule` and `Dataset`. Just FYI, it looks like:
```python
class Builder():
def __call__() -> DatasetDict:
# load and preprocess the data
return dataset
class DataModule(LightningDataModule):
def prepare_data():
self.builder()
def setup():
self.dataset = self.builder()
```
Unfortunately, the entanglement between `LightningDataModule` and `Dataset` was not the issue.
The culprit was `hydra` and a slight adjustment of the structure of my project solved this issue. The problematic project structure was:
```
src/
| - cli.py
| - training/
| -experiment.py
# code in experiment.py
def run_experiment(config):
# preprocess data and run
# code in cli.py
@hydra.main(...)
def run(config):
return run_experiment(config)
```
Moving `run()` from `clip.py` to `training.experiment.py` solved the issue with `SystemError 15`. No idea why.
Even if the traceback was referring to `Dataset.__del__`, the problem does not seem to be primarily related to `datasets`, so I will close this issue. Thank you for your help! | [
-0.4948825538,
0.0149980877,
0.1314036548,
0.2600641847,
0.3205186129,
0.0034364853,
0.4633168578,
0.0224105176,
0.020504212,
0.1974067092,
0.1711901277,
0.5095179677,
-0.2995520234,
-0.264898479,
-0.2079024166,
0.20999071,
0.0466203913,
-0.1581077874,
-0.2430632859,
0.4450131059,
-0.4338950813,
0.1656219661,
-0.2789233029,
0.1814817935,
-0.1627854258,
0.037097007,
-0.0776935667,
0.3484530449,
0.086063616,
-0.4888786376,
0.2598611414,
-0.1325255781,
0.2476995438,
0.5398383737,
-0.0001272483,
0.0460722372,
0.2578923106,
-0.1024022028,
-0.3156310916,
-0.0267750658,
-0.3072264791,
0.1170792803,
0.0201555807,
-0.0358047523,
0.2532773614,
0.1260475665,
-0.0460105874,
-0.3230039179,
0.1596812457,
0.4001817703,
0.0492290296,
0.2706770897,
-0.1699385196,
-0.0399687663,
0.1190547645,
0.2666268945,
-0.0602310933,
0.3845189214,
0.2321909517,
-0.2951949835,
0.1350496411,
-0.0893990919,
-0.1739122272,
-0.0045469617,
0.3510588109,
-0.040984042,
0.0232143812,
-0.4895768762,
-0.1028225273,
0.1353897154,
-0.0613663904,
-0.3817996681,
-0.2259421498,
-0.074259758,
-0.1902290136,
-0.2047741115,
-0.0998716056,
-0.0249887556,
-0.1718675345,
0.2097604126,
0.0638547093,
-0.0485783108,
-0.2467311025,
0.1295648515,
0.0103537468,
0.4980972111,
0.028983606,
0.3650413454,
-0.1222733855,
-0.0264729783,
-0.4142026305,
0.1232841834,
-0.0591074862,
0.0954193994,
-0.0946487486,
-0.0601428933,
0.029420143,
-0.4986715019,
0.3885610998,
-0.3821170032,
0.2268929482,
0.1152440906,
0.4275253117,
0.3449109495,
0.3994285762,
-0.2721118331,
0.2052561045,
0.4494012594,
0.3322502971,
0.1261998415,
0.2210259736,
-0.0018743156,
0.1574819833,
-0.1251470596,
0.2052963227,
0.431799233,
0.241381526,
-0.2272038907,
-0.0174590219,
0.3960925043,
-0.1598087251,
0.0779932067,
0.1089990214,
0.1883090734,
0.4819608033,
-0.0319109149,
0.097362414,
0.0852163509,
-0.3469713032,
0.069705449,
-0.0165418461,
-0.1447065622,
-0.2634493709,
0.1307265162,
0.1109899133,
0.1422279328,
0.0236046854,
0.0288851876,
-0.2137299776,
-0.1220510453,
0.3333073556,
-0.1442388445,
0.042644646,
0.4357181489,
-0.3199975789,
0.2193747163,
0.1305710971,
0.1577418447,
-0.1090303287,
0.4621479809,
-0.0068931812,
-0.4316523969,
-0.1327647418,
0.0437070057,
-0.1331689358,
0.3940793872,
-0.1725142747,
-0.0378822275,
0.5560599566,
-0.2402357757,
0.1401233077,
-0.4384782612,
-0.5609032512,
-0.1854166538,
-0.0538089052,
0.3940499127,
-0.0901180506,
-0.0324345492,
-0.0583023615,
-0.2039723098,
-0.0181757491,
-0.1308778226,
-0.2065330744,
0.2350629568,
-0.2520934939,
0.0857779235,
0.3741843998,
-0.1164215356,
-0.5244369507,
0.2536508441,
-0.4085045755,
-0.1177069843,
-0.4146102071,
0.1758605093,
0.0633688569,
-0.0385135524,
0.1088755876,
0.1612367481,
-0.1654226333,
0.042291306,
-0.2292448729,
-0.0202572122,
-0.0226202644,
0.1228499562,
0.3228341937,
0.0421641506,
0.1730149984,
0.1101935208,
0.2251439542,
-0.0360024199,
0.0431245752,
0.3198364973,
0.2104032189,
-0.1014229283,
-0.0388899557,
-0.5471795797,
-0.090444386,
0.2984938323,
-0.2046452016,
-0.0949443504,
-0.4452670217,
0.0026962766,
0.0058617578,
0.340518415,
-0.0987058952,
-0.3571216166,
-0.0807114094,
0.0995008722,
-0.3186140358,
-0.2070307583,
0.0025406936,
0.2276994735,
-0.1679099649,
0.1404096782,
-0.5382887125,
-0.1865255088,
0.0094540333,
-0.4891037941,
-0.2562517822,
-0.052723676,
-0.0526048169,
-0.0540935434,
-0.2584121525,
0.3309264183,
0.3661315441,
-0.5121657252,
-0.2837772965,
0.0160828736,
0.0031391773,
0.0102091385,
-0.1074363515,
0.1130136624,
0.1510251909,
0.1967197061,
-0.0199705102,
0.2717967331,
-0.3765307665,
0.3035851717,
-0.1066413298,
0.1059917808,
0.0149018308,
0.2249100804,
-0.1494158506,
-0.301830709,
-0.0715532899,
0.2841206789,
-0.0581324287,
0.0478569455,
0.2563275993,
0.0223193429,
0.1165336594,
0.0069209449,
0.1036122441,
0.0942058265,
0.0301587582,
0.1494591832,
0.1820777655,
-0.0936223716,
0.7560115457,
-0.0835572109,
-0.1237431541,
0.1788657606,
-0.0323518328,
0.0961246043,
0.0169203002,
0.3523865044,
0.4663641751,
0.2155162543,
0.2119995803,
0.2142360657,
0.0836378708,
-0.5376945138,
-0.1756772548,
0.2406242192,
-0.4153204262,
0.5134966373,
-0.2037621289,
0.0930119455,
-0.1981105804,
-0.0625841394,
-0.1029865295,
-0.422391206,
-0.2592754364,
0.3001411259,
-0.3008063138,
0.1081114337,
0.0544907227,
-0.159430638,
0.0861884505,
0.1013751701,
0.3512023389,
-0.2590730786,
-0.0052100834,
-0.2097328454,
0.2074592859,
0.0198078211,
0.2121816278,
0.1231953353,
-0.3192383647,
0.0487811491,
-0.33656618,
0.1015573144,
0.1328026801,
0.6923866272,
0.2072793096,
0.0852454603,
-0.1494085938,
0.0258820597,
0.2258658409,
-0.1865837723,
0.0009124022,
0.3407762349,
0.1408566684,
0.045564428,
-0.3188872039,
-0.1834887564,
-0.1682406366,
-0.270342797,
-0.0995852724,
-0.3767811656,
0.1229390427,
0.1574546099,
0.1579884589,
0.2216858715,
-0.0129298586,
0.0073680351,
0.1126240045,
0.3374051154,
-0.0788992345,
-0.2735808492,
-0.1783544719,
-0.0092282603,
-0.0247023515,
-0.1286478639,
0.2723335922,
-0.3488797247,
-0.243644163,
0.0243684314,
0.1317640245,
-0.0563963018,
-0.2671625614,
0.5877299905,
0.0857557952,
0.1951409876,
-0.1148174033,
-0.187913835,
0.1556042582,
-0.294072181,
0.003264142,
0.1971102357,
0.67818892,
0.0620538518,
0.9768183231,
0.3290991485,
-0.1423387676,
0.0260339417,
-0.0972262695,
0.0620756261,
-0.1731203496,
-0.2154791504,
-0.0603203215,
0.1031091958,
-0.1072254479,
0.187648505,
-0.1932964623,
-0.1414006054,
0.0314606093,
-0.2449008822,
-0.0501985289,
-0.382968992,
0.2576635778,
-0.1022965014,
0.2845242918,
0.0066037714,
-0.1052430049,
-0.0394718051,
0.017090885,
-0.2345443964,
0.2913269103,
0.1789411604,
0.0499077104,
0.1823030114,
-0.2426895052,
-0.4169843793,
0.2355182171,
0.1996058077,
0.8556868434,
-0.2914413214,
-0.1626004279,
-0.376548171,
-0.1890307367,
0.3463118076,
-0.3203761876,
0.0756434128,
-0.0535490997,
-0.0761575103,
-0.6055014133,
-0.2138319463,
-0.1817930788,
0.3289915025,
-0.080714941,
0.1809557825,
0.0476160347,
-0.0206205081,
0.3977997899,
0.1083732024,
-0.1189278513,
-0.0844883323,
-0.4585122466,
-0.2879629433,
-0.4599941075,
0.1135036498,
0.1844422817,
-0.1448991001,
0.1122370586,
-0.1597159654,
0.0460236445,
-0.1787990481,
0.0670286566,
0.1180576161,
-0.0973421261,
-0.2216076851,
0.2358569205,
-0.1230114028,
0.0314558782,
0.4571040869,
0.2976825833,
0.0777771473,
-0.3232281208,
0.5040935874,
-0.0095885843,
0.3939349055,
0.274541527,
-0.0331511348,
0.0252192635,
-0.1358571947,
0.1487317085,
-0.2897136509,
0.0074729994,
0.2463853508,
0.0577338785,
-0.0589236319,
-0.0225334391,
0.1207696274,
0.3456435502,
-0.1381041706,
0.2780246437,
-0.2659444213,
-0.2247655541,
0.5866340995,
0.2790298462,
0.7352151871,
-0.0209480189,
0.0485673994,
-0.0783497915,
-0.1783870906,
0.059728086,
0.3720564544,
0.1332145184,
-0.5092824101,
-0.4189901352,
-0.0522722304,
-0.2977716625,
0.1734293401,
-0.004212745,
0.0000237749,
0.2661078274,
-0.3108479679,
0.2485472858,
0.0263080895,
0.0798367932,
0.1531869918,
-0.1122225448,
-0.002374857,
0.0314305313,
-0.0392122865,
-0.2556895018,
-0.2904174924,
0.1522657871,
-0.1863823235,
-0.1586299241,
-0.3658851683,
0.0230388399,
0.0497672297,
0.3503794372,
0.0235393774,
0.2082855701,
-0.0349107087,
0.40045771,
0.0840862319,
0.2828443646,
0.1042817906,
-0.167769894,
-0.0745417699,
0.1363827288,
0.0949862003,
-0.0010769728,
0.2390249074,
0.030185096,
-0.2571736276,
-0.0871277079,
0.019752061,
-0.0939238146,
-0.0276466236,
0.132452473,
0.2831028998,
-0.259221822,
0.1062514335,
-0.2190851569,
-0.2358784527,
-0.0836267099,
-0.0020864478,
0.2793975472,
-0.1376195848,
0.2402713001,
-0.3386164606,
-0.3843049109,
-0.0225932561,
0.3351632059,
-0.1534478664,
0.1905505806,
0.0700164363,
0.1095100269,
-0.1174016148,
-0.0930841565,
0.4142432809,
-0.0750810727,
-0.4553853273,
-0.0493946448,
-0.0441564582,
-0.117678076,
0.0146504147,
-0.0403106399,
-0.1042328924,
-0.1789651215,
-0.1251273453,
-0.5647389293,
-0.5011954308,
0.1040916443,
-0.1844216138,
0.3103720844,
-0.0923370048,
-0.2819031775,
-0.4639461637,
0.0545232445,
-0.1257538795,
-0.1608896703,
0.0592507273,
0.2837460041,
-0.1096071377,
0.1030653268,
-0.2700548172,
-0.2716081738,
-0.0812648311,
0.5102872849,
-0.1264069676,
-0.0312650576,
0.0581251271,
0.2318339646,
-0.0472484604,
-0.1240467504,
-0.0733814538,
0.016511105,
-0.0990744308,
-0.1423505992,
0.5031332374,
0.2737665772,
-0.0621350408,
0.1874612868,
0.3553144336,
0.3284831941,
0.0009875667,
0.4864467978,
-0.0433416106,
0.3586205542,
-0.1149697304,
0.2920767665,
-0.0773061216,
-0.0562083647,
-0.0538049303,
0.1092747077,
0.1868922412,
0.1860325336,
0.3210430741,
-0.2804486156,
0.1834419668,
-0.1124284714,
0.1428297311,
0.0881293565,
-0.4986716211,
-0.0356715284,
-0.1091016233,
-0.0138736628,
0.0355330706,
0.0123796565,
0.244953528,
-0.0690063536,
-0.0821985006,
0.686950624,
-0.0896802396,
-0.0840898454,
0.1354921311,
0.1639263779,
0.1592285186,
0.1106757,
0.0192875005,
0.2401156723,
-0.3238706291,
0.1686413735,
0.3113876879,
0.1183894724,
0.5803939104,
0.4042428732,
0.0576299131,
0.2036657482,
-0.0349059291,
0.0348416977,
0.0741833076,
-0.3247688413,
0.3195769787,
0.3149088025,
0.10074348,
0.1979737431,
0.1184076145,
-0.0335708149,
-0.4267123342,
-0.0833030865,
0.1328280568,
-0.0805061534,
-0.2566769123,
-0.0388739407,
0.0223952718,
0.0061740247,
-0.1746213883,
-0.0213341508,
-0.0692472234,
-0.0398702957,
0.0858879685,
0.1742095649,
-0.4083405733,
0.0198865719,
0.1184697002,
0.4771023691,
0.0042301132,
-0.2046847343,
0.1234880835,
0.0541070923,
0.269230932,
0.1037663594,
0.046544265,
0.4305724502,
0.2879207134,
-0.5157394409,
0.3383883834,
0.1480319351,
0.0708647296,
0.1262989044,
0.1177180335,
-0.2951897681,
0.2930136025,
0.2499593347,
-0.0660065487,
0.0114066536,
0.0691899434,
0.2954418957,
0.5416063666,
0.0693320408,
0.3217765987,
-0.0830954164,
-0.1034925878,
0.4112060368,
0.0532353334,
-0.3087320626,
-0.0826195553,
0.4603152573,
-0.1337614655,
0.4010569155,
0.0543255843,
-0.022659773,
-0.0943126082,
0.2808870077,
0.2044992745,
-0.0058555417,
-0.2046144307,
0.1194214523,
-0.452462405,
0.2533147931,
-0.0256187953,
-0.1043338105,
0.2665589452,
-0.479054749,
-0.0075266482,
0.2800281942,
0.2832074463,
-0.3265571296,
-0.1897300184,
0.4312444031,
-0.3023914695,
-0.4885341525,
-0.2659198046,
-0.1079019308,
0.1922406405,
-0.4020412266,
0.1028378233,
-0.3092484176,
-0.0865707695,
-0.1092373207,
-0.4814180434,
0.1412682682,
0.0339179449,
0.1487731934,
0.3193033934,
0.2610315084,
-0.0968658254,
-0.1705332249,
-0.0931926146,
-0.0187913068,
-0.0070103393,
0.3835403621,
-0.0335635021,
0.5110216737,
-0.154703483,
-0.1943015903,
-0.3124758899,
-0.3725011051,
-0.2141076475,
0.0881566852,
-0.2451634854,
0.2228191644,
-0.2427801937,
0.2626276314,
-0.2554142773,
0.1942519397,
0.1928977221,
0.2545521259,
-0.13316603,
-0.1336843073,
0.5435534716,
0.1985754669,
-0.2246309221,
-0.0918726176,
0.22640495,
-0.7421174049,
-0.0918049067,
-0.6218990684,
-0.1301677823,
0.2264228761,
0.048894193,
-0.6048377156,
-0.1109023765,
0.0048906249,
-0.0846340954,
-0.0709502771,
0.5546088815,
-0.256450206,
0.1584331393,
0.3368352056,
-0.0841836929
] |
https://github.com/huggingface/datasets/issues/3172 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1` | Please allow me to revive this discussion, as I have an extremely similar issue. Instead of an error, my datasets functions simply aren't caching properly. My setup is almost the same as yours, with hydra to configure my experiment parameters.
@vlievin Could you confirm if your code correctly loads the cache? If so, do you have any public code that I can reference for comparison?
I will post a full example with hydra that illustrates this problem in a little bit, probably on another thread. | ## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 85 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
Please allow me to revive this discussion, as I have an extremely similar issue. Instead of an error, my datasets functions simply aren't caching properly. My setup is almost the same as yours, with hydra to configure my experiment parameters.
@vlievin Could you confirm if your code correctly loads the cache? If so, do you have any public code that I can reference for comparison?
I will post a full example with hydra that illustrates this problem in a little bit, probably on another thread. | [
-0.4948825538,
0.0149980877,
0.1314036548,
0.2600641847,
0.3205186129,
0.0034364853,
0.4633168578,
0.0224105176,
0.020504212,
0.1974067092,
0.1711901277,
0.5095179677,
-0.2995520234,
-0.264898479,
-0.2079024166,
0.20999071,
0.0466203913,
-0.1581077874,
-0.2430632859,
0.4450131059,
-0.4338950813,
0.1656219661,
-0.2789233029,
0.1814817935,
-0.1627854258,
0.037097007,
-0.0776935667,
0.3484530449,
0.086063616,
-0.4888786376,
0.2598611414,
-0.1325255781,
0.2476995438,
0.5398383737,
-0.0001272483,
0.0460722372,
0.2578923106,
-0.1024022028,
-0.3156310916,
-0.0267750658,
-0.3072264791,
0.1170792803,
0.0201555807,
-0.0358047523,
0.2532773614,
0.1260475665,
-0.0460105874,
-0.3230039179,
0.1596812457,
0.4001817703,
0.0492290296,
0.2706770897,
-0.1699385196,
-0.0399687663,
0.1190547645,
0.2666268945,
-0.0602310933,
0.3845189214,
0.2321909517,
-0.2951949835,
0.1350496411,
-0.0893990919,
-0.1739122272,
-0.0045469617,
0.3510588109,
-0.040984042,
0.0232143812,
-0.4895768762,
-0.1028225273,
0.1353897154,
-0.0613663904,
-0.3817996681,
-0.2259421498,
-0.074259758,
-0.1902290136,
-0.2047741115,
-0.0998716056,
-0.0249887556,
-0.1718675345,
0.2097604126,
0.0638547093,
-0.0485783108,
-0.2467311025,
0.1295648515,
0.0103537468,
0.4980972111,
0.028983606,
0.3650413454,
-0.1222733855,
-0.0264729783,
-0.4142026305,
0.1232841834,
-0.0591074862,
0.0954193994,
-0.0946487486,
-0.0601428933,
0.029420143,
-0.4986715019,
0.3885610998,
-0.3821170032,
0.2268929482,
0.1152440906,
0.4275253117,
0.3449109495,
0.3994285762,
-0.2721118331,
0.2052561045,
0.4494012594,
0.3322502971,
0.1261998415,
0.2210259736,
-0.0018743156,
0.1574819833,
-0.1251470596,
0.2052963227,
0.431799233,
0.241381526,
-0.2272038907,
-0.0174590219,
0.3960925043,
-0.1598087251,
0.0779932067,
0.1089990214,
0.1883090734,
0.4819608033,
-0.0319109149,
0.097362414,
0.0852163509,
-0.3469713032,
0.069705449,
-0.0165418461,
-0.1447065622,
-0.2634493709,
0.1307265162,
0.1109899133,
0.1422279328,
0.0236046854,
0.0288851876,
-0.2137299776,
-0.1220510453,
0.3333073556,
-0.1442388445,
0.042644646,
0.4357181489,
-0.3199975789,
0.2193747163,
0.1305710971,
0.1577418447,
-0.1090303287,
0.4621479809,
-0.0068931812,
-0.4316523969,
-0.1327647418,
0.0437070057,
-0.1331689358,
0.3940793872,
-0.1725142747,
-0.0378822275,
0.5560599566,
-0.2402357757,
0.1401233077,
-0.4384782612,
-0.5609032512,
-0.1854166538,
-0.0538089052,
0.3940499127,
-0.0901180506,
-0.0324345492,
-0.0583023615,
-0.2039723098,
-0.0181757491,
-0.1308778226,
-0.2065330744,
0.2350629568,
-0.2520934939,
0.0857779235,
0.3741843998,
-0.1164215356,
-0.5244369507,
0.2536508441,
-0.4085045755,
-0.1177069843,
-0.4146102071,
0.1758605093,
0.0633688569,
-0.0385135524,
0.1088755876,
0.1612367481,
-0.1654226333,
0.042291306,
-0.2292448729,
-0.0202572122,
-0.0226202644,
0.1228499562,
0.3228341937,
0.0421641506,
0.1730149984,
0.1101935208,
0.2251439542,
-0.0360024199,
0.0431245752,
0.3198364973,
0.2104032189,
-0.1014229283,
-0.0388899557,
-0.5471795797,
-0.090444386,
0.2984938323,
-0.2046452016,
-0.0949443504,
-0.4452670217,
0.0026962766,
0.0058617578,
0.340518415,
-0.0987058952,
-0.3571216166,
-0.0807114094,
0.0995008722,
-0.3186140358,
-0.2070307583,
0.0025406936,
0.2276994735,
-0.1679099649,
0.1404096782,
-0.5382887125,
-0.1865255088,
0.0094540333,
-0.4891037941,
-0.2562517822,
-0.052723676,
-0.0526048169,
-0.0540935434,
-0.2584121525,
0.3309264183,
0.3661315441,
-0.5121657252,
-0.2837772965,
0.0160828736,
0.0031391773,
0.0102091385,
-0.1074363515,
0.1130136624,
0.1510251909,
0.1967197061,
-0.0199705102,
0.2717967331,
-0.3765307665,
0.3035851717,
-0.1066413298,
0.1059917808,
0.0149018308,
0.2249100804,
-0.1494158506,
-0.301830709,
-0.0715532899,
0.2841206789,
-0.0581324287,
0.0478569455,
0.2563275993,
0.0223193429,
0.1165336594,
0.0069209449,
0.1036122441,
0.0942058265,
0.0301587582,
0.1494591832,
0.1820777655,
-0.0936223716,
0.7560115457,
-0.0835572109,
-0.1237431541,
0.1788657606,
-0.0323518328,
0.0961246043,
0.0169203002,
0.3523865044,
0.4663641751,
0.2155162543,
0.2119995803,
0.2142360657,
0.0836378708,
-0.5376945138,
-0.1756772548,
0.2406242192,
-0.4153204262,
0.5134966373,
-0.2037621289,
0.0930119455,
-0.1981105804,
-0.0625841394,
-0.1029865295,
-0.422391206,
-0.2592754364,
0.3001411259,
-0.3008063138,
0.1081114337,
0.0544907227,
-0.159430638,
0.0861884505,
0.1013751701,
0.3512023389,
-0.2590730786,
-0.0052100834,
-0.2097328454,
0.2074592859,
0.0198078211,
0.2121816278,
0.1231953353,
-0.3192383647,
0.0487811491,
-0.33656618,
0.1015573144,
0.1328026801,
0.6923866272,
0.2072793096,
0.0852454603,
-0.1494085938,
0.0258820597,
0.2258658409,
-0.1865837723,
0.0009124022,
0.3407762349,
0.1408566684,
0.045564428,
-0.3188872039,
-0.1834887564,
-0.1682406366,
-0.270342797,
-0.0995852724,
-0.3767811656,
0.1229390427,
0.1574546099,
0.1579884589,
0.2216858715,
-0.0129298586,
0.0073680351,
0.1126240045,
0.3374051154,
-0.0788992345,
-0.2735808492,
-0.1783544719,
-0.0092282603,
-0.0247023515,
-0.1286478639,
0.2723335922,
-0.3488797247,
-0.243644163,
0.0243684314,
0.1317640245,
-0.0563963018,
-0.2671625614,
0.5877299905,
0.0857557952,
0.1951409876,
-0.1148174033,
-0.187913835,
0.1556042582,
-0.294072181,
0.003264142,
0.1971102357,
0.67818892,
0.0620538518,
0.9768183231,
0.3290991485,
-0.1423387676,
0.0260339417,
-0.0972262695,
0.0620756261,
-0.1731203496,
-0.2154791504,
-0.0603203215,
0.1031091958,
-0.1072254479,
0.187648505,
-0.1932964623,
-0.1414006054,
0.0314606093,
-0.2449008822,
-0.0501985289,
-0.382968992,
0.2576635778,
-0.1022965014,
0.2845242918,
0.0066037714,
-0.1052430049,
-0.0394718051,
0.017090885,
-0.2345443964,
0.2913269103,
0.1789411604,
0.0499077104,
0.1823030114,
-0.2426895052,
-0.4169843793,
0.2355182171,
0.1996058077,
0.8556868434,
-0.2914413214,
-0.1626004279,
-0.376548171,
-0.1890307367,
0.3463118076,
-0.3203761876,
0.0756434128,
-0.0535490997,
-0.0761575103,
-0.6055014133,
-0.2138319463,
-0.1817930788,
0.3289915025,
-0.080714941,
0.1809557825,
0.0476160347,
-0.0206205081,
0.3977997899,
0.1083732024,
-0.1189278513,
-0.0844883323,
-0.4585122466,
-0.2879629433,
-0.4599941075,
0.1135036498,
0.1844422817,
-0.1448991001,
0.1122370586,
-0.1597159654,
0.0460236445,
-0.1787990481,
0.0670286566,
0.1180576161,
-0.0973421261,
-0.2216076851,
0.2358569205,
-0.1230114028,
0.0314558782,
0.4571040869,
0.2976825833,
0.0777771473,
-0.3232281208,
0.5040935874,
-0.0095885843,
0.3939349055,
0.274541527,
-0.0331511348,
0.0252192635,
-0.1358571947,
0.1487317085,
-0.2897136509,
0.0074729994,
0.2463853508,
0.0577338785,
-0.0589236319,
-0.0225334391,
0.1207696274,
0.3456435502,
-0.1381041706,
0.2780246437,
-0.2659444213,
-0.2247655541,
0.5866340995,
0.2790298462,
0.7352151871,
-0.0209480189,
0.0485673994,
-0.0783497915,
-0.1783870906,
0.059728086,
0.3720564544,
0.1332145184,
-0.5092824101,
-0.4189901352,
-0.0522722304,
-0.2977716625,
0.1734293401,
-0.004212745,
0.0000237749,
0.2661078274,
-0.3108479679,
0.2485472858,
0.0263080895,
0.0798367932,
0.1531869918,
-0.1122225448,
-0.002374857,
0.0314305313,
-0.0392122865,
-0.2556895018,
-0.2904174924,
0.1522657871,
-0.1863823235,
-0.1586299241,
-0.3658851683,
0.0230388399,
0.0497672297,
0.3503794372,
0.0235393774,
0.2082855701,
-0.0349107087,
0.40045771,
0.0840862319,
0.2828443646,
0.1042817906,
-0.167769894,
-0.0745417699,
0.1363827288,
0.0949862003,
-0.0010769728,
0.2390249074,
0.030185096,
-0.2571736276,
-0.0871277079,
0.019752061,
-0.0939238146,
-0.0276466236,
0.132452473,
0.2831028998,
-0.259221822,
0.1062514335,
-0.2190851569,
-0.2358784527,
-0.0836267099,
-0.0020864478,
0.2793975472,
-0.1376195848,
0.2402713001,
-0.3386164606,
-0.3843049109,
-0.0225932561,
0.3351632059,
-0.1534478664,
0.1905505806,
0.0700164363,
0.1095100269,
-0.1174016148,
-0.0930841565,
0.4142432809,
-0.0750810727,
-0.4553853273,
-0.0493946448,
-0.0441564582,
-0.117678076,
0.0146504147,
-0.0403106399,
-0.1042328924,
-0.1789651215,
-0.1251273453,
-0.5647389293,
-0.5011954308,
0.1040916443,
-0.1844216138,
0.3103720844,
-0.0923370048,
-0.2819031775,
-0.4639461637,
0.0545232445,
-0.1257538795,
-0.1608896703,
0.0592507273,
0.2837460041,
-0.1096071377,
0.1030653268,
-0.2700548172,
-0.2716081738,
-0.0812648311,
0.5102872849,
-0.1264069676,
-0.0312650576,
0.0581251271,
0.2318339646,
-0.0472484604,
-0.1240467504,
-0.0733814538,
0.016511105,
-0.0990744308,
-0.1423505992,
0.5031332374,
0.2737665772,
-0.0621350408,
0.1874612868,
0.3553144336,
0.3284831941,
0.0009875667,
0.4864467978,
-0.0433416106,
0.3586205542,
-0.1149697304,
0.2920767665,
-0.0773061216,
-0.0562083647,
-0.0538049303,
0.1092747077,
0.1868922412,
0.1860325336,
0.3210430741,
-0.2804486156,
0.1834419668,
-0.1124284714,
0.1428297311,
0.0881293565,
-0.4986716211,
-0.0356715284,
-0.1091016233,
-0.0138736628,
0.0355330706,
0.0123796565,
0.244953528,
-0.0690063536,
-0.0821985006,
0.686950624,
-0.0896802396,
-0.0840898454,
0.1354921311,
0.1639263779,
0.1592285186,
0.1106757,
0.0192875005,
0.2401156723,
-0.3238706291,
0.1686413735,
0.3113876879,
0.1183894724,
0.5803939104,
0.4042428732,
0.0576299131,
0.2036657482,
-0.0349059291,
0.0348416977,
0.0741833076,
-0.3247688413,
0.3195769787,
0.3149088025,
0.10074348,
0.1979737431,
0.1184076145,
-0.0335708149,
-0.4267123342,
-0.0833030865,
0.1328280568,
-0.0805061534,
-0.2566769123,
-0.0388739407,
0.0223952718,
0.0061740247,
-0.1746213883,
-0.0213341508,
-0.0692472234,
-0.0398702957,
0.0858879685,
0.1742095649,
-0.4083405733,
0.0198865719,
0.1184697002,
0.4771023691,
0.0042301132,
-0.2046847343,
0.1234880835,
0.0541070923,
0.269230932,
0.1037663594,
0.046544265,
0.4305724502,
0.2879207134,
-0.5157394409,
0.3383883834,
0.1480319351,
0.0708647296,
0.1262989044,
0.1177180335,
-0.2951897681,
0.2930136025,
0.2499593347,
-0.0660065487,
0.0114066536,
0.0691899434,
0.2954418957,
0.5416063666,
0.0693320408,
0.3217765987,
-0.0830954164,
-0.1034925878,
0.4112060368,
0.0532353334,
-0.3087320626,
-0.0826195553,
0.4603152573,
-0.1337614655,
0.4010569155,
0.0543255843,
-0.022659773,
-0.0943126082,
0.2808870077,
0.2044992745,
-0.0058555417,
-0.2046144307,
0.1194214523,
-0.452462405,
0.2533147931,
-0.0256187953,
-0.1043338105,
0.2665589452,
-0.479054749,
-0.0075266482,
0.2800281942,
0.2832074463,
-0.3265571296,
-0.1897300184,
0.4312444031,
-0.3023914695,
-0.4885341525,
-0.2659198046,
-0.1079019308,
0.1922406405,
-0.4020412266,
0.1028378233,
-0.3092484176,
-0.0865707695,
-0.1092373207,
-0.4814180434,
0.1412682682,
0.0339179449,
0.1487731934,
0.3193033934,
0.2610315084,
-0.0968658254,
-0.1705332249,
-0.0931926146,
-0.0187913068,
-0.0070103393,
0.3835403621,
-0.0335635021,
0.5110216737,
-0.154703483,
-0.1943015903,
-0.3124758899,
-0.3725011051,
-0.2141076475,
0.0881566852,
-0.2451634854,
0.2228191644,
-0.2427801937,
0.2626276314,
-0.2554142773,
0.1942519397,
0.1928977221,
0.2545521259,
-0.13316603,
-0.1336843073,
0.5435534716,
0.1985754669,
-0.2246309221,
-0.0918726176,
0.22640495,
-0.7421174049,
-0.0918049067,
-0.6218990684,
-0.1301677823,
0.2264228761,
0.048894193,
-0.6048377156,
-0.1109023765,
0.0048906249,
-0.0846340954,
-0.0709502771,
0.5546088815,
-0.256450206,
0.1584331393,
0.3368352056,
-0.0841836929
] |
https://github.com/huggingface/datasets/issues/3172 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1` | Hello @mariomeissner, very sorry for the late reply, I hope you have found a solution to your problem!
I don't have public code at the moment. I have not experienced any other issue with hydra, even if I don't understand why changing the location of the definition of `run()` fixed the problem.
Overall, I don't have issue with caching anymore, even when
1. using custom fingerprints using the argument `new_fingerprint
2. when using `num_proc>1` | ## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 74 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
Hello @mariomeissner, very sorry for the late reply, I hope you have found a solution to your problem!
I don't have public code at the moment. I have not experienced any other issue with hydra, even if I don't understand why changing the location of the definition of `run()` fixed the problem.
Overall, I don't have issue with caching anymore, even when
1. using custom fingerprints using the argument `new_fingerprint
2. when using `num_proc>1` | [
-0.4948825538,
0.0149980877,
0.1314036548,
0.2600641847,
0.3205186129,
0.0034364853,
0.4633168578,
0.0224105176,
0.020504212,
0.1974067092,
0.1711901277,
0.5095179677,
-0.2995520234,
-0.264898479,
-0.2079024166,
0.20999071,
0.0466203913,
-0.1581077874,
-0.2430632859,
0.4450131059,
-0.4338950813,
0.1656219661,
-0.2789233029,
0.1814817935,
-0.1627854258,
0.037097007,
-0.0776935667,
0.3484530449,
0.086063616,
-0.4888786376,
0.2598611414,
-0.1325255781,
0.2476995438,
0.5398383737,
-0.0001272483,
0.0460722372,
0.2578923106,
-0.1024022028,
-0.3156310916,
-0.0267750658,
-0.3072264791,
0.1170792803,
0.0201555807,
-0.0358047523,
0.2532773614,
0.1260475665,
-0.0460105874,
-0.3230039179,
0.1596812457,
0.4001817703,
0.0492290296,
0.2706770897,
-0.1699385196,
-0.0399687663,
0.1190547645,
0.2666268945,
-0.0602310933,
0.3845189214,
0.2321909517,
-0.2951949835,
0.1350496411,
-0.0893990919,
-0.1739122272,
-0.0045469617,
0.3510588109,
-0.040984042,
0.0232143812,
-0.4895768762,
-0.1028225273,
0.1353897154,
-0.0613663904,
-0.3817996681,
-0.2259421498,
-0.074259758,
-0.1902290136,
-0.2047741115,
-0.0998716056,
-0.0249887556,
-0.1718675345,
0.2097604126,
0.0638547093,
-0.0485783108,
-0.2467311025,
0.1295648515,
0.0103537468,
0.4980972111,
0.028983606,
0.3650413454,
-0.1222733855,
-0.0264729783,
-0.4142026305,
0.1232841834,
-0.0591074862,
0.0954193994,
-0.0946487486,
-0.0601428933,
0.029420143,
-0.4986715019,
0.3885610998,
-0.3821170032,
0.2268929482,
0.1152440906,
0.4275253117,
0.3449109495,
0.3994285762,
-0.2721118331,
0.2052561045,
0.4494012594,
0.3322502971,
0.1261998415,
0.2210259736,
-0.0018743156,
0.1574819833,
-0.1251470596,
0.2052963227,
0.431799233,
0.241381526,
-0.2272038907,
-0.0174590219,
0.3960925043,
-0.1598087251,
0.0779932067,
0.1089990214,
0.1883090734,
0.4819608033,
-0.0319109149,
0.097362414,
0.0852163509,
-0.3469713032,
0.069705449,
-0.0165418461,
-0.1447065622,
-0.2634493709,
0.1307265162,
0.1109899133,
0.1422279328,
0.0236046854,
0.0288851876,
-0.2137299776,
-0.1220510453,
0.3333073556,
-0.1442388445,
0.042644646,
0.4357181489,
-0.3199975789,
0.2193747163,
0.1305710971,
0.1577418447,
-0.1090303287,
0.4621479809,
-0.0068931812,
-0.4316523969,
-0.1327647418,
0.0437070057,
-0.1331689358,
0.3940793872,
-0.1725142747,
-0.0378822275,
0.5560599566,
-0.2402357757,
0.1401233077,
-0.4384782612,
-0.5609032512,
-0.1854166538,
-0.0538089052,
0.3940499127,
-0.0901180506,
-0.0324345492,
-0.0583023615,
-0.2039723098,
-0.0181757491,
-0.1308778226,
-0.2065330744,
0.2350629568,
-0.2520934939,
0.0857779235,
0.3741843998,
-0.1164215356,
-0.5244369507,
0.2536508441,
-0.4085045755,
-0.1177069843,
-0.4146102071,
0.1758605093,
0.0633688569,
-0.0385135524,
0.1088755876,
0.1612367481,
-0.1654226333,
0.042291306,
-0.2292448729,
-0.0202572122,
-0.0226202644,
0.1228499562,
0.3228341937,
0.0421641506,
0.1730149984,
0.1101935208,
0.2251439542,
-0.0360024199,
0.0431245752,
0.3198364973,
0.2104032189,
-0.1014229283,
-0.0388899557,
-0.5471795797,
-0.090444386,
0.2984938323,
-0.2046452016,
-0.0949443504,
-0.4452670217,
0.0026962766,
0.0058617578,
0.340518415,
-0.0987058952,
-0.3571216166,
-0.0807114094,
0.0995008722,
-0.3186140358,
-0.2070307583,
0.0025406936,
0.2276994735,
-0.1679099649,
0.1404096782,
-0.5382887125,
-0.1865255088,
0.0094540333,
-0.4891037941,
-0.2562517822,
-0.052723676,
-0.0526048169,
-0.0540935434,
-0.2584121525,
0.3309264183,
0.3661315441,
-0.5121657252,
-0.2837772965,
0.0160828736,
0.0031391773,
0.0102091385,
-0.1074363515,
0.1130136624,
0.1510251909,
0.1967197061,
-0.0199705102,
0.2717967331,
-0.3765307665,
0.3035851717,
-0.1066413298,
0.1059917808,
0.0149018308,
0.2249100804,
-0.1494158506,
-0.301830709,
-0.0715532899,
0.2841206789,
-0.0581324287,
0.0478569455,
0.2563275993,
0.0223193429,
0.1165336594,
0.0069209449,
0.1036122441,
0.0942058265,
0.0301587582,
0.1494591832,
0.1820777655,
-0.0936223716,
0.7560115457,
-0.0835572109,
-0.1237431541,
0.1788657606,
-0.0323518328,
0.0961246043,
0.0169203002,
0.3523865044,
0.4663641751,
0.2155162543,
0.2119995803,
0.2142360657,
0.0836378708,
-0.5376945138,
-0.1756772548,
0.2406242192,
-0.4153204262,
0.5134966373,
-0.2037621289,
0.0930119455,
-0.1981105804,
-0.0625841394,
-0.1029865295,
-0.422391206,
-0.2592754364,
0.3001411259,
-0.3008063138,
0.1081114337,
0.0544907227,
-0.159430638,
0.0861884505,
0.1013751701,
0.3512023389,
-0.2590730786,
-0.0052100834,
-0.2097328454,
0.2074592859,
0.0198078211,
0.2121816278,
0.1231953353,
-0.3192383647,
0.0487811491,
-0.33656618,
0.1015573144,
0.1328026801,
0.6923866272,
0.2072793096,
0.0852454603,
-0.1494085938,
0.0258820597,
0.2258658409,
-0.1865837723,
0.0009124022,
0.3407762349,
0.1408566684,
0.045564428,
-0.3188872039,
-0.1834887564,
-0.1682406366,
-0.270342797,
-0.0995852724,
-0.3767811656,
0.1229390427,
0.1574546099,
0.1579884589,
0.2216858715,
-0.0129298586,
0.0073680351,
0.1126240045,
0.3374051154,
-0.0788992345,
-0.2735808492,
-0.1783544719,
-0.0092282603,
-0.0247023515,
-0.1286478639,
0.2723335922,
-0.3488797247,
-0.243644163,
0.0243684314,
0.1317640245,
-0.0563963018,
-0.2671625614,
0.5877299905,
0.0857557952,
0.1951409876,
-0.1148174033,
-0.187913835,
0.1556042582,
-0.294072181,
0.003264142,
0.1971102357,
0.67818892,
0.0620538518,
0.9768183231,
0.3290991485,
-0.1423387676,
0.0260339417,
-0.0972262695,
0.0620756261,
-0.1731203496,
-0.2154791504,
-0.0603203215,
0.1031091958,
-0.1072254479,
0.187648505,
-0.1932964623,
-0.1414006054,
0.0314606093,
-0.2449008822,
-0.0501985289,
-0.382968992,
0.2576635778,
-0.1022965014,
0.2845242918,
0.0066037714,
-0.1052430049,
-0.0394718051,
0.017090885,
-0.2345443964,
0.2913269103,
0.1789411604,
0.0499077104,
0.1823030114,
-0.2426895052,
-0.4169843793,
0.2355182171,
0.1996058077,
0.8556868434,
-0.2914413214,
-0.1626004279,
-0.376548171,
-0.1890307367,
0.3463118076,
-0.3203761876,
0.0756434128,
-0.0535490997,
-0.0761575103,
-0.6055014133,
-0.2138319463,
-0.1817930788,
0.3289915025,
-0.080714941,
0.1809557825,
0.0476160347,
-0.0206205081,
0.3977997899,
0.1083732024,
-0.1189278513,
-0.0844883323,
-0.4585122466,
-0.2879629433,
-0.4599941075,
0.1135036498,
0.1844422817,
-0.1448991001,
0.1122370586,
-0.1597159654,
0.0460236445,
-0.1787990481,
0.0670286566,
0.1180576161,
-0.0973421261,
-0.2216076851,
0.2358569205,
-0.1230114028,
0.0314558782,
0.4571040869,
0.2976825833,
0.0777771473,
-0.3232281208,
0.5040935874,
-0.0095885843,
0.3939349055,
0.274541527,
-0.0331511348,
0.0252192635,
-0.1358571947,
0.1487317085,
-0.2897136509,
0.0074729994,
0.2463853508,
0.0577338785,
-0.0589236319,
-0.0225334391,
0.1207696274,
0.3456435502,
-0.1381041706,
0.2780246437,
-0.2659444213,
-0.2247655541,
0.5866340995,
0.2790298462,
0.7352151871,
-0.0209480189,
0.0485673994,
-0.0783497915,
-0.1783870906,
0.059728086,
0.3720564544,
0.1332145184,
-0.5092824101,
-0.4189901352,
-0.0522722304,
-0.2977716625,
0.1734293401,
-0.004212745,
0.0000237749,
0.2661078274,
-0.3108479679,
0.2485472858,
0.0263080895,
0.0798367932,
0.1531869918,
-0.1122225448,
-0.002374857,
0.0314305313,
-0.0392122865,
-0.2556895018,
-0.2904174924,
0.1522657871,
-0.1863823235,
-0.1586299241,
-0.3658851683,
0.0230388399,
0.0497672297,
0.3503794372,
0.0235393774,
0.2082855701,
-0.0349107087,
0.40045771,
0.0840862319,
0.2828443646,
0.1042817906,
-0.167769894,
-0.0745417699,
0.1363827288,
0.0949862003,
-0.0010769728,
0.2390249074,
0.030185096,
-0.2571736276,
-0.0871277079,
0.019752061,
-0.0939238146,
-0.0276466236,
0.132452473,
0.2831028998,
-0.259221822,
0.1062514335,
-0.2190851569,
-0.2358784527,
-0.0836267099,
-0.0020864478,
0.2793975472,
-0.1376195848,
0.2402713001,
-0.3386164606,
-0.3843049109,
-0.0225932561,
0.3351632059,
-0.1534478664,
0.1905505806,
0.0700164363,
0.1095100269,
-0.1174016148,
-0.0930841565,
0.4142432809,
-0.0750810727,
-0.4553853273,
-0.0493946448,
-0.0441564582,
-0.117678076,
0.0146504147,
-0.0403106399,
-0.1042328924,
-0.1789651215,
-0.1251273453,
-0.5647389293,
-0.5011954308,
0.1040916443,
-0.1844216138,
0.3103720844,
-0.0923370048,
-0.2819031775,
-0.4639461637,
0.0545232445,
-0.1257538795,
-0.1608896703,
0.0592507273,
0.2837460041,
-0.1096071377,
0.1030653268,
-0.2700548172,
-0.2716081738,
-0.0812648311,
0.5102872849,
-0.1264069676,
-0.0312650576,
0.0581251271,
0.2318339646,
-0.0472484604,
-0.1240467504,
-0.0733814538,
0.016511105,
-0.0990744308,
-0.1423505992,
0.5031332374,
0.2737665772,
-0.0621350408,
0.1874612868,
0.3553144336,
0.3284831941,
0.0009875667,
0.4864467978,
-0.0433416106,
0.3586205542,
-0.1149697304,
0.2920767665,
-0.0773061216,
-0.0562083647,
-0.0538049303,
0.1092747077,
0.1868922412,
0.1860325336,
0.3210430741,
-0.2804486156,
0.1834419668,
-0.1124284714,
0.1428297311,
0.0881293565,
-0.4986716211,
-0.0356715284,
-0.1091016233,
-0.0138736628,
0.0355330706,
0.0123796565,
0.244953528,
-0.0690063536,
-0.0821985006,
0.686950624,
-0.0896802396,
-0.0840898454,
0.1354921311,
0.1639263779,
0.1592285186,
0.1106757,
0.0192875005,
0.2401156723,
-0.3238706291,
0.1686413735,
0.3113876879,
0.1183894724,
0.5803939104,
0.4042428732,
0.0576299131,
0.2036657482,
-0.0349059291,
0.0348416977,
0.0741833076,
-0.3247688413,
0.3195769787,
0.3149088025,
0.10074348,
0.1979737431,
0.1184076145,
-0.0335708149,
-0.4267123342,
-0.0833030865,
0.1328280568,
-0.0805061534,
-0.2566769123,
-0.0388739407,
0.0223952718,
0.0061740247,
-0.1746213883,
-0.0213341508,
-0.0692472234,
-0.0398702957,
0.0858879685,
0.1742095649,
-0.4083405733,
0.0198865719,
0.1184697002,
0.4771023691,
0.0042301132,
-0.2046847343,
0.1234880835,
0.0541070923,
0.269230932,
0.1037663594,
0.046544265,
0.4305724502,
0.2879207134,
-0.5157394409,
0.3383883834,
0.1480319351,
0.0708647296,
0.1262989044,
0.1177180335,
-0.2951897681,
0.2930136025,
0.2499593347,
-0.0660065487,
0.0114066536,
0.0691899434,
0.2954418957,
0.5416063666,
0.0693320408,
0.3217765987,
-0.0830954164,
-0.1034925878,
0.4112060368,
0.0532353334,
-0.3087320626,
-0.0826195553,
0.4603152573,
-0.1337614655,
0.4010569155,
0.0543255843,
-0.022659773,
-0.0943126082,
0.2808870077,
0.2044992745,
-0.0058555417,
-0.2046144307,
0.1194214523,
-0.452462405,
0.2533147931,
-0.0256187953,
-0.1043338105,
0.2665589452,
-0.479054749,
-0.0075266482,
0.2800281942,
0.2832074463,
-0.3265571296,
-0.1897300184,
0.4312444031,
-0.3023914695,
-0.4885341525,
-0.2659198046,
-0.1079019308,
0.1922406405,
-0.4020412266,
0.1028378233,
-0.3092484176,
-0.0865707695,
-0.1092373207,
-0.4814180434,
0.1412682682,
0.0339179449,
0.1487731934,
0.3193033934,
0.2610315084,
-0.0968658254,
-0.1705332249,
-0.0931926146,
-0.0187913068,
-0.0070103393,
0.3835403621,
-0.0335635021,
0.5110216737,
-0.154703483,
-0.1943015903,
-0.3124758899,
-0.3725011051,
-0.2141076475,
0.0881566852,
-0.2451634854,
0.2228191644,
-0.2427801937,
0.2626276314,
-0.2554142773,
0.1942519397,
0.1928977221,
0.2545521259,
-0.13316603,
-0.1336843073,
0.5435534716,
0.1985754669,
-0.2246309221,
-0.0918726176,
0.22640495,
-0.7421174049,
-0.0918049067,
-0.6218990684,
-0.1301677823,
0.2264228761,
0.048894193,
-0.6048377156,
-0.1109023765,
0.0048906249,
-0.0846340954,
-0.0709502771,
0.5546088815,
-0.256450206,
0.1584331393,
0.3368352056,
-0.0841836929
] |
https://github.com/huggingface/datasets/issues/3172 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1` | I solved my issue by turning the map callable into a class static method, like they do in `lightning-transformers`. Very strange... | ## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 21 | `SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>βββββββββββββββββββββββββββββββββββββββββββββββββββ| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
I solved my issue by turning the map callable into a class static method, like they do in `lightning-transformers`. Very strange... | [
-0.4948825538,
0.0149980877,
0.1314036548,
0.2600641847,
0.3205186129,
0.0034364853,
0.4633168578,
0.0224105176,
0.020504212,
0.1974067092,
0.1711901277,
0.5095179677,
-0.2995520234,
-0.264898479,
-0.2079024166,
0.20999071,
0.0466203913,
-0.1581077874,
-0.2430632859,
0.4450131059,
-0.4338950813,
0.1656219661,
-0.2789233029,
0.1814817935,
-0.1627854258,
0.037097007,
-0.0776935667,
0.3484530449,
0.086063616,
-0.4888786376,
0.2598611414,
-0.1325255781,
0.2476995438,
0.5398383737,
-0.0001272483,
0.0460722372,
0.2578923106,
-0.1024022028,
-0.3156310916,
-0.0267750658,
-0.3072264791,
0.1170792803,
0.0201555807,
-0.0358047523,
0.2532773614,
0.1260475665,
-0.0460105874,
-0.3230039179,
0.1596812457,
0.4001817703,
0.0492290296,
0.2706770897,
-0.1699385196,
-0.0399687663,
0.1190547645,
0.2666268945,
-0.0602310933,
0.3845189214,
0.2321909517,
-0.2951949835,
0.1350496411,
-0.0893990919,
-0.1739122272,
-0.0045469617,
0.3510588109,
-0.040984042,
0.0232143812,
-0.4895768762,
-0.1028225273,
0.1353897154,
-0.0613663904,
-0.3817996681,
-0.2259421498,
-0.074259758,
-0.1902290136,
-0.2047741115,
-0.0998716056,
-0.0249887556,
-0.1718675345,
0.2097604126,
0.0638547093,
-0.0485783108,
-0.2467311025,
0.1295648515,
0.0103537468,
0.4980972111,
0.028983606,
0.3650413454,
-0.1222733855,
-0.0264729783,
-0.4142026305,
0.1232841834,
-0.0591074862,
0.0954193994,
-0.0946487486,
-0.0601428933,
0.029420143,
-0.4986715019,
0.3885610998,
-0.3821170032,
0.2268929482,
0.1152440906,
0.4275253117,
0.3449109495,
0.3994285762,
-0.2721118331,
0.2052561045,
0.4494012594,
0.3322502971,
0.1261998415,
0.2210259736,
-0.0018743156,
0.1574819833,
-0.1251470596,
0.2052963227,
0.431799233,
0.241381526,
-0.2272038907,
-0.0174590219,
0.3960925043,
-0.1598087251,
0.0779932067,
0.1089990214,
0.1883090734,
0.4819608033,
-0.0319109149,
0.097362414,
0.0852163509,
-0.3469713032,
0.069705449,
-0.0165418461,
-0.1447065622,
-0.2634493709,
0.1307265162,
0.1109899133,
0.1422279328,
0.0236046854,
0.0288851876,
-0.2137299776,
-0.1220510453,
0.3333073556,
-0.1442388445,
0.042644646,
0.4357181489,
-0.3199975789,
0.2193747163,
0.1305710971,
0.1577418447,
-0.1090303287,
0.4621479809,
-0.0068931812,
-0.4316523969,
-0.1327647418,
0.0437070057,
-0.1331689358,
0.3940793872,
-0.1725142747,
-0.0378822275,
0.5560599566,
-0.2402357757,
0.1401233077,
-0.4384782612,
-0.5609032512,
-0.1854166538,
-0.0538089052,
0.3940499127,
-0.0901180506,
-0.0324345492,
-0.0583023615,
-0.2039723098,
-0.0181757491,
-0.1308778226,
-0.2065330744,
0.2350629568,
-0.2520934939,
0.0857779235,
0.3741843998,
-0.1164215356,
-0.5244369507,
0.2536508441,
-0.4085045755,
-0.1177069843,
-0.4146102071,
0.1758605093,
0.0633688569,
-0.0385135524,
0.1088755876,
0.1612367481,
-0.1654226333,
0.042291306,
-0.2292448729,
-0.0202572122,
-0.0226202644,
0.1228499562,
0.3228341937,
0.0421641506,
0.1730149984,
0.1101935208,
0.2251439542,
-0.0360024199,
0.0431245752,
0.3198364973,
0.2104032189,
-0.1014229283,
-0.0388899557,
-0.5471795797,
-0.090444386,
0.2984938323,
-0.2046452016,
-0.0949443504,
-0.4452670217,
0.0026962766,
0.0058617578,
0.340518415,
-0.0987058952,
-0.3571216166,
-0.0807114094,
0.0995008722,
-0.3186140358,
-0.2070307583,
0.0025406936,
0.2276994735,
-0.1679099649,
0.1404096782,
-0.5382887125,
-0.1865255088,
0.0094540333,
-0.4891037941,
-0.2562517822,
-0.052723676,
-0.0526048169,
-0.0540935434,
-0.2584121525,
0.3309264183,
0.3661315441,
-0.5121657252,
-0.2837772965,
0.0160828736,
0.0031391773,
0.0102091385,
-0.1074363515,
0.1130136624,
0.1510251909,
0.1967197061,
-0.0199705102,
0.2717967331,
-0.3765307665,
0.3035851717,
-0.1066413298,
0.1059917808,
0.0149018308,
0.2249100804,
-0.1494158506,
-0.301830709,
-0.0715532899,
0.2841206789,
-0.0581324287,
0.0478569455,
0.2563275993,
0.0223193429,
0.1165336594,
0.0069209449,
0.1036122441,
0.0942058265,
0.0301587582,
0.1494591832,
0.1820777655,
-0.0936223716,
0.7560115457,
-0.0835572109,
-0.1237431541,
0.1788657606,
-0.0323518328,
0.0961246043,
0.0169203002,
0.3523865044,
0.4663641751,
0.2155162543,
0.2119995803,
0.2142360657,
0.0836378708,
-0.5376945138,
-0.1756772548,
0.2406242192,
-0.4153204262,
0.5134966373,
-0.2037621289,
0.0930119455,
-0.1981105804,
-0.0625841394,
-0.1029865295,
-0.422391206,
-0.2592754364,
0.3001411259,
-0.3008063138,
0.1081114337,
0.0544907227,
-0.159430638,
0.0861884505,
0.1013751701,
0.3512023389,
-0.2590730786,
-0.0052100834,
-0.2097328454,
0.2074592859,
0.0198078211,
0.2121816278,
0.1231953353,
-0.3192383647,
0.0487811491,
-0.33656618,
0.1015573144,
0.1328026801,
0.6923866272,
0.2072793096,
0.0852454603,
-0.1494085938,
0.0258820597,
0.2258658409,
-0.1865837723,
0.0009124022,
0.3407762349,
0.1408566684,
0.045564428,
-0.3188872039,
-0.1834887564,
-0.1682406366,
-0.270342797,
-0.0995852724,
-0.3767811656,
0.1229390427,
0.1574546099,
0.1579884589,
0.2216858715,
-0.0129298586,
0.0073680351,
0.1126240045,
0.3374051154,
-0.0788992345,
-0.2735808492,
-0.1783544719,
-0.0092282603,
-0.0247023515,
-0.1286478639,
0.2723335922,
-0.3488797247,
-0.243644163,
0.0243684314,
0.1317640245,
-0.0563963018,
-0.2671625614,
0.5877299905,
0.0857557952,
0.1951409876,
-0.1148174033,
-0.187913835,
0.1556042582,
-0.294072181,
0.003264142,
0.1971102357,
0.67818892,
0.0620538518,
0.9768183231,
0.3290991485,
-0.1423387676,
0.0260339417,
-0.0972262695,
0.0620756261,
-0.1731203496,
-0.2154791504,
-0.0603203215,
0.1031091958,
-0.1072254479,
0.187648505,
-0.1932964623,
-0.1414006054,
0.0314606093,
-0.2449008822,
-0.0501985289,
-0.382968992,
0.2576635778,
-0.1022965014,
0.2845242918,
0.0066037714,
-0.1052430049,
-0.0394718051,
0.017090885,
-0.2345443964,
0.2913269103,
0.1789411604,
0.0499077104,
0.1823030114,
-0.2426895052,
-0.4169843793,
0.2355182171,
0.1996058077,
0.8556868434,
-0.2914413214,
-0.1626004279,
-0.376548171,
-0.1890307367,
0.3463118076,
-0.3203761876,
0.0756434128,
-0.0535490997,
-0.0761575103,
-0.6055014133,
-0.2138319463,
-0.1817930788,
0.3289915025,
-0.080714941,
0.1809557825,
0.0476160347,
-0.0206205081,
0.3977997899,
0.1083732024,
-0.1189278513,
-0.0844883323,
-0.4585122466,
-0.2879629433,
-0.4599941075,
0.1135036498,
0.1844422817,
-0.1448991001,
0.1122370586,
-0.1597159654,
0.0460236445,
-0.1787990481,
0.0670286566,
0.1180576161,
-0.0973421261,
-0.2216076851,
0.2358569205,
-0.1230114028,
0.0314558782,
0.4571040869,
0.2976825833,
0.0777771473,
-0.3232281208,
0.5040935874,
-0.0095885843,
0.3939349055,
0.274541527,
-0.0331511348,
0.0252192635,
-0.1358571947,
0.1487317085,
-0.2897136509,
0.0074729994,
0.2463853508,
0.0577338785,
-0.0589236319,
-0.0225334391,
0.1207696274,
0.3456435502,
-0.1381041706,
0.2780246437,
-0.2659444213,
-0.2247655541,
0.5866340995,
0.2790298462,
0.7352151871,
-0.0209480189,
0.0485673994,
-0.0783497915,
-0.1783870906,
0.059728086,
0.3720564544,
0.1332145184,
-0.5092824101,
-0.4189901352,
-0.0522722304,
-0.2977716625,
0.1734293401,
-0.004212745,
0.0000237749,
0.2661078274,
-0.3108479679,
0.2485472858,
0.0263080895,
0.0798367932,
0.1531869918,
-0.1122225448,
-0.002374857,
0.0314305313,
-0.0392122865,
-0.2556895018,
-0.2904174924,
0.1522657871,
-0.1863823235,
-0.1586299241,
-0.3658851683,
0.0230388399,
0.0497672297,
0.3503794372,
0.0235393774,
0.2082855701,
-0.0349107087,
0.40045771,
0.0840862319,
0.2828443646,
0.1042817906,
-0.167769894,
-0.0745417699,
0.1363827288,
0.0949862003,
-0.0010769728,
0.2390249074,
0.030185096,
-0.2571736276,
-0.0871277079,
0.019752061,
-0.0939238146,
-0.0276466236,
0.132452473,
0.2831028998,
-0.259221822,
0.1062514335,
-0.2190851569,
-0.2358784527,
-0.0836267099,
-0.0020864478,
0.2793975472,
-0.1376195848,
0.2402713001,
-0.3386164606,
-0.3843049109,
-0.0225932561,
0.3351632059,
-0.1534478664,
0.1905505806,
0.0700164363,
0.1095100269,
-0.1174016148,
-0.0930841565,
0.4142432809,
-0.0750810727,
-0.4553853273,
-0.0493946448,
-0.0441564582,
-0.117678076,
0.0146504147,
-0.0403106399,
-0.1042328924,
-0.1789651215,
-0.1251273453,
-0.5647389293,
-0.5011954308,
0.1040916443,
-0.1844216138,
0.3103720844,
-0.0923370048,
-0.2819031775,
-0.4639461637,
0.0545232445,
-0.1257538795,
-0.1608896703,
0.0592507273,
0.2837460041,
-0.1096071377,
0.1030653268,
-0.2700548172,
-0.2716081738,
-0.0812648311,
0.5102872849,
-0.1264069676,
-0.0312650576,
0.0581251271,
0.2318339646,
-0.0472484604,
-0.1240467504,
-0.0733814538,
0.016511105,
-0.0990744308,
-0.1423505992,
0.5031332374,
0.2737665772,
-0.0621350408,
0.1874612868,
0.3553144336,
0.3284831941,
0.0009875667,
0.4864467978,
-0.0433416106,
0.3586205542,
-0.1149697304,
0.2920767665,
-0.0773061216,
-0.0562083647,
-0.0538049303,
0.1092747077,
0.1868922412,
0.1860325336,
0.3210430741,
-0.2804486156,
0.1834419668,
-0.1124284714,
0.1428297311,
0.0881293565,
-0.4986716211,
-0.0356715284,
-0.1091016233,
-0.0138736628,
0.0355330706,
0.0123796565,
0.244953528,
-0.0690063536,
-0.0821985006,
0.686950624,
-0.0896802396,
-0.0840898454,
0.1354921311,
0.1639263779,
0.1592285186,
0.1106757,
0.0192875005,
0.2401156723,
-0.3238706291,
0.1686413735,
0.3113876879,
0.1183894724,
0.5803939104,
0.4042428732,
0.0576299131,
0.2036657482,
-0.0349059291,
0.0348416977,
0.0741833076,
-0.3247688413,
0.3195769787,
0.3149088025,
0.10074348,
0.1979737431,
0.1184076145,
-0.0335708149,
-0.4267123342,
-0.0833030865,
0.1328280568,
-0.0805061534,
-0.2566769123,
-0.0388739407,
0.0223952718,
0.0061740247,
-0.1746213883,
-0.0213341508,
-0.0692472234,
-0.0398702957,
0.0858879685,
0.1742095649,
-0.4083405733,
0.0198865719,
0.1184697002,
0.4771023691,
0.0042301132,
-0.2046847343,
0.1234880835,
0.0541070923,
0.269230932,
0.1037663594,
0.046544265,
0.4305724502,
0.2879207134,
-0.5157394409,
0.3383883834,
0.1480319351,
0.0708647296,
0.1262989044,
0.1177180335,
-0.2951897681,
0.2930136025,
0.2499593347,
-0.0660065487,
0.0114066536,
0.0691899434,
0.2954418957,
0.5416063666,
0.0693320408,
0.3217765987,
-0.0830954164,
-0.1034925878,
0.4112060368,
0.0532353334,
-0.3087320626,
-0.0826195553,
0.4603152573,
-0.1337614655,
0.4010569155,
0.0543255843,
-0.022659773,
-0.0943126082,
0.2808870077,
0.2044992745,
-0.0058555417,
-0.2046144307,
0.1194214523,
-0.452462405,
0.2533147931,
-0.0256187953,
-0.1043338105,
0.2665589452,
-0.479054749,
-0.0075266482,
0.2800281942,
0.2832074463,
-0.3265571296,
-0.1897300184,
0.4312444031,
-0.3023914695,
-0.4885341525,
-0.2659198046,
-0.1079019308,
0.1922406405,
-0.4020412266,
0.1028378233,
-0.3092484176,
-0.0865707695,
-0.1092373207,
-0.4814180434,
0.1412682682,
0.0339179449,
0.1487731934,
0.3193033934,
0.2610315084,
-0.0968658254,
-0.1705332249,
-0.0931926146,
-0.0187913068,
-0.0070103393,
0.3835403621,
-0.0335635021,
0.5110216737,
-0.154703483,
-0.1943015903,
-0.3124758899,
-0.3725011051,
-0.2141076475,
0.0881566852,
-0.2451634854,
0.2228191644,
-0.2427801937,
0.2626276314,
-0.2554142773,
0.1942519397,
0.1928977221,
0.2545521259,
-0.13316603,
-0.1336843073,
0.5435534716,
0.1985754669,
-0.2246309221,
-0.0918726176,
0.22640495,
-0.7421174049,
-0.0918049067,
-0.6218990684,
-0.1301677823,
0.2264228761,
0.048894193,
-0.6048377156,
-0.1109023765,
0.0048906249,
-0.0846340954,
-0.0709502771,
0.5546088815,
-0.256450206,
0.1584331393,
0.3368352056,
-0.0841836929
] |
https://github.com/huggingface/datasets/issues/3171 | Raise exceptions instead of using assertions for control flow | Adding the remaining tasks for this issue to help new code contributors.
$ cd src/datasets && ack assert -lc
- [x] commands/convert.py:1
- [x] arrow_reader.py:3
- [x] load.py:7
- [x] utils/py_utils.py:2
- [x] features/features.py:9
- [x] arrow_writer.py:7
- [x] search.py:6
- [x] table.py:1
- [x] metric.py:3
- [x] tasks/image_classification.py:1
- [x] arrow_dataset.py:17
- [x] fingerprint.py:6
- [x] io/json.py:1
- [x] io/csv.py:1 | Motivated by https://github.com/huggingface/transformers/issues/12789 in Transformers, one welcoming change would be replacing assertions with proper exceptions. The only type of assertions we should keep are those used as sanity checks.
Currently, there is a total of 87 files with the `assert` statements (located under `datasets` and `src/datasets`), so when working on this, to manage the PR size, only modify 4-5 files at most before submitting a PR. | 61 | Raise exceptions instead of using assertions for control flow
Motivated by https://github.com/huggingface/transformers/issues/12789 in Transformers, one welcoming change would be replacing assertions with proper exceptions. The only type of assertions we should keep are those used as sanity checks.
Currently, there is a total of 87 files with the `assert` statements (located under `datasets` and `src/datasets`), so when working on this, to manage the PR size, only modify 4-5 files at most before submitting a PR.
Adding the remaining tasks for this issue to help new code contributors.
$ cd src/datasets && ack assert -lc
- [x] commands/convert.py:1
- [x] arrow_reader.py:3
- [x] load.py:7
- [x] utils/py_utils.py:2
- [x] features/features.py:9
- [x] arrow_writer.py:7
- [x] search.py:6
- [x] table.py:1
- [x] metric.py:3
- [x] tasks/image_classification.py:1
- [x] arrow_dataset.py:17
- [x] fingerprint.py:6
- [x] io/json.py:1
- [x] io/csv.py:1 | [
-0.0881650448,
-0.3873391151,
-0.1070538238,
0.0649696961,
0.2689186335,
-0.3596983254,
0.2094397098,
0.2920357883,
-0.0260700602,
0.2640655637,
0.2128269821,
0.0678462237,
-0.0809202716,
0.0795362219,
-0.1360158026,
-0.2444677204,
-0.0724885985,
0.0768777505,
-0.054277271,
-0.0525692254,
-0.1079500839,
0.0421506315,
0.0242892094,
0.0541554242,
-0.4384936094,
-0.1740921289,
0.1744790226,
-0.0683292672,
-0.0364513062,
-0.594854176,
0.0333184525,
0.295910269,
-0.0775522888,
0.519297719,
-0.0001032662,
0.0736555308,
0.3867574632,
0.0803955942,
0.0048462078,
0.3137873411,
0.1579501778,
-0.2866902947,
0.0451694764,
-0.1603767574,
0.003226642,
-0.3314121068,
-0.2156920433,
0.4097496271,
0.5269355774,
0.1522307843,
0.2990736663,
0.5255691409,
0.076470837,
0.076959759,
0.0357040241,
0.2640794814,
-0.0258695614,
-0.0294311382,
0.2314431667,
-0.0467116944,
-0.1714560091,
0.3389314115,
0.1395015121,
-0.0432902351,
0.0137047162,
-0.3083994687,
0.1304651648,
-0.1701616943,
-0.0501598306,
0.278817445,
0.0820031911,
-0.1878260225,
-0.5424438715,
-0.3628670573,
-0.1073248312,
-0.1973747015,
0.0907403678,
0.2432215214,
-0.1861922294,
0.0914276466,
-0.2901803851,
-0.0399457291,
-0.2518592477,
-0.2889795601,
-0.2524266243,
0.2939734757,
0.0298764911,
0.0318942107,
0.3092820346,
0.006255806,
-0.0317402631,
0.0431062356,
-0.1420140713,
-0.1761921942,
-0.2127691954,
-0.2038930506,
0.0575279333,
-0.0353200957,
0.2786749005,
0.205661118,
-0.0877916366,
0.0591012239,
-0.0671904609,
0.0046228054,
0.1766353995,
0.3372733295,
-0.2466501147,
0.2895103097,
0.3865312934,
0.330556035,
0.1109984741,
0.0475111529,
0.09926413,
-0.2494734973,
-0.0031347442,
0.1286793202,
0.1953336149,
-0.1038067043,
0.2258202583,
-0.1118230894,
-0.0195545051,
0.0335442498,
0.1418840885,
0.2640984952,
0.2297373861,
0.5079579353,
0.1468481869,
0.1595099121,
-0.0985206515,
-0.0878171995,
-0.2212637365,
0.0256832186,
-0.1866506338,
-0.0774930343,
0.0506457835,
0.1912455261,
0.1682995856,
-0.1661530286,
0.0749599338,
-0.1309690624,
0.2868885994,
-0.0556784123,
0.2386069596,
0.4501611888,
-0.4192939401,
-0.102286078,
-0.0951327235,
0.0419559591,
-0.1791911423,
0.0569879673,
0.1272348464,
-0.363196224,
0.119803749,
0.2745617628,
-0.2108612657,
0.0842475742,
0.0306196678,
0.0594498664,
0.0149587635,
-0.1611556262,
0.3448963165,
0.0091654249,
0.1601561755,
-0.0347176827,
0.1931942999,
0.4437787831,
0.0716079548,
-0.1657450646,
0.0027222775,
-0.2182793915,
-0.1347114146,
0.5541678071,
-0.2597055435,
0.1681941748,
-0.1812242121,
-0.1588935256,
-0.0314580277,
-0.3604861498,
-0.3062005937,
0.0006564356,
-0.0840117633,
0.0160986632,
0.2245657444,
-0.0676014498,
-0.00904145,
-0.3303347826,
-0.384722501,
0.1549218595,
-0.1534494013,
0.4045736194,
-0.3111684024,
-0.2983337343,
-0.2550525665,
0.0260758344,
0.1713885069,
0.003710547,
-0.0310756695,
-0.010146806,
0.1305457652,
-0.2508551776,
-0.0462695323,
0.1110615656,
0.3884362876,
-0.3453666568,
0.0584210567,
0.0225267354,
-0.217655763,
0.1375505328,
-0.1072270423,
0.1116605923,
0.0015080445,
-0.2237648219,
-0.188678816,
0.1939222664,
0.1085360646,
-0.3057633042,
0.2645412982,
-0.037518952,
-0.0095585678,
-0.2076074481,
-0.07818757,
0.008805288,
-0.119046241,
0.1870851666,
-0.1258509606,
0.0108824736,
-0.1257625073,
-0.0337081514,
-0.1035415456,
-0.000345077,
-0.0988492966,
-0.1431031227,
-0.119022578,
0.3194577992,
-0.0312649086,
0.3870184124,
0.2122899592,
0.410220325,
0.1862691492,
-0.2796153724,
0.0338470973,
0.1274697334,
-0.0675217584,
0.1801138222,
-0.414942652,
0.2795253396,
-0.0177338198,
0.1325885952,
0.1953532547,
0.0907546952,
0.1978733093,
-0.132402733,
-0.3396480083,
0.0791237056,
-0.0083663762,
0.1836080402,
0.1783666611,
0.2332520336,
-0.0726614743,
-0.1768525541,
0.1915581375,
-0.1313110441,
0.0082844775,
0.3130362928,
-0.1250865459,
0.065068163,
0.151973784,
0.3825276196,
0.0129210297,
0.4048587084,
-0.0040145363,
-0.1067830473,
0.1449898779,
-0.2040375471,
0.3385514319,
0.4349243045,
-0.1989557743,
0.1164617464,
0.3175485134,
0.0081413444,
-0.2937282622,
-0.2765463889,
-0.2003206015,
-0.0021579417,
-0.1525956541,
0.1100468263,
0.1436430365,
-0.0024627871,
-0.1718351394,
0.051392898,
-0.2930322587,
-0.1019075587,
0.1270068586,
0.0685067028,
-0.5329866409,
0.2492494434,
-0.0485029183,
0.4502567649,
0.128814742,
-0.0568081848,
-0.2953391373,
-0.166457504,
0.0375691168,
0.1434788257,
0.1057485119,
-0.1198658049,
0.4127415717,
0.04355992,
0.084647283,
-0.173682943,
-0.5085965395,
0.1863458753,
-0.088945277,
-0.1039145589,
0.2337796986,
0.1504107267,
0.3327715397,
-0.2451782376,
0.1316508353,
-0.3069674671,
-0.1192682981,
0.1751229763,
0.0512259789,
0.0759448558,
-0.292563647,
-0.2704913318,
0.1313599944,
-0.6225893497,
0.5245729685,
0.0332767852,
0.0251282193,
0.5074660182,
0.2540905476,
-0.0827699229,
-0.1276307404,
0.1656652391,
0.1222751662,
-0.0362488255,
0.1113889962,
0.1094526649,
-0.2441709936,
-0.3479311466,
-0.5763308406,
-0.0451140255,
0.1305850595,
-0.2131862491,
-0.4141558707,
-0.3589301705,
0.0946252346,
0.0543436967,
0.1515709907,
0.3646351099,
0.1830575317,
-0.2933131754,
0.0463481992,
-0.1556539536,
0.0860405788,
0.164218545,
0.1898435205,
-0.1955764741,
0.0419054367,
0.1538446993,
0.5431668162,
0.1673846841,
-0.0833694339,
0.1262197047,
0.0870314315,
0.3001978397,
-0.0133615825,
-0.0996214747,
0.1276309341,
0.1657642573,
-0.1512700915,
0.2306554466,
0.0984747335,
0.2281451821,
0.0615701266,
-0.1053683162,
-0.0424223691,
-0.5014332533,
0.3256525099,
0.0886306614,
0.3316343129,
-0.1042017043,
-0.061184179,
-0.2346030921,
0.1644058377,
0.1623328775,
0.0230448116,
0.0797212273,
-0.1494324207,
-0.1942013055,
-0.0306727383,
-0.2471408546,
0.2718649507,
0.1174618229,
0.2114757299,
0.0814655274,
-0.3136031032,
-0.0828974396,
-0.1682901829,
0.5990104675,
-0.0935040116,
-0.1883445829,
-0.1244590133,
-0.1703088284,
-0.2752896845,
-0.0143195614,
-0.4033797383,
-0.1566510797,
0.2429465204,
0.2937291265,
-0.4376776218,
-0.2291359156,
0.1162502319,
0.2732471228,
0.0190417338,
-0.0418428332,
-0.3027037978,
-0.233587116,
-0.5444598794,
0.3662301004,
0.2941126823,
-0.3720749617,
-0.3354433775,
-0.1759289801,
-0.0842538401,
-0.1850632727,
-0.0343094096,
0.3048989177,
0.3819350004,
-0.2601255774,
-0.0180029683,
0.0671640858,
-0.2129058093,
0.1431507468,
0.3776049316,
0.1172898188,
-0.2664861977,
-0.1438044906,
0.1779559255,
0.0998372659,
0.4393904209,
-0.0236307364,
0.0836692825,
0.0531720147,
0.2918875813,
-0.2226286978,
0.2088505924,
0.1339601129,
0.1070656106,
0.0160058402,
0.2150440514,
0.2311308831,
0.0152401803,
-0.2932007909,
0.0464202203,
0.2224872112,
-0.203108564,
0.4598035514,
0.1513827443,
0.9882907867,
-0.1482377499,
0.0617749542,
0.1928394735,
-0.138642475,
0.4572944343,
-0.1480542272,
0.1922547072,
-0.2883403897,
-0.1152693629,
0.1397031844,
-0.1399837285,
0.0679111928,
-0.0565730035,
-0.2604394257,
0.2365916371,
0.0266358405,
-0.1893713921,
-0.0657282025,
0.5140817761,
-0.1461228281,
-0.326433152,
-0.2436531633,
0.1776523143,
-0.1746278703,
0.1457170546,
-0.0755807459,
-0.2603552341,
0.0777713507,
-0.5153380632,
-0.1818543673,
-0.1561780125,
0.1066568866,
-0.1011471674,
0.4350498915,
0.0093475459,
0.1676570773,
0.0792619213,
0.1128681079,
0.3814635873,
-0.1617699265,
0.2222359627,
0.0032612064,
0.1452326924,
0.0369974673,
0.1435207874,
0.1935952902,
-0.0331575535,
-0.2490579337,
-0.1713263988,
-0.1749452651,
-0.0734414458,
0.1212658882,
-0.1218762249,
0.1238091365,
-0.2939464152,
0.3903711438,
-0.1367457956,
-0.7144196033,
-0.1521173418,
0.2504225075,
-0.0432232916,
-0.209133476,
0.2274955213,
0.4580759704,
-0.1871821731,
-0.0682490394,
-0.0382197909,
-0.1091567278,
-0.0377690271,
0.413641274,
0.0090525486,
-0.0793512762,
-0.3726233542,
-0.2312719524,
0.0522795245,
-0.6830714941,
0.4221445322,
-0.1695245653,
-0.6489540339,
-0.0848835334,
0.3214877546,
0.3489390016,
0.0228927452,
-0.2065975815,
-0.0204862747,
-0.6031262875,
0.3911763728,
-0.1423580647,
0.4216495454,
-0.1638965756,
0.2522776127,
-0.0842047483,
0.3217857778,
-0.4630567133,
-0.1180671453,
-0.4616395831,
0.2690308392,
-0.1729925722,
-0.5333089232,
0.0783994123,
-0.1417343467,
0.2371937335,
0.1230778769,
-0.315312624,
-0.3019144535,
-0.0608388931,
0.06818863,
-0.1541950703,
0.0932130069,
0.0421417952,
0.1067956463,
0.0915786549,
-0.251396358,
0.1236160994,
-0.1911117733,
-0.0734268576,
0.05846674,
-0.0255521592,
0.0635211244,
-0.0249555111,
-0.0000514126,
0.063782014,
-0.1743127108,
0.1456036568,
0.0958992764,
-0.1203848869,
-0.2116971761,
0.0350119248,
0.2684667408,
0.2910827398,
0.2854695618,
0.0635018125,
0.2110169232,
-0.2555682957,
0.1576021761,
0.396348238,
0.1473301202,
-0.097873725,
-0.0052129948,
0.0328717493,
0.3590869308,
-0.311437577,
0.0966514423,
-0.0774092972,
-0.1969257593,
0.318842411,
0.383371979,
0.1405567676,
-0.130966574,
0.3823844194,
0.268261373,
0.1141473353,
-0.0696582943,
-0.0373095609,
0.1114899665,
-0.2213076204,
-0.1030788198,
0.3664963245,
-0.0151423048,
0.4772880375,
-0.1670722365,
-0.032638263,
0.1275123954,
-0.3003934324,
0.0816952959,
0.2745682299,
-0.1095363274,
0.1909932345,
-0.3223902285,
0.2181827873,
-0.0277616978,
0.2142330259,
0.3259176612,
0.1258422434,
-0.1652107239,
-0.4314966798,
0.0556619875,
-0.1396455765,
-0.0238771718,
0.0885245204,
0.0295342412,
0.0580524839,
-0.269371897,
0.1408239454,
-0.1014620364,
0.2483725399,
0.2490622848,
0.1396392435,
-0.3185508847,
-0.0308454502,
0.0470589884,
0.4863835573,
-0.267632544,
0.2135551125,
0.5382635593,
-0.0398471877,
0.0382120796,
0.3100286424,
0.4034111798,
0.0150936907,
-0.2434620112,
0.2784773707,
-0.0841088071,
-0.0667507946,
-0.1770449281,
0.0174028948,
0.0460910723,
0.287989676,
0.0530154444,
0.2586084306,
-0.3072909713,
-0.2338414043,
-0.414609462,
-0.1989986151,
-0.2567900121,
0.6262977123,
0.2150786221,
-0.3657124341,
-0.2700387537,
-0.0736189485,
-0.341409117,
0.1452768147,
0.0785213113,
-0.2807783186,
0.0684444159,
0.0702853203,
0.123146221,
-0.1163252965,
0.3251583874,
0.2377027869,
0.277218312,
-0.1460325271,
0.1815769821,
-0.3908774257,
0.1585950702,
-0.008236289,
-0.1401388794,
0.1740482897,
0.0821307376,
-0.0339690521,
0.1337550133,
0.0480951034,
-0.2553835809,
0.1216192842,
-0.0411391109,
-0.3437039554,
0.1258393377,
0.1574010402,
-0.205079332,
0.2560659945,
-0.2857867479,
0.2112661451,
0.1802087426,
0.1774457097,
0.2388739884,
0.148534283,
0.1177409738,
0.0215885099,
0.1639826745,
0.2737447619,
0.3253597319,
-0.15845263,
-0.0936111212,
-0.2765783668,
-0.1977950633,
-0.2146101445,
-0.0791764855,
0.0549162142,
0.4061198235,
-0.0125415204,
-0.1485837102,
-0.3203612566,
0.0150850266,
0.2768238485,
-0.1503450572,
-0.1869739592,
0.20540452,
-0.0979519188,
0.1979707628,
-0.0376971513,
0.2034025192,
0.0888537616,
-0.1313980222,
-0.4153479338,
-0.6202201843,
0.6806564927,
-0.0875428915,
-0.257581085,
0.1290949285,
0.4528821707,
0.2258056402,
-0.3288128078,
-0.4188443422,
0.1203768551,
-0.0474229902,
-0.1599199176,
-0.4025705755,
0.0792969391,
-0.1760822833,
-0.0370615162,
-0.022101786,
0.4593533278,
-0.0893654525,
-0.0929395407,
-0.1606511176,
-0.0436461866
] |
https://github.com/huggingface/datasets/issues/3171 | Raise exceptions instead of using assertions for control flow | Hi all,
I am interested in taking up `fingerprint.py`, `search.py`, `arrow_writer.py` and `metric.py`. Will raise a PR soon! | Motivated by https://github.com/huggingface/transformers/issues/12789 in Transformers, one welcoming change would be replacing assertions with proper exceptions. The only type of assertions we should keep are those used as sanity checks.
Currently, there is a total of 87 files with the `assert` statements (located under `datasets` and `src/datasets`), so when working on this, to manage the PR size, only modify 4-5 files at most before submitting a PR. | 18 | Raise exceptions instead of using assertions for control flow
Motivated by https://github.com/huggingface/transformers/issues/12789 in Transformers, one welcoming change would be replacing assertions with proper exceptions. The only type of assertions we should keep are those used as sanity checks.
Currently, there is a total of 87 files with the `assert` statements (located under `datasets` and `src/datasets`), so when working on this, to manage the PR size, only modify 4-5 files at most before submitting a PR.
Hi all,
I am interested in taking up `fingerprint.py`, `search.py`, `arrow_writer.py` and `metric.py`. Will raise a PR soon! | [
-0.0443977453,
-0.3855044544,
-0.0965588316,
0.0352225304,
0.29737854,
-0.4148050845,
0.1632264405,
0.3058510721,
-0.0634227172,
0.2538894415,
0.2832562923,
-0.1116684303,
-0.0943637714,
0.136702463,
-0.0752318949,
-0.3936465979,
-0.0165454652,
0.0376642868,
0.1048267484,
-0.017815141,
-0.11759267,
0.0227013696,
-0.0550462343,
0.0515682176,
-0.4929392934,
-0.1577432007,
0.0396956764,
0.0080965189,
0.0034156484,
-0.630494833,
0.0225886889,
0.3503120542,
0.0602491274,
0.5564231277,
-0.0001080528,
0.0079950066,
0.3682620227,
0.0435872078,
0.1379039586,
0.4090203047,
0.1559152603,
-0.3093358278,
-0.0101306187,
-0.0623223074,
0.1100679711,
-0.3748117983,
-0.1178031191,
0.4675934017,
0.4955404401,
0.2173319757,
0.2472785115,
0.5136274099,
0.1539318562,
0.0871135965,
0.0833808705,
0.3579886854,
0.034241952,
-0.0697481111,
0.4139144719,
-0.0550203398,
-0.1766920984,
0.1061612591,
0.1114478409,
-0.1337876618,
0.1015221626,
-0.3289579451,
0.1560181975,
-0.2726631463,
0.0224335101,
0.2641468048,
0.0942810848,
-0.1697345823,
-0.5638925433,
-0.4778560996,
-0.0611667037,
-0.2056973875,
0.1154564768,
0.1467807889,
-0.1408530474,
0.1503970176,
-0.2703331709,
-0.1204671636,
-0.2784134746,
-0.297868371,
-0.1625620723,
0.2546881735,
0.108298175,
0.0143198837,
0.2957330346,
-0.0872827694,
0.0597035252,
0.0404074937,
-0.1229626611,
-0.2055558562,
-0.1467741281,
-0.231165573,
0.0545155704,
-0.0060881125,
0.2341569364,
0.1485356838,
-0.2558368146,
0.1095787957,
0.0426648892,
0.0007375095,
0.1723360568,
0.2423827499,
-0.3118132949,
0.329079181,
0.4951612055,
0.1766753644,
0.1809312105,
0.0454657935,
0.0117025552,
-0.2209629864,
-0.0396050848,
0.1572438031,
0.1173070371,
-0.1060322747,
0.3168833256,
-0.104711391,
0.0179520417,
-0.0272594057,
0.1369430125,
0.2252494395,
0.1310707927,
0.560064733,
0.1301067024,
0.0949325785,
-0.0663484707,
-0.0977972299,
-0.2061595172,
-0.0123217683,
-0.1162944809,
-0.082468994,
0.0946942493,
0.1730433255,
0.1480431855,
-0.1594902873,
0.2070920616,
-0.1003185809,
0.333452642,
0.0513904952,
0.2417229563,
0.5240747929,
-0.4533215463,
-0.1798017472,
-0.1476252675,
-0.0629224032,
-0.1961715072,
0.0977963507,
0.0936142504,
-0.4668833017,
0.0961250365,
0.2099662274,
-0.2735570967,
0.0175613966,
0.0716032982,
0.0320130773,
0.0898629278,
-0.082821548,
0.3354220986,
-0.0669294,
0.2312244624,
-0.046611581,
0.1529256999,
0.4079343379,
0.0868158415,
-0.133508876,
0.0848860815,
-0.1842864752,
-0.0591021478,
0.5728431344,
-0.2156319767,
0.1726907492,
-0.1380731016,
-0.2174671292,
0.0260618143,
-0.3545249999,
-0.2374694496,
0.0634919479,
-0.0860262737,
-0.0486668684,
0.3459972143,
-0.0581726097,
-0.0379642025,
-0.3205468655,
-0.2557014525,
0.0453683138,
-0.2663160861,
0.4371152222,
-0.3299966455,
-0.3249100745,
-0.2342133969,
0.0986734703,
0.3672929704,
-0.0286100321,
-0.113925539,
0.0536749698,
0.182750389,
-0.2990558445,
-0.0615344793,
0.0923050866,
0.4559178352,
-0.267409265,
0.0548928678,
0.0565713532,
-0.0579674095,
0.0976718143,
-0.2862745523,
-0.0044918,
0.1395668387,
-0.1986399293,
-0.0761093646,
0.1087931991,
0.1886405498,
-0.33286497,
0.1860736161,
0.0169003289,
-0.019308703,
-0.34139961,
-0.1419968605,
0.0006963675,
-0.0904090777,
0.1742921621,
-0.1268027127,
-0.0385637023,
-0.1558128148,
-0.1023031026,
-0.1272950023,
0.0249137841,
-0.1019631401,
-0.1478794068,
-0.1128214672,
0.2802675962,
-0.0242672097,
0.3148950636,
0.3188638389,
0.5227811337,
0.2761100829,
-0.1469000578,
0.1767624915,
0.0399194956,
-0.1516553313,
0.1605865806,
-0.4779452085,
0.28702268,
-0.0455001295,
0.0885779411,
0.1315407902,
0.0312657207,
0.1154814735,
-0.0815071762,
-0.3221702576,
0.2324202657,
-0.0571844429,
0.2367855608,
0.1814435273,
0.3105851412,
-0.2238205373,
-0.1394129395,
0.1789239496,
-0.2086843997,
0.021678295,
0.4463304281,
-0.0805176124,
-0.0663929433,
0.0977406502,
0.2899338007,
0.0681948662,
0.4081123173,
-0.0460216105,
-0.1513640583,
0.1582056582,
-0.3459095955,
0.2634890676,
0.4897970259,
-0.4019298553,
0.1929727495,
0.3291121423,
0.0588623062,
-0.3166571259,
-0.2629853487,
-0.2980669737,
0.0220819991,
-0.0784925148,
0.0843387991,
0.2250575274,
-0.0297470782,
-0.2395953983,
0.0701972544,
-0.3414028883,
-0.0951561108,
0.1910141855,
-0.0047754403,
-0.4281346798,
0.227288723,
0.0768970028,
0.5166131258,
0.0291042384,
-0.0355405137,
-0.3046264946,
-0.1172071621,
-0.0281945709,
0.101587534,
0.116814144,
-0.1349298954,
0.3720986545,
0.0315627083,
0.1201359257,
-0.1583742052,
-0.5135611296,
0.0486451946,
-0.0515247062,
-0.0456339493,
0.254199326,
0.0600589775,
0.3515124619,
-0.2491204143,
0.0693655238,
-0.2643870413,
-0.0345377736,
0.1015728414,
-0.0001277704,
0.0923431069,
-0.1270198226,
-0.1786590517,
0.0679449663,
-0.6265596151,
0.6084980369,
0.0825434253,
-0.0148922922,
0.5006605387,
0.2274591029,
-0.0092805671,
-0.0891698524,
0.2207548767,
0.2586964667,
-0.1780380607,
0.1302429587,
0.1459484249,
-0.2321414649,
-0.3260359466,
-0.499350071,
-0.211764127,
0.0944417119,
-0.209102273,
-0.4601056874,
-0.3580548763,
0.134769991,
0.1308307052,
0.2584318817,
0.3315146565,
0.183154285,
-0.2706020176,
0.0964177921,
-0.1869488209,
-0.009052258,
0.1687514335,
0.2279996723,
-0.1637892872,
-0.0492808297,
0.1133869588,
0.610294342,
0.2513973415,
-0.0685016736,
0.0528286397,
0.1713783741,
0.1963609457,
-0.008011885,
-0.0962422118,
0.2697041631,
0.1324074119,
-0.1363367885,
0.2553622127,
0.2023972124,
0.3116984665,
0.1688236743,
-0.1872828752,
0.0476685651,
-0.4651320279,
0.410667628,
0.1899305433,
0.4355475903,
-0.1583830267,
-0.1605516672,
-0.3848531842,
0.0981078446,
0.1495102346,
0.0642542318,
0.1323993504,
-0.1041738912,
-0.1038200259,
0.009988497,
-0.4146324396,
0.2636655569,
0.1853378862,
0.2585213184,
0.0629687756,
-0.3203057051,
-0.0478293337,
-0.0788120031,
0.6073736548,
-0.1445450038,
-0.2459796667,
-0.0715072751,
-0.3267132938,
-0.1581570059,
0.0356661752,
-0.3768240511,
-0.1192037687,
0.2721647024,
0.3466722071,
-0.2460339218,
-0.2642558813,
0.0610323511,
0.3059557974,
0.005793354,
-0.0444648713,
-0.1902741641,
-0.2502616644,
-0.5766762495,
0.3801566064,
0.3057875931,
-0.3377216458,
-0.3735041916,
-0.1970401108,
-0.1752643883,
-0.1921394914,
-0.0137676438,
0.2245583087,
0.2673484981,
-0.2640244365,
-0.079910107,
0.0855834484,
-0.2216291577,
0.1762803048,
0.1370501965,
0.0057943105,
-0.2240449488,
-0.0281595662,
0.1013286263,
0.1128596514,
0.4908854365,
0.0296299569,
0.1414691061,
0.1003555283,
0.4088950753,
-0.2690947056,
0.1850171387,
0.1176737025,
0.0635128915,
-0.0588655993,
0.1860515475,
0.2164875567,
0.0793751478,
-0.3224360943,
-0.0360434316,
0.1479614079,
-0.2580573559,
0.4182596803,
0.2420962453,
1.0113248825,
-0.2665324807,
0.1495622844,
-0.0304978695,
-0.1762119979,
0.3552832305,
-0.2880674899,
0.2265229672,
-0.3457238376,
-0.2489533722,
0.0987464637,
-0.1444736868,
0.0851619169,
-0.056249503,
-0.28115201,
0.3116635382,
0.1549003422,
-0.3023742139,
-0.0230708849,
0.6075687408,
-0.1407054067,
-0.3408558071,
-0.2501136065,
0.1229158342,
-0.0962679684,
0.1436043978,
-0.0451251231,
-0.2833032906,
0.1494895369,
-0.4281500578,
-0.2721461356,
-0.3410455585,
0.181396082,
-0.0675251707,
0.5039049387,
-0.0161673464,
0.208082065,
0.1551079005,
0.2386823297,
0.3967489004,
-0.184269771,
0.2077258378,
-0.0455980748,
0.1419782788,
0.014525285,
0.1762020588,
0.1410067827,
-0.0242948309,
-0.2813466191,
-0.1194391176,
-0.1856796294,
-0.1055570915,
-0.0527889244,
-0.1649389118,
0.1805751026,
-0.2052878588,
0.4598188698,
-0.217797637,
-0.6937294006,
-0.1624726951,
0.2109954655,
0.0964960158,
-0.1040018275,
0.2726494968,
0.4524290264,
-0.1826812625,
-0.1175225973,
-0.0472378284,
-0.1425639838,
-0.0665622205,
0.3163192272,
0.0626793504,
-0.0608180016,
-0.3370392323,
-0.0835373253,
-0.1009224355,
-0.5582132339,
0.3913782835,
-0.1262515634,
-0.6605126858,
-0.058215104,
0.3572565317,
0.461488843,
-0.0885616988,
-0.2047758102,
0.0411582179,
-0.7103338838,
0.3008267581,
-0.0465604588,
0.4407311082,
-0.1594686359,
0.1900262535,
-0.0269994456,
0.2317079902,
-0.4133040607,
-0.1295118779,
-0.5326099396,
0.2083062828,
-0.1288099438,
-0.5816577673,
-0.0446722694,
-0.0885264128,
0.1470063329,
0.1098750979,
-0.2483485788,
-0.2379048467,
-0.1115696952,
0.1044413298,
-0.1337516308,
0.0229439884,
0.0844587013,
0.1445631087,
0.1023703143,
-0.2446301132,
0.0778389648,
-0.2172300071,
-0.0320625678,
0.1503267586,
0.0304896347,
-0.017571101,
0.1012709737,
0.0504675955,
0.1531151384,
-0.1702304035,
0.1947637051,
0.1142546088,
-0.0543968156,
-0.2172361761,
0.0941568688,
0.3908752203,
0.2772271633,
0.1822233051,
-0.0162619688,
0.2756612897,
-0.3407362998,
0.2232377231,
0.2769103944,
0.2355146259,
-0.0338461287,
0.0767078325,
0.0347180068,
0.3070338964,
-0.2668850422,
-0.0262864623,
-0.0436601378,
-0.1755573452,
0.1634923667,
0.4167585671,
0.2229529172,
-0.0746906623,
0.3763087392,
0.3224509656,
0.1119105518,
-0.1408208013,
-0.0760095939,
0.0423226058,
-0.2330199182,
-0.1812297255,
0.358872354,
0.0628590286,
0.5064494014,
-0.1567776352,
-0.0143513503,
0.1549506038,
-0.4127446413,
0.0688085109,
0.2155781388,
-0.1622425765,
0.277677536,
-0.3067437112,
0.2794023156,
-0.152140677,
0.2442776412,
0.4124877453,
0.1636728346,
-0.0567991287,
-0.4163874686,
0.1126271412,
-0.037248496,
-0.2183842659,
0.2516571283,
0.0069707124,
0.0108620618,
-0.2237163782,
0.0888684839,
-0.0541818514,
0.2954865992,
0.2201294303,
0.1729469895,
-0.414527148,
0.0557659976,
0.0214823838,
0.4280526936,
-0.2643524408,
0.1401682049,
0.5188357234,
-0.0452886894,
0.065266028,
0.2250044346,
0.4178068638,
-0.0310679339,
-0.3597464859,
0.2751249969,
-0.1742108762,
-0.0324779749,
-0.2174470127,
0.1119410843,
-0.0136709902,
0.4297685623,
-0.1018883884,
0.2193348557,
-0.2326959819,
-0.2007431537,
-0.4309202731,
-0.2791397274,
-0.3539007306,
0.7411791682,
0.3702783883,
-0.4147828221,
-0.1761357188,
-0.0633066818,
-0.2819642425,
0.2156736702,
0.1197954118,
-0.283436209,
0.0350759663,
0.0733457729,
0.0873577744,
-0.1094348207,
0.3174019456,
0.3131228089,
0.3259094954,
-0.1205399707,
0.2423862666,
-0.2529875636,
0.1061084047,
0.0828269124,
-0.017007608,
0.2287526727,
-0.0110841794,
-0.1698821187,
0.0599497333,
0.0377948992,
-0.2491069585,
0.1025385037,
-0.0057204217,
-0.2695890963,
0.2049480081,
0.2181866318,
-0.1443471164,
0.3101382852,
-0.2509966195,
0.2746300399,
0.2834368348,
0.1751217693,
0.0041162889,
0.124813363,
0.2052932829,
0.0267828777,
0.1379810125,
0.2908002436,
0.2861736119,
-0.0973248333,
-0.1808690727,
-0.2584113181,
-0.2207826674,
-0.2012343109,
-0.1931222528,
-0.0077836672,
0.3642384708,
-0.1417987198,
-0.2513371408,
-0.2766987979,
-0.00219005,
0.2006845176,
-0.1463823915,
-0.2194435894,
0.1726411432,
-0.0837836936,
0.1616705358,
0.0000367532,
0.1511992961,
0.0926436111,
-0.1275921464,
-0.3791832626,
-0.4581267834,
0.6410011053,
-0.1339315772,
-0.2239786088,
-0.0209539235,
0.3069752157,
0.1618719399,
-0.3131320477,
-0.4151252806,
0.0454406664,
-0.017650364,
-0.0818285123,
-0.471919924,
0.0592292286,
-0.1570198834,
-0.1018334329,
-0.0328923427,
0.4643989801,
-0.1224674582,
-0.102103889,
-0.1427470446,
-0.0426574461
] |
https://github.com/huggingface/datasets/issues/3168 | OpenSLR/83 is empty | Hi @tyrius02, thanks for reporting. I see you self-assigned this issue: are you working on this? | ## Describe the bug
As the summary says, openslr / SLR83 / train is empty.
The dataset returned after loading indicates there are **zero** rows. The correct number should be **17877**.
## Steps to reproduce the bug
```python
import datasets
datasets.load_dataset('openslr', 'SLR83')
```
## Expected results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 17877
})
})
```
## Actual results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 0
})
})
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.1.dev0 (master HEAD)
- Platform: Ubuntu 20.04
- Python version: 3.7.10
- PyArrow version: 3.0.0
| 16 | OpenSLR/83 is empty
## Describe the bug
As the summary says, openslr / SLR83 / train is empty.
The dataset returned after loading indicates there are **zero** rows. The correct number should be **17877**.
## Steps to reproduce the bug
```python
import datasets
datasets.load_dataset('openslr', 'SLR83')
```
## Expected results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 17877
})
})
```
## Actual results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 0
})
})
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.1.dev0 (master HEAD)
- Platform: Ubuntu 20.04
- Python version: 3.7.10
- PyArrow version: 3.0.0
Hi @tyrius02, thanks for reporting. I see you self-assigned this issue: are you working on this? | [
-0.1339388043,
0.2001884282,
0.0174183473,
0.258898735,
0.1328081936,
0.017364895,
0.5546807051,
0.3825571239,
0.0937651321,
0.307217896,
-0.0423920378,
0.4279454947,
-0.2365683466,
-0.0011826659,
0.0797990113,
-0.0660131574,
0.0724034533,
0.1122319549,
-0.0167127736,
-0.2577759922,
-0.1738887727,
0.1973002106,
-0.4404389858,
0.021987902,
-0.4760673642,
0.2874428928,
-0.1160585284,
0.2264237255,
0.0059465976,
-0.3488579988,
0.2378394455,
-0.2668090165,
0.3661431074,
0.4156530499,
-0.0001074947,
0.0536476485,
0.3103164732,
-0.0600968711,
-0.1963834465,
-0.4586198926,
0.0289963987,
-0.3068403006,
0.3235341609,
-0.2114792019,
0.0451221429,
-0.1022677422,
-0.1241809726,
-0.1516531259,
0.0771078914,
0.4594590962,
0.2310303599,
0.1654522866,
0.0535358675,
0.1133449599,
0.6033673286,
0.0759336203,
-0.0824452862,
0.1355311126,
0.0173619669,
0.0375861824,
0.0198870897,
0.4335466921,
0.0137288701,
-0.1673815101,
0.0966821685,
0.3411176205,
0.1706943214,
-0.1972608715,
-0.0689507127,
0.2826719284,
0.4058533311,
-0.1388435662,
-0.1039383411,
-0.1441077739,
0.0596059076,
-0.5739184618,
0.106569238,
0.4767600298,
-0.098791413,
0.1742700189,
-0.0853631273,
0.1200965047,
-0.1859287471,
0.1602071524,
-0.2754461169,
0.4038647711,
0.1457085609,
-0.0957938507,
0.0738281161,
-0.0166641641,
0.2240304202,
-0.0880390406,
-0.1395944655,
0.2573342621,
-0.5644062161,
0.0697349384,
0.14908126,
-0.2585198283,
-0.1216119826,
0.2926426828,
0.1842295378,
0.1403396279,
0.0259393714,
0.0529413819,
0.2426382303,
0.0207219627,
-0.1661785245,
0.3000274599,
-0.0158982482,
0.0749859735,
-0.0560866296,
-0.1259214431,
-0.3072429299,
-0.163162455,
0.1713112742,
-0.0954253674,
0.449214071,
-0.1971357763,
-0.0599501133,
0.2471513599,
-0.6559749842,
-0.1564710587,
-0.0526029952,
0.310803473,
-0.1164229438,
0.2466605604,
0.3426419795,
0.1338527352,
-0.1245783269,
-0.030073354,
-0.2738962173,
0.1685158014,
-0.283649832,
-0.252035588,
0.2220939845,
-0.0805452988,
0.3566676974,
-0.0334837511,
0.0295622889,
-0.255458951,
0.2281297594,
-0.061558798,
0.0152513823,
0.315449208,
0.0930811912,
0.041794382,
0.0006743086,
-0.0599934831,
0.0517237373,
0.535584271,
-0.3183783293,
-0.4038655758,
-0.478749305,
0.3025413156,
-0.144967109,
-0.0422838368,
-0.0102682281,
0.1338717192,
-0.190815106,
-0.0412605554,
-0.0046464424,
-0.1308536977,
0.0377218723,
-0.0340349004,
0.4729414582,
0.1463143378,
-0.3379407823,
-0.0438947603,
0.0537976958,
-0.1157377139,
0.1803105175,
-0.1854585111,
-0.1455039084,
-0.0379160903,
-0.091887854,
0.2157678604,
0.6409290433,
-0.0579960011,
-0.2828886509,
-0.0431315526,
0.0303226337,
-0.2189030796,
0.0447633676,
0.0824391097,
-0.1834605187,
0.2904073,
0.1808482707,
0.1220065206,
0.1158018187,
-0.0327714533,
-0.5234894156,
0.0889063925,
-0.1801309139,
0.4005850852,
0.2021247298,
-0.1826082319,
-0.1839063317,
0.093083933,
0.4510379136,
-0.0740569681,
0.0088869333,
0.3758171201,
0.5334427953,
0.2720798552,
0.0922183767,
-0.1599159092,
-0.2967679501,
0.0891456008,
-0.0696033761,
0.1586755067,
0.1494921148,
-0.0342311487,
-0.2316954136,
0.0656535029,
-0.1902726144,
-0.113239795,
0.1874236614,
-0.0486590117,
-0.1088249683,
0.0890155733,
-0.4337842464,
-0.1367289722,
-0.2332295775,
0.1486928761,
-0.2778756022,
0.6138695478,
-0.1640327126,
-0.2482626438,
-0.018156141,
0.2350119799,
0.1213506088,
0.0486228913,
0.0487717874,
0.2549420893,
0.2513913512,
-0.1970448047,
-0.1492141634,
0.1104451865,
0.0230974667,
-0.2163978219,
-0.0881142318,
0.2661982477,
0.1640075594,
0.2087933719,
-0.1997849196,
0.1223826855,
-0.2782675326,
0.0775692686,
-0.0329448842,
-0.0419263281,
-0.0520545356,
-0.2706237733,
-0.1542709321,
-0.0607362576,
0.1095288694,
-0.1135196164,
0.2369916141,
0.28132689,
-0.3355120718,
0.0058805281,
0.2374138534,
-0.0671864748,
-0.014437953,
0.1366143674,
-0.4012348354,
-0.1870546937,
-0.0853122994,
-0.0608348623,
0.0910429433,
0.3117312193,
0.1081929356,
0.1866482794,
0.012450601,
-0.0989650637,
0.2762883902,
0.2483089417,
0.2068841904,
0.2672984004,
0.2692834735,
0.0784998536,
-0.178847596,
-0.2592968047,
0.040220391,
0.34268713,
-0.2969507575,
-0.0476474799,
-0.1959914863,
-0.0042326502,
-0.2478990406,
-0.2674124837,
-0.0806677043,
-0.2428773493,
0.0097339731,
-0.1212825552,
-0.3213606775,
0.1964371204,
-0.4679151475,
-0.0790943578,
0.1946041733,
0.1737372726,
0.1649576873,
-0.1275922805,
-0.2993332446,
0.0611209199,
0.0027667927,
0.0047941869,
-0.04870902,
-0.0640508085,
-0.1444778293,
-0.0969193205,
-0.3034471869,
0.1520527154,
0.1732317507,
-0.1043752804,
0.1292592436,
0.0205276832,
-0.3482246697,
-0.1586633325,
0.2710628211,
0.103601262,
-0.2716562748,
0.1809126586,
0.1850718111,
0.277718842,
-0.2404683083,
-0.5770917535,
-0.2284033746,
-0.3522010744,
-0.1730074137,
-0.0516339652,
0.124783881,
0.0928279087,
0.2071870416,
0.152616486,
-0.1643398702,
-0.1665128022,
-0.15651007,
-0.0894433856,
0.1864396185,
0.015426347,
-0.4444541633,
0.0937251523,
-0.1993379742,
-0.1444307417,
-0.0663013458,
-0.5485386848,
-0.2253894806,
0.0493239947,
0.3191425502,
-0.2963667214,
0.0554981939,
0.4496924877,
0.2543042004,
-0.1806270927,
-0.1611900032,
-0.0690423101,
0.0841890275,
-0.145324558,
0.1837122738,
-0.2252480835,
0.4837568402,
-0.0801647753,
0.4129229188,
0.1188938096,
-0.065508537,
0.3645164669,
-0.1454741657,
0.1753113419,
-0.1935377419,
-0.0396238863,
0.2334944904,
0.2106539756,
-0.1275419444,
0.4347265065,
0.0488067418,
-0.384380877,
-0.3162874877,
-0.0252112448,
-0.3508852422,
-0.0544814356,
0.2570537627,
-0.2574639022,
0.2944013178,
-0.0075312965,
-0.0170900933,
-0.0698393807,
-0.0889570564,
-0.0831492394,
-0.0481834449,
0.3863279819,
-0.0887237191,
-0.7050943375,
0.0885203779,
-0.3338837922,
0.1375962943,
-0.0659834743,
0.0192700438,
0.2054051161,
-0.2812444568,
0.1267161667,
0.071157515,
0.3730987906,
0.2018983662,
-0.1225201786,
0.3070759177,
0.0879216343,
-0.6108294129,
-0.2180544436,
-0.3637625873,
-0.2161747664,
0.2764780819,
0.2109548002,
-0.2807983458,
0.0441619381,
0.4567645192,
0.1851132214,
-0.3051428497,
-0.2491542101,
-0.4178479314,
-0.2098769993,
0.0603929758,
-0.1891128272,
-0.0416048132,
0.3160150647,
0.041911982,
-0.0619505048,
0.0235499199,
-0.0918968022,
0.0806604847,
-0.0585488454,
0.6684871316,
0.0525403135,
0.2374447137,
-0.0975896046,
0.6027773619,
0.1779538989,
0.5340799689,
0.0212905034,
-0.2752130032,
0.4647149742,
-0.2213409096,
0.5563144684,
0.1469746977,
-0.0284980386,
-0.0736651346,
-0.20711115,
0.1159900352,
-0.0317741483,
0.2287738174,
0.2249346524,
0.1230929717,
-0.0570314378,
-0.3850526214,
0.3508039713,
-0.1505913436,
0.0345577002,
-0.1865054965,
0.0813057274,
-0.0098129986,
0.5043545961,
-0.0544158444,
0.8699215055,
0.2525631189,
0.1296945363,
0.5160880089,
-0.0783448443,
0.3966167271,
-0.1794235259,
0.1402628422,
-0.224984616,
-0.2410422862,
0.1249300689,
-0.0961485207,
-0.3748437762,
0.1970552951,
0.0236636866,
0.0429307669,
-0.1642245799,
-0.3732396066,
0.1146208569,
-0.0715590194,
0.2902406156,
0.1246833205,
-0.3875062764,
0.1446236223,
-0.0143513652,
0.1391993612,
-0.0303353854,
0.0025697821,
-0.2166240215,
-0.0729961619,
-0.0746023431,
0.0898410752,
0.2243230939,
0.029903993,
0.2522994578,
-0.542057693,
-0.2036827654,
0.3212460279,
0.0920327827,
0.1709067076,
-0.0296113864,
0.2037828565,
-0.0033156581,
0.0381105728,
0.1537021399,
0.2359650582,
0.3650446832,
-0.2534211874,
-0.5374720693,
0.2051092386,
-0.085482493,
-0.179049775,
-0.1206911653,
0.0102411155,
0.2779350281,
-0.2599301636,
-0.3199657202,
0.0886694118,
0.2001203597,
-0.0906149074,
0.1939166486,
0.1725212932,
-0.1972599477,
-0.0615778156,
0.2497116327,
-0.3345030546,
-0.1706121713,
0.261593461,
-0.009927921,
0.0115365088,
0.6263628602,
0.3048186302,
0.1138104424,
-0.0573306195,
0.2169340253,
0.354506284,
-0.4218733013,
-0.0572538823,
0.1778565496,
0.1234298125,
-0.0238033514,
0.4008074403,
0.110227488,
0.1382635236,
0.0422769673,
-0.2888280749,
-0.1656287909,
0.2786658108,
0.0264979117,
0.140627265,
-0.1634777784,
0.1653704643,
0.0789266229,
-0.2936406136,
-0.3780040145,
0.157817319,
-0.4996348321,
0.2092612684,
-0.1289955676,
-0.229316622,
-0.1392999589,
-0.1684316993,
0.2580505013,
-0.0716342479,
0.0307497121,
-0.2834231257,
-0.2071069777,
0.0838271901,
-0.0699018091,
0.1001689062,
-0.0701455846,
0.0242948346,
-0.2761246264,
-0.0349329412,
-0.0590036102,
0.2952869534,
-0.0503293984,
0.4099067748,
-0.1091875955,
-0.023852421,
-0.2748962045,
-0.0143691991,
-0.0313665345,
0.038833309,
0.2306599766,
0.0735622942,
0.2190451473,
0.1327542812,
-0.1965788156,
-0.1206741184,
-0.3127219975,
-0.0317681208,
0.3669852018,
-0.3305593431,
0.0249462649,
0.0452428721,
0.3551187813,
-0.0282252673,
-0.2909775078,
0.1919660717,
0.1045279503,
0.3707532287,
-0.5406675339,
0.1997796595,
-0.0584689453,
0.2924011946,
0.0813462287,
0.0413839072,
-0.0916701257,
-0.102972813,
-0.0979983509,
0.2657757699,
0.2057418078,
0.2339354455,
0.0648842677,
0.2098547816,
-0.1162830889,
0.0842755437,
0.174554497,
-0.0126900505,
0.0378077216,
0.2237230986,
-0.0570083857,
0.2242854387,
0.043679025,
0.0061322735,
-0.0326644741,
-0.2367258966,
-0.1581688225,
0.2418938279,
0.0196759887,
-0.0900764093,
-0.3098622561,
0.2316182256,
0.0054090694,
-0.0196499303,
-0.08513771,
0.073345013,
-0.3143785894,
-0.1592352986,
-0.1573646218,
-0.369307518,
-0.1420220286,
0.131246984,
0.0899140537,
0.0987875089,
0.0583266877,
0.228506282,
-0.2840850353,
-0.1004560813,
0.0573663972,
0.4649226069,
0.1513915807,
-0.0501932539,
0.3065207303,
0.1856697798,
-0.1163162366,
0.3400940895,
0.3183227777,
0.2785373032,
0.1864880323,
0.0471889265,
0.0107923159,
0.1067423299,
-0.1465320885,
-0.2810123563,
0.1432180405,
0.4898516536,
0.1977338046,
0.2552704513,
0.1238438934,
-0.3000180721,
0.4082797468,
-0.1664511859,
0.3876680732,
-0.3575164676,
0.0919261724,
-0.2274553776,
-0.3494318426,
-0.3155229986,
-0.0814596787,
-0.4051159024,
-0.1550774127,
-0.0128565365,
0.5297571421,
-0.0214015543,
-0.1813480109,
0.1142605096,
-0.1421098262,
0.0799019039,
0.2691429555,
0.1682098359,
-0.1119397283,
-0.3638460636,
-0.5836986303,
0.4237600863,
-0.1563048959,
-0.1851036251,
0.1391365677,
0.1053395048,
0.1696129739,
0.1669814438,
0.1046329886,
0.2288789153,
-0.2640869319,
0.1561747938,
-0.7113509774,
-0.0561100096,
-0.0203808174,
0.1484711915,
-0.10285189,
-0.0424738787,
-0.1211516187,
-0.258923322,
0.0856997222,
-0.0131257232,
-0.2541755438,
-0.1112816185,
0.6376362443,
0.3499657214,
0.0163693558,
0.3238919079,
0.0017785991,
-0.0080982484,
-0.2060843557,
-0.2239812613,
0.0030911376,
-0.0024579044,
0.0857144222,
0.4393561482,
-0.0641813129,
0.0395004712,
-0.0100338673,
0.2819488347,
0.1502378583,
-0.4168232679,
-0.2518942654,
0.0538557284,
0.0116529632,
-0.046551507,
0.2200766951,
0.1817808598,
0.0241411813,
-0.3224003315,
-0.2291493714,
-0.4776782095,
0.3863219619,
-0.2944084704,
-0.0317505673,
-0.3762550354,
0.2047836185,
0.2285259217,
0.1129248068,
-0.5863263607,
-0.0954918712,
0.3993440866,
0.0686905831,
-0.2331358641,
0.0058318875,
-0.1187387109,
0.1329295188,
-0.1469563246,
0.1681535393,
-0.0012694836,
-0.0489569195,
-0.1926023364,
-0.2605396807
] |
https://github.com/huggingface/datasets/issues/3168 | OpenSLR/83 is empty | @albertvillanova Yes. Figured I introduced the broken config, I should fix it too.
I've got it working, but I'm struggling with one of the tests. I've started a PR so I/we can work through it. | ## Describe the bug
As the summary says, openslr / SLR83 / train is empty.
The dataset returned after loading indicates there are **zero** rows. The correct number should be **17877**.
## Steps to reproduce the bug
```python
import datasets
datasets.load_dataset('openslr', 'SLR83')
```
## Expected results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 17877
})
})
```
## Actual results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 0
})
})
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.1.dev0 (master HEAD)
- Platform: Ubuntu 20.04
- Python version: 3.7.10
- PyArrow version: 3.0.0
| 35 | OpenSLR/83 is empty
## Describe the bug
As the summary says, openslr / SLR83 / train is empty.
The dataset returned after loading indicates there are **zero** rows. The correct number should be **17877**.
## Steps to reproduce the bug
```python
import datasets
datasets.load_dataset('openslr', 'SLR83')
```
## Expected results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 17877
})
})
```
## Actual results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 0
})
})
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.1.dev0 (master HEAD)
- Platform: Ubuntu 20.04
- Python version: 3.7.10
- PyArrow version: 3.0.0
@albertvillanova Yes. Figured I introduced the broken config, I should fix it too.
I've got it working, but I'm struggling with one of the tests. I've started a PR so I/we can work through it. | [
-0.1568451226,
0.2141989321,
0.0209850185,
0.1403115988,
0.0730733871,
0.0183356907,
0.5944601893,
0.3523910344,
0.0033563382,
0.3104201257,
-0.045072481,
0.448433876,
-0.2578974366,
-0.0301667042,
0.1375690848,
-0.0961025357,
-0.0060506798,
0.0827716142,
0.0191130154,
-0.1254899353,
-0.055142235,
0.2063517421,
-0.4690295458,
0.0220345631,
-0.4346091151,
0.2421405315,
-0.1725272685,
0.3131183088,
-0.0221364908,
-0.3519022465,
0.2862102091,
-0.1248323321,
0.2362108529,
0.4545160234,
-0.0001104343,
0.0034860987,
0.2620074153,
-0.1164918169,
-0.1437569112,
-0.4131570756,
0.0207842626,
-0.2008882463,
0.2101062387,
-0.1739597768,
0.0189442821,
-0.0867541432,
-0.0959005058,
-0.162803188,
0.023003431,
0.5688340664,
0.231691584,
0.0822274983,
-0.0853246152,
0.0763187781,
0.5472075343,
0.0262463391,
-0.0918665603,
0.1634268165,
0.0464025363,
0.0460078008,
-0.0516173244,
0.3484646678,
0.110455893,
-0.1948036104,
0.083108075,
0.2511089146,
0.1065528318,
-0.1684634686,
-0.0629886016,
0.3428394794,
0.4441435635,
-0.1704286486,
0.0197468419,
-0.0970734656,
-0.0420107581,
-0.5773848891,
0.2186027914,
0.411806047,
-0.173260361,
0.2056845427,
-0.170251295,
0.0669498295,
-0.2027829587,
0.1311840862,
-0.3118171394,
0.4362318814,
0.1754403114,
-0.0496759005,
-0.0126641765,
0.0217026249,
0.2182157338,
0.0153330853,
-0.1672088951,
0.1618652791,
-0.4607425034,
0.0436127968,
0.1665533185,
-0.2993114591,
0.007736051,
0.3622416556,
0.1533004791,
0.2131899148,
0.0796002373,
0.0242299791,
0.1440683454,
0.1406219006,
-0.0973776728,
0.3297518492,
0.0602124184,
0.167062372,
-0.1028519943,
-0.0692824125,
-0.1560205668,
-0.2391717136,
0.1717100739,
-0.1483728588,
0.4250088036,
-0.2916496694,
-0.0226010755,
0.3207534254,
-0.7333283424,
-0.2085696757,
0.041836191,
0.3943012655,
-0.0302622411,
0.1575323492,
0.354724288,
0.1106122732,
-0.0949280113,
0.0188653301,
-0.2488435954,
0.1606016308,
-0.3191125393,
-0.1174865738,
0.2514288425,
-0.0112316543,
0.4034105837,
0.007162293,
0.1082837433,
-0.2619526684,
0.1786150187,
0.0393252671,
0.1640255004,
0.3061603606,
0.0816775262,
0.0187411215,
-0.0349817537,
-0.1299078763,
-0.0671310946,
0.5487005115,
-0.1989324242,
-0.460278064,
-0.3494588435,
0.2693582773,
-0.2752462626,
-0.0409653038,
0.1600640118,
0.2222570777,
-0.1945381165,
-0.1590831876,
0.104862459,
-0.1712193042,
0.0611780807,
-0.012225016,
0.5107559562,
0.2129991949,
-0.4450283349,
-0.03430425,
0.0826091617,
-0.1180131286,
0.1861815304,
-0.2786502838,
-0.1855434924,
-0.0693745762,
-0.1296378672,
0.2848110497,
0.6046305895,
-0.0272111222,
-0.2623451948,
-0.0930930525,
0.0664841458,
-0.1538750082,
0.1292830557,
-0.0500069186,
-0.2169787288,
0.2736027241,
0.1621687114,
0.0655628219,
0.1275233626,
-0.0685360134,
-0.5634008646,
0.1247613207,
-0.1316379756,
0.3755119145,
0.192242071,
-0.2583568096,
-0.255153805,
0.0170189776,
0.4577567875,
-0.1036162153,
0.0002067434,
0.317704618,
0.4852630794,
0.1406686157,
0.1193737686,
-0.2021428794,
-0.2203890979,
0.1857482791,
-0.0520236902,
0.1983445585,
0.1859025955,
0.0303052049,
-0.3447428942,
-0.0311411247,
-0.1949786842,
-0.2810636759,
0.1663094908,
-0.0133531215,
-0.1143968552,
0.0633390397,
-0.4121442139,
-0.1541109085,
-0.1639773548,
0.0923456326,
-0.2960422039,
0.5750032663,
-0.2206254601,
-0.2212437391,
-0.0712844431,
0.1595846862,
0.14703013,
-0.0741636604,
-0.0020110575,
0.3785511851,
0.2772450447,
-0.2444415987,
-0.1817684621,
0.1182880998,
-0.035462793,
-0.269669801,
-0.1232201308,
0.2113936245,
-0.0139524126,
0.1597257555,
-0.330529958,
0.1282015741,
-0.2725757957,
0.015524026,
-0.0556964874,
0.0675526261,
-0.026383888,
-0.3160971999,
-0.2955903709,
0.0268900506,
0.260096401,
-0.1817892045,
0.1600393057,
0.2494851202,
-0.4335921109,
0.0250240043,
0.1282612085,
-0.1692826301,
-0.0819192007,
0.1794504076,
-0.2533236146,
-0.1926258653,
0.057939034,
-0.0359149985,
0.2306144387,
0.2330008298,
0.1541511118,
0.229279235,
-0.1618449092,
-0.1334416419,
0.2989396751,
0.1558242589,
0.1511809528,
0.2123208642,
0.3265411556,
-0.0344206728,
-0.199788928,
-0.3020076156,
0.1250599474,
0.3506495357,
-0.4532339871,
0.079737395,
-0.2263198793,
0.0497807711,
-0.229931131,
-0.2922961712,
-0.0776504353,
-0.2360896319,
0.0945277289,
-0.2049357146,
-0.3008963764,
0.3433869183,
-0.4679916501,
0.0361761674,
0.0664750114,
-0.0485427789,
0.0584608242,
-0.0691926703,
-0.3574982285,
0.0682071373,
0.093404226,
0.1109592617,
-0.0710598677,
-0.0489244461,
-0.3013365567,
-0.0116933808,
-0.3397715092,
0.1905394793,
0.1958894879,
0.0748689771,
0.2320014238,
-0.0756314024,
-0.3451835215,
-0.1811340749,
0.2326821089,
0.0556210876,
-0.1686218828,
0.1900547892,
0.2025763243,
0.2235406935,
-0.2981685698,
-0.7358247042,
-0.0835143924,
-0.2988348901,
-0.1099709347,
0.0444575064,
0.1060426757,
0.1598909348,
0.2625294626,
0.1031517684,
-0.1157517657,
-0.1669293493,
-0.0847300217,
-0.0998397619,
0.1924602836,
0.0032732864,
-0.4475878775,
0.0246821605,
-0.13322258,
-0.1264565587,
-0.0727251321,
-0.5308625102,
-0.2481408715,
0.0453302301,
0.3881906271,
-0.2746551931,
0.027531933,
0.4329114258,
0.2549389303,
-0.1259388775,
-0.1798004061,
-0.1629787385,
0.2032188028,
-0.1153919697,
0.2663808465,
-0.2387561798,
0.3352683187,
-0.1379170567,
0.4194203019,
0.06560608,
-0.0387126021,
0.3184998333,
-0.1700619906,
0.2415520102,
-0.1519421786,
-0.0572238117,
0.3568343222,
0.1942135245,
-0.2459608465,
0.3671650589,
0.027076833,
-0.4586128891,
-0.3062098026,
0.0973238274,
-0.2090681046,
-0.1137107983,
0.2907154858,
-0.2912659943,
0.2077812105,
-0.0108766034,
0.0424736217,
-0.0500139222,
-0.0638336092,
-0.0738613084,
-0.0407149605,
0.2832117379,
-0.105158709,
-0.7387886643,
0.1015662625,
-0.3533819616,
0.0712948665,
-0.1383586228,
0.1554020941,
0.1039832756,
-0.3066003323,
0.0548889972,
0.0046327109,
0.4794431031,
0.1136780903,
-0.105934836,
0.416687727,
0.2712371051,
-0.5592471957,
-0.2729304135,
-0.3912870586,
-0.2465899587,
0.3465797603,
0.2052519917,
-0.2240796238,
0.035925854,
0.5008484125,
0.171031028,
-0.2539214194,
-0.2176224291,
-0.3787896633,
-0.3141462505,
0.072684586,
-0.14515616,
-0.0783208385,
0.2830159962,
-0.0834735408,
0.0509020761,
0.152622357,
-0.0971700996,
0.0893938094,
0.0601984113,
0.6014453173,
-0.0129019432,
0.1742386669,
0.0173519291,
0.5290361643,
0.1471619755,
0.4832043946,
0.0050741369,
-0.0730939433,
0.4774482548,
-0.147456497,
0.5721361041,
0.1972861439,
-0.1076642945,
-0.1274814159,
-0.2607446015,
0.1377267689,
-0.0072216745,
0.2824299634,
0.2685351968,
0.1277612448,
0.0032795512,
-0.3666801453,
0.3285636008,
-0.1818142831,
-0.0161499716,
-0.0527210981,
0.0562965162,
-0.0619255863,
0.5904881358,
-0.0546540916,
0.9308374524,
0.3448820412,
0.1239355505,
0.5412999988,
-0.116245985,
0.3279815912,
-0.2467273325,
0.0945886821,
-0.2177570611,
-0.1910965294,
0.1611734927,
-0.1961029172,
-0.3264000714,
0.0808638781,
-0.2855132818,
0.0462409444,
-0.1056930944,
-0.4230293632,
0.1991157681,
-0.0729898587,
0.2359696776,
0.1561646312,
-0.4605118632,
0.1274312437,
0.1141126826,
0.1044240966,
-0.0081538623,
0.0245776568,
-0.3501657546,
-0.1358259767,
-0.193753764,
0.0769364983,
0.1782174855,
-0.0988560542,
0.2998074293,
-0.4892733097,
-0.0645724982,
0.3504226506,
0.0287456773,
0.1919623017,
-0.0978495553,
0.2872716486,
0.0380902588,
0.0107719759,
0.3400374949,
0.1385825276,
0.3777313828,
-0.2285942733,
-0.5739747286,
0.1921324581,
-0.1283860058,
-0.1435664743,
-0.0581298731,
-0.0803959072,
0.3278820813,
-0.2840147018,
-0.242729798,
0.1252922714,
0.1666213721,
-0.1228749231,
0.1740585715,
0.1152083576,
-0.2323784679,
0.0807949379,
0.157549724,
-0.2677024901,
-0.2057446986,
0.152625367,
-0.20364739,
0.0795835853,
0.5646325946,
0.3632693589,
0.274528116,
-0.0659566075,
0.280932188,
0.3483590186,
-0.3587741554,
-0.1023396924,
0.0000076188,
0.0413049906,
-0.0544511005,
0.4352994263,
0.1917094886,
0.1992441714,
0.0768280551,
-0.2530364692,
-0.127478689,
0.2091284841,
0.1251889318,
0.2489116043,
-0.2657614946,
0.2253690809,
0.0861016363,
-0.1890547574,
-0.3687377274,
0.1194351986,
-0.555911839,
0.1750762314,
-0.1983960122,
-0.1903811693,
-0.0561366156,
-0.3338511288,
0.2242879421,
-0.1753472686,
0.0122276517,
-0.2570392787,
-0.2607328296,
0.1036000624,
-0.0358493179,
0.0142906485,
-0.0331497155,
0.0481211878,
-0.213088125,
-0.0536462292,
-0.1169907376,
0.2358833998,
-0.0616377406,
0.3656545579,
-0.0559674986,
-0.1184175834,
-0.3036808074,
-0.1076707467,
0.0235291533,
0.026265759,
0.2504067719,
0.1743715405,
0.130857408,
0.0502827093,
-0.1204737052,
-0.0032794324,
-0.3334333599,
-0.036075592,
0.2977391481,
-0.313075304,
0.028765941,
-0.085314773,
0.4384248853,
0.1890361905,
-0.33984074,
0.2234614193,
0.1306527108,
0.3623333275,
-0.4818335176,
0.2235651612,
0.0019422518,
0.3215254545,
0.1543459445,
0.0692034587,
-0.0780226663,
-0.2296018153,
-0.0796270967,
0.291898787,
0.0941771045,
0.2059189826,
0.0845033005,
0.2360009253,
-0.240269348,
0.1138155386,
0.2286065221,
-0.0949161574,
0.0822943598,
0.1143127978,
0.021094393,
0.2234498262,
0.0108439289,
0.0718149841,
-0.0466044024,
-0.1371821165,
-0.0392290354,
0.1852082461,
0.0323176198,
-0.0651339889,
-0.2659595311,
0.3931028247,
-0.1370795667,
-0.0527436025,
-0.0311662108,
0.028328171,
-0.1663507372,
-0.2313056886,
-0.2433270514,
-0.388651967,
-0.108387053,
0.0803081915,
0.1253539771,
0.0889309496,
0.0585350916,
0.2125672996,
-0.3525037169,
-0.088067852,
0.125480324,
0.3344154954,
0.1616199911,
-0.062420819,
0.3459492922,
0.1367943585,
-0.1891451478,
0.3739602566,
0.2940198183,
0.351356715,
0.1130689979,
0.0791102052,
-0.0094719417,
0.1349829286,
-0.1376997381,
-0.1555068046,
0.1612737477,
0.5243416429,
0.0983869284,
0.3153502047,
0.1251286119,
-0.2771086395,
0.4177520573,
-0.1030166075,
0.304004848,
-0.3420866132,
0.065420039,
-0.1741984934,
-0.3094543219,
-0.2013190538,
-0.1549149454,
-0.341042757,
-0.0581501722,
-0.0212771855,
0.5784317255,
0.0652207807,
-0.0970311165,
0.0994373634,
-0.0425703675,
0.1523070037,
0.1029140279,
0.1956371367,
-0.1742383093,
-0.3588069081,
-0.5972592831,
0.3725171983,
-0.1375806481,
-0.2177529186,
0.2471142411,
0.1597088575,
0.2596271634,
0.0708473101,
0.0748757124,
0.2484920323,
-0.2026291788,
0.2393212616,
-0.6610538363,
-0.1631513089,
0.0235432331,
0.2086689919,
-0.1559217274,
0.0259225592,
-0.0320285447,
-0.2379164547,
0.0404843427,
0.0085611232,
-0.2661541402,
0.0180320069,
0.5825669765,
0.3343092203,
0.0562285185,
0.4134881198,
0.0457727015,
-0.0050891936,
-0.3514317572,
-0.182448864,
-0.0402783565,
-0.1361747533,
0.0211207494,
0.3827988505,
-0.0167654958,
0.0294703282,
-0.0555581078,
0.3263097703,
0.2405085862,
-0.3899233639,
-0.1384199262,
0.0045548487,
0.0441998653,
-0.0374203883,
0.2153268754,
0.2510307431,
-0.1213142872,
-0.1979187131,
-0.2946362495,
-0.4573611915,
0.5006623864,
-0.2167374492,
-0.032519836,
-0.2728654146,
0.1935394704,
0.1501867175,
0.064110674,
-0.5490078926,
-0.1619786471,
0.3611814678,
0.0237876531,
-0.339564234,
0.0119511979,
-0.0309847724,
0.1498902142,
-0.1350857466,
0.3005437851,
0.0116166687,
-0.0919639617,
-0.2556391954,
-0.2147548348
] |
https://github.com/huggingface/datasets/issues/3167 | bookcorpusopen no longer works | I tried with the latest changes from #3280 on google colab and it worked fine :)
We'll do a new release soon, in the meantime you can use the updated version with:
```python
load_dataset("bookcorpusopen", revision="master")
``` | ## Describe the bug
When using the latest version of datasets (1.14.0), I cannot use the `bookcorpusopen` dataset. The process blocks always around `9924 examples [00:06, 1439.61 examples/s]` when preparing the dataset. I also noticed that after half an hour the process is automatically killed because of the RAM usage (the machine has 1TB of RAM...).
This did not happen with 1.4.1.
I tried also `rm -rf ~/.cache/huggingface` but did not help.
Changing python version between 3.7, 3.8 and 3.9 did not help too.
## Steps to reproduce the bug
```python
import datasets
d = datasets.load_dataset('bookcorpusopen')
```
## Expected results
A clear and concise description of the expected results.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Linux-5.4.0-1054-aws-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 4.0.1
| 36 | bookcorpusopen no longer works
## Describe the bug
When using the latest version of datasets (1.14.0), I cannot use the `bookcorpusopen` dataset. The process blocks always around `9924 examples [00:06, 1439.61 examples/s]` when preparing the dataset. I also noticed that after half an hour the process is automatically killed because of the RAM usage (the machine has 1TB of RAM...).
This did not happen with 1.4.1.
I tried also `rm -rf ~/.cache/huggingface` but did not help.
Changing python version between 3.7, 3.8 and 3.9 did not help too.
## Steps to reproduce the bug
```python
import datasets
d = datasets.load_dataset('bookcorpusopen')
```
## Expected results
A clear and concise description of the expected results.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Linux-5.4.0-1054-aws-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 4.0.1
I tried with the latest changes from #3280 on google colab and it worked fine :)
We'll do a new release soon, in the meantime you can use the updated version with:
```python
load_dataset("bookcorpusopen", revision="master")
``` | [
-0.3898615241,
0.012308158,
0.0758037195,
0.2028924674,
-0.0502228588,
-0.2223530412,
0.3556592166,
0.0869098082,
-0.2748003304,
0.1474598199,
-0.1287825257,
0.3929781318,
0.1643617898,
0.3723466694,
-0.0846742988,
-0.0717373639,
0.1279461384,
-0.0915142745,
0.0168371294,
0.2605870664,
-0.4226180911,
0.2889654338,
-0.3729498684,
-0.0984444171,
0.0025998701,
-0.0406943709,
-0.1569521129,
-0.0270468574,
-0.0629281029,
-0.3901459277,
0.4275419712,
0.2666737437,
0.1095137075,
0.712531805,
-0.0001237809,
-0.0293114781,
0.5024095178,
0.1239168644,
-0.6058192849,
-0.1059754938,
0.005656498,
-0.1608943194,
0.2945018411,
-0.1363802403,
-0.2217489332,
0.0814672932,
0.2588740289,
-0.0959240869,
0.1095858663,
0.2762275338,
0.1497516036,
0.3037847579,
0.3654174209,
-0.0995596126,
0.1748425514,
0.0361379907,
-0.4197974801,
0.059890192,
0.5224893689,
-0.0301381145,
0.096515432,
0.2241009474,
-0.0849929675,
0.0193078853,
0.2831938863,
-0.043869555,
0.0229160767,
-0.2325595319,
0.3575327098,
0.1055824086,
0.4983661175,
-0.4020626247,
-0.3352242112,
-0.1355644315,
0.0099448748,
-0.4120332003,
0.1868991405,
0.2354364395,
-0.0684515759,
0.0731016323,
-0.3529762626,
-0.2871639431,
-0.0812139139,
0.2736917436,
0.0547116622,
0.2628898919,
-0.1975138783,
0.1978099942,
0.4899698794,
0.0308899432,
0.0140868267,
-0.049447123,
-0.1924459934,
0.2122743279,
-0.2705288529,
0.0548213869,
0.0120825209,
0.7047142386,
0.0356014185,
0.0831114203,
-0.0876436457,
0.1190223321,
0.0673820153,
0.0860988572,
0.3255115151,
-0.003462204,
0.1700452715,
0.0367152393,
0.4299222231,
0.7873383164,
0.0970113203,
-0.1208445951,
0.1579384953,
-0.1742529571,
0.136873886,
-0.3688420057,
0.2958274484,
-0.3816062212,
-0.1234824955,
0.2389941514,
-0.1276119649,
0.056441009,
0.0590961725,
0.3074043989,
-0.186619848,
-0.0186881851,
0.4500317276,
-0.1632381529,
-0.3314072192,
-0.1563637704,
-0.0137921572,
-0.0420246571,
-0.3018779159,
0.1211763695,
0.3291480541,
-0.3234836161,
0.2096004635,
0.1153365076,
-0.1089196652,
-0.1550568938,
0.2256599963,
-0.3327972591,
-0.1405168325,
0.2691766918,
-0.0593974628,
-0.0297668092,
-0.2764540017,
-0.2034547776,
-0.0786502808,
0.1743634492,
-0.0944892988,
-0.0792353898,
-0.292204529,
0.0038322762,
-0.0831090957,
0.0486025512,
-0.5156856775,
0.1115797162,
0.277782768,
-0.1828790456,
0.0679194555,
-0.2762611806,
-0.3309890628,
0.1120122969,
0.2938705683,
0.4954010248,
-0.2247088999,
-0.1978330016,
-0.5663156509,
0.1634204537,
0.119192183,
0.1255793273,
-0.1353576481,
0.0134815704,
-0.0521792695,
-0.3361288011,
-0.1484714597,
-0.0743003041,
-0.4862655401,
0.1870547086,
0.234286949,
0.2743133605,
-0.3590203524,
-0.0846103951,
-0.2000622898,
-0.0004053483,
0.244402498,
-0.0915732831,
0.0828425735,
-0.1844210625,
-0.3587606251,
-0.4910703003,
-0.0506533347,
0.3410351276,
0.2920820117,
0.027358491,
-0.0832761973,
-0.0576469488,
0.2841835022,
-0.0754767135,
0.1077874675,
0.4884558916,
0.4227891862,
-0.0821871758,
0.2850293517,
-0.2369249314,
-0.2888115942,
0.2824302018,
0.0063421233,
0.2739983797,
-0.0862052813,
-0.126088962,
-0.1685447693,
-0.0836990401,
0.040624775,
-0.1362916082,
-0.1154955775,
-0.0703692809,
-0.0394092128,
0.1284040511,
0.0551098026,
0.5862644315,
-0.2416290045,
0.1986794472,
-0.6034761071,
0.098109968,
-0.0115175787,
-0.2622711957,
-0.0289310478,
-0.0258153118,
0.0606636889,
-0.0271428172,
-0.0369361937,
0.4532943666,
0.0261036418,
0.1377244443,
-0.0144091817,
-0.031210877,
0.1659796089,
-0.149267599,
-0.0280272756,
0.2467896938,
0.2313130498,
0.145564422,
-0.1155114919,
0.2314552367,
0.2422409356,
0.2612873316,
0.2787799835,
-0.1035927385,
0.0464528315,
-0.1944346428,
-0.0563362651,
0.1089806855,
0.383200407,
-0.2366937399,
0.2097786814,
-0.0384292863,
-0.4186983109,
0.0501050577,
0.2248213142,
0.0291959699,
0.0442765504,
0.2432193756,
-0.2284252942,
0.018043749,
0.3836128712,
-0.0429178625,
0.2823891342,
0.1057014763,
-0.0873444006,
0.1887231469,
-0.187191695,
-0.0694514588,
0.2413116992,
0.1532375962,
-0.0796862319,
-0.1558023989,
0.206311658,
-0.0792709067,
-0.3113126457,
-0.2721201181,
-0.1656867415,
0.336022377,
-0.1040088013,
0.2369022518,
-0.2183509171,
-0.2341488898,
-0.0096267564,
0.3806246221,
-0.168845728,
-0.1452973038,
-0.1966798007,
0.7166182399,
0.1593087614,
0.0603427142,
-0.0844972059,
0.3879714906,
-0.1754706055,
-0.0535687618,
-0.4342113733,
-0.0492241494,
-0.3178177178,
-0.0304962974,
0.1977998167,
-0.0813577846,
0.1272278577,
-0.4605334103,
-0.3687521815,
-0.1709655374,
-0.3561968505,
0.1349204928,
0.0372603461,
0.6029313803,
-0.0289429463,
0.0136934891,
-0.601441741,
0.0210790224,
0.1511324793,
-0.3201872706,
0.0636937469,
-0.1042695343,
-0.1868635118,
-0.1216012016,
-0.2700524032,
-0.0816643834,
-0.1091073528,
-0.2385925353,
0.5066684484,
0.3138300776,
0.0161009524,
0.2606226206,
0.0559485443,
0.2213383913,
0.3386722803,
-0.0052435328,
-0.254481703,
-0.1708034873,
0.2020790279,
-0.0742472634,
-0.2520222962,
0.026322376,
0.1815367192,
-0.0254924111,
0.1572324485,
-0.642509222,
0.0160681494,
-0.4847788513,
0.0580379628,
0.0048748143,
0.2352338135,
0.2089192271,
0.0245160032,
0.0800347775,
0.010784951,
-0.4969175756,
-0.150009498,
0.2188634574,
0.3703857958,
0.0713808089,
0.0354843102,
0.0575210005,
0.5301240087,
0.2229253948,
-0.1739253551,
0.3980808556,
0.0242356546,
0.4932108223,
-0.3355486095,
-0.3258899748,
-0.0183858983,
-0.2324872315,
-0.0088259215,
0.1077579558,
0.0766373426,
-0.450247407,
-0.1900813133,
-0.2060600519,
-0.2987423539,
-0.454629153,
-0.2510871887,
0.3637413681,
0.2862283289,
0.1112965196,
0.1490537226,
-0.044792138,
-0.3951272964,
-0.0273718797,
0.1667345762,
0.0399427488,
-0.1280601621,
0.1536096632,
0.0274009258,
-0.8342189789,
0.4663057625,
-0.1738691181,
0.2346746027,
-0.1807036549,
0.1948146969,
0.1158244386,
-0.3068095744,
0.3519191146,
-0.203250736,
-0.1965811551,
0.2149041295,
-0.161770612,
-0.5572030544,
0.0584599972,
-0.2162694931,
0.2518135607,
0.2097478211,
0.5306542516,
-0.1760800928,
-0.0149276601,
0.3837705553,
0.2900482714,
-0.0204213113,
0.0615712702,
-0.3306953609,
-0.53012079,
-0.2765916586,
0.3098936677,
-0.0036983872,
0.1908673346,
-0.0970476717,
-0.0563288555,
-0.0581695177,
-0.0515673384,
0.2212591767,
0.1083417535,
0.2536264658,
-0.1361191422,
0.4217240214,
0.0824377388,
-0.2441792637,
0.5667760372,
0.4219413996,
0.0840558782,
0.0599152036,
0.2182482779,
0.0441590063,
0.0685690492,
0.5577626824,
0.0016129584,
0.2105917633,
0.1365074068,
0.2705669105,
-0.1129125133,
-0.0402896926,
0.1503824741,
0.1884437501,
-0.5407616496,
-0.239788413,
0.2277228683,
0.2058054954,
-0.0330328792,
0.260945946,
0.1764239818,
-0.2621097565,
0.1928503513,
-0.1336488277,
1.1047879457,
-0.138486743,
0.1549971253,
0.0010187457,
0.0551222563,
0.1196485385,
-0.2374823093,
0.3183039427,
-0.2094097286,
-0.3173876107,
0.006929338,
-0.0404059924,
0.4131139815,
-0.1217051744,
-0.2975015342,
0.3479441702,
-0.1383865923,
-0.0396857671,
-0.0342015177,
0.1126974896,
-0.3623882234,
-0.1113903895,
-0.2616967559,
0.0874771401,
-0.0013265109,
0.1648856103,
-0.1754956692,
0.2998389304,
0.0905526802,
0.0018475611,
-0.406211704,
0.1481606811,
-0.1472766995,
-0.0508812629,
0.0650406182,
-0.1136028245,
0.2190015763,
0.0385588445,
0.3263998032,
0.340752095,
-0.2948122621,
0.3809449375,
-0.3143775761,
-0.0838873908,
0.0041156625,
0.0293469857,
0.1316906512,
-0.0114616212,
-0.1748835295,
-0.1618150324,
0.0170471687,
-0.2625707686,
0.1472304612,
0.0318166167,
-0.1420070231,
-0.1375936121,
-0.1344596297,
-0.0071788053,
0.0423097685,
-0.3881087601,
0.0708005056,
0.1293213367,
-0.1052379608,
0.2701586783,
-0.1477049887,
-0.2870521843,
-0.3015650809,
0.5366176963,
0.1201459616,
0.0700512454,
0.2204529643,
0.3433462083,
-0.058194533,
-0.2000847161,
-0.0966610909,
0.2445086688,
-0.2417141795,
0.4695895314,
0.0588830188,
0.1775065511,
0.0820812136,
0.2327416986,
-0.2002833933,
-0.2537687123,
-0.0907219797,
-0.2108499557,
-0.2793786526,
0.2183981687,
0.2744615376,
0.2863289416,
0.4134653807,
-0.152098313,
-0.0202647187,
-0.2095192373,
-0.1849518418,
0.3314347863,
-0.309712261,
0.1425817609,
0.2292660326,
-0.035700731,
0.1871896684,
-0.2527603805,
-0.030484857,
0.2793081105,
-0.1389081627,
-0.1006110758,
-0.3932361901,
0.1873623133,
-0.0348164067,
-0.3301312625,
-0.0467116572,
-0.2455568314,
-0.0513243936,
-0.3152307272,
0.2713602781,
0.2721064985,
0.0146393208,
0.0845840424,
0.2557935417,
0.0439246967,
-0.0466401055,
0.0177354477,
0.1074974164,
0.1789332926,
0.2368355393,
0.1976994574,
0.2519662678,
0.1969944388,
0.0466734096,
0.0663208663,
0.0120052379,
0.3098629117,
0.3079123199,
-0.1451855451,
-0.0825509429,
-0.2217960209,
0.324601233,
0.4486270547,
-0.0300342999,
-0.2493997365,
0.2719892859,
0.0827944651,
-0.2166921496,
-0.2794693708,
0.6518962383,
-0.0451120101,
0.0020910949,
0.2371381372,
0.1035624072,
0.1302220523,
0.1575397253,
0.2081456631,
0.1009874642,
-0.2070252746,
0.2780424654,
0.1379969865,
0.2514525354,
0.0672807917,
0.2538765669,
0.0341182537,
0.2004456073,
0.4376988411,
-0.1122490466,
0.151362434,
0.14620848,
0.4456197023,
0.067853719,
-0.3724224865,
0.1442440748,
0.265904814,
-0.1351272315,
0.3155606985,
0.0946810246,
0.4387955368,
-0.3764451742,
-0.2151645869,
-0.4240346253,
0.1097860932,
-0.27331388,
-0.2968057394,
0.1444841027,
-0.3376022875,
-0.2539544702,
0.2182461321,
-0.0320675783,
-0.0394960605,
0.4932493269,
-0.033594083,
-0.0678705871,
-0.5662405491,
-0.0757105425,
0.1328393817,
0.4685472846,
-0.0763974786,
0.0173586085,
-0.2709487379,
-0.3213542998,
-0.4333980381,
0.2564411163,
0.3304694593,
-0.0217107851,
-0.0187339615,
0.0688830391,
0.1895483583,
0.0789719075,
-0.1835134476,
0.2752423584,
0.3031263947,
0.2815057039,
0.0779087394,
0.0207823496,
-0.0690331087,
0.1069695801,
-0.0889560655,
0.3711233735,
-0.547116816,
0.2688907981,
-0.2715630233,
-0.2827184796,
-0.0066181463,
0.0388806984,
-0.1033261642,
0.2857274413,
0.4843064547,
-0.0809407756,
0.0203876551,
-0.2289408445,
0.0033874135,
-0.0307116453,
0.2768706381,
0.3303111792,
0.0997325331,
-0.2328642309,
-0.2152888775,
-0.368571341,
0.029987745,
-0.3492575884,
0.0193412211,
0.2091169059,
0.0008453262,
-0.2376725376,
0.0234740861,
0.1817585528,
-0.3206642866,
0.3062076569,
0.1034817845,
-0.339625001,
-0.0300745778,
-0.0964286625,
-0.0043157036,
0.0389081091,
-0.5237288475,
0.0541749708,
-0.3544073701,
-0.1839865446,
-0.1308000982,
-0.3462850153,
0.1726439744,
-0.3100564182,
0.5920476913,
0.0929083601,
0.0362083204,
-0.0111618759,
-0.093941085,
-0.1727332175,
-0.1554265022,
0.0230113771,
0.0676635429,
-0.0170567799,
0.5091179013,
-0.1858795732,
0.0586645603,
-0.2222750783,
0.5333372951,
0.1337770373,
0.1472229213,
0.1314148903,
0.0244204197,
-0.2728161812,
0.0637180731,
-0.0663860813,
0.4408476651,
-0.0418597609,
0.057256218,
-0.3848741949,
-0.1313644946,
0.4563553333,
-0.2312116325,
-0.5401156545,
-0.2135464102,
0.1190297231,
0.1710778177,
-0.515515089,
-0.5636328459,
-0.0607683361,
0.0897758454,
0.0834284648,
-0.3917342126,
0.1854497641,
-0.1564704776,
0.1157419831,
-0.100470826,
0.4763413966,
0.1591760665,
-0.1689212471,
0.0530233011,
-0.1088486612
] |
https://github.com/huggingface/datasets/issues/3164 | Add raw data files to the Hub with GitHub LFS for canonical dataset | Hi @zlucia, I would actually suggest hosting the dataset as a huggingface.co-hosted dataset.
The only difference with a "canonical"/legacy dataset is that it's nested under an organization (here `stanford` or `stanfordnlp` for instance β completely up to you) but then you can upload your data using git-lfs (unlike "canonical" datasets where we don't host the data)
Let me know if this fits your use case!
cc'ing @osanseviero @lhoestq and rest of the team π€ | I'm interested in sharing the CaseHOLD dataset (https://arxiv.org/abs/2104.08671) as a canonical dataset on the HuggingFace Hub and would like to add the raw data files to the Hub with GitHub LFS, since it seems like a more sustainable long term storage solution, compared to other storage solutions available to my team. From what I can tell, this option is not immediately supported if one follows the sharing steps detailed here: [https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset](https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset), since GitHub LFS is not supported for public forks. Is there a way to request this? Thanks! | 74 | Add raw data files to the Hub with GitHub LFS for canonical dataset
I'm interested in sharing the CaseHOLD dataset (https://arxiv.org/abs/2104.08671) as a canonical dataset on the HuggingFace Hub and would like to add the raw data files to the Hub with GitHub LFS, since it seems like a more sustainable long term storage solution, compared to other storage solutions available to my team. From what I can tell, this option is not immediately supported if one follows the sharing steps detailed here: [https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset](https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset), since GitHub LFS is not supported for public forks. Is there a way to request this? Thanks!
Hi @zlucia, I would actually suggest hosting the dataset as a huggingface.co-hosted dataset.
The only difference with a "canonical"/legacy dataset is that it's nested under an organization (here `stanford` or `stanfordnlp` for instance β completely up to you) but then you can upload your data using git-lfs (unlike "canonical" datasets where we don't host the data)
Let me know if this fits your use case!
cc'ing @osanseviero @lhoestq and rest of the team π€ | [
-0.2665250301,
-0.1827455014,
-0.006252788,
0.0318805352,
-0.0109189907,
0.1445143521,
-0.0868278518,
0.3903291821,
0.2624931037,
-0.0303213447,
-0.2295878083,
-0.034314815,
-0.2536515296,
0.3241304755,
0.1303447038,
0.2218011022,
0.0054547531,
0.079792276,
0.1123955995,
-0.0398905836,
0.1150904447,
0.0766842961,
0.1367831975,
-0.2238127738,
-0.2074272037,
0.1061085686,
-0.072508797,
0.2290411443,
-0.1743648201,
-0.1096052453,
0.3940239847,
0.3765414953,
0.14051117,
0.3050996661,
-0.0001218822,
0.0072086281,
0.2501145899,
-0.1687195897,
-0.3471151888,
-0.3165858984,
-0.1878391653,
0.0829299018,
-0.0975911096,
0.0858463421,
-0.4969350398,
0.0640934259,
0.1734535992,
-0.1044896841,
0.1173068583,
-0.2587697506,
0.0145133669,
0.1892102659,
0.0844807923,
-0.1029906198,
0.0773181245,
0.4221265912,
-0.2412167192,
0.5497741699,
0.4649932384,
0.1216786504,
-0.0640400499,
-0.0981300473,
0.2521439195,
-0.0165033787,
-0.0571036078,
0.0959567949,
-0.3532751799,
-0.1128140986,
0.1489449143,
0.2189083099,
0.4228684008,
-0.376070261,
-0.4358507991,
-0.2145009786,
0.2201535255,
-0.2514034808,
0.0206679963,
0.5102847219,
-0.2002692074,
0.3463029563,
-0.0497151799,
-0.5776879787,
0.0117328214,
0.0008288836,
0.2111348063,
0.27134794,
-0.13197577,
0.0097797541,
0.1333128959,
-0.0561519191,
-0.3542383909,
-0.2427237481,
0.092768468,
-0.0338046402,
0.2184591442,
-0.091294907,
-0.1975584179,
0.2318162471,
0.4090271294,
0.1166933924,
-0.2240319699,
-0.1028897241,
-0.3284316063,
-0.1152381599,
0.3487413526,
-0.2042657882,
-0.082664676,
0.2181467414,
0.2479393184,
0.2628528476,
0.1039621681,
0.0798646212,
-0.2126898915,
0.1609095931,
-0.7712410092,
-0.2206627876,
0.2897868454,
-0.1988132,
0.0796228796,
-0.2017209828,
0.3035267293,
0.2749485075,
0.2383244187,
-0.0523491167,
-0.015414549,
-0.2587589025,
-0.044173561,
0.1497697681,
0.0375958867,
-0.0829463229,
-0.0780498758,
-0.047084704,
0.2264404595,
0.1108429432,
0.0497289822,
-0.6066891551,
0.0873494521,
0.1912712306,
0.4863927662,
0.0626436025,
-0.1197488308,
0.2309162915,
-0.1405653656,
0.2416113168,
0.1819148958,
0.1449535936,
0.1819228232,
-0.3962033391,
-0.2727973759,
0.0491473861,
-0.1082645878,
-0.3897856474,
-0.3182872534,
-0.0943078697,
-0.25437814,
0.2402718663,
-0.6651900411,
0.0809432417,
-0.2214653492,
0.2130226344,
-0.0201546364,
0.2615922689,
0.0114759784,
-0.0277530234,
0.3683044612,
0.4206549227,
0.0995103642,
-0.2001757324,
0.0907236189,
0.2529321611,
-0.0597530194,
0.2877049148,
-0.1582577229,
-0.1315700263,
-0.2787148356,
0.1662852913,
0.4121835232,
-0.6380051374,
-0.5084891319,
-0.0302738864,
-0.19289805,
-0.1399567872,
-0.0113608614,
0.1017670557,
0.2115484178,
-0.155597508,
-0.0758041441,
0.4583400786,
0.0232084915,
-0.1269022673,
-0.1764534861,
-0.3753014505,
-0.0077879266,
0.1338984519,
-0.1937430054,
0.0876092091,
0.171277374,
0.1520491093,
0.2850725353,
-0.0894176364,
0.3909375668,
0.1189173982,
0.5414789319,
0.071597144,
-0.1675706357,
0.0709393695,
-0.1707431972,
0.2139840126,
0.0235006735,
0.17523399,
-0.1261011213,
-0.376676321,
-0.0095722135,
-0.0971160233,
0.0164342877,
-0.0004597739,
0.0011731259,
0.0048000254,
0.2792343497,
0.2050066143,
-0.0782155395,
0.1759434342,
-0.1685069799,
0.1475928724,
-0.2774277329,
0.5396145582,
0.0198052209,
-0.1506019533,
0.3039486706,
0.2477887273,
0.0449774265,
-0.1457322985,
0.0174377803,
0.2061314583,
-0.0575044192,
0.4176463485,
0.5740420818,
0.4769641459,
0.451402694,
-0.0232712459,
-0.1856725663,
-0.1281622648,
-0.2184780985,
0.1755774915,
-0.4029954672,
0.4061103165,
0.0050039552,
-0.2898294926,
-0.0500469469,
0.3792811632,
0.0141461371,
0.2231315374,
-0.1843404919,
-0.1845351458,
-0.067312859,
-0.0675749332,
0.4000762403,
-0.2898493111,
-0.1833954006,
0.0228997227,
0.0351701193,
0.0013578543,
0.1494611502,
0.1572176218,
-0.159098953,
-0.0319525637,
0.4809270799,
-0.1128568128,
0.0460003503,
0.0522192717,
0.2284601033,
0.1255473942,
0.1804149896,
-0.0777031556,
-0.0049033635,
-0.3158062398,
-0.1887283921,
-0.2076805532,
0.2962701023,
-0.0121352617,
-0.0750025511,
0.1295111328,
-0.1333546638,
-0.047994189,
-0.0127184307,
-0.2411058694,
-0.1619774252,
0.1104296818,
-0.0248830821,
-0.0148096578,
-0.2748349905,
-0.1186578423,
0.159239918,
0.6206399798,
-0.0131522967,
0.125852704,
0.2597209811,
0.4867329299,
-0.0785966739,
0.0862985104,
-0.172970891,
-0.1589922458,
0.1131700128,
0.0310206693,
0.2098182589,
-0.1889985651,
0.3592495322,
-0.1263186783,
0.1208606809,
-0.6279169917,
-0.1716773063,
0.1020908281,
-0.1656261832,
0.2280637622,
0.1578734517,
0.027463492,
-0.1100896373,
0.0675823465,
-0.0278854631,
-0.2415904403,
0.025720546,
-0.2843970954,
-0.1874934286,
-0.0275019947,
-0.0526906699,
0.5303859711,
-0.4226080179,
-0.3629893363,
0.5493771434,
0.3335317671,
-0.2026879936,
-0.0734991282,
-0.1354937255,
0.0240469985,
0.1688289046,
-0.2675637901,
-0.0934204161,
-0.4611540139,
0.1257451177,
-0.457526803,
-0.3302556276,
-0.0003681018,
0.1490736008,
0.1577556431,
-0.0688266605,
-0.4292910695,
-0.4489057362,
0.1090679988,
0.4061557949,
0.1496832222,
0.063618347,
0.2679277658,
-0.1184311807,
0.1586983502,
-0.0685584694,
-0.207556963,
-0.0572721213,
0.487418294,
-0.0395565256,
0.1287687272,
-0.3001265526,
0.3065258861,
0.7234539986,
0.4919942319,
-0.0849990472,
0.1363583207,
-0.2671544254,
0.4214406013,
-0.257419765,
0.1121240482,
0.016189184,
0.2130914629,
0.0666950271,
0.428280741,
0.3902885914,
0.295375824,
0.0366902761,
-0.3243353963,
-0.0893784612,
-0.3127215505,
-0.3376830518,
-0.1842952967,
0.0171026271,
-0.1250486523,
-0.4918221235,
-0.2366018295,
-0.402967453,
0.1299506873,
0.6487840414,
0.4601580501,
0.2712552845,
0.1249765828,
0.0704124942,
-0.2668824792,
0.053517282,
0.0440014675,
-0.1041109189,
-0.0934325978,
0.1271605939,
0.1308411509,
0.0145220859,
0.5161972642,
-0.0746945068,
0.2433095574,
-0.3376767933,
-0.196487084,
-0.2393380702,
0.1965556145,
0.111559689,
0.3614389896,
0.0006680136,
0.3687919974,
-0.348125726,
0.061926093,
-0.3468169272,
-0.062549971,
-0.0787480995,
0.1450893134,
0.100876078,
-0.2612423301,
-0.4203376174,
-0.041144453,
0.2610327005,
0.0575283505,
-0.0332284532,
0.2881389856,
-0.0031777371,
-0.121549204,
0.0014119759,
-0.0216707699,
0.0535351336,
0.3038692474,
0.1079707444,
0.2399021387,
-0.0452651121,
-0.0055271084,
0.6012921333,
0.1698300689,
0.0102437707,
-0.0308875032,
0.0114540821,
-0.1150094792,
0.3872182071,
0.1010911092,
0.0940746889,
-0.0135326339,
0.0090133697,
-0.6268210411,
0.070816718,
-0.105642952,
-0.0627142414,
-0.3584800065,
0.020678306,
0.2575998902,
-0.0143313138,
-0.1182777658,
0.5043298006,
0.6927143335,
-0.1764317602,
0.1875834912,
0.0038397282,
0.8711910844,
-0.1403718591,
0.2913089693,
-0.0580722094,
-0.4072917104,
0.6541139483,
-0.0635722205,
-0.1273935884,
-0.1495871097,
0.0423067696,
-0.0816015378,
0.0118937287,
0.1165945232,
-0.2232821584,
-0.1077513099,
-0.0346527062,
0.2633340657,
0.3939728141,
-0.273173362,
0.4422003925,
-0.0533648357,
-0.1710453033,
-0.3649848998,
0.0532314591,
0.0345674716,
0.2383204401,
0.0239575766,
-0.2514452636,
-0.3471157551,
0.012622905,
-0.4079433382,
-0.1926428676,
0.233096987,
0.0562849045,
0.2066971511,
-0.2766290903,
-0.001785099,
0.0552555695,
0.5946738124,
0.1984871328,
-0.6843019724,
-0.0367858708,
-0.2211762518,
-0.0482719913,
0.0155466003,
0.0103889247,
-0.050082732,
-0.0611836091,
0.0666806325,
-0.0356189571,
0.3469771147,
-0.4517829716,
-0.080295369,
-0.337405771,
-0.3555245996,
-0.107324779,
0.0034721075,
0.127005592,
-0.1250082105,
-0.0208729338,
-0.0547997877,
-0.028740095,
-0.2031462342,
-0.4334561229,
0.2270993441,
0.1298807263,
-0.0961817801,
0.3511572182,
-0.0263460949,
0.2139240503,
-0.0412215404,
0.0210485123,
0.1160928309,
0.2009839565,
-0.1139611378,
0.2848683894,
-0.6587224603,
0.1090492606,
-0.1689221561,
-0.1656301618,
-0.14185296,
0.1361620873,
0.2573179603,
-0.1569066495,
-0.0552155152,
-0.0612395965,
-0.2396914959,
0.1714910418,
-0.3176469207,
0.2243859321,
0.0965789407,
0.4433224499,
-0.1306431144,
0.0387405939,
-0.141836673,
0.330272764,
-0.2504433095,
-0.0669332817,
0.2870396376,
-0.010723833,
0.156247586,
-0.1479564458,
-0.1206514239,
-0.2165630013,
-0.1990923882,
0.0419543721,
-0.1721072793,
0.1720543653,
0.1495128274,
-0.2482894957,
-0.2282873243,
-0.2145989537,
-0.1041825563,
-0.0751621053,
0.2644016445,
-0.0149706407,
0.0002282292,
-0.0076213069,
0.5299341083,
0.0041509653,
-0.2832288146,
0.3311229348,
0.3128168881,
0.3427412212,
-0.0456602387,
0.1660153121,
-0.1281181425,
0.0437816083,
-0.1614812911,
0.3577349484,
0.350662291,
0.1203549504,
0.5274240971,
0.2208121419,
0.1692697555,
0.1338556707,
0.5429307818,
-0.3384861946,
-0.2709819376,
0.1715741009,
0.005631892,
-0.093135424,
-0.0400458239,
-0.2037556618,
0.2813857198,
0.027006045,
0.1301167309,
0.2611896098,
0.6170226932,
0.328881681,
-0.2880970836,
-0.0025076629,
0.615229547,
-0.1144789085,
0.0311727859,
-0.014813914,
-0.1516791582,
0.183541894,
-0.2485774308,
0.2821473479,
0.1073400676,
-0.2694893479,
-0.195366621,
0.1715814024,
-0.0242032427,
-0.3551039994,
0.5811538696,
-0.256123513,
0.191172272,
0.0142969079,
0.48239097,
0.0204634834,
-0.2278064042,
0.1838151366,
-0.2286652476,
-0.0727915615,
0.0350638106,
0.1340118796,
0.0240392946,
-0.2361729145,
0.0947260782,
-0.0731024519,
-0.1391793191,
0.0865365937,
-0.1759701222,
-0.1352541596,
-0.1828207374,
-0.0045678685,
0.2942661941,
0.0333085842,
-0.2135583162,
0.3059974313,
0.3238544166,
0.0145100551,
0.2622928321,
0.0986802131,
0.032634005,
0.3780575991,
0.193398118,
0.2054214478,
-0.2917449772,
-0.0157909468,
0.1632453799,
0.2737190127,
0.0605574958,
-0.1631178409,
0.1068580821,
-0.0236650836,
-0.1854865104,
-0.0291393902,
0.1021134332,
0.0188195445,
0.1418835968,
-0.2666503191,
0.000635068,
-0.3150849044,
0.1638984829,
-0.0093408134,
-0.2510739267,
0.1194710881,
0.1125464439,
0.0124320593,
0.2258954793,
0.2324996889,
-0.1956052482,
0.0628762767,
-0.0197652467,
-0.0340311527,
0.267141223,
0.25866732,
0.2960197031,
-0.1242155954,
0.1199298054,
-0.2427466214,
-0.1992484927,
0.2784216404,
0.0261649564,
-0.3617643714,
-0.1055095121,
-0.0898744166,
0.3382400274,
0.0456464402,
-0.1991049498,
-0.3419541717,
-0.2376372665,
-0.3892059028,
0.3220633566,
-0.3116660118,
0.0484407656,
0.0376398116,
-0.0595469065,
0.0713037699,
0.2878335416,
0.3199166358,
-0.1408925951,
-0.0675189346,
0.0682058036,
-0.0255505871,
-0.3085971177,
-0.1209442466,
0.2565661669,
-0.1820656806,
-0.2419189215,
-0.3158734739,
-0.34803918,
-0.0855194703,
-0.3047187626,
-0.18915084,
-0.4873839319,
0.2775521278,
-0.294703871,
-0.4205670953,
-0.3141000569,
-0.212301895,
0.0227077026,
0.3327002823,
-0.0666015893,
0.0624119043,
-0.5184562206,
0.0950380936,
0.3514746428,
0.5247077346,
-0.1856488436,
-0.0590649955,
-0.1597506404,
-0.0459543653,
0.312607348,
-0.3821950853,
0.0447965451,
0.0839334279,
0.0228781421,
0.1445085704,
-0.1987969875,
-0.3984576166,
0.205807507,
0.1194014102,
0.0166731328,
0.0902151614,
0.2802455127,
0.2281793356,
0.0442360677,
0.017249478,
0.1941660941,
0.0698148459,
-0.1542971283,
0.2252857238,
-0.0920256376
] |
https://github.com/huggingface/datasets/issues/3164 | Add raw data files to the Hub with GitHub LFS for canonical dataset | Hi @zlucia,
As @julien-c pointed out, the way to store/host raw data files in our Hub is by using what we call "community" datasets:
- either at your personal namespace: `load_dataset("zlucia/casehold")`
- or at an organization namespace: for example, if you create the organization `reglab`, then `load_dataset("reglab/casehold")`
Please note that "canonical" datasets do not normally store/host their raw data at our Hub, but in a third-party server. For "canonical" datasets, we just host the "loading script", that is, a Python script that downloads the raw data from a third-party server, creates the HuggingFace dataset from it and caches it locally.
In order to create an organization namespace in our Hub, please follow this link: https://huggingface.co/organizations/new
There are already many organizations at our Hub (complete list here: https://huggingface.co/organizations), such as:
- Stanford CRFM: https://huggingface.co/stanford-crfm
- Stanford NLP: https://huggingface.co/stanfordnlp
- Stanford CS329S: Machine Learning Systems Design: https://huggingface.co/stanford-cs329s
Also note that you in your organization namespace:
- you can add any number of members
- you can store both raw datasets and models, and those can be immediately accessed using `datasets` and `transformers`
Once you have created an organization, these are the steps to upload/host a raw dataset:
- The no-code procedure: https://huggingface.co/docs/datasets/upload_dataset.html
- Using the command line (terminal): https://huggingface.co/docs/datasets/share.html#add-a-community-dataset
Please, feel free to ping me if you have any further questions or need help.
| I'm interested in sharing the CaseHOLD dataset (https://arxiv.org/abs/2104.08671) as a canonical dataset on the HuggingFace Hub and would like to add the raw data files to the Hub with GitHub LFS, since it seems like a more sustainable long term storage solution, compared to other storage solutions available to my team. From what I can tell, this option is not immediately supported if one follows the sharing steps detailed here: [https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset](https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset), since GitHub LFS is not supported for public forks. Is there a way to request this? Thanks! | 222 | Add raw data files to the Hub with GitHub LFS for canonical dataset
I'm interested in sharing the CaseHOLD dataset (https://arxiv.org/abs/2104.08671) as a canonical dataset on the HuggingFace Hub and would like to add the raw data files to the Hub with GitHub LFS, since it seems like a more sustainable long term storage solution, compared to other storage solutions available to my team. From what I can tell, this option is not immediately supported if one follows the sharing steps detailed here: [https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset](https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset), since GitHub LFS is not supported for public forks. Is there a way to request this? Thanks!
Hi @zlucia,
As @julien-c pointed out, the way to store/host raw data files in our Hub is by using what we call "community" datasets:
- either at your personal namespace: `load_dataset("zlucia/casehold")`
- or at an organization namespace: for example, if you create the organization `reglab`, then `load_dataset("reglab/casehold")`
Please note that "canonical" datasets do not normally store/host their raw data at our Hub, but in a third-party server. For "canonical" datasets, we just host the "loading script", that is, a Python script that downloads the raw data from a third-party server, creates the HuggingFace dataset from it and caches it locally.
In order to create an organization namespace in our Hub, please follow this link: https://huggingface.co/organizations/new
There are already many organizations at our Hub (complete list here: https://huggingface.co/organizations), such as:
- Stanford CRFM: https://huggingface.co/stanford-crfm
- Stanford NLP: https://huggingface.co/stanfordnlp
- Stanford CS329S: Machine Learning Systems Design: https://huggingface.co/stanford-cs329s
Also note that you in your organization namespace:
- you can add any number of members
- you can store both raw datasets and models, and those can be immediately accessed using `datasets` and `transformers`
Once you have created an organization, these are the steps to upload/host a raw dataset:
- The no-code procedure: https://huggingface.co/docs/datasets/upload_dataset.html
- Using the command line (terminal): https://huggingface.co/docs/datasets/share.html#add-a-community-dataset
Please, feel free to ping me if you have any further questions or need help.
| [
-0.2289415151,
-0.0566736236,
-0.0150377396,
0.0101023288,
0.0391702466,
0.0713321269,
-0.012348704,
0.3533783257,
0.3484467566,
0.0711124986,
-0.3602598906,
-0.0362024754,
-0.2267824113,
0.2558308542,
0.0820699781,
0.263731271,
-0.0132170971,
0.0790139139,
0.2102044672,
-0.0459960885,
0.0696714297,
0.0801070184,
0.1755231768,
-0.2255807519,
-0.2424689382,
0.179059118,
-0.0154946102,
0.2225515097,
-0.1476859748,
-0.0763742775,
0.4192403853,
0.4168628752,
0.1235429272,
0.3801308572,
-0.0001217591,
0.1022679359,
0.3024411798,
-0.1765776426,
-0.3889102042,
-0.3695991039,
-0.1753300577,
0.0104387961,
-0.162067309,
0.1045614481,
-0.4605770111,
-0.0172287952,
0.2128417939,
-0.1144232452,
0.1005247086,
-0.2434496731,
-0.0057904925,
0.1282633096,
-0.0025862369,
-0.1003329605,
0.107097663,
0.4919635355,
-0.2844493687,
0.5346364379,
0.3674660027,
0.0509638339,
-0.1048556119,
-0.0811716691,
0.2657428384,
-0.0084292544,
-0.0048644422,
0.1290421635,
-0.481123656,
-0.1339909881,
0.1393606067,
0.2364441603,
0.3538219333,
-0.4089075923,
-0.4724350274,
-0.2859210968,
0.1858094484,
-0.2970903218,
0.0359920003,
0.4753831029,
-0.2646623254,
0.3224123418,
-0.1876665354,
-0.6103286743,
-0.0272919815,
0.0974335,
0.2486461103,
0.291916579,
-0.1473028213,
0.0313418694,
0.0733096674,
-0.0495873541,
-0.2720707357,
-0.2294731438,
0.0971257538,
-0.0311889127,
0.1580684483,
-0.0634276122,
-0.2403775752,
0.221284911,
0.4159780145,
0.1984442323,
-0.1606666595,
-0.1246071756,
-0.2967113853,
-0.1187423766,
0.274386704,
-0.1263879091,
-0.0399360806,
0.2172431648,
0.2872419059,
0.2611220181,
0.1160351858,
0.0650823563,
-0.2321236283,
0.1446000189,
-0.7998678088,
-0.2408125103,
0.2785776258,
-0.0750853568,
0.1232146546,
-0.1731604785,
0.3006307781,
0.2339329422,
0.3135778606,
0.0234343093,
-0.0033773845,
-0.2124572545,
-0.0794733614,
0.1745622605,
0.1228399575,
-0.1085846722,
-0.0527003855,
-0.0896478966,
0.1655941457,
0.2216681242,
0.1309727281,
-0.4986113608,
0.1340180933,
0.1912743151,
0.5813323855,
-0.0304363985,
-0.1015289649,
0.1716554314,
-0.1288493276,
0.290646106,
0.2397772968,
0.1689424813,
0.1652789563,
-0.3512499332,
-0.2649676204,
0.0394089408,
-0.1079717577,
-0.4682829082,
-0.3302840889,
-0.0924922302,
-0.2245676965,
0.3161937594,
-0.6732626557,
0.0386787988,
-0.1848050803,
0.1369433403,
-0.0245978553,
0.2543037534,
-0.0185172688,
-0.031833984,
0.4215036929,
0.3626413047,
0.1283761561,
-0.122313112,
-0.0132795079,
0.2733827829,
-0.0559371188,
0.2761845291,
-0.2108075321,
-0.033922486,
-0.2740957141,
0.1926784664,
0.3350192606,
-0.6549580693,
-0.514454782,
0.0766468495,
-0.1155442446,
-0.1820701957,
0.0649719164,
0.1024819463,
0.189986974,
-0.1671632826,
-0.0271581877,
0.4742615819,
0.0283707436,
-0.0932741761,
-0.1378288269,
-0.3161197007,
-0.0585995466,
0.1304529309,
-0.2158689946,
0.0459202789,
0.2064811885,
0.2363733202,
0.1897937059,
-0.1216363385,
0.3804342747,
0.1068382114,
0.4320042729,
0.1613535285,
-0.131862253,
0.1476362199,
-0.2112719715,
0.2452946901,
0.0292866714,
0.1288339645,
-0.0761346668,
-0.3818160594,
-0.0817468911,
-0.0881604627,
0.0207763519,
0.0112175113,
-0.0137713877,
0.077821523,
0.2996226549,
0.1033411995,
-0.0801332444,
0.264120996,
-0.2595403492,
0.0972640812,
-0.2883911431,
0.5789309144,
-0.0271307882,
-0.108895883,
0.2874490619,
0.2413370907,
0.078065753,
-0.1417321414,
0.0595442615,
0.2694085538,
0.0033762548,
0.4471622109,
0.588365972,
0.4300048649,
0.4169284403,
-0.0178627819,
-0.0990519226,
-0.0796643347,
-0.1917489171,
0.1951131821,
-0.3184894621,
0.4425114691,
-0.068628937,
-0.2483046353,
-0.0750448704,
0.3116087317,
0.0824400187,
0.1778651625,
-0.203068018,
-0.2037795037,
-0.0430678837,
0.0767547637,
0.4374574721,
-0.2889708579,
-0.131753996,
-0.023448674,
0.0244187899,
-0.0181572549,
0.1730664819,
0.1360743493,
-0.1732064784,
-0.1116982773,
0.430282414,
-0.034425579,
0.0894578695,
0.0209815055,
0.1668469906,
0.1042369902,
0.1518802792,
-0.1527376771,
-0.0143259633,
-0.2298695743,
-0.0617136136,
-0.0567005798,
0.3264980018,
0.0311136488,
-0.1025084928,
0.0467547141,
-0.0421332009,
-0.0918669552,
-0.0715973005,
-0.2171821296,
-0.0990765244,
0.1246888116,
0.0273606014,
-0.1552133113,
-0.2848018408,
-0.1160444021,
0.1702086926,
0.5452514291,
-0.0324462019,
0.1210784018,
0.3661152422,
0.5227205157,
-0.1356993467,
0.0601788349,
-0.2815461457,
-0.1186735258,
0.1161928549,
-0.035884086,
0.2400544733,
-0.2261712253,
0.2538428009,
-0.1452168077,
0.1049689054,
-0.5245941281,
-0.1037111357,
0.0844080746,
-0.1513349861,
0.2855917513,
0.1272774339,
0.0364756957,
-0.034572769,
-0.0161850043,
-0.008188514,
-0.226582244,
0.021389449,
-0.2890096605,
-0.1822025925,
0.0120903403,
-0.0820669234,
0.535076201,
-0.438331306,
-0.3754747212,
0.4410319328,
0.3280362785,
-0.1596620977,
-0.0109546809,
-0.1457761824,
0.0081222737,
0.1790077239,
-0.3094939291,
-0.1351658404,
-0.5066212416,
0.1772018373,
-0.5204623342,
-0.2116717249,
0.0307908636,
0.1091421247,
0.1973850578,
-0.05458913,
-0.3450488746,
-0.4182309806,
0.1344370395,
0.3758226335,
0.1441229582,
0.0423594415,
0.2510950565,
-0.1470137239,
0.1563168466,
-0.0560334809,
-0.1967372,
-0.1197847128,
0.428142488,
-0.0546033382,
0.1368464231,
-0.40742293,
0.3371658325,
0.8386981487,
0.4731460214,
-0.0152542917,
0.1146988347,
-0.2327661514,
0.4259349406,
-0.2218111753,
0.1340308785,
0.0434223562,
0.1935143024,
0.0088418368,
0.4584922493,
0.4354976118,
0.2822719812,
0.0334866233,
-0.2867930233,
-0.1796809882,
-0.2771769464,
-0.3365071118,
-0.1806992739,
0.038204968,
-0.171554476,
-0.3853930235,
-0.2871482074,
-0.3873980045,
0.1028360501,
0.6467106938,
0.4057938755,
0.2558548152,
0.0588013865,
0.0467004292,
-0.2258073688,
0.0377578177,
0.0158535391,
-0.0279056262,
-0.0499287844,
0.1782595813,
0.0840085894,
0.0548591949,
0.4431796372,
-0.1218145639,
0.2227289677,
-0.3784075677,
-0.1872402132,
-0.2747682929,
0.1603414863,
0.1614664346,
0.3538415134,
-0.0187769756,
0.4515518546,
-0.3031295836,
0.0091100298,
-0.3731223643,
-0.0530676693,
-0.0741418377,
0.1191301122,
0.1362368912,
-0.2550646365,
-0.4803677201,
-0.1390550882,
0.2007994652,
0.0826700851,
-0.0463199243,
0.2705663443,
0.0696862116,
-0.1407829076,
0.0046123103,
0.0052042911,
0.0477154516,
0.401163578,
0.0685940012,
0.2421358377,
-0.0479341447,
-0.0022603457,
0.5495969653,
0.1782025248,
-0.1092028692,
-0.0288587417,
0.0585405938,
-0.0809176192,
0.416745156,
0.0817419365,
-0.0192754492,
-0.0640788674,
-0.0407175124,
-0.6297361851,
0.1382298023,
-0.1552708447,
-0.1403918266,
-0.3057134449,
0.0009756407,
0.3285368979,
-0.0311359912,
-0.1180780157,
0.5069381595,
0.5868866444,
-0.243896544,
0.2283115536,
-0.0071574757,
0.810325861,
-0.1467038542,
0.2848637402,
-0.0296894442,
-0.3130885661,
0.6395927072,
-0.169223085,
-0.0992610529,
-0.0780256242,
0.0646750778,
-0.0497775637,
0.0421570577,
0.1853004694,
-0.1805562079,
-0.0519552827,
-0.0186365861,
0.219771564,
0.4162468612,
-0.2270102054,
0.4501570761,
-0.0788971037,
-0.3105715811,
-0.3070562184,
0.031469889,
-0.0053439392,
0.3073745966,
0.0247399732,
-0.1976124197,
-0.4533936083,
0.0692469403,
-0.3448487222,
-0.1980042756,
0.2545419633,
0.0430380814,
0.2121239305,
-0.2959750295,
-0.0307301469,
0.1846995801,
0.6262684464,
0.239775911,
-0.6608165503,
-0.035819672,
-0.2211711407,
-0.070113197,
-0.0118064443,
-0.0775601864,
-0.0708708242,
-0.0000389492,
0.1510809511,
-0.1014712676,
0.3251894414,
-0.4752506316,
-0.1033354625,
-0.3438299596,
-0.2800198793,
-0.1318683475,
0.0318308994,
0.1296583265,
-0.1749092937,
-0.0382009558,
-0.0600514784,
-0.0579691045,
-0.2393196523,
-0.5376321673,
0.1728685647,
0.0995063633,
-0.1102452204,
0.241883114,
0.0387869254,
0.211841926,
-0.0441196337,
-0.0211731642,
0.1405268759,
0.1872432083,
-0.0695690438,
0.3031110168,
-0.634671092,
0.0613175444,
-0.1336128265,
-0.1413020194,
-0.1231235936,
0.1139323339,
0.2372934669,
-0.1809101403,
-0.0535781011,
-0.1332238168,
-0.1680153012,
0.1981258243,
-0.3159967661,
0.2185127884,
0.1289804727,
0.4503267705,
-0.0899913907,
0.1141573489,
-0.1293487847,
0.3099243343,
-0.3009053171,
-0.0664242953,
0.1497696638,
-0.050909441,
0.1374482512,
-0.194230631,
-0.136502564,
-0.2076822221,
-0.2095139623,
0.0700303093,
-0.158869803,
0.1813057363,
0.1885132194,
-0.1851823479,
-0.2585345805,
-0.2076399475,
-0.0991159976,
-0.1484038383,
0.2202633321,
0.0297590494,
-0.0465867035,
-0.0254356619,
0.5532963872,
0.0269416142,
-0.2928594053,
0.2887990475,
0.2883723974,
0.447847724,
-0.0640213937,
0.220281899,
-0.0879288167,
0.0131027969,
-0.2189610153,
0.324015528,
0.3620156944,
0.1660578251,
0.5333579183,
0.184184894,
0.1789378077,
0.1276045591,
0.5245290995,
-0.3471740186,
-0.3371258676,
0.1985803246,
0.0432025455,
-0.1107518896,
-0.0295329336,
-0.239334926,
0.2445124686,
-0.0572715662,
0.1347332895,
0.3335729539,
0.7573326826,
0.3253180385,
-0.3141945004,
-0.0252706967,
0.5588731766,
-0.0281447154,
0.0386359058,
-0.0210703742,
-0.1518424451,
0.2384694368,
-0.1756764948,
0.2556385994,
0.0545404889,
-0.1518959105,
-0.1735821515,
0.2985342145,
-0.0055088117,
-0.2407971025,
0.5676673651,
-0.2899019718,
0.1786716431,
-0.0933580101,
0.4235211611,
0.0332643129,
-0.2947544456,
0.1703674346,
-0.3241573572,
0.0163035337,
0.0383563712,
0.0521989688,
0.0357832946,
-0.2009576261,
-0.0195471644,
-0.0881059393,
-0.1489256769,
0.0667501986,
-0.1633133292,
-0.2347513288,
-0.2036887109,
-0.0281232111,
0.243223235,
0.0741251484,
-0.1342560947,
0.3267593086,
0.2487494051,
-0.0280581061,
0.3455868661,
-0.0774669647,
0.0418079793,
0.3868507147,
0.1520898044,
0.1996490806,
-0.2610841095,
-0.0081402091,
0.1525336057,
0.2451904118,
0.0251603462,
-0.1713134497,
0.0980575532,
-0.0050347378,
-0.1472370178,
0.0230360925,
0.089788489,
0.0013535619,
0.0378821418,
-0.283865124,
-0.0237397011,
-0.2375280112,
0.2819538116,
-0.0488190055,
-0.2129388005,
0.1560099274,
0.1307647377,
-0.0817764774,
0.1592846364,
0.277885735,
-0.1745504439,
0.0634112358,
-0.0394055061,
-0.0346979052,
0.2209708095,
0.318821907,
0.2775747478,
-0.1359151304,
0.079976961,
-0.3344369829,
-0.1779523641,
0.24594827,
0.0102298185,
-0.2605410218,
-0.1029550731,
-0.0092292437,
0.3684623539,
0.1234531403,
-0.3074117005,
-0.4055330455,
-0.1842119396,
-0.3691187203,
0.2782357931,
-0.2474202216,
-0.0084941434,
0.089055039,
-0.0478804037,
0.0156019162,
0.2894607782,
0.2869538367,
-0.1540634036,
0.0061351014,
0.1213836595,
0.0822757408,
-0.3698280752,
-0.0286144856,
0.1744220257,
-0.2302664965,
-0.2224996686,
-0.2702236772,
-0.3480284214,
-0.0498600341,
-0.263073802,
-0.2001414746,
-0.420129329,
0.2696499228,
-0.3047644496,
-0.3485247195,
-0.3548895121,
-0.2821130157,
0.0193429589,
0.3826671839,
-0.0010051263,
0.0087828133,
-0.5717203617,
0.0893588215,
0.394405514,
0.5143091083,
-0.2062272131,
-0.0473904274,
-0.201548174,
-0.0667147189,
0.2921570539,
-0.3926754892,
-0.0215126518,
0.0565090664,
0.0496994331,
0.1248833463,
-0.1183120683,
-0.3048039377,
0.2745573521,
0.1389944851,
0.0222709682,
0.106845662,
0.151617229,
0.2050301135,
0.0217741132,
-0.0143453358,
0.0332017317,
0.0783456191,
-0.1360331774,
0.1694938987,
-0.0472876318
] |
https://github.com/huggingface/datasets/issues/3164 | Add raw data files to the Hub with GitHub LFS for canonical dataset | Ah I see, I think I was unclear whether there were benefits to uploading a canonical dataset vs. a community provided dataset. Thanks for clarifying. I'll see if we want to create an organization namespace and otherwise, will upload the dataset under my personal namespace. | I'm interested in sharing the CaseHOLD dataset (https://arxiv.org/abs/2104.08671) as a canonical dataset on the HuggingFace Hub and would like to add the raw data files to the Hub with GitHub LFS, since it seems like a more sustainable long term storage solution, compared to other storage solutions available to my team. From what I can tell, this option is not immediately supported if one follows the sharing steps detailed here: [https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset](https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset), since GitHub LFS is not supported for public forks. Is there a way to request this? Thanks! | 45 | Add raw data files to the Hub with GitHub LFS for canonical dataset
I'm interested in sharing the CaseHOLD dataset (https://arxiv.org/abs/2104.08671) as a canonical dataset on the HuggingFace Hub and would like to add the raw data files to the Hub with GitHub LFS, since it seems like a more sustainable long term storage solution, compared to other storage solutions available to my team. From what I can tell, this option is not immediately supported if one follows the sharing steps detailed here: [https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset](https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset), since GitHub LFS is not supported for public forks. Is there a way to request this? Thanks!
Ah I see, I think I was unclear whether there were benefits to uploading a canonical dataset vs. a community provided dataset. Thanks for clarifying. I'll see if we want to create an organization namespace and otherwise, will upload the dataset under my personal namespace. | [
-0.3026182353,
-0.1087173596,
-0.0212863199,
0.0045907376,
-0.0189415086,
0.0792324245,
0.0541193113,
0.3037517965,
0.2015293241,
0.1099400073,
-0.1391483694,
-0.0599634163,
-0.2016545534,
0.2130594701,
0.083874315,
0.1610624939,
0.0275533237,
0.0485899672,
0.0830217078,
-0.0822098479,
0.0535810888,
0.0373747908,
0.1730419099,
-0.2116974592,
-0.2528185844,
0.1937860101,
-0.0703064725,
0.2198102325,
-0.1628822684,
-0.1362255812,
0.3707785308,
0.4476497769,
0.1513137519,
0.3780476153,
-0.0001239751,
-0.005404769,
0.3274703026,
-0.1238240749,
-0.350744009,
-0.3071780205,
-0.2119364291,
0.0429453962,
-0.0287850872,
0.0409873761,
-0.4161866307,
0.0502279922,
0.2626403272,
-0.1343411654,
0.0600367039,
-0.2491164207,
-0.0172220375,
0.2078068107,
-0.0052385479,
-0.1610064656,
0.0349416584,
0.4601745307,
-0.2451431006,
0.5800249577,
0.4592522681,
0.1130194515,
-0.0037937302,
-0.1359736919,
0.2171887308,
0.0123767685,
-0.02581577,
0.120406352,
-0.4154491127,
-0.107451506,
0.2558836937,
0.2808043361,
0.509282887,
-0.2615473568,
-0.4650713503,
-0.2458363026,
0.232950151,
-0.2207216024,
0.0347933024,
0.47815907,
-0.211583674,
0.3740256727,
-0.0089656767,
-0.4489156306,
-0.0104131969,
-0.002329238,
0.1697673053,
0.2728951275,
-0.0814820826,
0.1044880152,
0.1036359519,
-0.0355185196,
-0.3166100383,
-0.2741855681,
0.1818876117,
-0.0721887723,
0.2708399892,
-0.0561297312,
-0.1539685875,
0.2072118223,
0.3696345091,
0.1918818951,
-0.1970440596,
-0.1177941263,
-0.277326405,
-0.1434019655,
0.3477886617,
-0.2476813644,
-0.1730296016,
0.3186581731,
0.2789674699,
0.2432066649,
0.0259893667,
0.0791513622,
-0.1966431737,
0.163021192,
-0.7160552144,
-0.2061275989,
0.2861138582,
-0.1834515482,
0.0845298171,
-0.2783003151,
0.3434123397,
0.2398938835,
0.1460029036,
-0.0451370813,
0.0254676864,
-0.2511437237,
-0.1825948358,
0.2108689845,
0.1155072674,
-0.1139625609,
-0.0447251238,
-0.1196280941,
0.2645612061,
0.1218153611,
0.0498366691,
-0.5609899163,
0.1440833956,
0.1310782582,
0.5695679784,
0.0807267353,
-0.1225144863,
0.186108321,
-0.2254253477,
0.2416792661,
0.2191678882,
0.2163550556,
0.1582000852,
-0.3617198467,
-0.320173502,
0.0607880093,
-0.0793989226,
-0.4459504783,
-0.3446947932,
-0.1151206568,
-0.1165887192,
0.2390995324,
-0.5848212242,
0.0551850609,
-0.2665263116,
0.2122440934,
-0.0121821836,
0.212382853,
0.0184867363,
-0.0914490148,
0.2250204682,
0.3962928355,
0.0332518891,
-0.1094781458,
0.0162199475,
0.2967962325,
0.0018391602,
0.3350755274,
-0.2610528469,
-0.1302315742,
-0.2265776992,
0.1865012944,
0.4647809267,
-0.7650194168,
-0.5665689707,
-0.0131659508,
-0.1847556233,
-0.1869895309,
0.1552809477,
0.1902415454,
0.2391854972,
-0.1100540236,
-0.0134985456,
0.3790296614,
0.0344196334,
-0.0700956583,
-0.1460327059,
-0.3873151541,
0.0167571045,
0.1213408709,
-0.1997872889,
0.0730154589,
0.2395310402,
0.2097904384,
0.2341293395,
-0.119818747,
0.3493399918,
0.0987720415,
0.4912976623,
0.0350453742,
-0.1111746952,
0.1390070319,
-0.1772936583,
0.1726127416,
0.0699288249,
0.2027011812,
-0.1027834713,
-0.3883906007,
-0.0611568354,
-0.1081733629,
0.0115379049,
0.0390533656,
-0.0422018729,
0.1543184817,
0.2481871247,
0.0634118542,
-0.1343175918,
0.1940578967,
-0.3605888188,
0.1506997347,
-0.1346240044,
0.4844141304,
-0.0080001801,
-0.1321659684,
0.3593561351,
0.1861676425,
0.0549798794,
-0.1120400354,
0.015939299,
0.1559107155,
-0.0672267154,
0.4476386011,
0.5953261256,
0.4893776476,
0.3894525766,
-0.1030132845,
-0.0983894244,
-0.0129172187,
-0.2095328271,
0.1817442477,
-0.4942635596,
0.4086573124,
-0.0479129367,
-0.255761683,
-0.0681592897,
0.2811924815,
0.0338105857,
0.2116586119,
-0.2607250512,
-0.1745440364,
-0.0257193223,
-0.0296403002,
0.524446547,
-0.2485775799,
-0.2107696831,
0.0249090083,
0.1349324733,
0.0189188719,
0.1640314907,
0.0989317447,
-0.1295203716,
-0.0650546029,
0.4460364282,
-0.1005490795,
0.1389489472,
0.0627335757,
0.2549999952,
0.1079161242,
0.0860179067,
-0.0896192864,
0.015022574,
-0.3427967727,
-0.1822888255,
-0.1825619936,
0.355925262,
0.090787597,
-0.1283489764,
0.1171244457,
-0.1217478886,
-0.0597014613,
-0.0275440868,
-0.2577117085,
-0.0976996496,
0.0215302203,
0.0097024273,
0.013865727,
-0.2697767317,
-0.1622235477,
0.1320415586,
0.5205485225,
-0.0158516895,
0.1153100356,
0.3075578213,
0.526681304,
-0.1014560685,
0.000041275,
-0.1548106521,
-0.1051730588,
0.0879723132,
-0.010744256,
0.2025967985,
-0.235360533,
0.3011333942,
-0.138825804,
0.1333445609,
-0.6149294972,
-0.223355189,
0.080000326,
-0.1113501415,
0.2177064866,
0.0827965438,
0.0789483488,
0.0015080518,
0.0074975411,
-0.0215852801,
-0.2086292952,
-0.0086064255,
-0.3755717874,
-0.1841702312,
-0.0454191044,
-0.0063575269,
0.5450928807,
-0.3026358187,
-0.4062137306,
0.4921286702,
0.3958317339,
-0.235615775,
-0.0704645142,
-0.1990700811,
0.0234122239,
0.2231211066,
-0.2008884698,
-0.0563069507,
-0.4654998183,
0.1405091733,
-0.40963462,
-0.3407141864,
-0.0247592609,
0.1367401332,
0.1737210006,
-0.0339831151,
-0.4013516605,
-0.4563759863,
0.1217817366,
0.4883656502,
0.2248003334,
0.0789784715,
0.2655151486,
-0.0711970329,
0.1728631407,
-0.0450877659,
-0.2465956956,
-0.1772956699,
0.5662081838,
-0.0922256261,
0.1866827458,
-0.3995911777,
0.2615324855,
0.857453227,
0.4962902069,
-0.0950724334,
0.16061683,
-0.2808168828,
0.4465354383,
-0.3740400076,
0.0555078462,
0.0327956676,
0.2544544935,
0.1056549996,
0.4731956124,
0.3420643806,
0.2800063193,
0.0322356075,
-0.195401907,
-0.1730531156,
-0.2387677878,
-0.3669356108,
-0.163946569,
0.0525047556,
-0.0873032734,
-0.5016759038,
-0.2666546404,
-0.374232024,
0.1002402231,
0.7267079949,
0.3808662593,
0.270975858,
-0.0590683073,
0.1407881379,
-0.2357117385,
0.0908593088,
0.0492547825,
-0.1291721314,
-0.1794013679,
0.1312195361,
0.1351689249,
0.0793718472,
0.5080150366,
-0.1610595286,
0.1511979848,
-0.3889400363,
-0.1093741059,
-0.19443959,
0.1662167013,
0.0976130664,
0.3481871784,
-0.1036326662,
0.4373491108,
-0.3503690362,
0.0351617746,
-0.3036941588,
-0.0100787105,
0.0003928118,
0.1400336325,
0.0987441987,
-0.2459433973,
-0.4591670334,
-0.1302351505,
0.1506667584,
0.0999915749,
-0.0337948501,
0.2661107183,
-0.0611493886,
-0.0882376507,
-0.0050474387,
-0.0599183999,
0.0078980885,
0.335763365,
0.0807150751,
0.1143097058,
-0.0017589057,
0.0684273541,
0.5649876595,
0.1865261793,
-0.0951334536,
0.0200075693,
0.009414074,
-0.1025841832,
0.5321698785,
0.1609467566,
0.0402129367,
-0.0134751061,
-0.0159394518,
-0.5391349196,
0.1217403337,
-0.0750350207,
-0.081891194,
-0.4009726048,
0.0521678925,
0.3022589386,
-0.028835427,
-0.106308423,
0.5150300264,
0.7280389071,
-0.1276981086,
0.1429302245,
-0.0325678065,
0.9599355459,
-0.1219982579,
0.3372277617,
-0.0868522376,
-0.4168659747,
0.7407318354,
-0.0583244227,
-0.1090164334,
-0.0968378857,
0.0582728684,
-0.100851424,
0.0155249378,
0.1551145017,
-0.1581417918,
-0.0431300551,
-0.0196895115,
0.2960537672,
0.4667008519,
-0.2733172774,
0.4548918903,
-0.0631880239,
-0.1793991029,
-0.3321992755,
-0.0183036104,
0.1018524021,
0.2767540812,
0.0258171223,
-0.1938590109,
-0.4346552193,
0.0009492957,
-0.4119357765,
-0.2293605208,
0.2667209804,
-0.0196495932,
0.2319186628,
-0.3022166193,
-0.0136109386,
0.0827015787,
0.604323566,
0.2274751365,
-0.6113331914,
-0.0957893431,
-0.2711972296,
-0.0543570779,
0.0031171439,
-0.0121399015,
-0.0782713145,
-0.0949284956,
0.1209615692,
-0.0041258242,
0.2611114681,
-0.5157568455,
-0.1545359343,
-0.2693729699,
-0.3306605816,
-0.1657343954,
0.0088744778,
0.1733438671,
-0.1227077991,
-0.023921594,
-0.0805923119,
-0.0624996498,
-0.087029174,
-0.4723733366,
0.3329066634,
0.0821834803,
-0.1412692517,
0.2438411564,
0.0672450513,
0.1662276536,
-0.0748363957,
-0.1575344354,
0.0955931693,
0.2102027535,
-0.1155331656,
0.1807113737,
-0.6080052257,
0.0346843526,
-0.1527932137,
-0.170164302,
-0.1259255558,
0.1249506027,
0.2668046355,
-0.1199061871,
-0.0775601789,
-0.007668321,
-0.2486654669,
0.1611401886,
-0.4034267962,
0.2401021421,
0.0782013237,
0.382440865,
-0.0752433687,
0.0206573382,
-0.105900228,
0.3067789078,
-0.234362483,
-0.0447141938,
0.3332531154,
0.0632018223,
0.1152674407,
-0.0324214138,
-0.1454819441,
-0.2196078897,
-0.2384518981,
0.0735761523,
-0.1479957104,
0.2077159882,
0.2219296396,
-0.1733208597,
-0.2135239542,
-0.2829012275,
-0.0998251215,
-0.070492126,
0.2614144385,
-0.061059203,
-0.0424311385,
-0.0739280805,
0.5871597528,
0.1026869118,
-0.3105165362,
0.3723961413,
0.3099695146,
0.3586903512,
-0.0578728318,
0.2372397184,
-0.0805931166,
0.0422491618,
-0.164519906,
0.3781081438,
0.3813152015,
0.0955023095,
0.4267747402,
0.2414254397,
0.1826806962,
0.0483613387,
0.4877526164,
-0.3799096644,
-0.323230505,
0.1815265566,
0.0073253177,
-0.1419367492,
-0.024736695,
-0.2579400837,
0.2484675199,
-0.0096228663,
0.1399264336,
0.2654095888,
0.7050764561,
0.3581461608,
-0.126869753,
-0.0840388685,
0.5799838305,
-0.078448236,
0.0841870084,
0.0259596109,
-0.1655385494,
0.2453239411,
-0.1335912049,
0.3411710858,
0.0536649041,
-0.1937478781,
-0.1595652252,
0.2342156768,
-0.0555213317,
-0.391954124,
0.5715662837,
-0.1937374622,
0.253496021,
-0.0119607784,
0.4515075386,
0.0012898133,
-0.1100814641,
0.056078013,
-0.2603829205,
0.0284849443,
0.0159603115,
-0.0350967944,
-0.0087085357,
-0.2876772285,
-0.005697052,
-0.1182491332,
-0.0935559124,
0.144156307,
-0.2230362445,
-0.1301534623,
-0.162804991,
-0.0533419624,
0.2892351151,
0.0271729156,
-0.1011853665,
0.2896775901,
0.2767111957,
0.008763128,
0.223090589,
-0.0712809116,
0.1559557319,
0.4078926444,
0.2308222651,
0.2204177827,
-0.3238397539,
0.0335507505,
0.1033781096,
0.2185636908,
0.0245028548,
-0.2039758414,
0.0428672172,
0.0180428233,
-0.2085193545,
-0.0189311933,
0.0582997315,
0.0315493308,
0.0882594436,
-0.3013586402,
-0.0955066085,
-0.4158667624,
0.1168620661,
-0.1461291164,
-0.2440325767,
0.1773899496,
0.2119813859,
0.0469247289,
0.1775292605,
0.2697132826,
-0.1523235291,
0.0279951785,
-0.0377434939,
-0.0485334732,
0.2075036019,
0.2666629553,
0.3699976504,
-0.1294265836,
0.1282764673,
-0.299310714,
-0.191563338,
0.3360048234,
0.0461662598,
-0.2753660977,
-0.0626001582,
-0.0330113284,
0.3302257657,
0.1161849871,
-0.1143411398,
-0.3779899776,
-0.1741001904,
-0.3674320877,
0.2843796015,
-0.3241876662,
0.048738692,
-0.0589662567,
-0.0965047702,
0.0170056652,
0.3006103933,
0.3198904991,
-0.1643343121,
-0.09181723,
0.1247397438,
0.0523451455,
-0.2019395679,
-0.0616382733,
0.2076041549,
-0.1023826897,
-0.1757220477,
-0.330230087,
-0.3347152174,
-0.1063275263,
-0.2762907445,
-0.0847196728,
-0.4627973139,
0.2229287177,
-0.2785586715,
-0.3798601031,
-0.2714456022,
-0.2555458248,
0.0306692999,
0.3377480209,
0.017266931,
-0.0507557802,
-0.520042181,
0.0258757062,
0.3665561974,
0.3957083225,
-0.1527989507,
-0.1120336801,
-0.2137097865,
-0.013886245,
0.2733905315,
-0.3641582131,
0.0115054613,
0.0598636754,
-0.0064001046,
0.1242170483,
-0.159423843,
-0.3751476407,
0.1692529917,
0.1841903925,
-0.1016343683,
0.0873773843,
0.2274941504,
0.170385763,
0.0299290381,
0.0028875605,
0.0618099645,
-0.0060479413,
-0.1241543368,
0.1541669369,
-0.057062421
] |
https://github.com/huggingface/datasets/issues/3162 | `datasets-cli test` should work with datasets without scripts | > It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
>
> I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
why don't you try to share that info with people, so you can also save some days. | It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
| 75 | `datasets-cli test` should work with datasets without scripts
It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
> It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
>
> I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
why don't you try to share that info with people, so you can also save some days. | [
-0.5560204983,
-0.141455099,
-0.1553225368,
-0.0454636067,
-0.1118019223,
0.0510702282,
0.491317302,
0.3185858727,
0.4026774168,
0.1730815619,
-0.0837669447,
0.0782284811,
-0.1506565064,
0.3814931214,
0.0290266071,
0.197803393,
-0.1345370561,
0.195657894,
-0.0688027143,
0.0441201031,
-0.1408360004,
-0.1069493443,
0.0969229862,
0.0402383171,
-0.2073048055,
-0.150550589,
-0.2179207504,
0.3114548624,
-0.0366933607,
-0.2238075286,
0.3590604961,
0.4466852546,
0.2573336661,
0.3568910956,
-0.0000989236,
0.1222637147,
0.2891542614,
-0.0616441444,
-0.2667553127,
0.0962775126,
-0.3794643283,
0.0972889364,
0.036420662,
-0.3920643628,
-0.2846100926,
0.1487985253,
0.0574817285,
-0.4912444949,
0.1197382584,
0.1843054444,
0.3275879323,
0.5559117198,
-0.3701723218,
-0.3231256008,
-0.0615045205,
0.1970518678,
-0.0800340697,
-0.0369391441,
0.275411278,
0.0829570591,
-0.0381290242,
0.1978679895,
0.0158484355,
0.0665960535,
0.1291847378,
-0.0718485937,
-0.1140082777,
-0.2348294556,
0.0424599275,
0.4118005633,
0.5436509848,
-0.5197176933,
-0.3008645773,
-0.074666746,
-0.1030098274,
-0.1940702498,
0.1533667147,
0.2417723089,
0.0771722347,
0.2190376967,
-0.4076790512,
-0.0850031376,
-0.1312139034,
-0.0931139663,
0.0244527161,
0.036182873,
0.001056965,
0.0602216087,
-0.0285616312,
-0.1386741251,
-0.1320229918,
-0.1464997977,
-0.2558891773,
0.0341240801,
-0.0063421354,
-0.4983391166,
0.0558892787,
0.3896736801,
0.2723722458,
0.3891407251,
0.0642127767,
0.2567555904,
-0.1292242259,
0.086223565,
0.035546083,
0.0904588923,
0.39504987,
0.1496597975,
0.6636332273,
0.300680697,
-0.0415797234,
-0.0104965121,
0.113867797,
-0.0651358813,
-0.1452967674,
0.0006897619,
0.1474986076,
-0.2273816168,
-0.3610028923,
-0.0016843699,
0.1800070405,
0.0097117871,
0.261189878,
0.6791664362,
0.1878274381,
-0.1814537197,
-0.0188497994,
0.1611686647,
0.013686792,
-0.2420445234,
-0.2139464915,
0.2622241974,
-0.0078248829,
0.1103937104,
0.4803422689,
0.016674066,
0.1254927516,
-0.1570510268,
-0.0523338132,
0.1415271312,
0.1869857758,
0.2295868248,
0.2179130763,
0.3386213183,
0.2603668571,
-0.1656479686,
-0.0658718944,
-0.2081974894,
-0.196254909,
0.0986238569,
0.0038630648,
-0.2171616554,
0.0362961739,
0.2491501868,
-0.4209601879,
-0.0635474175,
-0.0909087509,
-0.0210490841,
-0.2158440948,
-0.0624866113,
0.3120270073,
0.0629144982,
-0.0952784345,
-0.0338467769,
0.1318487674,
0.4137845039,
-0.401145339,
0.0573637746,
-0.0279804356,
-0.3918384016,
-0.239628613,
-0.0775593221,
0.0086395741,
0.1331721395,
-0.2681315839,
0.096209757,
0.112004891,
-0.4669944644,
-0.1013240889,
0.1668252349,
0.0333214067,
-0.076651521,
0.052889172,
0.13997747,
-0.1104988158,
-0.1111780703,
-0.4577392042,
0.0256568193,
0.0615881458,
0.1947799474,
-0.0234358478,
-0.3171969652,
0.0971010104,
0.2353201658,
0.1998642236,
-0.1090595797,
0.1773307472,
-0.0601382889,
0.3271968961,
-0.2842559218,
0.0508645065,
0.0507220179,
0.2634808719,
-0.1643545926,
-0.0789751932,
-0.2637186348,
-0.4044252634,
0.4092676342,
0.0029475195,
0.2443298846,
0.0506950654,
-0.3969172537,
-0.1700856835,
-0.0398289934,
-0.1442276984,
-0.1887392849,
0.2112945765,
0.2058692276,
0.3379815221,
-0.2706891894,
-0.2878726721,
0.2489085495,
-0.1752170324,
0.1640067995,
-0.300953418,
0.1791168898,
0.1145630404,
-0.061711356,
0.1204021424,
-0.0322527811,
-0.1270551682,
-0.2945046723,
0.0855399966,
0.5120897889,
-0.0599605069,
0.1390530765,
0.347879082,
0.2529203892,
-0.0419127941,
-0.0737213865,
0.0478790365,
0.1600907296,
-0.0087541332,
0.2519088089,
-0.4751206338,
0.4520224035,
0.194528833,
0.0063482425,
0.0976891965,
-0.0126993097,
0.0922013372,
-0.2902013063,
-0.3776557148,
-0.1977746934,
0.1076750234,
-0.0329754129,
0.2483911067,
-0.0900147781,
-0.2259752899,
0.0459101163,
0.052998893,
-0.2937116921,
0.4414078295,
-0.1138805822,
-0.0558393039,
0.3156949878,
0.2266924381,
0.2140238732,
0.2733525038,
0.2037540972,
0.0366020873,
0.0472545996,
-0.0296583083,
-0.0859852135,
0.1789834946,
-0.1098947152,
-0.0059571583,
-0.2478310019,
0.211905092,
-0.3464792669,
-0.2746472657,
-0.1140614897,
-0.0745498836,
0.2145202756,
-0.4993105531,
-0.1490452439,
-0.2037401199,
-0.0653903708,
0.2671704292,
0.0479254834,
-0.1034547612,
-0.1103023365,
0.2763114572,
-0.0071625221,
-0.1896474212,
0.0315987132,
-0.2146942466,
0.4651940167,
-0.0654139444,
-0.2308568358,
-0.2652415335,
-0.1782328784,
-0.0477478169,
0.2782211006,
0.3075315356,
0.2596980929,
0.4490619302,
-0.2030298114,
0.0297437459,
-0.4068727493,
-0.3205242157,
0.1993655264,
-0.1127406284,
0.1568132341,
0.2713255286,
0.2458334267,
0.1270508468,
0.071486406,
0.1436059624,
-0.3423073292,
-0.1623189747,
-0.1521088183,
0.072790347,
-0.2473236918,
-0.3850037754,
-0.3155544102,
-0.1074415296,
-0.2349248379,
0.3046239018,
0.1232593432,
0.0503760353,
0.1212301999,
-0.0311309453,
0.1270193458,
-0.1406523287,
0.0467273295,
-0.0819102153,
-0.4273729622,
0.2143922895,
-0.4195075929,
-0.2963674963,
0.0663671345,
-0.0584774241,
0.1351302266,
-0.1023875549,
-0.2900459766,
-0.1623850465,
-0.2472111136,
0.3377848268,
0.2033722103,
-0.0923427492,
0.3013337255,
0.0070000058,
-0.1180432141,
-0.1271203905,
0.1413708925,
0.141621232,
-0.2573843002,
-0.0434524305,
-0.1607076973,
0.1140669808,
-0.0693452582,
0.1026129052,
0.0271492656,
-0.1951803565,
0.1565757096,
-0.3529791832,
0.5672581196,
-0.0550588295,
-0.0134187276,
0.0841449648,
0.1242652088,
-0.2929178774,
0.344201386,
0.0643826425,
0.0801120773,
-0.3173031509,
-0.0436256751,
-0.0290379152,
-0.3064875007,
-0.1241285354,
0.1361538619,
0.0093287872,
0.0140340449,
0.2509693205,
-0.1671431214,
-0.15646559,
0.0573711023,
0.2433976084,
-0.0394717008,
-0.1626496166,
-0.5467849374,
0.1087256894,
-0.4469716549,
0.5365664363,
-0.0734286085,
0.0408606976,
-0.1084233001,
-0.0972671881,
-0.119859077,
-0.2993394136,
0.2743920982,
-0.4613479078,
0.2399653345,
0.0243642051,
0.1006260738,
-0.4981114566,
-0.0555294529,
-0.516753912,
0.1889418662,
0.0680698752,
0.5230531096,
-0.0848184377,
-0.1302631199,
0.1934672892,
0.0169609059,
-0.047739964,
-0.2718048394,
-0.2286397219,
-0.2339926362,
-0.3918112218,
0.1311292201,
-0.1262265593,
-0.1279071122,
-0.3821626306,
-0.0536440276,
0.0215398669,
-0.0880311131,
0.3551390469,
0.2924033105,
0.0998856053,
0.1627540439,
0.2011744231,
-0.1381035894,
0.2463753074,
0.1356416941,
0.2810157835,
-0.1368390918,
-0.0219357181,
0.1406519711,
-0.1372807622,
0.3903209269,
0.2690049708,
0.0088695977,
-0.0818733945,
0.0072303908,
0.2270950526,
-0.3662267327,
0.0792412385,
0.0284109004,
0.054518275,
-0.2367366403,
-0.2160350233,
0.4023310542,
0.2491184771,
-0.0591043308,
-0.002410383,
0.1944643855,
-0.40147686,
0.0793891177,
0.0688968971,
0.5644986629,
-0.0900468677,
0.0299594644,
0.1850368679,
0.0223192759,
0.3475962579,
-0.1558879465,
-0.1279419065,
-0.2881123722,
-0.4358127415,
0.0175036229,
-0.0735154375,
0.2494356781,
0.1786139607,
-0.2013189197,
0.3610262275,
-0.1349066347,
0.1894319057,
-0.05482715,
0.3013721406,
-0.4789924324,
-0.0901340544,
-0.1970207095,
0.3617684841,
0.1664935797,
0.1188687906,
-0.0961290002,
0.0573592372,
-0.1911371648,
-0.2006374002,
-0.1088674217,
0.1499258131,
-0.0804668739,
-0.1224598438,
-0.1057270467,
-0.0176074989,
0.1043941677,
0.3287046552,
0.5090165734,
0.2839454412,
-0.2625157535,
0.2285179943,
-0.2369399369,
0.122966215,
0.1158513129,
0.1066795141,
0.2503890395,
-0.0172711778,
-0.2932890654,
0.0880936384,
0.081738919,
-0.026510939,
0.0783383772,
-0.0682438537,
0.0976837203,
-0.3532645702,
-0.091722548,
-0.0751340836,
-0.2300897241,
0.0617848858,
0.2253649086,
-0.0305951443,
-0.0700932667,
0.1809576005,
-0.0348745175,
-0.2096858472,
-0.1518694609,
0.1634615213,
-0.0832331404,
0.0167027507,
0.1602362394,
0.1743724048,
0.0830897763,
-0.4781453907,
0.0908713341,
0.5729696751,
-0.0321596488,
0.1945061535,
0.2028172761,
-0.0879163295,
0.0641047806,
0.2456997782,
-0.044128146,
-0.0117177358,
0.0741887912,
-0.1789865643,
-0.4047599435,
0.2453965396,
0.1712974906,
0.4585820436,
0.0387924649,
0.0358338393,
0.0243375394,
-0.3214709759,
-0.4979774356,
-0.1703961343,
-0.124309577,
-0.1300193816,
0.2752457261,
0.2185587585,
0.2350682467,
-0.267940104,
0.2397231907,
0.0848642141,
-0.2314354926,
-0.3919012845,
-0.0228873342,
0.0809303746,
-0.0667824745,
0.1420300156,
0.1608792394,
-0.0362231582,
-0.1086760312,
-0.2445555031,
0.1714120358,
0.0920747072,
0.0361965448,
0.0130824326,
0.2409070879,
-0.0754891485,
-0.1989673823,
0.0559179299,
0.0139767621,
0.1661684215,
-0.2894153595,
0.1661131829,
-0.2063417435,
-0.035747312,
0.308187902,
0.2321769297,
0.364511013,
0.3080967069,
0.0488511771,
-0.0617169179,
-0.1524421573,
0.1144189984,
0.6125226021,
0.1071145162,
-0.1394580901,
0.1662878096,
0.0317921154,
0.3757101893,
-0.4010276794,
0.2191026062,
0.1502278596,
0.0026858249,
0.3700551987,
0.3175351024,
0.1022136509,
0.0066533941,
0.0534438193,
0.0501492359,
0.431419611,
-0.1473019868,
0.0882876888,
0.2289546132,
-0.3065771461,
-0.1117208302,
0.1049219072,
-0.0392753743,
0.0947430506,
0.1699137688,
-0.106326364,
0.5623797774,
0.0776232779,
0.1343431026,
0.2720279992,
-0.0841133744,
0.1344244331,
-0.0651087239,
0.1618479341,
0.0812877268,
-0.0166242179,
0.445769459,
-0.3772222996,
0.0217263363,
-0.3662545383,
0.1187755615,
0.0301972665,
-0.0301353019,
-0.3276985586,
-0.0533155873,
-0.1294211894,
-0.0888879448,
-0.0423114896,
-0.1734513044,
-0.1990617961,
0.0186851155,
0.0791183561,
0.1044282466,
0.0300916806,
0.1440716386,
0.2146268934,
-0.126344502,
0.1106390879,
0.3408156335,
-0.1004875153,
0.2908492982,
0.3615178764,
0.408236891,
0.0598866679,
-0.0671560615,
0.1793690473,
-0.1978071034,
-0.1391352117,
-0.1207725778,
0.0879035592,
0.0057454682,
-0.085931398,
0.3700795174,
0.3654577732,
-0.1775547564,
-0.0378044732,
-0.0361477137,
0.3211574554,
-0.226530388,
0.2548178434,
0.0132501721,
-0.017219048,
-0.2617574036,
-0.1034540012,
-0.329921186,
-0.0049034827,
0.1311508119,
-0.0715921819,
0.2017822862,
-0.1118740737,
0.1573712975,
-0.1257190853,
0.3956395984,
0.1136801615,
0.0855351016,
-0.096746169,
-0.2538385093,
-0.5815961361,
-0.0453429557,
-0.1271553785,
-0.2012376487,
-0.2917357981,
-0.0039686202,
0.3577848673,
-0.1720459312,
0.195722267,
-0.12028905,
-0.1623525023,
-0.0778202713,
-0.1600474268,
-0.0698794574,
-0.2712059021,
-0.0557336546,
0.1179621816,
-0.2856524289,
-0.0091058211,
-0.0734784231,
0.0608011894,
0.110626407,
0.133889392,
0.2042714953,
-0.455000937,
0.4116404951,
-0.038033884,
0.6453542113,
-0.2171326727,
-0.1411836594,
-0.3390302062,
-0.0468741581,
-0.2812901437,
0.0495660119,
-0.0532142296,
0.1603669524,
-0.0762320459,
-0.0395886153,
-0.0689096153,
0.0075544403,
0.10420876,
0.1880934983,
-0.0616020039,
-0.0439451747,
-0.070901908,
0.0497339144,
0.0721312612,
0.1336094737,
-0.2093808502,
0.1242643371,
-0.0117473435,
-0.194605425,
0.6548578143,
-0.30634588,
-0.1796556264,
-0.1423131078,
0.3104808927,
-0.1432955116,
-0.1988065243,
-0.1930113733,
0.1842104346,
0.1084221527,
0.0114529263,
-0.014049584,
0.1056241691,
0.0407533497,
0.0756882504,
-0.0781683028,
0.2405548096,
0.1208785549,
-0.1795622408,
-0.1916950196,
-0.1428152323
] |
https://github.com/huggingface/datasets/issues/3162 | `datasets-cli test` should work with datasets without scripts | Hi ! You can run the command if you download the repository
```
git clone https://huggingface.co/datasets/huggingface/DataMeasurementsTest
```
and run the command
```
datasets-cli test DataMeasurementsTest/DataMeasurementsTest.py
```
(though on my side it doesn't manage to download the data since the dataset is private ^^) | It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
| 43 | `datasets-cli test` should work with datasets without scripts
It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
Hi ! You can run the command if you download the repository
```
git clone https://huggingface.co/datasets/huggingface/DataMeasurementsTest
```
and run the command
```
datasets-cli test DataMeasurementsTest/DataMeasurementsTest.py
```
(though on my side it doesn't manage to download the data since the dataset is private ^^) | [
-0.5413661599,
-0.1230086237,
-0.0824000537,
-0.0086422274,
-0.1236352697,
0.2065104097,
0.3399679065,
0.4094349146,
0.4431855381,
0.0522724837,
-0.1899446398,
0.0832232535,
-0.2094290704,
0.3715489805,
0.1386322379,
0.1913192123,
-0.1385655254,
0.1844177842,
-0.042357225,
0.038089335,
-0.1440088451,
-0.0470071621,
0.0733570531,
0.0771222711,
-0.1492719501,
-0.1789036244,
-0.1724952012,
0.3012988865,
-0.0357918777,
-0.3550521731,
0.5933485627,
0.4876578748,
0.3083233535,
0.3212812245,
-0.0001084944,
0.1166499481,
0.3062022924,
-0.0898674354,
-0.2739931643,
-0.0753660426,
-0.348796159,
0.0299250185,
0.1927208453,
-0.3817475438,
-0.1775609851,
0.2047632039,
0.0765342787,
-0.3029181361,
0.0904087946,
0.2083657831,
0.2202313244,
0.6419224739,
-0.3167461753,
-0.2536001205,
-0.1344452351,
0.2462203503,
-0.0396216772,
0.0443270355,
0.2999967337,
0.1339146495,
0.1145808846,
0.093921341,
-0.0269208569,
0.1014548466,
0.1905099601,
-0.0633689761,
-0.1636362821,
-0.2358217239,
-0.0049077198,
0.4782272875,
0.5150632858,
-0.6297236681,
-0.2977357805,
-0.1852234602,
-0.1119951829,
-0.2063331157,
0.0725242421,
0.2824870646,
-0.03134818,
0.1760846078,
-0.4396595359,
-0.1498286724,
-0.0929350927,
-0.0881749168,
0.0278895758,
0.0462043472,
-0.0142615242,
0.1022708789,
0.0400921032,
-0.0913674906,
-0.1529488713,
-0.0705154911,
-0.2819611132,
0.2896374464,
-0.1200858206,
-0.5150675774,
0.1366439164,
0.4175721705,
0.3653286099,
0.3775804341,
-0.0761627927,
0.2952551246,
-0.2891989648,
0.1497062743,
0.0455268957,
0.0751167461,
0.380084008,
0.2709918618,
0.6967617273,
0.388227731,
0.0412700847,
-0.0137020238,
0.0418683812,
-0.0405947939,
-0.1412285864,
-0.0779131576,
0.2832303345,
-0.3054703474,
-0.282512188,
-0.0178047214,
0.1899562478,
0.0202892218,
0.2363711447,
0.6728634834,
0.2603141069,
-0.2007037252,
0.0551803894,
0.2154919952,
0.0487368032,
-0.1673454195,
-0.1744375229,
0.158070758,
0.1401267201,
0.1123771295,
0.4933280051,
-0.1058294028,
0.1858787835,
-0.2125649899,
-0.0309232362,
0.0882327333,
0.2068380266,
0.2145854831,
0.1571099758,
0.3748416603,
0.2142895758,
-0.1537416577,
0.0044226497,
-0.1510618478,
-0.2671704292,
0.1064046323,
-0.0970497727,
-0.310398519,
0.1482902616,
0.1283783019,
-0.4986411929,
-0.1044910699,
-0.1500389874,
-0.0543141477,
-0.3174695373,
-0.0733140633,
0.353001684,
0.0649335161,
-0.0168013144,
-0.0277596842,
0.2254769355,
0.6246491075,
-0.2523320615,
-0.0317421257,
-0.0223018117,
-0.4633013904,
-0.3560506403,
-0.1487299204,
-0.011389453,
0.1718815565,
-0.3076067865,
0.1108842418,
0.1650381982,
-0.5764833093,
-0.1707880795,
0.0971558616,
0.0049740537,
0.0429596901,
0.0127092367,
0.1926678568,
-0.1295132339,
-0.0219086092,
-0.4505904019,
0.0671919212,
0.1105329618,
0.1169112399,
0.0614614896,
-0.2584026158,
0.0781960264,
0.3027754128,
0.2132478505,
-0.0859516412,
0.1767589301,
-0.0235747732,
0.3864539564,
-0.2427488863,
-0.0342736207,
-0.0476116203,
0.2266608179,
-0.0831084996,
-0.0255304221,
-0.3104476929,
-0.4002406001,
0.5124017,
0.0053476864,
0.1853505522,
-0.0483598523,
-0.3517081738,
-0.1230363995,
-0.0674449429,
-0.2248211056,
-0.1885865778,
0.1219927371,
0.0495610647,
0.4296854138,
-0.0802945346,
-0.3161464334,
0.2858041823,
-0.1793109626,
0.3170885444,
-0.3419392705,
0.2753559947,
0.2688276172,
0.0300964471,
-0.0174325872,
-0.0375325195,
-0.1331029832,
-0.3903398514,
0.0036381714,
0.558432579,
0.0111556668,
0.213359639,
0.3596337438,
0.3012940884,
-0.0531008877,
-0.0391196162,
0.0453464314,
0.1616413295,
0.0285707731,
0.2330411226,
-0.3761383891,
0.5234043002,
0.2247909904,
0.1424800456,
0.0155806271,
0.0287637766,
0.1479993314,
-0.2390401363,
-0.3827520609,
-0.1276705116,
0.1310299486,
-0.0364959873,
0.2653722465,
-0.23767744,
-0.1200699434,
-0.0696001276,
-0.0376461111,
-0.3425666392,
0.4516458213,
0.0246877447,
-0.1543013602,
0.4261358678,
0.2205684036,
0.2442468554,
0.3664428592,
0.0488374457,
-0.0671454743,
0.2046159357,
0.0309307594,
-0.0291011781,
0.152028054,
-0.1225931719,
-0.0966601446,
-0.317933321,
0.1317303777,
-0.3076863885,
-0.324118346,
-0.0997101665,
-0.1021349058,
0.3214963675,
-0.4172160923,
-0.1341461241,
-0.1398774385,
-0.0763945654,
0.2612319589,
-0.0256476905,
-0.1336644739,
-0.0700409636,
0.120131582,
-0.0189298708,
-0.0149614783,
-0.0443253629,
-0.1983737051,
0.4373171926,
-0.0086918063,
-0.3791735172,
-0.319381088,
-0.0940637216,
0.0148490444,
0.160479635,
0.2452367693,
0.3199106455,
0.370559901,
-0.2720608413,
0.0221048631,
-0.4438971281,
-0.2719179094,
0.1419533342,
-0.116241172,
0.1400317997,
0.4177234173,
0.2430116534,
0.1962135732,
0.2148953229,
0.1365872025,
-0.3857596517,
-0.1105946749,
-0.0416481607,
0.0774405897,
-0.2247446775,
-0.2861838043,
-0.1476282328,
-0.2171431929,
-0.2374385446,
0.3948898315,
0.2241597474,
0.0563082136,
0.0848932937,
-0.0757805556,
0.1537759006,
-0.2241571546,
-0.0302196331,
0.0443238504,
-0.4801726639,
0.1724240482,
-0.3469869196,
-0.1961858869,
0.1837985665,
0.0146244206,
0.1895907521,
-0.0707214698,
-0.2822997868,
-0.2450828105,
-0.2603211999,
0.3904296458,
0.1955580264,
0.0729196593,
0.3131707609,
-0.0803538859,
0.0406461544,
-0.0321366824,
0.154676795,
0.0882172659,
-0.1464571655,
-0.0703835413,
-0.0747547001,
0.0570100807,
-0.0250860825,
0.1151337773,
0.1541653574,
-0.1520203352,
0.1367478967,
-0.3732183576,
0.5896909237,
-0.0117159672,
-0.101388827,
0.0606655553,
0.1238547713,
-0.2760955095,
0.2587570846,
0.0591657385,
0.1919427961,
-0.3296880126,
-0.1784939766,
-0.0080731614,
-0.3082480431,
-0.1546652466,
0.0662520826,
0.1606609672,
0.049063988,
0.2759303153,
-0.1974137425,
-0.1897190064,
0.0645030141,
0.3638358712,
0.0867036134,
-0.0304070823,
-0.4171500802,
-0.1388754696,
-0.5326518416,
0.5522705317,
-0.1082492694,
0.1107390374,
-0.0014419218,
-0.0284938049,
-0.131518662,
-0.2449024469,
0.3490956426,
-0.3924217522,
0.2776245177,
-0.0422869809,
0.0460159145,
-0.5336725712,
-0.0702301562,
-0.4279932976,
0.1940078139,
0.0064864168,
0.5985767245,
-0.1094869152,
-0.1269675344,
0.1209668815,
0.0312364455,
-0.04515668,
-0.1844902486,
-0.2472658306,
-0.2443069965,
-0.4263544679,
0.2265551239,
-0.2120132595,
-0.1222314611,
-0.3578868806,
-0.0147041213,
0.0353027321,
0.0169970281,
0.3031206727,
0.4506680667,
0.1875640005,
0.1348961443,
0.2085059434,
-0.0320939422,
0.0382086076,
0.1337028891,
0.4384463429,
-0.1024273708,
-0.1914416403,
-0.0685050115,
-0.0082975375,
0.3756944537,
0.2298654169,
-0.0531354845,
0.0722613633,
0.0267486963,
0.2607174814,
-0.4470694065,
0.1025946885,
0.0906301886,
0.150727272,
-0.2549285591,
-0.2187040746,
0.4741580784,
0.2600887716,
0.0127587942,
0.0081330016,
0.2340559959,
-0.3921110034,
0.047238756,
-0.0202808455,
0.3776172996,
-0.1202592775,
0.0367544256,
0.1407795697,
0.0573050752,
0.4800611734,
-0.1714732498,
-0.1330725551,
-0.2610975802,
-0.4016034007,
-0.0368519425,
-0.146400556,
0.3629996181,
0.047237996,
-0.2389025986,
0.4240681827,
-0.1802833378,
0.1766716093,
0.0005089432,
0.2257713675,
-0.5631787777,
-0.0394044146,
-0.0935577452,
0.2715343535,
0.0637206957,
0.3244991899,
-0.108638227,
0.0861294046,
-0.1761049479,
-0.3208881319,
-0.2730939984,
0.0347303636,
-0.1390038133,
-0.1755860299,
-0.0329305977,
0.03097599,
0.1955625266,
0.3341123462,
0.5028810501,
0.4157834053,
-0.2952556312,
0.1976239085,
-0.2712419331,
0.0035165653,
0.1349016279,
0.1229605302,
0.1389353424,
0.0676834583,
-0.3645617366,
0.0585664138,
0.0297316331,
-0.0434632935,
0.1480323672,
-0.097793825,
0.0400386602,
-0.2942487895,
-0.1091618538,
-0.160732314,
-0.2871037126,
0.0453821309,
0.1242460907,
0.0479920432,
-0.2025535852,
0.1080336571,
-0.1105413064,
-0.2236170173,
-0.0936839208,
0.1448007971,
-0.1646330506,
-0.0248916149,
0.2134450227,
0.1281764656,
0.2491599768,
-0.4031549692,
0.1236792356,
0.5788231492,
-0.0305722654,
0.2809053361,
0.2708073258,
0.0431923866,
0.0149035109,
0.2508355677,
-0.1111704558,
-0.1099551544,
0.0263495781,
-0.3708604574,
-0.3921734691,
0.2199622393,
0.2439824343,
0.3855350018,
0.0461756773,
0.0969950706,
0.0272315815,
-0.2203558832,
-0.3528926671,
-0.0118406061,
-0.226346463,
-0.0763519257,
0.3297691345,
0.210520789,
0.2504633963,
-0.2544066906,
0.1398502588,
0.1063488424,
-0.2859876454,
-0.2930938005,
-0.0923486874,
0.1191508919,
-0.006017488,
0.1214507893,
0.1918750107,
-0.0473423414,
-0.1387783289,
-0.2553208172,
0.1872211546,
0.0553642102,
-0.0848157853,
0.0248244125,
0.3119637072,
-0.1344112754,
-0.2838261724,
0.0971977487,
-0.0078105,
0.057705503,
-0.3277013898,
0.1940281391,
-0.3106267452,
0.0324780308,
0.1948948801,
0.2663753629,
0.3957354426,
0.1918989271,
0.1467917413,
-0.0529543012,
-0.1334798038,
-0.0035268664,
0.6072291136,
0.204246521,
-0.0873699486,
0.3128263056,
0.0806145892,
0.2235717326,
-0.4176144898,
0.1460507959,
0.1270703077,
-0.020402411,
0.3536040187,
0.3094350398,
0.1916107535,
0.0962275341,
0.0756041855,
-0.0993540436,
0.5268490314,
-0.0783073157,
0.2292532474,
0.3583611846,
-0.3068556786,
-0.1390833706,
0.1047784165,
-0.00721122,
0.0579060875,
0.2206043899,
-0.1628182232,
0.5701130033,
-0.0411328711,
0.0572555177,
0.2402583957,
-0.1970741153,
0.0824786648,
-0.1459093094,
0.1505254805,
0.1094488502,
-0.1509406865,
0.5092464685,
-0.5527724028,
-0.0618382804,
-0.4096120894,
0.1123927534,
0.0721193105,
-0.0064985761,
-0.1799787134,
-0.1228432059,
-0.0467205346,
-0.0899073035,
0.0332728922,
-0.4087987244,
-0.3065041006,
0.0112974001,
0.0578746609,
0.0381117389,
-0.0708599389,
0.2419881076,
0.1707747728,
-0.1657270938,
0.0471253768,
0.1888506562,
-0.1366086602,
0.2790602446,
0.403444916,
0.374751687,
-0.0040644133,
-0.008722729,
0.2713994682,
-0.2647007108,
-0.0225491989,
-0.0487638116,
0.0050571184,
-0.0782291144,
-0.043864347,
0.26583305,
0.2726550996,
-0.1402292103,
-0.0992008597,
-0.2473537922,
0.2895143926,
-0.3207471371,
0.4157846868,
-0.085461095,
0.0386736058,
-0.3129003346,
-0.0552524999,
-0.3613382578,
0.0914196,
0.0888821557,
0.0049414276,
0.1257858425,
-0.0965535715,
0.0928035304,
-0.2120320648,
0.4185079932,
0.2189000547,
0.1720535308,
-0.1239170507,
-0.3414624333,
-0.6115870476,
-0.0746690184,
-0.1432902515,
-0.295167625,
-0.1432836801,
-0.0952222347,
0.2784667313,
-0.1574480832,
0.249666512,
-0.0651185513,
-0.0825497657,
-0.1415586174,
-0.0524640232,
-0.0928154811,
-0.4652142227,
-0.1542057246,
0.0292414557,
-0.2838165462,
0.0441318639,
-0.1553663313,
-0.05173105,
0.1352086812,
0.2869483232,
0.1616971493,
-0.5019664764,
0.5238481164,
-0.0761218369,
0.5918539166,
-0.0355856232,
-0.0536760204,
-0.3872660697,
-0.0025042107,
-0.3064462841,
-0.0487824716,
-0.1872036159,
0.2201763242,
-0.068280071,
-0.1197280288,
-0.1825432777,
-0.0359689519,
0.2032213062,
0.028445771,
0.0014694547,
-0.0957037881,
-0.2427305579,
0.0940640792,
0.2468832284,
0.1932750493,
-0.2032343447,
0.0434327573,
-0.0081376163,
-0.0324077494,
0.6716786027,
-0.3855356872,
-0.1467453986,
-0.2305699587,
0.2845785022,
-0.2586345971,
-0.3168270588,
-0.202399075,
0.1787372828,
0.1396614313,
0.0120422859,
-0.17312859,
0.1633507013,
0.0323236585,
0.0103540281,
-0.0172667392,
0.2483171821,
0.15125826,
-0.1623953134,
-0.1331256777,
-0.0792321116
] |
https://github.com/huggingface/datasets/issues/3162 | `datasets-cli test` should work with datasets without scripts | > Hi ! You can run the command if you download the repository
>
> ```
> git clone https://huggingface.co/datasets/huggingface/DataMeasurementsTest
> ```
>
> and run the command
>
> ```
> datasets-cli test DataMeasurementsTest/DataMeasurementsTest.py
> ```
>
> (though on my side it doesn't manage to download the data since the dataset is private ^^)
Hi! Thanks for the info.
git cannot find the repository. Do you know if they have depreciated these tests and created a new one? | It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
| 80 | `datasets-cli test` should work with datasets without scripts
It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
> Hi ! You can run the command if you download the repository
>
> ```
> git clone https://huggingface.co/datasets/huggingface/DataMeasurementsTest
> ```
>
> and run the command
>
> ```
> datasets-cli test DataMeasurementsTest/DataMeasurementsTest.py
> ```
>
> (though on my side it doesn't manage to download the data since the dataset is private ^^)
Hi! Thanks for the info.
git cannot find the repository. Do you know if they have depreciated these tests and created a new one? | [
-0.479364872,
-0.0350034609,
-0.0811262652,
0.0051559978,
-0.1159430221,
0.2101321816,
0.3284415007,
0.4366992414,
0.3811271787,
-0.0298913866,
-0.1913800538,
-0.0401114896,
-0.1729565263,
0.2411369383,
0.1206410006,
0.1749818772,
-0.135027349,
0.1931911409,
0.0534978993,
-0.0214347504,
-0.0516279489,
-0.0518680587,
0.0147818271,
0.0822285265,
-0.1341723651,
-0.2102360725,
-0.2200964838,
0.2186566442,
-0.0007002344,
-0.2946760058,
0.6724280119,
0.4579099417,
0.2746318281,
0.5644160509,
-0.0001169587,
0.1217297912,
0.3289954066,
-0.0637252033,
-0.3074445426,
-0.0495325029,
-0.3842838109,
0.0348109826,
0.1632794887,
-0.3350887299,
-0.193108961,
0.3004215956,
0.0717747286,
-0.4423837662,
0.0042150579,
0.2623840272,
0.1621758193,
0.6054906249,
-0.327563554,
-0.2601145804,
-0.0860616416,
0.360681951,
-0.0296014119,
0.1400975287,
0.4355514944,
0.1198337525,
0.2278395593,
-0.0790354684,
-0.064925842,
0.0759598166,
0.1600217372,
-0.0480899476,
-0.1634924114,
-0.2541020513,
0.0484856777,
0.4351792037,
0.5665468574,
-0.639146626,
-0.3396841884,
-0.242127642,
-0.1441447884,
-0.2059524357,
-0.001479624,
0.256557554,
-0.0651849359,
0.2072597146,
-0.5502040386,
-0.3302356899,
-0.1711490005,
-0.0751145855,
0.0297767427,
0.0172396395,
0.0429889075,
0.1183331236,
-0.0039443923,
-0.0914930552,
-0.2143329829,
-0.0401225723,
-0.29386428,
0.3311138749,
-0.0440841503,
-0.5796714425,
0.0525047258,
0.3996301889,
0.3417101204,
0.4255423248,
-0.1804390997,
0.2125029415,
-0.3701973259,
0.0718621388,
0.035505861,
0.1443956792,
0.3573252857,
0.3099834025,
0.7413836718,
0.3407742977,
0.0554998703,
-0.0184588172,
0.0020674786,
-0.0340800248,
-0.1378543973,
-0.1220603138,
0.2901415229,
-0.424353987,
-0.2101333737,
-0.0427252539,
0.0878320113,
0.002076661,
0.1401024461,
0.5331293941,
0.3161355555,
-0.1457105875,
0.0696696565,
0.1419329494,
0.0241600778,
-0.2461204678,
-0.1626888514,
0.1233863011,
0.1534829736,
0.1628362834,
0.5111423731,
-0.1238003075,
0.1600503027,
-0.2312074751,
-0.0193462279,
0.1517569274,
0.0308769438,
0.2377657443,
0.0803637952,
0.4198558033,
0.0691685528,
-0.0538456105,
0.0848031044,
-0.2472536266,
-0.2020612955,
0.1089732721,
-0.1685106009,
-0.3066084683,
0.1128855571,
0.0202346724,
-0.5946003795,
-0.1545371264,
-0.3065299988,
-0.0989967883,
-0.2779989839,
-0.1169823036,
0.3799083233,
0.0023628147,
0.0104779508,
0.0062559601,
0.1905447096,
0.6673044562,
-0.3182727396,
-0.0799060911,
-0.1225791574,
-0.3955591917,
-0.3251463175,
-0.0237537455,
-0.0192652121,
0.2276735008,
-0.275620997,
-0.0259550381,
0.1421020776,
-0.6164165139,
-0.1666885316,
0.1011470184,
0.0451457798,
0.1117657796,
-0.0219172444,
0.0548409745,
-0.1657372564,
-0.1598905772,
-0.518399477,
-0.1050226316,
0.0538249612,
-0.0004198065,
0.0058025159,
-0.2623269558,
0.0348795317,
0.2813654542,
0.2489154786,
-0.0782804191,
0.2280697227,
-0.0728461146,
0.3314042091,
-0.227353096,
-0.0244539455,
0.0032445376,
0.3236002028,
-0.00625228,
0.0009979712,
-0.3365167975,
-0.4372734725,
0.5132391453,
0.055004891,
0.2197541296,
-0.1355507374,
-0.260065794,
-0.0559502132,
-0.1874912977,
-0.1966730207,
-0.1220001504,
0.004006316,
-0.0116571225,
0.4840425849,
-0.029755529,
-0.2898126543,
0.2965967953,
-0.0931799486,
0.2591383159,
-0.3018276095,
0.387690872,
0.2953740954,
-0.0051682545,
-0.0604258627,
0.0487630218,
-0.1575043648,
-0.4263755381,
-0.0277422089,
0.5033205748,
-0.0870922059,
0.2198924571,
0.4431920946,
0.408529073,
0.0069717453,
-0.0821101144,
0.0988272578,
0.138995409,
0.0532170236,
0.2253285199,
-0.3482507467,
0.3991465569,
0.3207001984,
0.2061222494,
0.0426955633,
0.0435004793,
0.1085659862,
-0.2083388269,
-0.289839834,
-0.0097506577,
0.1813408583,
-0.024907127,
0.3227076232,
-0.1948351115,
-0.1143600866,
-0.0735566244,
0.0167110115,
-0.4162099063,
0.3858824074,
0.080962725,
-0.1269962639,
0.4530116916,
0.2252416313,
0.2198376507,
0.4197413027,
-0.0323364176,
-0.0960693359,
0.1728773415,
0.0694628283,
-0.0756908581,
0.1355165541,
-0.0800689459,
0.0131209865,
-0.3186015487,
0.1703654528,
-0.2200763822,
-0.1950422376,
-0.0955155641,
-0.0539788306,
0.3701499999,
-0.4548595846,
-0.0483525954,
-0.2283258736,
-0.0422943793,
0.2881700397,
0.0113383783,
-0.1962644011,
-0.0566561818,
0.0680729747,
-0.045441553,
0.0841890648,
-0.0862096176,
-0.1605088413,
0.61071527,
-0.0350477397,
-0.4494145811,
-0.3606438041,
-0.0919734836,
-0.0436111651,
0.0939484164,
0.2737180293,
0.2388509512,
0.2868129313,
-0.2255782932,
-0.028456971,
-0.5197081566,
-0.2781673372,
0.173131004,
-0.1884095669,
0.1885802597,
0.4048229754,
0.2131848186,
0.1991955042,
0.2877585888,
0.1187310219,
-0.3820074797,
-0.0814851597,
-0.0639127493,
0.0036103174,
-0.1854221672,
-0.3005762398,
-0.1368408948,
-0.2462841868,
-0.1156671345,
0.4008357227,
0.222022146,
0.0142197628,
0.1480106264,
-0.050707534,
0.1563612074,
-0.1821071953,
-0.1247432381,
0.1665423363,
-0.4966340959,
0.2169125229,
-0.3015101254,
-0.2235350311,
0.1967260987,
0.1123250872,
0.2349604815,
-0.1439005584,
-0.3738930821,
-0.0956716985,
-0.252073884,
0.4707762897,
0.2826868594,
0.0293982215,
0.3348072469,
-0.1766360849,
0.1475588381,
-0.0998963937,
0.1311476082,
0.1330377609,
-0.1841736287,
-0.005856195,
0.0046642781,
0.1116210297,
-0.0014281046,
0.2266183496,
0.1940642297,
-0.1771641672,
0.0581194758,
-0.332827419,
0.5661162138,
-0.0064240103,
-0.1414975524,
0.0626929775,
0.1598254442,
-0.2756172717,
0.2026332766,
0.1483903676,
0.0824190155,
-0.3873883784,
-0.1388511807,
0.1327444911,
-0.2901994884,
-0.2402643561,
-0.0374483503,
0.1622052342,
0.0413047858,
0.2813718617,
-0.2511049807,
-0.2837243378,
0.0837725624,
0.3452295959,
0.1567606926,
-0.0445184037,
-0.4760005474,
-0.0828227252,
-0.4738692343,
0.5119659305,
-0.152576834,
0.2181716412,
-0.0463749319,
0.0633263215,
-0.128184557,
-0.1218276322,
0.2693394423,
-0.4336760342,
0.3169232607,
0.1304810941,
0.1040175036,
-0.4882800579,
-0.1284143478,
-0.4246091247,
0.2522296011,
0.1265801787,
0.6169086695,
-0.059829887,
-0.2747120261,
0.1572406143,
-0.0187234078,
-0.046009358,
-0.1450942755,
-0.2422820777,
-0.1415169984,
-0.3378936052,
0.1292865127,
-0.207904309,
-0.1636495292,
-0.5372893214,
0.0571325086,
0.11456085,
-0.0208812803,
0.3148558438,
0.293102622,
0.1627696902,
0.1220164299,
0.217276305,
0.027190078,
0.0484643802,
0.2063402683,
0.4092599452,
-0.1128483638,
-0.243743524,
0.0863352045,
0.0374577418,
0.5022614002,
0.241681084,
0.0127140246,
0.0353636518,
0.0433147997,
0.2674463391,
-0.4033515155,
0.0190932248,
0.1162208468,
0.1152614579,
-0.3292270899,
-0.2134397775,
0.4345571697,
0.2806463242,
0.0772980899,
0.02368786,
0.2928904593,
-0.3735483289,
-0.0982289165,
-0.1315419227,
0.4471696019,
-0.0300088339,
-0.0174133033,
0.1233277917,
0.1060130969,
0.4473554492,
-0.1129759252,
-0.1297317147,
-0.218577832,
-0.3174871206,
-0.035266418,
-0.1910948008,
0.4727054834,
-0.0165798683,
-0.2393935621,
0.5035082102,
-0.1905833334,
0.212735936,
0.1479935497,
0.2569821775,
-0.4644755125,
0.1112365574,
0.0540099591,
0.2081635892,
0.0668212473,
0.3620877564,
-0.0591043793,
0.0471373945,
-0.2815744281,
-0.2163070589,
-0.413880378,
-0.0025560663,
-0.0943243802,
-0.2102864981,
0.0369994193,
-0.0433066338,
0.3948568106,
0.2910979688,
0.5699794292,
0.4095742702,
-0.477000922,
0.220587492,
-0.2750602365,
0.0191642307,
0.1917321682,
0.2079214603,
0.1741220802,
0.0943679661,
-0.4581715763,
0.0423940085,
-0.0249062311,
-0.2335121632,
0.1428480893,
-0.1971525848,
0.0693620741,
-0.2641798556,
-0.0302220117,
-0.1117088199,
-0.1731729209,
0.1114595756,
0.0633098707,
0.1461130381,
-0.054466255,
0.0976440683,
-0.1647301316,
-0.2061419487,
-0.1026088148,
0.1143709645,
-0.211263597,
-0.0819631293,
0.2207487077,
0.2252292037,
0.223648116,
-0.3494016826,
0.1576185673,
0.6092323661,
-0.1561484486,
0.2744349539,
0.251283735,
0.1443037093,
0.0354412906,
0.2630445063,
-0.1657286286,
-0.1434891969,
-0.0450450629,
-0.2988829017,
-0.288977921,
0.1923933029,
0.1211023033,
0.3662237823,
0.0005149198,
0.0003606392,
0.0859061256,
-0.2779393494,
-0.2652845085,
0.1459233612,
-0.1941096038,
-0.0987688154,
0.3564692438,
0.2346150875,
0.2183685601,
-0.2842818201,
0.0500748195,
0.0385233238,
-0.2691585422,
-0.1899181306,
0.0235553142,
0.1646507084,
-0.0494090356,
0.0944653451,
0.2255730182,
-0.1192738414,
-0.1642769724,
-0.2119993865,
0.1202398613,
0.0724023804,
-0.065537557,
0.0701047406,
0.4156944156,
-0.1410598904,
-0.2666347623,
0.1480493695,
0.0205577239,
0.1730161607,
-0.2945094407,
0.2292061746,
-0.2299117893,
0.0424273573,
0.1141300648,
0.3046145439,
0.3361420035,
0.2538542151,
0.3059607446,
-0.1517250389,
-0.0617146939,
0.0755746514,
0.4612932801,
0.1678891033,
-0.0827461705,
0.3490104377,
0.127207607,
0.1116141602,
-0.357632041,
0.1224617064,
0.1380374283,
0.2119752765,
0.2832192779,
0.3392560184,
0.2688420713,
0.0302666556,
0.1335744113,
-0.0470024571,
0.6457122564,
0.0472144186,
0.3037049472,
0.3899769783,
-0.2101198733,
-0.1847566813,
0.0356874019,
-0.1108759493,
-0.0658157319,
0.1147168502,
-0.2313553244,
0.5216550231,
0.0066889916,
0.0111776087,
0.2211049646,
-0.0916455984,
0.0608069748,
-0.128625527,
0.1570918262,
0.0462416336,
-0.1870527416,
0.4953322411,
-0.5287744999,
-0.1076180786,
-0.3764925897,
0.0461500287,
0.1277337819,
0.0367554352,
-0.2291922718,
-0.1756920964,
-0.032386899,
-0.1375259161,
0.0086143212,
-0.3681314588,
-0.2344675064,
0.0104295667,
-0.024321897,
0.0385541394,
-0.0107089747,
0.1604253054,
0.2577928901,
0.0016477045,
0.1739138961,
0.1529735923,
-0.2569607496,
0.2417910248,
0.5370516777,
0.3678777814,
-0.0259813685,
0.0351145044,
0.2434671968,
-0.2425286621,
-0.0666164756,
0.1360738128,
0.0721764714,
-0.1717161685,
-0.1353584975,
0.1529992521,
0.1910553128,
-0.0124376742,
-0.1198168918,
-0.2166392952,
0.3105037212,
-0.4997600615,
0.5261437893,
-0.1511202753,
-0.0316329822,
-0.2375213802,
-0.0427713804,
-0.260052979,
0.1249597371,
0.1119067594,
-0.0290755127,
0.0508863628,
-0.1356477588,
0.0434180424,
-0.2056061029,
0.4443266988,
0.2297483385,
0.1776155978,
-0.0639104769,
-0.4300077856,
-0.5975583792,
-0.122233972,
-0.1455686688,
-0.216605708,
-0.0973298848,
-0.064829573,
0.2648509741,
-0.2127644867,
0.3148955107,
-0.2280939519,
-0.0320452154,
-0.1664833128,
-0.0984801203,
-0.104598783,
-0.3927047551,
-0.0753477514,
-0.0306841861,
-0.2534487247,
0.1268341243,
-0.2379113138,
-0.1396992356,
0.169139564,
0.313467294,
0.1937122345,
-0.4649227858,
0.4762014151,
-0.0623096637,
0.5154677033,
0.1602695435,
-0.1435455084,
-0.4768097997,
0.0137848491,
-0.2458182871,
0.0051389961,
-0.2918132842,
0.2075524628,
-0.1772786081,
-0.0906530693,
-0.1478045136,
-0.1201316193,
0.1697137803,
0.101568982,
-0.063757211,
-0.2017751783,
-0.2493602037,
0.0849775374,
0.2657480538,
0.0798062831,
-0.2896557748,
0.1070987806,
-0.0371279381,
0.0906492174,
0.7071253657,
-0.4012714922,
-0.1127969772,
-0.3211992979,
0.2711657286,
-0.2272179276,
-0.3832933009,
-0.1801048666,
0.0404850766,
0.2020744234,
0.1336332709,
-0.1684301347,
0.2274364829,
0.0371008888,
0.0032369194,
0.0116431182,
0.3107787669,
0.0631340668,
-0.1640592366,
-0.037664149,
-0.0615557581
] |
https://github.com/huggingface/datasets/issues/3162 | `datasets-cli test` should work with datasets without scripts | I think it's become private, but feel free to try with any other dataset like `lhoestq/test` for example at `https://huggingface.co/datasets/lhoestq/test` | It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
| 20 | `datasets-cli test` should work with datasets without scripts
It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
I think it's become private, but feel free to try with any other dataset like `lhoestq/test` for example at `https://huggingface.co/datasets/lhoestq/test` | [
-0.6349616647,
-0.015622884,
-0.1090960577,
-0.0938599855,
-0.1955115199,
0.1658551991,
0.4447169006,
0.418176353,
0.5121309161,
0.0517273992,
-0.1489698589,
0.1513028592,
-0.2129505575,
0.3969887495,
0.1485297382,
0.2338594943,
-0.1907198727,
0.1554764658,
-0.0101322839,
0.0428648703,
-0.1532212943,
-0.1193446442,
0.0233733505,
0.0961474851,
-0.2027212381,
-0.2144661993,
-0.1602947712,
0.2837403417,
0.0266019106,
-0.3098112047,
0.5493774414,
0.5170651674,
0.3770485818,
0.2661830187,
-0.0001052348,
0.1520181596,
0.3456896842,
-0.0492839962,
-0.3078457117,
-0.0791102648,
-0.4322426319,
0.0540609322,
0.1815714687,
-0.4128519595,
-0.1894223243,
0.241694957,
0.1010980979,
-0.4203227758,
0.0084341969,
0.2326943725,
0.2437994629,
0.5983244777,
-0.4993756711,
-0.2506771982,
-0.0888077617,
0.3069199622,
-0.0803092569,
-0.037842609,
0.3784545958,
0.1098655611,
-0.0198185388,
0.0767709613,
-0.0302636418,
0.005323377,
0.1549844444,
-0.1423495114,
-0.2348428816,
-0.1867734194,
-0.0433787666,
0.4399003088,
0.5971587896,
-0.613730967,
-0.2141862363,
-0.0962431356,
-0.1684594303,
-0.1439333707,
0.1592624187,
0.1977106035,
0.0797144398,
0.2201583236,
-0.4162267745,
-0.1500199586,
-0.0629231408,
-0.1147260964,
0.0867128968,
0.0271084141,
0.0842200667,
0.1496915966,
-0.0206317808,
-0.1147980317,
0.0095369546,
-0.1054158583,
-0.360853672,
0.1700251997,
-0.148167938,
-0.5458719134,
0.1356850266,
0.4645483196,
0.3018706441,
0.4313430488,
-0.0286346078,
0.3419169486,
-0.2586277425,
0.1805218607,
0.0684603825,
0.0772537664,
0.4929505587,
0.2716990709,
0.8174999356,
0.2722613811,
0.0263105147,
0.010955154,
0.0467688851,
-0.1111158431,
-0.1623900384,
-0.0198536702,
0.221060738,
-0.2459720671,
-0.304731369,
0.0067762006,
0.1816070527,
-0.0104510514,
0.3082920313,
0.588518858,
0.370560199,
-0.1555695087,
0.0778784677,
0.1878981888,
0.1163261235,
-0.2642419338,
-0.1708344668,
0.2051253468,
0.052877482,
0.1440213472,
0.5038613677,
-0.0188219398,
0.1394022107,
-0.1922034472,
-0.0801690072,
0.1044010967,
0.2321356386,
0.275509119,
0.109834291,
0.3066083193,
0.2562093735,
-0.198402524,
-0.0736663267,
-0.1485275328,
-0.2028269619,
0.2178043276,
-0.1322737485,
-0.2935732603,
0.1396027803,
0.1420992911,
-0.4787720442,
-0.0989884436,
-0.2367622852,
-0.0171510428,
-0.3649939001,
-0.0757328644,
0.3593789637,
0.0592296422,
-0.0656946152,
0.057108365,
0.0725715905,
0.5406170487,
-0.3243825734,
0.0640751943,
-0.0349357091,
-0.358396858,
-0.351880312,
-0.2167250961,
-0.0265980866,
0.2199655622,
-0.3085411489,
0.1331959814,
0.260179311,
-0.5816075206,
-0.097808525,
0.1787861288,
0.0196947996,
-0.0775293484,
-0.041312024,
0.1964691877,
-0.1223291159,
-0.0951325074,
-0.5069361925,
0.0292955376,
0.1181308851,
0.1422333121,
0.0660163313,
-0.22602202,
0.0428343005,
0.3173207343,
0.2591690123,
-0.0856143683,
0.1527501196,
-0.0001812296,
0.3328506947,
-0.2455344796,
0.0083030006,
-0.0124217272,
0.2023593038,
-0.1461532265,
-0.0107802832,
-0.3476919234,
-0.4025420249,
0.4919831455,
0.0445285402,
0.1811459959,
0.129301846,
-0.3338459432,
-0.0582203418,
-0.0592689104,
-0.1952443123,
-0.1086967662,
0.1327033043,
0.0883661062,
0.3998383284,
-0.1451084465,
-0.3349274695,
0.2142729759,
-0.1948883981,
0.2074405551,
-0.3240233064,
0.241045326,
0.2089908123,
-0.0078231068,
-0.0580035374,
-0.0895791873,
-0.1550445557,
-0.3532865942,
0.0164059121,
0.5282899141,
0.0249820389,
0.1572016776,
0.4234714806,
0.3124661446,
-0.0616561919,
-0.0136377625,
0.0679693669,
0.0882854015,
-0.0300239455,
0.267108798,
-0.4263918102,
0.4767919481,
0.175615415,
0.0922695175,
-0.0618219934,
0.0195897445,
0.1083802432,
-0.2485020906,
-0.3831196427,
-0.0856604353,
0.1401788592,
0.0518053472,
0.3296488225,
-0.2115803063,
-0.1017910168,
-0.076050587,
-0.0477187559,
-0.3409608305,
0.4847202301,
-0.005622881,
-0.0418778993,
0.39827618,
0.2810363173,
0.2187139839,
0.3610835373,
0.0640065297,
-0.0825088546,
0.0958380848,
0.0297178123,
-0.0672447085,
0.1428799331,
-0.1435713321,
-0.0556562953,
-0.3013386428,
0.1822006106,
-0.3005087376,
-0.351808846,
-0.1882082373,
-0.0146274166,
0.3050138056,
-0.3962845206,
-0.1027283221,
-0.2098784596,
-0.0112025673,
0.3378655016,
0.0514789186,
-0.0602035411,
-0.0910098776,
0.2210658193,
-0.0213461313,
-0.1056040227,
0.042026177,
-0.1354057789,
0.5118540525,
-0.062909171,
-0.3071703911,
-0.3978359103,
-0.1404346377,
-0.029959945,
0.1919421256,
0.3309630752,
0.2827973068,
0.295866251,
-0.2353933752,
0.0389536992,
-0.487745285,
-0.3105125129,
0.1652044505,
-0.0434244871,
0.1275436878,
0.3720420599,
0.1973076612,
0.1784802079,
0.2101622969,
0.0847171471,
-0.330413729,
-0.0946998969,
-0.0911656618,
0.1234380677,
-0.2418702096,
-0.3103995621,
-0.1595093012,
-0.0952495039,
-0.2647661269,
0.2971676588,
0.088508375,
0.0346280076,
0.010862981,
-0.0543140173,
0.127102226,
-0.1411782801,
-0.107542403,
0.0328505486,
-0.4495217502,
0.1861077249,
-0.3902970552,
-0.1898952425,
0.1061627865,
-0.0028580341,
0.1267162412,
-0.0889585689,
-0.2976307273,
-0.1873643696,
-0.2431079447,
0.3567127585,
0.2126808017,
-0.0947331041,
0.3040802181,
-0.030276455,
0.0556255393,
-0.028534906,
0.1254733205,
0.1214327663,
-0.1719692647,
-0.1267796904,
-0.0094391983,
0.1257776916,
-0.0663022324,
0.0089810332,
0.0165891722,
-0.1502205729,
0.1481196135,
-0.3247400224,
0.5599179864,
-0.0266282465,
-0.0103834411,
0.0813281089,
0.1290678829,
-0.3409589231,
0.281393677,
-0.0055742869,
0.0755367577,
-0.3123444319,
-0.220115751,
0.1367589086,
-0.2864634097,
-0.0805101618,
-0.0777525008,
0.0903158039,
0.0893822312,
0.284717232,
-0.1747030169,
-0.1717820615,
0.0494234748,
0.2739030123,
0.142681852,
-0.0718173534,
-0.5136981606,
-0.0682118014,
-0.4679313302,
0.520382762,
-0.1278890222,
0.1173157245,
-0.0717923269,
-0.0754726827,
-0.1495611668,
-0.1943586916,
0.3213203549,
-0.5174272656,
0.2540282607,
-0.0645341128,
0.0933967009,
-0.5007305145,
-0.09899012,
-0.4244416952,
0.2204829603,
-0.0340902843,
0.5938111544,
0.0085982783,
-0.1178360879,
0.1285704821,
-0.0873457268,
-0.0523237474,
-0.2706024647,
-0.1691595018,
-0.1750101894,
-0.4203717709,
0.1805321723,
-0.1685889363,
-0.1879451722,
-0.383325994,
-0.0408519581,
-0.001762139,
-0.007330453,
0.2909401059,
0.4402931631,
0.0946125761,
0.1266629696,
0.215639025,
-0.1426876932,
0.1377512217,
0.1488365084,
0.3170568049,
-0.1281783432,
-0.1298315376,
0.1417138129,
-0.0692166239,
0.4555887878,
0.2027916908,
0.004418185,
-0.0186317451,
-0.1022512987,
0.1592354327,
-0.4332312047,
0.0575307012,
0.0163209457,
0.1788257807,
-0.2435853332,
-0.1572884172,
0.5065004826,
0.2899907827,
0.0022073472,
0.0236755498,
0.1733062565,
-0.4135262668,
0.0980955064,
0.0166386738,
0.3518741131,
-0.087964572,
-0.0573572926,
0.0787213519,
0.0943018794,
0.390473634,
-0.2309655845,
-0.1643287838,
-0.304900974,
-0.4228173792,
-0.0430345908,
-0.1171372756,
0.3268010914,
0.1550820172,
-0.2085444331,
0.3691594601,
-0.1423933506,
0.1879552007,
-0.0126952864,
0.2780180871,
-0.5418253541,
-0.0571589768,
-0.0367340185,
0.296565026,
0.0686635897,
0.2135204077,
-0.1078891903,
0.0875744969,
-0.1436042339,
-0.227054432,
-0.2230734229,
0.0352772437,
-0.0724152848,
-0.1461590677,
-0.0536607616,
0.0257573705,
0.2412907481,
0.4226911068,
0.5001099706,
0.4169626534,
-0.2251862288,
0.2589728534,
-0.2474811971,
0.103474021,
0.1523017436,
0.0761571452,
0.1257748306,
0.0697061121,
-0.3961372077,
0.0464832038,
0.0323047414,
-0.062724188,
0.1424716115,
-0.0611305051,
0.0923726186,
-0.2915135622,
-0.0858308375,
-0.1457287222,
-0.2704384923,
0.0546516366,
0.1518953145,
-0.0532365888,
-0.0997863859,
0.1126872823,
-0.1075170189,
-0.1948668659,
-0.0918560848,
0.038032569,
-0.1538845599,
0.0780847892,
0.1276378632,
0.1498963088,
0.24308303,
-0.4133253098,
0.2017846704,
0.6265671849,
-0.0073042712,
0.2587257028,
0.1934636235,
-0.0831978023,
0.0302378908,
0.2335290015,
-0.1992537826,
-0.0885405466,
0.0264462214,
-0.2837925553,
-0.3660646677,
0.2583681643,
0.2189356685,
0.4057940841,
0.0733053759,
0.0178694949,
-0.0201342274,
-0.2311581522,
-0.3712378144,
-0.1168575734,
-0.2029361427,
-0.0502828695,
0.2505171299,
0.2736834586,
0.2147603482,
-0.2115203589,
0.1097377613,
0.1390108913,
-0.1854957193,
-0.3113823235,
-0.0162573606,
0.0816496164,
0.0185381714,
0.1405898631,
0.1399844438,
-0.0670028701,
-0.1150765345,
-0.2970415056,
0.1240470484,
0.0441905111,
-0.0476224609,
0.0466157123,
0.3274998367,
-0.1754431129,
-0.2695163786,
0.1365090162,
0.0376977175,
0.0854660273,
-0.3894038498,
0.2415093482,
-0.2084577233,
0.012637252,
0.1733783185,
0.3094399571,
0.3888187706,
0.2946208119,
0.0597880632,
-0.0108669437,
-0.1187819839,
0.0545631759,
0.559504509,
0.2224180698,
-0.1017280146,
0.2430631667,
0.0300969947,
0.2614355385,
-0.4057753086,
0.130697161,
0.1455518007,
0.0148851527,
0.3790805936,
0.2947347462,
0.2034553289,
0.0276057944,
0.1221250221,
-0.0463344306,
0.5097808838,
-0.1397941411,
0.2052341849,
0.2887136936,
-0.413400948,
-0.1396104246,
0.1335634589,
-0.070722416,
0.0669135079,
0.270137161,
-0.1082062051,
0.5951467752,
0.0515932366,
0.1029848456,
0.2829141915,
-0.1528023034,
0.1351535022,
-0.176237464,
0.1580617726,
0.0111523177,
-0.0568182766,
0.3486272991,
-0.475466013,
-0.0260987934,
-0.3772876263,
0.0283629186,
-0.0348628014,
-0.0175744295,
-0.2743165493,
-0.0543171503,
-0.0569275022,
-0.0556463748,
-0.0143253524,
-0.2434592843,
-0.2827730775,
-0.0010202281,
0.096757248,
0.1702115089,
0.0368453451,
0.2229553163,
0.1201604605,
-0.1251189262,
0.1192259714,
0.1574522406,
-0.1617499441,
0.3279164433,
0.3597603738,
0.2893646955,
0.0176707655,
-0.018680593,
0.2362277806,
-0.3025134206,
-0.0474936329,
-0.0808266252,
0.0437692888,
-0.0956297591,
-0.0804746151,
0.2948974371,
0.2957244813,
-0.1099527329,
-0.016743714,
-0.1317474544,
0.3241463602,
-0.2619411945,
0.3264961839,
0.0319458246,
0.019556677,
-0.2829954624,
-0.0510200113,
-0.224517554,
0.0758508146,
0.1167235672,
-0.049056273,
0.1394385248,
-0.1228614002,
0.1122664586,
-0.226881966,
0.397905618,
0.1717202067,
0.033472728,
-0.1079101041,
-0.3395608366,
-0.5162068009,
-0.0350178964,
-0.1426277906,
-0.2363325059,
-0.1512056738,
-0.1173838377,
0.2939170599,
-0.2250099182,
0.2417785823,
-0.0955112278,
-0.1322739869,
-0.0915610492,
-0.1119909957,
-0.0989409164,
-0.4760596156,
-0.140844956,
0.0257380214,
-0.3250703514,
0.0366301648,
-0.026670618,
-0.047303237,
0.0739455968,
0.1563083529,
0.2140424848,
-0.4978529513,
0.4984137714,
-0.0432549268,
0.5919750333,
-0.0637672842,
0.0147719476,
-0.4227671623,
-0.0595790818,
-0.2806633413,
-0.0503264926,
-0.1726281047,
0.1009553522,
-0.0996003225,
-0.0149802156,
-0.151379019,
-0.0618801191,
0.1005357802,
0.1608349979,
-0.0623905361,
-0.1635408551,
-0.2490866482,
0.1520661414,
0.1909784228,
0.1564708054,
-0.1269189715,
0.0436761416,
0.0015958535,
0.0173067767,
0.6020887494,
-0.3153110445,
-0.178431049,
-0.2104119956,
0.2067923546,
-0.2540051639,
-0.2588985264,
-0.143404305,
0.101984255,
0.1275512129,
0.0352285542,
-0.0805321112,
0.1456778049,
0.1271007508,
0.0697417706,
-0.0423904583,
0.240783602,
0.1645498276,
-0.127123788,
-0.1818720698,
-0.1118130311
] |
https://github.com/huggingface/datasets/issues/3162 | `datasets-cli test` should work with datasets without scripts | > I think it's become private, but feel free to try with any other dataset like `lhoestq/test` for example at `https://huggingface.co/datasets/lhoestq/test`
your example repo and this page `https://huggingface.co/docs/datasets/add_dataset.html` helped me to solve.. thanks a lot | It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
| 35 | `datasets-cli test` should work with datasets without scripts
It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
> I think it's become private, but feel free to try with any other dataset like `lhoestq/test` for example at `https://huggingface.co/datasets/lhoestq/test`
your example repo and this page `https://huggingface.co/docs/datasets/add_dataset.html` helped me to solve.. thanks a lot | [
-0.5352520943,
-0.0844733566,
-0.0369245596,
-0.0430360436,
-0.0821811184,
0.1424030811,
0.3522939682,
0.350266397,
0.471251756,
0.0475401841,
-0.2139712125,
0.1264723837,
-0.1820226461,
0.4219508171,
0.1478932202,
0.1489329487,
-0.1257575899,
0.1198425442,
-0.0355072618,
0.0078229327,
-0.170625627,
-0.0397808999,
-0.0034138323,
-0.0034461166,
-0.199375838,
-0.1791825891,
-0.1679856926,
0.3011693656,
-0.0402841754,
-0.264187932,
0.6000772715,
0.4568466246,
0.3752203882,
0.3984924555,
-0.0001096238,
0.1531713307,
0.330619067,
-0.1126227379,
-0.3055996895,
-0.2000808716,
-0.4102606773,
0.0505572185,
0.1724767238,
-0.3441170156,
-0.224861756,
0.2500852942,
0.0557852313,
-0.3859578371,
0.0953368098,
0.2396575809,
0.2185448259,
0.6243332624,
-0.3937692046,
-0.2925622761,
-0.0442795046,
0.3428721726,
-0.1052313596,
0.080253914,
0.4130093157,
0.1383512616,
0.026515631,
0.0972137451,
-0.0214721784,
-0.007979787,
0.1640399396,
-0.1041519567,
-0.2099271268,
-0.2286207825,
-0.0043634106,
0.4416224062,
0.5569643378,
-0.6281045079,
-0.2534693182,
-0.1140449047,
-0.1352104545,
-0.1855724007,
0.1637004316,
0.2285470963,
0.1023689061,
0.1975899488,
-0.5202792883,
-0.124502413,
-0.0780536383,
-0.0868510157,
0.1477105319,
-0.0216985084,
-0.0010332841,
0.1484970003,
0.0187470131,
-0.1658629626,
-0.2735183835,
-0.0772246942,
-0.3841665387,
0.2764622569,
-0.1351078898,
-0.4910595417,
0.1121809408,
0.4507444501,
0.3981645405,
0.4771330059,
-0.152489081,
0.333953172,
-0.2721913755,
0.1690146476,
0.0371527486,
0.156771183,
0.5104632974,
0.3090960085,
0.7483820319,
0.3974912763,
0.0657340065,
-0.0442641303,
0.0495797731,
-0.0815345049,
-0.2495727092,
-0.1151917428,
0.2799653113,
-0.2725791335,
-0.2518109977,
0.0089742551,
0.0825766623,
-0.0268879328,
0.3041673601,
0.6570934653,
0.3366855979,
-0.2402463406,
0.1121596992,
0.2946691215,
0.02248949,
-0.2291640341,
-0.2005655169,
0.184391439,
0.0221115518,
0.2006014884,
0.5381636024,
-0.0779385269,
0.2322961837,
-0.1376287043,
0.0249044448,
0.079287827,
0.1404271126,
0.2700876296,
0.0160760041,
0.320810169,
0.2818191946,
-0.0789420009,
0.0212112553,
-0.2050208449,
-0.1804388016,
0.148975715,
-0.1530311406,
-0.3082695007,
0.0894552544,
0.0978144258,
-0.5159095526,
-0.080804877,
-0.3172414005,
-0.022619212,
-0.3226178885,
-0.0586472228,
0.3460634053,
0.097212635,
-0.0718269646,
0.0584882759,
0.1700268537,
0.6006402969,
-0.2232012004,
-0.0424815342,
0.040983934,
-0.390419066,
-0.2952343822,
-0.1417485923,
-0.023025278,
0.1581069976,
-0.3337391615,
0.0913023278,
0.2215822935,
-0.6308199763,
-0.1567745507,
0.1938843429,
0.0364098102,
-0.0170597266,
-0.0467477776,
0.1000301316,
-0.1344302297,
-0.0278262999,
-0.5280154943,
-0.0062048882,
0.1411051154,
0.1340728551,
0.0312823988,
-0.1841890514,
-0.0012388694,
0.2970657647,
0.1502645761,
-0.0422059894,
0.1067043766,
-0.0646803156,
0.3414488733,
-0.2153328061,
0.0692404732,
0.0446432568,
0.3650635481,
-0.034727864,
0.0209489595,
-0.3609852195,
-0.4852696955,
0.4834527671,
0.0413011163,
0.2644349337,
0.0075487373,
-0.3221194446,
-0.1236600503,
-0.0584874824,
-0.2611741424,
-0.2313586622,
0.0760404766,
0.041297026,
0.4343160987,
-0.097770527,
-0.3058804274,
0.2908141017,
-0.1276756376,
0.2741718888,
-0.3858568072,
0.2956766486,
0.1645812541,
-0.0348869227,
-0.0357155614,
-0.032537587,
-0.0916738063,
-0.3854190409,
0.0171200335,
0.5513330102,
-0.0563166142,
0.1506065428,
0.4141300321,
0.2657605708,
-0.0017748864,
-0.0486010686,
0.0628899857,
0.0316783153,
0.0035995024,
0.2473423779,
-0.4466792941,
0.4576911032,
0.1665409058,
0.1668150425,
-0.0561286435,
0.059674032,
0.1559274644,
-0.2676961124,
-0.3420618176,
-0.1192647368,
0.1617529094,
0.0163351614,
0.3559250832,
-0.2275564969,
-0.0893081799,
-0.092050001,
-0.038876541,
-0.3215031028,
0.363648653,
0.0149716483,
-0.1073401496,
0.3896724582,
0.280601263,
0.2055968344,
0.3644350171,
0.0478178672,
-0.0849502385,
0.1253391355,
0.0216462612,
-0.0789138675,
0.0850758031,
-0.2042115033,
-0.0479324274,
-0.2641329467,
0.1886254251,
-0.301045686,
-0.3341762424,
-0.1452606916,
0.0171618778,
0.3333784044,
-0.4020009935,
-0.0968647525,
-0.2364291698,
-0.0710404292,
0.2520613074,
-0.0257670935,
-0.1899444312,
-0.0725030228,
0.1589695066,
-0.0260070655,
-0.0373161249,
0.0910710841,
-0.0313778408,
0.4296781421,
-0.0548360385,
-0.366078347,
-0.3848161995,
-0.0465314575,
-0.0668186843,
0.1406890601,
0.3174902201,
0.2436401546,
0.3353520334,
-0.2912318707,
-0.0266078506,
-0.4996435046,
-0.3579374254,
0.1856776476,
-0.1180996224,
0.1858185381,
0.3670450449,
0.1555399895,
0.1794202328,
0.2078726292,
0.2094283402,
-0.3292770982,
-0.1392238438,
-0.0714933053,
0.1166489869,
-0.1633934826,
-0.3490849137,
-0.155714795,
-0.0619169287,
-0.2283777446,
0.3526123166,
0.1288238615,
-0.0002531667,
0.0566853397,
-0.0109894723,
0.1717435122,
-0.1755267531,
-0.1117692515,
0.0257779639,
-0.4410734475,
0.2065199018,
-0.3786632717,
-0.2555679083,
0.2139501125,
0.0350180455,
0.1448812038,
-0.1034577042,
-0.305128634,
-0.2580840588,
-0.2489454448,
0.3965068161,
0.2493255883,
-0.0004035767,
0.3757329285,
-0.0887726322,
0.1111692712,
-0.0718501508,
-0.0236778371,
0.1959436089,
-0.221152693,
-0.0307811052,
-0.0360925123,
0.2569292486,
-0.1146406233,
0.1677816957,
0.1184657365,
-0.1468904614,
0.1615324914,
-0.3532540202,
0.5700923204,
-0.022405047,
-0.0663733706,
0.0563575588,
0.1657962501,
-0.2623914778,
0.2763615847,
0.0575284623,
0.1465132236,
-0.3083451092,
-0.2013071775,
0.1558080614,
-0.27499789,
-0.1256673634,
-0.0495285429,
0.1098202616,
0.049643252,
0.2550658286,
-0.2072996497,
-0.1520729214,
-0.0016638075,
0.3608169854,
0.1492611021,
-0.0065417946,
-0.5427402854,
-0.0741951689,
-0.5358210802,
0.532713294,
-0.1808786392,
0.0948255286,
-0.066785492,
-0.0536984913,
-0.0775655881,
-0.1383061558,
0.3655115366,
-0.3992891014,
0.2350694537,
-0.026508864,
-0.0343623124,
-0.4682206511,
-0.0992115512,
-0.4185922444,
0.2656491399,
0.0348206908,
0.6506257653,
-0.0910632461,
-0.1879068166,
0.1620882154,
-0.0873211101,
-0.0112925628,
-0.2965224683,
-0.2534057796,
-0.1984960735,
-0.4539927244,
0.1461338252,
-0.1519200802,
-0.1200232059,
-0.3871976733,
0.015643023,
0.0458010733,
-0.0039438126,
0.3214632869,
0.3453355134,
0.1638670862,
0.1857993603,
0.2512820959,
-0.1137490049,
0.1756738871,
0.2063340992,
0.4264637232,
-0.1395699978,
-0.2258944958,
0.0723686814,
-0.0321662948,
0.4347594082,
0.2038635164,
0.0492095239,
-0.012777484,
-0.0391219035,
0.2097368687,
-0.4442999661,
0.0567303225,
0.1154801175,
0.1554459929,
-0.2576219141,
-0.1555764526,
0.4710496962,
0.2268991321,
0.0714230612,
-0.0147128738,
0.3002007902,
-0.3533132076,
0.0494767949,
-0.0853473693,
0.4470492303,
-0.1178418696,
-0.0712645426,
0.1510590166,
0.0646589994,
0.4617683291,
-0.218396157,
-0.1174949482,
-0.3018926084,
-0.3284068704,
0.0097770989,
-0.1172267944,
0.362295121,
0.0453382544,
-0.2250383645,
0.3488200605,
-0.1537266374,
0.2122618407,
-0.0434740707,
0.2584909201,
-0.4772861004,
-0.0793426037,
-0.0837518275,
0.2625821829,
0.0945446417,
0.2594003081,
-0.0774252638,
0.0352347568,
-0.2238553464,
-0.2817911804,
-0.2492170334,
0.062872313,
-0.106033884,
-0.2176525593,
0.0935830623,
-0.0317471474,
0.3617357612,
0.4261991382,
0.4954686761,
0.3540610075,
-0.329924196,
0.2295309752,
-0.2872458994,
0.005449926,
0.0898802355,
0.0979284346,
0.1240886748,
0.0379282162,
-0.4170820415,
0.0209087394,
0.0309065655,
-0.0504889302,
0.1129966974,
-0.0874563456,
0.0662151724,
-0.3635071218,
-0.1362905651,
-0.0859970003,
-0.1549568623,
0.0416666791,
0.1191164777,
0.0376611538,
-0.1701542735,
-0.0025853063,
-0.1233403608,
-0.1919615418,
-0.1414488405,
0.097898908,
-0.203232646,
0.0174697023,
0.1984185576,
0.1966523081,
0.2304646522,
-0.3517729044,
0.1292426139,
0.6761021018,
-0.16037485,
0.1862417758,
0.2977564931,
-0.0226881057,
0.050965745,
0.2496499866,
-0.2360009551,
-0.1436100453,
0.1050316244,
-0.259326607,
-0.3908262253,
0.2066498697,
0.1259828061,
0.308550626,
0.0353097357,
0.0785990059,
0.0424516983,
-0.1619032919,
-0.330457747,
-0.0681401342,
-0.249799192,
-0.0594980419,
0.3410486877,
0.2404636741,
0.2818039358,
-0.1846935451,
0.0764128342,
0.0824804381,
-0.282022208,
-0.2419953644,
-0.0205353666,
0.1020437106,
0.0226232708,
0.1022518575,
0.156858325,
-0.0381187759,
-0.1194544435,
-0.2820378542,
0.1754017472,
0.096055761,
-0.0231424924,
0.0581666306,
0.3500106633,
-0.1333436817,
-0.2533506155,
0.0672846511,
0.0478739925,
0.106133692,
-0.3249704242,
0.1430715322,
-0.2620941401,
0.0215179622,
0.1065826118,
0.2320857346,
0.3895473182,
0.283071667,
0.1502642781,
-0.0671370551,
-0.067513153,
0.0518246405,
0.5864052176,
0.1589487195,
-0.1262129545,
0.2832664847,
0.1050888374,
0.2047458142,
-0.3719707727,
0.1842994392,
0.2384249717,
0.0287879184,
0.345720917,
0.3372752368,
0.1675553471,
0.0985531807,
0.1812947989,
-0.0183321256,
0.5337643027,
-0.0733892024,
0.2194360495,
0.1879998893,
-0.4173637331,
-0.1278665066,
0.1554086208,
-0.0289636254,
0.0600401126,
0.1381123662,
-0.2088903934,
0.5328632593,
-0.0364508592,
0.0887569115,
0.3142634034,
-0.19656156,
0.0469386391,
-0.1121081486,
0.189590469,
-0.0458962694,
-0.1770621836,
0.4929014146,
-0.5231876969,
-0.0303797852,
-0.3329464495,
0.0695787072,
-0.0041326014,
-0.0288812071,
-0.190462485,
-0.076793842,
-0.1351394355,
-0.0927318931,
-0.0293699875,
-0.2776382565,
-0.2052857131,
-0.036007978,
-0.0061671254,
0.0853939652,
-0.0265574176,
0.2156136483,
0.1078723818,
-0.1008851379,
0.1899689734,
0.1342567205,
-0.1666000932,
0.2949905396,
0.4046857059,
0.3115813136,
0.0524835959,
0.1272325069,
0.2567934096,
-0.255641371,
-0.0172181036,
0.0054825097,
0.1065030694,
-0.0993610695,
-0.1011926979,
0.2556886375,
0.2363377213,
-0.0885119289,
-0.0845537558,
-0.1806744337,
0.375009954,
-0.2790948451,
0.3892670274,
-0.1677361131,
0.0750422552,
-0.3417078853,
-0.0397979729,
-0.2720071971,
0.1862701625,
0.0560134351,
-0.0107598752,
0.1286527961,
-0.1996026337,
0.0813580826,
-0.2092208862,
0.4000965357,
0.1780811399,
0.0545459241,
-0.156160295,
-0.3937136531,
-0.5252346992,
-0.0115372268,
-0.1445726603,
-0.2499282062,
-0.2041036487,
-0.0287254993,
0.2680968046,
-0.2691121101,
0.2173222005,
-0.1844738275,
-0.1150781587,
-0.146435827,
-0.076554291,
-0.0971177965,
-0.5347244143,
-0.0966061354,
0.0707270056,
-0.2221827656,
0.053321965,
0.0030935495,
-0.0917000845,
0.0875905529,
0.2286829203,
0.1542826593,
-0.5105314851,
0.4455623627,
0.0263392255,
0.5585095882,
-0.0054476759,
-0.0357006788,
-0.4545745552,
-0.0695572793,
-0.3046223223,
-0.0477169454,
-0.187983349,
0.1691146493,
-0.1267158538,
-0.0660587177,
-0.2103222013,
0.0025307003,
0.1552619636,
0.0577725731,
-0.0206447896,
-0.1354544312,
-0.20541659,
0.0767673254,
0.2540616095,
0.1676709205,
-0.1501212269,
0.0711236745,
-0.0613305122,
0.021078594,
0.6465313435,
-0.3543477952,
-0.1450374871,
-0.1764715165,
0.2335254401,
-0.1980624199,
-0.3866495192,
-0.3042270243,
0.1598238349,
0.1362084746,
0.0928644463,
-0.1198256016,
0.1923819035,
0.0382942706,
0.0319085047,
-0.0234011859,
0.2843152285,
0.1907121092,
-0.0562850386,
-0.0231744163,
-0.0937792733
] |
https://github.com/huggingface/datasets/issues/3156 | Rouge and Meteor for multiple references | Hi @avinashsai ,
currently, multiple references are not supported. However, we could add a `multiref` config to fix that. When working with multiple references, we can accumulate them by either taking an average or the best score. Would you like to work on that? | Hi,
Currently rogue and meteor supports only single references. Can we use these metrics to calculate for multiple references? | 44 | Rouge and Meteor for multiple references
Hi,
Currently rogue and meteor supports only single references. Can we use these metrics to calculate for multiple references?
Hi @avinashsai ,
currently, multiple references are not supported. However, we could add a `multiref` config to fix that. When working with multiple references, we can accumulate them by either taking an average or the best score. Would you like to work on that? | [
-0.2006472051,
-0.3965416253,
-0.0614076443,
0.3612068594,
0.1863978207,
-0.3232403696,
0.11220631,
-0.1550199836,
0.0509825796,
0.2434674501,
-0.334225148,
-0.0029786187,
-0.109228164,
-0.3390773833,
-0.1908655167,
-0.1946985871,
-0.0195315182,
-0.1624715924,
0.2199575901,
0.0569953509,
0.029388044,
0.1764995307,
0.083998248,
-0.013936677,
-0.0614484735,
0.0897642076,
-0.1522076428,
-0.0796460286,
-0.0188694466,
-0.032512296,
-0.2234609723,
0.3469812274,
0.0289588068,
0.2809646726,
-0.0001058969,
-0.2209189385,
0.1398139894,
-0.0278732032,
0.112803556,
-0.220687598,
-0.3002558947,
0.166778028,
0.0005168288,
-0.2214782089,
-0.1831669807,
-0.1704524159,
-0.2663923502,
-0.281263411,
0.3677088618,
-0.0228912309,
0.25177899,
-0.2068436742,
0.0709826648,
-0.2426408678,
0.5898240805,
0.020034736,
-0.1285897344,
0.3211150467,
0.3104873896,
0.0907980278,
-0.1113910377,
0.2825618386,
0.2285734117,
0.0191117283,
0.3263858855,
-0.1069562361,
0.1167626753,
0.0668040514,
-0.1456191391,
0.2103586048,
0.4278607368,
-0.0395682938,
-0.4542930424,
0.2995741665,
-0.0152028762,
-0.0495105535,
-0.4708033502,
-0.1472477317,
0.1182629988,
-0.3225023448,
-0.1976671815,
-0.2332179099,
-0.0285375789,
-0.0224784296,
0.0829699412,
0.0214258209,
0.0265460145,
0.0621173084,
0.3106829524,
0.0976091996,
0.0076315873,
0.1078300029,
-0.0150404023,
-0.2742309868,
-0.2083006501,
-0.1169602051,
0.0165992714,
0.3246044815,
0.3177954853,
0.2997743487,
0.5002148747,
0.1982099861,
-0.1346912235,
0.3149812818,
0.0461057387,
-0.2614542246,
0.1243769601,
-0.314014703,
0.3520399034,
0.2881334424,
-0.1199384257,
-0.1268553883,
0.226442948,
-0.2320809662,
-0.2438085079,
0.3602296114,
-0.270509541,
-0.2860133946,
0.1250968575,
-0.3177202344,
-0.0039007089,
-0.1495592296,
0.2739166617,
0.2021038234,
-0.213680625,
0.0572162755,
-0.1148471907,
0.0214598011,
0.1286338419,
-0.2882445157,
-0.0587467477,
0.2323522419,
-0.2436715066,
0.0334197581,
0.1591086388,
0.2321352214,
0.157046333,
0.0265594628,
0.3655695021,
-0.3783801496,
0.2802884877,
-0.4674785137,
-0.0510094836,
-0.1811251491,
-0.015498532,
-0.0607330129,
0.009376863,
-0.277346313,
-0.2515019774,
-0.0997937918,
-0.3049698472,
-0.053527087,
0.1925960928,
0.1351744086,
0.047566127,
0.0172037389,
-0.0582137145,
0.4031033218,
-0.0390219241,
-0.2869912982,
-0.1838860959,
0.033163771,
-0.1967529655,
-0.1603135318,
0.1067419648,
0.2929646671,
-0.0782643035,
-0.0709376559,
0.1886651218,
-0.0583653934,
-0.2995364964,
0.2986936867,
-0.3636976779,
-0.2062782645,
-0.0252227038,
-0.6121822596,
0.4791697264,
-0.5290030837,
0.1398625523,
-0.4507589936,
0.1469552964,
-0.1859390736,
0.2395944744,
0.2988837957,
0.0720744729,
-0.1210818663,
0.2483628094,
-0.1413970888,
0.0198785625,
-0.0720404014,
-0.12211705,
0.04905596,
-0.0569685027,
0.1548674256,
0.2110262364,
-0.3637343645,
0.1769492328,
0.2235828787,
0.088779822,
-0.3463475704,
-0.0065093287,
0.2382932305,
0.2117237151,
-0.1896887422,
0.1507796347,
-0.2817702591,
0.077399157,
0.1324386895,
-0.1612771302,
0.0108023835,
0.7908698916,
-0.2554767132,
0.0640684962,
-0.1990545541,
0.1955897659,
0.1128291413,
0.1680553257,
0.1374151111,
-0.0427986942,
-0.1667711139,
-0.1187784374,
-0.1607211232,
0.0057473849,
-0.0961080641,
-0.1257891357,
0.0520500652,
-0.3301891387,
0.2967612743,
0.2476129085,
0.2364578247,
0.0571679324,
0.0623119883,
0.369889617,
-0.0163387861,
0.4553202689,
-0.0399644487,
0.4811351895,
0.336835742,
0.3671679795,
-0.1116707698,
0.1535945386,
-0.0799557567,
0.2614460289,
-0.2282571048,
-0.421020627,
0.2855209112,
-0.117633529,
0.1725210845,
0.059133742,
-0.0539306663,
0.2245810777,
-0.0374961048,
-0.2198920399,
-0.1123334169,
0.1423812211,
0.147301361,
0.0652885288,
-0.1046643034,
-0.2583236992,
-0.108573027,
-0.1720591336,
0.2318547964,
0.0923223272,
0.142501086,
-0.0681705698,
-0.1652110666,
-0.091860719,
0.1571732312,
0.1726611257,
0.2089893967,
0.2791934013,
-0.4240640402,
-0.0266978666,
-0.2953689694,
0.0411163867,
-0.1316496283,
0.0205133297,
0.2330175191,
0.3825841546,
-0.1424122304,
0.0165235531,
-0.565241158,
0.167386502,
-0.2179878056,
-0.1213599145,
-0.1776110977,
0.2057290673,
0.2225183398,
-0.2815397084,
-0.4604882002,
-0.2517853677,
-0.2660820484,
0.2703671157,
0.0268901847,
0.1219314486,
-0.0814697146,
0.4797797501,
0.3193742931,
-0.3393963575,
0.2886296809,
-0.0645189732,
-0.5124980807,
0.0973395705,
0.1439986676,
-0.0847787783,
-0.2453272045,
0.2170069367,
0.079648748,
-0.0528740622,
-0.1077846065,
-0.1876734793,
-0.105930537,
0.2799496651,
0.1985014677,
-0.0401223414,
-0.490983963,
0.1888004541,
0.3361593783,
0.367174089,
-0.0386858024,
0.2003211081,
-0.0813642293,
-0.1642338485,
-0.1156013459,
-0.0449692048,
-0.0637783334,
0.0602953471,
-0.1658677906,
-0.006309005,
0.2462587208,
-0.0820497796,
-0.0839435756,
-0.0838439688,
-0.0863138959,
-0.033393316,
0.219106704,
-0.0243677851,
-0.0805545673,
0.3149217665,
-0.3286987245,
-0.3267739415,
0.0195057858,
0.2045653462,
0.1670951992,
0.1194830313,
0.095541425,
-0.7805399895,
0.3536309302,
-0.3824895918,
0.03273708,
0.2036888003,
0.0551359057,
0.1605886817,
-0.2601478398,
-0.0681846961,
-0.0805081576,
0.151629284,
-0.2570621669,
0.363384515,
-0.1554849893,
-0.1140043065,
0.1199982986,
0.8116830587,
0.3189429343,
-0.0373843163,
-0.0026704061,
0.166279003,
-0.0057140188,
0.0978959575,
-0.1421975046,
-0.1104568839,
-0.1740685701,
0.0435938314,
0.1750892252,
0.279090941,
-0.0300416872,
-0.5554490685,
0.1699487716,
-0.184609741,
-0.0636698082,
-0.2127707005,
-0.3228768706,
-0.1457104236,
-0.0335316211,
-0.2578003109,
0.0032956433,
-0.0789785311,
0.2431117743,
0.2336766124,
0.0042847446,
-0.0493835844,
-0.085815832,
0.1081970781,
-0.1193747446,
0.3123351634,
0.0266455617,
-0.376211375,
0.1161892414,
0.3744099736,
0.0441364497,
-0.495177716,
0.2817107141,
-0.0506041236,
-0.0601947941,
0.0600399859,
-0.4216527045,
-0.1656059027,
0.0488112457,
-0.457605958,
-0.0728909224,
0.1175741628,
-0.0888795331,
-0.0728629455,
0.0032817719,
-0.0674963966,
0.0036250432,
-0.126034379,
0.157579422,
-0.208977446,
0.0303391945,
-0.0011943355,
-0.1728007942,
-0.2203817666,
-0.026417112,
-0.0604953878,
-0.4149582684,
0.0623832643,
-0.1429216266,
0.3168036342,
0.0855653584,
0.0060563018,
-0.1911790967,
-0.073845759,
-0.0157742631,
-0.1027948111,
0.2130513638,
0.0277713593,
-0.2642909288,
-0.3220896721,
-0.1750038862,
-0.0529038273,
0.2882581353,
-0.0083345892,
0.0720413327,
0.0693764687,
-0.5609717369,
0.1550045311,
-0.0019727245,
-0.1987227052,
-0.0872463137,
0.0624510273,
-0.2414191514,
-0.0675391555,
0.5410745144,
0.3302521408,
-0.2505902946,
0.3443078399,
0.0786134824,
-0.2043249011,
0.0972648486,
0.3396318853,
0.7810965776,
-0.2947724164,
-0.1660993546,
-0.5024363399,
-0.3131101727,
0.3472281992,
-0.4086287022,
0.1542931944,
-0.5469866395,
-0.1641778797,
0.0011263883,
0.0524866171,
0.1553596705,
0.1925171316,
-0.2144587338,
0.2544946373,
-0.0345700197,
0.0693465248,
-0.4609041214,
0.2556193769,
0.3497468531,
-0.0030155054,
0.020449182,
0.2675421536,
-0.0393754877,
-0.1667921096,
-0.1629372537,
0.2128091604,
-0.2058795691,
0.2573930025,
-0.3143396974,
-0.1897435784,
0.3364877999,
0.1997932345,
0.050299298,
-0.4012482464,
0.0338446423,
0.5031580329,
0.3935448229,
-0.0321281552,
-0.2975690663,
0.1130225882,
-0.4231672883,
0.0369472131,
-0.3380289972,
-0.0651229843,
-0.0452979468,
-0.0469681621,
-0.1410959661,
0.41265288,
0.1249101609,
-0.2311299741,
-0.0896931291,
0.2357661873,
0.0448955595,
0.1837538034,
0.4080005288,
0.1662133783,
-0.0045111994,
-0.1717936695,
0.1609767675,
0.2106681466,
-0.0828353763,
0.3110713065,
0.0859259069,
0.2667101622,
0.0444665588,
0.5130376816,
-0.0119626187,
0.087131165,
-0.4632557333,
0.0034080106,
-0.0832697153,
-0.1992295831,
-0.0515321828,
-0.2416864336,
0.0054318723,
0.221216023,
0.0163039658,
-0.027305698,
0.0885211602,
0.5356529355,
0.3263747394,
0.3487901986,
0.1400512308,
-0.3660819829,
-0.1200299039,
0.1405818909,
-0.0758473799,
0.0091593107,
-0.0038336506,
-0.4854528904,
0.2856277525,
0.6423466802,
-0.3716847599,
-0.056133341,
-0.1270595491,
0.2157221138,
0.0279705431,
-0.2812004685,
-0.3248805404,
0.2884360254,
0.0459773913,
-0.1015294641,
-0.1230814084,
-0.1733107269,
-0.0077926666,
0.0994158313,
0.0234809667,
0.4796773791,
-0.3616190255,
0.0129239717,
0.0341893211,
-0.1673845202,
0.0042106831,
0.3613959253,
0.0562992059,
0.2652910054,
-0.020442035,
0.0140249627,
-0.0556553192,
0.1413186193,
0.2534526587,
0.0959710255,
0.0022695637,
0.1477237046,
0.0037259655,
-0.3013849854,
0.0281532295,
0.389867425,
0.0091542313,
-0.0947574899,
0.2498071194,
0.3916445971,
0.2369021326,
0.2509239018,
0.3313210607,
0.2790385485,
0.0480827503,
0.180979833,
-0.3623247147,
0.1135748178,
-0.2496801764,
-0.3850256205,
-0.0077203307,
0.2317649275,
0.0809059963,
0.3809253871,
0.3351754546,
-0.2468874007,
0.3890523612,
-0.1090386435,
0.1334307641,
-0.4699868262,
-0.0723354295,
-0.7243601084,
0.189756006,
-0.138657555,
0.296203047,
0.0297438614,
0.4407154024,
0.237508744,
-0.3073640764,
0.5038712025,
-0.0681558251,
0.2243748754,
0.0857265443,
0.1177760661,
0.4947516918,
0.119647488,
0.3227552474,
-0.0581214838,
-0.0809607804,
0.3243555427,
0.0208125915,
0.1467243284,
-0.265830487,
0.2761601806,
0.3314122558,
-0.3037983179,
-0.1765950024,
-0.3518851995,
-0.2086210996,
0.0080566369,
-0.0880276635,
0.2960545123,
0.5061958432,
0.093854554,
0.2319610268,
-0.0553518347,
0.2256237119,
0.3276496828,
0.3769291937,
-0.2271460444,
0.0891295373,
0.4269519746,
0.1685385704,
0.1971973926,
0.1216567084,
-0.032074824,
-0.120340839,
-0.1608306766,
0.0596233159,
-0.1856121421,
-0.2334088534,
0.0794365853,
0.1223936826,
0.2265224457,
-0.2267680317,
0.5256445408,
0.1263460219,
-0.147461921,
0.2917549312,
-0.1425031573,
0.3806964159,
-0.1543591917,
0.1817028522,
0.1665562838,
-0.1100496948,
-0.0193042215,
0.0166342966,
-0.1923045963,
-0.5204768181,
-0.2426872849,
-0.4391579032,
-0.131864205,
0.0456670113,
0.1269031614,
0.1582832485,
0.1709393412,
-0.0161904376,
-0.0028876944,
-0.1907458156,
-0.2923120856,
-0.2335323989,
-0.1782087535,
0.3191233277,
0.3091509342,
-0.4724204242,
0.0773328319,
0.0071958816,
0.3036182821,
-0.0455103628,
0.0496165939,
0.2970102727,
0.2783095837,
-0.3759946227,
0.3235598505,
-0.383656621,
-0.2349704951,
0.073816359,
0.242324397,
0.0081871282,
-0.2403577417,
0.10954386,
-0.1280768812,
-0.2500123084,
0.5093602538,
0.0863742158,
0.5471364856,
-0.0899928063,
0.2778232396,
0.2202187479,
0.0781176388,
0.2714423537,
0.150633499,
0.0660476089,
0.0431462824,
0.1920925528,
0.1639406383,
-0.1006613523,
0.0370635614,
0.2191581726,
0.6129829288,
0.0926320925,
0.0516105518,
-0.2705957592,
-0.3450895846,
0.1307341903,
-0.0747030154,
0.0791252479,
0.0865207836,
-0.1474877745,
0.1939338893,
-0.3092193604,
-0.1167670265,
0.1844049841,
0.2444891483,
0.0976527259,
-0.3587298393,
0.563013792,
-0.2424061,
0.1118541211,
-0.4219441414,
-0.0599089079,
0.4350841045,
0.2365587205,
-0.1965642869,
0.1704040766,
0.0508629717,
-0.1656728536,
-0.3076941073,
-0.1830027252,
0.0198869519,
0.1452082098,
-0.3785737455,
0.0823315978
] |
https://github.com/huggingface/datasets/issues/3155 | Illegal instruction (core dumped) at datasets import | It seems to be an issue with how conda-forge is building the binaries. It works on some machines, but not a machine with AMD Opteron 8384 processors. | ## Describe the bug
I install datasets using conda and when I import datasets I get: "Illegal instruction (core dumped)"
## Steps to reproduce the bug
```
conda create --prefix path/to/env
conda activate path/to/env
conda install -c huggingface -c conda-forge datasets
# exits with output "Illegal instruction (core dumped)"
python -m datasets
```
## Environment info
When I run "datasets-cli env", I also get "Illegal instruction (core dumped)"
If I run the following commands:
```
conda create --prefix path/to/another/new/env
conda activate path/to/another/new/env
conda install -c huggingface transformers
transformers-cli env
```
Then I get:
- `transformers` version: 4.11.3
- Platform: Linux-5.4.0-67-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No
Let me know what additional information you need in order to debug this issue. Thanks in advance! | 27 | Illegal instruction (core dumped) at datasets import
## Describe the bug
I install datasets using conda and when I import datasets I get: "Illegal instruction (core dumped)"
## Steps to reproduce the bug
```
conda create --prefix path/to/env
conda activate path/to/env
conda install -c huggingface -c conda-forge datasets
# exits with output "Illegal instruction (core dumped)"
python -m datasets
```
## Environment info
When I run "datasets-cli env", I also get "Illegal instruction (core dumped)"
If I run the following commands:
```
conda create --prefix path/to/another/new/env
conda activate path/to/another/new/env
conda install -c huggingface transformers
transformers-cli env
```
Then I get:
- `transformers` version: 4.11.3
- Platform: Linux-5.4.0-67-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No
Let me know what additional information you need in order to debug this issue. Thanks in advance!
It seems to be an issue with how conda-forge is building the binaries. It works on some machines, but not a machine with AMD Opteron 8384 processors. | [
-0.12203262,
-0.1705197543,
-0.1097889096,
0.3383170366,
0.0886828899,
0.1632141322,
0.3851004243,
0.0958758891,
-0.027489759,
-0.1795628965,
-0.2659413517,
0.227496475,
-0.0341779515,
-0.0706300363,
0.0804519951,
0.398709327,
0.4395806491,
-0.1147561818,
-0.4592989385,
-0.2523344159,
-0.139566198,
0.0240082853,
-0.1933738738,
-0.177989766,
-0.3238794208,
-0.0027682814,
0.2257155478,
0.1792092621,
-0.0781206563,
-0.114923507,
0.1534987092,
0.0017640585,
0.1725259423,
0.6895839572,
-0.000118917,
0.0363063328,
0.0606246926,
0.1722846627,
-0.4053521752,
0.2795910835,
-0.5117619634,
-0.0858443379,
-0.1677979976,
-0.229874298,
0.1949610412,
0.1004759148,
-0.1744081527,
-0.2743372917,
0.5391997695,
0.291665554,
0.1285585016,
0.3181523085,
-0.018383434,
-0.0129771698,
-0.6283808947,
0.3379925191,
-0.2138449699,
-0.0397071131,
-0.1203926727,
0.2989064455,
0.2762897015,
-0.0892759338,
-0.1235465407,
-0.2974104583,
0.1706402302,
-0.1706345677,
-0.1409291625,
-0.2951393425,
0.064966321,
0.1346423924,
0.2003428638,
-0.2276804,
-0.5166409016,
-0.1816361696,
-0.2063013166,
-0.310375005,
0.1138070822,
0.5293126702,
-0.1655064225,
0.5972926021,
-0.1456242204,
-0.2426950783,
-0.1000804231,
-0.2364147753,
-0.1058275104,
0.4294607043,
-0.1129320487,
-0.137245819,
0.1724594831,
0.103420116,
0.1751103848,
0.0132666891,
-0.0939869955,
0.2196417004,
-0.4260111749,
0.122934036,
-0.1220338121,
0.395149529,
-0.0287279468,
0.1414842904,
-0.03055471,
0.0139175216,
-0.1280915886,
0.2657189965,
-0.0144354114,
0.0895164832,
0.0230211373,
0.5275068879,
0.1573806554,
0.1544620693,
0.0265860036,
0.2931172848,
-0.127498433,
-0.1215974912,
-0.0629783049,
-0.1353871971,
-0.0988859907,
-0.4113095105,
-0.6289813519,
-0.0035831872,
0.1289983392,
-0.0172100198,
0.1394819617,
0.251121819,
-0.0935217142,
0.0516401269,
0.1522137225,
0.2181718796,
0.0720347762,
-0.3687765002,
-0.055198811,
0.0227034427,
-0.0984369889,
-0.033862073,
0.16236265,
-0.2647345662,
0.0859520733,
0.2815625072,
0.2652178705,
-0.2124796063,
0.0688365176,
0.0086704232,
0.1228707582,
0.4521986544,
-0.1116808206,
0.0606847331,
-0.0103766927,
-0.1666910946,
-0.0069516092,
0.3525280058,
-0.0821257979,
-0.3221482635,
-0.2126505077,
0.0852679312,
-0.3398274481,
0.0800321177,
0.0071418723,
-0.0406102464,
0.168234393,
0.1576390266,
0.0442208387,
0.2344752997,
-0.0333213061,
-0.1340301037,
0.3892731667,
0.4318708777,
-0.4816996753,
-0.1330402493,
-0.2852137983,
0.0073178313,
-0.0886557624,
0.3851136267,
-0.074221991,
0.2231966108,
-0.1582631767,
-0.1870422363,
0.0255146939,
-0.4738123715,
-0.0621934906,
-0.0357791111,
0.000946954,
0.3082069159,
-0.0408752523,
-0.1224534512,
0.1291374266,
-0.1890753359,
-0.0034665454,
0.2556895018,
0.1478463411,
-0.2416758835,
-0.2218476385,
-0.1680853069,
0.0648595691,
0.1478127986,
-0.1398174614,
0.1097456738,
0.0452044904,
0.0415055864,
0.1864284426,
-0.0342099182,
-0.0389977135,
0.500652492,
0.2195322365,
-0.1052108109,
-0.0454340316,
-0.024319211,
-0.2945180237,
0.194673717,
0.0983772501,
0.1969893724,
-0.2097841203,
-0.1752987653,
-0.1149884611,
0.2361793965,
-0.1250194609,
-0.0831002221,
0.0613114871,
-0.2513614297,
0.1309821308,
-0.210871771,
-0.0336783156,
0.8748151064,
-0.0196729042,
0.3409731686,
-0.2883993387,
-0.0456992052,
-0.2052301466,
-0.0128075713,
-0.3250846863,
0.1640966535,
0.2485774755,
-0.3782027066,
-0.0147470096,
0.3400531113,
0.0526327454,
-0.1439245641,
-0.4458693862,
0.2705861926,
0.1990669221,
-0.1561919302,
0.0270550996,
-0.0593471304,
-0.0070082699,
-0.0937237367,
0.0557858162,
0.102488108,
0.0626478195,
0.1282632351,
-0.0588668175,
0.0122510828,
0.1961417347,
0.0280675609,
-0.0645824671,
-0.6463765502,
0.2252128571,
0.2437787354,
0.1062021255,
0.2587108612,
0.0859704167,
-0.0244616792,
0.2566945255,
-0.1430436224,
-0.1013022736,
0.0434151627,
0.1287465096,
0.2575703561,
0.3331788778,
0.1163342893,
0.4179038107,
0.0403840244,
-0.0902692527,
0.1371250898,
-0.0389470756,
0.022862725,
0.102850154,
0.1170938089,
0.0112754824,
-0.2652474642,
-0.0914629996,
0.1052336171,
0.0032730687,
-0.4118115008,
0.1066031456,
0.1724900603,
-0.2451886535,
0.0966812074,
-0.4036713541,
0.4202186167,
-0.4084886312,
-0.3590435982,
-0.3031886816,
-0.1255987138,
-0.2020789832,
-0.0279740077,
0.0002864054,
0.1276235878,
-0.2967047393,
0.2497885227,
-0.3421318531,
-0.0717372447,
-0.2377543896,
0.1491546184,
-0.1371128559,
-0.1028148159,
0.2024951428,
0.1787120402,
0.1905473769,
-0.3844228983,
0.0028883363,
0.3739551008,
-0.3853936791,
-0.0208293535,
0.0422571003,
0.2046547383,
-0.1575000584,
-0.0249018986,
0.0751756206,
-0.2940382957,
-0.0570333451,
0.1170876101,
0.0182929579,
-0.1488164514,
0.1189476177,
-0.3190697134,
-0.3319420218,
-0.0710889921,
-0.2876187563,
-0.3753224611,
0.1963346899,
0.0586831979,
0.0907094404,
0.2551195025,
0.0300360844,
-0.0189163238,
0.3113670051,
0.1823723763,
0.0646049976,
-0.2032991797,
0.3385581672,
-0.2590480149,
-0.1896689981,
0.0363160297,
-0.0372258537,
0.5649656653,
0.1090065688,
-0.1609186679,
0.6476115584,
-0.3286633492,
0.285636127,
-0.2546274662,
-0.0662005097,
0.0347628035,
0.0883264914,
0.2544944882,
-0.232310757,
-0.3266699016,
0.2746146619,
-0.2172588259,
-0.0721549839,
0.0006056579,
0.2766197622,
0.1487925947,
0.1974268854,
0.0939646363,
-0.263495028,
0.1627895534,
0.4388743043,
0.4740940928,
-0.0042054891,
-0.3465112448,
0.2149444371,
0.2364402115,
-0.3982484043,
-0.2738910615,
0.0075149322,
0.0516416691,
-0.1126339436,
0.5210632086,
-0.3242055774,
-0.1378393918,
-0.1981182843,
0.0145401033,
0.0586931072,
0.1862875819,
0.2927513123,
-0.1026198938,
0.1591088921,
0.2056800872,
0.126398325,
0.0234182123,
-0.0257818084,
-0.3308667243,
-0.3122369945,
-0.1365972459,
0.2473398298,
-0.1862961501,
0.3319523633,
0.037922807,
0.0981553942,
0.0016117872,
0.1111564115,
0.6407897472,
-0.0139494436,
-0.070391342,
0.1266792864,
0.1832897514,
-0.3563216031,
-0.2281084061,
-0.0593230091,
0.0066057476,
0.752499342,
0.1884764582,
-0.398480773,
-0.0422148816,
0.0033791533,
0.224636212,
-0.0444215685,
-0.3342635036,
-0.125896588,
-0.2429406047,
-0.1391406506,
-0.1497604698,
0.5368822813,
0.2181099057,
-0.207571134,
-0.0113812583,
-0.106688261,
0.1410206407,
0.1755888313,
0.2172914147,
0.1973658204,
-0.3130704463,
0.3074084818,
0.0365873799,
-0.0340745784,
0.3557777703,
0.4571148455,
-0.1245563552,
-0.5309985876,
-0.2211669832,
-0.1238483042,
0.1373150796,
0.0438649543,
0.2173933089,
-0.3105359077,
0.105777517,
-0.0893661529,
0.0263811555,
-0.0592696704,
0.1022337601,
0.3749145269,
-0.7227090597,
-0.3979549706,
0.0430475548,
0.3567582965,
0.0299452562,
0.5200613141,
0.1372041553,
-0.3068800867,
0.2233405709,
0.1189485639,
0.7901854515,
0.0094901742,
-0.081030719,
0.2372623384,
-0.3001888692,
0.2040200531,
-0.2646225989,
-0.0114271222,
-0.2499452829,
-0.4429686368,
0.1389764845,
-0.0663404986,
0.5287525058,
0.4000321925,
-0.116472654,
0.0624351911,
-0.598856926,
-0.0833625346,
0.1060221866,
0.0022268351,
0.2167241424,
-0.3650602102,
-0.1431512833,
0.0725183934,
0.1805396825,
0.2021447271,
-0.2760172486,
-0.0465387143,
-0.0949806944,
-0.0300280992,
-0.5228854418,
0.1357152909,
0.0546160825,
0.1986656189,
0.4511551857,
0.0661632866,
0.4345304966,
0.4407391846,
0.7721715569,
0.1990012825,
0.0271118339,
0.1722106487,
-0.1917444319,
0.0655383021,
0.4291131794,
-0.0809285864,
0.2793346345,
0.0147681516,
-0.2664987445,
0.0892470255,
-0.158110708,
-0.0622780584,
0.149272874,
0.1177405119,
-0.1449754685,
-0.2222367525,
-0.2413798869,
0.0498478524,
0.203270629,
-0.0974594578,
0.0742916092,
0.2026442736,
-0.2964409888,
0.2858648896,
-0.260461688,
-0.4282006919,
-0.1937413514,
0.2826258242,
-0.1736397147,
-0.2428346574,
0.2749893367,
0.034591414,
-0.1770850569,
-0.0609902665,
-0.117852591,
-0.0645450428,
-0.4661040306,
-0.0257098041,
-0.0062994049,
-0.3349199593,
-0.0364157632,
-0.1537768096,
0.011908846,
0.0753811821,
-0.3161075115,
-0.2946297824,
-0.2678628564,
-0.1041207165,
-0.0127308108,
-0.2575342655,
0.0944417566,
0.2345912158,
-0.139358148,
0.0593311936,
-0.1751699746,
-0.1299687475,
-0.1163423732,
-0.1279448867,
0.0320448987,
-0.0459445193,
0.0629424229,
-0.1168531254,
0.0050022462,
0.2963411808,
0.0819362625,
-0.0458936468,
-0.3500595093,
0.126521796,
0.0451496877,
-0.1833224893,
0.1152889282,
-0.1579476744,
-0.1651205719,
-0.2317250222,
0.1462296098,
0.278172791,
0.2132932246,
0.2174823135,
0.3033415377,
0.391571939,
-0.1789997816,
0.1341460645,
0.1115390658,
0.1415656507,
0.0848006457,
0.3214237988,
0.0622976869,
0.0013897653,
-0.3508343995,
-0.0372233391,
-0.0399081856,
0.1994437277,
0.2524181604,
-0.5149353147,
0.3212057352,
0.2982412875,
0.1640417427,
0.3688158989,
-0.0350668021,
-0.0831766054,
0.2394749522,
0.227680847,
0.0337684862,
-0.3243893385,
0.3308540583,
0.0259254798,
-0.0802483186,
0.4392103553,
-0.0289975144,
-0.3035922945,
0.2694748044,
0.1575055569,
0.3219535053,
-0.090923734,
0.4067728519,
0.5012028813,
0.1038401872,
0.2960056365,
0.3427615464,
-0.0420495421,
0.3041247129,
0.3753800392,
-0.4192231894,
0.1085892171,
0.3458920419,
0.0375160277,
0.2426685542,
-0.3905830383,
-0.2444205135,
-0.1449578702,
-0.0127028553,
0.294524461,
-0.135935083,
0.1519493461,
-0.2670826018,
-0.3552158475,
-0.2540273666,
-0.1369131655,
-0.3133468926,
0.2219578922,
0.197395876,
0.2349191606,
0.0983631834,
-0.1392259449,
0.1182806715,
-0.2767862976,
0.2845724225,
0.038636677,
-0.1776085198,
-0.3249548674,
-0.082217969,
0.0649242997,
0.0020813521,
-0.0854966566,
0.0375130288,
0.0806841329,
-0.3512994945,
0.1026797891,
-0.1896584332,
0.5991098881,
0.5760125518,
0.3076206446,
0.2304694504,
-0.0937411711,
0.0082528247,
-0.284761101,
0.5217123032,
-0.3825380206,
0.2863552868,
0.0860514566,
0.1034647897,
-0.2059877664,
-0.3228925467,
0.0795619041,
0.6852031946,
-0.4255257249,
0.2329639792,
-0.2125324458,
-0.3019993007,
-0.2170352489,
0.0172131918,
0.0058686659,
0.0926124826,
0.3175773621,
-0.1608139277,
-0.1267818958,
-0.0667573288,
0.0205632076,
-0.0789263174,
0.5007294416,
0.3956879377,
0.0103730643,
-0.1373686343,
-0.1870346069,
-0.4454092979,
0.1132223383,
0.1639828831,
-0.2255728692,
0.1490384638,
0.0151953548,
-0.0676826984,
0.017880654,
0.0836831182,
0.109397009,
0.193166554,
0.3420039713,
-0.3409366906,
0.1422022283,
-0.4693343937,
0.0598077215,
0.0551941395,
-0.3588787615,
0.2835717499,
0.2599452734,
-0.1180001274,
-0.0442796275,
-0.0429440625,
0.0784571171,
0.0543007739,
0.3458997309,
0.2205831409,
0.1998516172,
0.0147109563,
-0.1929688454,
-0.4107510746,
-0.0395384394,
-0.305930227,
0.3963492811,
-0.185623318,
-0.0356179066,
-0.19721286,
0.0410988145,
-0.2861322463,
0.609493494,
0.3707837462,
-0.2503046393,
-0.1407678425,
0.2260950208,
-0.2415335476,
0.125925377,
0.5460897088,
0.2879646122,
0.1161651835,
0.2529079914,
-0.0740354955,
-0.1272303164,
0.414815098,
-0.3332733214,
-0.2140232474,
-0.1957116723,
0.1436094344,
-0.0580834821,
-0.6060789227,
-0.4975976348,
-0.0795005187,
0.1471103579,
-0.3817474246,
-0.0523177087,
0.2095317245,
0.0212576594,
0.0762859359,
-0.0027061105,
0.3704664111,
0.0346159339,
-0.1124514714,
0.4823718369,
0.0749846995
] |
https://github.com/huggingface/datasets/issues/3154 | Sacrebleu unexpected behaviour/requirement for data format | Hi @BramVanroy!
Good question. This project relies on PyArrow (tables) to store data too big to fit in RAM. In the case of metrics, this means that the number of predictions and references has to match to form a table.
That's why your example throws an error even though it matches the schema:
```python
refs = [
['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'],
['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.'],
] # len(refs) = 2
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'] # len(hyps) = 3
```
Instead, it should be:
```python
refs = [
['The dog bit the man.', 'The dog had bit the man.'],
['It was not unexpected.', 'No one was surprised.'],
['The man bit him first.', 'The man had bitten the dog.'],
] # len(refs) = 3
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'] # len(hyps) = 3
```
However, `sacreblue` works with the format that's described in your example, hence this part:
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L94-L99
Hope you get an idea! | ## Describe the bug
When comparing with the original `sacrebleu` implementation, the `datasets` implementation does some strange things that I do not quite understand. This issue was triggered when I was trying to implement TER and found the datasets implementation of BLEU [here](https://github.com/huggingface/datasets/pull/3153).
In the below snippet, the original sacrebleu snippet works just fine whereas the datasets implementation throws an error.
## Steps to reproduce the bug
```python
import sacrebleu
import datasets
refs = [
['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'],
['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.'],
]
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.']
expected_bleu = 48.530827
ds_bleu = datasets.load_metric("sacrebleu")
bleu_score_sb = sacrebleu.corpus_bleu(hyps, refs).score
print(bleu_score_sb, expected_bleu)
# works: 48.5308...
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
print(bleu_score_ds, expected_bleu)
# ValueError: Predictions and/or references don't match the expected format.
```
This seems to be related to how datasets forces the features format here:
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L94-L99
and then manipulates the references during the compute stage here
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L119-L122
I do not quite understand why that is required since sacrebleu handles argument parsing quite well [by itself](https://github.com/mjpost/sacrebleu/blob/2787185dd0f8d224c72ee5a831d163c2ac711a47/sacrebleu/metrics/base.py#L229).
## Actual results
Traceback (most recent call last):
File "C:\Users\bramv\AppData\Roaming\JetBrains\PyCharm2020.3\scratches\scratch_23.py", line 23, in <module>
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
File "C:\dev\python\datasets\src\datasets\metric.py", line 392, in compute
self.add_batch(predictions=predictions, references=references)
File "C:\dev\python\datasets\src\datasets\metric.py", line 439, in add_batch
raise ValueError(
ValueError: Predictions and/or references don't match the expected format.
Expected format: {'predictions': Value(dtype='string', id='sequence'), 'references': Sequence(feature=Value(dtype='string', id='sequence'), length=-1, id='references')},
Input predictions: ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'],
Input references: [['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'], ['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.']]
## Environment info
- `datasets` version: 1.14.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.9.2
- PyArrow version: 4.0.1
| 197 | Sacrebleu unexpected behaviour/requirement for data format
## Describe the bug
When comparing with the original `sacrebleu` implementation, the `datasets` implementation does some strange things that I do not quite understand. This issue was triggered when I was trying to implement TER and found the datasets implementation of BLEU [here](https://github.com/huggingface/datasets/pull/3153).
In the below snippet, the original sacrebleu snippet works just fine whereas the datasets implementation throws an error.
## Steps to reproduce the bug
```python
import sacrebleu
import datasets
refs = [
['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'],
['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.'],
]
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.']
expected_bleu = 48.530827
ds_bleu = datasets.load_metric("sacrebleu")
bleu_score_sb = sacrebleu.corpus_bleu(hyps, refs).score
print(bleu_score_sb, expected_bleu)
# works: 48.5308...
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
print(bleu_score_ds, expected_bleu)
# ValueError: Predictions and/or references don't match the expected format.
```
This seems to be related to how datasets forces the features format here:
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L94-L99
and then manipulates the references during the compute stage here
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L119-L122
I do not quite understand why that is required since sacrebleu handles argument parsing quite well [by itself](https://github.com/mjpost/sacrebleu/blob/2787185dd0f8d224c72ee5a831d163c2ac711a47/sacrebleu/metrics/base.py#L229).
## Actual results
Traceback (most recent call last):
File "C:\Users\bramv\AppData\Roaming\JetBrains\PyCharm2020.3\scratches\scratch_23.py", line 23, in <module>
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
File "C:\dev\python\datasets\src\datasets\metric.py", line 392, in compute
self.add_batch(predictions=predictions, references=references)
File "C:\dev\python\datasets\src\datasets\metric.py", line 439, in add_batch
raise ValueError(
ValueError: Predictions and/or references don't match the expected format.
Expected format: {'predictions': Value(dtype='string', id='sequence'), 'references': Sequence(feature=Value(dtype='string', id='sequence'), length=-1, id='references')},
Input predictions: ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'],
Input references: [['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'], ['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.']]
## Environment info
- `datasets` version: 1.14.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.9.2
- PyArrow version: 4.0.1
Hi @BramVanroy!
Good question. This project relies on PyArrow (tables) to store data too big to fit in RAM. In the case of metrics, this means that the number of predictions and references has to match to form a table.
That's why your example throws an error even though it matches the schema:
```python
refs = [
['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'],
['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.'],
] # len(refs) = 2
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'] # len(hyps) = 3
```
Instead, it should be:
```python
refs = [
['The dog bit the man.', 'The dog had bit the man.'],
['It was not unexpected.', 'No one was surprised.'],
['The man bit him first.', 'The man had bitten the dog.'],
] # len(refs) = 3
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'] # len(hyps) = 3
```
However, `sacreblue` works with the format that's described in your example, hence this part:
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L94-L99
Hope you get an idea! | [
0.0317308679,
-0.2080372274,
0.0581464209,
0.1247445419,
0.374968797,
-0.0902199149,
0.1705552936,
0.1604259908,
-0.3364595175,
0.0518428683,
-0.0757987946,
0.2882940471,
-0.0812800378,
0.2799239457,
0.0603367947,
-0.1692025214,
0.2169518769,
0.2796362638,
0.2296099812,
-0.0013862738,
-0.058069922,
0.0824509263,
-0.3212131262,
-0.1622769237,
-0.3530727327,
0.2892412245,
-0.0370381437,
-0.0285122599,
-0.3917927146,
-0.4078975916,
0.3379491568,
0.0358570814,
-0.141541779,
0.6881942749,
-0.000122776,
-0.1983245909,
0.0475011654,
-0.1819526255,
-0.421589613,
-0.2807793915,
-0.2676607072,
-0.3110389709,
0.0075279195,
-0.2268885672,
-0.2807046175,
-0.2899979353,
-0.1817336082,
-0.1974864453,
0.0456379056,
0.2402633131,
0.1405073255,
0.4610389173,
-0.3269176185,
-0.1773907542,
0.3765434027,
0.3578311205,
-0.2097970992,
0.0421399698,
0.0439857803,
0.2386366874,
0.1036145464,
0.1915554106,
-0.1671422273,
-0.0364760943,
0.2031664401,
0.0517836437,
-0.5668804049,
-0.0869657919,
0.0847615451,
0.1742597371,
0.4631301463,
-0.3084826767,
-0.632850945,
-0.1117272377,
-0.325771749,
-0.1827741414,
0.1079268232,
0.0412675701,
0.1532303542,
0.1278624833,
-0.4699286222,
0.2582840621,
-0.0158912092,
0.1142015979,
-0.2946029902,
-0.19793199,
-0.4510425031,
0.0183212906,
-0.1140138805,
0.0518353954,
-0.2205839455,
-0.1044205576,
-0.059264224,
0.0610239953,
-0.2661683857,
-0.1096408069,
-0.1018489972,
0.0851143226,
0.26669994,
0.3706919551,
0.1574822813,
0.0832776576,
-0.3361516893,
0.0476016961,
0.0736065507,
0.2986440063,
0.035568703,
-0.1006325111,
0.0707380548,
0.147065267,
0.1487564445,
-0.0361491106,
0.3862416744,
-0.2469170243,
0.1397446096,
-0.0349188522,
0.3039971888,
-0.3889894187,
-0.3404226303,
0.2912736833,
0.0396899469,
0.2124418169,
-0.0406284854,
0.0453019664,
-0.2439430952,
0.0779685825,
-0.147695154,
0.1812995821,
-0.2242082506,
-0.1301693916,
-0.1956049353,
-0.2090709955,
-0.404701978,
-0.2027283013,
0.1874873638,
-0.3455870748,
0.3793721199,
0.3439644873,
0.2739524841,
-0.0790531561,
-0.1327930242,
-0.2681224048,
0.3768130243,
-0.0934432074,
-0.4716939032,
0.1950531602,
0.0511937477,
-0.1956315488,
-0.0016997124,
-0.086987026,
-0.3642956018,
0.0187194832,
0.15743725,
0.1374966055,
-0.4574986994,
-0.0927076936,
-0.2508971095,
0.2614222169,
0.1145225167,
-0.2457605153,
0.0634413958,
-0.1808055639,
-0.3381127715,
-0.2041364908,
0.4688741565,
0.365460068,
-0.3295741379,
-0.0172316749,
0.428244859,
-0.0466207936,
0.1611253321,
0.1564273983,
0.0470473357,
-0.0027401301,
-0.2008214593,
-0.0276417024,
0.0598689169,
-0.1669044197,
-0.4678930342,
0.1675118804,
0.1311185658,
0.2630414367,
0.0452514961,
0.1285017431,
0.2586843371,
-0.0493509881,
-0.0103605529,
-0.1011587828,
-0.0235991571,
-0.2062921375,
-0.1641659141,
-0.2063197196,
0.0194534604,
-0.2110915929,
0.0949850604,
0.3565945327,
0.1454799473,
0.3896772563,
0.3665587008,
-0.111804083,
-0.0206337068,
0.1515948474,
0.3117902577,
-0.1273690164,
0.2747140229,
-0.5003553629,
-0.1666882336,
0.3074689806,
0.3255885839,
0.1186322644,
0.1110497192,
-0.0798223019,
-0.4921574891,
0.073761113,
0.0128342509,
-0.1892291754,
0.0057038614,
0.1197815388,
-0.0513676964,
0.095065318,
-0.1068137437,
0.0258226022,
-0.0998941436,
0.0519921593,
-0.2619098723,
0.085442476,
0.0226419717,
-0.1490587741,
-0.1726224571,
0.3147753179,
0.0658037439,
-0.1032705531,
-0.1215438619,
0.3525100946,
0.4304809868,
0.2351793945,
-0.2996093035,
0.0821240619,
0.2040393203,
-0.0384489149,
-0.1290629506,
0.4433315396,
0.2218438685,
-0.0182538833,
-0.1191774011,
0.3095273674,
-0.1752454489,
0.0909823477,
-0.0871504471,
-0.1526122987,
0.0509056598,
0.0666254237,
-0.1823845655,
-0.4403997958,
0.1939836144,
-0.1146942675,
0.0000478702,
0.1023104489,
-0.382553488,
-0.0161633622,
0.268991828,
0.0596402958,
-0.1266865283,
0.0132083734,
-0.0272451453,
0.0393434167,
0.0443549231,
0.2605519295,
0.5791494846,
0.0041058171,
0.1914568394,
0.173190251,
0.0664427578,
-0.3382093608,
0.039162349,
0.1107900217,
-0.4332149923,
0.1631763726,
0.3441349864,
0.2131805271,
-0.0497876778,
0.2156025767,
-0.0853810459,
-0.1639244109,
-0.4157848954,
0.4488668442,
-0.4556624889,
0.0193299502,
-0.5457908511,
-0.0442536063,
0.1051304117,
-0.0995023027,
-0.0517055355,
0.0867241472,
-0.0177431647,
0.1359562278,
-0.0396636464,
0.1590863764,
-0.0386683457,
-0.1103769019,
0.1252459735,
0.076986067,
-0.1844304204,
-0.0014535512,
-0.2557238042,
-0.1308984011,
0.1903681159,
-0.1765410304,
-0.1722280979,
-0.4279378951,
-0.5370866656,
0.1442681551,
-0.1039337963,
0.6145105362,
0.3804364204,
-0.3088344038,
-0.0054257298,
0.1331433803,
0.1473067403,
0.0517993718,
-0.0858951807,
0.2584973276,
-0.0827183798,
-0.1648391932,
-0.3129450381,
-0.372587204,
0.2889757454,
-0.0598309338,
0.3633621931,
0.0184715278,
-0.019683456,
0.1708988249,
0.3312627673,
0.1382446885,
0.159263745,
-0.0033275569,
-0.1916249543,
-0.1673799753,
0.4011284709,
-0.1759746373,
-0.5639660954,
-0.0581716672,
0.1368480325,
0.053584788,
0.5197380185,
-0.3321480751,
-0.3354054093,
-0.0640598536,
-0.2263320088,
0.1279834211,
0.083169505,
-0.1586357653,
0.0327538401,
-0.0622243024,
-0.2718765438,
-0.1644657701,
0.1752986163,
-0.0792188197,
0.127483502,
0.03251037,
-0.0691034496,
0.4407612383,
0.336984545,
0.435815841,
-0.3011394143,
0.1825986356,
0.1261269301,
0.4447236657,
-0.1453528106,
-0.2570250034,
0.1331668794,
-0.3175551295,
-0.1020671427,
0.3576761186,
-0.0376590528,
0.1902709305,
-0.0849613324,
-0.048306115,
0.2637216151,
-0.162498951,
0.0365613811,
-0.1271641105,
0.1654248238,
-0.0705535114,
0.2198795825,
0.1335072964,
-0.1813141257,
-0.0231684335,
0.2108805031,
-0.0497315526,
0.1977256835,
-0.3047088683,
0.1654997468,
-0.1972352117,
0.2706980407,
0.0273509696,
0.3877265155,
0.0982685536,
0.0948356465,
-0.0143168168,
0.1628120095,
0.4212115705,
-0.0775454193,
0.0207265485,
-0.2243501395,
0.0412650071,
-0.4582106173,
-0.0345416106,
-0.2329074293,
0.3284541667,
0.0112522328,
0.5389126539,
-0.1432917863,
-0.1049967632,
0.099460654,
0.4307698309,
-0.0153555302,
-0.0522535108,
-0.4131143689,
-0.1182494164,
0.0547596365,
-0.1356854588,
0.080985561,
-0.2515141964,
-0.1167038381,
-0.0722019449,
-0.4629330635,
0.1127358302,
0.1828700602,
-0.0356667563,
0.1784407794,
-0.3181782365,
0.1358243227,
-0.0363660343,
0.123702012,
0.4056247175,
0.4996405542,
-0.4528197646,
-0.3992530704,
-0.0225262251,
-0.1668470204,
0.2695184946,
0.4506701529,
-0.2352654189,
0.1900579631,
0.0936600268,
-0.173906967,
-0.4945285022,
0.2083683461,
0.4021536708,
0.1852840781,
-0.0954145119,
-0.5453773737,
0.3491624892,
0.0344798118,
-0.0652912185,
-0.0109421378,
0.6147434115,
-0.1651349217,
0.4776725769,
0.0956744552,
0.965634048,
0.3693386316,
0.0840193853,
0.4542126358,
-0.2308364809,
0.4961919487,
0.0339929312,
0.2730360329,
-0.219266668,
-0.3972050846,
-0.1379329264,
-0.1595226079,
0.1274997145,
0.0648974851,
-0.3417066634,
0.3466619253,
-0.3259109259,
0.2926193476,
0.1446190774,
-0.0630221143,
0.0996311083,
-0.0835833028,
-0.2115635574,
0.1344905198,
-0.0098327072,
0.2233043164,
-0.1507063061,
-0.003621514,
-0.3381313384,
0.0052338499,
-0.1584531963,
0.0722090304,
-0.2150006294,
-0.1190664023,
0.1453510225,
-0.3501488268,
0.3360157013,
0.5139077902,
0.610275507,
0.3544564545,
-0.1536439359,
0.0296495613,
-0.0253095552,
0.1530868411,
0.069319576,
-0.3201389611,
0.4208999276,
0.0881297812,
-0.1194612831,
-0.0760831982,
-0.0087171225,
0.2079067677,
0.1396800131,
0.0286824666,
-0.3567233384,
-0.5477196574,
-0.2555859089,
-0.2806828618,
0.2866159379,
-0.1896550059,
0.0502637587,
-0.0139439218,
0.1162710339,
0.2712147832,
-0.0662378371,
-0.1976280361,
-0.0665594041,
0.3310694993,
0.1001591608,
-0.1081202477,
0.4964194596,
-0.077367045,
-0.0858635455,
-0.0946740881,
-0.3012618423,
-0.1021256372,
-0.5040659904,
0.2121278495,
-0.4899616838,
0.0658718422,
0.0812798142,
0.493809998,
0.2386881858,
-0.2189273089,
0.0389490873,
-0.0762015358,
-0.0128977979,
0.0548425578,
0.0606570281,
0.137512669,
0.0576880462,
0.0590996481,
-0.1069765687,
0.1858679652,
-0.2265212238,
0.3036304414,
-0.0362260975,
0.3229062855,
0.1912176162,
0.0059523187,
0.2204387039,
-0.1921554953,
-0.1142927632,
0.2027456611,
-0.3572542071,
-0.0479502305,
-0.3932226896,
0.1375404298,
0.1561932266,
-0.0722326413,
-0.076462172,
0.1557071954,
-0.1592962146,
-0.3909292221,
0.224855125,
0.3671118319,
0.035841547,
0.2264360934,
-0.2191065401,
0.303496331,
-0.022073973,
0.0541449524,
0.0931490511,
0.1173742935,
0.1176201701,
0.0602400899,
-0.0882873312,
-0.111281909,
-0.0960657522,
0.1715565175,
0.2889665961,
0.1795523763,
0.1898979396,
-0.2606357038,
0.1797594577,
0.0557065755,
0.5568208694,
0.3002158701,
0.0931169465,
-0.3553804457,
0.0860679001,
0.0694551393,
-0.0495554917,
-0.1611770988,
0.1273398846,
0.253146708,
0.0896003395,
0.42702806,
0.5624097586,
-0.038474407,
-0.1011954397,
-0.0514259748,
0.0591671281,
-0.0791348144,
0.2810728252,
0.0183734465,
0.1009559184,
0.262647748,
0.0194156338,
-0.0609100387,
0.2309463173,
0.3239360452,
0.1534329504,
0.4811691344,
0.2581981719,
0.073868528,
0.129292652,
-0.1637268513,
0.1585614085,
-0.0709887445,
0.0438975766,
0.3246273398,
0.1015476584,
0.660780251,
-0.1895367205,
-0.2037422061,
-0.0647621229,
-0.286968112,
-0.1038463712,
-0.1740947217,
0.2782766223,
-0.3935169578,
-0.0275623128,
-0.1434868872,
-0.2140206993,
0.1432331949,
0.3703817129,
-0.0570350103,
-0.0142354704,
-0.2983990014,
0.0551619157,
0.0303841382,
0.2717268169,
-0.218506366,
-0.0416347608,
0.2102048546,
-0.2157799155,
0.2042476237,
0.4248102903,
0.3392123878,
0.3253958523,
0.2176854312,
-0.3423759639,
-0.0029525596,
0.0493991859,
0.1230508685,
0.3634713292,
0.0032973452,
-0.3815530241,
0.360096693,
0.0553294867,
-0.0167162307,
0.0028589068,
0.2156488597,
-0.0041229706,
-0.7171652317,
0.2193760276,
-0.0962352008,
-0.1178424433,
-0.0810756534,
-0.1846136898,
-0.246552825,
0.0916483775,
0.5192577243,
-0.0600099675,
0.2142989784,
0.1193851903,
0.051444076,
0.2445161194,
0.4652332067,
0.1206606627,
0.0274871029,
-0.1296625882,
0.1133127436,
-0.3926918507,
0.2602955699,
0.2443698645,
0.2442391813,
0.1568395048,
0.0257326327,
-0.0383523516,
0.0459802523,
-0.2668716609,
-0.2609974742,
-0.0147396056,
-0.0062196744,
-0.3219764531,
-0.2756570876,
-0.460999161,
-0.2564147711,
-0.0713781342,
-0.2070221752,
-0.0496669002,
-0.2038679421,
-0.0095682237,
-0.0852803439,
0.0661919415,
-0.0878388733,
-0.0663911253,
0.4363867939,
0.288169533,
0.2370140702,
0.1278077662,
-0.3947951496,
-0.2396837622,
0.0676333755,
-0.1782173067,
0.4510896504,
-0.0686987862,
0.3367294371,
-0.2927844524,
0.1234061494,
-0.1950400919,
0.4785400629,
0.4014209509,
-0.2747469842,
-0.2792704701,
0.1292662472,
-0.4445712864,
-0.0793485567,
0.3682587743,
0.5623964667,
-0.1385086775,
0.4696452618,
-0.120505318,
-0.3533239961,
0.2743808329,
-0.1643190831,
0.0304791164,
-0.0069915717,
0.2089520991,
0.50465101,
-0.1548904926,
-1.1090385914,
-0.0524742082,
0.2756099105,
-0.1023810282,
-0.0317336097,
0.2239302397,
-0.0761899501,
-0.2046397775,
-0.2069717944,
0.7138969302,
0.0710557774,
-0.3050623536,
0.3629313707,
-0.1507652253
] |
https://github.com/huggingface/datasets/issues/3154 | Sacrebleu unexpected behaviour/requirement for data format | Thanks, that makes sense. It is a bit unfortunate because it may be confusing to users since the input format is suddenly different than what they may expect from the underlying library/metric. But it is understandable due to how `datasets` works! | ## Describe the bug
When comparing with the original `sacrebleu` implementation, the `datasets` implementation does some strange things that I do not quite understand. This issue was triggered when I was trying to implement TER and found the datasets implementation of BLEU [here](https://github.com/huggingface/datasets/pull/3153).
In the below snippet, the original sacrebleu snippet works just fine whereas the datasets implementation throws an error.
## Steps to reproduce the bug
```python
import sacrebleu
import datasets
refs = [
['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'],
['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.'],
]
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.']
expected_bleu = 48.530827
ds_bleu = datasets.load_metric("sacrebleu")
bleu_score_sb = sacrebleu.corpus_bleu(hyps, refs).score
print(bleu_score_sb, expected_bleu)
# works: 48.5308...
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
print(bleu_score_ds, expected_bleu)
# ValueError: Predictions and/or references don't match the expected format.
```
This seems to be related to how datasets forces the features format here:
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L94-L99
and then manipulates the references during the compute stage here
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L119-L122
I do not quite understand why that is required since sacrebleu handles argument parsing quite well [by itself](https://github.com/mjpost/sacrebleu/blob/2787185dd0f8d224c72ee5a831d163c2ac711a47/sacrebleu/metrics/base.py#L229).
## Actual results
Traceback (most recent call last):
File "C:\Users\bramv\AppData\Roaming\JetBrains\PyCharm2020.3\scratches\scratch_23.py", line 23, in <module>
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
File "C:\dev\python\datasets\src\datasets\metric.py", line 392, in compute
self.add_batch(predictions=predictions, references=references)
File "C:\dev\python\datasets\src\datasets\metric.py", line 439, in add_batch
raise ValueError(
ValueError: Predictions and/or references don't match the expected format.
Expected format: {'predictions': Value(dtype='string', id='sequence'), 'references': Sequence(feature=Value(dtype='string', id='sequence'), length=-1, id='references')},
Input predictions: ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'],
Input references: [['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'], ['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.']]
## Environment info
- `datasets` version: 1.14.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.9.2
- PyArrow version: 4.0.1
| 41 | Sacrebleu unexpected behaviour/requirement for data format
## Describe the bug
When comparing with the original `sacrebleu` implementation, the `datasets` implementation does some strange things that I do not quite understand. This issue was triggered when I was trying to implement TER and found the datasets implementation of BLEU [here](https://github.com/huggingface/datasets/pull/3153).
In the below snippet, the original sacrebleu snippet works just fine whereas the datasets implementation throws an error.
## Steps to reproduce the bug
```python
import sacrebleu
import datasets
refs = [
['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'],
['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.'],
]
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.']
expected_bleu = 48.530827
ds_bleu = datasets.load_metric("sacrebleu")
bleu_score_sb = sacrebleu.corpus_bleu(hyps, refs).score
print(bleu_score_sb, expected_bleu)
# works: 48.5308...
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
print(bleu_score_ds, expected_bleu)
# ValueError: Predictions and/or references don't match the expected format.
```
This seems to be related to how datasets forces the features format here:
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L94-L99
and then manipulates the references during the compute stage here
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L119-L122
I do not quite understand why that is required since sacrebleu handles argument parsing quite well [by itself](https://github.com/mjpost/sacrebleu/blob/2787185dd0f8d224c72ee5a831d163c2ac711a47/sacrebleu/metrics/base.py#L229).
## Actual results
Traceback (most recent call last):
File "C:\Users\bramv\AppData\Roaming\JetBrains\PyCharm2020.3\scratches\scratch_23.py", line 23, in <module>
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
File "C:\dev\python\datasets\src\datasets\metric.py", line 392, in compute
self.add_batch(predictions=predictions, references=references)
File "C:\dev\python\datasets\src\datasets\metric.py", line 439, in add_batch
raise ValueError(
ValueError: Predictions and/or references don't match the expected format.
Expected format: {'predictions': Value(dtype='string', id='sequence'), 'references': Sequence(feature=Value(dtype='string', id='sequence'), length=-1, id='references')},
Input predictions: ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'],
Input references: [['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'], ['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.']]
## Environment info
- `datasets` version: 1.14.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.9.2
- PyArrow version: 4.0.1
Thanks, that makes sense. It is a bit unfortunate because it may be confusing to users since the input format is suddenly different than what they may expect from the underlying library/metric. But it is understandable due to how `datasets` works! | [
0.0317308679,
-0.2080372274,
0.0581464209,
0.1247445419,
0.374968797,
-0.0902199149,
0.1705552936,
0.1604259908,
-0.3364595175,
0.0518428683,
-0.0757987946,
0.2882940471,
-0.0812800378,
0.2799239457,
0.0603367947,
-0.1692025214,
0.2169518769,
0.2796362638,
0.2296099812,
-0.0013862738,
-0.058069922,
0.0824509263,
-0.3212131262,
-0.1622769237,
-0.3530727327,
0.2892412245,
-0.0370381437,
-0.0285122599,
-0.3917927146,
-0.4078975916,
0.3379491568,
0.0358570814,
-0.141541779,
0.6881942749,
-0.000122776,
-0.1983245909,
0.0475011654,
-0.1819526255,
-0.421589613,
-0.2807793915,
-0.2676607072,
-0.3110389709,
0.0075279195,
-0.2268885672,
-0.2807046175,
-0.2899979353,
-0.1817336082,
-0.1974864453,
0.0456379056,
0.2402633131,
0.1405073255,
0.4610389173,
-0.3269176185,
-0.1773907542,
0.3765434027,
0.3578311205,
-0.2097970992,
0.0421399698,
0.0439857803,
0.2386366874,
0.1036145464,
0.1915554106,
-0.1671422273,
-0.0364760943,
0.2031664401,
0.0517836437,
-0.5668804049,
-0.0869657919,
0.0847615451,
0.1742597371,
0.4631301463,
-0.3084826767,
-0.632850945,
-0.1117272377,
-0.325771749,
-0.1827741414,
0.1079268232,
0.0412675701,
0.1532303542,
0.1278624833,
-0.4699286222,
0.2582840621,
-0.0158912092,
0.1142015979,
-0.2946029902,
-0.19793199,
-0.4510425031,
0.0183212906,
-0.1140138805,
0.0518353954,
-0.2205839455,
-0.1044205576,
-0.059264224,
0.0610239953,
-0.2661683857,
-0.1096408069,
-0.1018489972,
0.0851143226,
0.26669994,
0.3706919551,
0.1574822813,
0.0832776576,
-0.3361516893,
0.0476016961,
0.0736065507,
0.2986440063,
0.035568703,
-0.1006325111,
0.0707380548,
0.147065267,
0.1487564445,
-0.0361491106,
0.3862416744,
-0.2469170243,
0.1397446096,
-0.0349188522,
0.3039971888,
-0.3889894187,
-0.3404226303,
0.2912736833,
0.0396899469,
0.2124418169,
-0.0406284854,
0.0453019664,
-0.2439430952,
0.0779685825,
-0.147695154,
0.1812995821,
-0.2242082506,
-0.1301693916,
-0.1956049353,
-0.2090709955,
-0.404701978,
-0.2027283013,
0.1874873638,
-0.3455870748,
0.3793721199,
0.3439644873,
0.2739524841,
-0.0790531561,
-0.1327930242,
-0.2681224048,
0.3768130243,
-0.0934432074,
-0.4716939032,
0.1950531602,
0.0511937477,
-0.1956315488,
-0.0016997124,
-0.086987026,
-0.3642956018,
0.0187194832,
0.15743725,
0.1374966055,
-0.4574986994,
-0.0927076936,
-0.2508971095,
0.2614222169,
0.1145225167,
-0.2457605153,
0.0634413958,
-0.1808055639,
-0.3381127715,
-0.2041364908,
0.4688741565,
0.365460068,
-0.3295741379,
-0.0172316749,
0.428244859,
-0.0466207936,
0.1611253321,
0.1564273983,
0.0470473357,
-0.0027401301,
-0.2008214593,
-0.0276417024,
0.0598689169,
-0.1669044197,
-0.4678930342,
0.1675118804,
0.1311185658,
0.2630414367,
0.0452514961,
0.1285017431,
0.2586843371,
-0.0493509881,
-0.0103605529,
-0.1011587828,
-0.0235991571,
-0.2062921375,
-0.1641659141,
-0.2063197196,
0.0194534604,
-0.2110915929,
0.0949850604,
0.3565945327,
0.1454799473,
0.3896772563,
0.3665587008,
-0.111804083,
-0.0206337068,
0.1515948474,
0.3117902577,
-0.1273690164,
0.2747140229,
-0.5003553629,
-0.1666882336,
0.3074689806,
0.3255885839,
0.1186322644,
0.1110497192,
-0.0798223019,
-0.4921574891,
0.073761113,
0.0128342509,
-0.1892291754,
0.0057038614,
0.1197815388,
-0.0513676964,
0.095065318,
-0.1068137437,
0.0258226022,
-0.0998941436,
0.0519921593,
-0.2619098723,
0.085442476,
0.0226419717,
-0.1490587741,
-0.1726224571,
0.3147753179,
0.0658037439,
-0.1032705531,
-0.1215438619,
0.3525100946,
0.4304809868,
0.2351793945,
-0.2996093035,
0.0821240619,
0.2040393203,
-0.0384489149,
-0.1290629506,
0.4433315396,
0.2218438685,
-0.0182538833,
-0.1191774011,
0.3095273674,
-0.1752454489,
0.0909823477,
-0.0871504471,
-0.1526122987,
0.0509056598,
0.0666254237,
-0.1823845655,
-0.4403997958,
0.1939836144,
-0.1146942675,
0.0000478702,
0.1023104489,
-0.382553488,
-0.0161633622,
0.268991828,
0.0596402958,
-0.1266865283,
0.0132083734,
-0.0272451453,
0.0393434167,
0.0443549231,
0.2605519295,
0.5791494846,
0.0041058171,
0.1914568394,
0.173190251,
0.0664427578,
-0.3382093608,
0.039162349,
0.1107900217,
-0.4332149923,
0.1631763726,
0.3441349864,
0.2131805271,
-0.0497876778,
0.2156025767,
-0.0853810459,
-0.1639244109,
-0.4157848954,
0.4488668442,
-0.4556624889,
0.0193299502,
-0.5457908511,
-0.0442536063,
0.1051304117,
-0.0995023027,
-0.0517055355,
0.0867241472,
-0.0177431647,
0.1359562278,
-0.0396636464,
0.1590863764,
-0.0386683457,
-0.1103769019,
0.1252459735,
0.076986067,
-0.1844304204,
-0.0014535512,
-0.2557238042,
-0.1308984011,
0.1903681159,
-0.1765410304,
-0.1722280979,
-0.4279378951,
-0.5370866656,
0.1442681551,
-0.1039337963,
0.6145105362,
0.3804364204,
-0.3088344038,
-0.0054257298,
0.1331433803,
0.1473067403,
0.0517993718,
-0.0858951807,
0.2584973276,
-0.0827183798,
-0.1648391932,
-0.3129450381,
-0.372587204,
0.2889757454,
-0.0598309338,
0.3633621931,
0.0184715278,
-0.019683456,
0.1708988249,
0.3312627673,
0.1382446885,
0.159263745,
-0.0033275569,
-0.1916249543,
-0.1673799753,
0.4011284709,
-0.1759746373,
-0.5639660954,
-0.0581716672,
0.1368480325,
0.053584788,
0.5197380185,
-0.3321480751,
-0.3354054093,
-0.0640598536,
-0.2263320088,
0.1279834211,
0.083169505,
-0.1586357653,
0.0327538401,
-0.0622243024,
-0.2718765438,
-0.1644657701,
0.1752986163,
-0.0792188197,
0.127483502,
0.03251037,
-0.0691034496,
0.4407612383,
0.336984545,
0.435815841,
-0.3011394143,
0.1825986356,
0.1261269301,
0.4447236657,
-0.1453528106,
-0.2570250034,
0.1331668794,
-0.3175551295,
-0.1020671427,
0.3576761186,
-0.0376590528,
0.1902709305,
-0.0849613324,
-0.048306115,
0.2637216151,
-0.162498951,
0.0365613811,
-0.1271641105,
0.1654248238,
-0.0705535114,
0.2198795825,
0.1335072964,
-0.1813141257,
-0.0231684335,
0.2108805031,
-0.0497315526,
0.1977256835,
-0.3047088683,
0.1654997468,
-0.1972352117,
0.2706980407,
0.0273509696,
0.3877265155,
0.0982685536,
0.0948356465,
-0.0143168168,
0.1628120095,
0.4212115705,
-0.0775454193,
0.0207265485,
-0.2243501395,
0.0412650071,
-0.4582106173,
-0.0345416106,
-0.2329074293,
0.3284541667,
0.0112522328,
0.5389126539,
-0.1432917863,
-0.1049967632,
0.099460654,
0.4307698309,
-0.0153555302,
-0.0522535108,
-0.4131143689,
-0.1182494164,
0.0547596365,
-0.1356854588,
0.080985561,
-0.2515141964,
-0.1167038381,
-0.0722019449,
-0.4629330635,
0.1127358302,
0.1828700602,
-0.0356667563,
0.1784407794,
-0.3181782365,
0.1358243227,
-0.0363660343,
0.123702012,
0.4056247175,
0.4996405542,
-0.4528197646,
-0.3992530704,
-0.0225262251,
-0.1668470204,
0.2695184946,
0.4506701529,
-0.2352654189,
0.1900579631,
0.0936600268,
-0.173906967,
-0.4945285022,
0.2083683461,
0.4021536708,
0.1852840781,
-0.0954145119,
-0.5453773737,
0.3491624892,
0.0344798118,
-0.0652912185,
-0.0109421378,
0.6147434115,
-0.1651349217,
0.4776725769,
0.0956744552,
0.965634048,
0.3693386316,
0.0840193853,
0.4542126358,
-0.2308364809,
0.4961919487,
0.0339929312,
0.2730360329,
-0.219266668,
-0.3972050846,
-0.1379329264,
-0.1595226079,
0.1274997145,
0.0648974851,
-0.3417066634,
0.3466619253,
-0.3259109259,
0.2926193476,
0.1446190774,
-0.0630221143,
0.0996311083,
-0.0835833028,
-0.2115635574,
0.1344905198,
-0.0098327072,
0.2233043164,
-0.1507063061,
-0.003621514,
-0.3381313384,
0.0052338499,
-0.1584531963,
0.0722090304,
-0.2150006294,
-0.1190664023,
0.1453510225,
-0.3501488268,
0.3360157013,
0.5139077902,
0.610275507,
0.3544564545,
-0.1536439359,
0.0296495613,
-0.0253095552,
0.1530868411,
0.069319576,
-0.3201389611,
0.4208999276,
0.0881297812,
-0.1194612831,
-0.0760831982,
-0.0087171225,
0.2079067677,
0.1396800131,
0.0286824666,
-0.3567233384,
-0.5477196574,
-0.2555859089,
-0.2806828618,
0.2866159379,
-0.1896550059,
0.0502637587,
-0.0139439218,
0.1162710339,
0.2712147832,
-0.0662378371,
-0.1976280361,
-0.0665594041,
0.3310694993,
0.1001591608,
-0.1081202477,
0.4964194596,
-0.077367045,
-0.0858635455,
-0.0946740881,
-0.3012618423,
-0.1021256372,
-0.5040659904,
0.2121278495,
-0.4899616838,
0.0658718422,
0.0812798142,
0.493809998,
0.2386881858,
-0.2189273089,
0.0389490873,
-0.0762015358,
-0.0128977979,
0.0548425578,
0.0606570281,
0.137512669,
0.0576880462,
0.0590996481,
-0.1069765687,
0.1858679652,
-0.2265212238,
0.3036304414,
-0.0362260975,
0.3229062855,
0.1912176162,
0.0059523187,
0.2204387039,
-0.1921554953,
-0.1142927632,
0.2027456611,
-0.3572542071,
-0.0479502305,
-0.3932226896,
0.1375404298,
0.1561932266,
-0.0722326413,
-0.076462172,
0.1557071954,
-0.1592962146,
-0.3909292221,
0.224855125,
0.3671118319,
0.035841547,
0.2264360934,
-0.2191065401,
0.303496331,
-0.022073973,
0.0541449524,
0.0931490511,
0.1173742935,
0.1176201701,
0.0602400899,
-0.0882873312,
-0.111281909,
-0.0960657522,
0.1715565175,
0.2889665961,
0.1795523763,
0.1898979396,
-0.2606357038,
0.1797594577,
0.0557065755,
0.5568208694,
0.3002158701,
0.0931169465,
-0.3553804457,
0.0860679001,
0.0694551393,
-0.0495554917,
-0.1611770988,
0.1273398846,
0.253146708,
0.0896003395,
0.42702806,
0.5624097586,
-0.038474407,
-0.1011954397,
-0.0514259748,
0.0591671281,
-0.0791348144,
0.2810728252,
0.0183734465,
0.1009559184,
0.262647748,
0.0194156338,
-0.0609100387,
0.2309463173,
0.3239360452,
0.1534329504,
0.4811691344,
0.2581981719,
0.073868528,
0.129292652,
-0.1637268513,
0.1585614085,
-0.0709887445,
0.0438975766,
0.3246273398,
0.1015476584,
0.660780251,
-0.1895367205,
-0.2037422061,
-0.0647621229,
-0.286968112,
-0.1038463712,
-0.1740947217,
0.2782766223,
-0.3935169578,
-0.0275623128,
-0.1434868872,
-0.2140206993,
0.1432331949,
0.3703817129,
-0.0570350103,
-0.0142354704,
-0.2983990014,
0.0551619157,
0.0303841382,
0.2717268169,
-0.218506366,
-0.0416347608,
0.2102048546,
-0.2157799155,
0.2042476237,
0.4248102903,
0.3392123878,
0.3253958523,
0.2176854312,
-0.3423759639,
-0.0029525596,
0.0493991859,
0.1230508685,
0.3634713292,
0.0032973452,
-0.3815530241,
0.360096693,
0.0553294867,
-0.0167162307,
0.0028589068,
0.2156488597,
-0.0041229706,
-0.7171652317,
0.2193760276,
-0.0962352008,
-0.1178424433,
-0.0810756534,
-0.1846136898,
-0.246552825,
0.0916483775,
0.5192577243,
-0.0600099675,
0.2142989784,
0.1193851903,
0.051444076,
0.2445161194,
0.4652332067,
0.1206606627,
0.0274871029,
-0.1296625882,
0.1133127436,
-0.3926918507,
0.2602955699,
0.2443698645,
0.2442391813,
0.1568395048,
0.0257326327,
-0.0383523516,
0.0459802523,
-0.2668716609,
-0.2609974742,
-0.0147396056,
-0.0062196744,
-0.3219764531,
-0.2756570876,
-0.460999161,
-0.2564147711,
-0.0713781342,
-0.2070221752,
-0.0496669002,
-0.2038679421,
-0.0095682237,
-0.0852803439,
0.0661919415,
-0.0878388733,
-0.0663911253,
0.4363867939,
0.288169533,
0.2370140702,
0.1278077662,
-0.3947951496,
-0.2396837622,
0.0676333755,
-0.1782173067,
0.4510896504,
-0.0686987862,
0.3367294371,
-0.2927844524,
0.1234061494,
-0.1950400919,
0.4785400629,
0.4014209509,
-0.2747469842,
-0.2792704701,
0.1292662472,
-0.4445712864,
-0.0793485567,
0.3682587743,
0.5623964667,
-0.1385086775,
0.4696452618,
-0.120505318,
-0.3533239961,
0.2743808329,
-0.1643190831,
0.0304791164,
-0.0069915717,
0.2089520991,
0.50465101,
-0.1548904926,
-1.1090385914,
-0.0524742082,
0.2756099105,
-0.1023810282,
-0.0317336097,
0.2239302397,
-0.0761899501,
-0.2046397775,
-0.2069717944,
0.7138969302,
0.0710557774,
-0.3050623536,
0.3629313707,
-0.1507652253
] |
https://github.com/huggingface/datasets/issues/3148 | Streaming with num_workers != 0 | I can confirm that I was able to reproduce the bug. This seems odd given that #3423 reports duplicate data retrieval when `num_workers` and `streaming` are used together, which is obviously different from what is reported here. | ## Describe the bug
When using dataset streaming with pytorch DataLoader, the setting num_workers to anything other than 0 causes the code to freeze forever before yielding the first batch.
The code owner is likely @lhoestq
## Steps to reproduce the bug
For your convenience, we've prepped a colab notebook that reproduces the bug
https://colab.research.google.com/drive/1Mgl0oTZSNIE3UeGl_oX9wPCOIxRg19h1?usp=sharing
```python
!pip install datasets==1.14.0
should_freeze_forever = True
# ^-- set this to True in order to freeze forever, set to False in order to work normally
import torch
from datasets import load_dataset
data = load_dataset("oscar", "unshuffled_deduplicated_bn", split="train", streaming=True)
data = data.map(lambda x: {"text": x["text"], "orig": f"oscar[{x['id']}]"}, batched=True)
data = data.shuffle(100, seed=1337)
data = data.with_format("torch")
loader = torch.utils.data.DataLoader(data, batch_size=2, num_workers=2 if should_freeze_forever else 0)
# v-- the code should freeze forever at this line
for i, row in enumerate(loader):
print(row)
if i > 10: break
print("DONE!")
```
## Expected results
The code should not freeze forever with num_workers=2
## Actual results
The code freezes forever with num_workers=2
## Environment info
- `datasets` version: 1.14.0 (also found in previous versions)
- Platform: google colab (also locally)
- Python version: 3.7, (also 3.8)
- PyArrow version: 3.0.0
| 37 | Streaming with num_workers != 0
## Describe the bug
When using dataset streaming with pytorch DataLoader, the setting num_workers to anything other than 0 causes the code to freeze forever before yielding the first batch.
The code owner is likely @lhoestq
## Steps to reproduce the bug
For your convenience, we've prepped a colab notebook that reproduces the bug
https://colab.research.google.com/drive/1Mgl0oTZSNIE3UeGl_oX9wPCOIxRg19h1?usp=sharing
```python
!pip install datasets==1.14.0
should_freeze_forever = True
# ^-- set this to True in order to freeze forever, set to False in order to work normally
import torch
from datasets import load_dataset
data = load_dataset("oscar", "unshuffled_deduplicated_bn", split="train", streaming=True)
data = data.map(lambda x: {"text": x["text"], "orig": f"oscar[{x['id']}]"}, batched=True)
data = data.shuffle(100, seed=1337)
data = data.with_format("torch")
loader = torch.utils.data.DataLoader(data, batch_size=2, num_workers=2 if should_freeze_forever else 0)
# v-- the code should freeze forever at this line
for i, row in enumerate(loader):
print(row)
if i > 10: break
print("DONE!")
```
## Expected results
The code should not freeze forever with num_workers=2
## Actual results
The code freezes forever with num_workers=2
## Environment info
- `datasets` version: 1.14.0 (also found in previous versions)
- Platform: google colab (also locally)
- Python version: 3.7, (also 3.8)
- PyArrow version: 3.0.0
I can confirm that I was able to reproduce the bug. This seems odd given that #3423 reports duplicate data retrieval when `num_workers` and `streaming` are used together, which is obviously different from what is reported here. | [
-0.3226699531,
0.0737845227,
-0.0116667831,
0.2070756406,
-0.1044991091,
-0.3222557902,
0.6223980188,
0.1405929178,
-0.0384612866,
0.38090837,
0.1035974026,
0.3658747971,
-0.4546128213,
-0.1009321436,
-0.0124416975,
0.1442426592,
-0.0811087936,
0.109146595,
-0.1322443038,
0.2386980355,
-0.0053874473,
0.1628906578,
-0.183302477,
-0.4060691297,
-0.6413104534,
0.2437584698,
0.1158624142,
0.0756377131,
0.1356104016,
-0.2434605211,
0.1166655347,
0.0348315276,
-0.1522249877,
0.6788926721,
-0.0001180172,
-0.0459981337,
0.4018384218,
0.1319504827,
-0.5868532658,
-0.4136181176,
0.2413666099,
-0.1801806986,
0.2244097143,
0.1241583601,
0.0488651544,
0.1754564047,
0.1596032381,
-0.2608608902,
0.2057941705,
0.2494218796,
0.0776225552,
0.42990762,
-0.3854284883,
0.2060577422,
0.0367387012,
-0.2091085166,
-0.2339920849,
0.3336622417,
0.5063292384,
-0.0465002619,
-0.2000068724,
0.259008497,
-0.2264681756,
0.139601931,
0.1400233805,
-0.0562783182,
-0.2295722961,
-0.57585603,
0.2579669058,
0.3106586337,
-0.0655981302,
-0.0948629603,
0.0062365448,
-0.4981331229,
0.0488078445,
-0.2658197284,
0.2079960555,
0.2156843394,
-0.4694852829,
-0.1430267543,
-0.265797168,
0.3045251966,
-0.0599994548,
0.2143416703,
-0.1914432943,
0.3251659274,
-0.1448086947,
0.0266710278,
0.2080442011,
0.0596473627,
0.6893111467,
-0.2022815496,
0.171157375,
-0.0636964589,
-0.3642529547,
0.1948437095,
0.066774711,
0.1500685513,
-0.0598553307,
-0.2671275139,
0.4051826298,
0.1257991046,
0.2267656177,
0.1799263358,
0.3387434781,
-0.1588858515,
-0.1029279754,
-0.1460408568,
0.4613265395,
0.1869641691,
-0.0297849812,
0.1061457917,
0.0958593637,
-0.2484168261,
0.2824653983,
0.05156333,
0.4423288405,
-0.1000122055,
-0.1737873554,
0.0917046368,
-0.3334397376,
0.0538484789,
0.2665840685,
0.1234786436,
-0.2729231715,
0.4365824461,
-0.1289096475,
-0.097426571,
-0.4964616597,
-0.2021344155,
-0.1864202768,
-0.1882586032,
-0.0329518281,
-0.0055394983,
0.5072354078,
-0.5744136572,
0.3079038858,
0.1731849015,
0.5211966634,
0.0477069989,
0.3175309002,
-0.2755961716,
0.0968350172,
0.2858923078,
0.0269361772,
0.2446840703,
-0.0466622189,
0.1197071895,
0.015087842,
0.5618188977,
0.0365537815,
-0.2226490378,
-0.0484582074,
0.1619585752,
-0.3306997716,
0.1033891216,
-0.1709245592,
0.0411703885,
0.0769528821,
-0.0885292664,
0.203298986,
-0.3709769249,
-0.0298316739,
-0.1254347414,
0.0582929291,
0.6265429854,
-0.1006393656,
-0.0715358853,
0.1506381035,
0.0738322884,
0.3767186403,
0.0963724703,
-0.326374799,
-0.3572611213,
-0.127064541,
0.128924638,
0.0255310778,
0.18899028,
-0.3073010147,
0.2076807469,
-0.2807347775,
0.2834123373,
0.2525624633,
0.4818145037,
0.3721695244,
-0.1995519847,
0.455889076,
0.2312610447,
-0.1374524087,
0.1675771177,
-0.4307063818,
-0.0356245413,
0.0341959074,
0.1922000349,
-0.0121472534,
-0.0991398096,
-0.1364726275,
-0.0342160948,
-0.0195752829,
-0.0798321739,
0.0518231802,
0.0541936718,
0.0372027978,
0.1142249182,
-0.0511192568,
-0.1385879964,
-0.5653887987,
0.2816454768,
0.2112909108,
0.0865853876,
-0.0653413162,
0.0336765498,
0.1993965507,
-0.0533033907,
-0.2103197277,
-0.2381856591,
-0.0084230602,
0.0590345599,
-0.1513983011,
0.0320354439,
-0.1459002048,
0.6678647399,
-0.1451519281,
-0.052259516,
-0.3638648391,
0.3978488445,
-0.0547858402,
-0.4331873953,
-0.2110062391,
-0.0538646914,
0.0896748975,
0.0592989251,
-0.0835799649,
0.2676435113,
-0.0339668542,
0.1759756953,
-0.4817810357,
0.0079632122,
0.3459815383,
0.0432120338,
0.1542081386,
0.3805669546,
0.0795804337,
-0.0307756718,
0.0833451673,
0.2369084656,
-0.3415641189,
0.0771190077,
0.0049474509,
-0.2450351119,
-0.0811979398,
0.129956007,
-0.1823366284,
0.1639007777,
0.5444309115,
-0.1490736306,
0.1883052588,
0.1408435255,
-0.4580600858,
0.3991483152,
0.0539406054,
0.0751432031,
-0.0432661176,
-0.1125616729,
-0.3291713595,
-0.1622313559,
0.1361148059,
0.1792251766,
0.4456208348,
0.159638539,
0.0862798989,
-0.0413215235,
-0.1267314553,
-0.3882174194,
0.2449970543,
0.2035213262,
-0.0830980763,
0.285668999,
0.0928488001,
-0.0979933515,
-0.2956766486,
-0.3525162935,
0.0547463633,
0.2787625492,
-0.3791200519,
0.1975159198,
-0.1349847764,
-0.0257034171,
-0.3023764193,
-0.1577404439,
-0.337549299,
-0.3303676248,
-0.0680576339,
0.8805404902,
-0.1026152298,
-0.0196051802,
-0.3142213225,
-0.0656258166,
-0.0365547314,
0.1352911144,
-0.2673483789,
-0.0457451195,
-0.200055033,
-0.057028845,
0.2372788936,
-0.0339663774,
0.2068306059,
0.1668026447,
-0.3871659935,
-0.29569152,
-0.0371532887,
0.0437377766,
0.0960460529,
0.3421579599,
-0.0153401149,
0.3059472144,
-0.1504876614,
-0.145849064,
-0.0004216462,
-0.2670480907,
-0.0917673036,
0.1890736371,
-0.0608206056,
0.3253374994,
-0.2986275256,
-0.1168790311,
-0.2402903587,
-0.3008428514,
-0.0917065069,
-0.2302308828,
0.1707738489,
0.1304095089,
0.2603690326,
0.3082762957,
0.21526815,
-0.2668795884,
-0.1225593165,
-0.349952966,
0.5224394202,
-0.0105763739,
-0.1711664647,
-0.029487446,
-0.0802299008,
-0.3656241596,
0.2332292646,
-0.2188126594,
-0.1814090759,
-0.2408260554,
0.1722226143,
-0.0686081946,
-0.0741466135,
0.4282306731,
0.1770932823,
-0.1208083853,
-0.0660911947,
-0.0758516192,
-0.1196997091,
0.0256545804,
0.0787513852,
-0.010565117,
0.1785911024,
0.1193146333,
0.7923213243,
-0.0240247305,
-0.1373343766,
0.147727266,
0.0187007543,
0.1109580174,
0.1453807503,
-0.2992321253,
0.1206461117,
-0.0570216402,
-0.0927319229,
0.2246535718,
-0.1495935917,
-0.2479723245,
-0.0486421175,
0.0051749214,
-0.2173732072,
-0.238266021,
0.3321143091,
-0.1576966345,
-0.015137719,
-0.0460848808,
0.1747742444,
-0.0700785816,
-0.314895004,
-0.4929365516,
0.0304881744,
0.11303325,
-0.0724990591,
0.126977697,
0.1702077687,
-0.7107867002,
0.1697998345,
0.2527353168,
0.3768264353,
0.2657316327,
-0.1341037303,
0.1100757942,
-0.2622759938,
0.5778466463,
-0.0219136868,
0.1758439839,
0.0408912376,
-0.1381541342,
-0.2190743983,
-0.0837644935,
-0.1568311304,
0.1258724779,
0.2551452518,
0.0841140449,
-0.1498546153,
-0.1105546355,
0.2885963917,
-0.0804306045,
0.03913619,
-0.2280271649,
-0.4517725408,
-0.2003185451,
0.0880384743,
0.125045985,
0.0401307829,
0.1876500547,
-0.4134730399,
-0.0217809398,
0.0630273223,
0.0426534154,
0.3083827794,
0.0355803333,
0.0366179422,
0.0128973164,
0.3563422561,
0.3332953751,
0.0044786325,
0.1659481376,
0.137752071,
0.0362227447,
-0.1792102456,
0.3653000593,
0.1483557671,
-0.0404505841,
0.5228777528,
-0.0742327943,
0.0623784028,
0.2650800049,
0.2766143978,
0.297444582,
0.1692388505,
0.136905089,
0.2631216645,
-0.26244542,
-0.3847977221,
0.1227426007,
0.170079872,
0.3360491097,
0.3892170489,
-0.3732216656,
0.0606142692,
-0.0445471071,
0.1366451085,
0.7377445102,
0.0761024579,
0.3718288243,
0.1703058034,
-0.2109894753,
0.5197635293,
-0.1073635668,
0.4668053389,
-0.393949151,
-0.4596011937,
0.0457099229,
-0.2975634933,
0.1352810413,
-0.3112011254,
-0.2244289964,
0.2988302112,
-0.1926490068,
0.4716002941,
-0.0137331784,
0.0950553119,
-0.4776128531,
-0.1065808237,
-0.0419958457,
0.0650038198,
-0.3503736854,
0.3010419309,
-0.1216964126,
-0.0404102616,
0.0312990844,
-0.0750769898,
-0.0478069931,
0.179429397,
-0.5305157304,
0.0226172898,
-0.1200197861,
-0.3893916607,
-0.1827172488,
0.0736150667,
-0.1019737199,
-0.2548693717,
-0.0218347758,
-0.0289642923,
0.1538291425,
0.0703862011,
0.1568012983,
-0.2285988778,
0.3446505368,
-0.028959088,
-0.0682506934,
-0.1129064336,
0.0651594847,
-0.133267045,
0.0000409958,
0.3582335711,
0.0036450138,
-0.0188972466,
-0.1217372864,
0.2027291358,
0.0065645571,
-0.3186205328,
0.0744684264,
0.0591088086,
-0.1989455372,
0.007510589,
-0.3731389642,
-0.1876930147,
-0.143067345,
0.5910339355,
0.207806468,
-0.0540033393,
0.4699915946,
0.2452518046,
-0.2680191994,
-0.0840209946,
-0.0904562771,
0.090790011,
-0.696762979,
0.414147377,
-0.0937130824,
-0.0110254958,
0.0168854147,
0.0557982922,
-0.253631562,
0.1544534415,
-0.2470662296,
-0.2055066526,
-0.3201848865,
-0.11171446,
0.1624196172,
0.1694695354,
0.002750691,
0.1437262595,
0.033871565,
-0.2663731873,
-0.2431147844,
0.1738503277,
-0.2194584012,
0.1920256019,
0.0012499404,
-0.2738930285,
0.3078045547,
-0.0428799577,
-0.0131510738,
0.2227472216,
-0.2322970927,
-0.2125270367,
-0.1776112616,
0.1397869885,
-0.130321607,
-0.3038167059,
-0.2629103959,
-0.1866775006,
-0.0452098697,
0.0320675336,
0.4099467993,
0.324721694,
-0.0750541911,
-0.0928301811,
0.5428898931,
0.5256532431,
-0.1238874868,
0.286167115,
-0.1228760034,
0.0634754896,
0.1021585166,
0.3863569498,
0.1296064556,
0.0945857689,
-0.0988370627,
-0.1081647426,
-0.0212461147,
0.1954130232,
0.0935201794,
-0.4263976514,
0.0530751012,
-0.1226090938,
0.2257946879,
0.45407179,
-0.0977595225,
-0.3576641679,
0.2744859755,
0.1060901582,
-0.0420073159,
-0.0075536831,
0.068156302,
0.17280747,
0.115241155,
0.1861681491,
-0.1067161039,
-0.0891526118,
0.0151896169,
0.3422741592,
-0.0520356782,
-0.1793717146,
0.2057423145,
0.3389945924,
-0.0634914413,
0.0769696757,
0.246998176,
0.0308589414,
-0.0782804638,
0.0960353538,
0.0742350146,
0.3878726959,
0.2191776037,
-0.0232678186,
-0.0862521902,
-0.3317823708,
-0.2658781707,
0.2913860381,
-0.2870674729,
0.2186344117,
0.0680885911,
0.222475484,
-0.36097157,
-0.02440276,
0.0223984066,
0.1785304546,
-0.3287220299,
0.1091155112,
0.1091897264,
-0.1494573355,
-0.0106695658,
0.145064339,
0.0404628105,
0.0879813209,
0.1467357576,
0.4077183008,
-0.337818265,
-0.1653480679,
-0.0939338431,
0.1836710274,
0.0230634175,
-0.0403122157,
-0.0049644513,
0.1638839841,
0.1467103511,
-0.1269360036,
0.3104885817,
0.4367818534,
0.3721843064,
-0.1851191968,
0.1411312222,
0.2488874048,
0.0354905389,
-0.0515343472,
0.0272796843,
0.1215804145,
0.0513212532,
0.2465557009,
0.0481588133,
-0.2330806404,
0.0431402251,
0.0726736858,
-0.1251002401,
-0.2832254469,
0.301908493,
0.0193637498,
-0.1574786156,
-0.1147467047,
-0.0730145872,
-0.4419519603,
0.0147206895,
0.2822569907,
-0.0269940104,
-0.0027458631,
-0.0216228906,
0.0322691835,
0.080154188,
0.3992829919,
0.0563775413,
0.2254178226,
-0.3334016502,
0.0350595899,
-0.7187816501,
0.1104598939,
-0.1912945956,
0.2429344654,
0.0174071789,
0.2545401454,
-0.188896209,
0.1036823913,
-0.1473214179,
0.2055611759,
0.2256783247,
0.3949713707,
-0.3248748481,
-0.0806875229,
-0.0739781335,
-0.2148977071,
0.0145270852,
-0.4002758861,
0.1375279576,
-0.2034549415,
0.0900112987,
-0.0083890222,
-0.1611850709,
-0.0134262526,
0.0678175017,
0.0957002267,
0.0893260911,
0.2293155342,
0.2798544168,
-0.1987616867,
-0.1984434426,
0.07451085,
-0.0998506919,
-0.2110724747,
0.312446028,
0.3060374856,
-0.0947782844,
-0.054042846,
-0.4543894529,
0.4855988622,
0.0023408879,
0.1473803967,
-0.0842588171,
-0.0582712442,
0.0114041641,
0.4514951706,
-0.02909269,
0.374217838,
-0.0491588302,
0.060812898,
-0.55635041,
-0.3740880787,
0.5164121389,
-0.5175561309,
-0.2904787064,
-0.7143740058,
0.352060616,
0.3170341253,
0.091257304,
-0.3040605783,
0.0373670049,
0.0892756283,
-0.3497518599,
-0.2291375399,
0.2742139697,
-0.1322146058,
0.2297439873,
-0.1326173097,
0.062001504,
0.3685353398,
-0.0672962219,
0.2016411275,
-0.2859106958
] |
https://github.com/huggingface/datasets/issues/3148 | Streaming with num_workers != 0 | Any update? A possible solution is to have multiple arrow files as shards, and handle them like what webdatasets does.
![image](https://user-images.githubusercontent.com/11533479/148176637-72746b2c-c122-47aa-bbfe-224b13ee9a71.png)
Pytorch's new dataset RFC is supporting sharding now, which may helps avoid duplicate data under streaming mode. (https://github.com/pytorch/pytorch/blob/master/torch/utils/data/datapipes/iter/grouping.py#L13)
| ## Describe the bug
When using dataset streaming with pytorch DataLoader, the setting num_workers to anything other than 0 causes the code to freeze forever before yielding the first batch.
The code owner is likely @lhoestq
## Steps to reproduce the bug
For your convenience, we've prepped a colab notebook that reproduces the bug
https://colab.research.google.com/drive/1Mgl0oTZSNIE3UeGl_oX9wPCOIxRg19h1?usp=sharing
```python
!pip install datasets==1.14.0
should_freeze_forever = True
# ^-- set this to True in order to freeze forever, set to False in order to work normally
import torch
from datasets import load_dataset
data = load_dataset("oscar", "unshuffled_deduplicated_bn", split="train", streaming=True)
data = data.map(lambda x: {"text": x["text"], "orig": f"oscar[{x['id']}]"}, batched=True)
data = data.shuffle(100, seed=1337)
data = data.with_format("torch")
loader = torch.utils.data.DataLoader(data, batch_size=2, num_workers=2 if should_freeze_forever else 0)
# v-- the code should freeze forever at this line
for i, row in enumerate(loader):
print(row)
if i > 10: break
print("DONE!")
```
## Expected results
The code should not freeze forever with num_workers=2
## Actual results
The code freezes forever with num_workers=2
## Environment info
- `datasets` version: 1.14.0 (also found in previous versions)
- Platform: google colab (also locally)
- Python version: 3.7, (also 3.8)
- PyArrow version: 3.0.0
| 39 | Streaming with num_workers != 0
## Describe the bug
When using dataset streaming with pytorch DataLoader, the setting num_workers to anything other than 0 causes the code to freeze forever before yielding the first batch.
The code owner is likely @lhoestq
## Steps to reproduce the bug
For your convenience, we've prepped a colab notebook that reproduces the bug
https://colab.research.google.com/drive/1Mgl0oTZSNIE3UeGl_oX9wPCOIxRg19h1?usp=sharing
```python
!pip install datasets==1.14.0
should_freeze_forever = True
# ^-- set this to True in order to freeze forever, set to False in order to work normally
import torch
from datasets import load_dataset
data = load_dataset("oscar", "unshuffled_deduplicated_bn", split="train", streaming=True)
data = data.map(lambda x: {"text": x["text"], "orig": f"oscar[{x['id']}]"}, batched=True)
data = data.shuffle(100, seed=1337)
data = data.with_format("torch")
loader = torch.utils.data.DataLoader(data, batch_size=2, num_workers=2 if should_freeze_forever else 0)
# v-- the code should freeze forever at this line
for i, row in enumerate(loader):
print(row)
if i > 10: break
print("DONE!")
```
## Expected results
The code should not freeze forever with num_workers=2
## Actual results
The code freezes forever with num_workers=2
## Environment info
- `datasets` version: 1.14.0 (also found in previous versions)
- Platform: google colab (also locally)
- Python version: 3.7, (also 3.8)
- PyArrow version: 3.0.0
Any update? A possible solution is to have multiple arrow files as shards, and handle them like what webdatasets does.
![image](https://user-images.githubusercontent.com/11533479/148176637-72746b2c-c122-47aa-bbfe-224b13ee9a71.png)
Pytorch's new dataset RFC is supporting sharding now, which may helps avoid duplicate data under streaming mode. (https://github.com/pytorch/pytorch/blob/master/torch/utils/data/datapipes/iter/grouping.py#L13)
| [
-0.4615967572,
0.0840075165,
-0.0917685553,
0.1433269083,
-0.12776272,
-0.2838304639,
0.6224715114,
0.2356567979,
0.0436166562,
0.3701071143,
0.2003808171,
0.3652407527,
-0.5244142413,
-0.1296166778,
-0.1155706421,
0.1345635206,
-0.1440053284,
0.213054195,
-0.1751621515,
0.1614889652,
0.0630872175,
0.028318176,
-0.1368730068,
-0.3835960925,
-0.7374168038,
0.1155780628,
0.1648599207,
0.0814531669,
0.1128170118,
-0.2605650723,
0.0886152759,
0.0597967617,
-0.1121511087,
0.6455820203,
-0.0001162078,
-0.0387913734,
0.4676328003,
0.1345290691,
-0.6384679675,
-0.3093197346,
0.1686166972,
-0.2287611216,
0.2106488943,
0.0480407514,
0.1425429136,
0.0849136636,
0.1730156094,
-0.3305673599,
0.2686710954,
0.2175590247,
0.085618645,
0.4063206613,
-0.2820675671,
0.3103516698,
0.1310317814,
-0.1396584362,
-0.235137552,
0.2295771241,
0.3924076259,
-0.0670584962,
-0.214244619,
0.2687136233,
-0.2799446285,
0.1257234216,
0.1269944161,
-0.0989729315,
-0.2335144579,
-0.6294924021,
0.1656223834,
0.2479880601,
0.0078752916,
-0.069336392,
-0.0756300241,
-0.4273681641,
0.01450409,
-0.2572435439,
0.1462517083,
0.3188642561,
-0.4664767385,
-0.1490092129,
-0.209010601,
0.2165496945,
-0.1546198279,
0.3447424471,
-0.1058523059,
0.3180479109,
-0.1220528185,
0.029144289,
0.1910929531,
0.045349393,
0.6301656365,
-0.192922771,
0.022960091,
-0.0133990431,
-0.3280262649,
0.1866908222,
-0.0873127431,
0.1485880315,
-0.0832738653,
-0.2093457431,
0.4092458785,
0.2010463029,
0.282133162,
0.2278541774,
0.2349044085,
-0.1946623474,
0.0178910755,
-0.1207935885,
0.537794888,
0.0661688671,
0.0065827426,
0.1903312504,
0.0043800008,
-0.4356061816,
0.191112563,
0.0592479855,
0.357485652,
0.0085332664,
-0.0903623775,
0.0203512534,
-0.1798354536,
0.0442479663,
0.2468068749,
0.1529728472,
-0.2967973948,
0.3693976104,
-0.0971113518,
-0.1109662279,
-0.4364365041,
-0.1669521034,
-0.1252867728,
-0.194288522,
-0.044791434,
-0.0070662741,
0.4886487424,
-0.4631691277,
0.2122550309,
0.0747726485,
0.5314905643,
0.1154672727,
0.311324209,
-0.2635482252,
0.078843765,
0.3261720836,
0.0190120768,
0.2229300588,
-0.0420923382,
0.0808248222,
0.029832352,
0.5602992773,
-0.0744846538,
-0.1325143278,
-0.1314006746,
0.1612409502,
-0.2957396805,
0.1007016301,
-0.3321016431,
-0.066467762,
0.1246927753,
-0.0315265581,
0.2606885433,
-0.3304380774,
0.0405383222,
-0.1430798322,
0.0388983265,
0.634155035,
-0.1808885336,
-0.0129789263,
0.1518668681,
0.094159849,
0.3056047559,
0.0986485183,
-0.3293596506,
-0.4173758328,
-0.1197888926,
0.1613764316,
0.1841507703,
0.2218622863,
-0.3250556886,
0.2197610736,
-0.244783178,
0.1017398238,
0.2811568081,
0.497520566,
0.4399676621,
-0.2268903852,
0.2996388972,
0.3158228695,
-0.1091268137,
0.2612719536,
-0.4395675957,
-0.0683061033,
-0.0197121371,
0.2973831892,
-0.0538246594,
-0.1804978698,
-0.075857088,
-0.1389849782,
0.0784428418,
-0.1193514913,
0.1375365555,
0.1341779083,
0.0437220484,
0.0954044759,
-0.0717149153,
-0.143535316,
-0.6150407791,
0.2157735974,
0.153798297,
0.0008419603,
-0.235185504,
0.0338357799,
0.1785726398,
-0.0013186177,
-0.2086162865,
-0.1329337806,
0.0038542503,
-0.0441623852,
-0.1432217509,
0.0896588117,
-0.1638952792,
0.5435912013,
-0.1590116918,
0.0077640042,
-0.2681697309,
0.4484796226,
-0.0182628408,
-0.4837665558,
-0.2552694678,
-0.1071326211,
0.0338499695,
-0.0465848632,
-0.1040763035,
0.3443762362,
-0.0660258532,
0.1233280972,
-0.3504337668,
0.026563473,
0.3699012697,
-0.0935289338,
0.1608653814,
0.3548156023,
0.0572151095,
0.026404541,
0.0772501081,
0.2529551089,
-0.4101239443,
0.1560891569,
-0.0700979158,
-0.130151853,
-0.0927053764,
0.1763368249,
-0.1572453678,
0.2699424624,
0.453907907,
-0.1660535485,
0.238631174,
0.1235292703,
-0.2645142674,
0.3699783385,
0.1024752036,
0.0807823613,
0.0099624684,
-0.0414980687,
-0.31262514,
-0.0438971817,
0.2174342871,
0.122385785,
0.2964059711,
0.2253801674,
0.0336620435,
-0.1922153831,
-0.1501042843,
-0.3918683827,
0.2277216166,
0.2594929636,
0.0629670322,
0.2116514742,
0.0876166523,
-0.1563094258,
-0.2519595921,
-0.3591311276,
0.0264742859,
0.2507943213,
-0.2796297371,
0.2187860161,
-0.1389971375,
-0.0761645585,
-0.1790861338,
-0.130582124,
-0.3786979914,
-0.3084187806,
-0.0532182977,
0.7595319152,
-0.1909829229,
0.1129108146,
-0.3325246274,
-0.1163950711,
0.0846185759,
0.0394872613,
-0.3609860241,
-0.1666884124,
-0.1446968466,
-0.0656261072,
0.4298763275,
-0.0517397001,
0.1879485399,
0.2138380706,
-0.3249354959,
-0.2858014703,
0.0304160379,
-0.0127657223,
0.1018611938,
0.241507113,
-0.0890484005,
0.4059051275,
-0.1448230296,
-0.2074298412,
-0.0027749978,
-0.2117818743,
-0.0571697839,
0.207441926,
0.0127559127,
0.3589396179,
-0.2913257778,
-0.0607179776,
-0.2924723923,
-0.4315827489,
-0.0740519017,
-0.1791709512,
0.2070245445,
0.0766985491,
0.4659692645,
0.255025804,
0.1419044137,
-0.254052788,
0.0923467577,
-0.2363920957,
0.6167690754,
-0.0159813408,
-0.2508724332,
-0.0035840396,
-0.0908341333,
-0.3518594503,
0.3114842176,
-0.2124381065,
-0.1030735821,
-0.2987543046,
0.2352304161,
-0.1020669416,
-0.0404773317,
0.4628499448,
0.2564908862,
-0.1282549053,
-0.0861960426,
0.1138767824,
-0.0931887552,
-0.0863532722,
0.0435804203,
0.0114048049,
0.2072337121,
0.0853212252,
0.9141857028,
-0.1430664957,
-0.2195760757,
0.1485199034,
0.0360431112,
0.0701825395,
0.2112246901,
-0.2822487354,
0.0459005944,
-0.0811288729,
0.0404400378,
0.1530476063,
-0.0952318087,
-0.2710776031,
-0.043333374,
0.087988928,
-0.2572857738,
-0.2533839047,
0.4333766997,
-0.3004168868,
-0.0793448463,
-0.1617702097,
0.0753427371,
-0.0396893062,
-0.3499680758,
-0.359949261,
0.0434235744,
0.1511364132,
-0.0613183677,
0.1475996822,
0.2976822853,
-0.5477721095,
0.2470635176,
0.2493660897,
0.3205081224,
0.2758979201,
-0.160051018,
0.114942506,
-0.272949487,
0.6524276137,
0.0998257697,
0.179573372,
0.0184763148,
-0.0568652302,
-0.2762084603,
0.0193562452,
-0.1078574285,
0.2083948553,
0.1679325104,
0.0923269987,
-0.1965410411,
-0.2556776404,
0.1261706501,
-0.049975425,
-0.0129609322,
-0.1386404932,
-0.4812380075,
-0.0807213113,
0.0026450183,
0.159812361,
0.0984418988,
0.2141047418,
-0.4082587957,
-0.1484080106,
-0.1184322983,
-0.0952368751,
0.1740265787,
0.0114209596,
0.1054264605,
-0.0748437494,
0.2865487635,
0.2209146321,
0.1191737652,
0.2207627892,
0.0169371441,
0.1504728645,
-0.2092331052,
0.3483510315,
0.1134809777,
0.1073695272,
0.4618748128,
-0.1300615668,
0.0265796632,
0.2006728947,
0.3940161467,
0.2597340941,
0.2738835216,
0.0537459254,
0.2697664797,
-0.2072357684,
-0.3118723631,
0.2216964066,
0.0943779126,
0.366533339,
0.4805297554,
-0.1553993374,
0.0748749748,
0.0200942419,
0.2876242697,
0.7361639142,
0.0364818051,
0.4762033522,
0.1058399603,
-0.1722221226,
0.4762413204,
-0.1463656873,
0.3970869184,
-0.4088748991,
-0.3339001536,
0.0825859383,
-0.266167134,
0.1409518719,
-0.1958373934,
-0.1995211989,
0.2298513204,
-0.1825006455,
0.3234102428,
-0.0658195019,
0.0889408439,
-0.416908294,
-0.2348074764,
-0.0446391776,
0.06826704,
-0.3173096776,
0.1917256117,
-0.1285158098,
-0.1325744987,
-0.0294300392,
-0.0299958661,
0.0037696024,
0.1634751409,
-0.5131339431,
0.0834304988,
-0.1874544621,
-0.4993940294,
-0.1819006652,
0.126477018,
-0.2282659262,
-0.2104522437,
0.0712902173,
0.017184468,
0.0558633395,
-0.0025386007,
0.0775637403,
-0.1805440784,
0.3415123522,
-0.063331835,
-0.0107637625,
-0.027826611,
0.0185411274,
-0.1986932456,
0.1213692799,
0.370990932,
0.0636555701,
0.0548825525,
-0.0612366945,
0.0838183984,
-0.1077841893,
-0.2377169281,
0.0928450748,
0.1229612455,
-0.1762279123,
0.0261281878,
-0.2706046402,
-0.1527837366,
-0.1020056158,
0.6152324677,
0.0539130606,
-0.1533894092,
0.537501812,
0.2653850913,
-0.2668445706,
-0.1612079591,
-0.0099572567,
0.0103323776,
-0.7845993042,
0.4162117243,
-0.0673784539,
-0.1112769693,
-0.0579137243,
0.0006287126,
-0.2502948642,
0.17983751,
-0.2642742991,
-0.2644430697,
-0.3586149812,
-0.0677727237,
0.1856118888,
0.1954989433,
-0.092595838,
-0.0301947873,
0.0859064236,
-0.2529914081,
-0.2510475218,
0.1290743649,
-0.2400563955,
0.1172855571,
-0.0043113837,
-0.2595763505,
0.3051010072,
-0.0259286128,
-0.0067784707,
0.1748497635,
-0.1999068409,
-0.2508584261,
-0.1381686628,
0.1306426823,
-0.1057775319,
-0.307738781,
-0.2314115465,
-0.2523171604,
-0.0303442366,
0.0353282914,
0.3727126122,
0.1506304443,
-0.1193186417,
-0.0959661007,
0.6544398069,
0.5270966291,
-0.1572942287,
0.2761023939,
-0.1387265623,
0.0760692656,
-0.0092759458,
0.3473142982,
0.2261185497,
0.0487343855,
-0.0784338638,
-0.1335302889,
-0.0195063483,
0.1430570632,
0.1679224968,
-0.4355523586,
0.0178267062,
-0.1385294646,
0.2335561961,
0.4129203856,
-0.0100149438,
-0.3839485347,
0.4035997093,
0.1410026401,
-0.0173696056,
-0.003490218,
0.068589583,
0.1341679394,
0.1186395735,
0.1084414199,
-0.2439005077,
-0.0806220099,
-0.0461462587,
0.4310365319,
-0.1013790593,
-0.2280198485,
0.1472136825,
0.3107757866,
-0.0577869453,
0.0546286851,
0.253129065,
0.0324575342,
0.0145913288,
0.1707818359,
-0.0076056984,
0.5038431287,
0.297978729,
-0.0756453797,
-0.1276348829,
-0.2519795299,
-0.3488645554,
0.1795161366,
-0.117422834,
0.1864721775,
0.0801180601,
0.3464299738,
-0.2658953667,
-0.168099001,
0.0586486347,
0.134138912,
-0.2332950383,
0.1263965964,
0.0031435653,
-0.1253931224,
-0.0245290138,
0.0763622671,
0.0618421175,
0.0330761038,
0.1775054485,
0.4660584927,
-0.2275384218,
-0.1645810604,
0.0177232157,
0.277862817,
0.0939168707,
0.0171583388,
0.0229890794,
0.2143428773,
0.1998931468,
-0.1549736261,
0.2033204734,
0.3240655363,
0.3641761541,
-0.2836049497,
0.1617516279,
0.2278892547,
0.0402967334,
-0.1041347161,
0.0567987189,
0.0878694803,
0.0778903216,
0.2293343544,
0.1021961793,
-0.2896411717,
0.0334157012,
-0.0212003514,
-0.1931762546,
-0.118605651,
0.1758756638,
0.0536660701,
-0.3288957477,
-0.1134448126,
-0.1558290571,
-0.4124717414,
0.0316411406,
0.298322916,
-0.129428789,
-0.0569404662,
-0.0461412258,
0.0390461907,
0.0444417633,
0.6258655787,
0.0353643782,
0.3479327261,
-0.2514280379,
0.0423090719,
-0.6467258334,
0.0895242169,
-0.1950165331,
0.1187288463,
-0.0451140068,
0.2829324007,
-0.0613927096,
0.1641158909,
-0.0920852423,
0.2442756295,
0.3028703332,
0.365957588,
-0.4301014841,
-0.0279545393,
-0.0546374284,
-0.1313073188,
0.0151368435,
-0.5017883778,
0.1571709067,
-0.064008005,
0.0928600878,
0.0615482479,
-0.169326961,
-0.0111779906,
-0.035863176,
0.1582550257,
-0.0267448723,
0.1824821085,
0.233528614,
-0.1151343361,
-0.204169184,
0.0034795743,
-0.0761437342,
-0.2375212014,
0.3513275385,
0.3592787385,
-0.1149673238,
-0.0245789364,
-0.4412475228,
0.4490561187,
-0.0774134099,
0.1682953835,
0.0113573382,
-0.0843432918,
0.0628022403,
0.3682864606,
-0.0603076741,
0.268075496,
-0.0745564029,
-0.0146781476,
-0.587136507,
-0.3655338585,
0.5153325796,
-0.5411955714,
-0.3558298349,
-0.4759995043,
0.3483409584,
0.4587849081,
0.1661196649,
-0.1790922582,
0.0264900383,
0.0560143217,
-0.2799866498,
-0.2154408842,
0.2179410607,
-0.0631895736,
0.1888446659,
-0.1685999036,
0.1828196049,
0.2519665062,
-0.002409541,
0.0783004686,
-0.3535573781
] |
https://github.com/huggingface/datasets/issues/3148 | Streaming with num_workers != 0 | Hi ! Thanks for the insights :) Note that in streaming mode there're usually no arrow files. The data are streamed from TAR, ZIP, text, etc. files directly from the web. Though for sharded datasets we can definitely adopt a similar strategy ! | ## Describe the bug
When using dataset streaming with pytorch DataLoader, the setting num_workers to anything other than 0 causes the code to freeze forever before yielding the first batch.
The code owner is likely @lhoestq
## Steps to reproduce the bug
For your convenience, we've prepped a colab notebook that reproduces the bug
https://colab.research.google.com/drive/1Mgl0oTZSNIE3UeGl_oX9wPCOIxRg19h1?usp=sharing
```python
!pip install datasets==1.14.0
should_freeze_forever = True
# ^-- set this to True in order to freeze forever, set to False in order to work normally
import torch
from datasets import load_dataset
data = load_dataset("oscar", "unshuffled_deduplicated_bn", split="train", streaming=True)
data = data.map(lambda x: {"text": x["text"], "orig": f"oscar[{x['id']}]"}, batched=True)
data = data.shuffle(100, seed=1337)
data = data.with_format("torch")
loader = torch.utils.data.DataLoader(data, batch_size=2, num_workers=2 if should_freeze_forever else 0)
# v-- the code should freeze forever at this line
for i, row in enumerate(loader):
print(row)
if i > 10: break
print("DONE!")
```
## Expected results
The code should not freeze forever with num_workers=2
## Actual results
The code freezes forever with num_workers=2
## Environment info
- `datasets` version: 1.14.0 (also found in previous versions)
- Platform: google colab (also locally)
- Python version: 3.7, (also 3.8)
- PyArrow version: 3.0.0
| 43 | Streaming with num_workers != 0
## Describe the bug
When using dataset streaming with pytorch DataLoader, the setting num_workers to anything other than 0 causes the code to freeze forever before yielding the first batch.
The code owner is likely @lhoestq
## Steps to reproduce the bug
For your convenience, we've prepped a colab notebook that reproduces the bug
https://colab.research.google.com/drive/1Mgl0oTZSNIE3UeGl_oX9wPCOIxRg19h1?usp=sharing
```python
!pip install datasets==1.14.0
should_freeze_forever = True
# ^-- set this to True in order to freeze forever, set to False in order to work normally
import torch
from datasets import load_dataset
data = load_dataset("oscar", "unshuffled_deduplicated_bn", split="train", streaming=True)
data = data.map(lambda x: {"text": x["text"], "orig": f"oscar[{x['id']}]"}, batched=True)
data = data.shuffle(100, seed=1337)
data = data.with_format("torch")
loader = torch.utils.data.DataLoader(data, batch_size=2, num_workers=2 if should_freeze_forever else 0)
# v-- the code should freeze forever at this line
for i, row in enumerate(loader):
print(row)
if i > 10: break
print("DONE!")
```
## Expected results
The code should not freeze forever with num_workers=2
## Actual results
The code freezes forever with num_workers=2
## Environment info
- `datasets` version: 1.14.0 (also found in previous versions)
- Platform: google colab (also locally)
- Python version: 3.7, (also 3.8)
- PyArrow version: 3.0.0
Hi ! Thanks for the insights :) Note that in streaming mode there're usually no arrow files. The data are streamed from TAR, ZIP, text, etc. files directly from the web. Though for sharded datasets we can definitely adopt a similar strategy ! | [
-0.4143063426,
0.0090087662,
-0.0575312264,
0.090479508,
-0.0889115334,
-0.2557557821,
0.5883558989,
0.1792391986,
-0.0135440882,
0.4365207553,
0.1794317365,
0.3351474404,
-0.4951827824,
-0.0813726112,
-0.0375346355,
0.0914546698,
-0.1148619503,
0.1715031117,
-0.1394737661,
0.1825375557,
0.024870567,
0.0596146695,
-0.1937871873,
-0.3801694512,
-0.6788660884,
0.1745754927,
0.1381021291,
0.0978578329,
0.1170415357,
-0.2365557849,
0.1210270151,
0.0576245226,
-0.1082674637,
0.6546932459,
-0.0001147963,
-0.0929714143,
0.4668414593,
0.1498445868,
-0.6293582916,
-0.3716199994,
0.206119284,
-0.196538493,
0.1303311586,
0.0720084086,
0.080631882,
0.1794769466,
0.1605393291,
-0.3033620417,
0.1996501237,
0.2648702264,
0.0913729221,
0.4180986583,
-0.3160582781,
0.2894593775,
0.1164906472,
-0.1814071685,
-0.2618106604,
0.2382863164,
0.4549101293,
-0.0690265521,
-0.1946635991,
0.2166136801,
-0.2756496668,
0.0997344032,
0.1846025586,
-0.1018596441,
-0.3252632022,
-0.6266248822,
0.2068679482,
0.3251903951,
-0.0786998048,
-0.045801688,
0.0033470001,
-0.4331635237,
0.0561901554,
-0.3432873487,
0.2050539106,
0.2637584805,
-0.4875221848,
-0.1639727056,
-0.2828737497,
0.2825276852,
-0.1118494123,
0.3059398234,
-0.1513921767,
0.3185964823,
-0.1385758072,
0.0005081465,
0.2005150616,
0.011375308,
0.6334409714,
-0.2142488658,
0.0530547723,
0.0092941355,
-0.3408908844,
0.1763082594,
-0.0089910701,
0.1700005978,
-0.0646441355,
-0.2631527781,
0.3998753726,
0.1602891684,
0.3048627973,
0.2122561038,
0.2396823019,
-0.1929454654,
-0.0461904071,
-0.147802949,
0.5269640088,
0.1415034533,
0.0365635864,
0.1689837724,
0.0426156893,
-0.358047694,
0.2679623365,
0.0419396721,
0.3315665722,
-0.0586189851,
-0.0768560767,
0.0756920576,
-0.2275698483,
0.0579705089,
0.2504349351,
0.1838664412,
-0.3236344755,
0.3339577615,
-0.1074470058,
-0.1406323314,
-0.4748968184,
-0.1831724495,
-0.1523777694,
-0.1975595355,
-0.0193327721,
-0.0348582081,
0.5200937986,
-0.5533133149,
0.2654010355,
0.1034349129,
0.5184746981,
0.1459907591,
0.3025615215,
-0.2561682463,
0.0899208561,
0.3293526173,
-0.0075102882,
0.2073695213,
-0.1046174839,
0.1487017572,
0.054530289,
0.6070771813,
-0.0080472426,
-0.1558096856,
-0.081899181,
0.1823071986,
-0.3328895569,
0.0685570613,
-0.2411823571,
-0.0321271867,
0.1160639226,
-0.0317030586,
0.249591276,
-0.3895551562,
0.0306853279,
-0.077108562,
0.0849686936,
0.6202540994,
-0.1003900617,
-0.0281972233,
0.1377503127,
0.0763519779,
0.3365948498,
0.0259391945,
-0.2726677358,
-0.3834515214,
-0.0890702233,
0.144464761,
0.1197384372,
0.2711756229,
-0.3187185526,
0.2208509892,
-0.2486621737,
0.172434777,
0.2601597309,
0.4975774586,
0.4091727734,
-0.2063550949,
0.421438098,
0.2876700461,
-0.1153912917,
0.2442932278,
-0.4581514895,
-0.0271951016,
-0.0113340821,
0.3150862157,
-0.044430621,
-0.1054887697,
-0.1258168817,
-0.0382357575,
-0.0031273183,
-0.0961133987,
0.0445445441,
0.1447229832,
-0.0260811485,
0.1086732,
-0.069112666,
-0.1770243347,
-0.5775411129,
0.2097816616,
0.1999305636,
0.0893742517,
-0.1363967359,
0.0704863369,
0.1923436075,
-0.0211654566,
-0.1745735705,
-0.1653849483,
-0.0044732792,
-0.049589321,
-0.073767297,
0.0889718682,
-0.1652086973,
0.5554665327,
-0.1474584788,
-0.0204413179,
-0.3419877291,
0.3482142091,
-0.0287830569,
-0.4959203899,
-0.1895940155,
-0.0714171603,
0.0221484508,
0.0098661389,
-0.0854222775,
0.3253190815,
-0.0975777581,
0.1105832085,
-0.461943239,
0.0523657426,
0.3082007468,
-0.0191842578,
0.1700601578,
0.3610631227,
0.0606978945,
0.0100715505,
0.0454657711,
0.2381701022,
-0.4133297801,
0.132322669,
-0.0751535743,
-0.2135991305,
-0.0857460499,
0.1516050398,
-0.1772005409,
0.2870026231,
0.5555791855,
-0.1620011628,
0.2082910389,
0.1518481374,
-0.3982338309,
0.3277068734,
0.1472978294,
0.0122052571,
-0.0027637936,
-0.0501573607,
-0.3261623681,
-0.1041030362,
0.1548930556,
0.1228171065,
0.3184903562,
0.2007982582,
0.0579126999,
-0.0880297199,
-0.1592079401,
-0.4354148209,
0.246344611,
0.1956184953,
-0.0711935684,
0.2082787901,
0.0620084852,
-0.1298513114,
-0.2751623392,
-0.3336798847,
-0.0275426209,
0.3139254451,
-0.349851191,
0.222550869,
-0.1220414415,
-0.0283673555,
-0.1635342687,
-0.1026949883,
-0.3984394372,
-0.3401981294,
-0.0692667738,
0.8024849892,
-0.1296645999,
0.0333673358,
-0.3181538582,
-0.1062945202,
0.0851158947,
0.1017465889,
-0.3761915565,
-0.0842922851,
-0.2030495405,
-0.0457858667,
0.3303074241,
-0.0897169635,
0.1587557644,
0.1305691302,
-0.3298100531,
-0.1763084382,
0.023670774,
-0.0078851869,
0.0500122495,
0.3111433387,
-0.0102404319,
0.4574683607,
-0.1362630129,
-0.1045806557,
0.0134813236,
-0.2362447381,
-0.0389204733,
0.2542268336,
0.0406497382,
0.3545819819,
-0.2941040397,
-0.1162614822,
-0.2084104568,
-0.3543187082,
-0.09115161,
-0.2220820934,
0.1822970659,
0.0695012137,
0.4158728719,
0.2884176075,
0.1328885108,
-0.2431595325,
0.0427381769,
-0.4045702219,
0.6566905975,
0.0090982998,
-0.2190769166,
0.0402337797,
-0.0667424724,
-0.4168603122,
0.2120265812,
-0.2094390988,
-0.0328242742,
-0.2816250026,
0.2073869556,
-0.074682489,
-0.0684226975,
0.4505014122,
0.2071975768,
-0.1341876239,
-0.0577157401,
0.0076991217,
-0.1333275139,
-0.0337151848,
0.0919502676,
0.0036397814,
0.2149240971,
0.0697265863,
0.8176307082,
-0.1566836238,
-0.1846786886,
0.1381718814,
0.0541656651,
0.0395318568,
0.1300276667,
-0.2791483402,
0.1246860474,
-0.0008771009,
-0.0073539033,
0.1804716736,
-0.0987863615,
-0.2541730404,
-0.0640575737,
0.0107395016,
-0.1407880187,
-0.2084128112,
0.4258764386,
-0.2599515617,
-0.0645600781,
-0.1407284141,
0.135918349,
-0.0531092994,
-0.3845050633,
-0.4056262374,
0.0677637234,
0.1401910335,
-0.0802476108,
0.082167916,
0.2540327609,
-0.5885691047,
0.2390920073,
0.228982836,
0.3251684606,
0.2134585083,
-0.1792912036,
0.1095279306,
-0.2645016909,
0.5895893574,
0.0480958708,
0.1988063902,
0.0510666445,
-0.0682553649,
-0.1802977026,
-0.018950304,
-0.143105343,
0.1573005319,
0.2140154243,
0.0665685311,
-0.1524901837,
-0.1966847777,
0.2294945568,
-0.0751071349,
0.0092053879,
-0.2286150903,
-0.4828433394,
-0.1214466467,
0.080738917,
0.1931042522,
0.0227682516,
0.2109398246,
-0.4573450685,
-0.1110552922,
-0.0347781703,
0.0147161596,
0.2357863933,
-0.0002510335,
-0.0103820367,
-0.0141797345,
0.3081668913,
0.2434525937,
0.1132122353,
0.1737940907,
-0.0017897518,
0.0932824239,
-0.1834887713,
0.3425673544,
0.1443256587,
0.076471515,
0.4356247783,
-0.1118454039,
0.0361431055,
0.3358718455,
0.435507983,
0.2327861786,
0.177025646,
0.1288024485,
0.3431015611,
-0.2772876322,
-0.4025251865,
0.1305686235,
0.0848168358,
0.4105380774,
0.3919415474,
-0.3381858468,
0.0833764374,
-0.0258343853,
0.2244728506,
0.7761668563,
0.0372414142,
0.444930315,
0.1354671717,
-0.07231801,
0.472446084,
-0.1357149482,
0.4163375795,
-0.3617488444,
-0.4038393497,
0.064051196,
-0.2447324246,
0.2161162049,
-0.2667523623,
-0.2103574127,
0.3049233258,
-0.2092556655,
0.3840817809,
-0.0244649444,
0.0384780988,
-0.4492135048,
-0.2038923949,
-0.1057418063,
0.0854862109,
-0.3243460953,
0.2481058687,
-0.071983695,
-0.1176825166,
-0.0143032549,
-0.0333118513,
0.0167633183,
0.1769345403,
-0.4943624437,
-0.0476680174,
-0.1642800719,
-0.4029110968,
-0.1673958749,
0.1520667821,
-0.1891976148,
-0.1112905741,
0.0473731235,
-0.0167893376,
0.0667643547,
-0.0085536232,
0.1868919134,
-0.1552355736,
0.3500936627,
-0.0596557856,
-0.1145541891,
-0.0373379216,
0.0130943442,
-0.11667227,
0.1247549802,
0.2557177246,
0.0971114188,
-0.0096900063,
-0.1187171414,
0.0597763322,
-0.0326254964,
-0.2471904457,
0.1119244471,
0.1169793531,
-0.1931818426,
0.0026294014,
-0.300833106,
-0.1702901274,
-0.1667944491,
0.6296815276,
0.0451762527,
-0.0669757128,
0.5160503387,
0.2852298319,
-0.278375417,
-0.1424094737,
-0.0163201429,
-0.0040859175,
-0.6433062553,
0.3625839353,
0.0280987713,
-0.0610205792,
-0.0848708972,
0.0324790739,
-0.2762490213,
0.1210537553,
-0.2698436975,
-0.2310966849,
-0.3827398717,
-0.1456905156,
0.2275186181,
0.1282226741,
-0.0118557308,
0.0198645815,
0.0959357247,
-0.3088660538,
-0.2676638365,
0.0764225721,
-0.2861031294,
0.1343925148,
0.0846247151,
-0.2694005072,
0.3311995566,
-0.083628647,
0.0254614204,
0.1612977684,
-0.2379365861,
-0.2798368037,
-0.1454513818,
0.1237018481,
-0.1366333812,
-0.342353493,
-0.2551446855,
-0.2320468277,
-0.0482775718,
0.0184483714,
0.3688727319,
0.1739417464,
-0.078678295,
-0.0137366736,
0.555657208,
0.5521371961,
-0.131495297,
0.2684265673,
-0.1557681412,
-0.0195487253,
-0.0224129166,
0.312818706,
0.1640546024,
0.0642753989,
-0.106720902,
-0.1318287104,
-0.0817838013,
0.2105506063,
0.2522701919,
-0.4455844462,
0.0707874447,
-0.125918895,
0.1592290252,
0.4324741662,
-0.0583075732,
-0.3721309602,
0.3724401891,
0.1487125456,
0.0021544595,
0.0422643162,
0.0474693663,
0.1760966033,
0.095279254,
0.0873638168,
-0.2817182541,
-0.1241452247,
-0.041798681,
0.4077328444,
-0.0943555757,
-0.2155626714,
0.1690243483,
0.3934035599,
-0.0194016714,
0.1035074443,
0.2716887891,
0.0708628297,
-0.1026005074,
0.1074147746,
0.1028627902,
0.453032583,
0.2539288104,
0.0131279873,
-0.1823588759,
-0.346655637,
-0.3194020092,
0.2575803697,
-0.1692723036,
0.206496641,
0.0668535754,
0.2610094249,
-0.2850595415,
-0.1250852495,
0.0095249936,
0.1587138325,
-0.2465179116,
0.0835391358,
0.0509171262,
-0.1110126078,
0.028844066,
0.1017898396,
0.0897836313,
0.0704604611,
0.1405001581,
0.4232535958,
-0.222761035,
-0.1258243024,
-0.0475506075,
0.1912511885,
0.0803309977,
0.0142987976,
0.0235950984,
0.1362344027,
0.2231110036,
-0.1207002625,
0.2450093925,
0.354739368,
0.3910887241,
-0.2152923346,
0.2161102891,
0.2134622931,
0.0076451539,
-0.0705823079,
0.0789358541,
0.0932800695,
0.1239934936,
0.2183297127,
0.1061543971,
-0.2820367217,
0.0833823755,
-0.0354725234,
-0.1250932068,
-0.1698706299,
0.2109315395,
0.0769775957,
-0.254750967,
-0.1852881908,
-0.1558992714,
-0.4585894048,
0.0911886841,
0.2926478088,
-0.0805904344,
-0.0442749709,
-0.0514026433,
0.0431617536,
0.1002896279,
0.5585821867,
0.0547101982,
0.2689704895,
-0.2606376112,
0.0839720815,
-0.6142115593,
0.0723398179,
-0.1340027153,
0.1737855822,
-0.0285152905,
0.1996160001,
-0.1135287955,
0.1161555722,
-0.1509495378,
0.1744053364,
0.2080934942,
0.4420382679,
-0.3192836046,
-0.0443957485,
-0.0924447402,
-0.1220989972,
0.0038927218,
-0.4168541431,
0.1843477935,
-0.1170534417,
0.1037348136,
0.0327973329,
-0.1168070734,
-0.0399861112,
0.0019696506,
0.1001326218,
-0.0138793178,
0.1808366477,
0.259203583,
-0.1307241023,
-0.178035289,
0.0582865439,
-0.0288257059,
-0.2146041542,
0.3345623314,
0.3130637407,
-0.0869717076,
-0.0375752971,
-0.4419185519,
0.4468535483,
-0.0803875327,
0.0891739652,
-0.0386217944,
-0.0983741283,
0.083817184,
0.3841789365,
-0.0389198065,
0.3013702333,
-0.0423396863,
-0.0418502986,
-0.595879674,
-0.3389217257,
0.4605932534,
-0.5181386471,
-0.2849457264,
-0.5777760148,
0.3153031468,
0.405682683,
0.1112001762,
-0.2164842039,
0.0709287897,
0.039357122,
-0.3507511616,
-0.2095226347,
0.2416561842,
-0.1420837492,
0.2299826294,
-0.1493755877,
0.1265973449,
0.2476849407,
-0.0026893828,
0.1141932458,
-0.3215506375
] |
https://github.com/huggingface/datasets/issues/3145 | [when Image type will exist] provide a way to get the data as binary + filename | @severo I'll keep that in mind.
You can track progress on the Image feature in #3163 (still in the early stage). | **Is your feature request related to a problem? Please describe.**
When a dataset cell contains a value of type Image (be it from a remote URL, an Array2D/3D, or any other way to represent images), I want to be able to write the image to the disk, with the correct filename, and optionally to know its mimetype, in order to serve it on the web.
Note: this issue would apply exactly the same for the `Audio` type.
**Describe the solution you'd like**
If a "cell" has the type `Image`, provide a way to get the binary content of the file, and the filename, eg as:
```python
filename: str
data: bytes
```
**Describe alternatives you've considered**
A way to write the cell to the disk (passing a local directory), and then return the pathname, filename, and mimetype.
| 21 | [when Image type will exist] provide a way to get the data as binary + filename
**Is your feature request related to a problem? Please describe.**
When a dataset cell contains a value of type Image (be it from a remote URL, an Array2D/3D, or any other way to represent images), I want to be able to write the image to the disk, with the correct filename, and optionally to know its mimetype, in order to serve it on the web.
Note: this issue would apply exactly the same for the `Audio` type.
**Describe the solution you'd like**
If a "cell" has the type `Image`, provide a way to get the binary content of the file, and the filename, eg as:
```python
filename: str
data: bytes
```
**Describe alternatives you've considered**
A way to write the cell to the disk (passing a local directory), and then return the pathname, filename, and mimetype.
@severo I'll keep that in mind.
You can track progress on the Image feature in #3163 (still in the early stage). | [
0.0579433106,
-0.104809314,
-0.0994670019,
0.0846774206,
0.2207916379,
-0.2173030823,
0.155513525,
0.4137360156,
-0.2236264497,
0.3140285313,
0.1264708489,
-0.0210624188,
-0.344050318,
0.1960532814,
0.2407696694,
-0.0566723123,
0.0115617588,
0.3099686205,
0.0601926036,
-0.1337595284,
-0.4765498936,
0.0853719637,
0.0913843066,
0.115439482,
-0.4555109441,
-0.0865863413,
-0.2994651794,
0.3434293866,
-0.492711693,
-0.2949652076,
-0.1615414768,
0.0612216629,
0.1589783877,
0.1818787009,
-0.0001133142,
-0.2409831583,
0.1495029777,
-0.2586762905,
-0.3922654986,
-0.3741043508,
-0.2101404667,
-0.3930556774,
-0.1485234946,
-0.5354617238,
-0.0568098351,
-0.0818918124,
0.353169471,
-0.2383771986,
0.1430014968,
0.1444904655,
0.1604708582,
-0.0741304383,
0.1782240719,
0.1971655041,
0.2930072844,
0.920537889,
-0.0631464943,
0.0975182727,
0.3627636433,
0.0908440202,
0.2853910327,
0.4628317058,
0.0283742342,
0.1426956505,
0.2031608075,
0.3263201714,
-0.0646504015,
0.1192263216,
-0.0684246123,
0.174643755,
0.5385545492,
-0.2604173124,
-0.2904453874,
0.0335540138,
0.0245373864,
-0.3663653135,
0.3974615932,
0.2269343734,
-0.3923102319,
0.1161992624,
-0.3654454648,
-0.0911562294,
-0.2518552542,
0.2164827734,
-0.3397347033,
0.059750624,
-0.1041735113,
0.0160864219,
-0.0328639522,
-0.0687059239,
0.1985099614,
-0.1757452637,
0.1973323226,
0.3677097261,
0.3842036128,
-0.3007690609,
-0.219997853,
-0.1221890822,
0.126294136,
-0.2319910824,
0.2026497871,
-0.3382581174,
-0.2611331344,
0.311973542,
0.1641382277,
-0.3405998647,
0.0072205695,
-0.1665986478,
0.4722321332,
0.0515217893,
0.0822864324,
-0.2245829254,
-0.2487221807,
0.3354479969,
0.4022970796,
0.0050625601,
0.4963646531,
-0.062218938,
-0.1159009263,
-0.0259987619,
0.0243269131,
0.1104991212,
-0.1360658854,
0.1033076271,
0.0436956473,
-0.1345768273,
0.4620111883,
-0.1461238712,
0.0122651905,
-0.1045380533,
0.2159281224,
-0.1745356768,
-0.1146365106,
-0.1566357762,
0.2503584325,
0.4948163629,
0.0914036706,
-0.0781290978,
0.100648731,
-0.0733257905,
0.0759185404,
-0.3748933375,
0.385330826,
0.2367023379,
-0.2802190483,
-0.0709167868,
-0.0970949009,
-0.0704547465,
-0.4016110003,
0.2301701605,
-0.0766439661,
0.0946913883,
-0.2455030978,
0.1613174081,
-0.1982871592,
0.0680504441,
-0.1655181646,
0.0641507357,
-0.3567901552,
-0.2364767641,
0.0274366718,
0.0640135184,
-0.1814948916,
-0.2151378095,
0.0674497485,
0.19146128,
-0.0275172256,
0.0540287308,
-0.0486040674,
0.0382134058,
0.2301728427,
0.0040425085,
0.0772810876,
0.0225148033,
-0.0662869662,
0.1964937449,
0.3336573541,
-0.1676994413,
-0.2374154627,
0.0277900063,
0.0331410989,
0.0482814312,
0.2500610352,
0.5738529563,
0.1610447764,
-0.1456289887,
0.0695239156,
0.668284595,
-0.1825807989,
0.0812024996,
0.0848803073,
-0.2484748214,
-0.1732030511,
0.1143130809,
-0.1694049239,
-0.037341021,
0.4477092028,
-0.1670831889,
0.2291615009,
-0.1577823758,
0.0959636718,
-0.2896037698,
0.4819529653,
-0.0591654852,
-0.0171213374,
-0.442545563,
-0.0474865809,
0.0640143305,
-0.0651893988,
0.035408631,
-0.5395290852,
-0.3622881174,
0.1515710205,
-0.1056660265,
-0.0376139469,
0.0725016445,
0.1604451835,
0.1082766801,
-0.2039717734,
0.1031728759,
-0.2848594487,
0.026209617,
-0.1282566786,
0.0015599797,
0.2885290086,
0.0550808683,
0.1615945548,
-0.0750980675,
-0.0680141225,
0.0329069011,
0.0850057676,
0.2001139671,
-0.1419097483,
0.3406286836,
0.2922292352,
0.3313849866,
0.031699378,
0.1559761167,
0.2238062173,
0.1105832756,
0.1474285871,
0.1512605995,
0.3427357376,
-0.0654731542,
-0.3687655926,
0.1175258234,
-0.0233269781,
-0.093934454,
-0.0203377511,
0.0726010427,
0.1449737698,
-0.0900729224,
-0.3206024766,
-0.0001510362,
-0.2618428767,
-0.0356270634,
-0.4957393408,
0.0211874489,
-0.420579344,
-0.2793143988,
0.6712598801,
-0.19922176,
0.6124750376,
0.1260911524,
-0.0507336035,
0.1820116341,
0.257150203,
0.2559187114,
0.3943622112,
0.2503155768,
-0.2580760419,
-0.2297710627,
-0.0298509095,
0.1256428957,
0.3369598687,
-0.0962565467,
0.1266212463,
-0.1316568553,
0.1273740977,
-0.1422649175,
-0.1951464117,
-0.1477527618,
-0.1345858574,
-0.3364244103,
-0.0939370021,
-0.0839266032,
-0.0964978263,
-0.1484267265,
-0.2851417363,
0.1695739776,
-0.0757023916,
0.206772238,
0.0654041842,
0.2606972754,
-0.0373993255,
-0.0648959577,
-0.1799577624,
0.5247414112,
0.0497606024,
-0.1704596728,
0.0050652074,
0.1670363694,
0.0991394669,
0.1566886902,
0.1010709256,
0.0853335932,
0.6666921377,
-0.4290884435,
0.4067475498,
-0.3682325184,
-0.1207986251,
0.0848404318,
-0.0413768403,
0.2379257977,
0.2860447168,
0.2582697272,
-0.0478397906,
-0.0188330375,
0.3063728809,
0.014986068,
-0.2821281552,
0.1587688923,
0.4530111849,
-0.1005631089,
-0.1662391573,
-0.0059334487,
-0.4232551754,
-0.1750729531,
0.4008003771,
-0.1074475497,
0.5617820024,
0.2556093335,
0.1621088237,
-0.0889162123,
0.1555781811,
0.2123967856,
-0.1517686844,
-0.2157308012,
0.3005383611,
-0.0551720746,
-0.0851096809,
-0.146158427,
0.0955575854,
-0.1570321023,
0.5628396273,
-0.0724379718,
-0.488432616,
0.1162987575,
0.2952716351,
-0.0214290526,
0.1234504506,
0.1814705729,
0.311598897,
-0.1820390373,
-0.4637880623,
0.1906284541,
-0.0947722346,
0.2047653645,
0.2511973977,
0.5231053233,
0.1483320892,
0.1147451848,
0.0554222651,
-0.2531222701,
-0.1421213895,
0.408777386,
0.0868314803,
0.136290282,
0.0281676371,
-0.2133423984,
0.1066345498,
-0.1174267307,
-0.1250019521,
-0.0357531719,
0.0153670507,
0.0070363404,
-0.2059995383,
0.2792026699,
-0.4118635356,
-0.0496731102,
0.3839458525,
0.2018681765,
0.4579274356,
-0.1761064827,
-0.0245954078,
-0.1266268194,
0.0402392484,
-0.1139748394,
0.3214565814,
0.296484679,
-0.0420822836,
0.0483673774,
-0.418887645,
-0.0359377861,
0.164167136,
0.3907574713,
0.0903999805,
-0.1631400585,
-0.04496843,
0.1485013068,
0.1053151786,
0.441931814,
-0.0069026705,
-0.0138314618,
-0.1221993789,
-0.0602545179,
-0.0082615232,
0.2884137332,
-0.1170466095,
0.4435606599,
-0.4562833607,
0.5248827338,
-0.0696303397,
0.0771772936,
-0.0327620246,
0.1301627308,
-0.1803219765,
-0.2212196738,
0.041653119,
-0.0715624765,
-0.2005072087,
0.0210453831,
0.2496012598,
0.0022241799,
0.098486118,
-0.5261066556,
-0.1744266152,
0.1891912967,
0.1367422491,
0.0215400849,
0.259406358,
-0.3357676864,
-0.1031365171,
0.2459995449,
0.1392425597,
0.5127666593,
0.2033212781,
-0.0743325278,
0.1652537137,
0.0653463304,
-0.2241847813,
0.1222013831,
0.5085881352,
0.1049705893,
-0.1132334322,
0.1247056127,
-0.0434038714,
-0.820217073,
-0.108295247,
0.4697730839,
0.0711900368,
-0.09593454,
-0.4236461222,
0.3963078856,
-0.1545965523,
-0.08666154,
0.0584310219,
0.2423160225,
-0.5005307794,
-0.0564871319,
0.2547833622,
1.0409243107,
-0.0453894064,
0.3880828023,
-0.2188697904,
-0.315482527,
-0.1636189222,
-0.1432625502,
0.0791667923,
0.1160743758,
-0.0087700132,
-0.3846398294,
-0.0508761927,
0.3240904808,
0.1619281918,
-0.3058764935,
0.03541255,
-0.0248026643,
0.2174963355,
0.0138720227,
0.1396830827,
-0.8123116493,
-0.1380925477,
-0.3229096532,
0.1197912768,
-0.1974460185,
-0.0271897707,
0.0297609996,
-0.2479565293,
-0.2204425484,
-0.1389329433,
0.0502407998,
-0.3152965307,
-0.4029833078,
0.1753625721,
-0.413038522,
-0.0770902485,
-0.3257400393,
-0.0649542809,
-0.0338746049,
0.4222236574,
-0.0528083071,
0.0877161026,
0.3815689385,
0.3622308671,
-0.035875231,
-0.025585955,
0.2068352401,
0.0559478328,
-0.0355313905,
-0.0190909654,
-0.0093715889,
-0.1272323281,
0.0493774861,
-0.1952133179,
0.1394143254,
-0.1651987582,
-0.1554575115,
-0.4105624259,
-0.1117008105,
-0.0219557881,
0.1728796512,
0.2070696652,
-0.0893405676,
0.2155223936,
0.3461970389,
0.0017085196,
0.0279530324,
-0.0098620262,
0.2291712463,
0.1238266751,
0.1395744979,
-0.3570387363,
-0.0573961996,
-0.1963947117,
0.5973398089,
0.0301023256,
-0.3763934672,
0.2921712697,
0.0100413319,
-0.099298045,
-0.5020071268,
0.343190819,
0.0886609554,
-0.1374299228,
-0.4751924574,
-0.0896921381,
-0.2058397382,
0.57133919,
0.1628249437,
0.442882508,
0.0993622094,
0.0736293346,
-0.0633945242,
-0.3277650177,
-0.3407337666,
0.1607426405,
-0.1271067858,
0.2529287934,
0.142983824,
0.3553866744,
0.0871398002,
-0.2099546045,
0.1160297617,
-0.0021553708,
-0.0141198179,
-0.0847277343,
-0.1890161484,
0.1525776535,
-0.0222149473,
0.0406850576,
-0.0678433776,
-0.4300509691,
-0.1033546627,
-0.0465152599,
-0.1816858798,
0.0161033068,
-0.1248905957,
-0.0778120831,
0.2853105962,
-0.0389763303,
0.3604997396,
0.2567449808,
-0.3437850177,
0.1524520069,
-0.1141448468,
0.0084662214,
-0.0466869064,
0.0033964072,
0.2352367789,
0.2382924706,
-0.2341015041,
-0.2001455128,
0.5304918289,
0.2828046978,
-0.0490492694,
0.2025311738,
0.3968416154,
-0.0331606753,
-0.3078068793,
-0.156389147,
0.2095609307,
0.2770920098,
-0.0814156383,
0.0080937212,
-0.4083391726,
-0.2444178164,
0.0117878402,
0.3225410283,
-0.0220714994,
0.2169115543,
-0.2230157405,
-0.1330501884,
0.3684858978,
0.0225969013,
-0.0806001127,
0.4339069724,
-0.0414037406,
0.1530600339,
0.0093039731,
0.2263939977,
0.2298360318,
0.2529190481,
-0.2897744775,
-0.0143420016,
0.4050239623,
0.0080705797,
0.3958456814,
0.2440045029,
0.0710549802,
-0.2129730731,
-0.0460899398,
0.5599396229,
0.0795590132,
0.2823373079,
-0.4677381516,
-0.0707766265,
-0.1359713823,
0.1119510159,
-0.0824445188,
0.127335161,
-0.3500401974,
-0.1363107413,
-0.4118555486,
-0.2031941861,
-0.0990754068,
0.0820217952,
0.0849168599,
0.228372559,
0.3319827914,
-0.0987932235,
-0.1296045482,
0.0159671754,
0.4423577189,
-0.4497196972,
-0.1011829749,
0.3065934777,
0.2573790252,
0.4567668736,
0.2920378447,
0.2207573354,
0.3666058183,
-0.0593876317,
0.128249526,
-0.2098885477,
-0.2712087631,
-0.2600637376,
-0.0099903131,
0.2624704242,
0.3348213434,
0.1142655462,
0.1335194856,
-0.0029966789,
-0.0654805154,
-0.063698791,
-0.2791016102,
-0.209513247,
0.0533783175,
-0.0223195665,
-0.1254577786,
-0.103961058,
-0.1661466807,
-0.4440114796,
-0.1842482388,
-0.0217150208,
-0.0869353786,
0.0225705765,
0.2874815166,
0.0791545585,
-0.0725714937,
-0.1989681125,
0.1146012917,
0.0188642871,
-0.1256001145,
-0.1674418151,
-0.4800818264,
-0.363846302,
-0.1088064313,
-0.5310291052,
0.0261739474,
-0.2575857043,
0.3682411611,
0.0150061268,
0.2048438489,
0.0079564368,
-0.0513701551,
0.2269136906,
-0.2574620843,
-0.4981189668,
0.3476320207,
0.1413165629,
-0.2234851718,
-0.3383611739,
0.1545530707,
0.0540497266,
0.1180950701,
-0.2140580267,
0.0123634152,
-0.277729243,
-0.103567414,
0.4234282672,
0.2163077742,
0.1549720466,
-0.1249762103,
-0.123121351,
0.1475935578,
0.0701533854,
-0.1757664829,
-0.0991534516,
0.0476571247,
0.5791265965,
0.0000241293,
-0.0777558982,
-0.1944833547,
0.4357077777,
-0.3729656637,
-0.0598888136,
-0.1007747278,
-0.1526787281,
-0.4524278939,
-0.2284711152,
-0.0818480924,
0.0688129067,
-0.1438836753,
0.031465169,
-0.2456009835,
-0.3313812613,
0.4421167076,
-0.0213807672,
-0.214438647,
0.1206301451,
0.1043898314,
-0.1693494767,
0.509640336,
-0.4845033586,
-0.1630611122,
0.2081237435,
0.0302681122,
-0.0004115057,
0.2064740062,
0.2510400116,
-0.1566668749,
-0.0689150542,
0.1098063141,
-0.0702092573,
-0.1586019695,
-0.2910425961,
-0.4022614062
] |
https://github.com/huggingface/datasets/issues/3145 | [when Image type will exist] provide a way to get the data as binary + filename | Hi ! As discussed with @severo offline it looks like the dataset viewer already supports reading PIL images, so maybe the dataset viewer doesn't need to disable decoding after all | **Is your feature request related to a problem? Please describe.**
When a dataset cell contains a value of type Image (be it from a remote URL, an Array2D/3D, or any other way to represent images), I want to be able to write the image to the disk, with the correct filename, and optionally to know its mimetype, in order to serve it on the web.
Note: this issue would apply exactly the same for the `Audio` type.
**Describe the solution you'd like**
If a "cell" has the type `Image`, provide a way to get the binary content of the file, and the filename, eg as:
```python
filename: str
data: bytes
```
**Describe alternatives you've considered**
A way to write the cell to the disk (passing a local directory), and then return the pathname, filename, and mimetype.
| 30 | [when Image type will exist] provide a way to get the data as binary + filename
**Is your feature request related to a problem? Please describe.**
When a dataset cell contains a value of type Image (be it from a remote URL, an Array2D/3D, or any other way to represent images), I want to be able to write the image to the disk, with the correct filename, and optionally to know its mimetype, in order to serve it on the web.
Note: this issue would apply exactly the same for the `Audio` type.
**Describe the solution you'd like**
If a "cell" has the type `Image`, provide a way to get the binary content of the file, and the filename, eg as:
```python
filename: str
data: bytes
```
**Describe alternatives you've considered**
A way to write the cell to the disk (passing a local directory), and then return the pathname, filename, and mimetype.
Hi ! As discussed with @severo offline it looks like the dataset viewer already supports reading PIL images, so maybe the dataset viewer doesn't need to disable decoding after all | [
-0.1724829525,
0.0429175198,
-0.0778839737,
0.2818343341,
0.280492425,
-0.0878628194,
0.0411132835,
0.3518592417,
-0.2673685551,
0.3344699442,
-0.0756199807,
0.1827455908,
-0.2529495656,
0.2509998083,
0.0176695026,
-0.1057252809,
-0.0495731197,
0.366279453,
0.1182622761,
-0.0500902273,
-0.5074369907,
-0.0617130995,
-0.0491933934,
0.1138561815,
-0.2637776136,
-0.1284044981,
-0.2294962257,
0.1478626281,
-0.5359737873,
-0.409150064,
-0.1404135972,
0.2671597004,
0.1967912316,
0.1345917583,
-0.0001182456,
-0.026051376,
0.3152441978,
-0.201455012,
-0.3229511976,
-0.3824581206,
-0.3306430876,
-0.5148411393,
-0.0105197374,
-0.5073786378,
-0.1359519809,
-0.430980891,
0.4497349262,
-0.2506023645,
0.0665896609,
0.1150076389,
0.1228939518,
-0.0591240227,
0.1755364388,
0.4560667872,
0.2443283051,
0.8091183305,
-0.1479472518,
-0.0395942107,
0.2200097591,
0.2446991801,
-0.005930624,
0.4257152975,
-0.0001886204,
0.2183878869,
0.1714220941,
0.3303462267,
-0.1234338954,
-0.1018604413,
-0.0376582555,
0.1702532768,
0.5824542642,
-0.2895775437,
-0.4140722752,
-0.1469356865,
0.0865243003,
-0.2549164295,
0.3657735884,
0.1977047771,
-0.4909071624,
0.2177001089,
-0.2982287407,
-0.1672305465,
-0.3120260835,
0.1083066016,
-0.3714884222,
-0.0233060364,
-0.1074290276,
0.0293697752,
0.0067730984,
-0.0608370863,
0.4717544317,
-0.0519525558,
0.2255250812,
0.1875860393,
0.3254893124,
-0.3153855801,
-0.1808158457,
0.075124599,
0.0204155408,
-0.2525445819,
0.0811658427,
-0.1471090764,
-0.2691915333,
0.3077774644,
0.2448948771,
-0.4060939252,
0.0151659483,
0.0942217857,
0.4931671917,
-0.003614689,
0.142855674,
-0.1719581336,
-0.2314950675,
0.1816082597,
0.2759773433,
0.0051266132,
0.5467547178,
-0.081096828,
-0.1838411838,
-0.0310344417,
-0.0189614277,
0.0063200332,
-0.1324665099,
0.1503393948,
0.1728792638,
0.2216682732,
0.3253047168,
-0.1530675739,
-0.1056101173,
-0.2417967469,
0.2598733902,
-0.2237644941,
0.0532136075,
-0.2522256374,
0.2385191917,
0.2785255909,
-0.0134145943,
0.0352945551,
0.0659809932,
0.0887102485,
0.2212159932,
-0.518730104,
0.3974026144,
0.3242448568,
-0.1456780285,
-0.1086959317,
-0.1010860279,
-0.0730498508,
-0.2916021645,
0.4414387941,
-0.0417235456,
0.1300983876,
-0.1380637735,
0.0767385885,
-0.3134545982,
0.1003277749,
-0.2245390713,
0.1380870938,
-0.432754457,
-0.2970302999,
-0.1034576148,
-0.1905136853,
-0.2584846616,
-0.2158853114,
0.1122949719,
0.3211589158,
-0.277844727,
0.1243198812,
-0.1876981705,
-0.2625908554,
0.2333999127,
0.0227285326,
-0.0015745491,
-0.0092520751,
-0.1014126837,
0.1547552496,
0.3507746458,
-0.2348218262,
-0.4725737274,
0.2680009007,
0.1109487936,
0.1534336805,
0.2915022075,
0.5536877513,
0.1857956797,
-0.1260411888,
-0.2120120525,
0.4622804224,
-0.2196744382,
0.0602003597,
0.0667297989,
-0.2681770921,
0.067170009,
0.2869203389,
-0.1046684384,
0.0785860047,
0.4430967271,
-0.1171485633,
0.2710926831,
-0.1541863233,
0.1149187684,
-0.2929517925,
0.3563440442,
-0.09747082,
0.0944315046,
-0.2961152494,
-0.0642040297,
0.10015288,
-0.0191972386,
-0.008204516,
-0.704092741,
-0.4332262278,
0.2553143501,
-0.0715799183,
-0.2922927141,
0.0983811766,
0.1288147271,
0.1099276841,
-0.3820100725,
0.0902377293,
-0.2617865205,
0.1155592948,
-0.0765563026,
0.0031077792,
0.2981184423,
-0.0077165556,
0.1424741298,
0.0692733899,
-0.1421607733,
0.0623924881,
0.1029990092,
0.1684503704,
-0.1470048428,
0.2921720147,
0.4093058407,
0.4360622764,
0.0267467983,
0.0038630159,
0.3030320704,
-0.1724413186,
0.1230754554,
0.0330437906,
0.3390606046,
0.0043970742,
-0.3387444913,
0.0781825334,
-0.0317989774,
-0.0643717796,
0.0428781509,
0.068977125,
0.1708217412,
-0.0803317726,
-0.4045015872,
-0.1739176214,
-0.1790783256,
-0.0502839312,
-0.3810470104,
0.0922589377,
-0.4173587859,
-0.2553106248,
0.6985105872,
-0.2289164513,
0.4255905151,
0.1118154898,
-0.054893706,
0.1787834615,
0.374389112,
0.3708949983,
0.3547131121,
0.2030607164,
-0.1678357124,
-0.0711187944,
-0.1131893322,
0.0965661332,
0.2262954414,
0.1091894805,
0.033738222,
-0.1254533529,
0.1637086421,
-0.0164774731,
-0.3045361936,
-0.1547361016,
0.0899446756,
-0.1470457464,
-0.1231103018,
-0.1064851359,
-0.2240862697,
-0.3372544944,
-0.2418566942,
0.2757888734,
-0.0037676233,
0.0492943116,
0.003100038,
0.2915429473,
0.0377275459,
-0.037712995,
-0.2932843566,
0.3801502585,
0.0342596397,
-0.2518720627,
-0.1027343944,
0.169898212,
0.097280249,
0.1282503307,
0.1976005435,
0.0576988943,
0.6024142504,
-0.4208024442,
0.3126887679,
-0.416578114,
-0.1791253388,
0.1865559667,
-0.0468563884,
0.311259836,
0.2138523012,
0.1720326841,
-0.0578800626,
0.02688553,
0.3042350411,
0.1211865321,
-0.2750786543,
0.1081729531,
0.3914605379,
-0.0984245464,
-0.2014626712,
-0.0432027541,
-0.391041249,
-0.2419069111,
0.3894619346,
-0.0880080387,
0.5134072304,
0.1774206907,
0.0927628502,
-0.0247894302,
0.234841302,
0.0771636292,
-0.1113156751,
-0.1661958545,
0.3770724237,
-0.0849774405,
-0.0978156403,
-0.0612653121,
0.1459322572,
-0.0117067238,
0.6308935285,
-0.3378108442,
-0.4107005,
0.0134494724,
0.3366679549,
0.0268345717,
-0.000910235,
0.0638848245,
0.4038376212,
-0.0684384406,
-0.34813416,
0.1756501943,
-0.1332503259,
0.1067936122,
0.1682300717,
0.4909689724,
0.2002567202,
0.2064255327,
0.1494660527,
-0.2579326928,
0.0288440604,
0.4235225618,
0.0155463275,
0.3009941876,
0.1129761636,
-0.2314594984,
0.1163522676,
-0.0879596844,
-0.0716085434,
-0.0646292493,
-0.0157269053,
-0.120972313,
-0.2994869649,
0.1609628201,
-0.3080459237,
-0.2117530704,
0.346606791,
0.0875038654,
0.4606925547,
-0.1644068807,
0.1655718535,
-0.0542899519,
-0.0127214519,
-0.17450957,
0.3112659752,
0.2764351368,
-0.0919986367,
0.0134664131,
-0.4999583662,
-0.1698898971,
0.0730175227,
0.3192416728,
0.2252962589,
-0.1348674893,
0.1534793824,
0.2610469759,
0.0437687375,
0.5429871678,
-0.1756242365,
0.07308577,
-0.0715831593,
-0.0540782288,
-0.1672252566,
0.3450167179,
-0.1861287951,
0.3180196583,
-0.4607295394,
0.4753348529,
-0.1218767464,
0.0099327397,
-0.004247928,
0.1191131547,
-0.175415352,
-0.267776221,
0.0391253829,
-0.2326642871,
-0.1430404931,
0.0349912606,
0.2093491852,
-0.0489762276,
-0.0252512824,
-0.3434188962,
-0.3147173822,
0.2156760693,
0.2262843996,
0.1616996229,
0.2179074883,
-0.290774852,
-0.1055573598,
0.4642974138,
0.1756364554,
0.6528605819,
0.3329961896,
0.0388465002,
-0.1359296441,
0.1288555861,
-0.3612383306,
0.0683271363,
0.4479670823,
-0.0349813253,
-0.0854303092,
0.2188791186,
-0.0635399893,
-0.7782942653,
0.0210732296,
0.4511602223,
0.0633649379,
-0.2705747187,
-0.5306769609,
0.3839629292,
-0.0968144014,
-0.072065942,
-0.12295679,
0.2493433654,
-0.4678877592,
0.1179481074,
0.3080255389,
0.9746257067,
-0.0038577653,
0.2564512193,
-0.0024239193,
-0.3045725524,
0.0925860777,
-0.2144110948,
0.1845532507,
0.1991309673,
-0.1047319919,
-0.3792059124,
0.0155911446,
0.3999400139,
0.1416281015,
-0.2914865613,
0.0859871954,
0.0281420909,
-0.0475245304,
0.1316075176,
0.3415519893,
-0.7921513319,
-0.119443953,
-0.1544933617,
0.0995609686,
-0.1886328012,
-0.0633340031,
0.0598488189,
-0.2242333293,
-0.1063911244,
-0.0710655153,
-0.060527537,
-0.2668029964,
-0.5018393397,
0.1754684895,
-0.5590478182,
-0.2049751729,
0.0266696885,
0.1715489328,
-0.0180748142,
0.2885323167,
-0.1564502865,
0.0995020717,
0.4337649643,
0.3612027466,
0.0784503967,
-0.073263593,
0.229106918,
0.0283619035,
-0.0930025727,
-0.0288391765,
-0.0304059107,
-0.0615476519,
0.081258148,
-0.115429692,
0.2299495041,
-0.1788807064,
-0.0455580987,
-0.4963177443,
-0.0705255345,
-0.0087739332,
0.1039590389,
0.0680803806,
0.0063592428,
0.2579807341,
0.1541962773,
-0.0160695389,
0.0486891456,
-0.0246665757,
0.2098578215,
0.0620748028,
0.2341651618,
-0.2980414629,
-0.1896208525,
-0.1392222941,
0.5791950226,
-0.0988400578,
-0.3183756471,
0.1184564754,
0.1124938205,
0.0120441131,
-0.484454006,
0.1562779546,
-0.0807485282,
-0.0707857385,
-0.5804302096,
-0.1320947856,
-0.2143442482,
0.3651832044,
0.1414464116,
0.3669720292,
0.1367340833,
0.1838539392,
-0.0340924561,
-0.3996936679,
-0.250341177,
0.2527751029,
-0.1637180746,
0.2089951932,
0.1698684841,
0.415779829,
0.1071896479,
-0.2328348756,
0.0459100641,
0.0473721661,
0.0366228931,
0.0339112543,
-0.2335678637,
0.2159384638,
0.0912417471,
-0.113202773,
-0.1176762134,
-0.477333039,
-0.1153135002,
-0.0492270514,
-0.1719355732,
0.1302383542,
-0.1189333946,
0.0065877233,
0.1535388082,
-0.0172372013,
0.1872412711,
0.2655084133,
-0.214259252,
0.2221099734,
0.0629326478,
0.2084468901,
-0.0326041356,
0.1163145378,
0.2674788535,
0.1693635583,
-0.2175912857,
-0.1692257822,
0.5078742504,
0.2625088096,
0.1336787045,
0.2214134634,
0.4554519951,
0.0596594959,
-0.2964504957,
-0.2568474114,
0.2687671483,
0.1800765097,
-0.1605997086,
-0.0084615164,
-0.1320721209,
-0.1728501916,
0.0980779007,
0.3398681879,
-0.0709553137,
0.3541582823,
-0.2039750218,
-0.1753361076,
0.3887628019,
-0.054550916,
0.0382430181,
0.6433213949,
-0.1394276023,
0.1628398001,
0.1360691041,
0.3424089253,
0.1144575849,
0.5220074058,
-0.3209174871,
0.091313906,
0.4349476695,
0.0698654279,
0.2984956503,
0.0256380718,
0.0998890325,
-0.0258883797,
-0.0987296104,
0.4701784849,
0.0332365111,
0.256025821,
-0.3863969445,
-0.0744632035,
-0.0409249067,
0.0770395026,
-0.0987063721,
0.0931267515,
-0.2597393095,
-0.1484199613,
-0.3129635751,
-0.0739888176,
-0.0709568337,
-0.0406007878,
-0.0377970971,
0.2379879504,
0.2438142002,
-0.1303999424,
-0.0593867712,
-0.0273078773,
0.4058281183,
-0.434342742,
-0.0791511759,
0.2755779922,
0.2539361715,
0.4713908434,
0.2783910334,
0.1429236978,
0.2751125395,
0.0108389873,
-0.005127294,
-0.1951033473,
-0.2380662113,
-0.2700924575,
-0.0732896626,
0.2198625356,
0.4462075233,
0.2598363459,
0.0617962629,
0.052301459,
-0.1188005805,
0.0355517864,
-0.1642214656,
-0.3211478293,
0.1721892357,
-0.0383716635,
-0.1298949569,
0.0590133332,
-0.2997466326,
-0.3441222608,
-0.2303788513,
0.1142284498,
-0.1164321676,
0.1042880565,
0.1993680745,
0.0325039774,
-0.0936063305,
-0.215746507,
0.2771240771,
0.0433841757,
-0.0666097105,
-0.1038815081,
-0.6672855616,
-0.2343942821,
-0.0323923044,
-0.4728187919,
0.1117659211,
-0.2543272972,
0.3249583244,
0.098406665,
0.1864749789,
0.0598449558,
-0.0074800747,
0.186351791,
-0.1316980571,
-0.4846425056,
0.2922330499,
0.1144881248,
-0.3459307551,
-0.4552123547,
0.3298523426,
0.0964190811,
0.0452267267,
-0.1861282736,
0.0947297662,
-0.2628340423,
-0.2823258936,
0.366145432,
0.3676615953,
0.2353818268,
-0.1184730753,
-0.0651142672,
0.0938214734,
0.0821197405,
-0.300602138,
-0.0490876436,
0.1424040049,
0.6202017665,
-0.1068997309,
-0.0569490306,
-0.2046560794,
0.1949393749,
-0.3683884442,
0.1905643195,
-0.2150838822,
-0.0162091535,
-0.4105826914,
-0.2027699202,
-0.1830966324,
-0.0217741784,
-0.0250658803,
-0.0534784831,
-0.2961647213,
-0.2825224698,
0.3889045119,
-0.2104641944,
-0.2122631073,
0.2025451958,
-0.0866933987,
-0.2093605101,
0.4491508007,
-0.4255975485,
-0.1473576128,
0.2239350677,
-0.0557302274,
-0.0998046026,
0.016875295,
0.1766177267,
-0.1424577981,
-0.1074392945,
0.3081831634,
0.070886679,
-0.2050172985,
-0.1326270849,
-0.3243010938
] |
https://github.com/huggingface/datasets/issues/3142 | Provide a way to write a streamed dataset to the disk | Yes, I agree this feature is much needed. We could do something similar to what TF does (https://www.tensorflow.org/api_docs/python/tf/data/Dataset#cache).
Ideally, if the entire streamed dataset is consumed/cached, the generated cache should be reusable for the Arrow dataset. | **Is your feature request related to a problem? Please describe.**
The streaming mode allows to get the 100 first rows of a dataset very quickly. But it does not cache the answer, so a posterior call to get the same 100 rows will send a request to the server again and again.
**Describe the solution you'd like**
Provide a way to write the streamed rows of a dataset on the disk, and to load from it later.
**Describe alternatives you've considered**
Provide a third mode: `lazy`, which would use the local cache for the data that have already been fetched previously, and use streaming to get the rest of the requested data.
| 36 | Provide a way to write a streamed dataset to the disk
**Is your feature request related to a problem? Please describe.**
The streaming mode allows to get the 100 first rows of a dataset very quickly. But it does not cache the answer, so a posterior call to get the same 100 rows will send a request to the server again and again.
**Describe the solution you'd like**
Provide a way to write the streamed rows of a dataset on the disk, and to load from it later.
**Describe alternatives you've considered**
Provide a third mode: `lazy`, which would use the local cache for the data that have already been fetched previously, and use streaming to get the rest of the requested data.
Yes, I agree this feature is much needed. We could do something similar to what TF does (https://www.tensorflow.org/api_docs/python/tf/data/Dataset#cache).
Ideally, if the entire streamed dataset is consumed/cached, the generated cache should be reusable for the Arrow dataset. | [
-0.2683077157,
-0.317753166,
-0.132739231,
-0.0794554353,
-0.0398471616,
-0.0026228749,
0.1889887452,
0.4413467348,
0.2273308188,
0.2164762765,
0.0959095657,
0.225363642,
-0.0826942697,
0.0931221172,
0.3210359812,
-0.1213711873,
-0.1736006141,
0.3577262461,
-0.0479811653,
-0.1806284934,
0.02914395,
-0.3862547874,
0.1405439675,
-0.3485539854,
-0.1995936036,
-0.2212203145,
-0.0105795115,
-0.1523150206,
0.1954342425,
-0.1705537736,
0.2767568231,
0.1031695455,
0.1600534469,
0.183074683,
-0.0001072699,
-0.0706435442,
0.1293658763,
-0.1187413335,
-0.4344990551,
-0.0045737112,
-0.2073059529,
-0.1697868854,
0.2750026882,
-0.5239252448,
-0.1582239717,
-0.0396625884,
0.1302940845,
-0.2445212156,
0.5526269078,
0.1529227197,
0.1737424433,
0.4968931377,
-0.1920742542,
0.1887399852,
-0.0049224556,
0.2274744958,
-0.3571188748,
0.1248472184,
0.3581559658,
0.1704997122,
-0.1059931293,
0.4844265282,
-0.0071469103,
0.2589956522,
0.3585148156,
0.1852961332,
0.0815428272,
-0.1986341327,
0.0081554465,
0.1857806742,
0.6061739922,
-0.1190697402,
-0.4739540815,
-0.4949223697,
-0.0184714142,
-0.4900222719,
0.0687872246,
0.2698987424,
-0.4480804205,
0.1960886568,
0.0659932196,
-0.3207785487,
-0.2918581665,
0.1155634001,
-0.0041975467,
0.0065356172,
0.037838798,
-0.0921428651,
0.1441109329,
0.1816064715,
0.5019684434,
-0.0369844772,
0.2983961999,
0.2413528413,
-0.5177689791,
-0.2529819906,
0.0622555614,
-0.3458669782,
0.0137278056,
0.2609599531,
0.6722894907,
0.1488692313,
-0.1981078237,
0.1199105456,
0.0425218903,
0.1644458324,
-0.1212970912,
-0.1763977855,
0.0676589608,
-0.0804088637,
0.0476212204,
-0.0673369318,
-0.0224536806,
0.2799987793,
0.493603915,
0.003418837,
0.0900223032,
0.061877273,
0.1057712063,
0.176333487,
0.0256082956,
-0.021712102,
-0.0932747647,
0.126025781,
-0.0151037807,
0.3739362955,
0.074717693,
-0.2110421658,
-0.1149775386,
-0.0482762717,
-0.087590985,
-0.2752630115,
0.1445361972,
0.2371526062,
0.2353583723,
-0.3091239631,
0.181515336,
-0.2493491173,
0.1179908589,
-0.0416966118,
0.431535989,
-0.3178493381,
0.2423468381,
0.3134658933,
-0.2034629434,
0.0242164377,
0.0240954719,
0.2765099406,
-0.2126498222,
0.4340806603,
-0.1035417542,
-0.5042653084,
0.1037562191,
0.1871645749,
0.1037143469,
-0.0193238799,
-0.1993615478,
0.2268259823,
-0.0244351812,
0.1046939865,
0.0963671654,
0.1462948173,
-0.4315120876,
-0.2111320198,
0.1100612804,
0.1109121069,
-0.4432620406,
0.0041890121,
0.0017448865,
0.2692561448,
-0.0367848799,
0.3546661735,
-0.2817354798,
0.1523491591,
0.0109763229,
0.0449820086,
0.5064898133,
-0.1593228877,
-0.4188680351,
0.1452446431,
-0.1723187864,
0.1169997603,
0.1757150739,
0.3481387794,
0.3208595514,
0.0505656451,
0.2220486104,
0.3800948858,
-0.136855796,
0.0586428232,
-0.2918038964,
-0.3282570839,
-0.2300405502,
0.4149031937,
-0.1843446642,
-0.0608908013,
-0.0698983893,
-0.2912910879,
0.3415609598,
-0.1833442748,
0.149720192,
0.0460678302,
0.2277942151,
0.1293725371,
-0.1079797372,
-0.0818061456,
-0.5282506347,
0.1749495715,
0.1996381432,
-0.4244817793,
0.1597498059,
-0.2424964607,
-0.0144707179,
0.1066239551,
0.153840825,
0.1307676882,
0.0648355708,
-0.0484940819,
0.1036418527,
0.1303363144,
-0.4630797505,
0.1945945472,
-0.3924369812,
-0.142942965,
-0.0664398745,
0.1627311558,
0.2655307055,
-0.0953740552,
-0.1092801765,
-0.0985181257,
-0.1110355407,
0.0359240547,
-0.0612737872,
0.0452831835,
-0.1469908357,
0.3863784075,
-0.2278854251,
0.4562307,
0.1903051138,
0.1191328019,
0.017945651,
0.1497142017,
0.0499427058,
-0.1514409035,
-0.4336449802,
0.3094023466,
-0.1195783317,
0.0985246003,
-0.0872956514,
-0.2024531811,
0.154235214,
0.0180869978,
-0.2225314379,
-0.0637940317,
0.2895717621,
-0.2090573907,
0.1230712086,
-0.142294094,
-0.3379748166,
0.2734128237,
0.4200363755,
-0.0529953539,
0.2930790782,
0.1363735795,
0.1665652245,
-0.0542299412,
0.2733802497,
0.1897311807,
0.2981440723,
0.2536482215,
0.1835676283,
-0.0466217995,
0.2052655667,
-0.0987636968,
0.1878383011,
-0.1489668489,
0.3623622358,
0.1661677361,
0.0737800896,
-0.1369710863,
-0.2217129171,
0.1104893386,
0.1804288924,
0.0806249157,
0.1076274291,
-0.1621622741,
0.0852832794,
-0.0914063901,
-0.1550441235,
-0.0840473995,
0.248741135,
-0.0035627843,
0.0370721892,
0.5607392192,
-0.2518762946,
0.0767619908,
-0.2095042914,
0.5090608001,
0.191510424,
-0.1071188971,
-0.3243416846,
-0.1709413528,
0.2365396172,
0.0472973809,
-0.1677061915,
-0.1900822818,
0.6288192868,
0.1484633833,
0.1635990441,
-0.368181169,
0.0079360576,
0.048410181,
0.2001385838,
-0.1296308637,
-0.2176756263,
0.4395524859,
-0.0959916636,
-0.1948429495,
0.0149050318,
-0.3012702763,
-0.0332005061,
-0.2538337708,
0.218449831,
0.3224824965,
-0.1601120979,
-0.1852588654,
-0.312925756,
-0.5129247904,
0.3237221539,
-0.0443507656,
0.4395585656,
0.1697690934,
0.0076358053,
0.0593201034,
0.2342266738,
-0.0846808031,
-0.1504047811,
-0.4503549635,
0.291749984,
-0.169489041,
-0.1870314032,
-0.1310370713,
0.0108888848,
-0.0392904058,
0.4408937991,
-0.5197463632,
-0.3249292374,
-0.1160457581,
0.2834421396,
-0.4564073384,
-0.1526498497,
0.3529305756,
-0.1357894242,
-0.0644843727,
-0.1135524139,
0.0936564505,
-0.0465527289,
0.2807452381,
-0.1383014768,
0.2033106834,
0.3375995159,
0.3140206039,
0.7874843478,
-0.0598836318,
0.0002461361,
0.0475400649,
0.2468038499,
-0.0978817493,
-0.2131864727,
-0.2709493637,
-0.017479226,
-0.1852563024,
-0.2444146127,
0.0574023686,
-0.0537479483,
-0.4295942783,
-0.1809532642,
-0.0188187324,
-0.0230274443,
-0.1878410876,
0.2627291381,
-0.3150423765,
0.3930903971,
0.0454691872,
0.2493181676,
-0.3476820886,
0.0004738595,
-0.0372917131,
-0.1864122301,
0.6536524296,
-0.173032999,
-0.0097350627,
0.1243192181,
-0.8176465631,
0.0835469887,
0.1379719228,
0.0152711188,
0.043783173,
-0.0236486215,
0.2324168384,
0.0276846625,
0.7251970768,
-0.0274946298,
-0.0155191412,
-0.2472304404,
-0.2232465744,
-0.5366982818,
0.2388734818,
0.012283884,
-0.0103902742,
-0.2741831541,
0.1582166255,
-0.2965482175,
-0.0780742392,
-0.1300145835,
0.0222823713,
-0.3129247427,
-0.1935894638,
-0.0299386419,
-0.0774005949,
-0.1680616885,
0.1876456887,
0.0715925321,
-0.194320336,
0.043168664,
-0.1975631714,
-0.0457119308,
0.3199965358,
-0.2254346013,
-0.2357156426,
0.1724434495,
0.1429546326,
0.1814103127,
0.3139412105,
0.0795437694,
0.0715018362,
0.0912468284,
0.0352167152,
-0.0393174142,
0.0942817777,
0.0554344393,
0.0142339626,
0.4222619832,
0.1600553393,
0.3386278749,
0.2424295545,
0.104808107,
-0.4852537513,
0.0087642884,
-0.1587264538,
0.0244112816,
0.0356297605,
-0.6464025974,
0.484834224,
-0.152144596,
0.0497116782,
0.34350124,
-0.0987384096,
-0.1075424179,
0.3747499585,
0.3057271242,
0.8571519256,
-0.1040717438,
0.2124354541,
0.2002391368,
-0.2450887114,
0.5903199911,
-0.4759297371,
0.2549777329,
-0.0387985483,
-0.3649610281,
-0.1145493984,
-0.2030538023,
-0.3826729059,
-0.0340738259,
-0.1681851149,
-0.0017261537,
0.0496601239,
0.2176091969,
0.0772282258,
0.2253211737,
-0.1471090168,
-0.4933505654,
-0.2958711088,
0.1169080511,
-0.1509967744,
0.0609586984,
-0.1287410408,
-0.0946210176,
0.1987340897,
0.1758401692,
-0.0600761436,
-0.1269345433,
-0.3936136961,
0.2424609363,
-0.3922046125,
-0.4515930414,
-0.1373953521,
0.0996409655,
0.0778287426,
0.0541777238,
-0.3157370687,
-0.0061949561,
0.0825683326,
0.2694885731,
-0.2197704166,
-0.3233024776,
0.25825423,
-0.2472442687,
-0.2064593285,
0.1727244854,
-0.1629164368,
-0.5271587968,
-0.1777153462,
0.2143096179,
0.1975710988,
0.1009695828,
-0.2102080286,
0.1442083567,
-0.2255345583,
-0.0623394102,
0.1647474617,
0.1454609334,
-0.0309923235,
-0.0458931513,
0.1355521083,
-0.0389957167,
0.0230594445,
0.342366904,
0.3410428762,
0.0241532084,
0.4951083362,
-0.0633702651,
-0.2065074593,
-0.2304046452,
-0.0752370432,
0.0155278174,
-0.3077965975,
0.1157652065,
-0.1574286669,
0.0201074537,
-0.3031646907,
-0.1459453255,
0.1082386672,
0.0391798355,
-0.4505395889,
-0.1185688823,
-0.4475182593,
0.1357477158,
0.0810829476,
0.2347017974,
0.0455081351,
-0.0343822911,
-0.1786214262,
0.311465919,
-0.3719775379,
0.0057436265,
-0.0441137999,
0.1366610676,
-0.0829178691,
-0.117636174,
0.2703510821,
0.0520438775,
0.031279888,
0.208072558,
-0.3560888469,
-0.2733166814,
-0.0958853588,
0.1392978877,
-0.0264194999,
-0.0169764906,
-0.169544518,
-0.3661669493,
-0.1219042614,
-0.1780347824,
0.2278099656,
0.1008277535,
-0.1446341425,
-0.094123438,
0.4714301825,
0.2908777893,
-0.477545023,
0.0856091604,
0.0024151253,
0.0262831245,
-0.3454043567,
0.0977711976,
-0.0618701503,
-0.0001553933,
-0.0820587799,
0.0584091358,
0.2910680771,
0.0423767827,
0.2626940012,
-0.1106773093,
-0.1099219248,
-0.1491495073,
0.4306327403,
-0.0777077675,
-0.0776273236,
-0.0107699782,
0.0906814113,
0.2988677919,
0.006020579,
-0.1519651562,
-0.0546102487,
-0.0171199478,
0.1902585328,
0.1802006215,
0.0338095017,
-0.0303973835,
0.2589126527,
0.0082055125,
-0.0291780327,
-0.5555536151,
-0.0654361844,
0.2891875207,
0.0937600881,
-0.1602994949,
0.0535668246,
0.0145011591,
0.254543066,
0.1607561857,
0.2276109457,
0.1674928665,
0.4927290678,
-0.1518883109,
-0.1016878337,
-0.1204905957,
-0.2505683899,
0.031702809,
-0.2534928322,
0.5826540589,
-0.0372068547,
0.0960880071,
0.091927655,
-0.1735470742,
-0.2327319086,
0.0965592265,
-0.1892962307,
-0.0153402798,
-0.1685886979,
-0.0874520019,
0.334413439,
0.0724816844,
0.0774958506,
0.09904816,
-0.008838621,
0.3031163216,
0.1566511691,
0.1797398031,
-0.0100649083,
0.1793921441,
0.4897334874,
-0.1166373417,
0.0115452111,
0.092694208,
-0.0128294602,
-0.280474931,
0.1056822091,
-0.1655390114,
0.1769325882,
-0.0712255612,
0.4873785377,
0.1395005435,
-0.0783532709,
-0.2864532173,
0.0124260075,
0.2260847241,
-0.2129272968,
0.2819986343,
0.1610657424,
-0.2084477842,
0.4124404192,
-0.0959495381,
-0.0500950404,
-0.5813564062,
-0.1568113416,
0.2683328986,
-0.2817635238,
0.0181629378,
0.0597012043,
0.012017753,
0.1244346127,
0.2839777172,
-0.3575887382,
0.0570935793,
0.0750852227,
0.1158719137,
-0.4179558754,
0.4864848852,
0.0514574349,
0.2199064344,
-0.2808375359,
0.0754423067,
-0.1561394185,
-0.0083146617,
0.0467056669,
0.2434671223,
0.3168484867,
0.349113673,
0.1045473367,
0.3705664277,
-0.0480373614,
-0.43203637,
-0.0064291013,
0.261462301,
-0.4450033307,
-0.1461589336,
-0.0229519084,
0.0547930337,
0.120108813,
-0.6009672284,
0.2538117766,
0.1145695001,
0.0898610651,
0.0091819838,
0.0943775922,
0.2456745952,
0.5361734033,
0.5067949295,
0.0377834626,
-0.0774682388,
0.0845664963,
-0.1261802316,
-0.0324382074,
-0.0445359163,
-0.1726621687,
-0.0989805013,
0.1273061484,
0.4220528007,
-0.1632053405,
-0.393048048,
-0.2193122357,
0.2191942781,
0.1056696847,
-0.3282384276,
0.1295270622,
-0.118660517,
-0.1125832945,
0.0471872464,
0.2361745685,
0.3918438256,
-0.023602372,
0.1170087978,
-0.3199752271,
-0.0059868218,
0.6142309308,
-0.087282002,
-0.1400054246,
0.1177393869,
0.3302063942,
0.3517475128,
0.1880601048,
-0.4374371171,
-0.1141201481,
0.2527947426,
-0.1374266595,
-0.2716689706,
0.3578903079,
0.1744397134,
0.0248864554,
-0.0683313459,
0.6780738831,
0.0314221159,
-0.1603396684,
-0.2176985741,
-0.4912856221
] |
https://github.com/huggingface/datasets/issues/3135 | Make inspect.get_dataset_config_names always return a non-empty list of configs | Hi @severo, I guess this issue requests not only to be able to access the configuration name (by using `inspect.get_dataset_config_names`), but the configuration itself as well (I mean you use the name to get the configuration afterwards, maybe using `builder_cls.builder_configs`), is this right? | **Is your feature request related to a problem? Please describe.**
Currently, some datasets have a configuration, while others don't. It would be simpler for the user to always have configuration names to refer to
**Describe the solution you'd like**
In that sense inspect.get_dataset_config_names should always return at least one configuration name, be it `default` or `Check___region_1` (for community datasets like `Check/region_1`).
https://github.com/huggingface/datasets/blob/c5747a5e1dde2670b7f2ca6e79e2ffd99dff85af/src/datasets/inspect.py#L161
| 43 | Make inspect.get_dataset_config_names always return a non-empty list of configs
**Is your feature request related to a problem? Please describe.**
Currently, some datasets have a configuration, while others don't. It would be simpler for the user to always have configuration names to refer to
**Describe the solution you'd like**
In that sense inspect.get_dataset_config_names should always return at least one configuration name, be it `default` or `Check___region_1` (for community datasets like `Check/region_1`).
https://github.com/huggingface/datasets/blob/c5747a5e1dde2670b7f2ca6e79e2ffd99dff85af/src/datasets/inspect.py#L161
Hi @severo, I guess this issue requests not only to be able to access the configuration name (by using `inspect.get_dataset_config_names`), but the configuration itself as well (I mean you use the name to get the configuration afterwards, maybe using `builder_cls.builder_configs`), is this right? | [
-0.1959385723,
-0.0393929146,
-0.0867162049,
0.2019756436,
0.3481401801,
0.1019185558,
0.2270127833,
0.461692065,
0.0720916912,
0.6261889935,
-0.0640386716,
0.3278577328,
-0.0607229322,
0.2241173536,
-0.0723211616,
0.2225236446,
-0.2583372295,
0.3215778172,
-0.010006574,
0.0468211658,
-0.17025958,
-0.2241364717,
0.0781606287,
-0.046167396,
-0.1003567353,
0.1415475309,
0.2304188013,
-0.1391490251,
0.018675644,
-0.6572414041,
0.2234814614,
0.19890441,
-0.4255684018,
0.0693521276,
-0.0001110376,
0.2244482338,
0.3528082967,
0.038847547,
-0.5182683468,
-0.1933934093,
-0.2672387064,
-0.4833585322,
0.2906862199,
-0.1147352383,
-0.2835980058,
-0.148734197,
0.0870581418,
-0.1586879194,
-0.1735389382,
0.0200253297,
0.1960032433,
0.2004268616,
-0.242656827,
-0.0933085158,
0.0630533993,
0.2776689231,
-0.2956309915,
-0.1127575263,
0.0804484859,
0.1904270798,
0.1548707187,
0.3677101433,
-0.1610146165,
-0.010788559,
0.0748038366,
-0.0822513029,
0.0687069222,
-0.3162955642,
0.3752184212,
0.5652380586,
0.5786011815,
-0.2198795229,
-0.2005217671,
-0.4037023187,
0.20336698,
-0.0489759184,
0.1670881808,
0.1474889964,
-0.367939055,
0.2678745091,
-0.1129505336,
-0.4839393497,
-0.1116796508,
-0.1416141689,
-0.0734361634,
0.2190533429,
-0.0441846214,
0.0945547074,
-0.0024603487,
-0.1388070583,
0.1994499266,
-0.3203273416,
-0.1752388924,
0.089355886,
-0.4130400419,
-0.0658879131,
0.3217003345,
0.0640349463,
0.250198245,
0.5676413774,
-0.1647889912,
0.0838267207,
-0.1348367333,
0.0246590301,
-0.0299823172,
-0.1104094386,
0.5471460819,
0.4539131224,
0.1456597149,
-0.1224309877,
0.1680580825,
-0.0307406746,
0.02726385,
0.0481359735,
-0.0585445613,
0.0205424428,
0.5758941174,
-0.1331564784,
0.0193216726,
0.3181625307,
0.0365130976,
0.0089711379,
0.2629745603,
0.4786575735,
-0.0632587969,
0.3437305391,
-0.016963806,
-0.1319732517,
0.0315271206,
-0.1304223537,
-0.2280668616,
-0.3893208802,
0.0188857336,
0.2144657969,
0.100957714,
-0.2881240845,
0.3406375945,
0.0537809618,
0.0736505613,
-0.0585598163,
0.2391282469,
-0.0543668419,
0.2546287775,
0.3422959745,
-0.1886840612,
-0.0615911148,
0.2175424397,
-0.2652133405,
-0.360298574,
0.0847413391,
-0.1007118076,
-0.4504193068,
-0.0330604129,
0.2018906176,
-0.2475150079,
0.3033877611,
0.1945429593,
0.1195164695,
-0.1528195292,
0.2279150039,
-0.0312418509,
0.0384873934,
0.156295225,
-0.1075704694,
0.2217023671,
0.470179677,
-0.1791074574,
-0.0722728819,
0.1227689534,
-0.3365767598,
-0.3208190501,
-0.2323922515,
-0.1643215418,
-0.021657791,
-0.2443052232,
-0.2132276595,
0.5509499907,
-0.2235958576,
-0.0414219908,
0.2092017382,
-0.2034502029,
0.0148415091,
0.2633709908,
0.0366300307,
-0.3152834475,
0.2129545957,
-0.0748646855,
-0.1522213519,
-0.065518029,
-0.0103195673,
-0.040863052,
-0.2560614049,
0.1272129267,
-0.1339303404,
-0.114677839,
0.2541869581,
-0.1153530553,
-0.3087103665,
0.3998311758,
-0.2179085761,
-0.1138048992,
0.282800287,
0.6059145331,
0.350815922,
0.0376677625,
-0.127649352,
-0.4507603943,
0.2771320343,
0.0476994365,
-0.023150498,
0.0218217149,
-0.4317789972,
-0.0325503983,
0.1522017866,
-0.1756982058,
-0.0482315458,
0.1161222607,
0.3900380135,
-0.2242331803,
-0.2545669675,
-0.1897062361,
0.0864798576,
-0.3799448311,
0.1254776716,
-0.3186784685,
0.084125787,
0.2545930147,
0.3039531112,
-0.2960425019,
0.0332571864,
0.1129896417,
0.0411810353,
0.0975856856,
0.2061694562,
0.2992250025,
-0.0798446462,
0.1744346619,
0.2657060027,
-0.1008226722,
-0.1726619601,
0.0452645347,
0.039318148,
0.0339251645,
-0.1151456758,
-0.1918481439,
0.362077415,
0.3134705424,
0.5693534017,
-0.1884535849,
0.0209851172,
0.1558396369,
-0.1732036769,
-0.5035431385,
-0.2430479825,
-0.0853725746,
0.103538543,
0.2578534484,
0.1520323753,
-0.5671442151,
-0.184904635,
0.203006193,
0.162128076,
-0.1709274054,
-0.0647312701,
0.2043361515,
0.0766701251,
0.049449984,
-0.066417627,
0.1643403769,
0.3213979006,
-0.1490914524,
0.165255487,
-0.0673207417,
0.0739815682,
0.2737995684,
0.0591496304,
0.1516788155,
0.2020289004,
0.0846376866,
-0.1541451961,
-0.1252696663,
-0.3802019656,
0.0894179866,
-0.0079721548,
-0.3926847875,
-0.0354030728,
-0.2151959985,
-0.1326759309,
-0.0969559327,
0.0710726306,
-0.3255751729,
-0.192888692,
-0.0591351911,
-0.0060018208,
-0.2963117361,
0.4112297595,
-0.4222435951,
0.4480032623,
0.149930656,
-0.3696016669,
-0.1088930815,
0.059707962,
-0.0689573362,
-0.0161507465,
-0.1823831946,
-0.2994287312,
0.4465333819,
-0.0831154212,
-0.152280122,
-0.417201668,
-0.2782402635,
0.3350118697,
0.0945878178,
0.2299931794,
0.4732415974,
0.2531486452,
0.4345404804,
-0.1736395508,
0.2177951187,
0.4027145207,
-0.0684194714,
0.0129051125,
0.1353894025,
0.0839029104,
-0.1290624589,
-0.1474431455,
0.0411921628,
-0.345729053,
0.2438775599,
0.0456945822,
0.3258517385,
0.6081295013,
-0.140705809,
0.063840948,
-0.3629425764,
0.2904009521,
-0.1566163003,
-0.2963272929,
0.0692304671,
-0.0037669463,
0.0485049449,
-0.0760867745,
-0.2665853798,
0.1629575044,
-0.0278858524,
-0.4113142192,
-0.2560598552,
-0.2047388256,
0.319152385,
0.1252967268,
0.1132086143,
0.0726669878,
0.2248079032,
-0.1096811146,
-0.0016053111,
-0.52400738,
0.1263989359,
-0.0700512305,
0.3815968633,
0.2243548483,
-0.2458627224,
0.0379537083,
0.3143805563,
0.332539022,
0.1412074417,
-0.1166585833,
-0.3768299818,
0.6222693324,
-0.0226898417,
-0.4071136415,
-0.099952355,
0.311570853,
-0.278922081,
0.0851133093,
-0.0920447782,
0.0846781358,
-0.2004504055,
0.067789726,
0.1475893259,
-0.3081246018,
-0.0512615815,
-0.3682508469,
0.2197510302,
0.0393255949,
0.2337976992,
-0.1982194185,
0.0711648017,
-0.1557377428,
0.3081383407,
-0.1562646031,
-0.1417738944,
-0.5297025442,
-0.1824517548,
-0.0287506599,
0.1677109897,
-0.2297663391,
0.1669206172,
0.0881460309,
-0.0930652395,
0.0921928883,
0.2917358577,
0.5921594501,
-0.1349489987,
-0.0983211249,
0.3466374278,
0.021513531,
-0.0093481541,
-0.1399320215,
-0.0091136098,
-0.0878441855,
0.0554824881,
0.3829602599,
-0.4157256782,
-0.4276300669,
0.2337285727,
0.1602988243,
-0.3202631474,
-0.0135694603,
-0.1400920451,
-0.0704720467,
0.1248166636,
0.1297347993,
-0.1668413728,
0.2978017628,
0.0897591561,
0.0149895418,
-0.0237766765,
0.0470905304,
0.296272099,
0.0465904102,
0.2504814565,
0.1724745631,
0.2837515175,
0.0885867923,
0.2007629424,
0.1007318944,
0.5313915014,
-0.2167027742,
-0.3803871572,
-0.0709120706,
0.0114828795,
0.4462217689,
0.4849778116,
-0.1700016558,
0.1521905512,
0.0938498303,
0.25931862,
-0.3143287897,
0.1202350408,
0.064840883,
-0.0146662397,
-0.2450823784,
-0.573212564,
0.4941475689,
-0.2496568412,
-0.0429930761,
0.5052611232,
0.0481172651,
-0.2800136805,
0.0873168409,
0.1389601231,
0.811488688,
0.2762959301,
-0.1546792239,
0.3166617751,
-0.1987395436,
0.3732431829,
-0.1497923583,
0.0428709425,
-0.4255897999,
-0.2881670892,
0.0318284966,
-0.2634931207,
0.2785876095,
0.1555696279,
0.0458830521,
0.2135923654,
-0.0391060635,
0.1225626618,
0.0339447372,
0.3247696757,
-0.291765511,
-0.0652808174,
-0.0119964909,
0.0793760419,
-0.2100275755,
0.2865815163,
0.0289446246,
0.0034747659,
0.2386927009,
-0.2505873144,
-0.2534253001,
0.0612915121,
-0.3079516292,
-0.1611177623,
0.3414886594,
-0.1018950939,
-0.0408883803,
0.0111766765,
-0.1117041782,
0.5663664937,
-0.242687434,
0.1703015417,
0.2932846844,
0.3838833272,
-0.0000731148,
-0.0327858515,
0.3135177493,
0.2077238411,
-0.27381742,
0.0303185768,
-0.2198787034,
0.0433654115,
0.1002211794,
-0.2604311109,
0.3647934198,
-0.4859379828,
0.1632488966,
-0.0399778336,
0.2002165467,
-0.0297037419,
0.155480206,
0.0716849789,
-0.4946381748,
0.1210859045,
0.2124516666,
-0.2357375622,
0.0455040224,
-0.0000824544,
0.1201010048,
-0.1790638119,
0.3407259285,
-0.1785549223,
-0.1981236041,
-0.2898367941,
0.3523595631,
-0.0687140152,
0.1276664138,
0.1996209025,
0.1800693721,
-0.1881461591,
-0.0784403831,
0.0464827754,
0.1385391057,
0.0466107205,
-0.3168741763,
-0.1242110878,
-0.0542948507,
0.0518513881,
-0.2293928117,
0.6025696397,
-0.1699786633,
0.1307694465,
-0.0769585073,
-0.1672546864,
-0.3567890525,
-0.2614607215,
-0.527472496,
0.2567738295,
-0.0094551761,
0.2083387673,
0.0843776837,
-0.1393017024,
0.1986019313,
-0.4305740893,
-0.2648798525,
-0.2223887146,
-0.2191608548,
0.1245522052,
-0.1804374158,
0.4391317666,
-0.0196787827,
-0.1641309708,
0.0774826854,
-0.3421448767,
0.1838495135,
0.2568188608,
0.0995050818,
0.385435164,
-0.1452183723,
-0.0434569307,
-0.1868512928,
0.1911217272,
-0.0685770288,
-0.002045413,
0.0547947176,
0.2092173845,
-0.53593117,
-0.0292413887,
-0.0174114499,
0.2030979991,
-0.3027089536,
-0.0292505622,
-0.036593724,
0.1855497509,
0.0055824281,
0.295149684,
0.2607114911,
0.3963244855,
-0.2903617024,
0.2635096312,
0.4545170963,
0.2359625399,
-0.3000840843,
-0.0015435707,
0.0621089451,
0.0243645832,
0.1720552444,
0.3453519344,
0.0189272258,
-0.0983300582,
0.3387783468,
-0.0516791604,
0.0024146992,
-0.2449090183,
0.3144386709,
0.8215008974,
0.0705308244,
0.006297234,
0.4893633425,
0.3680028915,
0.1083864942,
0.2489884347,
0.098969616,
0.1180821657,
-0.057403449,
0.0742806718,
0.0561940186,
-0.3453655541,
0.2663926482,
-0.1688087881,
-0.4581837058,
-0.0432651751,
-0.155640617,
0.0156865753,
-0.1135356277,
0.0852874517,
-0.2532752156,
0.1050555483,
-0.095823057,
-0.2012085468,
-0.0352994129,
-0.2160555869,
0.0051816357,
-0.0588584766,
0.4023316801,
-0.4455885291,
0.0191643983,
-0.2127424628,
0.1206405908,
-0.2680572569,
0.3056055307,
0.1762250364,
0.0411069989,
-0.2987082005,
0.158854723,
-0.1070958152,
0.0542072579,
0.1473265886,
0.2997486591,
0.0807128251,
0.1172085032,
0.3800697923,
-0.1161522344,
-0.1779365838,
-0.1365031153,
-0.3293744028,
-0.0592228435,
-0.2665793598,
-0.3103284836,
0.3081233501,
0.1709595919,
-0.0570229366,
-0.0996106789,
-0.2162234634,
0.0521833785,
-0.5296987295,
0.4474015236,
0.5019901991,
-0.0908782855,
-0.0721715689,
-0.0673648342,
-0.1862184405,
-0.2126542032,
0.6893898845,
0.381305635,
0.1566703767,
-0.0366328619,
0.0830769837,
-0.2022554129,
-0.0163081978,
0.0007824993,
-0.3036154211,
-0.0383145362,
0.0333930403,
-0.2803033292,
0.0459930822,
0.0924345329,
-0.3328813612,
0.4903070331,
0.1890792549,
0.0701351687,
0.0196196325,
0.0097268578,
-0.3242561817,
0.2177804112,
0.0157259889,
-0.1520077437,
-0.2825496197,
-0.0872554109,
0.2013934404,
0.1333005726,
-0.192224741,
0.050405588,
0.123362571,
0.0037914952,
-0.1316291094,
0.0729865581,
0.325589478,
0.0452809706,
0.2853609324,
0.0556028225,
0.0345520787,
0.093921192,
-0.0133509822,
-0.3807703555,
-0.1289726049,
-0.1643254608,
0.1457622349,
0.1125700399,
-0.0940427631,
-0.2274535596,
-0.1267717183,
-0.2555266321,
-0.0427538194,
0.2495075762,
-0.0898413211,
-0.0039357538,
0.0676163882,
-0.0611007549,
0.2039318234,
-0.0775268525,
-0.1219599769,
0.0354919359,
-0.0327439532,
-0.0831595957,
-0.2854434848,
0.703645885,
0.2869948149,
-0.4041362107,
-0.1810047179,
0.4229548275,
-0.0881579667,
-0.0420084,
-0.3835604787,
-0.093598552,
0.5537127256,
-0.2616156936,
-0.1408959776,
-0.0978022665,
-0.231401965,
0.2743234336,
-0.1487941146,
-0.1641341448,
-0.074524343,
-0.0230192021,
-0.3292672634,
-0.2895882428
] |
https://github.com/huggingface/datasets/issues/3135 | Make inspect.get_dataset_config_names always return a non-empty list of configs | Yes, maybe the issue could be reformulated. As a user, I want to avoid having to manage special cases:
- I want to be able to get the names of a dataset's configs, and use them in the rest of the API (get the data, get the split names, etc).
- I don't want to have to manage datasets with named configs (`glue`) differently from datasets without named configs (`acronym_identification`, `Check/region_1`) | **Is your feature request related to a problem? Please describe.**
Currently, some datasets have a configuration, while others don't. It would be simpler for the user to always have configuration names to refer to
**Describe the solution you'd like**
In that sense inspect.get_dataset_config_names should always return at least one configuration name, be it `default` or `Check___region_1` (for community datasets like `Check/region_1`).
https://github.com/huggingface/datasets/blob/c5747a5e1dde2670b7f2ca6e79e2ffd99dff85af/src/datasets/inspect.py#L161
| 71 | Make inspect.get_dataset_config_names always return a non-empty list of configs
**Is your feature request related to a problem? Please describe.**
Currently, some datasets have a configuration, while others don't. It would be simpler for the user to always have configuration names to refer to
**Describe the solution you'd like**
In that sense inspect.get_dataset_config_names should always return at least one configuration name, be it `default` or `Check___region_1` (for community datasets like `Check/region_1`).
https://github.com/huggingface/datasets/blob/c5747a5e1dde2670b7f2ca6e79e2ffd99dff85af/src/datasets/inspect.py#L161
Yes, maybe the issue could be reformulated. As a user, I want to avoid having to manage special cases:
- I want to be able to get the names of a dataset's configs, and use them in the rest of the API (get the data, get the split names, etc).
- I don't want to have to manage datasets with named configs (`glue`) differently from datasets without named configs (`acronym_identification`, `Check/region_1`) | [
-0.1433714628,
-0.0727245882,
-0.0968915448,
0.116970174,
0.2310522199,
0.1749294549,
0.1810453385,
0.464779526,
0.2811773121,
0.4464249015,
-0.1508253217,
0.3579241931,
-0.0074269748,
0.2346330583,
-0.1006172225,
0.1920578778,
-0.2181450129,
0.3768833578,
0.0402729101,
-0.0437980779,
-0.1790208369,
-0.1275995225,
0.1375391334,
-0.1373451054,
0.0585952587,
0.0190025587,
0.1934052855,
-0.1649046838,
0.0602193139,
-0.51039958,
0.2751872241,
0.1749851108,
-0.4080827534,
-0.0982958078,
-0.0001147763,
0.1454396844,
0.393148452,
0.029521795,
-0.2994026244,
-0.2757663131,
-0.2195848078,
-0.4347121716,
0.3364682198,
-0.0902142376,
-0.1970408112,
-0.2679986656,
0.042446427,
-0.3975797594,
-0.0429609641,
-0.0228175689,
0.1328011751,
0.1247136295,
-0.276391834,
-0.026326118,
-0.0710504949,
0.256539315,
-0.2219055146,
-0.1989445686,
-0.02702084,
0.023068618,
0.2815817893,
0.2727183998,
-0.2497140914,
0.0805146694,
0.036714118,
-0.125547722,
-0.2886051834,
-0.4897782207,
0.3804355264,
0.696700871,
0.477411449,
-0.2139570415,
-0.2099900395,
-0.4865966737,
0.2095873505,
-0.0447104312,
0.1629620939,
0.241899237,
-0.1787386835,
0.2783282697,
0.013689003,
-0.3687569201,
-0.0539652035,
-0.0973065719,
-0.0343691669,
0.1497176737,
0.0119730951,
0.0801062956,
0.1423807144,
-0.1292155683,
0.0451951548,
-0.3058245182,
-0.2196982205,
0.1384258717,
-0.4764615297,
-0.1456149668,
0.2492709309,
0.0765422806,
0.3076212108,
0.6439834237,
-0.1088593677,
0.1659886986,
-0.1020131409,
0.037644051,
-0.0155921439,
-0.1399628222,
0.6405237913,
0.4763417244,
0.1353591233,
-0.2433077991,
0.3037062585,
-0.0080177272,
-0.0228336286,
0.1906760037,
-0.1720102429,
-0.0456797741,
0.4999153018,
-0.1936785281,
0.0495913401,
0.2485847771,
-0.0847656429,
0.0731441155,
0.099276267,
0.3354875743,
-0.0468668751,
0.3651700318,
-0.0309495386,
-0.0105231488,
0.0860728323,
-0.1213570163,
-0.1734201163,
-0.2953147888,
0.2703097165,
0.374897629,
0.1186390296,
-0.1560016721,
0.3384607732,
0.0228796471,
-0.049439095,
0.0805173069,
0.4005951881,
-0.1108886227,
0.2407989651,
0.3809292614,
-0.0227738805,
0.0655004382,
0.1970497966,
-0.3520115614,
-0.5092693567,
0.1010981128,
-0.1016527489,
-0.3922620416,
-0.0458403081,
0.1580734104,
-0.4618697166,
0.290248394,
0.0820925012,
0.1887716055,
-0.2089481801,
0.2367162704,
-0.0019097949,
0.0967032835,
0.1646997631,
-0.1576859653,
0.1581627131,
0.541108191,
-0.1641581208,
-0.1867618263,
0.0654293746,
-0.2275779396,
-0.378949672,
-0.1162817925,
0.0093347235,
-0.0637385175,
-0.2095456272,
-0.0143288421,
0.5601004362,
-0.3848935068,
-0.021538822,
0.1212669611,
-0.0539876483,
0.0529676825,
0.2674375176,
0.0559364222,
-0.0823184326,
0.282117188,
-0.0735677332,
-0.0496554077,
-0.0967449471,
-0.0756411999,
-0.0400325283,
-0.2979432046,
0.0648303851,
-0.0754031688,
-0.2461986095,
0.1373706162,
-0.13655065,
-0.501621902,
0.3489429057,
-0.1242317855,
-0.1839514822,
0.3089511395,
0.6160770655,
0.3104616702,
0.0805868357,
-0.1474643648,
-0.5678794384,
0.23557657,
0.1546317339,
0.0770224184,
0.0135860248,
-0.4639114738,
0.0194690693,
0.0002361809,
-0.1342291087,
0.0375438184,
0.0528417677,
0.1781301945,
-0.0916894078,
-0.0893941447,
-0.1662817597,
0.2143175155,
-0.2517028451,
0.2234837413,
-0.4982376993,
0.1455302089,
0.4295926988,
0.3374190629,
-0.1703810394,
0.0356956571,
0.1214308739,
0.0012093708,
0.1707777679,
0.1362572461,
0.4226942658,
-0.0479410887,
0.1528668553,
0.4331666529,
-0.0521644056,
-0.1085044071,
0.0241043307,
0.003914461,
0.0095844511,
-0.1314717382,
-0.215704754,
0.4401795566,
0.3573461771,
0.6186776161,
-0.2321944237,
0.0959279537,
0.1745721847,
-0.1923824996,
-0.5609421134,
-0.2448150963,
-0.0824019089,
0.0266827494,
0.3762543499,
0.1373797804,
-0.4646802843,
-0.1517629325,
0.1965174377,
0.1120809689,
-0.1041241065,
-0.0948175713,
0.0521219485,
0.0873314291,
0.1184345856,
0.082608901,
0.2212689519,
0.3244654238,
-0.1226683706,
0.1137934774,
0.0025886837,
0.0728866681,
0.2834758162,
0.0507219248,
0.1389396638,
0.0606948584,
0.0183994826,
-0.1019582525,
-0.1506779343,
-0.4149254858,
-0.0263538044,
-0.0393615402,
-0.3869340718,
-0.1196665987,
-0.2788621485,
-0.2356781065,
-0.0043058908,
0.0029431109,
-0.3053972125,
-0.2297120988,
-0.0842821822,
-0.040486265,
-0.3021886051,
0.4525859356,
-0.3345285058,
0.4767779112,
0.0723967701,
-0.4335436225,
-0.175153628,
0.0997805521,
-0.0578094609,
-0.0404255874,
-0.1687268317,
-0.189821288,
0.505440712,
-0.0038825576,
-0.1361229867,
-0.3728592694,
-0.3462554514,
0.2825360298,
0.0931029692,
0.2580820322,
0.5160646439,
0.2449321449,
0.4300903082,
-0.1194874421,
0.1513722986,
0.3626990318,
-0.0343104675,
-0.0226165485,
0.143134743,
0.1096896455,
-0.1567589939,
-0.1569081396,
-0.0054104589,
-0.2816167474,
0.4105815589,
0.0528381094,
0.3476489186,
0.533885479,
-0.207922101,
-0.0055794036,
-0.3637750745,
0.112483494,
-0.0825149864,
-0.2567253411,
0.2289353162,
0.0574579649,
0.0772296637,
-0.0649037361,
-0.3172123134,
0.2067749947,
-0.029661037,
-0.3859019876,
-0.4528612494,
-0.1999425739,
0.2624128461,
0.0676218718,
0.1735280752,
0.0938232616,
0.2409356833,
-0.0256590061,
0.0029369611,
-0.605063796,
0.2089136541,
-0.0440760963,
0.188728869,
0.2837436199,
-0.2053190619,
-0.1013533249,
0.3613675237,
0.3078523278,
0.1235207915,
-0.1117344499,
-0.3102414906,
0.6340022683,
0.0411688238,
-0.318780303,
-0.2290785909,
0.2787204087,
-0.1175348684,
0.1374404728,
0.023620788,
-0.0249908399,
-0.1691184193,
0.1438862532,
-0.0007342462,
-0.2484710068,
-0.0092740078,
-0.4767047763,
0.0589351431,
0.003306316,
0.1793475151,
-0.1970158666,
0.1077422351,
-0.111725457,
0.295889318,
-0.1027643383,
-0.0939976722,
-0.6344892979,
-0.2670678496,
-0.0499120131,
0.2522244453,
-0.3067808449,
0.175751701,
0.1419500709,
-0.0723465905,
-0.0899904817,
0.3309064806,
0.5660052299,
-0.178475678,
-0.2550830245,
0.2516104281,
0.1032796279,
-0.0430581309,
-0.1386764199,
0.0072187511,
-0.1862992644,
0.0586607195,
0.3933910728,
-0.4713218808,
-0.390845567,
0.0422252007,
0.1598903835,
-0.2995440364,
0.0525071472,
-0.1008198038,
-0.2292877436,
0.1055014208,
0.0178832822,
-0.115924798,
0.0757734552,
0.0436709784,
-0.1325443536,
-0.1181432977,
-0.0700054765,
0.3619901538,
0.0181778558,
0.3093428314,
0.0988719612,
0.3241173923,
0.1225647032,
0.158174932,
0.0567012578,
0.5165620446,
-0.2517263889,
-0.4529190063,
-0.2148974389,
0.0735339746,
0.5256527662,
0.3369339406,
-0.1176265702,
0.2108340114,
0.0150846709,
0.3006297648,
-0.2826225162,
0.0861026421,
-0.0037655251,
0.0197224114,
-0.3151358664,
-0.6543036699,
0.6080857515,
-0.0481756516,
-0.0296774358,
0.6839986444,
0.1652462929,
-0.2801620066,
0.1331168711,
0.0921041146,
0.7769194245,
0.2175626308,
-0.1979849041,
0.3034778535,
-0.3394563198,
0.6258862019,
-0.0798278525,
-0.0297027361,
-0.4584893286,
-0.2590347826,
-0.0326071605,
-0.2276388556,
0.3053362072,
0.2456820309,
-0.0311838202,
0.3133289218,
0.1233329177,
0.0567078292,
0.110100463,
0.4103671014,
-0.2849065661,
-0.1732499748,
-0.0140661569,
0.0758507624,
-0.2223355174,
0.2195416242,
0.0989719555,
-0.0094314441,
0.2025899142,
-0.3244770169,
-0.2059085071,
-0.0106370198,
-0.4570918381,
-0.1584334224,
0.3324967027,
-0.0520694703,
-0.0071548559,
-0.0602583587,
-0.2222661376,
0.5216395855,
-0.2354284525,
0.1143073812,
0.2670910358,
0.2786428034,
0.0680050552,
-0.0829324573,
0.2382900417,
0.2382215112,
-0.2041516453,
-0.0421696715,
-0.233303234,
0.0678795204,
0.0581998676,
-0.1900541186,
0.3836723268,
-0.4382180572,
0.0811608955,
0.028027337,
0.1880629212,
-0.0014825058,
0.0897070467,
0.1757083833,
-0.3515950143,
0.217570588,
0.1930173188,
-0.202077955,
-0.0620703883,
-0.0882104114,
0.1342882663,
-0.1900109798,
0.253415823,
-0.2788769007,
-0.124374494,
-0.2607571483,
0.3147236407,
-0.1343001276,
0.1996170431,
0.129524976,
0.2046518624,
-0.2494455874,
-0.0671604872,
-0.2207050472,
0.1186462864,
0.0431476161,
-0.2199679613,
-0.2078756541,
0.1067961305,
0.2224497795,
-0.2012471855,
0.5642724633,
-0.1765352488,
-0.032960467,
-0.0999025777,
-0.0662949979,
-0.2924401164,
-0.1797351539,
-0.3584108055,
0.1611724943,
0.0568647161,
0.229685396,
0.0636695325,
-0.2550774515,
0.1623815596,
-0.4163233936,
-0.2275136858,
-0.1837728471,
-0.2229647189,
0.1390654892,
-0.2103857696,
0.3841533661,
-0.0308273416,
-0.0685376599,
0.0491251424,
-0.4009988308,
0.1306288093,
0.2046672851,
0.0847445428,
0.2993748784,
0.0164160151,
-0.0079184743,
-0.2277239859,
0.2847553492,
-0.094860673,
-0.1023847386,
-0.0096029686,
0.1877864748,
-0.4287796021,
-0.0191408582,
0.1183140874,
0.1578828096,
-0.1332945526,
-0.1807147861,
-0.0281483494,
0.2097122818,
-0.055169832,
0.3719572723,
0.1665796041,
0.4517954588,
-0.285736084,
0.3497238159,
0.4606693685,
0.2144282311,
-0.252204597,
0.0399187803,
0.079125002,
0.0914485604,
0.1824517548,
0.4404371977,
0.0084615238,
-0.1557020992,
0.2892692983,
-0.1250063181,
0.2097966671,
-0.1743938327,
0.4690927267,
0.6704900265,
0.0210341681,
-0.053914234,
0.427847594,
0.2801865041,
0.2022476345,
0.0699449033,
0.2003116012,
0.1945189983,
0.1015202627,
-0.0214127172,
0.0961157009,
-0.4269611537,
0.075743854,
-0.1886122674,
-0.4297328889,
0.0820091367,
-0.0256210212,
0.0761233643,
-0.179355219,
0.0001103989,
-0.1574229151,
0.0255325288,
-0.0316649191,
-0.095840387,
0.1693866104,
-0.1241508052,
0.0405341163,
-0.1530508697,
0.5043208003,
-0.6326519251,
0.1235562935,
-0.2268601507,
0.0858923942,
-0.11269667,
0.1759041548,
0.215181157,
0.1370626539,
-0.2566286922,
0.0249518044,
-0.1419989318,
-0.008196827,
-0.0082432246,
0.2090813667,
0.1255317926,
0.1017955914,
0.2172406465,
-0.0344416872,
-0.1423351765,
-0.0724233389,
-0.2442759871,
0.0155502595,
-0.3094190359,
-0.4178033769,
0.1449212879,
0.1819393039,
-0.0060575875,
-0.1446772814,
-0.3082802594,
-0.0208104886,
-0.5166678429,
0.6045439839,
0.3130978346,
-0.1000102609,
-0.0113909226,
-0.0426800884,
-0.1553136855,
-0.1349000633,
0.6721115112,
0.4028072655,
0.0821945965,
-0.0830618069,
0.075751856,
-0.2010112107,
-0.0381743982,
0.0843813568,
-0.224512741,
-0.0290711001,
0.0217928365,
-0.2602998614,
-0.0339712054,
-0.0309681371,
-0.371126771,
0.413792491,
0.2096809596,
0.2060820907,
0.028882185,
-0.0970490426,
-0.1478369385,
0.2316629142,
-0.112281464,
-0.2462441176,
-0.2393709868,
-0.2712228894,
0.1649147421,
0.1224118471,
-0.2592332065,
0.0602350496,
0.2148349434,
-0.0145389847,
-0.1126574203,
0.1241135746,
0.3259406388,
0.026726922,
0.3778387606,
0.092424795,
0.064921096,
0.1238598451,
-0.014813697,
-0.2758963108,
-0.0165468324,
-0.1664801538,
0.3430764973,
0.0609582178,
-0.1830994934,
-0.1552865654,
-0.0740586296,
-0.1776974499,
-0.059122663,
0.2580402792,
-0.0110353706,
-0.0281700473,
0.118149735,
-0.0807266533,
0.1725765616,
-0.1466215551,
-0.0640169233,
-0.0013672161,
-0.0604971536,
-0.0466509499,
-0.3077984452,
0.6091307402,
0.2836866677,
-0.2547551394,
-0.179679513,
0.4561403394,
-0.1062636524,
0.0668005869,
-0.4212091565,
-0.2039428949,
0.5979008079,
-0.3481872976,
-0.0931411162,
-0.0896125659,
-0.1907138228,
0.1068282276,
-0.1690490097,
-0.0770763904,
-0.0348112509,
-0.0390591808,
-0.2292480767,
-0.3019830585
] |
https://github.com/huggingface/datasets/issues/3134 | Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py | Hi,
Did you try to run the code multiple times (GitHub URLs can be down sometimes for various reasons)? I can access `https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py`, so this code is working without an error on my side.
Additionally, can you please run the `datasets-cli env` command because it seems to me that you are using the `datasets` version different from `1.12.1`? | datasets version: 1.12.1
`metric = datasets.load_metric('rouge')`
The error:
> ConnectionError Traceback (most recent call last)
> <ipython-input-3-dd10a0c5212f> in <module>
> ----> 1 metric = datasets.load_metric('rouge')
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, script_version, **metric_init_kwargs)
> 613 download_config=download_config,
> 614 download_mode=download_mode,
> --> 615 dataset=False,
> 616 )
> 617 metric_cls = import_main_class(module_path, dataset=False)
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, **download_kwargs)
> 328 file_path = hf_github_url(path=path, name=name, dataset=dataset, version=script_version)
> 329 try:
> --> 330 local_path = cached_path(file_path, download_config=download_config)
> 331 except FileNotFoundError:
> 332 if script_version is not None:
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
> 296 use_etag=download_config.use_etag,
> 297 max_retries=download_config.max_retries,
> --> 298 use_auth_token=download_config.use_auth_token,
> 299 )
> 300 elif os.path.exists(url_or_filename):
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
> 603 raise FileNotFoundError("Couldn't find file at {}".format(url))
> 604 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
> --> 605 raise ConnectionError("Couldn't reach {}".format(url))
> 606
> 607 # Try a second time
>
> ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
Is there any remedy to solve the connection issue ? | 58 | Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
datasets version: 1.12.1
`metric = datasets.load_metric('rouge')`
The error:
> ConnectionError Traceback (most recent call last)
> <ipython-input-3-dd10a0c5212f> in <module>
> ----> 1 metric = datasets.load_metric('rouge')
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, script_version, **metric_init_kwargs)
> 613 download_config=download_config,
> 614 download_mode=download_mode,
> --> 615 dataset=False,
> 616 )
> 617 metric_cls = import_main_class(module_path, dataset=False)
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, **download_kwargs)
> 328 file_path = hf_github_url(path=path, name=name, dataset=dataset, version=script_version)
> 329 try:
> --> 330 local_path = cached_path(file_path, download_config=download_config)
> 331 except FileNotFoundError:
> 332 if script_version is not None:
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
> 296 use_etag=download_config.use_etag,
> 297 max_retries=download_config.max_retries,
> --> 298 use_auth_token=download_config.use_auth_token,
> 299 )
> 300 elif os.path.exists(url_or_filename):
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
> 603 raise FileNotFoundError("Couldn't find file at {}".format(url))
> 604 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
> --> 605 raise ConnectionError("Couldn't reach {}".format(url))
> 606
> 607 # Try a second time
>
> ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
Is there any remedy to solve the connection issue ?
Hi,
Did you try to run the code multiple times (GitHub URLs can be down sometimes for various reasons)? I can access `https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py`, so this code is working without an error on my side.
Additionally, can you please run the `datasets-cli env` command because it seems to me that you are using the `datasets` version different from `1.12.1`? | [
-0.4028956294,
-0.0917159915,
-0.1140874997,
0.2032687962,
0.2335222661,
-0.0791536048,
0.0977335945,
0.401229769,
0.1732943803,
0.2921183407,
-0.3156027794,
-0.0292547848,
0.0664939284,
0.0566055626,
0.1343690902,
-0.0982899889,
-0.196165517,
-0.0955754295,
-0.26176548,
0.1735686511,
-0.1562045813,
0.2479441315,
-0.0610230453,
0.1988897473,
0.0647322685,
-0.0930981785,
0.1221594736,
0.2962450683,
-0.4615673125,
-0.4462740719,
0.3729445636,
0.053741172,
0.1342708468,
0.5007215142,
-0.0001111456,
0.2051056623,
0.3346629143,
-0.0609426312,
-0.4902219474,
-0.6396030188,
-0.2391113341,
-0.1106907129,
0.1620520502,
-0.0708997101,
-0.1534720957,
0.202563867,
0.0105373347,
-0.2176423222,
0.4202257395,
0.5358584523,
0.2260997593,
0.5080770254,
0.3908087015,
-0.2263844758,
0.1627917588,
-0.1687015444,
-0.0075961906,
0.8425216079,
0.0675035492,
-0.0139084589,
0.061418239,
0.215631187,
0.1526985168,
0.2065246105,
0.3073362708,
-0.1842177957,
0.362755388,
-0.1989937723,
-0.0022884009,
0.0231647585,
0.1620710194,
-0.2893258631,
-0.4648663402,
0.1519875675,
-0.0389808938,
-0.6075183153,
0.2533767819,
-0.0769176036,
-0.2029355615,
0.0204769522,
-0.3510052264,
-0.3186108768,
-0.3203492463,
0.177049771,
-0.0430526361,
-0.0150431599,
-0.2803618908,
0.1023679227,
0.1011374891,
-0.1008139104,
-0.2903200686,
0.1227265671,
-0.1664375961,
0.2118168175,
-0.1926621199,
0.0178747568,
0.0295450948,
-0.1235279441,
0.2105478048,
0.2714717388,
-0.0309211519,
-0.0044639423,
0.1105519384,
0.1100028753,
0.0323087499,
0.1711502373,
0.0010292798,
0.2829097807,
0.2745904922,
0.6173329353,
0.0732792839,
-0.0066847708,
-0.1303242296,
-0.3659855425,
-0.0657288581,
0.2089108229,
0.4930973649,
-0.2139488906,
-0.2350701839,
0.1885437518,
-0.0585003458,
-0.1023371443,
0.0419670455,
0.2563571036,
-0.2652183771,
-0.0752816126,
0.1136624143,
0.1762932241,
-0.2488433272,
0.150077194,
-0.2428800613,
0.1336619705,
-0.1552985758,
0.1361045241,
0.098921746,
-0.1735589355,
0.1436372697,
-0.1222374812,
0.1787063032,
-0.2080039382,
0.2229412049,
0.0121266311,
-0.2444596142,
0.2979537249,
0.0410453752,
0.091540657,
0.2260124385,
-0.2707826197,
-0.110791795,
-0.2070262432,
-0.3982379436,
-0.4079212248,
-0.0309666935,
0.2210296988,
-0.049123127,
0.062132135,
-0.3226233721,
-0.1749111563,
-0.0211231466,
-0.1313866973,
-0.1213966832,
-0.1584643573,
-0.1029097885,
-0.1630710959,
0.4859735966,
0.4181919992,
0.0717635378,
-0.1625383794,
0.0906273872,
-0.1173112616,
0.0385927558,
0.1696137339,
-0.0856979042,
0.0188253205,
-0.3086383343,
-0.2789128125,
0.6501630545,
-0.6785373688,
-0.4723157287,
0.3038989007,
-0.1134295985,
-0.0069393888,
0.0896838158,
-0.2527337372,
0.292391032,
-0.0245883651,
0.431820035,
0.0718150437,
-0.0383055247,
-0.2738703489,
-0.1059285104,
-0.0947447419,
0.0300327186,
0.0612085797,
0.2298381776,
0.2225989103,
0.1938079596,
-0.1399754435,
0.2568139434,
0.2142125517,
-0.0451662429,
0.3252112269,
0.0714544579,
0.1115397885,
-0.0805461854,
-0.2215158194,
-0.0335601233,
0.1528937072,
-0.226977095,
-0.003385236,
-0.2462603599,
-0.0065568229,
-0.5282768607,
0.0550676025,
0.0131220706,
-0.191169396,
0.1303533763,
0.1321267486,
0.1379092634,
0.2595018148,
-0.1853675991,
0.3281312585,
-0.2172047496,
0.2060409635,
-0.3939414322,
0.2265941948,
-0.2306171507,
-0.0846329927,
0.2492671311,
0.1102447286,
0.185096845,
-0.244545266,
-0.1428142488,
0.2696176469,
0.0781221688,
0.1194990724,
0.3623812199,
0.1378725618,
0.1654006392,
-0.0693064556,
-0.0484111197,
-0.0910790339,
0.061504174,
0.2113355696,
0.1499652714,
0.1725244522,
-0.0836472809,
0.2312513888,
0.1438014507,
0.0934036523,
0.2962749898,
0.2153724134,
-0.1921021193,
0.0857500732,
0.4044250846,
0.0632345974,
0.2513087988,
-0.2036628574,
-0.0695390254,
-0.0492583215,
0.3880654573,
-0.0716116652,
-0.0119204763,
0.1328727603,
0.1427638233,
-0.1056778207,
-0.0279335603,
0.0461297594,
0.246291995,
0.0275420807,
0.1360164732,
0.2337549925,
-0.113956131,
0.0066712298,
0.0820675939,
-0.0510199517,
0.0019914559,
0.2081706524,
-0.0959366262,
-0.0093751932,
-0.0120975208,
-0.3281031251,
-0.1260834634,
0.3014910817,
-0.2548198998,
0.2159495354,
-0.1751922071,
0.0687984452,
0.1250672638,
-0.4654531777,
-0.3020922244,
-0.2618439496,
-0.1894519925,
0.330775857,
0.1972888857,
0.2216157466,
0.1552640498,
0.0893130526,
0.203549251,
-0.1746786982,
-0.166340068,
-0.2236741185,
-0.0392354764,
0.0689445361,
0.0742270052,
-0.3100695908,
0.37206617,
-0.4640763402,
-0.1145652831,
-0.1542757899,
-0.1854748577,
-0.1162339002,
-0.0989378393,
0.2891533971,
0.3395437002,
0.4083218277,
-0.0036553764,
0.1563250273,
0.4288764894,
0.0404863246,
-0.1701288819,
0.0572602749,
-0.1989900172,
-0.0159629472,
0.0900020599,
-0.2380995452,
-0.363535732,
-0.5015984774,
0.2459297925,
0.1915352046,
0.0858116373,
0.2453097403,
0.1705061495,
0.176407516,
0.1050432846,
0.1702939123,
-0.1885239035,
-0.6819538474,
0.2097894549,
-0.366894871,
-0.3407715559,
0.2215179354,
0.2399462759,
0.3687408566,
0.2215238065,
-0.5437682271,
-0.4829254746,
0.0638979152,
0.3006432056,
0.0436025895,
-0.0622708425,
0.1850145906,
-0.1984943151,
-0.0342264883,
0.0328603163,
-0.2459638268,
-0.0066250032,
-0.0505962707,
0.2106594145,
0.0088585177,
0.5591797233,
-0.0989434421,
0.6215458512,
0.2605271041,
0.150721848,
0.2617114782,
-0.082931675,
0.5427129269,
-0.2461128831,
-0.3602123559,
0.1052056178,
-0.0460622832,
-0.0004556283,
-0.1919692159,
0.0532438979,
0.2535902858,
-0.4288655519,
-0.2999520004,
-0.0718891174,
-0.246623829,
-0.1506142765,
-0.3064575493,
0.2230997831,
0.1785119921,
-0.0272356868,
-0.3175581992,
-0.0008880089,
0.1135708392,
0.6257213354,
0.0785615221,
0.3385027945,
-0.0886253193,
0.0184881259,
-0.5345076919,
0.3502252698,
0.0239806473,
0.351323247,
-0.3029440045,
0.166909501,
-0.0982817262,
-0.2031342536,
0.323338598,
-0.1132987365,
0.3804696202,
0.2436783463,
-0.296843797,
-0.4478214085,
-0.0134210885,
0.1166051775,
0.4236904085,
0.1696991622,
0.4783428907,
-0.3001614809,
-0.0806976855,
0.3393732011,
0.0312404428,
-0.0679634213,
0.2253329158,
-0.4263442457,
-0.327716738,
-0.2723507285,
0.0113529423,
0.0144175813,
0.2792472839,
0.2720509171,
-0.0461053327,
0.0420664251,
-0.0365746655,
-0.057944037,
0.0570965856,
-0.0204333756,
-0.1498523802,
-0.0222956184,
0.1602292955,
-0.0122593613,
0.0753860995,
0.6636024117,
-0.1050921753,
-0.7452945709,
0.1838395745,
0.2352869362,
0.0377058536,
0.1807249486,
-0.1101931036,
0.0243671425,
0.1129276454,
0.2119273543,
-0.206536606,
0.295463413,
0.3220750391,
0.2748258412,
-0.5185188651,
-0.4033500552,
0.1141644269,
-0.1231627837,
0.0138975484,
0.6102563739,
0.0729239807,
-0.097995162,
-0.0911060721,
-0.2625125945,
0.8014322519,
0.1077497303,
0.0352189802,
0.2205325365,
-0.4516552687,
0.3076812029,
-0.2766031027,
0.0682241991,
-0.1791361272,
-0.1370666176,
-0.0264756158,
-0.2208544463,
0.2129116505,
-0.3919968605,
0.0389651395,
0.3359131217,
-0.0504388846,
0.1348895133,
-0.0371990986,
0.2549857795,
-0.0469287336,
0.1728110462,
-0.3076121211,
0.2186885774,
-0.2575142086,
0.4027945995,
-0.1483770609,
-0.0600006171,
-0.1800129563,
-0.3471658528,
-0.2037284523,
-0.0187516976,
-0.3037422299,
0.2420017123,
0.0541455373,
-0.4063524306,
-0.1612279266,
0.0653158948,
0.1171379089,
0.1225615144,
-0.1437911838,
0.1162903756,
-0.4998993278,
-0.2479223162,
0.0034057624,
0.2551879585,
-0.0000044422,
-0.2653613985,
-0.153764829,
0.216549322,
0.0264527556,
-0.2988771796,
0.1712279171,
-0.0474448167,
0.1591478735,
-0.0804907829,
0.1629232019,
-0.3459297121,
-0.0557927079,
-0.1641680449,
0.1375117451,
-0.0120177893,
-0.1658347994,
-0.1779993922,
0.0643581674,
-0.2691390216,
0.007373455,
0.5254377127,
-0.2073256224,
-0.0476849228,
0.1944402307,
0.072764799,
-0.169039309,
-0.2242325097,
0.0260489415,
0.1053918004,
-0.3324163556,
0.1689246893,
-0.0222467557,
0.2153790593,
-0.1760996878,
0.2200068086,
0.3606183231,
-0.1468280405,
0.2638862729,
-0.6355929375,
-0.4202066064,
0.1236345842,
-0.2235510498,
0.0558530129,
0.0367497802,
0.0298619512,
-0.0029429032,
0.0562181957,
-0.3111594915,
-0.0031297803,
-0.3433091044,
-0.0687847883,
0.4049592018,
-0.2616896629,
0.3749804199,
0.0482537337,
0.1409948617,
-0.0792292878,
-0.4178664088,
-0.2253060788,
-0.150498271,
0.0857056975,
-0.2575441599,
-0.2317720056,
0.105248034,
-0.1326686293,
-0.0950295925,
0.0191965401,
0.0476062261,
0.217565462,
0.0994532704,
-0.0777723715,
-0.2042251825,
0.034495756,
0.0300160255,
0.2477891743,
0.210726127,
0.3791817427,
-0.0897609964,
0.1444933265,
-0.0051997048,
-0.1074912176,
-0.3947823942,
-0.0824235529,
0.0823744535,
-0.0742396936,
0.4947921336,
-0.1295217425,
0.0859073624,
-0.0868477598,
0.3686519861,
0.202297762,
-0.19579193,
0.0530992448,
-0.0280715507,
0.2037633955,
-0.1725739539,
-0.0147095406,
0.182863608,
0.0604689158,
-0.0761250332,
-0.0465239398,
-0.0993350446,
0.0698336735,
0.0347625688,
0.1187870055,
0.4359140992,
-0.1446976215,
0.1689931303,
-0.0179751609,
0.0297369789,
-0.024823945,
0.3096925914,
0.3383604586,
0.055917237,
0.3121260405,
-0.2445694655,
0.152961567,
0.0371774174,
0.1411418468,
-0.043113634,
-0.2420966327,
-0.1345998645,
0.0864429772,
-0.1773290485,
-0.0687391758,
-0.1583556384,
0.2703719735,
-0.2575266659,
-0.0976131558,
-0.1575702727,
0.006140159,
-0.0185668357,
-0.1117465571,
-0.0784194842,
-0.2440523803,
-0.1590815187,
-0.1592645794,
0.096771881,
-0.0267183073,
0.3203130066,
0.1086197868,
0.0314724557,
-0.3013311028,
-0.1342028975,
0.1011630222,
0.0171730071,
-0.1487470567,
0.4078501761,
0.2388396114,
0.1350660175,
0.0875003561,
0.3234546185,
0.6591109633,
0.1160070226,
-0.058302667,
0.2019231319,
0.0506801605,
-0.130192548,
0.0138171408,
0.1990472376,
0.1937868744,
-0.0418556929,
0.3244072795,
0.233747527,
-0.1486534625,
0.4397870302,
-0.1847920716,
-0.0949134082,
-0.2182827443,
0.4635775387,
-0.2508490682,
-0.0039013696,
-0.2708034515,
0.0243561585,
-0.4600652456,
-0.1297233701,
0.1242443174,
0.1218707114,
0.0725406706,
-0.2389404327,
0.095758386,
-0.1485882998,
0.4316083193,
0.4395944476,
0.3993543386,
-0.2779632211,
-0.1494971663,
-0.4341092408,
0.2266278714,
0.0198817216,
-0.1866454184,
0.0269563105,
0.0792765245,
-0.2777570486,
0.2329267263,
0.1703611463,
0.0403114483,
0.0131305372,
0.113384217,
-0.1710271388,
-0.069524087,
-0.0056447405,
0.042195797,
0.0026409938,
-0.2384571582,
0.1327734888,
-0.3347195387,
0.031006299,
-0.0662910044,
-0.0897781178,
0.264690876,
0.1665336341,
0.3076876104,
0.2030036896,
0.485160917,
0.0458934419,
-0.2792541981,
-0.2159506679,
-0.3196075857,
-0.0656995848,
0.1056213155,
-0.0647790283,
0.1801791638,
-0.159645319,
-0.2979738414,
-0.4564591646,
0.4931305349,
-0.1551965475,
-0.0172462724,
0.0678362325,
-0.0310281031,
0.1256198883,
0.0189492591,
0.1023061648,
0.0883119777,
0.1328030527,
0.2443818748,
-0.2844841778,
-0.1209947243,
0.5548478961,
-0.17404522,
-0.2860159278,
-0.0265501868,
0.3145867884,
0.1803198755,
-0.075773187,
-0.5487620831,
0.3636639118,
0.4252279103,
0.0229571927,
-0.2970434427,
0.4226586521,
-0.2262151092,
0.2698113322,
0.0146172913,
0.2950890064,
-0.1885435432,
-0.2224440873,
0.1329912692,
-0.1534581631
] |
https://github.com/huggingface/datasets/issues/3134 | Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py | Same issue when running `metric = datasets.load_metric("accuracy")`.
Error info is:
```
metric = datasets.load_metric("accuracy")
Traceback (most recent call last):
File "<ipython-input-2-d25db38b26c5>", line 1, in <module>
metric = datasets.load_metric("accuracy")
File "D:\anaconda3\lib\site-packages\datasets\load.py", line 610, in load_metric
module_path, _ = prepare_module(
File "D:\anaconda3\lib\site-packages\datasets\load.py", line 330, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "D:\anaconda3\lib\site-packages\datasets\utils\file_utils.py", line 288, in cached_path
output_path = get_from_cache(
File "D:\anaconda3\lib\site-packages\datasets\utils\file_utils.py", line 605, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/accuracy/accuracy.py
```
My `datasets-cli env` result is as follows:
- `datasets` version: 1.11.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.8
- PyArrow version: 6.0.0
@yananchen1989 did you find a way to solve this? | datasets version: 1.12.1
`metric = datasets.load_metric('rouge')`
The error:
> ConnectionError Traceback (most recent call last)
> <ipython-input-3-dd10a0c5212f> in <module>
> ----> 1 metric = datasets.load_metric('rouge')
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, script_version, **metric_init_kwargs)
> 613 download_config=download_config,
> 614 download_mode=download_mode,
> --> 615 dataset=False,
> 616 )
> 617 metric_cls = import_main_class(module_path, dataset=False)
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, **download_kwargs)
> 328 file_path = hf_github_url(path=path, name=name, dataset=dataset, version=script_version)
> 329 try:
> --> 330 local_path = cached_path(file_path, download_config=download_config)
> 331 except FileNotFoundError:
> 332 if script_version is not None:
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
> 296 use_etag=download_config.use_etag,
> 297 max_retries=download_config.max_retries,
> --> 298 use_auth_token=download_config.use_auth_token,
> 299 )
> 300 elif os.path.exists(url_or_filename):
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
> 603 raise FileNotFoundError("Couldn't find file at {}".format(url))
> 604 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
> --> 605 raise ConnectionError("Couldn't reach {}".format(url))
> 606
> 607 # Try a second time
>
> ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
Is there any remedy to solve the connection issue ? | 103 | Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
datasets version: 1.12.1
`metric = datasets.load_metric('rouge')`
The error:
> ConnectionError Traceback (most recent call last)
> <ipython-input-3-dd10a0c5212f> in <module>
> ----> 1 metric = datasets.load_metric('rouge')
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, script_version, **metric_init_kwargs)
> 613 download_config=download_config,
> 614 download_mode=download_mode,
> --> 615 dataset=False,
> 616 )
> 617 metric_cls = import_main_class(module_path, dataset=False)
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, **download_kwargs)
> 328 file_path = hf_github_url(path=path, name=name, dataset=dataset, version=script_version)
> 329 try:
> --> 330 local_path = cached_path(file_path, download_config=download_config)
> 331 except FileNotFoundError:
> 332 if script_version is not None:
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
> 296 use_etag=download_config.use_etag,
> 297 max_retries=download_config.max_retries,
> --> 298 use_auth_token=download_config.use_auth_token,
> 299 )
> 300 elif os.path.exists(url_or_filename):
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
> 603 raise FileNotFoundError("Couldn't find file at {}".format(url))
> 604 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
> --> 605 raise ConnectionError("Couldn't reach {}".format(url))
> 606
> 607 # Try a second time
>
> ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
Is there any remedy to solve the connection issue ?
Same issue when running `metric = datasets.load_metric("accuracy")`.
Error info is:
```
metric = datasets.load_metric("accuracy")
Traceback (most recent call last):
File "<ipython-input-2-d25db38b26c5>", line 1, in <module>
metric = datasets.load_metric("accuracy")
File "D:\anaconda3\lib\site-packages\datasets\load.py", line 610, in load_metric
module_path, _ = prepare_module(
File "D:\anaconda3\lib\site-packages\datasets\load.py", line 330, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "D:\anaconda3\lib\site-packages\datasets\utils\file_utils.py", line 288, in cached_path
output_path = get_from_cache(
File "D:\anaconda3\lib\site-packages\datasets\utils\file_utils.py", line 605, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/accuracy/accuracy.py
```
My `datasets-cli env` result is as follows:
- `datasets` version: 1.11.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.8
- PyArrow version: 6.0.0
@yananchen1989 did you find a way to solve this? | [
-0.4028956294,
-0.0917159915,
-0.1140874997,
0.2032687962,
0.2335222661,
-0.0791536048,
0.0977335945,
0.401229769,
0.1732943803,
0.2921183407,
-0.3156027794,
-0.0292547848,
0.0664939284,
0.0566055626,
0.1343690902,
-0.0982899889,
-0.196165517,
-0.0955754295,
-0.26176548,
0.1735686511,
-0.1562045813,
0.2479441315,
-0.0610230453,
0.1988897473,
0.0647322685,
-0.0930981785,
0.1221594736,
0.2962450683,
-0.4615673125,
-0.4462740719,
0.3729445636,
0.053741172,
0.1342708468,
0.5007215142,
-0.0001111456,
0.2051056623,
0.3346629143,
-0.0609426312,
-0.4902219474,
-0.6396030188,
-0.2391113341,
-0.1106907129,
0.1620520502,
-0.0708997101,
-0.1534720957,
0.202563867,
0.0105373347,
-0.2176423222,
0.4202257395,
0.5358584523,
0.2260997593,
0.5080770254,
0.3908087015,
-0.2263844758,
0.1627917588,
-0.1687015444,
-0.0075961906,
0.8425216079,
0.0675035492,
-0.0139084589,
0.061418239,
0.215631187,
0.1526985168,
0.2065246105,
0.3073362708,
-0.1842177957,
0.362755388,
-0.1989937723,
-0.0022884009,
0.0231647585,
0.1620710194,
-0.2893258631,
-0.4648663402,
0.1519875675,
-0.0389808938,
-0.6075183153,
0.2533767819,
-0.0769176036,
-0.2029355615,
0.0204769522,
-0.3510052264,
-0.3186108768,
-0.3203492463,
0.177049771,
-0.0430526361,
-0.0150431599,
-0.2803618908,
0.1023679227,
0.1011374891,
-0.1008139104,
-0.2903200686,
0.1227265671,
-0.1664375961,
0.2118168175,
-0.1926621199,
0.0178747568,
0.0295450948,
-0.1235279441,
0.2105478048,
0.2714717388,
-0.0309211519,
-0.0044639423,
0.1105519384,
0.1100028753,
0.0323087499,
0.1711502373,
0.0010292798,
0.2829097807,
0.2745904922,
0.6173329353,
0.0732792839,
-0.0066847708,
-0.1303242296,
-0.3659855425,
-0.0657288581,
0.2089108229,
0.4930973649,
-0.2139488906,
-0.2350701839,
0.1885437518,
-0.0585003458,
-0.1023371443,
0.0419670455,
0.2563571036,
-0.2652183771,
-0.0752816126,
0.1136624143,
0.1762932241,
-0.2488433272,
0.150077194,
-0.2428800613,
0.1336619705,
-0.1552985758,
0.1361045241,
0.098921746,
-0.1735589355,
0.1436372697,
-0.1222374812,
0.1787063032,
-0.2080039382,
0.2229412049,
0.0121266311,
-0.2444596142,
0.2979537249,
0.0410453752,
0.091540657,
0.2260124385,
-0.2707826197,
-0.110791795,
-0.2070262432,
-0.3982379436,
-0.4079212248,
-0.0309666935,
0.2210296988,
-0.049123127,
0.062132135,
-0.3226233721,
-0.1749111563,
-0.0211231466,
-0.1313866973,
-0.1213966832,
-0.1584643573,
-0.1029097885,
-0.1630710959,
0.4859735966,
0.4181919992,
0.0717635378,
-0.1625383794,
0.0906273872,
-0.1173112616,
0.0385927558,
0.1696137339,
-0.0856979042,
0.0188253205,
-0.3086383343,
-0.2789128125,
0.6501630545,
-0.6785373688,
-0.4723157287,
0.3038989007,
-0.1134295985,
-0.0069393888,
0.0896838158,
-0.2527337372,
0.292391032,
-0.0245883651,
0.431820035,
0.0718150437,
-0.0383055247,
-0.2738703489,
-0.1059285104,
-0.0947447419,
0.0300327186,
0.0612085797,
0.2298381776,
0.2225989103,
0.1938079596,
-0.1399754435,
0.2568139434,
0.2142125517,
-0.0451662429,
0.3252112269,
0.0714544579,
0.1115397885,
-0.0805461854,
-0.2215158194,
-0.0335601233,
0.1528937072,
-0.226977095,
-0.003385236,
-0.2462603599,
-0.0065568229,
-0.5282768607,
0.0550676025,
0.0131220706,
-0.191169396,
0.1303533763,
0.1321267486,
0.1379092634,
0.2595018148,
-0.1853675991,
0.3281312585,
-0.2172047496,
0.2060409635,
-0.3939414322,
0.2265941948,
-0.2306171507,
-0.0846329927,
0.2492671311,
0.1102447286,
0.185096845,
-0.244545266,
-0.1428142488,
0.2696176469,
0.0781221688,
0.1194990724,
0.3623812199,
0.1378725618,
0.1654006392,
-0.0693064556,
-0.0484111197,
-0.0910790339,
0.061504174,
0.2113355696,
0.1499652714,
0.1725244522,
-0.0836472809,
0.2312513888,
0.1438014507,
0.0934036523,
0.2962749898,
0.2153724134,
-0.1921021193,
0.0857500732,
0.4044250846,
0.0632345974,
0.2513087988,
-0.2036628574,
-0.0695390254,
-0.0492583215,
0.3880654573,
-0.0716116652,
-0.0119204763,
0.1328727603,
0.1427638233,
-0.1056778207,
-0.0279335603,
0.0461297594,
0.246291995,
0.0275420807,
0.1360164732,
0.2337549925,
-0.113956131,
0.0066712298,
0.0820675939,
-0.0510199517,
0.0019914559,
0.2081706524,
-0.0959366262,
-0.0093751932,
-0.0120975208,
-0.3281031251,
-0.1260834634,
0.3014910817,
-0.2548198998,
0.2159495354,
-0.1751922071,
0.0687984452,
0.1250672638,
-0.4654531777,
-0.3020922244,
-0.2618439496,
-0.1894519925,
0.330775857,
0.1972888857,
0.2216157466,
0.1552640498,
0.0893130526,
0.203549251,
-0.1746786982,
-0.166340068,
-0.2236741185,
-0.0392354764,
0.0689445361,
0.0742270052,
-0.3100695908,
0.37206617,
-0.4640763402,
-0.1145652831,
-0.1542757899,
-0.1854748577,
-0.1162339002,
-0.0989378393,
0.2891533971,
0.3395437002,
0.4083218277,
-0.0036553764,
0.1563250273,
0.4288764894,
0.0404863246,
-0.1701288819,
0.0572602749,
-0.1989900172,
-0.0159629472,
0.0900020599,
-0.2380995452,
-0.363535732,
-0.5015984774,
0.2459297925,
0.1915352046,
0.0858116373,
0.2453097403,
0.1705061495,
0.176407516,
0.1050432846,
0.1702939123,
-0.1885239035,
-0.6819538474,
0.2097894549,
-0.366894871,
-0.3407715559,
0.2215179354,
0.2399462759,
0.3687408566,
0.2215238065,
-0.5437682271,
-0.4829254746,
0.0638979152,
0.3006432056,
0.0436025895,
-0.0622708425,
0.1850145906,
-0.1984943151,
-0.0342264883,
0.0328603163,
-0.2459638268,
-0.0066250032,
-0.0505962707,
0.2106594145,
0.0088585177,
0.5591797233,
-0.0989434421,
0.6215458512,
0.2605271041,
0.150721848,
0.2617114782,
-0.082931675,
0.5427129269,
-0.2461128831,
-0.3602123559,
0.1052056178,
-0.0460622832,
-0.0004556283,
-0.1919692159,
0.0532438979,
0.2535902858,
-0.4288655519,
-0.2999520004,
-0.0718891174,
-0.246623829,
-0.1506142765,
-0.3064575493,
0.2230997831,
0.1785119921,
-0.0272356868,
-0.3175581992,
-0.0008880089,
0.1135708392,
0.6257213354,
0.0785615221,
0.3385027945,
-0.0886253193,
0.0184881259,
-0.5345076919,
0.3502252698,
0.0239806473,
0.351323247,
-0.3029440045,
0.166909501,
-0.0982817262,
-0.2031342536,
0.323338598,
-0.1132987365,
0.3804696202,
0.2436783463,
-0.296843797,
-0.4478214085,
-0.0134210885,
0.1166051775,
0.4236904085,
0.1696991622,
0.4783428907,
-0.3001614809,
-0.0806976855,
0.3393732011,
0.0312404428,
-0.0679634213,
0.2253329158,
-0.4263442457,
-0.327716738,
-0.2723507285,
0.0113529423,
0.0144175813,
0.2792472839,
0.2720509171,
-0.0461053327,
0.0420664251,
-0.0365746655,
-0.057944037,
0.0570965856,
-0.0204333756,
-0.1498523802,
-0.0222956184,
0.1602292955,
-0.0122593613,
0.0753860995,
0.6636024117,
-0.1050921753,
-0.7452945709,
0.1838395745,
0.2352869362,
0.0377058536,
0.1807249486,
-0.1101931036,
0.0243671425,
0.1129276454,
0.2119273543,
-0.206536606,
0.295463413,
0.3220750391,
0.2748258412,
-0.5185188651,
-0.4033500552,
0.1141644269,
-0.1231627837,
0.0138975484,
0.6102563739,
0.0729239807,
-0.097995162,
-0.0911060721,
-0.2625125945,
0.8014322519,
0.1077497303,
0.0352189802,
0.2205325365,
-0.4516552687,
0.3076812029,
-0.2766031027,
0.0682241991,
-0.1791361272,
-0.1370666176,
-0.0264756158,
-0.2208544463,
0.2129116505,
-0.3919968605,
0.0389651395,
0.3359131217,
-0.0504388846,
0.1348895133,
-0.0371990986,
0.2549857795,
-0.0469287336,
0.1728110462,
-0.3076121211,
0.2186885774,
-0.2575142086,
0.4027945995,
-0.1483770609,
-0.0600006171,
-0.1800129563,
-0.3471658528,
-0.2037284523,
-0.0187516976,
-0.3037422299,
0.2420017123,
0.0541455373,
-0.4063524306,
-0.1612279266,
0.0653158948,
0.1171379089,
0.1225615144,
-0.1437911838,
0.1162903756,
-0.4998993278,
-0.2479223162,
0.0034057624,
0.2551879585,
-0.0000044422,
-0.2653613985,
-0.153764829,
0.216549322,
0.0264527556,
-0.2988771796,
0.1712279171,
-0.0474448167,
0.1591478735,
-0.0804907829,
0.1629232019,
-0.3459297121,
-0.0557927079,
-0.1641680449,
0.1375117451,
-0.0120177893,
-0.1658347994,
-0.1779993922,
0.0643581674,
-0.2691390216,
0.007373455,
0.5254377127,
-0.2073256224,
-0.0476849228,
0.1944402307,
0.072764799,
-0.169039309,
-0.2242325097,
0.0260489415,
0.1053918004,
-0.3324163556,
0.1689246893,
-0.0222467557,
0.2153790593,
-0.1760996878,
0.2200068086,
0.3606183231,
-0.1468280405,
0.2638862729,
-0.6355929375,
-0.4202066064,
0.1236345842,
-0.2235510498,
0.0558530129,
0.0367497802,
0.0298619512,
-0.0029429032,
0.0562181957,
-0.3111594915,
-0.0031297803,
-0.3433091044,
-0.0687847883,
0.4049592018,
-0.2616896629,
0.3749804199,
0.0482537337,
0.1409948617,
-0.0792292878,
-0.4178664088,
-0.2253060788,
-0.150498271,
0.0857056975,
-0.2575441599,
-0.2317720056,
0.105248034,
-0.1326686293,
-0.0950295925,
0.0191965401,
0.0476062261,
0.217565462,
0.0994532704,
-0.0777723715,
-0.2042251825,
0.034495756,
0.0300160255,
0.2477891743,
0.210726127,
0.3791817427,
-0.0897609964,
0.1444933265,
-0.0051997048,
-0.1074912176,
-0.3947823942,
-0.0824235529,
0.0823744535,
-0.0742396936,
0.4947921336,
-0.1295217425,
0.0859073624,
-0.0868477598,
0.3686519861,
0.202297762,
-0.19579193,
0.0530992448,
-0.0280715507,
0.2037633955,
-0.1725739539,
-0.0147095406,
0.182863608,
0.0604689158,
-0.0761250332,
-0.0465239398,
-0.0993350446,
0.0698336735,
0.0347625688,
0.1187870055,
0.4359140992,
-0.1446976215,
0.1689931303,
-0.0179751609,
0.0297369789,
-0.024823945,
0.3096925914,
0.3383604586,
0.055917237,
0.3121260405,
-0.2445694655,
0.152961567,
0.0371774174,
0.1411418468,
-0.043113634,
-0.2420966327,
-0.1345998645,
0.0864429772,
-0.1773290485,
-0.0687391758,
-0.1583556384,
0.2703719735,
-0.2575266659,
-0.0976131558,
-0.1575702727,
0.006140159,
-0.0185668357,
-0.1117465571,
-0.0784194842,
-0.2440523803,
-0.1590815187,
-0.1592645794,
0.096771881,
-0.0267183073,
0.3203130066,
0.1086197868,
0.0314724557,
-0.3013311028,
-0.1342028975,
0.1011630222,
0.0171730071,
-0.1487470567,
0.4078501761,
0.2388396114,
0.1350660175,
0.0875003561,
0.3234546185,
0.6591109633,
0.1160070226,
-0.058302667,
0.2019231319,
0.0506801605,
-0.130192548,
0.0138171408,
0.1990472376,
0.1937868744,
-0.0418556929,
0.3244072795,
0.233747527,
-0.1486534625,
0.4397870302,
-0.1847920716,
-0.0949134082,
-0.2182827443,
0.4635775387,
-0.2508490682,
-0.0039013696,
-0.2708034515,
0.0243561585,
-0.4600652456,
-0.1297233701,
0.1242443174,
0.1218707114,
0.0725406706,
-0.2389404327,
0.095758386,
-0.1485882998,
0.4316083193,
0.4395944476,
0.3993543386,
-0.2779632211,
-0.1494971663,
-0.4341092408,
0.2266278714,
0.0198817216,
-0.1866454184,
0.0269563105,
0.0792765245,
-0.2777570486,
0.2329267263,
0.1703611463,
0.0403114483,
0.0131305372,
0.113384217,
-0.1710271388,
-0.069524087,
-0.0056447405,
0.042195797,
0.0026409938,
-0.2384571582,
0.1327734888,
-0.3347195387,
0.031006299,
-0.0662910044,
-0.0897781178,
0.264690876,
0.1665336341,
0.3076876104,
0.2030036896,
0.485160917,
0.0458934419,
-0.2792541981,
-0.2159506679,
-0.3196075857,
-0.0656995848,
0.1056213155,
-0.0647790283,
0.1801791638,
-0.159645319,
-0.2979738414,
-0.4564591646,
0.4931305349,
-0.1551965475,
-0.0172462724,
0.0678362325,
-0.0310281031,
0.1256198883,
0.0189492591,
0.1023061648,
0.0883119777,
0.1328030527,
0.2443818748,
-0.2844841778,
-0.1209947243,
0.5548478961,
-0.17404522,
-0.2860159278,
-0.0265501868,
0.3145867884,
0.1803198755,
-0.075773187,
-0.5487620831,
0.3636639118,
0.4252279103,
0.0229571927,
-0.2970434427,
0.4226586521,
-0.2262151092,
0.2698113322,
0.0146172913,
0.2950890064,
-0.1885435432,
-0.2224440873,
0.1329912692,
-0.1534581631
] |
https://github.com/huggingface/datasets/issues/3134 | Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py | It seems to be able to solve this issue by adding the equivalent `accuracy.py` locally.
change `metric = datasets.load_metric("accuracy")` to `metric = datasets.load_metric(path = "./accuracy.py")`.
Copy `accuracy.py` from browser at [accuracy.py](https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/accuracy/accuracy.py) | datasets version: 1.12.1
`metric = datasets.load_metric('rouge')`
The error:
> ConnectionError Traceback (most recent call last)
> <ipython-input-3-dd10a0c5212f> in <module>
> ----> 1 metric = datasets.load_metric('rouge')
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, script_version, **metric_init_kwargs)
> 613 download_config=download_config,
> 614 download_mode=download_mode,
> --> 615 dataset=False,
> 616 )
> 617 metric_cls = import_main_class(module_path, dataset=False)
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, **download_kwargs)
> 328 file_path = hf_github_url(path=path, name=name, dataset=dataset, version=script_version)
> 329 try:
> --> 330 local_path = cached_path(file_path, download_config=download_config)
> 331 except FileNotFoundError:
> 332 if script_version is not None:
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
> 296 use_etag=download_config.use_etag,
> 297 max_retries=download_config.max_retries,
> --> 298 use_auth_token=download_config.use_auth_token,
> 299 )
> 300 elif os.path.exists(url_or_filename):
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
> 603 raise FileNotFoundError("Couldn't find file at {}".format(url))
> 604 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
> --> 605 raise ConnectionError("Couldn't reach {}".format(url))
> 606
> 607 # Try a second time
>
> ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
Is there any remedy to solve the connection issue ? | 31 | Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
datasets version: 1.12.1
`metric = datasets.load_metric('rouge')`
The error:
> ConnectionError Traceback (most recent call last)
> <ipython-input-3-dd10a0c5212f> in <module>
> ----> 1 metric = datasets.load_metric('rouge')
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, script_version, **metric_init_kwargs)
> 613 download_config=download_config,
> 614 download_mode=download_mode,
> --> 615 dataset=False,
> 616 )
> 617 metric_cls = import_main_class(module_path, dataset=False)
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, **download_kwargs)
> 328 file_path = hf_github_url(path=path, name=name, dataset=dataset, version=script_version)
> 329 try:
> --> 330 local_path = cached_path(file_path, download_config=download_config)
> 331 except FileNotFoundError:
> 332 if script_version is not None:
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
> 296 use_etag=download_config.use_etag,
> 297 max_retries=download_config.max_retries,
> --> 298 use_auth_token=download_config.use_auth_token,
> 299 )
> 300 elif os.path.exists(url_or_filename):
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
> 603 raise FileNotFoundError("Couldn't find file at {}".format(url))
> 604 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
> --> 605 raise ConnectionError("Couldn't reach {}".format(url))
> 606
> 607 # Try a second time
>
> ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
Is there any remedy to solve the connection issue ?
It seems to be able to solve this issue by adding the equivalent `accuracy.py` locally.
change `metric = datasets.load_metric("accuracy")` to `metric = datasets.load_metric(path = "./accuracy.py")`.
Copy `accuracy.py` from browser at [accuracy.py](https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/accuracy/accuracy.py) | [
-0.4028956294,
-0.0917159915,
-0.1140874997,
0.2032687962,
0.2335222661,
-0.0791536048,
0.0977335945,
0.401229769,
0.1732943803,
0.2921183407,
-0.3156027794,
-0.0292547848,
0.0664939284,
0.0566055626,
0.1343690902,
-0.0982899889,
-0.196165517,
-0.0955754295,
-0.26176548,
0.1735686511,
-0.1562045813,
0.2479441315,
-0.0610230453,
0.1988897473,
0.0647322685,
-0.0930981785,
0.1221594736,
0.2962450683,
-0.4615673125,
-0.4462740719,
0.3729445636,
0.053741172,
0.1342708468,
0.5007215142,
-0.0001111456,
0.2051056623,
0.3346629143,
-0.0609426312,
-0.4902219474,
-0.6396030188,
-0.2391113341,
-0.1106907129,
0.1620520502,
-0.0708997101,
-0.1534720957,
0.202563867,
0.0105373347,
-0.2176423222,
0.4202257395,
0.5358584523,
0.2260997593,
0.5080770254,
0.3908087015,
-0.2263844758,
0.1627917588,
-0.1687015444,
-0.0075961906,
0.8425216079,
0.0675035492,
-0.0139084589,
0.061418239,
0.215631187,
0.1526985168,
0.2065246105,
0.3073362708,
-0.1842177957,
0.362755388,
-0.1989937723,
-0.0022884009,
0.0231647585,
0.1620710194,
-0.2893258631,
-0.4648663402,
0.1519875675,
-0.0389808938,
-0.6075183153,
0.2533767819,
-0.0769176036,
-0.2029355615,
0.0204769522,
-0.3510052264,
-0.3186108768,
-0.3203492463,
0.177049771,
-0.0430526361,
-0.0150431599,
-0.2803618908,
0.1023679227,
0.1011374891,
-0.1008139104,
-0.2903200686,
0.1227265671,
-0.1664375961,
0.2118168175,
-0.1926621199,
0.0178747568,
0.0295450948,
-0.1235279441,
0.2105478048,
0.2714717388,
-0.0309211519,
-0.0044639423,
0.1105519384,
0.1100028753,
0.0323087499,
0.1711502373,
0.0010292798,
0.2829097807,
0.2745904922,
0.6173329353,
0.0732792839,
-0.0066847708,
-0.1303242296,
-0.3659855425,
-0.0657288581,
0.2089108229,
0.4930973649,
-0.2139488906,
-0.2350701839,
0.1885437518,
-0.0585003458,
-0.1023371443,
0.0419670455,
0.2563571036,
-0.2652183771,
-0.0752816126,
0.1136624143,
0.1762932241,
-0.2488433272,
0.150077194,
-0.2428800613,
0.1336619705,
-0.1552985758,
0.1361045241,
0.098921746,
-0.1735589355,
0.1436372697,
-0.1222374812,
0.1787063032,
-0.2080039382,
0.2229412049,
0.0121266311,
-0.2444596142,
0.2979537249,
0.0410453752,
0.091540657,
0.2260124385,
-0.2707826197,
-0.110791795,
-0.2070262432,
-0.3982379436,
-0.4079212248,
-0.0309666935,
0.2210296988,
-0.049123127,
0.062132135,
-0.3226233721,
-0.1749111563,
-0.0211231466,
-0.1313866973,
-0.1213966832,
-0.1584643573,
-0.1029097885,
-0.1630710959,
0.4859735966,
0.4181919992,
0.0717635378,
-0.1625383794,
0.0906273872,
-0.1173112616,
0.0385927558,
0.1696137339,
-0.0856979042,
0.0188253205,
-0.3086383343,
-0.2789128125,
0.6501630545,
-0.6785373688,
-0.4723157287,
0.3038989007,
-0.1134295985,
-0.0069393888,
0.0896838158,
-0.2527337372,
0.292391032,
-0.0245883651,
0.431820035,
0.0718150437,
-0.0383055247,
-0.2738703489,
-0.1059285104,
-0.0947447419,
0.0300327186,
0.0612085797,
0.2298381776,
0.2225989103,
0.1938079596,
-0.1399754435,
0.2568139434,
0.2142125517,
-0.0451662429,
0.3252112269,
0.0714544579,
0.1115397885,
-0.0805461854,
-0.2215158194,
-0.0335601233,
0.1528937072,
-0.226977095,
-0.003385236,
-0.2462603599,
-0.0065568229,
-0.5282768607,
0.0550676025,
0.0131220706,
-0.191169396,
0.1303533763,
0.1321267486,
0.1379092634,
0.2595018148,
-0.1853675991,
0.3281312585,
-0.2172047496,
0.2060409635,
-0.3939414322,
0.2265941948,
-0.2306171507,
-0.0846329927,
0.2492671311,
0.1102447286,
0.185096845,
-0.244545266,
-0.1428142488,
0.2696176469,
0.0781221688,
0.1194990724,
0.3623812199,
0.1378725618,
0.1654006392,
-0.0693064556,
-0.0484111197,
-0.0910790339,
0.061504174,
0.2113355696,
0.1499652714,
0.1725244522,
-0.0836472809,
0.2312513888,
0.1438014507,
0.0934036523,
0.2962749898,
0.2153724134,
-0.1921021193,
0.0857500732,
0.4044250846,
0.0632345974,
0.2513087988,
-0.2036628574,
-0.0695390254,
-0.0492583215,
0.3880654573,
-0.0716116652,
-0.0119204763,
0.1328727603,
0.1427638233,
-0.1056778207,
-0.0279335603,
0.0461297594,
0.246291995,
0.0275420807,
0.1360164732,
0.2337549925,
-0.113956131,
0.0066712298,
0.0820675939,
-0.0510199517,
0.0019914559,
0.2081706524,
-0.0959366262,
-0.0093751932,
-0.0120975208,
-0.3281031251,
-0.1260834634,
0.3014910817,
-0.2548198998,
0.2159495354,
-0.1751922071,
0.0687984452,
0.1250672638,
-0.4654531777,
-0.3020922244,
-0.2618439496,
-0.1894519925,
0.330775857,
0.1972888857,
0.2216157466,
0.1552640498,
0.0893130526,
0.203549251,
-0.1746786982,
-0.166340068,
-0.2236741185,
-0.0392354764,
0.0689445361,
0.0742270052,
-0.3100695908,
0.37206617,
-0.4640763402,
-0.1145652831,
-0.1542757899,
-0.1854748577,
-0.1162339002,
-0.0989378393,
0.2891533971,
0.3395437002,
0.4083218277,
-0.0036553764,
0.1563250273,
0.4288764894,
0.0404863246,
-0.1701288819,
0.0572602749,
-0.1989900172,
-0.0159629472,
0.0900020599,
-0.2380995452,
-0.363535732,
-0.5015984774,
0.2459297925,
0.1915352046,
0.0858116373,
0.2453097403,
0.1705061495,
0.176407516,
0.1050432846,
0.1702939123,
-0.1885239035,
-0.6819538474,
0.2097894549,
-0.366894871,
-0.3407715559,
0.2215179354,
0.2399462759,
0.3687408566,
0.2215238065,
-0.5437682271,
-0.4829254746,
0.0638979152,
0.3006432056,
0.0436025895,
-0.0622708425,
0.1850145906,
-0.1984943151,
-0.0342264883,
0.0328603163,
-0.2459638268,
-0.0066250032,
-0.0505962707,
0.2106594145,
0.0088585177,
0.5591797233,
-0.0989434421,
0.6215458512,
0.2605271041,
0.150721848,
0.2617114782,
-0.082931675,
0.5427129269,
-0.2461128831,
-0.3602123559,
0.1052056178,
-0.0460622832,
-0.0004556283,
-0.1919692159,
0.0532438979,
0.2535902858,
-0.4288655519,
-0.2999520004,
-0.0718891174,
-0.246623829,
-0.1506142765,
-0.3064575493,
0.2230997831,
0.1785119921,
-0.0272356868,
-0.3175581992,
-0.0008880089,
0.1135708392,
0.6257213354,
0.0785615221,
0.3385027945,
-0.0886253193,
0.0184881259,
-0.5345076919,
0.3502252698,
0.0239806473,
0.351323247,
-0.3029440045,
0.166909501,
-0.0982817262,
-0.2031342536,
0.323338598,
-0.1132987365,
0.3804696202,
0.2436783463,
-0.296843797,
-0.4478214085,
-0.0134210885,
0.1166051775,
0.4236904085,
0.1696991622,
0.4783428907,
-0.3001614809,
-0.0806976855,
0.3393732011,
0.0312404428,
-0.0679634213,
0.2253329158,
-0.4263442457,
-0.327716738,
-0.2723507285,
0.0113529423,
0.0144175813,
0.2792472839,
0.2720509171,
-0.0461053327,
0.0420664251,
-0.0365746655,
-0.057944037,
0.0570965856,
-0.0204333756,
-0.1498523802,
-0.0222956184,
0.1602292955,
-0.0122593613,
0.0753860995,
0.6636024117,
-0.1050921753,
-0.7452945709,
0.1838395745,
0.2352869362,
0.0377058536,
0.1807249486,
-0.1101931036,
0.0243671425,
0.1129276454,
0.2119273543,
-0.206536606,
0.295463413,
0.3220750391,
0.2748258412,
-0.5185188651,
-0.4033500552,
0.1141644269,
-0.1231627837,
0.0138975484,
0.6102563739,
0.0729239807,
-0.097995162,
-0.0911060721,
-0.2625125945,
0.8014322519,
0.1077497303,
0.0352189802,
0.2205325365,
-0.4516552687,
0.3076812029,
-0.2766031027,
0.0682241991,
-0.1791361272,
-0.1370666176,
-0.0264756158,
-0.2208544463,
0.2129116505,
-0.3919968605,
0.0389651395,
0.3359131217,
-0.0504388846,
0.1348895133,
-0.0371990986,
0.2549857795,
-0.0469287336,
0.1728110462,
-0.3076121211,
0.2186885774,
-0.2575142086,
0.4027945995,
-0.1483770609,
-0.0600006171,
-0.1800129563,
-0.3471658528,
-0.2037284523,
-0.0187516976,
-0.3037422299,
0.2420017123,
0.0541455373,
-0.4063524306,
-0.1612279266,
0.0653158948,
0.1171379089,
0.1225615144,
-0.1437911838,
0.1162903756,
-0.4998993278,
-0.2479223162,
0.0034057624,
0.2551879585,
-0.0000044422,
-0.2653613985,
-0.153764829,
0.216549322,
0.0264527556,
-0.2988771796,
0.1712279171,
-0.0474448167,
0.1591478735,
-0.0804907829,
0.1629232019,
-0.3459297121,
-0.0557927079,
-0.1641680449,
0.1375117451,
-0.0120177893,
-0.1658347994,
-0.1779993922,
0.0643581674,
-0.2691390216,
0.007373455,
0.5254377127,
-0.2073256224,
-0.0476849228,
0.1944402307,
0.072764799,
-0.169039309,
-0.2242325097,
0.0260489415,
0.1053918004,
-0.3324163556,
0.1689246893,
-0.0222467557,
0.2153790593,
-0.1760996878,
0.2200068086,
0.3606183231,
-0.1468280405,
0.2638862729,
-0.6355929375,
-0.4202066064,
0.1236345842,
-0.2235510498,
0.0558530129,
0.0367497802,
0.0298619512,
-0.0029429032,
0.0562181957,
-0.3111594915,
-0.0031297803,
-0.3433091044,
-0.0687847883,
0.4049592018,
-0.2616896629,
0.3749804199,
0.0482537337,
0.1409948617,
-0.0792292878,
-0.4178664088,
-0.2253060788,
-0.150498271,
0.0857056975,
-0.2575441599,
-0.2317720056,
0.105248034,
-0.1326686293,
-0.0950295925,
0.0191965401,
0.0476062261,
0.217565462,
0.0994532704,
-0.0777723715,
-0.2042251825,
0.034495756,
0.0300160255,
0.2477891743,
0.210726127,
0.3791817427,
-0.0897609964,
0.1444933265,
-0.0051997048,
-0.1074912176,
-0.3947823942,
-0.0824235529,
0.0823744535,
-0.0742396936,
0.4947921336,
-0.1295217425,
0.0859073624,
-0.0868477598,
0.3686519861,
0.202297762,
-0.19579193,
0.0530992448,
-0.0280715507,
0.2037633955,
-0.1725739539,
-0.0147095406,
0.182863608,
0.0604689158,
-0.0761250332,
-0.0465239398,
-0.0993350446,
0.0698336735,
0.0347625688,
0.1187870055,
0.4359140992,
-0.1446976215,
0.1689931303,
-0.0179751609,
0.0297369789,
-0.024823945,
0.3096925914,
0.3383604586,
0.055917237,
0.3121260405,
-0.2445694655,
0.152961567,
0.0371774174,
0.1411418468,
-0.043113634,
-0.2420966327,
-0.1345998645,
0.0864429772,
-0.1773290485,
-0.0687391758,
-0.1583556384,
0.2703719735,
-0.2575266659,
-0.0976131558,
-0.1575702727,
0.006140159,
-0.0185668357,
-0.1117465571,
-0.0784194842,
-0.2440523803,
-0.1590815187,
-0.1592645794,
0.096771881,
-0.0267183073,
0.3203130066,
0.1086197868,
0.0314724557,
-0.3013311028,
-0.1342028975,
0.1011630222,
0.0171730071,
-0.1487470567,
0.4078501761,
0.2388396114,
0.1350660175,
0.0875003561,
0.3234546185,
0.6591109633,
0.1160070226,
-0.058302667,
0.2019231319,
0.0506801605,
-0.130192548,
0.0138171408,
0.1990472376,
0.1937868744,
-0.0418556929,
0.3244072795,
0.233747527,
-0.1486534625,
0.4397870302,
-0.1847920716,
-0.0949134082,
-0.2182827443,
0.4635775387,
-0.2508490682,
-0.0039013696,
-0.2708034515,
0.0243561585,
-0.4600652456,
-0.1297233701,
0.1242443174,
0.1218707114,
0.0725406706,
-0.2389404327,
0.095758386,
-0.1485882998,
0.4316083193,
0.4395944476,
0.3993543386,
-0.2779632211,
-0.1494971663,
-0.4341092408,
0.2266278714,
0.0198817216,
-0.1866454184,
0.0269563105,
0.0792765245,
-0.2777570486,
0.2329267263,
0.1703611463,
0.0403114483,
0.0131305372,
0.113384217,
-0.1710271388,
-0.069524087,
-0.0056447405,
0.042195797,
0.0026409938,
-0.2384571582,
0.1327734888,
-0.3347195387,
0.031006299,
-0.0662910044,
-0.0897781178,
0.264690876,
0.1665336341,
0.3076876104,
0.2030036896,
0.485160917,
0.0458934419,
-0.2792541981,
-0.2159506679,
-0.3196075857,
-0.0656995848,
0.1056213155,
-0.0647790283,
0.1801791638,
-0.159645319,
-0.2979738414,
-0.4564591646,
0.4931305349,
-0.1551965475,
-0.0172462724,
0.0678362325,
-0.0310281031,
0.1256198883,
0.0189492591,
0.1023061648,
0.0883119777,
0.1328030527,
0.2443818748,
-0.2844841778,
-0.1209947243,
0.5548478961,
-0.17404522,
-0.2860159278,
-0.0265501868,
0.3145867884,
0.1803198755,
-0.075773187,
-0.5487620831,
0.3636639118,
0.4252279103,
0.0229571927,
-0.2970434427,
0.4226586521,
-0.2262151092,
0.2698113322,
0.0146172913,
0.2950890064,
-0.1885435432,
-0.2224440873,
0.1329912692,
-0.1534581631
] |
https://github.com/huggingface/datasets/issues/3127 | datasets-cli: convertion of a tfds dataset to a huggingface one. | Hi,
the MNIST dataset is already available on the Hub. You can use it as follows:
```python
import datasets
dataset_dict = datasets.load_dataset("mnist")
```
As for the conversion of TFDS datasets to HF datasets, we will be working on it in the coming months, so stay tuned. | ### Discussed in https://github.com/huggingface/datasets/discussions/3079
<div type='discussions-op-text'>
<sup>Originally posted by **vitalyshalumov** October 14, 2021</sup>
I'm trying to convert a tfds dataset to a huggingface one.
I've tried:
1. datasets-cli convert --tfds_path ~/tensorflow_datasets/mnist/3.0.1/ --datasets_directory ~/.cache/huggingface/datasets/mnist/3.0.1/
2. datasets-cli convert --tfds_path ~/tensorflow_datasets/mnist/3.0.1/ --datasets_directory ~/.cache/huggingface/datasets/
and other permutations.
The script appears to be running and finishing without an error but when looking in the huggingface/datasets/ folder nothing is created.
</div> | 46 | datasets-cli: convertion of a tfds dataset to a huggingface one.
### Discussed in https://github.com/huggingface/datasets/discussions/3079
<div type='discussions-op-text'>
<sup>Originally posted by **vitalyshalumov** October 14, 2021</sup>
I'm trying to convert a tfds dataset to a huggingface one.
I've tried:
1. datasets-cli convert --tfds_path ~/tensorflow_datasets/mnist/3.0.1/ --datasets_directory ~/.cache/huggingface/datasets/mnist/3.0.1/
2. datasets-cli convert --tfds_path ~/tensorflow_datasets/mnist/3.0.1/ --datasets_directory ~/.cache/huggingface/datasets/
and other permutations.
The script appears to be running and finishing without an error but when looking in the huggingface/datasets/ folder nothing is created.
</div>
Hi,
the MNIST dataset is already available on the Hub. You can use it as follows:
```python
import datasets
dataset_dict = datasets.load_dataset("mnist")
```
As for the conversion of TFDS datasets to HF datasets, we will be working on it in the coming months, so stay tuned. | [
-0.1648913324,
-0.4112803638,
-0.0158713572,
0.0792162716,
0.266931802,
0.225569725,
-0.0300498419,
0.3266828954,
0.1026157737,
0.1285151541,
-0.4481951296,
-0.0443409681,
-0.2346507162,
0.2429739684,
0.2353371978,
-0.0526280217,
0.2293661535,
0.1147148013,
-0.2987787127,
-0.1758615375,
-0.1143739149,
0.4553712308,
0.1947537065,
-0.094360739,
-0.2140312195,
0.0632477775,
-0.2156207114,
0.3068081439,
-0.1974940002,
0.0785200149,
0.407473743,
0.1288555861,
0.3076045215,
0.9031054378,
-0.0001176619,
0.1035622656,
0.0770376176,
0.0183312614,
-0.1491826624,
-0.2649513483,
-0.0654088035,
-0.0583235174,
-0.0017227496,
0.1351430118,
-0.1704145521,
-0.0957548618,
-0.0429447778,
-0.2761206925,
0.2943454981,
0.3742787242,
0.1364399195,
0.6414173841,
0.1126431152,
-0.091820918,
-0.146025598,
0.3847144544,
-0.238007918,
0.2382901013,
-0.0169248264,
0.1123111024,
0.3870154917,
0.111459665,
-0.0422697999,
-0.2082802504,
0.6722182631,
0.0787079856,
-0.1185648069,
-0.3814942837,
0.177948758,
0.3222823441,
0.3145779073,
-0.54581815,
-0.3819338083,
-0.03226652,
-0.0107388506,
-0.0347257964,
0.1161962301,
0.0666058883,
-0.1783679426,
0.1975573897,
-0.2564902604,
-0.3320021331,
-0.1914516836,
0.0833560452,
-0.1894272268,
-0.0938346386,
-0.0842761248,
-0.04045479,
0.2743361294,
-0.2028791606,
-0.1018064469,
-0.2093823105,
0.1576105505,
0.1957503706,
-0.2910371721,
-0.2681078315,
-0.01566655,
0.228936553,
0.1728545874,
0.0753593296,
-0.2325066328,
-0.07994432,
-0.2544603944,
-0.0390395895,
-0.1685220003,
0.1191587076,
0.0093293376,
0.101929605,
0.2046998143,
0.1212196276,
0.0405921191,
0.1059448421,
-0.1957069039,
-0.2644937038,
-0.0974033475,
-0.2959906459,
0.2290277183,
-0.0804001987,
-0.0581061766,
-0.0319241099,
-0.0073811533,
0.117754221,
0.0679658204,
0.2833361626,
0.1381749511,
-0.0165098235,
0.2942261994,
0.2597624362,
-0.3386056125,
0.1279687881,
-0.2473294437,
0.2322494984,
-0.0785698965,
0.0952289179,
0.1278780699,
-0.3557144105,
-0.1348439455,
-0.0817312151,
0.239592284,
0.0665210932,
-0.0794439763,
0.2777224779,
0.1969358027,
0.4052304626,
0.0879948288,
0.1785388887,
0.35382846,
-0.2660948634,
-0.1469752938,
0.0170701537,
-0.1270170212,
-0.0388546251,
-0.3430982232,
0.0828506798,
-0.133464247,
-0.1012377068,
-0.4203057885,
0.1141124293,
0.0006749489,
0.0400149077,
0.104637526,
-0.1263055354,
-0.1290210336,
-0.1774505973,
0.4161355197,
0.5823616982,
-0.3970507383,
-0.0175362732,
0.0848491415,
-0.2861667573,
-0.2057556808,
0.2484474182,
0.0731187984,
0.0971921682,
-0.3245050609,
-0.0923123732,
-0.0034452914,
-0.5120362043,
-0.0317202061,
0.274456501,
-0.1969939023,
0.1183978245,
-0.1307956427,
0.0581692904,
-0.2474887073,
-0.1540414095,
-0.1155405492,
-0.2703347504,
-0.0714011118,
-0.1841676533,
-0.0988294557,
-0.1992492229,
0.0802318156,
-0.2128946483,
0.2160904557,
0.2891929448,
-0.0253713671,
0.1706587076,
0.1941295266,
-0.1411956251,
0.2589683235,
0.3458687961,
0.1944483221,
0.2842562795,
-0.0402890518,
-0.210718438,
-0.6065875292,
0.1452763975,
0.0855027288,
0.2286286205,
-0.1379566789,
-0.1419073492,
-0.2167518735,
0.0025008738,
-0.058370851,
0.0533461571,
0.0275817569,
-0.0392099358,
0.4835897088,
-0.0442923531,
-0.3477328718,
0.3699807227,
-0.1279631108,
0.3048416078,
-0.4012547135,
0.5816084146,
0.1548339427,
-0.0992615968,
-0.072476998,
0.2685661316,
-0.0283484235,
-0.2871651649,
0.0063509527,
0.3673808277,
-0.1132015586,
0.4100805521,
0.1847899109,
0.3856835067,
0.1985165775,
-0.1981124878,
0.0679021329,
-0.0253361836,
-0.0597927347,
-0.0255460385,
-0.178529948,
0.1148392782,
-0.0390424915,
0.3238584399,
0.1479390711,
0.0077468576,
-0.0478748791,
0.099077493,
-0.2169592679,
-0.1831819117,
0.0223231334,
-0.101593554,
0.2260502428,
0.0044142921,
-0.2912727594,
0.2283558697,
0.2206143737,
-0.2823572159,
-0.1105510518,
0.2119861096,
-0.149877876,
0.1052308008,
0.1299798191,
0.2943785489,
0.3469114304,
0.0727297664,
0.1985186934,
0.2922204435,
-0.084251523,
-0.0526980162,
0.1732631028,
0.0160455648,
0.2079776824,
-0.0086955866,
-0.0168529488,
-0.0105101708,
-0.3031795621,
0.1227689087,
-0.0858285502,
0.1738738716,
-0.4836605191,
-0.1099990457,
-0.3512426317,
-0.1739864796,
-0.1407673508,
-0.0475969017,
-0.3504054844,
-0.3079300225,
-0.2626383007,
0.3540435135,
0.2149426043,
-0.1545415372,
-0.0274496786,
-0.1332240701,
-0.1614823043,
-0.1979892403,
-0.4101575315,
-0.0187381431,
-0.2513021827,
-0.0172438119,
0.3406276703,
0.041813761,
0.259249568,
-0.3714255095,
0.2028079182,
-0.5838524103,
-0.303293705,
0.1039333716,
-0.3183482885,
0.0498383343,
0.2465476692,
0.4412375987,
-0.207701385,
-0.009906115,
0.1258375496,
-0.1980949193,
-0.1830413938,
0.0413799174,
-0.1689619869,
-0.157388702,
-0.0855486915,
-0.0762828737,
-0.3684202731,
-0.1856377572,
0.1232291386,
-0.1213670745,
-0.0203088317,
0.4174486697,
0.0696878582,
0.2105372548,
-0.2112542391,
-0.2251598239,
0.0087772645,
-0.4232056439,
0.3801832199,
-0.4478028715,
-0.4045418799,
0.2524512112,
0.1100744903,
0.2839269936,
-0.0728736967,
-0.3338085413,
-0.0901466683,
-0.3284908831,
0.2091329992,
-0.0214111824,
0.0600001588,
0.3643411696,
-0.0861563087,
0.0312415268,
-0.2290470302,
0.0844665915,
0.1416708827,
-0.0247931015,
0.2591266632,
0.0017636842,
0.2045702934,
-0.0286234543,
0.3668392599,
0.3739622235,
-0.1569568515,
0.2157030851,
-0.23986727,
0.6184400916,
-0.250461787,
-0.402635783,
0.1155278981,
0.1510550231,
0.0033967549,
0.2857957184,
0.2585473359,
0.3984295428,
-0.1499177516,
0.1112414226,
0.0340147652,
-0.2736644149,
-0.2929027081,
-0.0336504094,
0.0237356722,
0.1617452949,
-0.099701941,
-0.3284006119,
-0.1729522794,
0.2048941255,
0.8124601841,
0.2463397235,
0.4096395671,
-0.5529905558,
-0.1538811922,
-0.6555480957,
0.121759668,
0.0584892221,
0.067127414,
-0.2845779955,
0.102243185,
-0.002236967,
0.0546499677,
0.8857389092,
-0.1016474292,
-0.015410671,
0.2072827369,
-0.0018436533,
-0.5439738631,
0.1074571982,
0.0202205963,
0.045349218,
0.0825386792,
0.6745743752,
-0.1519886702,
-0.4054004848,
0.0195253715,
0.1986320466,
-0.0232524723,
-0.2081995457,
-0.1317971051,
-0.5114307404,
-0.1470278352,
-0.4115783274,
0.2316927016,
0.2320348024,
0.0555729493,
-0.1716564298,
0.2157432288,
-0.1844642907,
0.425611943,
-0.1033290625,
0.1641252488,
0.4772843421,
0.1827208847,
0.0633951128,
0.1688525975,
0.3399085701,
0.172171995,
-0.3272789121,
-0.3148305416,
0.1449816972,
0.2832846344,
0.3549210727,
0.0972496867,
-0.2284151614,
-0.0780750141,
0.1184712052,
0.2527561784,
-0.2963855267,
0.2337553054,
0.1558586508,
0.2152732909,
-0.3605362475,
-0.2772944272,
0.391377002,
0.1664704382,
0.2769532204,
0.193616569,
0.7790152431,
-0.2651581764,
-0.1334394068,
-0.0199601632,
0.8729636073,
-0.3522517979,
0.107058771,
0.547606349,
-0.1404729187,
0.8271952868,
-0.1004894376,
-0.1759710163,
-0.1671719402,
-0.1807522625,
-0.0349160172,
-0.032704778,
0.1580635607,
0.0791837126,
-0.1028568223,
0.1457651109,
-0.1809942126,
0.2579670548,
0.1404638439,
0.356490761,
-0.1970793158,
-0.3228078187,
-0.101783514,
0.2253252119,
0.0608714148,
0.5162670016,
-0.0342297778,
-0.0596274398,
-0.4057713747,
0.2840021849,
-0.1334674656,
-0.0332261883,
-0.1610028297,
-0.009373703,
0.0442274176,
-0.1406724602,
0.1305191815,
0.3507813811,
0.7165851593,
0.0987496004,
-0.394521147,
0.0721951723,
-0.0494046062,
-0.022596987,
-0.0474023707,
-0.2167047262,
0.3152312338,
-0.023467904,
-0.0395592712,
-0.329621762,
0.1035233736,
-0.1004211679,
-0.1903733611,
-0.5277954936,
-0.000095984,
-0.1567363739,
-0.1016762331,
0.1192591786,
0.0078164339,
0.0877586603,
0.0558603965,
-0.0249134135,
0.0199709516,
-0.0690563396,
-0.0872040242,
-0.1623392403,
0.0683071688,
0.377674669,
-0.0496963561,
-0.318364203,
0.2703747451,
0.4798363149,
-0.0734629855,
-0.1327756792,
0.0519968905,
0.3826391399,
-0.2320296019,
0.2824520171,
0.1346121281,
0.1177281439,
0.0263570901,
0.2768913805,
0.093306832,
-0.2585080564,
-0.0053284806,
-0.1052046418,
-0.4838732481,
0.1619394869,
-0.0733467117,
0.2527998686,
0.1013920978,
0.4563554525,
0.0290590934,
-0.2801478505,
-0.265640676,
-0.0399882495,
0.0503441766,
-0.2560985684,
0.3976734281,
-0.1614780128,
0.1576218158,
-0.2245979458,
-0.0164446421,
0.0420933738,
-0.2086855322,
-0.1427257806,
-0.1469845176,
0.139777109,
0.1049775109,
0.0159776807,
0.3956925869,
-0.1025884375,
-0.3561383486,
-0.3028922677,
0.211613819,
0.3817408979,
-0.1081294715,
-0.0177673139,
0.1409520656,
0.009109661,
0.0034152772,
-0.0800094232,
0.3941203952,
0.1979287565,
-0.2175474465,
0.2097669542,
0.0070527573,
-0.0858114436,
-0.2420292497,
0.278362304,
0.1530476809,
-0.1297290325,
0.2215771526,
-0.2003254741,
-0.0946649164,
-0.0290666558,
0.5260831714,
-0.0421994925,
-0.090661183,
0.2299761921,
0.2213301957,
0.0311200544,
-0.1129679903,
0.1280644983,
0.21564053,
-0.1281168759,
-0.0323924236,
0.2112833112,
0.0061277682,
0.1759688556,
0.0592789128,
-0.0361830853,
0.4931082129,
-0.2630779147,
0.1726174057,
0.3899959028,
-0.0158242602,
0.1523118466,
0.1804917902,
0.2017352134,
-0.0790345073,
0.0774402991,
-0.1034150943,
0.3451730311,
-0.1224761158,
0.187477231,
0.5461788177,
-0.3008280694,
-0.1405775696,
-0.0470947549,
-0.0503557399,
0.191798076,
-0.2713778019,
0.4695930183,
-0.3589897752,
-0.2290048003,
-0.1818942577,
0.4885362685,
-0.1945126653,
-0.1707619131,
-0.0504940301,
-0.1463042945,
0.0181397125,
-0.1112890989,
-0.0253055617,
-0.475517422,
-0.0504549704,
0.0606394,
0.1046953574,
0.062866129,
-0.220521152,
-0.0051336661,
0.0805695876,
0.1109325588,
0.1018187627,
0.1266520768,
-0.1845293045,
-0.1241380945,
0.177571699,
0.3304781318,
0.2054998279,
0.2661442757,
0.3023982346,
0.0954847038,
-0.0979833826,
0.2742986977,
0.1622088552,
-0.1270263791,
0.0560709462,
0.1772194803,
0.0913153514,
-0.0453929938,
-0.4425319433,
-0.0324474908,
0.46254915,
-0.2490515709,
0.4271833003,
-0.3934539258,
0.020423919,
-0.2285897732,
0.1195469275,
-0.5784985423,
-0.0690024048,
0.3452821374,
-0.1126508191,
-0.0495699123,
-0.2407915443,
0.0377443172,
0.0232487582,
0.4155006111,
0.2173595279,
0.0280020703,
-0.1048496589,
-0.2018280923,
-0.6268125772,
-0.1170858443,
0.2290300429,
0.0103244819,
-0.1461541802,
0.1208203733,
-0.0171706509,
-0.1726184338,
0.1543643922,
-0.1785601526,
0.0169182755,
-0.0461535677,
0.2034122348,
-0.1349229068,
-0.2490537018,
0.0117397308,
0.1045549661,
0.0052210935,
0.227393046,
0.0342646874,
-0.112405315,
-0.1747626662,
0.4540980756,
0.1536455005,
-0.3832306266,
0.1632647961,
0.1330377311,
0.3412798345,
-0.0133776357,
-0.246543631,
-0.2334419191,
0.0110928686,
-0.3687683642,
0.2334664315,
-0.4015309215,
0.2869847119,
-0.3023827076,
-0.3731006384,
-0.2544800639,
-0.1540338546,
0.2922475636,
-0.2150026709,
-0.254632473,
0.2242311686,
-0.2207433581,
0.0793726295,
0.561162889,
0.4449025691,
-0.1296159625,
0.3177477419,
-0.2669893801,
-0.197503075,
0.6403949261,
-0.2766676843,
-0.2105964124,
0.1743892878,
0.0997451544,
-0.0949942991,
-0.4426248074,
-0.3157429695,
-0.0090683466,
0.0661942288,
-0.0098564029,
0.0316852778,
0.4164588749,
-0.1652233005,
0.0503522381,
-0.0365290418,
0.1925312132,
0.1990739852,
-0.1209782287,
0.2488500327,
-0.1264849007
] |
https://github.com/huggingface/datasets/issues/3126 | "arabic_billion_words" dataset does not create the full dataset | Thanks for reporting, @vitalyshalumov.
Apparently the script to parse the data has a bug, and does not generate the entire dataset.
I'm fixing it. | ## Describe the bug
When running:
raw_dataset = load_dataset('arabic_billion_words','Alittihad')
the correct dataset file is pulled from the url.
But, the generated dataset includes just a small portion of the data included in the file.
This is true for all other portions of the "arabic_billion_words" dataset ('Almasryalyoum',.....)
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
raw_dataset = load_dataset('arabic_billion_words','Alittihad')
#The screen message
Downloading and preparing dataset arabic_billion_words/Alittihad (download: 332.13 MiB, generated: 20.62 MiB, post-processed: Unknown size, total: 352.74 MiB)
## Expected results
over 100K sentences
## Actual results
only 11K sentences
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Linux-5.8.0-63-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 24 | "arabic_billion_words" dataset does not create the full dataset
## Describe the bug
When running:
raw_dataset = load_dataset('arabic_billion_words','Alittihad')
the correct dataset file is pulled from the url.
But, the generated dataset includes just a small portion of the data included in the file.
This is true for all other portions of the "arabic_billion_words" dataset ('Almasryalyoum',.....)
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
raw_dataset = load_dataset('arabic_billion_words','Alittihad')
#The screen message
Downloading and preparing dataset arabic_billion_words/Alittihad (download: 332.13 MiB, generated: 20.62 MiB, post-processed: Unknown size, total: 352.74 MiB)
## Expected results
over 100K sentences
## Actual results
only 11K sentences
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Linux-5.8.0-63-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 4.0.1
Thanks for reporting, @vitalyshalumov.
Apparently the script to parse the data has a bug, and does not generate the entire dataset.
I'm fixing it. | [
-0.028614644,
0.0881006867,
-0.039816007,
0.4470804632,
-0.0541644618,
0.1820729822,
0.0881036222,
0.4025402367,
-0.0948741212,
0.016380338,
0.2197008282,
-0.1283022165,
0.2180960923,
0.1541102678,
0.0881133527,
0.0227925815,
0.1452276111,
-0.0231749788,
-0.1374328285,
-0.1756129414,
-0.2381923944,
0.2698272467,
-0.1992139965,
-0.2039988041,
-0.4456401467,
0.1676327288,
-0.1632733941,
-0.0635798797,
-0.1843620539,
-0.2578664422,
0.0919584855,
-0.2433370799,
0.0849189684,
0.4776033461,
-0.0001088292,
-0.2206328511,
0.502348125,
-0.1118985564,
-0.4034661651,
-0.3848635554,
0.0355657563,
-0.3234834969,
0.0307379309,
-0.2087689191,
0.0238545164,
-0.0831145272,
0.0029258993,
-0.1123989895,
0.2253302187,
0.342549026,
0.2435445338,
-0.1121715978,
0.2035401613,
0.0319856554,
0.1550088823,
0.0470184423,
-0.1615525037,
0.0871605203,
0.1023733467,
0.0703573748,
-0.131088078,
0.2172885388,
0.0001451917,
0.0416008644,
0.1334562004,
0.12789765,
-0.1598105729,
-0.6229289174,
0.4248594344,
0.2747252584,
0.3804438114,
-0.2217157632,
-0.4288482666,
-0.2201075554,
-0.0231264923,
-0.1542039961,
0.1516388804,
0.6916109324,
-0.2772277892,
0.2186615169,
-0.1506364495,
-0.0398953371,
-0.2197810411,
0.1350178123,
-0.3431136906,
0.2500344217,
-0.1061585099,
-0.0388702378,
-0.0151682543,
-0.0021980035,
0.1005701572,
-0.4978498816,
-0.0422842726,
0.1698681265,
-0.243150726,
0.1753532141,
-0.1003270224,
0.06608174,
0.491804868,
-0.1318804324,
0.0445234291,
-0.0373536497,
0.0255124196,
0.0239351671,
0.1401288062,
0.0411048569,
0.070148237,
0.0033501163,
0.0986256376,
0.059279725,
-0.0515251346,
0.0176418573,
-0.0161442123,
0.1974158287,
-0.1515598148,
-0.2380444109,
0.1054730937,
-0.1540675759,
-0.2276157439,
0.3563837111,
-0.3293886781,
-0.153077811,
-0.3679718077,
0.1514059901,
-0.2379039079,
0.1093182713,
0.132076636,
0.3215911686,
-0.2217434198,
-0.4376677871,
-0.1450056583,
-0.1139064506,
-0.1167905256,
0.1207699254,
0.3398094475,
-0.0325788967,
0.3868948817,
0.0024005026,
0.0531717949,
-0.2295835465,
0.1267260909,
-0.3613072336,
0.1805508733,
0.2296863347,
0.3778505325,
0.3998399079,
-0.119091846,
-0.1038644016,
0.0736527219,
0.5755426884,
-0.0727930367,
-0.0815559998,
-0.1748431176,
0.2306028008,
-0.2592102885,
-0.0234383326,
0.0235202778,
0.5305868983,
0.4395790994,
0.2396567464,
-0.1242128462,
-0.1348511875,
-0.1769695133,
-0.197535485,
0.3434279263,
0.4946725965,
-0.4158703387,
-0.0487564355,
-0.0341165923,
0.2067746818,
0.3079302013,
0.1762383729,
0.0381443091,
0.3497666717,
-0.1433610022,
0.2342194319,
-0.0185388476,
0.1762319803,
-0.368445605,
0.476264447,
0.1337177604,
0.165150851,
0.1558812559,
-0.0755712837,
0.2125989348,
0.1379377395,
0.339473784,
0.5168280602,
0.0178825743,
-0.0830449611,
-0.3762102425,
-0.1958617866,
0.0544987135,
0.0318194069,
0.1419246346,
0.1507173479,
0.0055884789,
-0.1335391253,
0.5737941861,
0.058424443,
0.3523133397,
0.1516793817,
-0.1481350362,
0.0579711422,
0.1505539864,
-0.0581484027,
-0.0713477507,
0.0759717003,
0.0030593269,
0.3061103523,
-0.3237093985,
-0.0573883653,
-0.3818063736,
-0.0373030901,
-0.0686786324,
-0.2595747411,
0.0993634537,
0.1658285111,
0.0236059576,
0.1869387627,
0.0280444361,
0.0725915581,
-0.1516503245,
0.1148672551,
-0.4662271738,
0.2030526549,
-0.0833291933,
-0.1655614525,
0.1491262466,
0.012990417,
0.034568239,
-0.0395529307,
-0.1300479174,
0.1855140626,
-0.0949672386,
-0.0810460746,
-0.105729863,
-0.0021823407,
0.1308676004,
-0.2438004613,
0.2065781504,
0.2460824698,
0.1862363368,
-0.0674533099,
0.0126617104,
0.1819054633,
0.1060352772,
0.2599341571,
0.0500393286,
-0.1356126964,
0.3852486014,
-0.1078272611,
0.1342314035,
-0.1632529646,
0.3109803796,
-0.0300229397,
0.1672321856,
0.0661251172,
-0.0720106885,
0.0530028939,
0.3902862668,
-0.324649781,
0.0707299337,
0.3767686486,
-0.3420109153,
-0.2788616717,
-0.185168162,
0.1887776405,
0.2930834293,
0.3172627985,
0.2019100785,
0.0761115924,
0.1780346632,
-0.3230365813,
0.2173181772,
0.1017626598,
-0.0395573452,
0.2606355846,
0.1906796247,
-0.0210183598,
-0.3817096949,
0.1521877199,
0.0480210483,
0.2777327597,
-0.1173460633,
0.1095084101,
0.0457072482,
-0.0662521496,
-0.0528181642,
-0.0900238007,
-0.182106033,
-0.2297855765,
-0.0663713068,
0.0785833448,
0.0323550738,
-0.0557911694,
-0.2609689236,
-0.0103503838,
0.0871910974,
-0.1272554547,
-0.0935619846,
-0.0499483645,
-0.5044426322,
0.1436322331,
0.1440045387,
-0.0655110106,
0.0705013201,
-0.297375232,
-0.145430252,
-0.1476976424,
-0.0592225492,
0.2702582777,
-0.1891829222,
0.3846007884,
-0.25771299,
0.1871438771,
-0.0600919612,
0.0586706065,
0.1227957904,
-0.0630927682,
-0.219605729,
0.1304500401,
-0.0750956386,
-0.0418697,
0.0851370022,
-0.5043627024,
-0.1832009703,
-0.1847125441,
0.0074736858,
0.1847724468,
0.2795473933,
-0.0099894674,
0.1514582485,
-0.1435372084,
-0.1225184873,
-0.0658694133,
-0.2603882849,
-0.3574770093,
0.4084274471,
-0.1438039988,
-0.5462392569,
0.0685862526,
-0.1858552247,
-0.0138559863,
0.1752383709,
-0.6390582919,
0.3277483582,
-0.5411497355,
0.1657116115,
-0.2699120939,
0.159008041,
0.1299920976,
-0.263771832,
-0.0036692629,
-0.2388722897,
-0.155626297,
-0.0077239289,
-0.0571243353,
0.4045511484,
-0.0376786962,
0.2968531549,
0.1221713349,
0.3267686665,
0.2896202505,
0.1191212684,
0.3440842927,
-0.0147239408,
0.190551728,
-0.3405967057,
-0.1005735099,
0.0690074489,
-0.105169259,
-0.0251052901,
0.5903277993,
0.1672201306,
-0.1180900633,
-0.1378946453,
-0.122433953,
-0.6567975879,
-0.2006179094,
0.0893618986,
-0.1412488371,
0.2504741549,
0.0791011453,
0.0717731938,
0.0813651681,
-0.2583023608,
-0.1916869134,
-0.1229966283,
0.2818465829,
0.0819303617,
-0.0539375544,
0.1528098732,
-0.5744155645,
0.1966780871,
0.1245033965,
0.3303899765,
0.0113317929,
-0.1126753464,
0.1976993233,
0.0428849645,
0.6503540277,
-0.0536692664,
0.0145416521,
-0.0638632849,
0.0756348819,
-0.4449249804,
0.1450484693,
-0.2127001137,
0.1400360465,
0.1961998194,
0.0232196935,
-0.4445066452,
0.2192580253,
0.1913670599,
0.6272284389,
-0.0944671631,
-0.2022221386,
-0.3982675374,
-0.4462717772,
-0.2950925231,
-0.0909682587,
0.2464117259,
0.1847622693,
0.1101037562,
-0.1011412591,
0.2007645369,
-0.2244165093,
0.0871992409,
0.0726933852,
0.1935172826,
-0.1631418318,
0.4191613793,
-0.107709147,
-0.2551310956,
0.2001816928,
0.6527547836,
0.0260281079,
-0.1248037219,
0.1308936775,
-0.2956180573,
0.2821426392,
0.1918399781,
-0.0346248522,
-0.1109320149,
0.0524060242,
0.056275934,
-0.0173316039,
-0.035470631,
0.2143837363,
-0.0406545587,
-0.4403271377,
-0.5399326682,
0.3059525788,
-0.0907145888,
0.0624970384,
0.2258767635,
-0.1716282517,
-0.3005748987,
0.5687295794,
-0.2850726843,
0.8666759729,
0.1137408912,
0.310656637,
-0.1458974183,
0.0772059038,
0.3072288334,
-0.1156323031,
0.1735479534,
-0.3231088817,
-0.1810547411,
0.0581234396,
0.0015121349,
0.0412541926,
0.1856062859,
-0.0132545754,
0.1887440532,
-0.1394612193,
0.041579932,
0.3189603686,
0.3601915836,
-0.3297882974,
-0.1689877361,
-0.0796189606,
0.1708656698,
-0.0179448556,
0.1525522321,
0.037284106,
0.0657100305,
-0.332657516,
-0.1742227972,
-0.3073636293,
0.2026333511,
-0.2240184695,
-0.096370168,
-0.2001846135,
-0.3015659451,
-0.0806295201,
0.022365408,
0.0593044534,
0.3818366528,
-0.1121137887,
0.2846922874,
-0.3117927015,
0.0066575957,
0.2215219587,
-0.1914630681,
0.1406797171,
-0.1444653869,
-0.2661675513,
-0.0824695081,
0.0793798268,
0.0846266747,
-0.3170853555,
-0.052237615,
0.0936915576,
-0.2536762357,
-0.2511364818,
-0.0732791722,
-0.0511627793,
-0.2213266045,
0.1832064986,
0.1604536027,
-0.2148044109,
0.2090096027,
-0.0832552239,
-0.4270056784,
-0.3878554404,
0.2430927008,
0.3384971321,
0.0353587978,
0.3817620575,
0.2787232101,
-0.0139543712,
-0.0969554856,
0.1591970623,
-0.100023903,
-0.5139089227,
0.1086871549,
-0.0549318194,
0.1292296052,
-0.278426677,
0.1702671349,
0.063072823,
-0.0246456694,
-0.0028346507,
-0.4409543276,
-0.0251464695,
0.1242412701,
0.0765646994,
-0.1744482368,
0.1756325513,
0.2457081974,
0.2962300479,
0.1631898731,
-0.3245439827,
0.0299326386,
0.1147185117,
0.2929874957,
-0.1484102309,
0.0118678873,
0.1438968331,
-0.057538677,
0.1258969605,
0.2831124961,
0.1260345876,
-0.2901318371,
-0.2015150934,
0.1343758702,
0.256994009,
-0.0512500703,
-0.0495892391,
-0.0996926501,
-0.2052275836,
-0.2808545828,
0.1257262826,
0.1882314831,
0.008966486,
0.0927104652,
0.2613757849,
0.1217000633,
-0.2330723703,
-0.0589651912,
-0.3929057419,
0.3282006681,
0.1759373397,
0.0977005735,
0.2974278331,
0.0683785155,
-0.2338868827,
-0.1039033532,
-0.1543720812,
0.2210298032,
0.2404410839,
-0.2735642791,
0.091758348,
0.0412583016,
0.3440235555,
0.3723303974,
-0.1401679665,
-0.1840541959,
0.2594270706,
0.2693421841,
-0.3714346588,
-0.0893709362,
0.0241722073,
-0.3682496548,
0.0182744656,
0.2174459249,
0.1403412968,
-0.2991620302,
-0.4637454748,
-0.0390482992,
0.393576771,
0.1737021655,
0.064924784,
0.5149943233,
0.0187924765,
0.2598958611,
0.0634658933,
-0.0507740229,
0.03908512,
0.6993775368,
0.1240014955,
0.4351387322,
0.3292226493,
0.0005604951,
-0.1551170051,
-0.2175976634,
0.2276373506,
0.1212256253,
-0.0856439695,
0.146379739,
-0.0214932207,
0.0226436555,
0.1119150743,
0.0443407297,
-0.3780815303,
-0.0827320069,
0.1173379272,
0.0116926413,
-0.0465240628,
-0.2838430107,
-0.058166191,
0.0009863741,
0.0043430021,
-0.348757267,
0.1585960388,
0.1172302738,
-0.3719833493,
-0.324091047,
0.0037630759,
-0.0524303205,
-0.0361906849,
-0.3464979529,
0.2784417272,
0.1974601895,
-0.0767202899,
-0.0059461761,
0.2529855072,
0.4636718035,
0.3674580455,
0.0491198078,
0.0050356388,
-0.1515440196,
-0.0378194451,
-0.2384050488,
0.518089056,
0.3721359968,
0.2176862806,
0.1733235866,
0.1364273578,
-0.2656380534,
0.0506574102,
0.4584872425,
-0.0652250648,
-0.3544962704,
0.1321768612,
-0.1947876662,
-0.2687057853,
-0.2901718616,
-0.0350352414,
-0.6806454062,
-0.0636479855,
0.342364043,
-0.2924937308,
0.1057055891,
-0.1775467992,
0.0986142606,
-0.1712164581,
0.3322941959,
0.3186485469,
0.1433198452,
-0.3025328219,
-0.1262787282,
-0.5364078879,
0.253549993,
-0.3923054636,
0.2696170211,
-0.1227318645,
0.20699054,
-0.014465169,
0.2646088004,
-0.0490025952,
0.4922345281,
-0.2963719666,
0.1027607396,
-0.2874927521,
-0.3787783384,
-0.154571861,
0.3839421272,
-0.3250912428,
-0.2747263014,
0.1759943515,
-0.3865080774,
0.0945179015,
-0.0353508182,
-0.3759869039,
0.2484090626,
0.0293053333,
0.440648526,
0.4894831181,
0.3358666897,
-0.2975955606,
-0.1566546261,
-0.2243528068,
-0.0659800619,
-0.1927599907,
0.5073258281,
0.1569377184,
0.1238669232,
-0.0440484956,
-0.1739032418,
-0.0570692755,
0.3932684362,
0.0016134549,
-0.167778179,
-0.1723548919,
0.0035091906,
-0.0940611288,
0.0039401324,
0.0572621077,
0.3523907959,
-0.1947086602,
0.0485407785,
-0.0340195261,
-0.4225319922,
0.2718579769,
-0.4050715566,
-0.3575205207,
-0.2036144584,
0.2020831406,
0.2677167654,
0.0147826541,
-0.2304418236,
0.2220669687,
0.4236550033,
0.119900018,
-0.1141762361,
0.2314541489,
-0.3078662157,
0.0438150242,
-0.0125641376,
0.3813262582,
0.196334675,
-0.5170100927,
0.1512332857,
-0.245440945
] |
https://github.com/huggingface/datasets/issues/3123 | Segmentation fault when loading datasets from file | Hi ! I created an issue on Arrow's JIRA after making a minimum reproducible example
https://issues.apache.org/jira/browse/ARROW-14439
```python
import io
import pyarrow.json as paj
batch = b'{"a": [], "b": 1}\n{"b": 1}'
block_size = 12
paj.read_json(
io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
)
```
I don't see a way to workaround this properly now without hurting the performance of the JSON loader significantly though | ## Describe the bug
Custom dataset loading sometimes segfaults and kills the process if chunks contain a variety of features/
## Steps to reproduce the bug
Download an example file:
```
wget https://gist.githubusercontent.com/TevenLeScao/11e2184394b3fa47d693de2550942c6b/raw/4232704d08fbfcaf93e5b51def9e5051507651ad/tiny_kelm.jsonl
```
Then in Python:
```
import datasets
tiny_kelm = datasets.load_dataset("json", data_files="tiny_kelm.jsonl", chunksize=100000)
```
## Expected results
a `tiny_kelm` functional dataset
## Actual results
β οΈ `Segmentation fault (core dumped)` β οΈ
## Environment info
- `datasets` version: 1.14.0
- Platform: Linux-5.11.0-38-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 5.0.0 | 58 | Segmentation fault when loading datasets from file
## Describe the bug
Custom dataset loading sometimes segfaults and kills the process if chunks contain a variety of features/
## Steps to reproduce the bug
Download an example file:
```
wget https://gist.githubusercontent.com/TevenLeScao/11e2184394b3fa47d693de2550942c6b/raw/4232704d08fbfcaf93e5b51def9e5051507651ad/tiny_kelm.jsonl
```
Then in Python:
```
import datasets
tiny_kelm = datasets.load_dataset("json", data_files="tiny_kelm.jsonl", chunksize=100000)
```
## Expected results
a `tiny_kelm` functional dataset
## Actual results
β οΈ `Segmentation fault (core dumped)` β οΈ
## Environment info
- `datasets` version: 1.14.0
- Platform: Linux-5.11.0-38-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 5.0.0
Hi ! I created an issue on Arrow's JIRA after making a minimum reproducible example
https://issues.apache.org/jira/browse/ARROW-14439
```python
import io
import pyarrow.json as paj
batch = b'{"a": [], "b": 1}\n{"b": 1}'
block_size = 12
paj.read_json(
io.BytesIO(batch), read_options=paj.ReadOptions(block_size=block_size)
)
```
I don't see a way to workaround this properly now without hurting the performance of the JSON loader significantly though | [
-0.221606046,
0.0462876186,
-0.0461312346,
0.3980239332,
0.2773248553,
0.1302967519,
0.400708884,
0.4724467397,
-0.2625967264,
-0.0488691367,
0.0218499918,
0.5417176485,
-0.0916597918,
-0.1903084815,
-0.0640659928,
-0.1771654785,
0.0981779993,
0.0973746106,
-0.0141672334,
-0.0125537412,
-0.2562195659,
-0.0560520552,
-0.110239014,
0.084938176,
-0.1556878388,
0.0115971873,
0.1452109367,
0.387940079,
-0.0625494272,
-0.5099859834,
0.2821141183,
-0.2407678217,
0.0446116328,
0.2868831754,
-0.0001123592,
0.1390264779,
0.4759358466,
0.0227093063,
-0.2469409257,
0.264526993,
-0.2352921069,
-0.1739484519,
0.04183653,
-0.2738322914,
0.1732011586,
-0.2128401399,
-0.2064063698,
-0.027791502,
0.4520409107,
0.2071412206,
0.1630881429,
0.0785674974,
-0.1414089203,
0.1519344598,
0.5740488172,
0.2817719877,
-0.0905648544,
0.4997974336,
0.0421377011,
-0.0751273334,
-0.2555825412,
0.1747103781,
-0.0596404821,
-0.0509760715,
0.0880904868,
-0.1018653065,
-0.1891221106,
-0.2500592768,
0.0684956983,
0.348677963,
0.2594338953,
-0.2350413203,
-0.2598730624,
-0.2506489456,
-0.0998474211,
-0.4134950936,
0.1293163896,
0.2884500623,
-0.1790690422,
0.0971408412,
0.2144643664,
0.0861798599,
-0.2454947233,
0.0177510232,
0.0249227174,
0.355404079,
0.166478157,
0.0705150291,
0.0180654116,
-0.2608333826,
-0.1484972984,
0.213300094,
-0.5500566959,
0.2827173471,
-0.2968091965,
0.0191071499,
-0.0657925978,
-0.1952114552,
0.3904779553,
0.2183546275,
0.3374666572,
0.0997835621,
0.2069178075,
0.0194740985,
0.4279439449,
-0.0438199714,
-0.1440996081,
0.4070789218,
0.138033092,
0.1287361085,
-0.2121905088,
0.0739369392,
-0.051137168,
-0.1884663701,
0.239991039,
-0.0627128929,
-0.0172544643,
-0.1591177881,
-0.2573587894,
0.1316411495,
-0.5078760982,
0.0057504578,
-0.0103547545,
0.2992483974,
0.0306510869,
0.1430560499,
-0.2126277387,
0.1253630221,
-0.2801524997,
-0.1391835958,
-0.1244762316,
-0.0811834633,
-0.2614843249,
-0.0889933333,
0.1668788642,
-0.2727864683,
0.3856735826,
-0.0384647027,
-0.1798027903,
-0.2193136513,
-0.3691851199,
-0.2453141361,
-0.281958729,
0.2218998671,
-0.2575139105,
0.0152651928,
-0.034151122,
0.1473244727,
-0.0739357397,
0.1324347258,
-0.2381282598,
-0.2341753095,
0.1409043819,
0.1954626143,
-0.2478667051,
0.0903604552,
0.0337653384,
-0.0754917711,
0.1685121953,
-0.3441915214,
0.069718346,
-0.0952545255,
0.1113583222,
-0.3139527142,
0.0554396622,
0.338927567,
-0.572888732,
-0.2156764716,
-0.2238032967,
-0.0550120249,
0.2022037208,
0.3335136175,
-0.1161199957,
0.4219342172,
-0.1977716237,
0.466054529,
0.5630308986,
-0.0010423735,
-0.5784205198,
0.3557956219,
-0.2032340318,
0.0704932436,
0.0196035039,
0.2035707831,
0.3436392844,
-0.0336901434,
0.0538895242,
0.542245388,
0.0069928784,
0.1079376563,
-0.2757099867,
-0.0330380388,
-0.2924933732,
0.3397631645,
0.0080731949,
-0.2369639874,
0.3083425462,
-0.1700803638,
0.2838052213,
-0.1287003756,
0.1103430912,
0.2882902026,
0.12343622,
-0.3386014998,
0.1912814975,
-0.1444411874,
-0.3866169155,
0.2047243267,
-0.2137301117,
-0.0900968611,
-0.1573766172,
0.0637635291,
-0.3672558069,
0.1882308424,
-0.179655239,
-0.0505044498,
0.061600741,
-0.1237852424,
-0.1436088383,
0.049667187,
-0.1734348834,
-0.0068401969,
0.0666730851,
0.2822470367,
-0.118387498,
0.3455170691,
0.1098545268,
-0.3701758087,
0.0344968513,
0.268546015,
0.0246437564,
-0.2113904059,
-0.1952695996,
0.2861357629,
0.2696337104,
0.3125640452,
-0.2642025054,
-0.1232758164,
0.0994485542,
-0.1385980099,
0.0744261295,
0.2112017423,
0.1333166957,
-0.0914145857,
-0.0424797647,
0.5776668191,
-0.1883707494,
0.1782929003,
0.0071956846,
-0.1034139097,
0.2388170511,
-0.104079321,
-0.0587427691,
-0.2408675402,
0.2845827639,
0.0319572054,
0.1298462749,
0.3460409939,
-0.4589183629,
-0.2158201188,
0.4508639276,
-0.0563560799,
0.0936530083,
0.164214313,
-0.3932669461,
-0.0102758789,
0.1970407367,
0.1955841184,
0.2559328675,
0.0823426098,
-0.1792045683,
-0.0600141175,
0.2606875002,
-0.0606076606,
0.1187148392,
0.1648443341,
0.711681664,
0.4595624208,
0.1783028692,
-0.0091599934,
-0.1337962002,
-0.3248575926,
-0.0982476622,
0.1129501909,
-0.3129496276,
0.1563327014,
-0.1185370758,
-0.1944895089,
-0.203553319,
-0.2847202122,
-0.1690161824,
-0.2733289301,
-0.0243718736,
-0.0352148786,
-0.3120145202,
0.096150063,
-0.3051745892,
0.1072428972,
0.2588107586,
-0.3611755073,
-0.1390076727,
-0.2868053913,
-0.3106592894,
0.0600664429,
0.3441761136,
0.2264540792,
-0.0389863849,
-0.0205796827,
-0.0758689791,
0.0657648146,
0.0167173408,
0.0827549621,
0.0130465478,
0.309384793,
0.1217027158,
0.0808955133,
-0.0338231213,
-0.3260700405,
0.1601103842,
0.0035953925,
-0.289424032,
0.4521144331,
-0.0690268502,
0.3773836493,
-0.1344537735,
-0.2433422506,
0.0515746549,
-0.4230126739,
0.3029528856,
0.2432290167,
0.1131564751,
0.0833000094,
0.2293304652,
-0.0727690607,
0.0639882237,
-0.0832018554,
0.2250121087,
-0.0202422366,
0.3274053633,
-0.2005009353,
-0.1576887816,
-0.0501234755,
-0.2484265566,
0.3035385609,
0.1735505611,
-0.5167225003,
0.4446374178,
-0.0456957258,
0.2214259505,
-0.2998893559,
-0.3068344295,
-0.1103229597,
0.0814445093,
0.0200822856,
-0.0290865377,
0.1139625832,
-0.0569639169,
-0.0202092901,
0.1185987517,
-0.0370286554,
0.7219756842,
0.0483335257,
0.8045208454,
0.0409949869,
-0.0692869723,
0.3652349114,
0.0598135218,
-0.0528411753,
-0.2030091882,
-0.1332764179,
0.2159007639,
-0.126271978,
-0.3715877533,
0.1208007112,
0.0966314375,
-0.3199978471,
0.0638953224,
0.0254460759,
-0.3800843358,
-0.2974004447,
0.2748591602,
-0.0250437576,
-0.0472923517,
-0.2118062526,
0.2299560905,
0.0679561198,
-0.0923976526,
0.1367864758,
-0.0110533424,
0.1985068172,
-0.2076738775,
-0.0427564271,
0.0215646811,
-0.1141516343,
0.0521238446,
0.0510951579,
0.1534033865,
0.1497677267,
-0.3303489983,
0.0803325772,
-0.2610135376,
0.2847152054,
0.1598922163,
0.223918736,
0.2144837081,
0.3469129503,
-0.4694877565,
-0.1585901529,
-0.004124837,
0.2699045241,
0.55208987,
0.1244741082,
-0.4209647179,
-0.1436207443,
0.2156856358,
0.1185746342,
-0.2115747184,
-0.1473976821,
-0.2313163579,
0.0504372306,
-0.0536545366,
0.0604229011,
-0.2519185543,
0.3001874685,
-0.0839592069,
0.0785695463,
-0.0580870099,
-0.3621629179,
-0.2025627345,
0.3264384866,
0.2878724635,
-0.5156037211,
0.2869716585,
-0.1498441249,
0.1325419545,
0.5156207681,
0.7853249311,
0.4445268214,
-0.4298996925,
-0.1498056799,
0.0688978881,
0.2287385166,
0.1422461867,
0.076579757,
0.0240084864,
-0.1361962557,
0.0848398209,
-0.1343187243,
-0.0687178001,
0.1788946092,
-0.266405195,
-0.5647922754,
-0.0163692236,
0.3912088871,
0.0269730035,
-0.0672940165,
0.0059615667,
-0.184373185,
-0.2592992485,
0.7130497098,
0.3422814906,
0.7562556863,
0.1277416795,
0.0986643359,
0.4048418999,
0.0003030354,
0.1853132397,
-0.4228428006,
0.0010479578,
-0.6136546731,
0.0587297454,
0.113088809,
-0.1647693813,
0.1936232299,
0.1603551954,
-0.0142452335,
0.0326430351,
-0.2444701791,
0.1640648991,
-0.1362292171,
0.0062324964,
-0.07623671,
-0.2961116135,
-0.2897513807,
0.0594927557,
-0.1780505925,
-0.0110810045,
-0.0590358004,
-0.3573813736,
-0.38365677,
-0.0797674581,
-0.2322882116,
0.2479227185,
0.0321087763,
-0.1384337991,
0.115656957,
-0.3925535083,
0.0444009788,
0.192728132,
-0.251731813,
0.0480258688,
0.0710917413,
0.2389400303,
-0.0010535312,
0.0714079142,
0.1780132055,
-0.0989349335,
0.4233100116,
-0.0736437365,
-0.0399614684,
-0.0219040141,
-0.1767935306,
-0.1940683573,
0.1296895891,
0.1867605895,
-0.2706727087,
-0.4770205021,
-0.1548655033,
-0.1076148674,
-0.0222932138,
-0.3107557893,
0.1214545891,
0.1829892248,
-0.0715739131,
0.0681650043,
-0.0274277832,
-0.0557628646,
-0.1672383696,
0.2140374631,
-0.0015794118,
0.0981612206,
0.4091362953,
0.1596674621,
-0.0840090588,
-0.3482254446,
0.4530781806,
0.5276912451,
-0.5719265342,
0.0749973282,
-0.1564772725,
0.0256543793,
0.0467921905,
0.0328988284,
0.1706928164,
0.0141375139,
-0.098387301,
-0.5179103613,
-0.4347813725,
0.5048133731,
-0.1088347062,
-0.0101425257,
-0.4092607796,
0.0100876093,
-0.3355033994,
0.30781582,
-0.2414423674,
0.2439918071,
-0.1939401329,
0.0176829603,
-0.2196556479,
0.0982389078,
0.0059515922,
0.0840195045,
0.1495879889,
0.2436909378,
-0.0615038686,
-0.1732043326,
-0.1149638742,
0.0997127667,
-0.0163178202,
-0.0787064806,
-0.0031846955,
0.0128547847,
0.2036927193,
-0.1233442575,
0.1441870183,
-0.2993968725,
-0.0715692639,
0.0862614885,
0.5781136751,
0.3365705013,
-0.1118969768,
0.2481864691,
-0.3005678654,
0.2991029322,
0.0184951201,
0.2285616547,
0.0629773811,
0.0230339766,
-0.079948619,
-0.0198271405,
0.2566997409,
-0.020069154,
0.4715663791,
-0.5182371736,
-0.0516220592,
0.1413744092,
0.4587705135,
0.5653665066,
-0.2408150434,
0.1181824431,
0.2116543502,
0.2905910611,
-0.0475225076,
-0.2804191113,
0.3727922738,
-0.0053765643,
-0.0696779862,
0.1283036023,
0.0230811108,
-0.0278597269,
-0.2764378786,
-0.012533823,
-0.0115934908,
0.2705377638,
0.1889671087,
0.5272542834,
-0.0153473886,
-0.0970631689,
0.1175939664,
-0.1459274143,
0.4259734452,
0.5856388211,
-0.1410366446,
0.3272439539,
0.3073499203,
0.1564421803,
0.0109309033,
-0.532874763,
-0.1228293926,
0.2038957477,
-0.1401618272,
0.1934530586,
0.2501911819,
0.3526495993,
0.3793918788,
-0.1265405864,
-0.2513763905,
-0.0403271094,
-0.1987990439,
-0.0521668009,
-0.3814656436,
-0.2998268306,
0.0819382668,
0.1798835099,
-0.2449554503,
-0.1419662535,
0.0867219046,
0.2223517448,
-0.0891905576,
-0.2208847255,
0.008844316,
0.1286293119,
0.1805489212,
-0.2633651495,
-0.0241989717,
0.0933706462,
-0.0461646691,
0.036800351,
-0.079613924,
0.4504649639,
0.2477434427,
-0.2857194543,
-0.1183206886,
-0.1342200935,
-0.1736509055,
-0.051241219,
0.2905355394,
0.1314846873,
0.095628567,
0.3229236007,
0.1527836323,
-0.1861854941,
0.1523224264,
0.249831751,
0.1614771485,
-0.2472843528,
-0.0460938439,
-0.2773478329,
-0.2960664928,
-0.0746090561,
-0.1658144295,
-0.0217459332,
-0.1318038106,
0.1707461476,
0.0754170343,
0.0490594916,
-0.0360828787,
0.0898707286,
-0.1320393085,
0.5248308778,
0.1692191511,
0.0172539819,
-0.2377809435,
-0.0734762028,
-0.1202152297,
0.1911244988,
-0.212412715,
-0.0935072452,
0.3192961514,
0.1992758662,
-0.2153055221,
0.2605943978,
-0.1005455479,
0.1698744744,
0.3053713143,
0.7991554737,
-0.4517259598,
-0.0086253621,
0.0274178628,
-0.0394113623,
-0.1326080114,
-0.3873398602,
0.1676077247,
-0.3278511465,
0.06836465,
0.0596034266,
-0.3029688001,
0.3425635993,
0.1018127874,
0.5732268095,
0.0602319092,
0.0336616039,
-0.0231585354,
-0.2785827518,
-0.6113963723,
-0.5102267265,
-0.1662258357,
0.1620430648,
-0.0839212462,
0.6900413632,
0.026840359,
-0.0357967913,
-0.2505089939,
-0.1763678938,
-0.3629659116,
0.1706698239,
-0.0451879613,
0.1262846142,
-0.0912283659,
0.0157691147,
-0.0922300965,
0.2701960504,
-0.0330736414,
0.0304186009,
-0.1640451252,
-0.326779902,
0.3157731593,
-0.4263163805,
-0.0681737289,
0.1772866845,
0.0945995227,
0.0718438551,
0.0354793072,
-0.2550904751,
0.0189251322,
0.293621242,
-0.0543173738,
-0.0959031209,
-0.0697566792,
0.2562076151,
-0.217684418,
-0.0963414907,
0.0922670215,
0.0700139999,
-0.1571519673,
0.1294463128,
-0.3249942064
] |
https://github.com/huggingface/datasets/issues/3123 | Segmentation fault when loading datasets from file | The issue has been fixed in pyarrow 6.0.0, please update pyarrow :)
The issue was due to missing fields in the JSON data of type list. Now it's working fine and missing list fields are replaced with empty lists | ## Describe the bug
Custom dataset loading sometimes segfaults and kills the process if chunks contain a variety of features/
## Steps to reproduce the bug
Download an example file:
```
wget https://gist.githubusercontent.com/TevenLeScao/11e2184394b3fa47d693de2550942c6b/raw/4232704d08fbfcaf93e5b51def9e5051507651ad/tiny_kelm.jsonl
```
Then in Python:
```
import datasets
tiny_kelm = datasets.load_dataset("json", data_files="tiny_kelm.jsonl", chunksize=100000)
```
## Expected results
a `tiny_kelm` functional dataset
## Actual results
β οΈ `Segmentation fault (core dumped)` β οΈ
## Environment info
- `datasets` version: 1.14.0
- Platform: Linux-5.11.0-38-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 5.0.0 | 39 | Segmentation fault when loading datasets from file
## Describe the bug
Custom dataset loading sometimes segfaults and kills the process if chunks contain a variety of features/
## Steps to reproduce the bug
Download an example file:
```
wget https://gist.githubusercontent.com/TevenLeScao/11e2184394b3fa47d693de2550942c6b/raw/4232704d08fbfcaf93e5b51def9e5051507651ad/tiny_kelm.jsonl
```
Then in Python:
```
import datasets
tiny_kelm = datasets.load_dataset("json", data_files="tiny_kelm.jsonl", chunksize=100000)
```
## Expected results
a `tiny_kelm` functional dataset
## Actual results
β οΈ `Segmentation fault (core dumped)` β οΈ
## Environment info
- `datasets` version: 1.14.0
- Platform: Linux-5.11.0-38-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 5.0.0
The issue has been fixed in pyarrow 6.0.0, please update pyarrow :)
The issue was due to missing fields in the JSON data of type list. Now it's working fine and missing list fields are replaced with empty lists | [
-0.2918098569,
0.1214295179,
-0.0827052891,
0.3285434246,
0.2168405354,
0.1759035587,
0.4262994826,
0.450145781,
-0.116876334,
-0.035681136,
-0.0088388883,
0.4317319393,
-0.07351996,
-0.1450857669,
0.043353945,
-0.2367306799,
0.0988489091,
0.1945877969,
0.0211999211,
-0.0470167845,
-0.3097120523,
0.0099231675,
-0.2753227353,
0.024014432,
-0.0618331246,
0.0798941031,
0.0055658524,
0.4071411192,
-0.0610920899,
-0.47754547,
0.0961335748,
-0.2853012979,
0.0704786628,
0.2516078651,
-0.0001071634,
0.1179607436,
0.3458614349,
0.0579592437,
-0.2285080999,
0.0595327392,
-0.1425819695,
-0.2246123999,
0.1000738367,
-0.3406712115,
0.11749053,
-0.2985039055,
-0.0583706237,
0.2825622261,
0.3278877437,
0.2169693559,
0.2418404669,
0.146156773,
0.0648336038,
0.1432901621,
0.662932694,
0.1798784733,
-0.0988812223,
0.4694987237,
0.0925357938,
-0.1290552318,
-0.0867849514,
0.12647219,
-0.1382037252,
-0.0642649457,
0.1143600196,
0.0624191612,
-0.2006951272,
-0.3929517269,
-0.0047303131,
0.2205432802,
0.2763769925,
-0.2993310988,
-0.197420314,
-0.2203940451,
-0.076235123,
-0.6523586512,
0.1665422916,
0.431114614,
-0.1317394376,
0.1498046964,
0.0405503921,
0.0215345696,
-0.1675587595,
0.2037255913,
-0.0932425261,
0.2465575486,
0.1563672572,
0.0249537304,
-0.1117091551,
-0.1566171497,
-0.3185903728,
-0.0222120676,
-0.2943530977,
0.2650364935,
-0.2715199888,
-0.0931319371,
-0.0153354388,
-0.0133470697,
0.3815995455,
0.2088989764,
0.1359738261,
0.1028356403,
0.3156544864,
0.1051694155,
0.2657703161,
-0.084162578,
-0.1544483155,
0.1562776417,
0.1998009682,
-0.0283482559,
-0.1149826497,
0.0828848407,
0.0142490771,
-0.0847684741,
0.1554763019,
-0.0665241629,
0.136633411,
0.0116306404,
-0.2576896548,
0.1284851879,
-0.5171627998,
-0.0423920043,
-0.0807353482,
0.3980871737,
-0.0022924168,
-0.0626937151,
-0.223424539,
0.1109165177,
-0.2770856321,
-0.1238283068,
-0.1840715706,
-0.013528497,
-0.1840057075,
-0.1019440517,
0.1591255218,
-0.2818838954,
0.332728833,
0.1258435845,
-0.2080558538,
-0.0870824605,
-0.1511071026,
-0.1858870834,
-0.3227636516,
0.2604019642,
-0.1644881666,
0.0673504397,
-0.0572508126,
-0.0110574169,
-0.0591599531,
0.2522028685,
-0.1928111166,
-0.1586402059,
-0.1407765448,
0.2303974181,
-0.2062382102,
0.1054343209,
0.0742587671,
0.1178544611,
0.1249414906,
-0.3388925493,
-0.0115911411,
-0.0706397742,
0.0729904175,
-0.3966018558,
0.0796641484,
0.2618734241,
-0.6067891121,
-0.1548263729,
-0.1292986572,
-0.1278662384,
0.1880635172,
0.3075352311,
-0.111732237,
0.3459053934,
-0.1622916013,
0.7070807815,
0.4934937656,
0.2397246659,
-0.4732921124,
0.3044736385,
-0.0659737661,
0.0593908466,
-0.1498849839,
0.1641962975,
0.3186171651,
0.0377845094,
-0.1284876317,
0.2756296396,
0.0619139969,
0.1308684349,
-0.3311684132,
-0.0936562195,
0.0880348682,
0.2849455774,
0.0306397565,
-0.0702109113,
0.2555615306,
-0.0627641678,
0.2737772465,
-0.2454641759,
-0.0023807052,
0.3222178817,
0.2429712415,
-0.1740372032,
0.1736059487,
-0.3627465367,
-0.6328655481,
0.0891138688,
-0.097137019,
0.0748261288,
-0.1568675339,
0.0295940619,
-0.3496388495,
0.142225787,
-0.0629003569,
-0.0007521152,
0.1465375125,
-0.0654865801,
-0.0645672455,
0.0269744378,
-0.2135263979,
-0.1856559217,
0.0097282138,
0.3229252696,
-0.1873949766,
0.4950961769,
-0.050072249,
-0.4322345257,
-0.0355258919,
0.1339966953,
0.1449481994,
-0.2621913254,
0.0396849513,
0.3423876762,
0.3585017323,
0.0682129636,
-0.3767336011,
-0.0028270802,
0.1771762967,
-0.050133653,
0.0266503058,
0.1111532524,
0.1508511305,
-0.0225145705,
0.0585737936,
0.3733448982,
0.0212668367,
-0.0140366936,
-0.0211174581,
-0.1850607246,
0.131980449,
-0.1667291075,
0.1363778412,
-0.0831816196,
0.2561388314,
0.1283505112,
0.0326961055,
0.3540166914,
-0.5563915968,
-0.1424495578,
0.5803524852,
-0.1736175418,
0.2540674508,
0.1871566176,
-0.4211390316,
-0.0595871843,
0.1676714569,
-0.2155300677,
0.3650297821,
0.1340764463,
-0.1880158931,
0.0629994571,
0.1503532231,
-0.0604172163,
0.1884623915,
0.0627666786,
0.4829991162,
0.3494057357,
0.2383634448,
0.0484826006,
-0.2497022003,
-0.2753813863,
0.0868442431,
0.1772169769,
-0.313598007,
0.0274575017,
-0.1577531248,
0.0770983845,
-0.030388359,
-0.2400130183,
-0.2895746827,
-0.1923347116,
0.1079370305,
0.1361828446,
-0.2626643777,
0.149529472,
-0.0420786627,
0.0163784139,
0.2609808445,
-0.1793535799,
-0.2925777435,
-0.2322919071,
-0.3041022718,
0.1057986021,
0.3839274049,
0.1333931983,
-0.0890822113,
0.0345550478,
-0.3096343279,
0.0257641878,
-0.2375026196,
0.116018869,
-0.1164888889,
0.434843123,
0.1793020517,
0.212139383,
-0.0954030156,
-0.2661330998,
0.2407325953,
0.1119569466,
-0.3348253369,
0.419423908,
-0.0814045072,
0.2867175341,
-0.2858222723,
-0.3179769814,
-0.1767691076,
-0.2761533856,
0.3072341383,
0.233807981,
0.1426363289,
0.0027276264,
0.2530323863,
-0.174616307,
-0.0738173947,
-0.1283880919,
0.0438375957,
0.1562930942,
0.3257736266,
-0.2792032361,
-0.3313637078,
-0.0435021669,
-0.1857438087,
0.1009751037,
0.1431438327,
-0.5068830848,
0.1973626763,
-0.0731491446,
0.3436177373,
-0.2792084813,
-0.2486218661,
-0.0080987699,
0.0727457926,
-0.0014524731,
-0.002134158,
0.012271001,
-0.2476626635,
0.0282846559,
0.1588124186,
-0.2153231502,
0.4941363037,
-0.0059229075,
0.790543437,
-0.0169306975,
-0.111726068,
0.2927452326,
-0.1193503663,
-0.0058984472,
-0.1725430191,
-0.0875328928,
0.2907530665,
-0.1406133026,
-0.3653133214,
0.1966471821,
-0.0697624162,
-0.3644660413,
0.0640746728,
0.0994802266,
-0.5449874997,
-0.1991822571,
0.2193090022,
0.3230806887,
0.0447704606,
-0.0760706365,
0.2102868855,
-0.0381049626,
-0.246033743,
0.0582895279,
0.0770642385,
0.1765694767,
-0.1250269264,
-0.269603163,
-0.1828145385,
-0.1743877679,
0.1192582771,
0.1107669547,
-0.046211157,
0.1442376226,
-0.2769703567,
0.0311866831,
-0.1455186009,
0.4165607989,
0.1333359033,
0.0855613053,
0.1643332839,
0.354432255,
-0.2692754567,
-0.1489622593,
-0.13653934,
0.1108071133,
0.594225347,
0.2268200964,
-0.6055037975,
-0.024939293,
0.1200305969,
0.1869885176,
-0.1146135628,
-0.1748012602,
-0.276853621,
-0.119532831,
-0.0984833613,
-0.0682440102,
-0.1620040387,
0.3538735807,
-0.1819519997,
0.072047554,
0.1034563854,
-0.1413931996,
-0.1160421595,
0.4051290154,
0.2463492155,
-0.4595163167,
0.1130556762,
-0.3241618574,
0.1573262066,
0.530505836,
0.5712250471,
0.4203819633,
-0.3209888935,
0.0735612065,
0.097251229,
0.2543213665,
0.0762472153,
0.0257472694,
0.0992552862,
-0.1622541547,
0.1578210592,
-0.290391773,
-0.1251505017,
0.3420932889,
-0.2323886603,
-0.3750360906,
0.0342747979,
0.3321674168,
-0.1031017676,
-0.0191186182,
-0.0347726643,
-0.2578953505,
-0.1635365933,
0.6527092457,
0.0860730484,
0.7398887277,
-0.0277754385,
0.0450797193,
0.5700481534,
0.0730604753,
0.4216565788,
-0.3471744359,
0.2305010557,
-0.5757262707,
-0.0512246676,
0.0824512765,
-0.1548265219,
0.2669689953,
0.2993858755,
-0.0617938079,
0.0489703305,
-0.0448467024,
0.3450784087,
-0.10355746,
0.0623483434,
0.0621423014,
-0.1286344379,
-0.4077111185,
0.133350268,
-0.1492898166,
0.0355438925,
-0.1217870116,
-0.2584194839,
-0.2563311756,
-0.0924744159,
-0.195931673,
0.2180997282,
-0.0751399994,
-0.0536411516,
0.2053052485,
-0.380389452,
0.0738017932,
0.1909197569,
-0.3278326988,
0.1486974061,
0.0311235562,
0.1826979816,
-0.0712281466,
0.0658228099,
0.2000023574,
0.0275869295,
0.2826321125,
-0.1193014979,
-0.1475322843,
0.0381509885,
-0.1844991744,
-0.0923109874,
0.0544561855,
0.1431895941,
-0.1813337952,
-0.5158836842,
-0.1265046895,
-0.1378189474,
0.0061881319,
-0.2780537605,
0.1511305422,
0.0177686308,
-0.0922797173,
0.1918949485,
-0.1420693398,
-0.0297961682,
-0.3124334812,
0.2661221623,
0.0075382446,
-0.0116800219,
0.5168943405,
0.2650734186,
-0.0793434978,
-0.3386860192,
0.2952067256,
0.2787980437,
-0.4825448692,
0.0706753582,
0.0057825982,
0.1906723529,
0.10352844,
0.2032194436,
0.0481609106,
-0.001815459,
-0.0238438565,
-0.4916638136,
-0.2326030582,
0.4813332856,
0.0940802395,
-0.0069075958,
-0.0770226717,
0.3137241304,
-0.2618386149,
0.1476397216,
-0.3262996674,
0.27669999,
-0.3362632692,
0.1191540435,
-0.2077767551,
-0.0170520414,
0.0383167826,
0.0644148439,
0.2079650611,
0.3431870639,
-0.0120849507,
-0.246792838,
-0.0711445957,
0.0799970031,
-0.0277379882,
-0.0811682194,
-0.0580747053,
0.066263549,
0.1615478247,
-0.0263423976,
0.2754070461,
-0.2735540271,
-0.07855279,
0.1927283108,
0.4910869598,
0.1995908916,
-0.2218599319,
0.0770285428,
-0.3392514288,
0.2647521198,
0.0913390666,
0.2885995209,
0.0035330905,
0.1164786443,
-0.1711442322,
-0.0403401479,
0.1852517426,
-0.0302591678,
0.5907613039,
-0.5311517715,
-0.2068775892,
0.041846633,
0.4955073893,
0.4663705826,
-0.2543289363,
0.1453515142,
0.2343534678,
0.3341851532,
-0.2391164601,
-0.2089844048,
0.5279935002,
0.0528493375,
0.0010808785,
0.120314002,
0.1272405535,
0.0225234106,
-0.2516923845,
-0.0602210611,
0.1788773537,
0.3252083957,
0.0496741906,
0.580016911,
-0.01422772,
0.0191117637,
0.1878354102,
0.0186098982,
0.223389551,
0.5929844975,
-0.0621927604,
0.1983969808,
0.0871269703,
0.1137512475,
0.0100684827,
-0.5385758281,
-0.1041748077,
0.1856331229,
0.0606015585,
0.0749348328,
-0.0203752276,
0.2484318465,
0.3559761345,
-0.1470852643,
-0.1430943906,
0.1175707057,
-0.2820543349,
0.0267654322,
-0.4012636542,
-0.2213300169,
0.0983207151,
0.0390300415,
-0.2495700121,
-0.2585224807,
0.2401316315,
0.1196328551,
-0.1724435836,
-0.3198902607,
-0.0974179879,
0.0817613155,
0.0832099095,
-0.2275281399,
0.102400355,
0.1451165378,
-0.1238218546,
-0.0081401095,
-0.028757507,
0.4083753824,
0.2565531731,
-0.2090247869,
-0.2054585367,
-0.1981956214,
-0.1266968548,
-0.1273195744,
0.2248264402,
0.2138749659,
0.372017324,
0.2408818156,
0.1873770356,
-0.1876949221,
0.1312909871,
0.2173209488,
0.1465239823,
-0.2493932396,
-0.0645873994,
-0.3273050487,
-0.3679923415,
-0.1951738596,
-0.2522449493,
-0.0491306297,
0.0195411034,
0.2739669085,
0.2346386462,
0.1237889454,
-0.1219571233,
0.1264361143,
-0.1466677785,
0.4570377767,
0.2781433761,
0.0385213867,
-0.3058486283,
-0.1328953654,
-0.0940630659,
0.2897423208,
-0.3138599098,
-0.059388116,
0.306422174,
0.3214702308,
-0.1464498937,
0.285027951,
-0.1613636613,
0.1435346007,
0.0182542372,
0.7517819405,
-0.4406621158,
0.0521844961,
-0.1368530989,
-0.0098878471,
-0.0916276127,
-0.1877524108,
0.3216359913,
-0.3360440433,
0.0788860172,
-0.2145955563,
-0.1538475603,
0.2126074582,
0.1085344702,
0.5653643608,
0.0635309666,
0.0837455094,
-0.1148378775,
-0.286129266,
-0.3932603896,
-0.4465282261,
-0.1364310831,
0.2270052135,
-0.085963808,
0.5552139878,
0.1172237098,
0.0240093321,
-0.2125332952,
0.0519602969,
-0.219869405,
0.0871670768,
0.0048923511,
0.076925911,
-0.0901318118,
-0.0508443676,
-0.0005882293,
0.2574554086,
-0.0751144662,
0.103037551,
-0.2255907208,
-0.3907489181,
0.292735368,
-0.5802552104,
-0.1796090305,
-0.0215982739,
0.0020323861,
-0.0089227958,
-0.0616520047,
-0.3713847697,
-0.0279876757,
0.3872357607,
-0.0486062244,
-0.1364041567,
-0.0687128976,
0.1136186346,
-0.1986733824,
-0.1268047243,
0.119590655,
0.0741733462,
-0.1965556145,
0.064279221,
-0.4177088737
] |
https://github.com/huggingface/datasets/issues/3122 | OSError with a custom dataset loading script | Hi,
there is a difference in how the `data_dir` is zipped between the `classla/janes_tag` and the `classla/reldi_hr` dataset. After unzipping, for the former, the data files (`*.conllup`) are in the root directory (root -> data files), and for the latter, they are inside the `data` directory (root -> `data` -> data files).
This can be fixed by removing the `os.path.join` call in https://huggingface.co/datasets/classla/janes_tag/blob/main/janes_tag.py#L86
Let me know if this works for you. | ## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
| 71 | OSError with a custom dataset loading script
## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
Hi,
there is a difference in how the `data_dir` is zipped between the `classla/janes_tag` and the `classla/reldi_hr` dataset. After unzipping, for the former, the data files (`*.conllup`) are in the root directory (root -> data files), and for the latter, they are inside the `data` directory (root -> `data` -> data files).
This can be fixed by removing the `os.path.join` call in https://huggingface.co/datasets/classla/janes_tag/blob/main/janes_tag.py#L86
Let me know if this works for you. | [
-0.112895906,
0.2815282643,
-0.0133344699,
0.3955747485,
0.2419006526,
0.1173843443,
0.4183782637,
0.3338419795,
0.3993054032,
0.1943427771,
-0.2293032855,
0.3192374408,
-0.2365900278,
-0.0586514659,
-0.0276410375,
0.0171539448,
-0.114003703,
0.1235067323,
0.0152645279,
0.0538214445,
-0.2668658197,
0.1890420318,
0.0730200857,
0.1165180579,
-0.1524644047,
0.2888300717,
-0.3055677116,
0.606216073,
-0.1058223769,
-0.4976428449,
0.411575675,
-0.0848033205,
0.3153781593,
0.9328231812,
-0.0001182188,
0.2439122945,
0.1822360158,
-0.1082936302,
-0.3610415757,
-0.3233252168,
0.1418730766,
-0.0559698604,
0.0167580228,
-0.2509720027,
0.1073099449,
-0.1073530763,
-0.0638049021,
-0.3272553384,
0.1470366567,
0.2430463284,
0.1508886814,
-0.0782090202,
-0.2656308413,
-0.3175558746,
0.230467245,
0.3083329499,
0.145418644,
0.3459366262,
0.2215478122,
-0.2759934962,
-0.0904204771,
-0.0664641038,
-0.1675291657,
0.1449217647,
0.2412748784,
0.2274577469,
-0.0587953329,
-0.1350417137,
0.0041873376,
0.3970923722,
0.6253730059,
-0.1800610423,
-0.3252731264,
-0.1314567924,
0.0302402582,
-0.2941180468,
0.3250660002,
0.2082558572,
-0.1266012192,
0.0780132189,
0.1090787128,
0.1126024351,
-0.1752080321,
0.3246008456,
-0.1998942047,
0.09765926,
0.0400920585,
0.0607717596,
0.0194339044,
-0.0370794237,
-0.0513202138,
-0.0573043339,
0.052379597,
0.2560679913,
-0.2146289498,
0.0880449191,
-0.1322700977,
-0.1603739113,
-0.0199080314,
0.0104808677,
0.2611757517,
-0.169451803,
-0.4164373577,
0.1147027612,
0.1924513727,
0.2341752648,
0.00285948,
0.0696606487,
0.2455966324,
0.3264808953,
-0.3402525187,
0.0025064473,
-0.2539590597,
-0.1772052944,
0.2750906646,
-0.0635992885,
0.5535326004,
-0.0913140029,
-0.6092353463,
0.0851996467,
-0.0907429382,
-0.1220401153,
0.0167004,
0.350425899,
0.1556559056,
0.007623747,
0.3242086768,
0.3544692099,
-0.2622276247,
-0.0990956202,
-0.1103032902,
0.218539387,
-0.0110624461,
0.2203116119,
0.336728394,
-0.1516911983,
0.2326343805,
0.1329763532,
-0.0343419984,
-0.1373285949,
-0.06242726,
0.1760948747,
-0.3333291709,
0.116724506,
0.0138149438,
0.2963365614,
0.3627974391,
-0.1896023303,
-0.1238489598,
0.3359746933,
-0.5115239024,
-0.5266265869,
-0.1148847789,
0.1564935297,
-0.2748806179,
-0.0949093923,
-0.0207237098,
-0.2097216994,
0.2548091114,
-0.3180551231,
-0.0229650214,
-0.1040267274,
-0.5212676525,
-0.2807870209,
-0.0835549012,
0.6397892833,
-0.5403725505,
-0.0046032094,
-0.295984447,
0.065991655,
0.0528748073,
0.225285694,
-0.1808516383,
0.4837554097,
-0.492063731,
0.0551537015,
0.1831508726,
-0.4322175086,
-0.3191882074,
0.0916376337,
-0.3816460073,
0.3135974407,
0.178907305,
0.1348923594,
0.0342425667,
-0.0998479724,
-0.0080055827,
0.0334073454,
0.0391687863,
-0.1163590848,
-0.1003423706,
-0.1150629744,
0.295037061,
0.3189656734,
-0.0525987707,
-0.028480975,
0.0728864223,
-0.0832465068,
0.2127764672,
-0.1638175845,
-0.1320707053,
0.1578200459,
0.3294979334,
0.2000403106,
0.1325257123,
-0.0937299654,
-0.3722989857,
0.4385554194,
0.2032443285,
-0.0487934314,
0.0535551906,
-0.0575329736,
-0.3631984591,
-0.0736557692,
-0.4429956675,
-0.1980913728,
-0.0112996316,
0.234498933,
-0.0294581223,
-0.0375625342,
-0.1806126237,
0.4302510917,
-0.3583680391,
0.0738114864,
-0.280893445,
0.1908039302,
-0.0720524043,
-0.0913958251,
-0.095728673,
0.1119588614,
0.1296713054,
0.0004454649,
-0.0718531534,
0.3464572728,
0.3362162709,
-0.1385051459,
-0.0276071727,
0.0314185619,
-0.000874026,
-0.0213837381,
0.1846701503,
0.2478930503,
0.1665901393,
-0.189546898,
-0.0732961744,
0.1872238964,
-0.1838079542,
0.2477003634,
-0.0536600314,
-0.1778233796,
0.0044103623,
-0.0287913177,
0.1164985597,
-0.0432933904,
0.4287038743,
-0.1416190565,
0.3427115679,
0.0684484541,
0.0491025932,
-0.0600036308,
0.1305796653,
0.0284001697,
0.1086045057,
0.1169632822,
-0.0362802558,
0.1426836699,
-0.3513677716,
0.269113332,
0.8010325432,
0.0404969826,
-0.1698907465,
0.1790696532,
0.0917892829,
0.0040806667,
-0.0075928164,
-0.0389093943,
0.1517270505,
0.3422046304,
0.1113568842,
0.2531371415,
-0.0732817873,
-0.3762148619,
-0.0807917118,
0.3256630003,
-0.5139818788,
0.0058897519,
-0.2444292009,
-0.0086611994,
-0.3238432407,
-0.1037614867,
-0.2189124376,
-0.1865136176,
-0.0390641764,
0.1296097487,
-0.0096952934,
-0.0156512186,
-0.1402450353,
0.1979128122,
0.1155450866,
-0.2887756228,
0.1485815942,
-0.0220531542,
-0.1977472901,
-0.1064596772,
0.2596421242,
-0.0955130756,
0.1163766161,
-0.2262864709,
-0.0116095245,
-0.3291104436,
-0.2606188655,
-0.1494772732,
0.1949061155,
0.1227232143,
0.2664642632,
0.250947237,
0.3389137685,
-0.3548859656,
0.304135859,
-0.2651305795,
-0.292227298,
0.2627809942,
0.0242234021,
0.1615140587,
-0.0260515809,
-0.4274685383,
-0.2367953211,
-0.3845947087,
-0.1018422991,
0.0268563423,
0.2221177816,
0.2095913589,
0.0703783333,
0.0630868971,
0.118697308,
0.0982184857,
-0.1481312364,
-0.3428361714,
0.2690016627,
-0.1362374872,
-0.1334785372,
0.0459208675,
-0.040460065,
0.1930996627,
-0.0156030683,
-0.5530504584,
-0.2346849591,
-0.0609780997,
0.3486633003,
-0.2883739471,
-0.0819920972,
0.1984853894,
-0.1505386382,
0.083135955,
-0.1674244702,
-0.354555577,
0.0060314923,
0.0953259841,
0.235937506,
-0.1034483984,
0.4342650175,
-0.2289343327,
0.6846207976,
-0.0281376615,
-0.2245502472,
0.502378583,
-0.1753668189,
0.5141823888,
-0.1999612004,
-0.3403880894,
-0.1677145213,
-0.0122251092,
-0.2523525059,
0.2549048066,
0.0182497911,
0.0372754633,
-0.1112151742,
0.083911553,
-0.2190149873,
0.0138900746,
0.086210072,
0.1383640766,
-0.1046937108,
-0.0619935356,
0.1244759485,
-0.15227139,
-0.039342124,
0.0777745917,
0.55904603,
0.040041063,
0.040248245,
-0.1543803215,
-0.0125215966,
-0.0933564827,
0.3045858443,
-0.0115270577,
0.1328746229,
-0.0250478219,
-0.2271844447,
-0.0399391726,
0.0232708566,
0.5288301706,
-0.1383348554,
0.1191619933,
0.1253420562,
-0.0398853123,
-0.315358907,
-0.3329626918,
0.060594514,
0.3531076014,
0.2204869241,
0.4047226012,
0.0181249864,
0.0763320923,
0.2558168769,
0.2354893237,
-0.1243456751,
-0.6908111572,
-0.2238885164,
-0.1691916734,
-0.1979241371,
-0.2987077236,
-0.2118784934,
0.2319642007,
-0.1322768182,
0.2437669784,
0.0092543848,
-0.0067523187,
0.2009452134,
-0.0593399964,
0.1923035532,
-0.1493236423,
0.3419781923,
0.1606945544,
0.1553740203,
0.4738463759,
1.0460828543,
-0.2987023294,
-0.5206577778,
0.1743449271,
-0.1635493934,
0.0013160146,
0.3332732618,
0.0956372395,
-0.1864746511,
-0.0876409113,
-0.2176627666,
-0.1909016669,
0.0398273952,
0.1500074267,
-0.2489832193,
-0.2477912009,
-0.3432924151,
0.3437137604,
0.1472105831,
-0.026716765,
0.2497175485,
-0.1333468556,
-0.1335039884,
0.414185971,
-0.3278903365,
0.6894587278,
-0.2888528109,
0.2616025805,
0.29417184,
-0.101760447,
0.1873840839,
-0.1968717873,
-0.0567967743,
-0.489726156,
-0.295445323,
0.0277060457,
-0.0889889002,
0.0792131126,
0.2831928134,
-0.0213684253,
0.1173620671,
-0.2854599059,
0.4183548093,
0.0442407019,
0.2545039058,
-0.0981154591,
-0.1607904881,
-0.2577917278,
0.0828532204,
-0.0959760696,
0.3313871622,
-0.0761693716,
0.0332357995,
-0.3438396454,
-0.2139360607,
-0.2955716252,
0.2028531879,
-0.220159784,
0.1371570975,
-0.0171593707,
-0.2833602726,
0.1773760617,
0.4560714662,
0.1102348417,
-0.1432106346,
-0.0043118303,
0.0868066102,
0.1135705858,
0.0898202434,
-0.0103572346,
-0.3499321342,
0.2352135032,
0.1040661708,
-0.0565862544,
-0.0006308837,
-0.0424599275,
-0.2898243666,
-0.1391010284,
0.2750946283,
0.1124254838,
-0.4799054861,
-0.2134597152,
-0.2338911146,
0.2542508543,
-0.0420298316,
0.0446254462,
0.3107020855,
-0.1815201491,
-0.1395259798,
-0.094224371,
-0.4209417999,
0.0300346836,
0.3842089176,
0.0943759978,
-0.0534853563,
0.6861680746,
0.0392763764,
0.1193597391,
-0.1369948387,
0.2272263169,
0.4103616178,
-0.3568312228,
-0.0501770116,
0.0618524402,
0.1857267618,
0.2820476294,
-0.1663279384,
0.2463872582,
-0.0049660224,
0.0736386627,
-0.5253555775,
-0.1077332124,
-0.0219803378,
-0.042703405,
0.2536071539,
-0.2524228096,
-0.3137610555,
-0.2176107615,
0.0179139264,
-0.2071127892,
0.2714425623,
0.3271951973,
-0.1176347136,
0.2754459083,
0.1714000851,
0.0115936333,
-0.0307605024,
0.0912660435,
-0.1048602536,
-0.1376076192,
-0.1294652522,
-0.154789865,
0.1905358583,
-0.0030950361,
0.0942622125,
0.1430263817,
-0.2625870407,
0.0618264899,
-0.1332593858,
0.1347553134,
0.2704571486,
-0.1097748429,
-0.1180680767,
0.2326466739,
0.1366550475,
-0.1250838637,
0.3421866596,
-0.4030280411,
0.3870024383,
0.1938575357,
0.1176674441,
-0.165723145,
0.1553021967,
-0.0005825078,
-0.0795976371,
-0.0913875327,
0.1264935136,
0.0165001974,
-0.6233417988,
0.1582935601,
0.1304391176,
0.3265200853,
0.4585660398,
-0.4877650142,
-0.1050122008,
0.0963293388,
0.1551215649,
-0.1031349972,
0.1015435085,
0.5643359423,
0.0464820042,
-0.1642566472,
0.4624792933,
0.0674902797,
-0.0912216827,
0.0178594068,
-0.027062647,
0.4975489676,
0.0826210231,
0.3517022431,
0.2650982738,
-0.2606461942,
-0.0567992255,
0.1218463928,
0.1263975799,
0.0692646578,
0.5387529135,
-0.1648941189,
0.2388655394,
0.0917735994,
-0.1412543505,
0.1076890156,
-0.5711115599,
-0.0015080004,
0.1924998164,
0.0137380641,
-0.0449584164,
-0.0206038132,
0.2430924177,
-0.4190214276,
0.114593491,
-0.27127707,
-0.2365582436,
-0.075271599,
0.143229723,
-0.1065919325,
-0.2355138361,
-0.008267655,
-0.0387185104,
-0.0564136095,
-0.1213427857,
-0.1742845476,
0.0788545907,
-0.4962644279,
-0.4207937121,
-0.164188534,
0.1034594476,
-0.1008427739,
-0.2970194519,
0.2939696312,
0.2332120538,
-0.1196255088,
0.534101665,
0.1225781366,
0.7431434989,
0.616733551,
-0.1459566057,
0.0138448495,
-0.2328450829,
0.0353545062,
0.0722347572,
-0.0457608402,
-0.0701700151,
0.040517278,
0.3241594732,
0.0949984267,
-0.0077846372,
0.1271944642,
0.396053493,
0.2972893417,
-0.3929401934,
-0.0737176463,
-0.3291742206,
0.1605654508,
-0.2225062102,
0.2770186365,
-0.341632396,
-0.2148325741,
0.168130517,
0.4010599256,
0.2058335394,
0.1604490876,
0.0326092616,
-0.0585586578,
0.063000679,
0.4953664243,
0.0183691774,
-0.3543061018,
-0.0270194653,
-0.7557730079,
0.3723703623,
-0.3508510888,
-0.225160718,
-0.2059901506,
0.2012235671,
-0.0333268829,
-0.0274120588,
0.5327728987,
-0.0530163832,
0.027360389,
0.2849693298,
-0.4644875228,
-0.440334022,
0.1245530546,
-0.0847929493,
-0.0689240396,
-0.2968159318,
-0.2567429245,
-0.1364099979,
-0.023192618,
0.1224788278,
-0.0975103676,
0.1170932651,
0.1715443879,
0.4463058114,
-0.1893985718,
0.5821204782,
0.1693341881,
-0.2427995205,
-0.3935718536,
-0.1685696095,
-0.221527949,
0.4302474856,
0.1876526922,
0.4727033973,
-0.2618691623,
-0.2200351208,
-0.3228354156,
0.2036501318,
-0.1437960714,
-0.0432882421,
-0.0449991263,
0.1778973937,
-0.0409729369,
0.1039964333,
0.2001200169,
-0.0216210485,
0.0891022831,
0.3200951815,
-0.1291348338,
-0.2527155876,
0.5629218221,
-0.2602697015,
-0.095239751,
-0.1059986278,
0.2764508128,
-0.264375627,
0.3012577891,
-0.3279078901,
0.0294494163,
0.3732500672,
-0.1372846216,
-0.1196619943,
-0.0060263234,
-0.1935357302,
-0.0214499682,
0.0480176806,
0.2041410208,
-0.0916028842,
-0.1468946338,
0.112221919,
-0.1934187561
] |
https://github.com/huggingface/datasets/issues/3122 | OSError with a custom dataset loading script | Hi Mario,
I had already tried that before, but it didn't work. I have now recreated the `classla/janes_tag` zip file so that it also contains the `data` directory, but I am still getting the same error. | ## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
| 36 | OSError with a custom dataset loading script
## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
Hi Mario,
I had already tried that before, but it didn't work. I have now recreated the `classla/janes_tag` zip file so that it also contains the `data` directory, but I am still getting the same error. | [
-0.112895906,
0.2815282643,
-0.0133344699,
0.3955747485,
0.2419006526,
0.1173843443,
0.4183782637,
0.3338419795,
0.3993054032,
0.1943427771,
-0.2293032855,
0.3192374408,
-0.2365900278,
-0.0586514659,
-0.0276410375,
0.0171539448,
-0.114003703,
0.1235067323,
0.0152645279,
0.0538214445,
-0.2668658197,
0.1890420318,
0.0730200857,
0.1165180579,
-0.1524644047,
0.2888300717,
-0.3055677116,
0.606216073,
-0.1058223769,
-0.4976428449,
0.411575675,
-0.0848033205,
0.3153781593,
0.9328231812,
-0.0001182188,
0.2439122945,
0.1822360158,
-0.1082936302,
-0.3610415757,
-0.3233252168,
0.1418730766,
-0.0559698604,
0.0167580228,
-0.2509720027,
0.1073099449,
-0.1073530763,
-0.0638049021,
-0.3272553384,
0.1470366567,
0.2430463284,
0.1508886814,
-0.0782090202,
-0.2656308413,
-0.3175558746,
0.230467245,
0.3083329499,
0.145418644,
0.3459366262,
0.2215478122,
-0.2759934962,
-0.0904204771,
-0.0664641038,
-0.1675291657,
0.1449217647,
0.2412748784,
0.2274577469,
-0.0587953329,
-0.1350417137,
0.0041873376,
0.3970923722,
0.6253730059,
-0.1800610423,
-0.3252731264,
-0.1314567924,
0.0302402582,
-0.2941180468,
0.3250660002,
0.2082558572,
-0.1266012192,
0.0780132189,
0.1090787128,
0.1126024351,
-0.1752080321,
0.3246008456,
-0.1998942047,
0.09765926,
0.0400920585,
0.0607717596,
0.0194339044,
-0.0370794237,
-0.0513202138,
-0.0573043339,
0.052379597,
0.2560679913,
-0.2146289498,
0.0880449191,
-0.1322700977,
-0.1603739113,
-0.0199080314,
0.0104808677,
0.2611757517,
-0.169451803,
-0.4164373577,
0.1147027612,
0.1924513727,
0.2341752648,
0.00285948,
0.0696606487,
0.2455966324,
0.3264808953,
-0.3402525187,
0.0025064473,
-0.2539590597,
-0.1772052944,
0.2750906646,
-0.0635992885,
0.5535326004,
-0.0913140029,
-0.6092353463,
0.0851996467,
-0.0907429382,
-0.1220401153,
0.0167004,
0.350425899,
0.1556559056,
0.007623747,
0.3242086768,
0.3544692099,
-0.2622276247,
-0.0990956202,
-0.1103032902,
0.218539387,
-0.0110624461,
0.2203116119,
0.336728394,
-0.1516911983,
0.2326343805,
0.1329763532,
-0.0343419984,
-0.1373285949,
-0.06242726,
0.1760948747,
-0.3333291709,
0.116724506,
0.0138149438,
0.2963365614,
0.3627974391,
-0.1896023303,
-0.1238489598,
0.3359746933,
-0.5115239024,
-0.5266265869,
-0.1148847789,
0.1564935297,
-0.2748806179,
-0.0949093923,
-0.0207237098,
-0.2097216994,
0.2548091114,
-0.3180551231,
-0.0229650214,
-0.1040267274,
-0.5212676525,
-0.2807870209,
-0.0835549012,
0.6397892833,
-0.5403725505,
-0.0046032094,
-0.295984447,
0.065991655,
0.0528748073,
0.225285694,
-0.1808516383,
0.4837554097,
-0.492063731,
0.0551537015,
0.1831508726,
-0.4322175086,
-0.3191882074,
0.0916376337,
-0.3816460073,
0.3135974407,
0.178907305,
0.1348923594,
0.0342425667,
-0.0998479724,
-0.0080055827,
0.0334073454,
0.0391687863,
-0.1163590848,
-0.1003423706,
-0.1150629744,
0.295037061,
0.3189656734,
-0.0525987707,
-0.028480975,
0.0728864223,
-0.0832465068,
0.2127764672,
-0.1638175845,
-0.1320707053,
0.1578200459,
0.3294979334,
0.2000403106,
0.1325257123,
-0.0937299654,
-0.3722989857,
0.4385554194,
0.2032443285,
-0.0487934314,
0.0535551906,
-0.0575329736,
-0.3631984591,
-0.0736557692,
-0.4429956675,
-0.1980913728,
-0.0112996316,
0.234498933,
-0.0294581223,
-0.0375625342,
-0.1806126237,
0.4302510917,
-0.3583680391,
0.0738114864,
-0.280893445,
0.1908039302,
-0.0720524043,
-0.0913958251,
-0.095728673,
0.1119588614,
0.1296713054,
0.0004454649,
-0.0718531534,
0.3464572728,
0.3362162709,
-0.1385051459,
-0.0276071727,
0.0314185619,
-0.000874026,
-0.0213837381,
0.1846701503,
0.2478930503,
0.1665901393,
-0.189546898,
-0.0732961744,
0.1872238964,
-0.1838079542,
0.2477003634,
-0.0536600314,
-0.1778233796,
0.0044103623,
-0.0287913177,
0.1164985597,
-0.0432933904,
0.4287038743,
-0.1416190565,
0.3427115679,
0.0684484541,
0.0491025932,
-0.0600036308,
0.1305796653,
0.0284001697,
0.1086045057,
0.1169632822,
-0.0362802558,
0.1426836699,
-0.3513677716,
0.269113332,
0.8010325432,
0.0404969826,
-0.1698907465,
0.1790696532,
0.0917892829,
0.0040806667,
-0.0075928164,
-0.0389093943,
0.1517270505,
0.3422046304,
0.1113568842,
0.2531371415,
-0.0732817873,
-0.3762148619,
-0.0807917118,
0.3256630003,
-0.5139818788,
0.0058897519,
-0.2444292009,
-0.0086611994,
-0.3238432407,
-0.1037614867,
-0.2189124376,
-0.1865136176,
-0.0390641764,
0.1296097487,
-0.0096952934,
-0.0156512186,
-0.1402450353,
0.1979128122,
0.1155450866,
-0.2887756228,
0.1485815942,
-0.0220531542,
-0.1977472901,
-0.1064596772,
0.2596421242,
-0.0955130756,
0.1163766161,
-0.2262864709,
-0.0116095245,
-0.3291104436,
-0.2606188655,
-0.1494772732,
0.1949061155,
0.1227232143,
0.2664642632,
0.250947237,
0.3389137685,
-0.3548859656,
0.304135859,
-0.2651305795,
-0.292227298,
0.2627809942,
0.0242234021,
0.1615140587,
-0.0260515809,
-0.4274685383,
-0.2367953211,
-0.3845947087,
-0.1018422991,
0.0268563423,
0.2221177816,
0.2095913589,
0.0703783333,
0.0630868971,
0.118697308,
0.0982184857,
-0.1481312364,
-0.3428361714,
0.2690016627,
-0.1362374872,
-0.1334785372,
0.0459208675,
-0.040460065,
0.1930996627,
-0.0156030683,
-0.5530504584,
-0.2346849591,
-0.0609780997,
0.3486633003,
-0.2883739471,
-0.0819920972,
0.1984853894,
-0.1505386382,
0.083135955,
-0.1674244702,
-0.354555577,
0.0060314923,
0.0953259841,
0.235937506,
-0.1034483984,
0.4342650175,
-0.2289343327,
0.6846207976,
-0.0281376615,
-0.2245502472,
0.502378583,
-0.1753668189,
0.5141823888,
-0.1999612004,
-0.3403880894,
-0.1677145213,
-0.0122251092,
-0.2523525059,
0.2549048066,
0.0182497911,
0.0372754633,
-0.1112151742,
0.083911553,
-0.2190149873,
0.0138900746,
0.086210072,
0.1383640766,
-0.1046937108,
-0.0619935356,
0.1244759485,
-0.15227139,
-0.039342124,
0.0777745917,
0.55904603,
0.040041063,
0.040248245,
-0.1543803215,
-0.0125215966,
-0.0933564827,
0.3045858443,
-0.0115270577,
0.1328746229,
-0.0250478219,
-0.2271844447,
-0.0399391726,
0.0232708566,
0.5288301706,
-0.1383348554,
0.1191619933,
0.1253420562,
-0.0398853123,
-0.315358907,
-0.3329626918,
0.060594514,
0.3531076014,
0.2204869241,
0.4047226012,
0.0181249864,
0.0763320923,
0.2558168769,
0.2354893237,
-0.1243456751,
-0.6908111572,
-0.2238885164,
-0.1691916734,
-0.1979241371,
-0.2987077236,
-0.2118784934,
0.2319642007,
-0.1322768182,
0.2437669784,
0.0092543848,
-0.0067523187,
0.2009452134,
-0.0593399964,
0.1923035532,
-0.1493236423,
0.3419781923,
0.1606945544,
0.1553740203,
0.4738463759,
1.0460828543,
-0.2987023294,
-0.5206577778,
0.1743449271,
-0.1635493934,
0.0013160146,
0.3332732618,
0.0956372395,
-0.1864746511,
-0.0876409113,
-0.2176627666,
-0.1909016669,
0.0398273952,
0.1500074267,
-0.2489832193,
-0.2477912009,
-0.3432924151,
0.3437137604,
0.1472105831,
-0.026716765,
0.2497175485,
-0.1333468556,
-0.1335039884,
0.414185971,
-0.3278903365,
0.6894587278,
-0.2888528109,
0.2616025805,
0.29417184,
-0.101760447,
0.1873840839,
-0.1968717873,
-0.0567967743,
-0.489726156,
-0.295445323,
0.0277060457,
-0.0889889002,
0.0792131126,
0.2831928134,
-0.0213684253,
0.1173620671,
-0.2854599059,
0.4183548093,
0.0442407019,
0.2545039058,
-0.0981154591,
-0.1607904881,
-0.2577917278,
0.0828532204,
-0.0959760696,
0.3313871622,
-0.0761693716,
0.0332357995,
-0.3438396454,
-0.2139360607,
-0.2955716252,
0.2028531879,
-0.220159784,
0.1371570975,
-0.0171593707,
-0.2833602726,
0.1773760617,
0.4560714662,
0.1102348417,
-0.1432106346,
-0.0043118303,
0.0868066102,
0.1135705858,
0.0898202434,
-0.0103572346,
-0.3499321342,
0.2352135032,
0.1040661708,
-0.0565862544,
-0.0006308837,
-0.0424599275,
-0.2898243666,
-0.1391010284,
0.2750946283,
0.1124254838,
-0.4799054861,
-0.2134597152,
-0.2338911146,
0.2542508543,
-0.0420298316,
0.0446254462,
0.3107020855,
-0.1815201491,
-0.1395259798,
-0.094224371,
-0.4209417999,
0.0300346836,
0.3842089176,
0.0943759978,
-0.0534853563,
0.6861680746,
0.0392763764,
0.1193597391,
-0.1369948387,
0.2272263169,
0.4103616178,
-0.3568312228,
-0.0501770116,
0.0618524402,
0.1857267618,
0.2820476294,
-0.1663279384,
0.2463872582,
-0.0049660224,
0.0736386627,
-0.5253555775,
-0.1077332124,
-0.0219803378,
-0.042703405,
0.2536071539,
-0.2524228096,
-0.3137610555,
-0.2176107615,
0.0179139264,
-0.2071127892,
0.2714425623,
0.3271951973,
-0.1176347136,
0.2754459083,
0.1714000851,
0.0115936333,
-0.0307605024,
0.0912660435,
-0.1048602536,
-0.1376076192,
-0.1294652522,
-0.154789865,
0.1905358583,
-0.0030950361,
0.0942622125,
0.1430263817,
-0.2625870407,
0.0618264899,
-0.1332593858,
0.1347553134,
0.2704571486,
-0.1097748429,
-0.1180680767,
0.2326466739,
0.1366550475,
-0.1250838637,
0.3421866596,
-0.4030280411,
0.3870024383,
0.1938575357,
0.1176674441,
-0.165723145,
0.1553021967,
-0.0005825078,
-0.0795976371,
-0.0913875327,
0.1264935136,
0.0165001974,
-0.6233417988,
0.1582935601,
0.1304391176,
0.3265200853,
0.4585660398,
-0.4877650142,
-0.1050122008,
0.0963293388,
0.1551215649,
-0.1031349972,
0.1015435085,
0.5643359423,
0.0464820042,
-0.1642566472,
0.4624792933,
0.0674902797,
-0.0912216827,
0.0178594068,
-0.027062647,
0.4975489676,
0.0826210231,
0.3517022431,
0.2650982738,
-0.2606461942,
-0.0567992255,
0.1218463928,
0.1263975799,
0.0692646578,
0.5387529135,
-0.1648941189,
0.2388655394,
0.0917735994,
-0.1412543505,
0.1076890156,
-0.5711115599,
-0.0015080004,
0.1924998164,
0.0137380641,
-0.0449584164,
-0.0206038132,
0.2430924177,
-0.4190214276,
0.114593491,
-0.27127707,
-0.2365582436,
-0.075271599,
0.143229723,
-0.1065919325,
-0.2355138361,
-0.008267655,
-0.0387185104,
-0.0564136095,
-0.1213427857,
-0.1742845476,
0.0788545907,
-0.4962644279,
-0.4207937121,
-0.164188534,
0.1034594476,
-0.1008427739,
-0.2970194519,
0.2939696312,
0.2332120538,
-0.1196255088,
0.534101665,
0.1225781366,
0.7431434989,
0.616733551,
-0.1459566057,
0.0138448495,
-0.2328450829,
0.0353545062,
0.0722347572,
-0.0457608402,
-0.0701700151,
0.040517278,
0.3241594732,
0.0949984267,
-0.0077846372,
0.1271944642,
0.396053493,
0.2972893417,
-0.3929401934,
-0.0737176463,
-0.3291742206,
0.1605654508,
-0.2225062102,
0.2770186365,
-0.341632396,
-0.2148325741,
0.168130517,
0.4010599256,
0.2058335394,
0.1604490876,
0.0326092616,
-0.0585586578,
0.063000679,
0.4953664243,
0.0183691774,
-0.3543061018,
-0.0270194653,
-0.7557730079,
0.3723703623,
-0.3508510888,
-0.225160718,
-0.2059901506,
0.2012235671,
-0.0333268829,
-0.0274120588,
0.5327728987,
-0.0530163832,
0.027360389,
0.2849693298,
-0.4644875228,
-0.440334022,
0.1245530546,
-0.0847929493,
-0.0689240396,
-0.2968159318,
-0.2567429245,
-0.1364099979,
-0.023192618,
0.1224788278,
-0.0975103676,
0.1170932651,
0.1715443879,
0.4463058114,
-0.1893985718,
0.5821204782,
0.1693341881,
-0.2427995205,
-0.3935718536,
-0.1685696095,
-0.221527949,
0.4302474856,
0.1876526922,
0.4727033973,
-0.2618691623,
-0.2200351208,
-0.3228354156,
0.2036501318,
-0.1437960714,
-0.0432882421,
-0.0449991263,
0.1778973937,
-0.0409729369,
0.1039964333,
0.2001200169,
-0.0216210485,
0.0891022831,
0.3200951815,
-0.1291348338,
-0.2527155876,
0.5629218221,
-0.2602697015,
-0.095239751,
-0.1059986278,
0.2764508128,
-0.264375627,
0.3012577891,
-0.3279078901,
0.0294494163,
0.3732500672,
-0.1372846216,
-0.1196619943,
-0.0060263234,
-0.1935357302,
-0.0214499682,
0.0480176806,
0.2041410208,
-0.0916028842,
-0.1468946338,
0.112221919,
-0.1934187561
] |
https://github.com/huggingface/datasets/issues/3122 | OSError with a custom dataset loading script | Hi,
I just tried to download the `classla/janes_tag` dataset, and this time the zip file is extracted correctly. However, the script is now throwing the IndexError, probably due to a bug in the `_generate_examples`.
Let me know if you are still getting the same error. | ## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
| 45 | OSError with a custom dataset loading script
## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
Hi,
I just tried to download the `classla/janes_tag` dataset, and this time the zip file is extracted correctly. However, the script is now throwing the IndexError, probably due to a bug in the `_generate_examples`.
Let me know if you are still getting the same error. | [
-0.112895906,
0.2815282643,
-0.0133344699,
0.3955747485,
0.2419006526,
0.1173843443,
0.4183782637,
0.3338419795,
0.3993054032,
0.1943427771,
-0.2293032855,
0.3192374408,
-0.2365900278,
-0.0586514659,
-0.0276410375,
0.0171539448,
-0.114003703,
0.1235067323,
0.0152645279,
0.0538214445,
-0.2668658197,
0.1890420318,
0.0730200857,
0.1165180579,
-0.1524644047,
0.2888300717,
-0.3055677116,
0.606216073,
-0.1058223769,
-0.4976428449,
0.411575675,
-0.0848033205,
0.3153781593,
0.9328231812,
-0.0001182188,
0.2439122945,
0.1822360158,
-0.1082936302,
-0.3610415757,
-0.3233252168,
0.1418730766,
-0.0559698604,
0.0167580228,
-0.2509720027,
0.1073099449,
-0.1073530763,
-0.0638049021,
-0.3272553384,
0.1470366567,
0.2430463284,
0.1508886814,
-0.0782090202,
-0.2656308413,
-0.3175558746,
0.230467245,
0.3083329499,
0.145418644,
0.3459366262,
0.2215478122,
-0.2759934962,
-0.0904204771,
-0.0664641038,
-0.1675291657,
0.1449217647,
0.2412748784,
0.2274577469,
-0.0587953329,
-0.1350417137,
0.0041873376,
0.3970923722,
0.6253730059,
-0.1800610423,
-0.3252731264,
-0.1314567924,
0.0302402582,
-0.2941180468,
0.3250660002,
0.2082558572,
-0.1266012192,
0.0780132189,
0.1090787128,
0.1126024351,
-0.1752080321,
0.3246008456,
-0.1998942047,
0.09765926,
0.0400920585,
0.0607717596,
0.0194339044,
-0.0370794237,
-0.0513202138,
-0.0573043339,
0.052379597,
0.2560679913,
-0.2146289498,
0.0880449191,
-0.1322700977,
-0.1603739113,
-0.0199080314,
0.0104808677,
0.2611757517,
-0.169451803,
-0.4164373577,
0.1147027612,
0.1924513727,
0.2341752648,
0.00285948,
0.0696606487,
0.2455966324,
0.3264808953,
-0.3402525187,
0.0025064473,
-0.2539590597,
-0.1772052944,
0.2750906646,
-0.0635992885,
0.5535326004,
-0.0913140029,
-0.6092353463,
0.0851996467,
-0.0907429382,
-0.1220401153,
0.0167004,
0.350425899,
0.1556559056,
0.007623747,
0.3242086768,
0.3544692099,
-0.2622276247,
-0.0990956202,
-0.1103032902,
0.218539387,
-0.0110624461,
0.2203116119,
0.336728394,
-0.1516911983,
0.2326343805,
0.1329763532,
-0.0343419984,
-0.1373285949,
-0.06242726,
0.1760948747,
-0.3333291709,
0.116724506,
0.0138149438,
0.2963365614,
0.3627974391,
-0.1896023303,
-0.1238489598,
0.3359746933,
-0.5115239024,
-0.5266265869,
-0.1148847789,
0.1564935297,
-0.2748806179,
-0.0949093923,
-0.0207237098,
-0.2097216994,
0.2548091114,
-0.3180551231,
-0.0229650214,
-0.1040267274,
-0.5212676525,
-0.2807870209,
-0.0835549012,
0.6397892833,
-0.5403725505,
-0.0046032094,
-0.295984447,
0.065991655,
0.0528748073,
0.225285694,
-0.1808516383,
0.4837554097,
-0.492063731,
0.0551537015,
0.1831508726,
-0.4322175086,
-0.3191882074,
0.0916376337,
-0.3816460073,
0.3135974407,
0.178907305,
0.1348923594,
0.0342425667,
-0.0998479724,
-0.0080055827,
0.0334073454,
0.0391687863,
-0.1163590848,
-0.1003423706,
-0.1150629744,
0.295037061,
0.3189656734,
-0.0525987707,
-0.028480975,
0.0728864223,
-0.0832465068,
0.2127764672,
-0.1638175845,
-0.1320707053,
0.1578200459,
0.3294979334,
0.2000403106,
0.1325257123,
-0.0937299654,
-0.3722989857,
0.4385554194,
0.2032443285,
-0.0487934314,
0.0535551906,
-0.0575329736,
-0.3631984591,
-0.0736557692,
-0.4429956675,
-0.1980913728,
-0.0112996316,
0.234498933,
-0.0294581223,
-0.0375625342,
-0.1806126237,
0.4302510917,
-0.3583680391,
0.0738114864,
-0.280893445,
0.1908039302,
-0.0720524043,
-0.0913958251,
-0.095728673,
0.1119588614,
0.1296713054,
0.0004454649,
-0.0718531534,
0.3464572728,
0.3362162709,
-0.1385051459,
-0.0276071727,
0.0314185619,
-0.000874026,
-0.0213837381,
0.1846701503,
0.2478930503,
0.1665901393,
-0.189546898,
-0.0732961744,
0.1872238964,
-0.1838079542,
0.2477003634,
-0.0536600314,
-0.1778233796,
0.0044103623,
-0.0287913177,
0.1164985597,
-0.0432933904,
0.4287038743,
-0.1416190565,
0.3427115679,
0.0684484541,
0.0491025932,
-0.0600036308,
0.1305796653,
0.0284001697,
0.1086045057,
0.1169632822,
-0.0362802558,
0.1426836699,
-0.3513677716,
0.269113332,
0.8010325432,
0.0404969826,
-0.1698907465,
0.1790696532,
0.0917892829,
0.0040806667,
-0.0075928164,
-0.0389093943,
0.1517270505,
0.3422046304,
0.1113568842,
0.2531371415,
-0.0732817873,
-0.3762148619,
-0.0807917118,
0.3256630003,
-0.5139818788,
0.0058897519,
-0.2444292009,
-0.0086611994,
-0.3238432407,
-0.1037614867,
-0.2189124376,
-0.1865136176,
-0.0390641764,
0.1296097487,
-0.0096952934,
-0.0156512186,
-0.1402450353,
0.1979128122,
0.1155450866,
-0.2887756228,
0.1485815942,
-0.0220531542,
-0.1977472901,
-0.1064596772,
0.2596421242,
-0.0955130756,
0.1163766161,
-0.2262864709,
-0.0116095245,
-0.3291104436,
-0.2606188655,
-0.1494772732,
0.1949061155,
0.1227232143,
0.2664642632,
0.250947237,
0.3389137685,
-0.3548859656,
0.304135859,
-0.2651305795,
-0.292227298,
0.2627809942,
0.0242234021,
0.1615140587,
-0.0260515809,
-0.4274685383,
-0.2367953211,
-0.3845947087,
-0.1018422991,
0.0268563423,
0.2221177816,
0.2095913589,
0.0703783333,
0.0630868971,
0.118697308,
0.0982184857,
-0.1481312364,
-0.3428361714,
0.2690016627,
-0.1362374872,
-0.1334785372,
0.0459208675,
-0.040460065,
0.1930996627,
-0.0156030683,
-0.5530504584,
-0.2346849591,
-0.0609780997,
0.3486633003,
-0.2883739471,
-0.0819920972,
0.1984853894,
-0.1505386382,
0.083135955,
-0.1674244702,
-0.354555577,
0.0060314923,
0.0953259841,
0.235937506,
-0.1034483984,
0.4342650175,
-0.2289343327,
0.6846207976,
-0.0281376615,
-0.2245502472,
0.502378583,
-0.1753668189,
0.5141823888,
-0.1999612004,
-0.3403880894,
-0.1677145213,
-0.0122251092,
-0.2523525059,
0.2549048066,
0.0182497911,
0.0372754633,
-0.1112151742,
0.083911553,
-0.2190149873,
0.0138900746,
0.086210072,
0.1383640766,
-0.1046937108,
-0.0619935356,
0.1244759485,
-0.15227139,
-0.039342124,
0.0777745917,
0.55904603,
0.040041063,
0.040248245,
-0.1543803215,
-0.0125215966,
-0.0933564827,
0.3045858443,
-0.0115270577,
0.1328746229,
-0.0250478219,
-0.2271844447,
-0.0399391726,
0.0232708566,
0.5288301706,
-0.1383348554,
0.1191619933,
0.1253420562,
-0.0398853123,
-0.315358907,
-0.3329626918,
0.060594514,
0.3531076014,
0.2204869241,
0.4047226012,
0.0181249864,
0.0763320923,
0.2558168769,
0.2354893237,
-0.1243456751,
-0.6908111572,
-0.2238885164,
-0.1691916734,
-0.1979241371,
-0.2987077236,
-0.2118784934,
0.2319642007,
-0.1322768182,
0.2437669784,
0.0092543848,
-0.0067523187,
0.2009452134,
-0.0593399964,
0.1923035532,
-0.1493236423,
0.3419781923,
0.1606945544,
0.1553740203,
0.4738463759,
1.0460828543,
-0.2987023294,
-0.5206577778,
0.1743449271,
-0.1635493934,
0.0013160146,
0.3332732618,
0.0956372395,
-0.1864746511,
-0.0876409113,
-0.2176627666,
-0.1909016669,
0.0398273952,
0.1500074267,
-0.2489832193,
-0.2477912009,
-0.3432924151,
0.3437137604,
0.1472105831,
-0.026716765,
0.2497175485,
-0.1333468556,
-0.1335039884,
0.414185971,
-0.3278903365,
0.6894587278,
-0.2888528109,
0.2616025805,
0.29417184,
-0.101760447,
0.1873840839,
-0.1968717873,
-0.0567967743,
-0.489726156,
-0.295445323,
0.0277060457,
-0.0889889002,
0.0792131126,
0.2831928134,
-0.0213684253,
0.1173620671,
-0.2854599059,
0.4183548093,
0.0442407019,
0.2545039058,
-0.0981154591,
-0.1607904881,
-0.2577917278,
0.0828532204,
-0.0959760696,
0.3313871622,
-0.0761693716,
0.0332357995,
-0.3438396454,
-0.2139360607,
-0.2955716252,
0.2028531879,
-0.220159784,
0.1371570975,
-0.0171593707,
-0.2833602726,
0.1773760617,
0.4560714662,
0.1102348417,
-0.1432106346,
-0.0043118303,
0.0868066102,
0.1135705858,
0.0898202434,
-0.0103572346,
-0.3499321342,
0.2352135032,
0.1040661708,
-0.0565862544,
-0.0006308837,
-0.0424599275,
-0.2898243666,
-0.1391010284,
0.2750946283,
0.1124254838,
-0.4799054861,
-0.2134597152,
-0.2338911146,
0.2542508543,
-0.0420298316,
0.0446254462,
0.3107020855,
-0.1815201491,
-0.1395259798,
-0.094224371,
-0.4209417999,
0.0300346836,
0.3842089176,
0.0943759978,
-0.0534853563,
0.6861680746,
0.0392763764,
0.1193597391,
-0.1369948387,
0.2272263169,
0.4103616178,
-0.3568312228,
-0.0501770116,
0.0618524402,
0.1857267618,
0.2820476294,
-0.1663279384,
0.2463872582,
-0.0049660224,
0.0736386627,
-0.5253555775,
-0.1077332124,
-0.0219803378,
-0.042703405,
0.2536071539,
-0.2524228096,
-0.3137610555,
-0.2176107615,
0.0179139264,
-0.2071127892,
0.2714425623,
0.3271951973,
-0.1176347136,
0.2754459083,
0.1714000851,
0.0115936333,
-0.0307605024,
0.0912660435,
-0.1048602536,
-0.1376076192,
-0.1294652522,
-0.154789865,
0.1905358583,
-0.0030950361,
0.0942622125,
0.1430263817,
-0.2625870407,
0.0618264899,
-0.1332593858,
0.1347553134,
0.2704571486,
-0.1097748429,
-0.1180680767,
0.2326466739,
0.1366550475,
-0.1250838637,
0.3421866596,
-0.4030280411,
0.3870024383,
0.1938575357,
0.1176674441,
-0.165723145,
0.1553021967,
-0.0005825078,
-0.0795976371,
-0.0913875327,
0.1264935136,
0.0165001974,
-0.6233417988,
0.1582935601,
0.1304391176,
0.3265200853,
0.4585660398,
-0.4877650142,
-0.1050122008,
0.0963293388,
0.1551215649,
-0.1031349972,
0.1015435085,
0.5643359423,
0.0464820042,
-0.1642566472,
0.4624792933,
0.0674902797,
-0.0912216827,
0.0178594068,
-0.027062647,
0.4975489676,
0.0826210231,
0.3517022431,
0.2650982738,
-0.2606461942,
-0.0567992255,
0.1218463928,
0.1263975799,
0.0692646578,
0.5387529135,
-0.1648941189,
0.2388655394,
0.0917735994,
-0.1412543505,
0.1076890156,
-0.5711115599,
-0.0015080004,
0.1924998164,
0.0137380641,
-0.0449584164,
-0.0206038132,
0.2430924177,
-0.4190214276,
0.114593491,
-0.27127707,
-0.2365582436,
-0.075271599,
0.143229723,
-0.1065919325,
-0.2355138361,
-0.008267655,
-0.0387185104,
-0.0564136095,
-0.1213427857,
-0.1742845476,
0.0788545907,
-0.4962644279,
-0.4207937121,
-0.164188534,
0.1034594476,
-0.1008427739,
-0.2970194519,
0.2939696312,
0.2332120538,
-0.1196255088,
0.534101665,
0.1225781366,
0.7431434989,
0.616733551,
-0.1459566057,
0.0138448495,
-0.2328450829,
0.0353545062,
0.0722347572,
-0.0457608402,
-0.0701700151,
0.040517278,
0.3241594732,
0.0949984267,
-0.0077846372,
0.1271944642,
0.396053493,
0.2972893417,
-0.3929401934,
-0.0737176463,
-0.3291742206,
0.1605654508,
-0.2225062102,
0.2770186365,
-0.341632396,
-0.2148325741,
0.168130517,
0.4010599256,
0.2058335394,
0.1604490876,
0.0326092616,
-0.0585586578,
0.063000679,
0.4953664243,
0.0183691774,
-0.3543061018,
-0.0270194653,
-0.7557730079,
0.3723703623,
-0.3508510888,
-0.225160718,
-0.2059901506,
0.2012235671,
-0.0333268829,
-0.0274120588,
0.5327728987,
-0.0530163832,
0.027360389,
0.2849693298,
-0.4644875228,
-0.440334022,
0.1245530546,
-0.0847929493,
-0.0689240396,
-0.2968159318,
-0.2567429245,
-0.1364099979,
-0.023192618,
0.1224788278,
-0.0975103676,
0.1170932651,
0.1715443879,
0.4463058114,
-0.1893985718,
0.5821204782,
0.1693341881,
-0.2427995205,
-0.3935718536,
-0.1685696095,
-0.221527949,
0.4302474856,
0.1876526922,
0.4727033973,
-0.2618691623,
-0.2200351208,
-0.3228354156,
0.2036501318,
-0.1437960714,
-0.0432882421,
-0.0449991263,
0.1778973937,
-0.0409729369,
0.1039964333,
0.2001200169,
-0.0216210485,
0.0891022831,
0.3200951815,
-0.1291348338,
-0.2527155876,
0.5629218221,
-0.2602697015,
-0.095239751,
-0.1059986278,
0.2764508128,
-0.264375627,
0.3012577891,
-0.3279078901,
0.0294494163,
0.3732500672,
-0.1372846216,
-0.1196619943,
-0.0060263234,
-0.1935357302,
-0.0214499682,
0.0480176806,
0.2041410208,
-0.0916028842,
-0.1468946338,
0.112221919,
-0.1934187561
] |
https://github.com/huggingface/datasets/issues/3122 | OSError with a custom dataset loading script | Hi,
could you try to download the dataset with a different `cache_dir` like so:
```python
import datasets
dataset = datasets.load_dataset('classla/janes_tag', split='validation', cache_dir="path/to/different/cache/dir")
```
If this works, then most likely the cached extracted data is causing issues. This data is stored at `~/.cache/huggingface/datasets/downloads/extracted` and needs to be deleted, and then it should work (you can easily locate the directory with the path given in the `OSError` message). Additionally, I'd suggest you to update `datasets` to the newest version with:
```
pip install -U datasets
``` | ## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
| 84 | OSError with a custom dataset loading script
## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
Hi,
could you try to download the dataset with a different `cache_dir` like so:
```python
import datasets
dataset = datasets.load_dataset('classla/janes_tag', split='validation', cache_dir="path/to/different/cache/dir")
```
If this works, then most likely the cached extracted data is causing issues. This data is stored at `~/.cache/huggingface/datasets/downloads/extracted` and needs to be deleted, and then it should work (you can easily locate the directory with the path given in the `OSError` message). Additionally, I'd suggest you to update `datasets` to the newest version with:
```
pip install -U datasets
``` | [
-0.112895906,
0.2815282643,
-0.0133344699,
0.3955747485,
0.2419006526,
0.1173843443,
0.4183782637,
0.3338419795,
0.3993054032,
0.1943427771,
-0.2293032855,
0.3192374408,
-0.2365900278,
-0.0586514659,
-0.0276410375,
0.0171539448,
-0.114003703,
0.1235067323,
0.0152645279,
0.0538214445,
-0.2668658197,
0.1890420318,
0.0730200857,
0.1165180579,
-0.1524644047,
0.2888300717,
-0.3055677116,
0.606216073,
-0.1058223769,
-0.4976428449,
0.411575675,
-0.0848033205,
0.3153781593,
0.9328231812,
-0.0001182188,
0.2439122945,
0.1822360158,
-0.1082936302,
-0.3610415757,
-0.3233252168,
0.1418730766,
-0.0559698604,
0.0167580228,
-0.2509720027,
0.1073099449,
-0.1073530763,
-0.0638049021,
-0.3272553384,
0.1470366567,
0.2430463284,
0.1508886814,
-0.0782090202,
-0.2656308413,
-0.3175558746,
0.230467245,
0.3083329499,
0.145418644,
0.3459366262,
0.2215478122,
-0.2759934962,
-0.0904204771,
-0.0664641038,
-0.1675291657,
0.1449217647,
0.2412748784,
0.2274577469,
-0.0587953329,
-0.1350417137,
0.0041873376,
0.3970923722,
0.6253730059,
-0.1800610423,
-0.3252731264,
-0.1314567924,
0.0302402582,
-0.2941180468,
0.3250660002,
0.2082558572,
-0.1266012192,
0.0780132189,
0.1090787128,
0.1126024351,
-0.1752080321,
0.3246008456,
-0.1998942047,
0.09765926,
0.0400920585,
0.0607717596,
0.0194339044,
-0.0370794237,
-0.0513202138,
-0.0573043339,
0.052379597,
0.2560679913,
-0.2146289498,
0.0880449191,
-0.1322700977,
-0.1603739113,
-0.0199080314,
0.0104808677,
0.2611757517,
-0.169451803,
-0.4164373577,
0.1147027612,
0.1924513727,
0.2341752648,
0.00285948,
0.0696606487,
0.2455966324,
0.3264808953,
-0.3402525187,
0.0025064473,
-0.2539590597,
-0.1772052944,
0.2750906646,
-0.0635992885,
0.5535326004,
-0.0913140029,
-0.6092353463,
0.0851996467,
-0.0907429382,
-0.1220401153,
0.0167004,
0.350425899,
0.1556559056,
0.007623747,
0.3242086768,
0.3544692099,
-0.2622276247,
-0.0990956202,
-0.1103032902,
0.218539387,
-0.0110624461,
0.2203116119,
0.336728394,
-0.1516911983,
0.2326343805,
0.1329763532,
-0.0343419984,
-0.1373285949,
-0.06242726,
0.1760948747,
-0.3333291709,
0.116724506,
0.0138149438,
0.2963365614,
0.3627974391,
-0.1896023303,
-0.1238489598,
0.3359746933,
-0.5115239024,
-0.5266265869,
-0.1148847789,
0.1564935297,
-0.2748806179,
-0.0949093923,
-0.0207237098,
-0.2097216994,
0.2548091114,
-0.3180551231,
-0.0229650214,
-0.1040267274,
-0.5212676525,
-0.2807870209,
-0.0835549012,
0.6397892833,
-0.5403725505,
-0.0046032094,
-0.295984447,
0.065991655,
0.0528748073,
0.225285694,
-0.1808516383,
0.4837554097,
-0.492063731,
0.0551537015,
0.1831508726,
-0.4322175086,
-0.3191882074,
0.0916376337,
-0.3816460073,
0.3135974407,
0.178907305,
0.1348923594,
0.0342425667,
-0.0998479724,
-0.0080055827,
0.0334073454,
0.0391687863,
-0.1163590848,
-0.1003423706,
-0.1150629744,
0.295037061,
0.3189656734,
-0.0525987707,
-0.028480975,
0.0728864223,
-0.0832465068,
0.2127764672,
-0.1638175845,
-0.1320707053,
0.1578200459,
0.3294979334,
0.2000403106,
0.1325257123,
-0.0937299654,
-0.3722989857,
0.4385554194,
0.2032443285,
-0.0487934314,
0.0535551906,
-0.0575329736,
-0.3631984591,
-0.0736557692,
-0.4429956675,
-0.1980913728,
-0.0112996316,
0.234498933,
-0.0294581223,
-0.0375625342,
-0.1806126237,
0.4302510917,
-0.3583680391,
0.0738114864,
-0.280893445,
0.1908039302,
-0.0720524043,
-0.0913958251,
-0.095728673,
0.1119588614,
0.1296713054,
0.0004454649,
-0.0718531534,
0.3464572728,
0.3362162709,
-0.1385051459,
-0.0276071727,
0.0314185619,
-0.000874026,
-0.0213837381,
0.1846701503,
0.2478930503,
0.1665901393,
-0.189546898,
-0.0732961744,
0.1872238964,
-0.1838079542,
0.2477003634,
-0.0536600314,
-0.1778233796,
0.0044103623,
-0.0287913177,
0.1164985597,
-0.0432933904,
0.4287038743,
-0.1416190565,
0.3427115679,
0.0684484541,
0.0491025932,
-0.0600036308,
0.1305796653,
0.0284001697,
0.1086045057,
0.1169632822,
-0.0362802558,
0.1426836699,
-0.3513677716,
0.269113332,
0.8010325432,
0.0404969826,
-0.1698907465,
0.1790696532,
0.0917892829,
0.0040806667,
-0.0075928164,
-0.0389093943,
0.1517270505,
0.3422046304,
0.1113568842,
0.2531371415,
-0.0732817873,
-0.3762148619,
-0.0807917118,
0.3256630003,
-0.5139818788,
0.0058897519,
-0.2444292009,
-0.0086611994,
-0.3238432407,
-0.1037614867,
-0.2189124376,
-0.1865136176,
-0.0390641764,
0.1296097487,
-0.0096952934,
-0.0156512186,
-0.1402450353,
0.1979128122,
0.1155450866,
-0.2887756228,
0.1485815942,
-0.0220531542,
-0.1977472901,
-0.1064596772,
0.2596421242,
-0.0955130756,
0.1163766161,
-0.2262864709,
-0.0116095245,
-0.3291104436,
-0.2606188655,
-0.1494772732,
0.1949061155,
0.1227232143,
0.2664642632,
0.250947237,
0.3389137685,
-0.3548859656,
0.304135859,
-0.2651305795,
-0.292227298,
0.2627809942,
0.0242234021,
0.1615140587,
-0.0260515809,
-0.4274685383,
-0.2367953211,
-0.3845947087,
-0.1018422991,
0.0268563423,
0.2221177816,
0.2095913589,
0.0703783333,
0.0630868971,
0.118697308,
0.0982184857,
-0.1481312364,
-0.3428361714,
0.2690016627,
-0.1362374872,
-0.1334785372,
0.0459208675,
-0.040460065,
0.1930996627,
-0.0156030683,
-0.5530504584,
-0.2346849591,
-0.0609780997,
0.3486633003,
-0.2883739471,
-0.0819920972,
0.1984853894,
-0.1505386382,
0.083135955,
-0.1674244702,
-0.354555577,
0.0060314923,
0.0953259841,
0.235937506,
-0.1034483984,
0.4342650175,
-0.2289343327,
0.6846207976,
-0.0281376615,
-0.2245502472,
0.502378583,
-0.1753668189,
0.5141823888,
-0.1999612004,
-0.3403880894,
-0.1677145213,
-0.0122251092,
-0.2523525059,
0.2549048066,
0.0182497911,
0.0372754633,
-0.1112151742,
0.083911553,
-0.2190149873,
0.0138900746,
0.086210072,
0.1383640766,
-0.1046937108,
-0.0619935356,
0.1244759485,
-0.15227139,
-0.039342124,
0.0777745917,
0.55904603,
0.040041063,
0.040248245,
-0.1543803215,
-0.0125215966,
-0.0933564827,
0.3045858443,
-0.0115270577,
0.1328746229,
-0.0250478219,
-0.2271844447,
-0.0399391726,
0.0232708566,
0.5288301706,
-0.1383348554,
0.1191619933,
0.1253420562,
-0.0398853123,
-0.315358907,
-0.3329626918,
0.060594514,
0.3531076014,
0.2204869241,
0.4047226012,
0.0181249864,
0.0763320923,
0.2558168769,
0.2354893237,
-0.1243456751,
-0.6908111572,
-0.2238885164,
-0.1691916734,
-0.1979241371,
-0.2987077236,
-0.2118784934,
0.2319642007,
-0.1322768182,
0.2437669784,
0.0092543848,
-0.0067523187,
0.2009452134,
-0.0593399964,
0.1923035532,
-0.1493236423,
0.3419781923,
0.1606945544,
0.1553740203,
0.4738463759,
1.0460828543,
-0.2987023294,
-0.5206577778,
0.1743449271,
-0.1635493934,
0.0013160146,
0.3332732618,
0.0956372395,
-0.1864746511,
-0.0876409113,
-0.2176627666,
-0.1909016669,
0.0398273952,
0.1500074267,
-0.2489832193,
-0.2477912009,
-0.3432924151,
0.3437137604,
0.1472105831,
-0.026716765,
0.2497175485,
-0.1333468556,
-0.1335039884,
0.414185971,
-0.3278903365,
0.6894587278,
-0.2888528109,
0.2616025805,
0.29417184,
-0.101760447,
0.1873840839,
-0.1968717873,
-0.0567967743,
-0.489726156,
-0.295445323,
0.0277060457,
-0.0889889002,
0.0792131126,
0.2831928134,
-0.0213684253,
0.1173620671,
-0.2854599059,
0.4183548093,
0.0442407019,
0.2545039058,
-0.0981154591,
-0.1607904881,
-0.2577917278,
0.0828532204,
-0.0959760696,
0.3313871622,
-0.0761693716,
0.0332357995,
-0.3438396454,
-0.2139360607,
-0.2955716252,
0.2028531879,
-0.220159784,
0.1371570975,
-0.0171593707,
-0.2833602726,
0.1773760617,
0.4560714662,
0.1102348417,
-0.1432106346,
-0.0043118303,
0.0868066102,
0.1135705858,
0.0898202434,
-0.0103572346,
-0.3499321342,
0.2352135032,
0.1040661708,
-0.0565862544,
-0.0006308837,
-0.0424599275,
-0.2898243666,
-0.1391010284,
0.2750946283,
0.1124254838,
-0.4799054861,
-0.2134597152,
-0.2338911146,
0.2542508543,
-0.0420298316,
0.0446254462,
0.3107020855,
-0.1815201491,
-0.1395259798,
-0.094224371,
-0.4209417999,
0.0300346836,
0.3842089176,
0.0943759978,
-0.0534853563,
0.6861680746,
0.0392763764,
0.1193597391,
-0.1369948387,
0.2272263169,
0.4103616178,
-0.3568312228,
-0.0501770116,
0.0618524402,
0.1857267618,
0.2820476294,
-0.1663279384,
0.2463872582,
-0.0049660224,
0.0736386627,
-0.5253555775,
-0.1077332124,
-0.0219803378,
-0.042703405,
0.2536071539,
-0.2524228096,
-0.3137610555,
-0.2176107615,
0.0179139264,
-0.2071127892,
0.2714425623,
0.3271951973,
-0.1176347136,
0.2754459083,
0.1714000851,
0.0115936333,
-0.0307605024,
0.0912660435,
-0.1048602536,
-0.1376076192,
-0.1294652522,
-0.154789865,
0.1905358583,
-0.0030950361,
0.0942622125,
0.1430263817,
-0.2625870407,
0.0618264899,
-0.1332593858,
0.1347553134,
0.2704571486,
-0.1097748429,
-0.1180680767,
0.2326466739,
0.1366550475,
-0.1250838637,
0.3421866596,
-0.4030280411,
0.3870024383,
0.1938575357,
0.1176674441,
-0.165723145,
0.1553021967,
-0.0005825078,
-0.0795976371,
-0.0913875327,
0.1264935136,
0.0165001974,
-0.6233417988,
0.1582935601,
0.1304391176,
0.3265200853,
0.4585660398,
-0.4877650142,
-0.1050122008,
0.0963293388,
0.1551215649,
-0.1031349972,
0.1015435085,
0.5643359423,
0.0464820042,
-0.1642566472,
0.4624792933,
0.0674902797,
-0.0912216827,
0.0178594068,
-0.027062647,
0.4975489676,
0.0826210231,
0.3517022431,
0.2650982738,
-0.2606461942,
-0.0567992255,
0.1218463928,
0.1263975799,
0.0692646578,
0.5387529135,
-0.1648941189,
0.2388655394,
0.0917735994,
-0.1412543505,
0.1076890156,
-0.5711115599,
-0.0015080004,
0.1924998164,
0.0137380641,
-0.0449584164,
-0.0206038132,
0.2430924177,
-0.4190214276,
0.114593491,
-0.27127707,
-0.2365582436,
-0.075271599,
0.143229723,
-0.1065919325,
-0.2355138361,
-0.008267655,
-0.0387185104,
-0.0564136095,
-0.1213427857,
-0.1742845476,
0.0788545907,
-0.4962644279,
-0.4207937121,
-0.164188534,
0.1034594476,
-0.1008427739,
-0.2970194519,
0.2939696312,
0.2332120538,
-0.1196255088,
0.534101665,
0.1225781366,
0.7431434989,
0.616733551,
-0.1459566057,
0.0138448495,
-0.2328450829,
0.0353545062,
0.0722347572,
-0.0457608402,
-0.0701700151,
0.040517278,
0.3241594732,
0.0949984267,
-0.0077846372,
0.1271944642,
0.396053493,
0.2972893417,
-0.3929401934,
-0.0737176463,
-0.3291742206,
0.1605654508,
-0.2225062102,
0.2770186365,
-0.341632396,
-0.2148325741,
0.168130517,
0.4010599256,
0.2058335394,
0.1604490876,
0.0326092616,
-0.0585586578,
0.063000679,
0.4953664243,
0.0183691774,
-0.3543061018,
-0.0270194653,
-0.7557730079,
0.3723703623,
-0.3508510888,
-0.225160718,
-0.2059901506,
0.2012235671,
-0.0333268829,
-0.0274120588,
0.5327728987,
-0.0530163832,
0.027360389,
0.2849693298,
-0.4644875228,
-0.440334022,
0.1245530546,
-0.0847929493,
-0.0689240396,
-0.2968159318,
-0.2567429245,
-0.1364099979,
-0.023192618,
0.1224788278,
-0.0975103676,
0.1170932651,
0.1715443879,
0.4463058114,
-0.1893985718,
0.5821204782,
0.1693341881,
-0.2427995205,
-0.3935718536,
-0.1685696095,
-0.221527949,
0.4302474856,
0.1876526922,
0.4727033973,
-0.2618691623,
-0.2200351208,
-0.3228354156,
0.2036501318,
-0.1437960714,
-0.0432882421,
-0.0449991263,
0.1778973937,
-0.0409729369,
0.1039964333,
0.2001200169,
-0.0216210485,
0.0891022831,
0.3200951815,
-0.1291348338,
-0.2527155876,
0.5629218221,
-0.2602697015,
-0.095239751,
-0.1059986278,
0.2764508128,
-0.264375627,
0.3012577891,
-0.3279078901,
0.0294494163,
0.3732500672,
-0.1372846216,
-0.1196619943,
-0.0060263234,
-0.1935357302,
-0.0214499682,
0.0480176806,
0.2041410208,
-0.0916028842,
-0.1468946338,
0.112221919,
-0.1934187561
] |
https://github.com/huggingface/datasets/issues/3122 | OSError with a custom dataset loading script | Thank you, deleting the `~/.cache/huggingface/datasets/downloads/extracted` directory helped. However, I am still having problems.
There was indeed a bug in the script that was throwing an `IndexError`, which I have now corrected (added the condition to skip the lines starting with '# text') and it is working locally, but still throws an error when I try to load the dataset from HuggingFace. I literally copied and pasted the `_generate_examples` function and ran it on the `dev_all.conllup` file, which I even re-downloaded from the repository to be certain that the files are exactly the same. I also deleted everything again just in case, but it didn't help. The code works locally, but throws an `IndexError` when loading from `datasets.` | ## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
| 117 | OSError with a custom dataset loading script
## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
Thank you, deleting the `~/.cache/huggingface/datasets/downloads/extracted` directory helped. However, I am still having problems.
There was indeed a bug in the script that was throwing an `IndexError`, which I have now corrected (added the condition to skip the lines starting with '# text') and it is working locally, but still throws an error when I try to load the dataset from HuggingFace. I literally copied and pasted the `_generate_examples` function and ran it on the `dev_all.conllup` file, which I even re-downloaded from the repository to be certain that the files are exactly the same. I also deleted everything again just in case, but it didn't help. The code works locally, but throws an `IndexError` when loading from `datasets.` | [
-0.112895906,
0.2815282643,
-0.0133344699,
0.3955747485,
0.2419006526,
0.1173843443,
0.4183782637,
0.3338419795,
0.3993054032,
0.1943427771,
-0.2293032855,
0.3192374408,
-0.2365900278,
-0.0586514659,
-0.0276410375,
0.0171539448,
-0.114003703,
0.1235067323,
0.0152645279,
0.0538214445,
-0.2668658197,
0.1890420318,
0.0730200857,
0.1165180579,
-0.1524644047,
0.2888300717,
-0.3055677116,
0.606216073,
-0.1058223769,
-0.4976428449,
0.411575675,
-0.0848033205,
0.3153781593,
0.9328231812,
-0.0001182188,
0.2439122945,
0.1822360158,
-0.1082936302,
-0.3610415757,
-0.3233252168,
0.1418730766,
-0.0559698604,
0.0167580228,
-0.2509720027,
0.1073099449,
-0.1073530763,
-0.0638049021,
-0.3272553384,
0.1470366567,
0.2430463284,
0.1508886814,
-0.0782090202,
-0.2656308413,
-0.3175558746,
0.230467245,
0.3083329499,
0.145418644,
0.3459366262,
0.2215478122,
-0.2759934962,
-0.0904204771,
-0.0664641038,
-0.1675291657,
0.1449217647,
0.2412748784,
0.2274577469,
-0.0587953329,
-0.1350417137,
0.0041873376,
0.3970923722,
0.6253730059,
-0.1800610423,
-0.3252731264,
-0.1314567924,
0.0302402582,
-0.2941180468,
0.3250660002,
0.2082558572,
-0.1266012192,
0.0780132189,
0.1090787128,
0.1126024351,
-0.1752080321,
0.3246008456,
-0.1998942047,
0.09765926,
0.0400920585,
0.0607717596,
0.0194339044,
-0.0370794237,
-0.0513202138,
-0.0573043339,
0.052379597,
0.2560679913,
-0.2146289498,
0.0880449191,
-0.1322700977,
-0.1603739113,
-0.0199080314,
0.0104808677,
0.2611757517,
-0.169451803,
-0.4164373577,
0.1147027612,
0.1924513727,
0.2341752648,
0.00285948,
0.0696606487,
0.2455966324,
0.3264808953,
-0.3402525187,
0.0025064473,
-0.2539590597,
-0.1772052944,
0.2750906646,
-0.0635992885,
0.5535326004,
-0.0913140029,
-0.6092353463,
0.0851996467,
-0.0907429382,
-0.1220401153,
0.0167004,
0.350425899,
0.1556559056,
0.007623747,
0.3242086768,
0.3544692099,
-0.2622276247,
-0.0990956202,
-0.1103032902,
0.218539387,
-0.0110624461,
0.2203116119,
0.336728394,
-0.1516911983,
0.2326343805,
0.1329763532,
-0.0343419984,
-0.1373285949,
-0.06242726,
0.1760948747,
-0.3333291709,
0.116724506,
0.0138149438,
0.2963365614,
0.3627974391,
-0.1896023303,
-0.1238489598,
0.3359746933,
-0.5115239024,
-0.5266265869,
-0.1148847789,
0.1564935297,
-0.2748806179,
-0.0949093923,
-0.0207237098,
-0.2097216994,
0.2548091114,
-0.3180551231,
-0.0229650214,
-0.1040267274,
-0.5212676525,
-0.2807870209,
-0.0835549012,
0.6397892833,
-0.5403725505,
-0.0046032094,
-0.295984447,
0.065991655,
0.0528748073,
0.225285694,
-0.1808516383,
0.4837554097,
-0.492063731,
0.0551537015,
0.1831508726,
-0.4322175086,
-0.3191882074,
0.0916376337,
-0.3816460073,
0.3135974407,
0.178907305,
0.1348923594,
0.0342425667,
-0.0998479724,
-0.0080055827,
0.0334073454,
0.0391687863,
-0.1163590848,
-0.1003423706,
-0.1150629744,
0.295037061,
0.3189656734,
-0.0525987707,
-0.028480975,
0.0728864223,
-0.0832465068,
0.2127764672,
-0.1638175845,
-0.1320707053,
0.1578200459,
0.3294979334,
0.2000403106,
0.1325257123,
-0.0937299654,
-0.3722989857,
0.4385554194,
0.2032443285,
-0.0487934314,
0.0535551906,
-0.0575329736,
-0.3631984591,
-0.0736557692,
-0.4429956675,
-0.1980913728,
-0.0112996316,
0.234498933,
-0.0294581223,
-0.0375625342,
-0.1806126237,
0.4302510917,
-0.3583680391,
0.0738114864,
-0.280893445,
0.1908039302,
-0.0720524043,
-0.0913958251,
-0.095728673,
0.1119588614,
0.1296713054,
0.0004454649,
-0.0718531534,
0.3464572728,
0.3362162709,
-0.1385051459,
-0.0276071727,
0.0314185619,
-0.000874026,
-0.0213837381,
0.1846701503,
0.2478930503,
0.1665901393,
-0.189546898,
-0.0732961744,
0.1872238964,
-0.1838079542,
0.2477003634,
-0.0536600314,
-0.1778233796,
0.0044103623,
-0.0287913177,
0.1164985597,
-0.0432933904,
0.4287038743,
-0.1416190565,
0.3427115679,
0.0684484541,
0.0491025932,
-0.0600036308,
0.1305796653,
0.0284001697,
0.1086045057,
0.1169632822,
-0.0362802558,
0.1426836699,
-0.3513677716,
0.269113332,
0.8010325432,
0.0404969826,
-0.1698907465,
0.1790696532,
0.0917892829,
0.0040806667,
-0.0075928164,
-0.0389093943,
0.1517270505,
0.3422046304,
0.1113568842,
0.2531371415,
-0.0732817873,
-0.3762148619,
-0.0807917118,
0.3256630003,
-0.5139818788,
0.0058897519,
-0.2444292009,
-0.0086611994,
-0.3238432407,
-0.1037614867,
-0.2189124376,
-0.1865136176,
-0.0390641764,
0.1296097487,
-0.0096952934,
-0.0156512186,
-0.1402450353,
0.1979128122,
0.1155450866,
-0.2887756228,
0.1485815942,
-0.0220531542,
-0.1977472901,
-0.1064596772,
0.2596421242,
-0.0955130756,
0.1163766161,
-0.2262864709,
-0.0116095245,
-0.3291104436,
-0.2606188655,
-0.1494772732,
0.1949061155,
0.1227232143,
0.2664642632,
0.250947237,
0.3389137685,
-0.3548859656,
0.304135859,
-0.2651305795,
-0.292227298,
0.2627809942,
0.0242234021,
0.1615140587,
-0.0260515809,
-0.4274685383,
-0.2367953211,
-0.3845947087,
-0.1018422991,
0.0268563423,
0.2221177816,
0.2095913589,
0.0703783333,
0.0630868971,
0.118697308,
0.0982184857,
-0.1481312364,
-0.3428361714,
0.2690016627,
-0.1362374872,
-0.1334785372,
0.0459208675,
-0.040460065,
0.1930996627,
-0.0156030683,
-0.5530504584,
-0.2346849591,
-0.0609780997,
0.3486633003,
-0.2883739471,
-0.0819920972,
0.1984853894,
-0.1505386382,
0.083135955,
-0.1674244702,
-0.354555577,
0.0060314923,
0.0953259841,
0.235937506,
-0.1034483984,
0.4342650175,
-0.2289343327,
0.6846207976,
-0.0281376615,
-0.2245502472,
0.502378583,
-0.1753668189,
0.5141823888,
-0.1999612004,
-0.3403880894,
-0.1677145213,
-0.0122251092,
-0.2523525059,
0.2549048066,
0.0182497911,
0.0372754633,
-0.1112151742,
0.083911553,
-0.2190149873,
0.0138900746,
0.086210072,
0.1383640766,
-0.1046937108,
-0.0619935356,
0.1244759485,
-0.15227139,
-0.039342124,
0.0777745917,
0.55904603,
0.040041063,
0.040248245,
-0.1543803215,
-0.0125215966,
-0.0933564827,
0.3045858443,
-0.0115270577,
0.1328746229,
-0.0250478219,
-0.2271844447,
-0.0399391726,
0.0232708566,
0.5288301706,
-0.1383348554,
0.1191619933,
0.1253420562,
-0.0398853123,
-0.315358907,
-0.3329626918,
0.060594514,
0.3531076014,
0.2204869241,
0.4047226012,
0.0181249864,
0.0763320923,
0.2558168769,
0.2354893237,
-0.1243456751,
-0.6908111572,
-0.2238885164,
-0.1691916734,
-0.1979241371,
-0.2987077236,
-0.2118784934,
0.2319642007,
-0.1322768182,
0.2437669784,
0.0092543848,
-0.0067523187,
0.2009452134,
-0.0593399964,
0.1923035532,
-0.1493236423,
0.3419781923,
0.1606945544,
0.1553740203,
0.4738463759,
1.0460828543,
-0.2987023294,
-0.5206577778,
0.1743449271,
-0.1635493934,
0.0013160146,
0.3332732618,
0.0956372395,
-0.1864746511,
-0.0876409113,
-0.2176627666,
-0.1909016669,
0.0398273952,
0.1500074267,
-0.2489832193,
-0.2477912009,
-0.3432924151,
0.3437137604,
0.1472105831,
-0.026716765,
0.2497175485,
-0.1333468556,
-0.1335039884,
0.414185971,
-0.3278903365,
0.6894587278,
-0.2888528109,
0.2616025805,
0.29417184,
-0.101760447,
0.1873840839,
-0.1968717873,
-0.0567967743,
-0.489726156,
-0.295445323,
0.0277060457,
-0.0889889002,
0.0792131126,
0.2831928134,
-0.0213684253,
0.1173620671,
-0.2854599059,
0.4183548093,
0.0442407019,
0.2545039058,
-0.0981154591,
-0.1607904881,
-0.2577917278,
0.0828532204,
-0.0959760696,
0.3313871622,
-0.0761693716,
0.0332357995,
-0.3438396454,
-0.2139360607,
-0.2955716252,
0.2028531879,
-0.220159784,
0.1371570975,
-0.0171593707,
-0.2833602726,
0.1773760617,
0.4560714662,
0.1102348417,
-0.1432106346,
-0.0043118303,
0.0868066102,
0.1135705858,
0.0898202434,
-0.0103572346,
-0.3499321342,
0.2352135032,
0.1040661708,
-0.0565862544,
-0.0006308837,
-0.0424599275,
-0.2898243666,
-0.1391010284,
0.2750946283,
0.1124254838,
-0.4799054861,
-0.2134597152,
-0.2338911146,
0.2542508543,
-0.0420298316,
0.0446254462,
0.3107020855,
-0.1815201491,
-0.1395259798,
-0.094224371,
-0.4209417999,
0.0300346836,
0.3842089176,
0.0943759978,
-0.0534853563,
0.6861680746,
0.0392763764,
0.1193597391,
-0.1369948387,
0.2272263169,
0.4103616178,
-0.3568312228,
-0.0501770116,
0.0618524402,
0.1857267618,
0.2820476294,
-0.1663279384,
0.2463872582,
-0.0049660224,
0.0736386627,
-0.5253555775,
-0.1077332124,
-0.0219803378,
-0.042703405,
0.2536071539,
-0.2524228096,
-0.3137610555,
-0.2176107615,
0.0179139264,
-0.2071127892,
0.2714425623,
0.3271951973,
-0.1176347136,
0.2754459083,
0.1714000851,
0.0115936333,
-0.0307605024,
0.0912660435,
-0.1048602536,
-0.1376076192,
-0.1294652522,
-0.154789865,
0.1905358583,
-0.0030950361,
0.0942622125,
0.1430263817,
-0.2625870407,
0.0618264899,
-0.1332593858,
0.1347553134,
0.2704571486,
-0.1097748429,
-0.1180680767,
0.2326466739,
0.1366550475,
-0.1250838637,
0.3421866596,
-0.4030280411,
0.3870024383,
0.1938575357,
0.1176674441,
-0.165723145,
0.1553021967,
-0.0005825078,
-0.0795976371,
-0.0913875327,
0.1264935136,
0.0165001974,
-0.6233417988,
0.1582935601,
0.1304391176,
0.3265200853,
0.4585660398,
-0.4877650142,
-0.1050122008,
0.0963293388,
0.1551215649,
-0.1031349972,
0.1015435085,
0.5643359423,
0.0464820042,
-0.1642566472,
0.4624792933,
0.0674902797,
-0.0912216827,
0.0178594068,
-0.027062647,
0.4975489676,
0.0826210231,
0.3517022431,
0.2650982738,
-0.2606461942,
-0.0567992255,
0.1218463928,
0.1263975799,
0.0692646578,
0.5387529135,
-0.1648941189,
0.2388655394,
0.0917735994,
-0.1412543505,
0.1076890156,
-0.5711115599,
-0.0015080004,
0.1924998164,
0.0137380641,
-0.0449584164,
-0.0206038132,
0.2430924177,
-0.4190214276,
0.114593491,
-0.27127707,
-0.2365582436,
-0.075271599,
0.143229723,
-0.1065919325,
-0.2355138361,
-0.008267655,
-0.0387185104,
-0.0564136095,
-0.1213427857,
-0.1742845476,
0.0788545907,
-0.4962644279,
-0.4207937121,
-0.164188534,
0.1034594476,
-0.1008427739,
-0.2970194519,
0.2939696312,
0.2332120538,
-0.1196255088,
0.534101665,
0.1225781366,
0.7431434989,
0.616733551,
-0.1459566057,
0.0138448495,
-0.2328450829,
0.0353545062,
0.0722347572,
-0.0457608402,
-0.0701700151,
0.040517278,
0.3241594732,
0.0949984267,
-0.0077846372,
0.1271944642,
0.396053493,
0.2972893417,
-0.3929401934,
-0.0737176463,
-0.3291742206,
0.1605654508,
-0.2225062102,
0.2770186365,
-0.341632396,
-0.2148325741,
0.168130517,
0.4010599256,
0.2058335394,
0.1604490876,
0.0326092616,
-0.0585586578,
0.063000679,
0.4953664243,
0.0183691774,
-0.3543061018,
-0.0270194653,
-0.7557730079,
0.3723703623,
-0.3508510888,
-0.225160718,
-0.2059901506,
0.2012235671,
-0.0333268829,
-0.0274120588,
0.5327728987,
-0.0530163832,
0.027360389,
0.2849693298,
-0.4644875228,
-0.440334022,
0.1245530546,
-0.0847929493,
-0.0689240396,
-0.2968159318,
-0.2567429245,
-0.1364099979,
-0.023192618,
0.1224788278,
-0.0975103676,
0.1170932651,
0.1715443879,
0.4463058114,
-0.1893985718,
0.5821204782,
0.1693341881,
-0.2427995205,
-0.3935718536,
-0.1685696095,
-0.221527949,
0.4302474856,
0.1876526922,
0.4727033973,
-0.2618691623,
-0.2200351208,
-0.3228354156,
0.2036501318,
-0.1437960714,
-0.0432882421,
-0.0449991263,
0.1778973937,
-0.0409729369,
0.1039964333,
0.2001200169,
-0.0216210485,
0.0891022831,
0.3200951815,
-0.1291348338,
-0.2527155876,
0.5629218221,
-0.2602697015,
-0.095239751,
-0.1059986278,
0.2764508128,
-0.264375627,
0.3012577891,
-0.3279078901,
0.0294494163,
0.3732500672,
-0.1372846216,
-0.1196619943,
-0.0060263234,
-0.1935357302,
-0.0214499682,
0.0480176806,
0.2041410208,
-0.0916028842,
-0.1468946338,
0.112221919,
-0.1934187561
] |
https://github.com/huggingface/datasets/issues/3122 | OSError with a custom dataset loading script | Hi,
Did some investigation.
To fix the dataset script on the Hub, append the following labels to the `names` list of the `upos_tags` field:
```'INTJ NOUN', 'AUX PRON', 'PART ADV', 'PRON ADP', 'INTJ INTJ', 'VERB NOUN', 'NOUN AUX'```.
This step is required to avoid an error due to missing labels in the following step which is:
```python
load_dataset("classla/janes_tag", split="validation", download_mode="force_redownload")
```
This will generate and cache the dataset, so specifying `download_mode` will not be required anymore unless you update the script/data on the Hub. | ## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
| 84 | OSError with a custom dataset loading script
## Describe the bug
I am getting an OS error when trying to load the newly uploaded dataset classla/janes_tag. What puzzles me is that I have already uploaded a very similar dataset - classla/reldi_hr - with no issues. The loading scripts for the two datasets are almost identical and they have the same directory structure, yet I am only getting an error with janes_tag.
## Steps to reproduce the bug
```python
dataset = datasets.load_dataset('classla/janes_tag', split='validation')
```
## Expected results
Dataset correctly loaded.
## Actual results
Traceback (most recent call last):
File "C:/mypath/test.py", line 91, in <module>
load_and_print('janes_tag')
File "C:/mypath/test.py", line 32, in load_and_print
dataset = datasets.load_dataset('classla/{}'.format(ds_name), split='validation')
File "C:\mypath\venv\lib\site-packages\datasets\load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "C:\mypath\venv\lib\site-packages\datasets\builder.py", line 704, in _download_and_prepare
) from None
OSError: Cannot find data file.
Original error:
[Errno 2] No such file or directory: 'C:\\mypath\\.cache\\huggingface\\datasets\\downloads\\2c9996e44bdc5af9c89bffb9e6d7a3e42fdb2f56bacab45de13b20f3032ea7ca\\data\\train_all.conllup'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.7.5
- PyArrow version: 3.0.0
Hi,
Did some investigation.
To fix the dataset script on the Hub, append the following labels to the `names` list of the `upos_tags` field:
```'INTJ NOUN', 'AUX PRON', 'PART ADV', 'PRON ADP', 'INTJ INTJ', 'VERB NOUN', 'NOUN AUX'```.
This step is required to avoid an error due to missing labels in the following step which is:
```python
load_dataset("classla/janes_tag", split="validation", download_mode="force_redownload")
```
This will generate and cache the dataset, so specifying `download_mode` will not be required anymore unless you update the script/data on the Hub. | [
-0.112895906,
0.2815282643,
-0.0133344699,
0.3955747485,
0.2419006526,
0.1173843443,
0.4183782637,
0.3338419795,
0.3993054032,
0.1943427771,
-0.2293032855,
0.3192374408,
-0.2365900278,
-0.0586514659,
-0.0276410375,
0.0171539448,
-0.114003703,
0.1235067323,
0.0152645279,
0.0538214445,
-0.2668658197,
0.1890420318,
0.0730200857,
0.1165180579,
-0.1524644047,
0.2888300717,
-0.3055677116,
0.606216073,
-0.1058223769,
-0.4976428449,
0.411575675,
-0.0848033205,
0.3153781593,
0.9328231812,
-0.0001182188,
0.2439122945,
0.1822360158,
-0.1082936302,
-0.3610415757,
-0.3233252168,
0.1418730766,
-0.0559698604,
0.0167580228,
-0.2509720027,
0.1073099449,
-0.1073530763,
-0.0638049021,
-0.3272553384,
0.1470366567,
0.2430463284,
0.1508886814,
-0.0782090202,
-0.2656308413,
-0.3175558746,
0.230467245,
0.3083329499,
0.145418644,
0.3459366262,
0.2215478122,
-0.2759934962,
-0.0904204771,
-0.0664641038,
-0.1675291657,
0.1449217647,
0.2412748784,
0.2274577469,
-0.0587953329,
-0.1350417137,
0.0041873376,
0.3970923722,
0.6253730059,
-0.1800610423,
-0.3252731264,
-0.1314567924,
0.0302402582,
-0.2941180468,
0.3250660002,
0.2082558572,
-0.1266012192,
0.0780132189,
0.1090787128,
0.1126024351,
-0.1752080321,
0.3246008456,
-0.1998942047,
0.09765926,
0.0400920585,
0.0607717596,
0.0194339044,
-0.0370794237,
-0.0513202138,
-0.0573043339,
0.052379597,
0.2560679913,
-0.2146289498,
0.0880449191,
-0.1322700977,
-0.1603739113,
-0.0199080314,
0.0104808677,
0.2611757517,
-0.169451803,
-0.4164373577,
0.1147027612,
0.1924513727,
0.2341752648,
0.00285948,
0.0696606487,
0.2455966324,
0.3264808953,
-0.3402525187,
0.0025064473,
-0.2539590597,
-0.1772052944,
0.2750906646,
-0.0635992885,
0.5535326004,
-0.0913140029,
-0.6092353463,
0.0851996467,
-0.0907429382,
-0.1220401153,
0.0167004,
0.350425899,
0.1556559056,
0.007623747,
0.3242086768,
0.3544692099,
-0.2622276247,
-0.0990956202,
-0.1103032902,
0.218539387,
-0.0110624461,
0.2203116119,
0.336728394,
-0.1516911983,
0.2326343805,
0.1329763532,
-0.0343419984,
-0.1373285949,
-0.06242726,
0.1760948747,
-0.3333291709,
0.116724506,
0.0138149438,
0.2963365614,
0.3627974391,
-0.1896023303,
-0.1238489598,
0.3359746933,
-0.5115239024,
-0.5266265869,
-0.1148847789,
0.1564935297,
-0.2748806179,
-0.0949093923,
-0.0207237098,
-0.2097216994,
0.2548091114,
-0.3180551231,
-0.0229650214,
-0.1040267274,
-0.5212676525,
-0.2807870209,
-0.0835549012,
0.6397892833,
-0.5403725505,
-0.0046032094,
-0.295984447,
0.065991655,
0.0528748073,
0.225285694,
-0.1808516383,
0.4837554097,
-0.492063731,
0.0551537015,
0.1831508726,
-0.4322175086,
-0.3191882074,
0.0916376337,
-0.3816460073,
0.3135974407,
0.178907305,
0.1348923594,
0.0342425667,
-0.0998479724,
-0.0080055827,
0.0334073454,
0.0391687863,
-0.1163590848,
-0.1003423706,
-0.1150629744,
0.295037061,
0.3189656734,
-0.0525987707,
-0.028480975,
0.0728864223,
-0.0832465068,
0.2127764672,
-0.1638175845,
-0.1320707053,
0.1578200459,
0.3294979334,
0.2000403106,
0.1325257123,
-0.0937299654,
-0.3722989857,
0.4385554194,
0.2032443285,
-0.0487934314,
0.0535551906,
-0.0575329736,
-0.3631984591,
-0.0736557692,
-0.4429956675,
-0.1980913728,
-0.0112996316,
0.234498933,
-0.0294581223,
-0.0375625342,
-0.1806126237,
0.4302510917,
-0.3583680391,
0.0738114864,
-0.280893445,
0.1908039302,
-0.0720524043,
-0.0913958251,
-0.095728673,
0.1119588614,
0.1296713054,
0.0004454649,
-0.0718531534,
0.3464572728,
0.3362162709,
-0.1385051459,
-0.0276071727,
0.0314185619,
-0.000874026,
-0.0213837381,
0.1846701503,
0.2478930503,
0.1665901393,
-0.189546898,
-0.0732961744,
0.1872238964,
-0.1838079542,
0.2477003634,
-0.0536600314,
-0.1778233796,
0.0044103623,
-0.0287913177,
0.1164985597,
-0.0432933904,
0.4287038743,
-0.1416190565,
0.3427115679,
0.0684484541,
0.0491025932,
-0.0600036308,
0.1305796653,
0.0284001697,
0.1086045057,
0.1169632822,
-0.0362802558,
0.1426836699,
-0.3513677716,
0.269113332,
0.8010325432,
0.0404969826,
-0.1698907465,
0.1790696532,
0.0917892829,
0.0040806667,
-0.0075928164,
-0.0389093943,
0.1517270505,
0.3422046304,
0.1113568842,
0.2531371415,
-0.0732817873,
-0.3762148619,
-0.0807917118,
0.3256630003,
-0.5139818788,
0.0058897519,
-0.2444292009,
-0.0086611994,
-0.3238432407,
-0.1037614867,
-0.2189124376,
-0.1865136176,
-0.0390641764,
0.1296097487,
-0.0096952934,
-0.0156512186,
-0.1402450353,
0.1979128122,
0.1155450866,
-0.2887756228,
0.1485815942,
-0.0220531542,
-0.1977472901,
-0.1064596772,
0.2596421242,
-0.0955130756,
0.1163766161,
-0.2262864709,
-0.0116095245,
-0.3291104436,
-0.2606188655,
-0.1494772732,
0.1949061155,
0.1227232143,
0.2664642632,
0.250947237,
0.3389137685,
-0.3548859656,
0.304135859,
-0.2651305795,
-0.292227298,
0.2627809942,
0.0242234021,
0.1615140587,
-0.0260515809,
-0.4274685383,
-0.2367953211,
-0.3845947087,
-0.1018422991,
0.0268563423,
0.2221177816,
0.2095913589,
0.0703783333,
0.0630868971,
0.118697308,
0.0982184857,
-0.1481312364,
-0.3428361714,
0.2690016627,
-0.1362374872,
-0.1334785372,
0.0459208675,
-0.040460065,
0.1930996627,
-0.0156030683,
-0.5530504584,
-0.2346849591,
-0.0609780997,
0.3486633003,
-0.2883739471,
-0.0819920972,
0.1984853894,
-0.1505386382,
0.083135955,
-0.1674244702,
-0.354555577,
0.0060314923,
0.0953259841,
0.235937506,
-0.1034483984,
0.4342650175,
-0.2289343327,
0.6846207976,
-0.0281376615,
-0.2245502472,
0.502378583,
-0.1753668189,
0.5141823888,
-0.1999612004,
-0.3403880894,
-0.1677145213,
-0.0122251092,
-0.2523525059,
0.2549048066,
0.0182497911,
0.0372754633,
-0.1112151742,
0.083911553,
-0.2190149873,
0.0138900746,
0.086210072,
0.1383640766,
-0.1046937108,
-0.0619935356,
0.1244759485,
-0.15227139,
-0.039342124,
0.0777745917,
0.55904603,
0.040041063,
0.040248245,
-0.1543803215,
-0.0125215966,
-0.0933564827,
0.3045858443,
-0.0115270577,
0.1328746229,
-0.0250478219,
-0.2271844447,
-0.0399391726,
0.0232708566,
0.5288301706,
-0.1383348554,
0.1191619933,
0.1253420562,
-0.0398853123,
-0.315358907,
-0.3329626918,
0.060594514,
0.3531076014,
0.2204869241,
0.4047226012,
0.0181249864,
0.0763320923,
0.2558168769,
0.2354893237,
-0.1243456751,
-0.6908111572,
-0.2238885164,
-0.1691916734,
-0.1979241371,
-0.2987077236,
-0.2118784934,
0.2319642007,
-0.1322768182,
0.2437669784,
0.0092543848,
-0.0067523187,
0.2009452134,
-0.0593399964,
0.1923035532,
-0.1493236423,
0.3419781923,
0.1606945544,
0.1553740203,
0.4738463759,
1.0460828543,
-0.2987023294,
-0.5206577778,
0.1743449271,
-0.1635493934,
0.0013160146,
0.3332732618,
0.0956372395,
-0.1864746511,
-0.0876409113,
-0.2176627666,
-0.1909016669,
0.0398273952,
0.1500074267,
-0.2489832193,
-0.2477912009,
-0.3432924151,
0.3437137604,
0.1472105831,
-0.026716765,
0.2497175485,
-0.1333468556,
-0.1335039884,
0.414185971,
-0.3278903365,
0.6894587278,
-0.2888528109,
0.2616025805,
0.29417184,
-0.101760447,
0.1873840839,
-0.1968717873,
-0.0567967743,
-0.489726156,
-0.295445323,
0.0277060457,
-0.0889889002,
0.0792131126,
0.2831928134,
-0.0213684253,
0.1173620671,
-0.2854599059,
0.4183548093,
0.0442407019,
0.2545039058,
-0.0981154591,
-0.1607904881,
-0.2577917278,
0.0828532204,
-0.0959760696,
0.3313871622,
-0.0761693716,
0.0332357995,
-0.3438396454,
-0.2139360607,
-0.2955716252,
0.2028531879,
-0.220159784,
0.1371570975,
-0.0171593707,
-0.2833602726,
0.1773760617,
0.4560714662,
0.1102348417,
-0.1432106346,
-0.0043118303,
0.0868066102,
0.1135705858,
0.0898202434,
-0.0103572346,
-0.3499321342,
0.2352135032,
0.1040661708,
-0.0565862544,
-0.0006308837,
-0.0424599275,
-0.2898243666,
-0.1391010284,
0.2750946283,
0.1124254838,
-0.4799054861,
-0.2134597152,
-0.2338911146,
0.2542508543,
-0.0420298316,
0.0446254462,
0.3107020855,
-0.1815201491,
-0.1395259798,
-0.094224371,
-0.4209417999,
0.0300346836,
0.3842089176,
0.0943759978,
-0.0534853563,
0.6861680746,
0.0392763764,
0.1193597391,
-0.1369948387,
0.2272263169,
0.4103616178,
-0.3568312228,
-0.0501770116,
0.0618524402,
0.1857267618,
0.2820476294,
-0.1663279384,
0.2463872582,
-0.0049660224,
0.0736386627,
-0.5253555775,
-0.1077332124,
-0.0219803378,
-0.042703405,
0.2536071539,
-0.2524228096,
-0.3137610555,
-0.2176107615,
0.0179139264,
-0.2071127892,
0.2714425623,
0.3271951973,
-0.1176347136,
0.2754459083,
0.1714000851,
0.0115936333,
-0.0307605024,
0.0912660435,
-0.1048602536,
-0.1376076192,
-0.1294652522,
-0.154789865,
0.1905358583,
-0.0030950361,
0.0942622125,
0.1430263817,
-0.2625870407,
0.0618264899,
-0.1332593858,
0.1347553134,
0.2704571486,
-0.1097748429,
-0.1180680767,
0.2326466739,
0.1366550475,
-0.1250838637,
0.3421866596,
-0.4030280411,
0.3870024383,
0.1938575357,
0.1176674441,
-0.165723145,
0.1553021967,
-0.0005825078,
-0.0795976371,
-0.0913875327,
0.1264935136,
0.0165001974,
-0.6233417988,
0.1582935601,
0.1304391176,
0.3265200853,
0.4585660398,
-0.4877650142,
-0.1050122008,
0.0963293388,
0.1551215649,
-0.1031349972,
0.1015435085,
0.5643359423,
0.0464820042,
-0.1642566472,
0.4624792933,
0.0674902797,
-0.0912216827,
0.0178594068,
-0.027062647,
0.4975489676,
0.0826210231,
0.3517022431,
0.2650982738,
-0.2606461942,
-0.0567992255,
0.1218463928,
0.1263975799,
0.0692646578,
0.5387529135,
-0.1648941189,
0.2388655394,
0.0917735994,
-0.1412543505,
0.1076890156,
-0.5711115599,
-0.0015080004,
0.1924998164,
0.0137380641,
-0.0449584164,
-0.0206038132,
0.2430924177,
-0.4190214276,
0.114593491,
-0.27127707,
-0.2365582436,
-0.075271599,
0.143229723,
-0.1065919325,
-0.2355138361,
-0.008267655,
-0.0387185104,
-0.0564136095,
-0.1213427857,
-0.1742845476,
0.0788545907,
-0.4962644279,
-0.4207937121,
-0.164188534,
0.1034594476,
-0.1008427739,
-0.2970194519,
0.2939696312,
0.2332120538,
-0.1196255088,
0.534101665,
0.1225781366,
0.7431434989,
0.616733551,
-0.1459566057,
0.0138448495,
-0.2328450829,
0.0353545062,
0.0722347572,
-0.0457608402,
-0.0701700151,
0.040517278,
0.3241594732,
0.0949984267,
-0.0077846372,
0.1271944642,
0.396053493,
0.2972893417,
-0.3929401934,
-0.0737176463,
-0.3291742206,
0.1605654508,
-0.2225062102,
0.2770186365,
-0.341632396,
-0.2148325741,
0.168130517,
0.4010599256,
0.2058335394,
0.1604490876,
0.0326092616,
-0.0585586578,
0.063000679,
0.4953664243,
0.0183691774,
-0.3543061018,
-0.0270194653,
-0.7557730079,
0.3723703623,
-0.3508510888,
-0.225160718,
-0.2059901506,
0.2012235671,
-0.0333268829,
-0.0274120588,
0.5327728987,
-0.0530163832,
0.027360389,
0.2849693298,
-0.4644875228,
-0.440334022,
0.1245530546,
-0.0847929493,
-0.0689240396,
-0.2968159318,
-0.2567429245,
-0.1364099979,
-0.023192618,
0.1224788278,
-0.0975103676,
0.1170932651,
0.1715443879,
0.4463058114,
-0.1893985718,
0.5821204782,
0.1693341881,
-0.2427995205,
-0.3935718536,
-0.1685696095,
-0.221527949,
0.4302474856,
0.1876526922,
0.4727033973,
-0.2618691623,
-0.2200351208,
-0.3228354156,
0.2036501318,
-0.1437960714,
-0.0432882421,
-0.0449991263,
0.1778973937,
-0.0409729369,
0.1039964333,
0.2001200169,
-0.0216210485,
0.0891022831,
0.3200951815,
-0.1291348338,
-0.2527155876,
0.5629218221,
-0.2602697015,
-0.095239751,
-0.1059986278,
0.2764508128,
-0.264375627,
0.3012577891,
-0.3279078901,
0.0294494163,
0.3732500672,
-0.1372846216,
-0.1196619943,
-0.0060263234,
-0.1935357302,
-0.0214499682,
0.0480176806,
0.2041410208,
-0.0916028842,
-0.1468946338,
0.112221919,
-0.1934187561
] |
https://github.com/huggingface/datasets/issues/3119 | Add OpenSLR 83 - Crowdsourced high-quality UK and Ireland English Dialect speech | Ugh. The index files for SLR83 are CSV, not TSV. I need to add logic to process these index files. | ## Adding a Dataset
- **Name:** *openslr**
- **Description:** *Data set which contains male and female recordings of English from various dialects of the UK and Ireland.*
- **Paper:** *https://www.openslr.org/resources/83/about.html*
- **Data:** *Eleven separate data files can be found via https://www.openslr.org/resources/83/*
- **Motivation:** *Increase english ASR data with UK and Irish dialects*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
The *openslr* dataset already exists, this will add additional subset, *SLR83*. | 20 | Add OpenSLR 83 - Crowdsourced high-quality UK and Ireland English Dialect speech
## Adding a Dataset
- **Name:** *openslr**
- **Description:** *Data set which contains male and female recordings of English from various dialects of the UK and Ireland.*
- **Paper:** *https://www.openslr.org/resources/83/about.html*
- **Data:** *Eleven separate data files can be found via https://www.openslr.org/resources/83/*
- **Motivation:** *Increase english ASR data with UK and Irish dialects*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
The *openslr* dataset already exists, this will add additional subset, *SLR83*.
Ugh. The index files for SLR83 are CSV, not TSV. I need to add logic to process these index files. | [
-0.0509535596,
0.233801648,
-0.142274186,
0.104232505,
-0.3136017919,
0.2464337945,
-0.0554703474,
0.29288131,
0.5650348663,
0.2243560851,
-0.1979470998,
0.151480481,
-0.4145610034,
0.2901998758,
-0.0463003851,
0.2556516826,
0.0738376826,
0.1669849008,
0.0678537115,
-0.1343688518,
-0.193157658,
0.032327272,
0.0292694047,
-0.4757169783,
0.1941167265,
0.0646488965,
-0.146458894,
0.1191220805,
-0.4239875376,
-0.1926948279,
-0.0828786641,
0.1462190747,
0.424240917,
0.2993046343,
-0.000120317,
-0.1240755469,
0.0498134531,
-0.1574857384,
-0.1657470465,
-0.0447543636,
-0.1879733503,
-0.1172537282,
-0.1636563241,
-0.2847344577,
0.0109921983,
-0.1401002407,
-0.0040263645,
-0.4738586843,
0.3443057835,
0.4983547628,
0.0810898244,
-0.2362529188,
-0.0446553268,
0.1376218647,
0.5199354887,
0.3255410194,
0.0566005483,
-0.1557751,
0.1246466562,
0.2177202553,
0.0643830225,
0.2777473629,
-0.260527879,
-0.408362478,
-0.0659866855,
0.0378828682,
-0.1326922029,
-0.1573366523,
-0.1533320546,
0.2418285608,
0.5251845717,
0.0429910421,
-0.2338138223,
-0.0666675121,
-0.2356086224,
-0.5749576688,
-0.0652378201,
-0.0658246204,
0.0468186177,
0.2967833579,
0.2624108791,
-0.2391827106,
-0.274897933,
0.2700684071,
0.1597599089,
0.5638099313,
0.0469545238,
-0.2372241914,
0.5630196929,
-0.0697600693,
0.2946175635,
0.038722381,
0.0378450677,
0.2328000069,
-0.4092859924,
-0.0824062526,
0.1123388037,
-0.3244327605,
-0.0043560346,
0.0277019423,
0.2231142372,
0.1077824309,
0.0131819276,
0.0114477137,
0.0053055319,
0.2598896921,
-0.0336397886,
0.0075370045,
0.0787883624,
-0.1291988343,
0.0562402047,
-0.0779837519,
-0.3173887432,
-0.3271739781,
-0.3687660098,
0.002774785,
0.0145458831,
-0.1879827231,
-0.0469699278,
0.2333137095,
-0.0643968731,
-0.4009296894,
0.0387273505,
0.0086926073,
0.1329500675,
0.2325966209,
0.183596313,
0.2476226091,
-0.1305821687,
0.0541616865,
0.0180970188,
0.2261687368,
0.1842286587,
0.0799575299,
0.1816682518,
-0.2603928745,
-0.0567613542,
0.2779750228,
0.0226736013,
-0.0179035515,
0.0760478079,
-0.0239888113,
0.2114245892,
0.028603768,
0.0673327148,
-0.0832311586,
-0.1425860822,
-0.3877201676,
-0.1439108104,
0.2580002844,
-0.1724587977,
-0.3384285867,
-0.6734218001,
0.1089845076,
-0.2504029274,
-0.3172882795,
-0.0885843784,
0.5379898548,
-0.0850941464,
-0.1611691713,
0.037992496,
0.2480311096,
-0.0870627314,
0.0390384942,
0.1053832993,
0.1240276396,
-0.6394195557,
0.446256578,
-0.5473038554,
0.0708160698,
0.1171510518,
0.019413624,
-0.0403636135,
0.063846752,
-0.1777107865,
0.2216805071,
0.3539555073,
-0.2851117849,
-0.0975626409,
0.1722976863,
-0.242655009,
-0.2729944289,
0.8565294743,
0.1974639446,
0.4108786881,
0.0416899696,
0.0094676381,
0.2636066675,
-0.0107659614,
-0.3581661582,
-0.0554179139,
-0.0009451944,
0.1381150186,
0.4360539317,
0.0029819354,
0.0680063665,
0.2427410036,
-0.2749920189,
0.325412035,
-0.2881462574,
0.2662015259,
0.0143959289,
0.5430258512,
0.3106608093,
0.1235946864,
-0.1681964248,
-0.1778961867,
-0.2098636627,
0.082328096,
0.1115251854,
-0.0235177912,
-0.2494483888,
-0.3565730155,
-0.289619416,
-0.0225430466,
0.1970885545,
0.0226402618,
0.0554990917,
-0.1592537314,
-0.2414226234,
-0.371037215,
-0.1013996825,
0.0657217577,
-0.1766547114,
-0.2498587072,
0.2081738412,
-0.2103737146,
-0.1036915705,
0.1463563889,
0.350212723,
-0.0665807649,
-0.1764824986,
0.175845474,
0.045570828,
0.0550364032,
-0.0278903618,
0.7096666098,
0.0472317003,
-0.0349556841,
-0.1787762046,
0.1177025214,
-0.0448113196,
0.0767871514,
0.0194271319,
-0.2615091503,
0.5356487632,
-0.3654961586,
0.2776792347,
-0.2429318875,
-0.1112510189,
0.0210769419,
-0.1462042183,
-0.0727856532,
-0.2937823534,
0.2116627842,
0.1317341328,
-0.0930192694,
0.2003176063,
-0.3462786674,
0.3120553195,
0.2731941938,
-0.1874340326,
0.0025406131,
0.355602473,
0.1732563227,
0.0534109212,
-0.1632882208,
-0.2101597637,
0.0275423396,
0.2441105843,
0.0965521485,
-0.0394421332,
0.3879841566,
-0.1221378595,
0.2174081355,
-0.1312505305,
-0.2307745963,
0.4156410396,
0.1559900343,
-0.0856605396,
-0.3132012188,
-0.2532370687,
0.0599684492,
-0.0368588679,
-0.1244009659,
-0.1515343338,
-0.0676485598,
0.0687134042,
-0.3935278952,
-0.209952876,
0.0155023141,
-0.1352456063,
0.0311401002,
-0.0589426011,
-0.2979842424,
-0.161251992,
-0.2785433531,
0.0052925074,
-0.1062871963,
-0.368342638,
0.280564636,
-0.3393208086,
0.0290881973,
0.0584301949,
0.2987583578,
0.2636335492,
0.0171872023,
-0.192350775,
0.3629001081,
-0.164613083,
-0.4911407828,
0.0534829721,
-0.2734575272,
-0.0255235601,
0.0592793748,
-0.129090637,
-0.261014998,
-0.7199596167,
-0.2041207552,
0.455714941,
-0.3778245151,
-0.0697560757,
-0.0150968358,
0.1534133404,
-0.1108856648,
-0.8450392485,
-0.3586761653,
-0.4437710643,
0.2386007905,
-0.1225699857,
0.2775229812,
-0.1137252897,
0.1369561702,
0.0736125857,
-0.1709695309,
0.1169446334,
-0.1538463384,
0.1334354281,
0.5352175832,
-0.1651067883,
-0.044197537,
0.1229191348,
-0.1087676659,
-0.3636181056,
-0.2102990746,
-0.3078949153,
-0.0251667481,
-0.0375450924,
0.2223186791,
-0.0611488521,
0.3615267277,
0.5438821912,
0.1638173014,
-0.1597711146,
-0.2693537474,
-0.189240396,
0.3662841022,
0.3068468571,
-0.0560317859,
0.034204483,
0.6313489079,
-0.2182053477,
0.7873807549,
-0.0472777039,
0.0668310449,
0.4801154435,
0.197368443,
0.216536358,
0.1408271194,
-0.2295309454,
0.2855809033,
0.194838658,
-0.2648409307,
0.3786170781,
0.0797717199,
-0.1247126311,
-0.2962478697,
-0.0838014185,
-0.4222489297,
-0.1276113987,
0.3360801935,
0.0429398343,
0.2013328224,
-0.2204377502,
-0.2222294658,
-0.3821943402,
-0.2114809602,
-0.0736529753,
0.2449731529,
0.3972814679,
0.0501232669,
-0.4062133431,
0.0253497437,
-0.3018808365,
0.4700374007,
0.1552444547,
0.1917859465,
-0.072058171,
-0.2452080399,
-0.0580075718,
0.093823649,
0.3715102971,
-0.0088966182,
-0.2313354015,
-0.0335642844,
0.319309026,
-0.182670176,
0.1863103658,
-0.29266271,
-0.0714814588,
0.3267326057,
0.1813192219,
-0.4165489674,
0.052415859,
0.2746616304,
0.496014744,
-0.1271731406,
-0.3507020473,
-0.262819469,
-0.4503267705,
0.0077688326,
0.1010065526,
0.1136806533,
0.0913967863,
-0.1284014583,
-0.0583615303,
0.117355153,
-0.1053153574,
0.477283299,
-0.2325633764,
0.1703685373,
0.4597622156,
0.110184364,
0.0914763212,
0.3586938679,
0.097941339,
0.630718708,
-0.1040700376,
-0.1943311095,
0.0999179855,
-0.4783122241,
0.7990130186,
0.2217817008,
0.204035759,
0.2993899286,
0.2094870657,
-0.2837936878,
-0.0452871546,
0.0970445946,
0.0820471868,
0.2008266896,
-0.3279392123,
-0.2941996455,
0.5833310485,
0.1527477503,
-0.2901349068,
-0.1081823558,
0.2215392143,
-0.3437700272,
0.6045407057,
-0.0294543896,
1.131927371,
0.0776961073,
-0.0024393192,
-0.2078295201,
-0.246068731,
0.0620439984,
-0.1094066724,
-0.0377907492,
0.0632465333,
-0.0477441959,
-0.1073174849,
-0.0864010528,
-0.2330544293,
0.3547324538,
-0.252712816,
0.2118193507,
-0.4760729074,
-0.1130922735,
0.1533129811,
0.5497691631,
0.1076506451,
-0.2086331993,
-0.0682216659,
-0.0652025938,
0.1533854604,
-0.0869429037,
0.1738062203,
-0.4477436244,
-0.1636960208,
0.051591821,
-0.1028114557,
-0.0231704451,
0.2681865096,
-0.0615764521,
-0.3230818212,
-0.4430269301,
0.3100907803,
0.2912401855,
0.4001663029,
0.054526493,
0.1325285733,
-0.1936634034,
0.3434520066,
-0.0590176582,
0.1068171039,
-0.2080693245,
0.0484748632,
-0.0199044775,
-0.4164329469,
0.2299432755,
0.0271557458,
-0.4857912362,
-0.1214465499,
0.1579832435,
-0.1924009472,
-0.2694981992,
-0.2112553418,
0.2244557291,
-0.2072804421,
-0.1952479035,
0.0396721549,
0.0244159941,
-0.0070350012,
0.1543552428,
0.0587817393,
-0.2524420321,
-0.1705694497,
0.2113647163,
-0.0728497282,
0.1317956001,
0.355502069,
0.3467803299,
-0.2369348258,
-0.1321972162,
-0.2601040006,
-0.0097866384,
-0.1519696563,
-0.0009100274,
0.0857708976,
-0.2025975585,
0.1002717838,
0.3050152063,
0.2176352441,
0.1579290181,
-0.3196694851,
-0.4394699931,
-0.1586755514,
0.1935166866,
0.1749786586,
0.1888853014,
-0.3925227523,
-0.0259266123,
-0.4198212922,
-0.0491658039,
-0.2726216912,
0.1262462139,
-0.026438145,
0.3599608243,
0.10826765,
-0.0789566934,
-0.1290118247,
-0.0283502247,
0.0824091136,
-0.1920440942,
-0.173276633,
-0.0922325626,
0.0625487641,
0.1931979507,
-0.1095973849,
0.1211591437,
-0.0401774198,
-0.214787215,
-0.1569321305,
0.0913000107,
-0.0506631359,
0.0743969381,
-0.1418265551,
-0.0037376054,
-0.4305805266,
-0.2037636638,
0.2425248474,
-0.0273249988,
0.0057341824,
0.3283369541,
0.0629899576,
0.387694627,
0.0044392603,
-0.005888185,
0.2453533113,
0.1805028021,
0.4589045644,
-0.1197328791,
0.1282995939,
-0.0424122624,
-0.2729186714,
0.5524452329,
0.3579564095,
0.5229778886,
0.1313263625,
0.0698260069,
0.2424844354,
0.2156109959,
-0.4210318625,
0.3397716582,
-0.070037663,
-0.0287063457,
0.1241872534,
0.2663609385,
0.490136534,
0.0140164029,
-0.0196854528,
0.1200323552,
-0.0178798679,
0.5903835297,
0.059097264,
0.1203898117,
-0.0314500704,
-0.1660621613,
0.4926082492,
-0.0751288161,
0.1257335395,
0.1422007084,
-0.3642265201,
0.2008339763,
0.3139757812,
0.3326092958,
0.1902274936,
-0.170333609,
0.5563220382,
0.2725937068,
0.3070430756,
0.0953953266,
0.2102424651,
0.8891360164,
0.0952620581,
0.0398984961,
-0.0778719559,
0.3775117397,
0.0117034279,
-0.1338247806,
-0.1129023284,
-0.4667134881,
-0.1746569276,
-0.0080126831,
0.2115261108,
0.0920882225,
0.0111556863,
0.1086133122,
0.0791585222,
-0.1582085937,
-0.0173020102,
0.2312089056,
0.1396117806,
-0.2743708789,
0.3446316123,
0.4755314887,
-0.1361434758,
0.5891000032,
0.1686964184,
0.1609569341,
0.0745058581,
-0.3580961227,
0.2628316879,
-0.2045689672,
-0.094420433,
-0.1193098053,
0.3530746996,
0.0726757348,
0.0992997438,
0.2654770613,
0.030977793,
-0.2044370621,
-0.0581183322,
0.0185232032,
-0.1301670969,
0.0157656185,
-0.4470990002,
0.2622438371,
0.0129160928,
-0.4147188962,
-0.2263171673,
-0.2450426668,
-0.1740234345,
0.2036118954,
-0.1314344704,
-0.0462293401,
0.1569776684,
0.054988198,
-0.2048953325,
0.2057988346,
0.321467489,
0.1825852096,
-0.0545079336,
-0.2214189172,
-0.471655488,
0.02865416,
-0.0109322155,
-0.3261216879,
-0.0598065443,
0.2139155716,
0.4081809521,
0.1767610162,
0.1711597294,
0.1565814316,
-0.2406348884,
0.0851743072,
-0.3176501393,
0.2203280032,
0.2046334445,
0.2274873704,
-0.2156770527,
-0.1747570634,
-0.1987932026,
0.0487232842,
0.0293560121,
-0.4017331302,
0.0759018809,
0.0011602921,
0.1677803546,
0.3957167864,
0.0410978496,
0.5486696959,
-0.2611162364,
0.0405887775,
0.1016595215,
-0.1043138355,
-0.1757830828,
0.077484265,
0.146069333,
0.327735424,
-0.3005311191,
0.1013481095,
0.0327485912,
0.5672548413,
-0.0031476202,
-0.1704014689,
-0.4413918555,
0.2363022268,
-0.4185053706,
-0.047518339,
0.1848738194,
0.1963733286,
0.0915394649,
0.0350241922,
-0.1593841016,
-0.5580639243,
0.1090755463,
-0.2113785446,
-0.0437958576,
-0.046911411,
0.186923027,
0.5190027952,
0.1811144054,
-0.1994346529,
0.0678358823,
0.178059116,
0.1569595635,
0.0140234763,
-0.0068875253,
0.014992998,
-0.0497984141,
-0.0691265836,
-0.0465353318,
0.3940000236,
-0.1157214046,
-0.4689113796,
-0.1913460195
] |
https://github.com/huggingface/datasets/issues/3114 | load_from_disk in DatasetsDict/Dataset not working with PyArrowHDFS wrapper implementing fsspec.spec.AbstractFileSystem | Hi ! Can you try again with pyarrow 6.0.0 ? I think it includes some changes regarding filesystems compatibility with fsspec. | ## Describe the bug
Passing a PyArrowHDFS implementation of fsspec.spec.AbstractFileSystem (in the `fs` param required by `load_from_disk` methods in `DatasetDict` (in datasets_dict.py) and `Dataset` (in arrow_dataset.py) results in an error when calling the download method in the `fs` parameter.
## Steps to reproduce the bug
The documentation for the `fs` parameter states:
```
fs (:class:`~filesystems.S3FileSystem` or ``fsspec.spec.AbstractFileSystem``, optional, default ``None``):
Instance of the remote filesystem used to download the files from.
```
`PyArrowHDFS` from [fsspec](https://filesystem-spec.readthedocs.io/en/latest/_modules/fsspec/implementations/hdfs.html) implements `fsspec.spec.AbstractFileSystem`. However, when using it as shown below, I get an error.
```python
from fsspec.implementations.hdfs import PyArrowHDFS
...
transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/"
fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket)
dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True)
```
## Expected results
Previous to load from disk, I have managed to successfully store in HDFS the data and meta-information of a DatasetDict by doing:
```python
transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/"
fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket)
my_datasets.save_to_disk(transformed_corpus_path, fs=fs)
```
As I have 3 datasets in the DatasetDict named `my_datasets`, the previous Python code creates the following contents in HDFS:
```sh
$ hadoop fs -ls "/user/my_user/clickbait/transformed_ds/"
Found 4 items
-rw------- 3 my_user users 43 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/dataset_dict.json
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/test
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/train
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/validation
```
I would expect to recover on `dss` the Arrow-backed datasets I previously saved in HDFS calling the `save_to_disk` method on the `DatasetDict` object when invoking `DatasetDict.load_from_disk(...)` as described above.
## Actual results
However, when trying to recover the saved datasets, I get this error:
```
...
File "/home/fperez/dev/neuromancer/neuromancer/corpus.py", line 186, in load_transformed_corpus_from_disk
dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True)
File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/dataset_dict.py", line 748, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1048, in load_from_disk
fs.download(src_dataset_path, dataset_path.as_posix(), recursive=True)
File "pyarrow/_hdfsio.pyx", line 438, in pyarrow._hdfsio.HadoopFileSystem.download
TypeError: download() got an unexpected keyword argument 'recursive'
```
Examining the [signature of the download method in pyarrow 5.0.0](https://github.com/apache/arrow/blob/54d2bd89c99df72fa091b025452f85dd5d88e3cf/python/pyarrow/_hdfsio.pyx#L438) we can see that there's no download parameter:
```python
def download(self, path, stream, buffer_size=None):
with self.open(path, 'rb') as f:
f.download(stream, buffer_size=buffer_size)
```
## Environment info
- `datasets` version: 1.13.3
- Platform: Linux-3.10.0-1160.15.2.el7.x86_64-x86_64-with-glibc2.33
- Python version: 3.9.7
- PyArrow version: 5.0.0
| 21 | load_from_disk in DatasetsDict/Dataset not working with PyArrowHDFS wrapper implementing fsspec.spec.AbstractFileSystem
## Describe the bug
Passing a PyArrowHDFS implementation of fsspec.spec.AbstractFileSystem (in the `fs` param required by `load_from_disk` methods in `DatasetDict` (in datasets_dict.py) and `Dataset` (in arrow_dataset.py) results in an error when calling the download method in the `fs` parameter.
## Steps to reproduce the bug
The documentation for the `fs` parameter states:
```
fs (:class:`~filesystems.S3FileSystem` or ``fsspec.spec.AbstractFileSystem``, optional, default ``None``):
Instance of the remote filesystem used to download the files from.
```
`PyArrowHDFS` from [fsspec](https://filesystem-spec.readthedocs.io/en/latest/_modules/fsspec/implementations/hdfs.html) implements `fsspec.spec.AbstractFileSystem`. However, when using it as shown below, I get an error.
```python
from fsspec.implementations.hdfs import PyArrowHDFS
...
transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/"
fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket)
dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True)
```
## Expected results
Previous to load from disk, I have managed to successfully store in HDFS the data and meta-information of a DatasetDict by doing:
```python
transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/"
fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket)
my_datasets.save_to_disk(transformed_corpus_path, fs=fs)
```
As I have 3 datasets in the DatasetDict named `my_datasets`, the previous Python code creates the following contents in HDFS:
```sh
$ hadoop fs -ls "/user/my_user/clickbait/transformed_ds/"
Found 4 items
-rw------- 3 my_user users 43 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/dataset_dict.json
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/test
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/train
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/validation
```
I would expect to recover on `dss` the Arrow-backed datasets I previously saved in HDFS calling the `save_to_disk` method on the `DatasetDict` object when invoking `DatasetDict.load_from_disk(...)` as described above.
## Actual results
However, when trying to recover the saved datasets, I get this error:
```
...
File "/home/fperez/dev/neuromancer/neuromancer/corpus.py", line 186, in load_transformed_corpus_from_disk
dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True)
File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/dataset_dict.py", line 748, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1048, in load_from_disk
fs.download(src_dataset_path, dataset_path.as_posix(), recursive=True)
File "pyarrow/_hdfsio.pyx", line 438, in pyarrow._hdfsio.HadoopFileSystem.download
TypeError: download() got an unexpected keyword argument 'recursive'
```
Examining the [signature of the download method in pyarrow 5.0.0](https://github.com/apache/arrow/blob/54d2bd89c99df72fa091b025452f85dd5d88e3cf/python/pyarrow/_hdfsio.pyx#L438) we can see that there's no download parameter:
```python
def download(self, path, stream, buffer_size=None):
with self.open(path, 'rb') as f:
f.download(stream, buffer_size=buffer_size)
```
## Environment info
- `datasets` version: 1.13.3
- Platform: Linux-3.10.0-1160.15.2.el7.x86_64-x86_64-with-glibc2.33
- Python version: 3.9.7
- PyArrow version: 5.0.0
Hi ! Can you try again with pyarrow 6.0.0 ? I think it includes some changes regarding filesystems compatibility with fsspec. | [
-0.3349553645,
0.2241356224,
0.102795437,
0.1352015883,
0.1960353553,
-0.2252621353,
0.361558944,
0.0040491149,
-0.0512572154,
-0.102641426,
-0.1220099181,
0.469068706,
0.1646988243,
0.0326150768,
0.1159635484,
0.0376404598,
0.2662323713,
-0.0224406663,
-0.0546423085,
-0.0038122002,
-0.0468193553,
0.1966893077,
-0.1476572454,
-0.0208664332,
-0.0412362963,
0.2302881777,
-0.2657261491,
0.3903672695,
-0.0680892244,
-0.3523624837,
0.6592516303,
0.1840912253,
0.4344585538,
0.3419643939,
-0.0001241506,
0.1030735672,
0.28055197,
-0.1367634833,
-0.2313630581,
-0.1157090738,
0.300937295,
-0.3349644542,
0.1414176971,
-0.3048176765,
-0.0972508863,
-0.2475435585,
-0.1224896237,
0.0915355459,
0.2256357372,
0.2455889881,
0.0811108723,
0.1188376471,
-0.0034248377,
0.0279199835,
0.4743975401,
0.4964666665,
-0.2376570702,
0.3314309716,
0.1718958467,
-0.0127168437,
-0.0733891129,
-0.1258907467,
-0.3266923726,
0.109558098,
0.2582923174,
0.0762626007,
-0.0644786879,
0.0952941477,
-0.1973092854,
0.0023754039,
0.500526309,
-0.6183689237,
-0.4538954794,
-0.159042716,
-0.270580858,
0.1798095107,
0.1894537061,
0.1648000777,
-0.2678618729,
0.1896120608,
0.0118060699,
-0.2344641536,
-0.1498090029,
0.3241241872,
-0.2139066756,
-0.4162372947,
-0.1617646217,
0.1615711749,
0.2402796149,
-0.0451981202,
0.2079425305,
-0.3892836869,
0.0767160356,
0.1676038802,
-0.0626500472,
-0.06730441,
0.1609553993,
-0.0554367937,
0.1013194844,
-0.1642183363,
-0.2042353749,
0.0012922662,
0.0194097906,
0.1953825057,
0.2329106927,
-0.0572116412,
-0.0880826637,
0.1559264958,
0.042689234,
0.136558637,
0.119002752,
-0.0552874915,
-0.0832739919,
-0.1961076558,
0.105254434,
-0.182053417,
0.2968952358,
-0.2645763755,
-0.2291024923,
-0.0231677964,
0.1238997579,
0.0546311736,
0.0125758797,
0.2835528553,
0.0384488739,
0.1877811998,
0.1875629723,
0.13196747,
-0.193746835,
0.0559887551,
-0.1020837948,
0.1040533632,
-0.2838176787,
0.0866514146,
0.3212415874,
-0.2065199763,
0.0385491662,
0.1511923522,
-0.2096684873,
0.1097609326,
-0.2359331399,
-0.298235476,
0.1868724376,
0.2723736167,
-0.1069579497,
0.1796815991,
0.0695797056,
0.1101204827,
-0.1590229422,
0.4295530617,
-0.3818663657,
-0.3355219364,
-0.248865217,
0.0532539524,
-0.2094863951,
0.1516816467,
-0.9970981479,
-0.0709665045,
0.0782832578,
-0.1534865946,
0.012111566,
-0.2660576105,
-0.2727915049,
-0.240030095,
0.2514423728,
0.3093750775,
-0.3793875575,
0.0004595681,
-0.1444035321,
-0.3248268366,
0.2518022954,
0.1285363734,
-0.2419514954,
0.4255227149,
-0.3465428054,
0.377361834,
0.2694105208,
-0.3158563673,
-0.6208453774,
0.6082903147,
0.2249343842,
0.0885228068,
-0.0120233735,
-0.0248352494,
0.4436498284,
-0.2672275901,
-0.1859655231,
0.3175540268,
0.1195631549,
0.1444232762,
-0.2017784268,
-0.2124794871,
-0.1056744829,
0.3348723352,
-0.0771101117,
0.149977684,
0.3789487481,
0.1038331762,
0.3402037621,
-0.0186062623,
0.1657091826,
0.2660181224,
0.2807669342,
0.1099918485,
-0.011642714,
-0.1803909093,
-0.6004623175,
0.2230315506,
-0.0150351943,
-0.1344624162,
-0.2526040375,
-0.1625388563,
-0.0372835211,
0.1343705654,
-0.1196582541,
0.1085759103,
-0.0790817961,
0.0407997631,
0.1476392895,
-0.0628860146,
0.0091525875,
0.0283024553,
-0.1528124213,
0.0464814492,
-0.0380090922,
0.7559700012,
-0.0185696315,
-0.3635183275,
-0.1487206966,
0.0572080575,
0.3924445212,
-0.0994057283,
-0.0039330288,
0.5101385117,
0.3982294202,
0.1366243362,
-0.3077687025,
0.1475266218,
0.1672148108,
-0.192847997,
0.1135955304,
0.3128068447,
0.2555900812,
0.117229633,
0.0334877335,
0.1333463192,
0.032204885,
-0.0406401083,
0.1586372107,
-0.0807742029,
0.1852016151,
0.0696373731,
0.1108280495,
0.0764957219,
-0.0394599997,
0.3130884469,
0.2491997629,
0.0481725223,
-0.0323603973,
0.1146051586,
0.2795547247,
-0.0532879569,
-0.0101500647,
0.1259942651,
-0.0930719674,
-0.1840511262,
0.4165044427,
0.2011203915,
0.4155314565,
0.1255697012,
0.0014678417,
0.059475258,
-0.1338423342,
0.066048272,
0.1770571172,
0.0206730608,
-0.0137725025,
0.1328146756,
0.0291898064,
0.0227724258,
-0.2114415169,
-0.1640917361,
0.1413927525,
0.0482287668,
-0.528655827,
0.0681852773,
-0.1113607362,
-0.0815003365,
-0.1460057944,
-0.275187999,
0.0334520228,
0.0642525628,
-0.3306067586,
0.5829570293,
-0.1921333671,
-0.0200602058,
0.092704758,
-0.1033721194,
-0.0401009582,
-0.2644488513,
-0.1566378474,
0.0839577615,
-0.3414261341,
-0.1576366723,
0.2627202272,
0.0248304494,
0.0596253611,
0.020883929,
-0.0658895224,
-0.7917723656,
0.1146837622,
0.2108012289,
-0.0271240324,
0.338873744,
0.0921416134,
0.1485253572,
-0.1379125267,
0.0144681269,
0.2203323096,
-0.1100956425,
-0.2514595687,
0.1915109903,
0.0189552214,
-0.1697292328,
-0.1620202512,
0.0378338248,
-0.3503849208,
-0.2025854588,
0.0125960018,
-0.3351413906,
0.1549155414,
-0.0255504828,
-0.0298407692,
0.0381696038,
0.0020051424,
0.0068813176,
-0.0876440033,
-0.3234081864,
0.3013534248,
-0.0881955475,
-0.5032919049,
0.1077482253,
0.1354489923,
-0.3445076346,
0.3160080612,
-0.4374324977,
-0.1431200057,
0.0600980483,
0.3037619293,
-0.0495441929,
0.1709143966,
0.4621816278,
0.0393856466,
0.1347218752,
-0.2583553195,
-0.2432550937,
0.1395735443,
-0.030896591,
-0.0729524344,
-0.1673987061,
0.3971688151,
0.011822775,
0.5163139105,
0.0089964131,
-0.0707267001,
0.7223639488,
-0.0523866117,
0.1376949549,
0.0099096028,
-0.2078966796,
-0.0854829848,
-0.1685243249,
-0.1031125635,
0.2165801078,
0.0615092069,
-0.0962709859,
-0.0037934538,
-0.1235995963,
-0.1372644752,
-0.1808031797,
-0.0199477226,
0.0629280433,
0.4161151648,
-0.0932789519,
0.2107877582,
0.0611918941,
-0.0056073926,
0.1378497481,
0.2208527476,
0.3067314923,
0.0846445486,
-0.1070278436,
-0.1433917284,
-0.2646156847,
0.0499505438,
0.220237121,
0.2858287692,
0.0634474754,
0.0437436178,
0.0848362371,
-0.245298326,
0.8641015887,
0.1927907914,
0.3815927505,
0.1491679847,
-0.0344007276,
-0.7753247023,
-0.2710908949,
-0.07202214,
-0.1028022468,
-0.2622989118,
0.2316009253,
-0.3822873235,
-0.2469409108,
-0.1902166754,
-0.0239691976,
-0.1134948358,
-0.1819717586,
-0.0790037513,
-0.4564879239,
-0.2897562087,
-0.2531207502,
0.0833558664,
0.2015689015,
-0.0512396283,
0.1595371068,
0.1186202243,
0.1229388788,
-0.0082994634,
-0.0659744292,
0.5205414295,
-0.0857130736,
0.3541795313,
-0.1437078118,
0.2193015218,
0.6966525912,
0.6633201241,
-0.0034653081,
0.0833989978,
0.092580907,
0.0878077745,
0.0879823267,
0.0603756383,
-0.1017205343,
-0.0416643098,
-0.2431263775,
-0.1133954525,
-0.5680649877,
0.0074215182,
0.2375937998,
-0.239567101,
0.1163405254,
-0.3587512076,
0.7157527208,
0.043462541,
-0.0541979782,
0.0123547539,
0.503556788,
-0.3582440615,
0.4661707878,
-0.0146622835,
0.6498220563,
0.1044095382,
0.266130656,
0.5081139803,
-0.1357542425,
-0.1717616171,
-0.1017721891,
-0.3691777587,
-0.3396912217,
0.1847589612,
-0.1311692148,
-0.0569942407,
0.344440788,
0.3804188073,
-0.1175277531,
0.0812118724,
0.0502682365,
-0.056900464,
0.1190071777,
0.152297616,
0.0279819854,
-0.3073178232,
-0.3525748551,
0.1029853001,
-0.1526847631,
-0.0730800703,
-0.0326189362,
-0.0856704414,
-0.1280179769,
-0.1115602031,
-0.1675517857,
0.3291786611,
0.0463933311,
0.3171883523,
0.1035589725,
0.0194987748,
0.0488118045,
-0.0150846308,
0.1883049458,
-0.1978370696,
-0.1738821119,
0.1398248076,
0.134522453,
0.1475832015,
0.1781765968,
-0.256254822,
0.3834224939,
-0.1298853904,
-0.053290464,
-0.2003056854,
-0.2134102285,
-0.3141233921,
0.1489657909,
-0.0374996364,
0.3463278711,
-0.4235868752,
-0.4182809293,
-0.0697509497,
0.1217573211,
-0.1146256477,
0.0060259975,
0.2810221314,
-0.2379793078,
0.344694674,
-0.4830860496,
-0.0059151445,
-0.0440196358,
0.5810655355,
-0.2167649269,
0.2293836772,
0.3233327866,
-0.023052562,
-0.1560536772,
-0.0706521273,
-0.0455112159,
0.1487974823,
-0.435675174,
0.1336886585,
0.0064098118,
0.1135730445,
-0.1202995703,
0.5797247291,
0.0646676421,
-0.2407290787,
-0.0902301893,
-0.1929456145,
-0.0375908427,
0.0827942491,
0.0606460273,
0.132478565,
0.2729023993,
-0.1023586839,
0.0438414216,
-0.3194688559,
-0.176364854,
0.3217308521,
0.1773107648,
0.2678431273,
-0.0110721756,
0.0513316877,
0.0006283776,
-0.4276843667,
0.009882845,
0.0360551141,
-0.0381231569,
-0.0985229313,
-0.11708574,
0.1890256107,
0.2367285043,
-0.2009389699,
-0.1381510198,
-0.36212641,
-0.3449445665,
-0.0551939793,
0.1043465436,
0.3623104692,
-0.2173253149,
0.2778499424,
0.5341621637,
0.0669889152,
-0.3296404481,
0.3050525188,
-0.0308527444,
0.2101247907,
-0.1246499345,
0.345038414,
-0.2674723566,
0.0075703571,
-0.2875126302,
0.1391045153,
0.3249817491,
0.1290420592,
0.5727688074,
-0.3310421705,
0.0344632939,
0.0121459588,
0.5853070617,
0.1251476109,
-0.2998809218,
-0.1315290034,
0.2982671261,
0.0606492758,
-0.2286659777,
-0.1522417516,
0.1680786461,
-0.2228533924,
0.0103462432,
0.0536468923,
0.3355955482,
-0.0757181346,
-0.228665933,
0.1481975764,
0.3759228587,
0.4516713321,
-0.1571699977,
0.3147034049,
-0.0463173352,
0.3940313756,
0.1859763712,
-0.0362702832,
0.1003879085,
0.4708049297,
0.0744817778,
0.3024171889,
0.1597880721,
0.2106674761,
0.0303780679,
-0.4780098796,
0.4032601416,
-0.2810320258,
0.1105811447,
-0.1333352625,
-0.2755420506,
0.0351775885,
-0.1128725708,
-0.2538608313,
-0.0793259144,
0.108458668,
-0.1306382269,
-0.2194417864,
0.0472666472,
-0.0456477255,
0.1647991985,
0.0367667004,
-0.2512206733,
-0.4965168536,
0.2355839014,
0.1684600115,
-0.1197673529,
0.0906697288,
-0.0760943741,
0.2490659803,
0.034430217,
-0.0662597492,
0.3886271417,
-0.2398549318,
-0.2327573895,
0.102567248,
0.1601179093,
0.3062274158,
0.2311327606,
-0.1199945286,
-0.1320998371,
0.1020380706,
-0.0551432669,
0.0556756072,
0.1052670032,
-0.3546623886,
0.5059357882,
0.3445349038,
0.0544274971,
-0.048156634,
-0.3022932112,
0.094347924,
0.3706546426,
-0.143403694,
0.7575088143,
-0.0725408122,
-0.2096788883,
0.070379965,
0.0904148221,
-0.2900918424,
-0.4180220366,
0.6238594055,
-0.1285422891,
0.1814502627,
-0.1094207987,
0.0249340199,
-0.0727061629,
0.3622098565,
0.3241893947,
0.1026241705,
-0.2076589316,
-0.1335145533,
-0.5643593073,
-0.0215254612,
-0.0254968815,
-0.3741788268,
0.2129258513,
0.2972636223,
0.0611284971,
-0.0136514222,
-0.0823772848,
0.1136862636,
0.1175993606,
0.2917797267,
-0.0337080173,
-0.1158924326,
-0.1244364977,
0.0708129257,
-0.1985606253,
-0.7001959682,
0.3190869391,
-0.0027503488,
-0.0426255986,
-0.0104806023,
-0.0889648572,
0.1683185101,
-0.3557910323,
0.3991541862,
-0.1717179716,
0.1889594346,
-0.0642394349,
0.0119798668,
0.0021880218,
0.084945254,
-0.0453587994,
-0.1077146754,
-0.3986954391,
0.4441920519,
-0.1691067964,
0.1816939116,
-0.3513158858,
-0.0170823727,
-0.0856390148,
-0.0578180887,
-0.353631407,
0.1578835398,
-0.3893122375,
0.0986660495,
-0.1194398701,
0.0852177367,
-0.0269653406,
0.3944965899,
-0.4150300026,
-0.354146421,
0.4380442798,
-0.5636271238,
-0.1420983076,
-0.0465017296,
0.280865252,
-0.3399838805,
-0.167477861,
-0.4691193998,
-0.0561334975,
0.3458999693,
-0.1187697202,
-0.1821135581,
0.1038752347,
-0.2839927375,
0.168315649,
-0.0712521449,
0.6393277049,
-0.0300563108,
-0.0719871074,
0.0820052773,
-0.3311231136
] |
https://github.com/huggingface/datasets/issues/3114 | load_from_disk in DatasetsDict/Dataset not working with PyArrowHDFS wrapper implementing fsspec.spec.AbstractFileSystem | Hi @lhoestq! I ended up using `fsspec.implementations.arrow.HadoopFileSystem` which doesn't have the problem I described with pyarrow 5.0.0.
I'll try again with `PyArrowHDFS` once I update arrow to 6.0.0.
Thanks! | ## Describe the bug
Passing a PyArrowHDFS implementation of fsspec.spec.AbstractFileSystem (in the `fs` param required by `load_from_disk` methods in `DatasetDict` (in datasets_dict.py) and `Dataset` (in arrow_dataset.py) results in an error when calling the download method in the `fs` parameter.
## Steps to reproduce the bug
The documentation for the `fs` parameter states:
```
fs (:class:`~filesystems.S3FileSystem` or ``fsspec.spec.AbstractFileSystem``, optional, default ``None``):
Instance of the remote filesystem used to download the files from.
```
`PyArrowHDFS` from [fsspec](https://filesystem-spec.readthedocs.io/en/latest/_modules/fsspec/implementations/hdfs.html) implements `fsspec.spec.AbstractFileSystem`. However, when using it as shown below, I get an error.
```python
from fsspec.implementations.hdfs import PyArrowHDFS
...
transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/"
fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket)
dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True)
```
## Expected results
Previous to load from disk, I have managed to successfully store in HDFS the data and meta-information of a DatasetDict by doing:
```python
transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/"
fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket)
my_datasets.save_to_disk(transformed_corpus_path, fs=fs)
```
As I have 3 datasets in the DatasetDict named `my_datasets`, the previous Python code creates the following contents in HDFS:
```sh
$ hadoop fs -ls "/user/my_user/clickbait/transformed_ds/"
Found 4 items
-rw------- 3 my_user users 43 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/dataset_dict.json
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/test
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/train
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/validation
```
I would expect to recover on `dss` the Arrow-backed datasets I previously saved in HDFS calling the `save_to_disk` method on the `DatasetDict` object when invoking `DatasetDict.load_from_disk(...)` as described above.
## Actual results
However, when trying to recover the saved datasets, I get this error:
```
...
File "/home/fperez/dev/neuromancer/neuromancer/corpus.py", line 186, in load_transformed_corpus_from_disk
dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True)
File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/dataset_dict.py", line 748, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1048, in load_from_disk
fs.download(src_dataset_path, dataset_path.as_posix(), recursive=True)
File "pyarrow/_hdfsio.pyx", line 438, in pyarrow._hdfsio.HadoopFileSystem.download
TypeError: download() got an unexpected keyword argument 'recursive'
```
Examining the [signature of the download method in pyarrow 5.0.0](https://github.com/apache/arrow/blob/54d2bd89c99df72fa091b025452f85dd5d88e3cf/python/pyarrow/_hdfsio.pyx#L438) we can see that there's no download parameter:
```python
def download(self, path, stream, buffer_size=None):
with self.open(path, 'rb') as f:
f.download(stream, buffer_size=buffer_size)
```
## Environment info
- `datasets` version: 1.13.3
- Platform: Linux-3.10.0-1160.15.2.el7.x86_64-x86_64-with-glibc2.33
- Python version: 3.9.7
- PyArrow version: 5.0.0
| 29 | load_from_disk in DatasetsDict/Dataset not working with PyArrowHDFS wrapper implementing fsspec.spec.AbstractFileSystem
## Describe the bug
Passing a PyArrowHDFS implementation of fsspec.spec.AbstractFileSystem (in the `fs` param required by `load_from_disk` methods in `DatasetDict` (in datasets_dict.py) and `Dataset` (in arrow_dataset.py) results in an error when calling the download method in the `fs` parameter.
## Steps to reproduce the bug
The documentation for the `fs` parameter states:
```
fs (:class:`~filesystems.S3FileSystem` or ``fsspec.spec.AbstractFileSystem``, optional, default ``None``):
Instance of the remote filesystem used to download the files from.
```
`PyArrowHDFS` from [fsspec](https://filesystem-spec.readthedocs.io/en/latest/_modules/fsspec/implementations/hdfs.html) implements `fsspec.spec.AbstractFileSystem`. However, when using it as shown below, I get an error.
```python
from fsspec.implementations.hdfs import PyArrowHDFS
...
transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/"
fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket)
dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True)
```
## Expected results
Previous to load from disk, I have managed to successfully store in HDFS the data and meta-information of a DatasetDict by doing:
```python
transformed_corpus_path = "/user/my_user/clickbait/transformed_ds/"
fs = PyArrowHDFS(host, port, user, kerb_ticket=kerb_ticket)
my_datasets.save_to_disk(transformed_corpus_path, fs=fs)
```
As I have 3 datasets in the DatasetDict named `my_datasets`, the previous Python code creates the following contents in HDFS:
```sh
$ hadoop fs -ls "/user/my_user/clickbait/transformed_ds/"
Found 4 items
-rw------- 3 my_user users 43 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/dataset_dict.json
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/test
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/train
drwx------ - my_user users 0 2021-10-19 03:08 /user/my_user/clickbait/transformed_ds/validation
```
I would expect to recover on `dss` the Arrow-backed datasets I previously saved in HDFS calling the `save_to_disk` method on the `DatasetDict` object when invoking `DatasetDict.load_from_disk(...)` as described above.
## Actual results
However, when trying to recover the saved datasets, I get this error:
```
...
File "/home/fperez/dev/neuromancer/neuromancer/corpus.py", line 186, in load_transformed_corpus_from_disk
dss = DatasetDict.load_from_disk(transformed_corpus_path, fs, True)
File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/dataset_dict.py", line 748, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/home/fperez/anaconda3/envs/neuromancer/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1048, in load_from_disk
fs.download(src_dataset_path, dataset_path.as_posix(), recursive=True)
File "pyarrow/_hdfsio.pyx", line 438, in pyarrow._hdfsio.HadoopFileSystem.download
TypeError: download() got an unexpected keyword argument 'recursive'
```
Examining the [signature of the download method in pyarrow 5.0.0](https://github.com/apache/arrow/blob/54d2bd89c99df72fa091b025452f85dd5d88e3cf/python/pyarrow/_hdfsio.pyx#L438) we can see that there's no download parameter:
```python
def download(self, path, stream, buffer_size=None):
with self.open(path, 'rb') as f:
f.download(stream, buffer_size=buffer_size)
```
## Environment info
- `datasets` version: 1.13.3
- Platform: Linux-3.10.0-1160.15.2.el7.x86_64-x86_64-with-glibc2.33
- Python version: 3.9.7
- PyArrow version: 5.0.0
Hi @lhoestq! I ended up using `fsspec.implementations.arrow.HadoopFileSystem` which doesn't have the problem I described with pyarrow 5.0.0.
I'll try again with `PyArrowHDFS` once I update arrow to 6.0.0.
Thanks! | [
-0.3349553645,
0.2241356224,
0.102795437,
0.1352015883,
0.1960353553,
-0.2252621353,
0.361558944,
0.0040491149,
-0.0512572154,
-0.102641426,
-0.1220099181,
0.469068706,
0.1646988243,
0.0326150768,
0.1159635484,
0.0376404598,
0.2662323713,
-0.0224406663,
-0.0546423085,
-0.0038122002,
-0.0468193553,
0.1966893077,
-0.1476572454,
-0.0208664332,
-0.0412362963,
0.2302881777,
-0.2657261491,
0.3903672695,
-0.0680892244,
-0.3523624837,
0.6592516303,
0.1840912253,
0.4344585538,
0.3419643939,
-0.0001241506,
0.1030735672,
0.28055197,
-0.1367634833,
-0.2313630581,
-0.1157090738,
0.300937295,
-0.3349644542,
0.1414176971,
-0.3048176765,
-0.0972508863,
-0.2475435585,
-0.1224896237,
0.0915355459,
0.2256357372,
0.2455889881,
0.0811108723,
0.1188376471,
-0.0034248377,
0.0279199835,
0.4743975401,
0.4964666665,
-0.2376570702,
0.3314309716,
0.1718958467,
-0.0127168437,
-0.0733891129,
-0.1258907467,
-0.3266923726,
0.109558098,
0.2582923174,
0.0762626007,
-0.0644786879,
0.0952941477,
-0.1973092854,
0.0023754039,
0.500526309,
-0.6183689237,
-0.4538954794,
-0.159042716,
-0.270580858,
0.1798095107,
0.1894537061,
0.1648000777,
-0.2678618729,
0.1896120608,
0.0118060699,
-0.2344641536,
-0.1498090029,
0.3241241872,
-0.2139066756,
-0.4162372947,
-0.1617646217,
0.1615711749,
0.2402796149,
-0.0451981202,
0.2079425305,
-0.3892836869,
0.0767160356,
0.1676038802,
-0.0626500472,
-0.06730441,
0.1609553993,
-0.0554367937,
0.1013194844,
-0.1642183363,
-0.2042353749,
0.0012922662,
0.0194097906,
0.1953825057,
0.2329106927,
-0.0572116412,
-0.0880826637,
0.1559264958,
0.042689234,
0.136558637,
0.119002752,
-0.0552874915,
-0.0832739919,
-0.1961076558,
0.105254434,
-0.182053417,
0.2968952358,
-0.2645763755,
-0.2291024923,
-0.0231677964,
0.1238997579,
0.0546311736,
0.0125758797,
0.2835528553,
0.0384488739,
0.1877811998,
0.1875629723,
0.13196747,
-0.193746835,
0.0559887551,
-0.1020837948,
0.1040533632,
-0.2838176787,
0.0866514146,
0.3212415874,
-0.2065199763,
0.0385491662,
0.1511923522,
-0.2096684873,
0.1097609326,
-0.2359331399,
-0.298235476,
0.1868724376,
0.2723736167,
-0.1069579497,
0.1796815991,
0.0695797056,
0.1101204827,
-0.1590229422,
0.4295530617,
-0.3818663657,
-0.3355219364,
-0.248865217,
0.0532539524,
-0.2094863951,
0.1516816467,
-0.9970981479,
-0.0709665045,
0.0782832578,
-0.1534865946,
0.012111566,
-0.2660576105,
-0.2727915049,
-0.240030095,
0.2514423728,
0.3093750775,
-0.3793875575,
0.0004595681,
-0.1444035321,
-0.3248268366,
0.2518022954,
0.1285363734,
-0.2419514954,
0.4255227149,
-0.3465428054,
0.377361834,
0.2694105208,
-0.3158563673,
-0.6208453774,
0.6082903147,
0.2249343842,
0.0885228068,
-0.0120233735,
-0.0248352494,
0.4436498284,
-0.2672275901,
-0.1859655231,
0.3175540268,
0.1195631549,
0.1444232762,
-0.2017784268,
-0.2124794871,
-0.1056744829,
0.3348723352,
-0.0771101117,
0.149977684,
0.3789487481,
0.1038331762,
0.3402037621,
-0.0186062623,
0.1657091826,
0.2660181224,
0.2807669342,
0.1099918485,
-0.011642714,
-0.1803909093,
-0.6004623175,
0.2230315506,
-0.0150351943,
-0.1344624162,
-0.2526040375,
-0.1625388563,
-0.0372835211,
0.1343705654,
-0.1196582541,
0.1085759103,
-0.0790817961,
0.0407997631,
0.1476392895,
-0.0628860146,
0.0091525875,
0.0283024553,
-0.1528124213,
0.0464814492,
-0.0380090922,
0.7559700012,
-0.0185696315,
-0.3635183275,
-0.1487206966,
0.0572080575,
0.3924445212,
-0.0994057283,
-0.0039330288,
0.5101385117,
0.3982294202,
0.1366243362,
-0.3077687025,
0.1475266218,
0.1672148108,
-0.192847997,
0.1135955304,
0.3128068447,
0.2555900812,
0.117229633,
0.0334877335,
0.1333463192,
0.032204885,
-0.0406401083,
0.1586372107,
-0.0807742029,
0.1852016151,
0.0696373731,
0.1108280495,
0.0764957219,
-0.0394599997,
0.3130884469,
0.2491997629,
0.0481725223,
-0.0323603973,
0.1146051586,
0.2795547247,
-0.0532879569,
-0.0101500647,
0.1259942651,
-0.0930719674,
-0.1840511262,
0.4165044427,
0.2011203915,
0.4155314565,
0.1255697012,
0.0014678417,
0.059475258,
-0.1338423342,
0.066048272,
0.1770571172,
0.0206730608,
-0.0137725025,
0.1328146756,
0.0291898064,
0.0227724258,
-0.2114415169,
-0.1640917361,
0.1413927525,
0.0482287668,
-0.528655827,
0.0681852773,
-0.1113607362,
-0.0815003365,
-0.1460057944,
-0.275187999,
0.0334520228,
0.0642525628,
-0.3306067586,
0.5829570293,
-0.1921333671,
-0.0200602058,
0.092704758,
-0.1033721194,
-0.0401009582,
-0.2644488513,
-0.1566378474,
0.0839577615,
-0.3414261341,
-0.1576366723,
0.2627202272,
0.0248304494,
0.0596253611,
0.020883929,
-0.0658895224,
-0.7917723656,
0.1146837622,
0.2108012289,
-0.0271240324,
0.338873744,
0.0921416134,
0.1485253572,
-0.1379125267,
0.0144681269,
0.2203323096,
-0.1100956425,
-0.2514595687,
0.1915109903,
0.0189552214,
-0.1697292328,
-0.1620202512,
0.0378338248,
-0.3503849208,
-0.2025854588,
0.0125960018,
-0.3351413906,
0.1549155414,
-0.0255504828,
-0.0298407692,
0.0381696038,
0.0020051424,
0.0068813176,
-0.0876440033,
-0.3234081864,
0.3013534248,
-0.0881955475,
-0.5032919049,
0.1077482253,
0.1354489923,
-0.3445076346,
0.3160080612,
-0.4374324977,
-0.1431200057,
0.0600980483,
0.3037619293,
-0.0495441929,
0.1709143966,
0.4621816278,
0.0393856466,
0.1347218752,
-0.2583553195,
-0.2432550937,
0.1395735443,
-0.030896591,
-0.0729524344,
-0.1673987061,
0.3971688151,
0.011822775,
0.5163139105,
0.0089964131,
-0.0707267001,
0.7223639488,
-0.0523866117,
0.1376949549,
0.0099096028,
-0.2078966796,
-0.0854829848,
-0.1685243249,
-0.1031125635,
0.2165801078,
0.0615092069,
-0.0962709859,
-0.0037934538,
-0.1235995963,
-0.1372644752,
-0.1808031797,
-0.0199477226,
0.0629280433,
0.4161151648,
-0.0932789519,
0.2107877582,
0.0611918941,
-0.0056073926,
0.1378497481,
0.2208527476,
0.3067314923,
0.0846445486,
-0.1070278436,
-0.1433917284,
-0.2646156847,
0.0499505438,
0.220237121,
0.2858287692,
0.0634474754,
0.0437436178,
0.0848362371,
-0.245298326,
0.8641015887,
0.1927907914,
0.3815927505,
0.1491679847,
-0.0344007276,
-0.7753247023,
-0.2710908949,
-0.07202214,
-0.1028022468,
-0.2622989118,
0.2316009253,
-0.3822873235,
-0.2469409108,
-0.1902166754,
-0.0239691976,
-0.1134948358,
-0.1819717586,
-0.0790037513,
-0.4564879239,
-0.2897562087,
-0.2531207502,
0.0833558664,
0.2015689015,
-0.0512396283,
0.1595371068,
0.1186202243,
0.1229388788,
-0.0082994634,
-0.0659744292,
0.5205414295,
-0.0857130736,
0.3541795313,
-0.1437078118,
0.2193015218,
0.6966525912,
0.6633201241,
-0.0034653081,
0.0833989978,
0.092580907,
0.0878077745,
0.0879823267,
0.0603756383,
-0.1017205343,
-0.0416643098,
-0.2431263775,
-0.1133954525,
-0.5680649877,
0.0074215182,
0.2375937998,
-0.239567101,
0.1163405254,
-0.3587512076,
0.7157527208,
0.043462541,
-0.0541979782,
0.0123547539,
0.503556788,
-0.3582440615,
0.4661707878,
-0.0146622835,
0.6498220563,
0.1044095382,
0.266130656,
0.5081139803,
-0.1357542425,
-0.1717616171,
-0.1017721891,
-0.3691777587,
-0.3396912217,
0.1847589612,
-0.1311692148,
-0.0569942407,
0.344440788,
0.3804188073,
-0.1175277531,
0.0812118724,
0.0502682365,
-0.056900464,
0.1190071777,
0.152297616,
0.0279819854,
-0.3073178232,
-0.3525748551,
0.1029853001,
-0.1526847631,
-0.0730800703,
-0.0326189362,
-0.0856704414,
-0.1280179769,
-0.1115602031,
-0.1675517857,
0.3291786611,
0.0463933311,
0.3171883523,
0.1035589725,
0.0194987748,
0.0488118045,
-0.0150846308,
0.1883049458,
-0.1978370696,
-0.1738821119,
0.1398248076,
0.134522453,
0.1475832015,
0.1781765968,
-0.256254822,
0.3834224939,
-0.1298853904,
-0.053290464,
-0.2003056854,
-0.2134102285,
-0.3141233921,
0.1489657909,
-0.0374996364,
0.3463278711,
-0.4235868752,
-0.4182809293,
-0.0697509497,
0.1217573211,
-0.1146256477,
0.0060259975,
0.2810221314,
-0.2379793078,
0.344694674,
-0.4830860496,
-0.0059151445,
-0.0440196358,
0.5810655355,
-0.2167649269,
0.2293836772,
0.3233327866,
-0.023052562,
-0.1560536772,
-0.0706521273,
-0.0455112159,
0.1487974823,
-0.435675174,
0.1336886585,
0.0064098118,
0.1135730445,
-0.1202995703,
0.5797247291,
0.0646676421,
-0.2407290787,
-0.0902301893,
-0.1929456145,
-0.0375908427,
0.0827942491,
0.0606460273,
0.132478565,
0.2729023993,
-0.1023586839,
0.0438414216,
-0.3194688559,
-0.176364854,
0.3217308521,
0.1773107648,
0.2678431273,
-0.0110721756,
0.0513316877,
0.0006283776,
-0.4276843667,
0.009882845,
0.0360551141,
-0.0381231569,
-0.0985229313,
-0.11708574,
0.1890256107,
0.2367285043,
-0.2009389699,
-0.1381510198,
-0.36212641,
-0.3449445665,
-0.0551939793,
0.1043465436,
0.3623104692,
-0.2173253149,
0.2778499424,
0.5341621637,
0.0669889152,
-0.3296404481,
0.3050525188,
-0.0308527444,
0.2101247907,
-0.1246499345,
0.345038414,
-0.2674723566,
0.0075703571,
-0.2875126302,
0.1391045153,
0.3249817491,
0.1290420592,
0.5727688074,
-0.3310421705,
0.0344632939,
0.0121459588,
0.5853070617,
0.1251476109,
-0.2998809218,
-0.1315290034,
0.2982671261,
0.0606492758,
-0.2286659777,
-0.1522417516,
0.1680786461,
-0.2228533924,
0.0103462432,
0.0536468923,
0.3355955482,
-0.0757181346,
-0.228665933,
0.1481975764,
0.3759228587,
0.4516713321,
-0.1571699977,
0.3147034049,
-0.0463173352,
0.3940313756,
0.1859763712,
-0.0362702832,
0.1003879085,
0.4708049297,
0.0744817778,
0.3024171889,
0.1597880721,
0.2106674761,
0.0303780679,
-0.4780098796,
0.4032601416,
-0.2810320258,
0.1105811447,
-0.1333352625,
-0.2755420506,
0.0351775885,
-0.1128725708,
-0.2538608313,
-0.0793259144,
0.108458668,
-0.1306382269,
-0.2194417864,
0.0472666472,
-0.0456477255,
0.1647991985,
0.0367667004,
-0.2512206733,
-0.4965168536,
0.2355839014,
0.1684600115,
-0.1197673529,
0.0906697288,
-0.0760943741,
0.2490659803,
0.034430217,
-0.0662597492,
0.3886271417,
-0.2398549318,
-0.2327573895,
0.102567248,
0.1601179093,
0.3062274158,
0.2311327606,
-0.1199945286,
-0.1320998371,
0.1020380706,
-0.0551432669,
0.0556756072,
0.1052670032,
-0.3546623886,
0.5059357882,
0.3445349038,
0.0544274971,
-0.048156634,
-0.3022932112,
0.094347924,
0.3706546426,
-0.143403694,
0.7575088143,
-0.0725408122,
-0.2096788883,
0.070379965,
0.0904148221,
-0.2900918424,
-0.4180220366,
0.6238594055,
-0.1285422891,
0.1814502627,
-0.1094207987,
0.0249340199,
-0.0727061629,
0.3622098565,
0.3241893947,
0.1026241705,
-0.2076589316,
-0.1335145533,
-0.5643593073,
-0.0215254612,
-0.0254968815,
-0.3741788268,
0.2129258513,
0.2972636223,
0.0611284971,
-0.0136514222,
-0.0823772848,
0.1136862636,
0.1175993606,
0.2917797267,
-0.0337080173,
-0.1158924326,
-0.1244364977,
0.0708129257,
-0.1985606253,
-0.7001959682,
0.3190869391,
-0.0027503488,
-0.0426255986,
-0.0104806023,
-0.0889648572,
0.1683185101,
-0.3557910323,
0.3991541862,
-0.1717179716,
0.1889594346,
-0.0642394349,
0.0119798668,
0.0021880218,
0.084945254,
-0.0453587994,
-0.1077146754,
-0.3986954391,
0.4441920519,
-0.1691067964,
0.1816939116,
-0.3513158858,
-0.0170823727,
-0.0856390148,
-0.0578180887,
-0.353631407,
0.1578835398,
-0.3893122375,
0.0986660495,
-0.1194398701,
0.0852177367,
-0.0269653406,
0.3944965899,
-0.4150300026,
-0.354146421,
0.4380442798,
-0.5636271238,
-0.1420983076,
-0.0465017296,
0.280865252,
-0.3399838805,
-0.167477861,
-0.4691193998,
-0.0561334975,
0.3458999693,
-0.1187697202,
-0.1821135581,
0.1038752347,
-0.2839927375,
0.168315649,
-0.0712521449,
0.6393277049,
-0.0300563108,
-0.0719871074,
0.0820052773,
-0.3311231136
] |
https://github.com/huggingface/datasets/issues/3112 | OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB | I am very unsure on why you tagged me here. I am not a maintainer of the Datasets library and have no idea how to help you. | ## Describe the bug
Despite having batches way under 2Gb when running `datasets.map()`, after processing correctly the data of the first batch without fuss and irrespective of writer_batch_size (say 2,4,8,16,32,64 and 128 in my case), it returns the following error :
> OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
Note that I always run `batch_size=writer_batch_size` :
## Steps to reproduce the bug
```python
datasets.map(lambda example : {"column_name" : function(arguments)}, batched=False, remove_columns = datasets.column_names, batch_size=batch_size, writer_batch_size=batch_size, disable_nullable=True, num_proc=None, desc="blablabla")
```
## Introspecting CUDA memory during bug
Placed within `function(arguments)` the following statement to introspect memory usage, merely a little over 1/4 of 2Gb
`print(torch.cuda.memory_summary(device=device, abbreviated=False))`
> |===========================================================================|
| PyTorch CUDA memory summary, device ID 0 |
|---------------------------------------------------------------------------|
| CUDA OOMs: 0 | cudaMalloc retries: 0 |
|===========================================================================|
| Metric | Cur Usage | Peak Usage | Tot Alloc | Tot Freed |
|---------------------------------------------------------------------------|
| Allocated memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB |
| from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB |
| from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB |
|---------------------------------------------------------------------------|
| Active memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB |
| from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB |
| from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB |
|---------------------------------------------------------------------------|
| GPU reserved memory | 598016 KB | 598016 KB | 598016 KB | 0 B |
| from large pool | 595968 KB | 595968 KB | 595968 KB | 0 B |
| from small pool | 2048 KB | 2048 KB | 2048 KB | 0 B |
|---------------------------------------------------------------------------|
| Non-releasable memory | 36117 KB | 52292 KB | 274275 KB | 238158 KB |
| from large pool | 34816 KB | 51537 KB | 261713 KB | 226897 KB |
| from small pool | 1301 KB | 2045 KB | 12562 KB | 11261 KB |
|---------------------------------------------------------------------------|
| Allocations | 198 | 224 | 478 | 280 |
| from large pool | 74 | 75 | 75 | 1 |
| from small pool | 124 | 150 | 403 | 279 |
|---------------------------------------------------------------------------|
| Active allocs | 198 | 224 | 478 | 280 |
| from large pool | 74 | 75 | 75 | 1 |
| from small pool | 124 | 150 | 403 | 279 |
|---------------------------------------------------------------------------|
| GPU reserved segments | 21 | 21 | 21 | 0 |
| from large pool | 20 | 20 | 20 | 0 |
| from small pool | 1 | 1 | 1 | 0 |
|---------------------------------------------------------------------------|
| Non-releasable allocs | 18 | 23 | 166 | 148 |
| from large pool | 17 | 18 | 19 | 2 |
| from small pool | 1 | 6 | 147 | 146 |
|===========================================================================|
## Expected results
Efficiently process the datasets and write it down to disk.
## Actual results
--------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only)
2390 else:
-> 2391 writer.write(example)
2392 else:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write(self, example, key, writer_batch_size)
367
--> 368 self.write_examples_on_file()
369
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self)
316 if not isinstance(pa_array[0], pa.lib.FloatScalar):
--> 317 raise OverflowError(
318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format(
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_16268/2456940807.py in <module>
3 #tracker = OfflineEmissionsTracker(country_iso_code="FRA", project_name='xxx'+time_stamp,output_dir='./codecarbon')
4 #tracker.start()
----> 5 process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection=['wikipedia'], from_scratch=True,
6 clean_sentences=False, negative_sampling=False, translate=False, tokenize=False, generate_embeddings=True, concatenate_embeddings=False,
7 max_sample=10000, padding='do_not_pad', truncation=True, cpu_batch_size=1000, gpu_batch_size=2, cpu_writer_batch_size=1000, gpu_writer_batch_size=2, disable_nullable=True, num_proc=None) #
~\xxx\xxx.py in process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection, from_scratch, clean_sentences, translate, negative_sampling, tokenize, generate_embeddings, concatenate_embeddings, max_sample, padding, truncation, cpu_batch_size, gpu_batch_size, cpu_writer_batch_size, gpu_writer_batch_size, disable_nullable, num_proc)
481 for column in tqdm(dataset.column_names, desc=f'Processing column', leave=False):
482 if "xxx_" in column:
--> 483 dataset = dataset.map(lambda example :
484 {"embeddings_"+str(column).replace("translated_",""):function(input_ids=example[column],
485 token_type_ids=example[column.replace("input_ids","token_type_ids")],
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2034
2035 if num_proc is None or num_proc == 1:
-> 2036 return self._map_single(
2037 function=function,
2038 with_indices=with_indices,
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs)
501 self: "Dataset" = kwargs.pop("self")
502 # apply actual function
--> 503 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
504 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
505 for dataset in datasets:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs)
468 }
469 # apply actual function
--> 470 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
471 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
472 # re-apply format to the output
~\anaconda3\envs\xxx\lib\site-packages\datasets\fingerprint.py in wrapper(*args, **kwargs)
404 # Call actual function
405
--> 406 out = func(self, *args, **kwargs)
407
408 # Update fingerprint of in-place transforms + update in-place history of transforms
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only)
2425 if update_data:
2426 if writer is not None:
-> 2427 writer.finalize()
2428 if tmp_file is not None:
2429 tmp_file.close()
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in finalize(self, close_stream)
440 # Re-intializing to empty list for next batch
441 self.hkey_record = []
--> 442 self.write_examples_on_file()
443 if self.pa_writer is None:
444 if self._schema is not None:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self)
315 # This check fails with FloatArrays with nans, which is not what we want, so account for that:
316 if not isinstance(pa_array[0], pa.lib.FloatScalar):
--> 317 raise OverflowError(
318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format(
319 type(pa_array)
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: Windows-10-10.0.19042-SP0
- Python version: 3.8.11
- PyArrow version: 3.0.0
##Next steps
Testing on Linux.
@albertvillanova
| 27 | OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
## Describe the bug
Despite having batches way under 2Gb when running `datasets.map()`, after processing correctly the data of the first batch without fuss and irrespective of writer_batch_size (say 2,4,8,16,32,64 and 128 in my case), it returns the following error :
> OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
Note that I always run `batch_size=writer_batch_size` :
## Steps to reproduce the bug
```python
datasets.map(lambda example : {"column_name" : function(arguments)}, batched=False, remove_columns = datasets.column_names, batch_size=batch_size, writer_batch_size=batch_size, disable_nullable=True, num_proc=None, desc="blablabla")
```
## Introspecting CUDA memory during bug
Placed within `function(arguments)` the following statement to introspect memory usage, merely a little over 1/4 of 2Gb
`print(torch.cuda.memory_summary(device=device, abbreviated=False))`
> |===========================================================================|
| PyTorch CUDA memory summary, device ID 0 |
|---------------------------------------------------------------------------|
| CUDA OOMs: 0 | cudaMalloc retries: 0 |
|===========================================================================|
| Metric | Cur Usage | Peak Usage | Tot Alloc | Tot Freed |
|---------------------------------------------------------------------------|
| Allocated memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB |
| from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB |
| from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB |
|---------------------------------------------------------------------------|
| Active memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB |
| from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB |
| from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB |
|---------------------------------------------------------------------------|
| GPU reserved memory | 598016 KB | 598016 KB | 598016 KB | 0 B |
| from large pool | 595968 KB | 595968 KB | 595968 KB | 0 B |
| from small pool | 2048 KB | 2048 KB | 2048 KB | 0 B |
|---------------------------------------------------------------------------|
| Non-releasable memory | 36117 KB | 52292 KB | 274275 KB | 238158 KB |
| from large pool | 34816 KB | 51537 KB | 261713 KB | 226897 KB |
| from small pool | 1301 KB | 2045 KB | 12562 KB | 11261 KB |
|---------------------------------------------------------------------------|
| Allocations | 198 | 224 | 478 | 280 |
| from large pool | 74 | 75 | 75 | 1 |
| from small pool | 124 | 150 | 403 | 279 |
|---------------------------------------------------------------------------|
| Active allocs | 198 | 224 | 478 | 280 |
| from large pool | 74 | 75 | 75 | 1 |
| from small pool | 124 | 150 | 403 | 279 |
|---------------------------------------------------------------------------|
| GPU reserved segments | 21 | 21 | 21 | 0 |
| from large pool | 20 | 20 | 20 | 0 |
| from small pool | 1 | 1 | 1 | 0 |
|---------------------------------------------------------------------------|
| Non-releasable allocs | 18 | 23 | 166 | 148 |
| from large pool | 17 | 18 | 19 | 2 |
| from small pool | 1 | 6 | 147 | 146 |
|===========================================================================|
## Expected results
Efficiently process the datasets and write it down to disk.
## Actual results
--------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only)
2390 else:
-> 2391 writer.write(example)
2392 else:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write(self, example, key, writer_batch_size)
367
--> 368 self.write_examples_on_file()
369
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self)
316 if not isinstance(pa_array[0], pa.lib.FloatScalar):
--> 317 raise OverflowError(
318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format(
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_16268/2456940807.py in <module>
3 #tracker = OfflineEmissionsTracker(country_iso_code="FRA", project_name='xxx'+time_stamp,output_dir='./codecarbon')
4 #tracker.start()
----> 5 process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection=['wikipedia'], from_scratch=True,
6 clean_sentences=False, negative_sampling=False, translate=False, tokenize=False, generate_embeddings=True, concatenate_embeddings=False,
7 max_sample=10000, padding='do_not_pad', truncation=True, cpu_batch_size=1000, gpu_batch_size=2, cpu_writer_batch_size=1000, gpu_writer_batch_size=2, disable_nullable=True, num_proc=None) #
~\xxx\xxx.py in process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection, from_scratch, clean_sentences, translate, negative_sampling, tokenize, generate_embeddings, concatenate_embeddings, max_sample, padding, truncation, cpu_batch_size, gpu_batch_size, cpu_writer_batch_size, gpu_writer_batch_size, disable_nullable, num_proc)
481 for column in tqdm(dataset.column_names, desc=f'Processing column', leave=False):
482 if "xxx_" in column:
--> 483 dataset = dataset.map(lambda example :
484 {"embeddings_"+str(column).replace("translated_",""):function(input_ids=example[column],
485 token_type_ids=example[column.replace("input_ids","token_type_ids")],
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2034
2035 if num_proc is None or num_proc == 1:
-> 2036 return self._map_single(
2037 function=function,
2038 with_indices=with_indices,
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs)
501 self: "Dataset" = kwargs.pop("self")
502 # apply actual function
--> 503 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
504 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
505 for dataset in datasets:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs)
468 }
469 # apply actual function
--> 470 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
471 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
472 # re-apply format to the output
~\anaconda3\envs\xxx\lib\site-packages\datasets\fingerprint.py in wrapper(*args, **kwargs)
404 # Call actual function
405
--> 406 out = func(self, *args, **kwargs)
407
408 # Update fingerprint of in-place transforms + update in-place history of transforms
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only)
2425 if update_data:
2426 if writer is not None:
-> 2427 writer.finalize()
2428 if tmp_file is not None:
2429 tmp_file.close()
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in finalize(self, close_stream)
440 # Re-intializing to empty list for next batch
441 self.hkey_record = []
--> 442 self.write_examples_on_file()
443 if self.pa_writer is None:
444 if self._schema is not None:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self)
315 # This check fails with FloatArrays with nans, which is not what we want, so account for that:
316 if not isinstance(pa_array[0], pa.lib.FloatScalar):
--> 317 raise OverflowError(
318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format(
319 type(pa_array)
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: Windows-10-10.0.19042-SP0
- Python version: 3.8.11
- PyArrow version: 3.0.0
##Next steps
Testing on Linux.
@albertvillanova
I am very unsure on why you tagged me here. I am not a maintainer of the Datasets library and have no idea how to help you. | [
-0.479187727,
-0.1015703529,
-0.1007575765,
0.3905477524,
0.2512301207,
-0.0684596151,
0.110699825,
0.2645792961,
-0.1296795756,
0.3843227625,
0.2181476653,
0.3294644058,
-0.1310050637,
-0.171629101,
0.0497370884,
-0.0603311583,
0.0917914584,
-0.2516676784,
-0.0394297801,
0.0323777013,
-0.2504083514,
-0.0869184881,
-0.1130416915,
-0.0151134161,
-0.0834399462,
-0.3049116731,
0.1398346126,
0.1140334308,
-0.2340848297,
-0.2418783456,
0.0897172168,
-0.1915831417,
0.2210235745,
0.2542473972,
-0.0001156218,
-0.0681017041,
0.2426096648,
0.0645803288,
-0.1508474052,
0.0526857041,
0.0428466424,
-0.4404890537,
-0.0704086348,
-0.3497676551,
0.2266318351,
-0.146755904,
-0.0106434831,
-0.1709754467,
0.2077376395,
0.296685189,
0.1989972442,
-0.0138501301,
0.1279187351,
0.0502239242,
0.5973916054,
-0.0425609313,
-0.1547391862,
0.1817258298,
0.4113595188,
-0.3212554157,
-0.3399894834,
0.0642787665,
-0.3123114109,
0.072313711,
0.073521167,
0.075538829,
-0.0019401717,
-0.2430858761,
0.0262549724,
-0.1978910565,
0.0675823241,
-0.3948005438,
-0.0795194879,
-0.1233012378,
-0.01576644,
-0.4527911842,
0.0995021015,
0.2328353375,
-0.4075734317,
-0.0989532843,
-0.4193738699,
0.115534991,
-0.1239221022,
0.2330792248,
-0.0592706501,
0.3074739277,
0.0047145355,
0.2095741034,
0.1966075003,
-0.0053505097,
0.5129472017,
-0.0709106699,
-0.0113270339,
0.2013026625,
-0.4676405787,
0.1051284447,
0.2939867973,
-0.050297983,
0.5077897906,
-0.0957450196,
0.1430461854,
-0.1436832696,
0.3505899012,
0.0293882098,
0.2170954943,
0.4565427303,
-0.2786488533,
0.4197797775,
0.2109335214,
-0.015759591,
0.1513211727,
-0.1198267713,
-0.0296276473,
-0.294377476,
0.2821810544,
-0.0091492822,
0.2403553575,
-0.156306982,
-0.3086294234,
0.1988817453,
-0.3600849807,
0.0612888187,
-0.0218716655,
0.3002026081,
0.1206999794,
-0.0293847881,
0.0294684507,
-0.1035251394,
-0.0404463299,
0.0078181876,
-0.2214458287,
-0.0186167471,
-0.3967348039,
0.0554235466,
0.1488303989,
0.0385816246,
0.2651042044,
0.1318564713,
0.3805133104,
-0.1918960363,
0.1950096041,
-0.2590518296,
0.2879866362,
0.2429532558,
-0.0098110586,
0.1963894665,
0.1639662087,
0.3001651168,
-0.0144201051,
0.6081847548,
-0.3857521713,
-0.4894141853,
-0.008911998,
0.1488808095,
0.1492080986,
0.3424102366,
-0.3296614289,
-0.17560637,
0.6020563245,
-0.177395612,
0.1349131763,
-0.2100272924,
0.1021257117,
-0.4289413691,
0.1298330724,
0.1081754267,
-0.7026268244,
0.2321744859,
-0.0112395138,
0.0854155496,
0.4426003695,
0.6264767051,
-0.3793057501,
0.1955495626,
-0.4166077077,
-0.0423506759,
0.1656564474,
-0.2223813236,
-0.6628283858,
0.0662822276,
-0.0400794372,
0.1180479676,
0.0214091856,
0.1136315018,
0.4583935738,
0.10323634,
0.3721669018,
0.2542295754,
-0.3773190975,
0.2213817239,
-0.3497408032,
-0.2212026864,
0.0168304015,
-0.0439370424,
0.0643144175,
-0.138578698,
0.0896297246,
-0.165746361,
0.2688992023,
-0.2118355036,
0.0362545103,
0.1838577837,
0.2896965146,
-0.1664542258,
-0.1146837845,
-0.1004823893,
-0.299952209,
0.0535285361,
-0.2676371634,
-0.1073116064,
-0.2515853047,
-0.294473201,
-0.0730567724,
0.199547708,
0.0247374941,
-0.0814574733,
0.11329294,
0.0186101235,
0.1513359249,
-0.1031117812,
0.1201156676,
0.1809508204,
-0.4612055421,
-0.0600751489,
-0.2285696119,
0.1009553969,
-0.1340087205,
-0.3965064883,
-0.1587678641,
0.0104813436,
0.0488834232,
-0.0901871324,
-0.1125798374,
0.2798413038,
0.0239922404,
-0.3586606979,
-0.3417611718,
0.0024193851,
0.1557073742,
-0.1216349006,
0.2745079994,
0.0010635058,
0.0594686344,
-0.0877708942,
-0.0765740722,
0.2095308602,
0.1757121831,
0.1426494271,
-0.1151322797,
0.0512536988,
0.0651133955,
0.129843533,
0.1758109927,
0.0157210026,
0.1712499112,
0.2229857445,
0.3608556092,
-0.058063779,
-0.1580516249,
0.0946134701,
0.4701105356,
-0.0197819732,
0.1945523322,
0.138113305,
-0.2135621011,
-0.1268223524,
0.2226801217,
-0.1140942276,
0.3751446605,
0.2416902483,
-0.060277205,
-0.1704899967,
-0.0751103759,
-0.0352934897,
0.0658043921,
-0.0042864676,
0.2925326526,
0.0399405919,
0.4612779319,
-0.0292338226,
-0.2392121255,
-0.0579592474,
0.0077319001,
0.3310962319,
-0.1639626771,
0.0594537109,
0.1934714764,
-0.2000394464,
0.0213531218,
-0.2389667332,
-0.1020776853,
-0.1513520777,
-0.004653703,
0.2886987031,
-0.0756481066,
0.2363173664,
0.4554079771,
0.3434215486,
0.3280370831,
-0.1805103272,
0.163372919,
-0.1627670527,
-0.150252834,
0.1015177146,
0.3950356543,
-0.3732883632,
0.2742287517,
0.245591417,
-0.1506751776,
-0.1934230179,
-0.1251229644,
-0.1164163649,
0.052692797,
0.3520665765,
0.0071146488,
0.2117316872,
-0.1039762571,
-0.2358808666,
0.0012239366,
-0.007163845,
-0.2696328163,
-0.0120425429,
-0.031946063,
-0.0347350501,
-0.1717882305,
-0.1776196063,
-0.0253135022,
-0.5092659593,
-0.0226760544,
0.0186969358,
0.1199767515,
-0.2123199701,
0.3679848909,
0.1896443814,
0.0993029624,
-0.2219923735,
-0.0520101562,
-0.1427072138,
0.192228511,
-0.1869852543,
-0.3465237617,
0.0265485197,
0.0426836424,
0.0125976847,
0.3760281503,
-0.4561063051,
0.0023039402,
-0.2894492149,
0.391746968,
-0.1043550298,
0.0885510892,
0.4165964723,
0.2006843984,
-0.0801264718,
0.0194086153,
-0.3021275401,
-0.1463982612,
-0.0703578517,
0.3098172247,
-0.223472625,
0.5141127706,
0.1556687802,
0.8973590732,
0.1516394168,
-0.0577582382,
0.0690153241,
0.0083152624,
0.1206523702,
-0.1576683223,
-0.2264820337,
0.1268746108,
-0.3355574012,
-0.3323042989,
0.0300171524,
-0.1291039288,
-0.4020169973,
0.3145283163,
-0.0849063247,
-0.0833354443,
-0.1360343099,
0.4673127234,
-0.0168910325,
0.12124037,
0.0214408468,
-0.1180545017,
-0.3483948708,
-0.2420331836,
-0.1520870328,
-0.2942225933,
0.1402309835,
-0.0573591068,
-0.065333344,
0.0364748798,
-0.5067279935,
0.3724133968,
0.101229623,
0.0488495678,
0.0224717967,
-0.0511842556,
0.0589356422,
-0.0937977731,
0.9618670344,
0.146020785,
-0.0949706584,
0.0091300802,
0.0239053238,
-0.2868478298,
-0.1285872906,
-0.2825306654,
0.3173022866,
0.2238133252,
0.1256037802,
-0.0313245505,
0.1251302212,
0.4412666261,
0.1860028654,
-0.0615250729,
-0.0115610808,
-0.1872359961,
-0.3339577317,
-0.1719823927,
0.265489012,
0.1500135362,
0.2891027927,
-0.2220834345,
-0.2121141404,
-0.1066213474,
0.057149481,
-0.2158267349,
-0.0188476685,
0.4552587271,
-0.2401275486,
-0.0597652867,
-0.2460249364,
0.0746112168,
0.5032151937,
0.2407893389,
0.1431214958,
-0.1300384402,
0.1611729711,
-0.0793608874,
0.2580999434,
0.2065446526,
-0.3137194812,
-0.0913977027,
-0.2426700145,
0.3308961093,
-0.0635171011,
-0.084702678,
0.1200651973,
0.1214456931,
-0.2818758786,
-0.1997781396,
0.3138835132,
0.3711993098,
0.061033655,
0.6691934466,
-0.1313781589,
-0.3500020504,
0.4215915799,
0.3243148029,
0.8939198256,
-0.3097160459,
0.2265147716,
0.2086906731,
0.1708422452,
0.336150825,
-0.1273701042,
0.3945915997,
-0.127914086,
-0.1847926676,
0.2082967609,
-0.2740602195,
0.28285411,
0.0293359533,
-0.1533336043,
0.1581254452,
-0.2761293948,
0.0805426165,
-0.0515510254,
-0.2510461509,
0.1033606827,
-0.0902238041,
-0.2017545998,
0.0952299833,
-0.0807643682,
-0.2853992879,
-0.2575499713,
0.0739516765,
-0.1080404893,
-0.2995843887,
-0.4772166908,
-0.00779266,
-0.5179556608,
0.2383913249,
-0.1917430609,
-0.3832321763,
0.0471280515,
0.2057789862,
-0.0981286839,
0.174925819,
0.1243907288,
-0.1798556745,
0.1329533607,
-0.0863378271,
0.1112647653,
-0.0351901166,
0.0819876418,
-0.0383481011,
-0.1211851761,
0.327608794,
-0.0086859344,
-0.2479594648,
-0.075865075,
0.4736145437,
0.2426109314,
-0.4416618943,
-0.3372668028,
-0.1354171187,
-0.216290459,
-0.1437465549,
0.0940373763,
0.0507688001,
-0.1565545499,
0.2919935286,
-0.138919279,
-0.2969407141,
-0.0680983961,
0.1564763784,
0.2843622863,
-0.123844862,
0.2947799563,
0.1312450469,
-0.0740556568,
-0.0906924084,
-0.1408912539,
0.1929135919,
-0.4388518929,
0.2716916502,
-0.268658489,
0.0990873799,
-0.1028516367,
0.2368675172,
0.0850088149,
0.1902065873,
-0.1922501028,
-0.322548449,
-0.3980670571,
0.08703392,
0.0661114231,
0.1624577492,
0.1147591248,
-0.016353149,
0.0126980245,
0.0923114792,
-0.2672079504,
-0.0798373744,
-0.2256745547,
0.3586832881,
-0.0987116694,
0.3527520597,
0.1310482621,
0.0448109284,
0.0077460096,
0.2576084435,
-0.0334169045,
-0.2995724976,
0.1317290217,
0.0881334171,
-0.0561476164,
-0.0864238888,
0.1042060405,
-0.2668215036,
0.0462048873,
-0.2482133657,
0.4122291803,
0.1210994124,
0.0238681436,
-0.117462039,
0.2462502718,
-0.0301817376,
-0.034411896,
0.2263373584,
-0.0774528533,
-0.1418037415,
0.1454771906,
0.4433409572,
0.1424457878,
-0.043604359,
-0.069829978,
-0.0876395777,
-0.0290591307,
0.3505159616,
0.1029141247,
-0.3172495663,
-0.3241268992,
0.1262038648,
0.0980599597,
0.1775285155,
-0.3136764467,
-0.1726113856,
0.0411236621,
0.176245451,
-0.2664862871,
-0.1499407142,
0.2057940364,
-0.0397223011,
0.1245190576,
0.302714318,
-0.0670263618,
-0.1316403896,
0.0754143298,
0.0757920146,
0.2567967772,
-0.1814986169,
0.1550194472,
0.2464233637,
0.1312321126,
-0.1171646789,
0.3629879951,
0.09944278,
0.3190084994,
0.6573691964,
0.1554944217,
0.2676815391,
0.0792951882,
-0.0054267226,
-0.1145642325,
-0.3448477685,
0.1738632321,
0.3618226051,
-0.1329773068,
0.2186556607,
-0.0661172941,
-0.1043033004,
0.224795267,
-0.2719557285,
-0.0111368326,
-0.0111033414,
-0.3259142637,
0.1208395958,
-0.0492308997,
-0.0660874695,
0.3536933362,
0.10475903,
-0.0706807077,
-0.2263384461,
0.5584257245,
-0.0989886597,
-0.2886700034,
-0.1290519983,
0.1547274888,
0.2330648303,
-0.0544895902,
-0.2015145421,
0.3102817237,
-0.0705333278,
0.0473092161,
-0.3310429752,
0.5736221671,
0.6677613854,
0.59535712,
0.1157633141,
0.2989175916,
0.0259280894,
-0.1185858399,
-0.3550841212,
0.0213853344,
0.198481515,
0.2545178831,
-0.0234009922,
0.1852476001,
-0.1561180651,
0.2198586911,
0.3102975488,
0.0529097058,
-0.0390310548,
-0.1395923495,
-0.1171744689,
-0.5824773312,
-0.0470162258,
-0.0065989201,
-0.3027576208,
0.2128089815,
0.5031033158,
-0.0349761546,
0.1908441037,
0.058949329,
0.0676832125,
-0.1636146903,
0.4986672401,
0.3767556548,
0.1895918995,
-0.524199307,
-0.2742633224,
-0.2657105029,
0.2245099545,
-0.5641300082,
0.141417712,
0.0922592804,
0.3126161098,
-0.1720100939,
0.1259641945,
0.1591007859,
-0.0465502888,
-0.2695774138,
0.3187477589,
-0.4677337706,
-0.3614369929,
-0.0433811806,
-0.1730004549,
0.0797775239,
-0.5220760107,
0.2191436738,
-0.2119642794,
0.0654361024,
-0.1108839661,
0.1677155644,
0.2062461823,
0.1528917998,
0.3983175755,
0.2625643611,
0.199771598,
0.1089654341,
-0.113725394,
-0.280354023,
-0.0738904551,
-0.2468328178,
0.2457490414,
0.2761388123,
0.3112264872,
-0.3319994509,
-0.387717545,
-0.2573619783,
0.3337297142,
0.2134018987,
-0.0387281775,
0.1329558641,
0.0774705634,
0.1548876315,
-0.1490870863,
0.1535382569,
0.1817612052,
-0.0874544233,
0.2136540264,
-0.2977227569,
-0.2377317101,
0.2472134531,
-0.5494278669,
-0.2740102112,
0.0944089815,
0.1903613955,
-0.1410510242,
-0.4291653335,
-0.5124765038,
0.0349138789,
0.3105964661,
-0.0756044984,
-0.3254616559,
0.2370798737,
-0.2060529143,
0.1657158136,
-0.1125162467,
0.3683624864,
0.0324478634,
-0.3300302625,
0.2431683093,
-0.4985694885
] |
https://github.com/huggingface/datasets/issues/3112 | OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB | Ok got it, tensor full of NaNs, cf.
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self)
315 # This check fails with FloatArrays with nans, which is not what we want, so account for that: | ## Describe the bug
Despite having batches way under 2Gb when running `datasets.map()`, after processing correctly the data of the first batch without fuss and irrespective of writer_batch_size (say 2,4,8,16,32,64 and 128 in my case), it returns the following error :
> OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
Note that I always run `batch_size=writer_batch_size` :
## Steps to reproduce the bug
```python
datasets.map(lambda example : {"column_name" : function(arguments)}, batched=False, remove_columns = datasets.column_names, batch_size=batch_size, writer_batch_size=batch_size, disable_nullable=True, num_proc=None, desc="blablabla")
```
## Introspecting CUDA memory during bug
Placed within `function(arguments)` the following statement to introspect memory usage, merely a little over 1/4 of 2Gb
`print(torch.cuda.memory_summary(device=device, abbreviated=False))`
> |===========================================================================|
| PyTorch CUDA memory summary, device ID 0 |
|---------------------------------------------------------------------------|
| CUDA OOMs: 0 | cudaMalloc retries: 0 |
|===========================================================================|
| Metric | Cur Usage | Peak Usage | Tot Alloc | Tot Freed |
|---------------------------------------------------------------------------|
| Allocated memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB |
| from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB |
| from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB |
|---------------------------------------------------------------------------|
| Active memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB |
| from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB |
| from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB |
|---------------------------------------------------------------------------|
| GPU reserved memory | 598016 KB | 598016 KB | 598016 KB | 0 B |
| from large pool | 595968 KB | 595968 KB | 595968 KB | 0 B |
| from small pool | 2048 KB | 2048 KB | 2048 KB | 0 B |
|---------------------------------------------------------------------------|
| Non-releasable memory | 36117 KB | 52292 KB | 274275 KB | 238158 KB |
| from large pool | 34816 KB | 51537 KB | 261713 KB | 226897 KB |
| from small pool | 1301 KB | 2045 KB | 12562 KB | 11261 KB |
|---------------------------------------------------------------------------|
| Allocations | 198 | 224 | 478 | 280 |
| from large pool | 74 | 75 | 75 | 1 |
| from small pool | 124 | 150 | 403 | 279 |
|---------------------------------------------------------------------------|
| Active allocs | 198 | 224 | 478 | 280 |
| from large pool | 74 | 75 | 75 | 1 |
| from small pool | 124 | 150 | 403 | 279 |
|---------------------------------------------------------------------------|
| GPU reserved segments | 21 | 21 | 21 | 0 |
| from large pool | 20 | 20 | 20 | 0 |
| from small pool | 1 | 1 | 1 | 0 |
|---------------------------------------------------------------------------|
| Non-releasable allocs | 18 | 23 | 166 | 148 |
| from large pool | 17 | 18 | 19 | 2 |
| from small pool | 1 | 6 | 147 | 146 |
|===========================================================================|
## Expected results
Efficiently process the datasets and write it down to disk.
## Actual results
--------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only)
2390 else:
-> 2391 writer.write(example)
2392 else:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write(self, example, key, writer_batch_size)
367
--> 368 self.write_examples_on_file()
369
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self)
316 if not isinstance(pa_array[0], pa.lib.FloatScalar):
--> 317 raise OverflowError(
318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format(
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_16268/2456940807.py in <module>
3 #tracker = OfflineEmissionsTracker(country_iso_code="FRA", project_name='xxx'+time_stamp,output_dir='./codecarbon')
4 #tracker.start()
----> 5 process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection=['wikipedia'], from_scratch=True,
6 clean_sentences=False, negative_sampling=False, translate=False, tokenize=False, generate_embeddings=True, concatenate_embeddings=False,
7 max_sample=10000, padding='do_not_pad', truncation=True, cpu_batch_size=1000, gpu_batch_size=2, cpu_writer_batch_size=1000, gpu_writer_batch_size=2, disable_nullable=True, num_proc=None) #
~\xxx\xxx.py in process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection, from_scratch, clean_sentences, translate, negative_sampling, tokenize, generate_embeddings, concatenate_embeddings, max_sample, padding, truncation, cpu_batch_size, gpu_batch_size, cpu_writer_batch_size, gpu_writer_batch_size, disable_nullable, num_proc)
481 for column in tqdm(dataset.column_names, desc=f'Processing column', leave=False):
482 if "xxx_" in column:
--> 483 dataset = dataset.map(lambda example :
484 {"embeddings_"+str(column).replace("translated_",""):function(input_ids=example[column],
485 token_type_ids=example[column.replace("input_ids","token_type_ids")],
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2034
2035 if num_proc is None or num_proc == 1:
-> 2036 return self._map_single(
2037 function=function,
2038 with_indices=with_indices,
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs)
501 self: "Dataset" = kwargs.pop("self")
502 # apply actual function
--> 503 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
504 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
505 for dataset in datasets:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs)
468 }
469 # apply actual function
--> 470 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
471 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
472 # re-apply format to the output
~\anaconda3\envs\xxx\lib\site-packages\datasets\fingerprint.py in wrapper(*args, **kwargs)
404 # Call actual function
405
--> 406 out = func(self, *args, **kwargs)
407
408 # Update fingerprint of in-place transforms + update in-place history of transforms
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only)
2425 if update_data:
2426 if writer is not None:
-> 2427 writer.finalize()
2428 if tmp_file is not None:
2429 tmp_file.close()
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in finalize(self, close_stream)
440 # Re-intializing to empty list for next batch
441 self.hkey_record = []
--> 442 self.write_examples_on_file()
443 if self.pa_writer is None:
444 if self._schema is not None:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self)
315 # This check fails with FloatArrays with nans, which is not what we want, so account for that:
316 if not isinstance(pa_array[0], pa.lib.FloatScalar):
--> 317 raise OverflowError(
318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format(
319 type(pa_array)
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: Windows-10-10.0.19042-SP0
- Python version: 3.8.11
- PyArrow version: 3.0.0
##Next steps
Testing on Linux.
@albertvillanova
| 30 | OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
## Describe the bug
Despite having batches way under 2Gb when running `datasets.map()`, after processing correctly the data of the first batch without fuss and irrespective of writer_batch_size (say 2,4,8,16,32,64 and 128 in my case), it returns the following error :
> OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
Note that I always run `batch_size=writer_batch_size` :
## Steps to reproduce the bug
```python
datasets.map(lambda example : {"column_name" : function(arguments)}, batched=False, remove_columns = datasets.column_names, batch_size=batch_size, writer_batch_size=batch_size, disable_nullable=True, num_proc=None, desc="blablabla")
```
## Introspecting CUDA memory during bug
Placed within `function(arguments)` the following statement to introspect memory usage, merely a little over 1/4 of 2Gb
`print(torch.cuda.memory_summary(device=device, abbreviated=False))`
> |===========================================================================|
| PyTorch CUDA memory summary, device ID 0 |
|---------------------------------------------------------------------------|
| CUDA OOMs: 0 | cudaMalloc retries: 0 |
|===========================================================================|
| Metric | Cur Usage | Peak Usage | Tot Alloc | Tot Freed |
|---------------------------------------------------------------------------|
| Allocated memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB |
| from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB |
| from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB |
|---------------------------------------------------------------------------|
| Active memory | 541418 KB | 545725 KB | 555695 KB | 14276 KB |
| from large pool | 540672 KB | 544431 KB | 544431 KB | 3759 KB |
| from small pool | 746 KB | 1714 KB | 11264 KB | 10517 KB |
|---------------------------------------------------------------------------|
| GPU reserved memory | 598016 KB | 598016 KB | 598016 KB | 0 B |
| from large pool | 595968 KB | 595968 KB | 595968 KB | 0 B |
| from small pool | 2048 KB | 2048 KB | 2048 KB | 0 B |
|---------------------------------------------------------------------------|
| Non-releasable memory | 36117 KB | 52292 KB | 274275 KB | 238158 KB |
| from large pool | 34816 KB | 51537 KB | 261713 KB | 226897 KB |
| from small pool | 1301 KB | 2045 KB | 12562 KB | 11261 KB |
|---------------------------------------------------------------------------|
| Allocations | 198 | 224 | 478 | 280 |
| from large pool | 74 | 75 | 75 | 1 |
| from small pool | 124 | 150 | 403 | 279 |
|---------------------------------------------------------------------------|
| Active allocs | 198 | 224 | 478 | 280 |
| from large pool | 74 | 75 | 75 | 1 |
| from small pool | 124 | 150 | 403 | 279 |
|---------------------------------------------------------------------------|
| GPU reserved segments | 21 | 21 | 21 | 0 |
| from large pool | 20 | 20 | 20 | 0 |
| from small pool | 1 | 1 | 1 | 0 |
|---------------------------------------------------------------------------|
| Non-releasable allocs | 18 | 23 | 166 | 148 |
| from large pool | 17 | 18 | 19 | 2 |
| from small pool | 1 | 6 | 147 | 146 |
|===========================================================================|
## Expected results
Efficiently process the datasets and write it down to disk.
## Actual results
--------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only)
2390 else:
-> 2391 writer.write(example)
2392 else:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write(self, example, key, writer_batch_size)
367
--> 368 self.write_examples_on_file()
369
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self)
316 if not isinstance(pa_array[0], pa.lib.FloatScalar):
--> 317 raise OverflowError(
318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format(
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_16268/2456940807.py in <module>
3 #tracker = OfflineEmissionsTracker(country_iso_code="FRA", project_name='xxx'+time_stamp,output_dir='./codecarbon')
4 #tracker.start()
----> 5 process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection=['wikipedia'], from_scratch=True,
6 clean_sentences=False, negative_sampling=False, translate=False, tokenize=False, generate_embeddings=True, concatenate_embeddings=False,
7 max_sample=10000, padding='do_not_pad', truncation=True, cpu_batch_size=1000, gpu_batch_size=2, cpu_writer_batch_size=1000, gpu_writer_batch_size=2, disable_nullable=True, num_proc=None) #
~\xxx\xxx.py in process_datasets(source_datasets_paths, dataset_dir, LM_tokenizer, LMhead_model, datasets_selection, from_scratch, clean_sentences, translate, negative_sampling, tokenize, generate_embeddings, concatenate_embeddings, max_sample, padding, truncation, cpu_batch_size, gpu_batch_size, cpu_writer_batch_size, gpu_writer_batch_size, disable_nullable, num_proc)
481 for column in tqdm(dataset.column_names, desc=f'Processing column', leave=False):
482 if "xxx_" in column:
--> 483 dataset = dataset.map(lambda example :
484 {"embeddings_"+str(column).replace("translated_",""):function(input_ids=example[column],
485 token_type_ids=example[column.replace("input_ids","token_type_ids")],
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2034
2035 if num_proc is None or num_proc == 1:
-> 2036 return self._map_single(
2037 function=function,
2038 with_indices=with_indices,
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs)
501 self: "Dataset" = kwargs.pop("self")
502 # apply actual function
--> 503 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
504 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
505 for dataset in datasets:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in wrapper(*args, **kwargs)
468 }
469 # apply actual function
--> 470 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
471 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
472 # re-apply format to the output
~\anaconda3\envs\xxx\lib\site-packages\datasets\fingerprint.py in wrapper(*args, **kwargs)
404 # Call actual function
405
--> 406 out = func(self, *args, **kwargs)
407
408 # Update fingerprint of in-place transforms + update in-place history of transforms
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, disable_tqdm, desc, cache_only)
2425 if update_data:
2426 if writer is not None:
-> 2427 writer.finalize()
2428 if tmp_file is not None:
2429 tmp_file.close()
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in finalize(self, close_stream)
440 # Re-intializing to empty list for next batch
441 self.hkey_record = []
--> 442 self.write_examples_on_file()
443 if self.pa_writer is None:
444 if self._schema is not None:
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self)
315 # This check fails with FloatArrays with nans, which is not what we want, so account for that:
316 if not isinstance(pa_array[0], pa.lib.FloatScalar):
--> 317 raise OverflowError(
318 "There was an overflow in the {}. Try to reduce writer_batch_size to have batches smaller than 2GB".format(
319 type(pa_array)
OverflowError: There was an overflow in the <class 'pyarrow.lib.ListArray'>. Try to reduce writer_batch_size to have batches smaller than 2GB
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: Windows-10-10.0.19042-SP0
- Python version: 3.8.11
- PyArrow version: 3.0.0
##Next steps
Testing on Linux.
@albertvillanova
Ok got it, tensor full of NaNs, cf.
~\anaconda3\envs\xxx\lib\site-packages\datasets\arrow_writer.py in write_examples_on_file(self)
315 # This check fails with FloatArrays with nans, which is not what we want, so account for that: | [
-0.479187727,
-0.1015703529,
-0.1007575765,
0.3905477524,
0.2512301207,
-0.0684596151,
0.110699825,
0.2645792961,
-0.1296795756,
0.3843227625,
0.2181476653,
0.3294644058,
-0.1310050637,
-0.171629101,
0.0497370884,
-0.0603311583,
0.0917914584,
-0.2516676784,
-0.0394297801,
0.0323777013,
-0.2504083514,
-0.0869184881,
-0.1130416915,
-0.0151134161,
-0.0834399462,
-0.3049116731,
0.1398346126,
0.1140334308,
-0.2340848297,
-0.2418783456,
0.0897172168,
-0.1915831417,
0.2210235745,
0.2542473972,
-0.0001156218,
-0.0681017041,
0.2426096648,
0.0645803288,
-0.1508474052,
0.0526857041,
0.0428466424,
-0.4404890537,
-0.0704086348,
-0.3497676551,
0.2266318351,
-0.146755904,
-0.0106434831,
-0.1709754467,
0.2077376395,
0.296685189,
0.1989972442,
-0.0138501301,
0.1279187351,
0.0502239242,
0.5973916054,
-0.0425609313,
-0.1547391862,
0.1817258298,
0.4113595188,
-0.3212554157,
-0.3399894834,
0.0642787665,
-0.3123114109,
0.072313711,
0.073521167,
0.075538829,
-0.0019401717,
-0.2430858761,
0.0262549724,
-0.1978910565,
0.0675823241,
-0.3948005438,
-0.0795194879,
-0.1233012378,
-0.01576644,
-0.4527911842,
0.0995021015,
0.2328353375,
-0.4075734317,
-0.0989532843,
-0.4193738699,
0.115534991,
-0.1239221022,
0.2330792248,
-0.0592706501,
0.3074739277,
0.0047145355,
0.2095741034,
0.1966075003,
-0.0053505097,
0.5129472017,
-0.0709106699,
-0.0113270339,
0.2013026625,
-0.4676405787,
0.1051284447,
0.2939867973,
-0.050297983,
0.5077897906,
-0.0957450196,
0.1430461854,
-0.1436832696,
0.3505899012,
0.0293882098,
0.2170954943,
0.4565427303,
-0.2786488533,
0.4197797775,
0.2109335214,
-0.015759591,
0.1513211727,
-0.1198267713,
-0.0296276473,
-0.294377476,
0.2821810544,
-0.0091492822,
0.2403553575,
-0.156306982,
-0.3086294234,
0.1988817453,
-0.3600849807,
0.0612888187,
-0.0218716655,
0.3002026081,
0.1206999794,
-0.0293847881,
0.0294684507,
-0.1035251394,
-0.0404463299,
0.0078181876,
-0.2214458287,
-0.0186167471,
-0.3967348039,
0.0554235466,
0.1488303989,
0.0385816246,
0.2651042044,
0.1318564713,
0.3805133104,
-0.1918960363,
0.1950096041,
-0.2590518296,
0.2879866362,
0.2429532558,
-0.0098110586,
0.1963894665,
0.1639662087,
0.3001651168,
-0.0144201051,
0.6081847548,
-0.3857521713,
-0.4894141853,
-0.008911998,
0.1488808095,
0.1492080986,
0.3424102366,
-0.3296614289,
-0.17560637,
0.6020563245,
-0.177395612,
0.1349131763,
-0.2100272924,
0.1021257117,
-0.4289413691,
0.1298330724,
0.1081754267,
-0.7026268244,
0.2321744859,
-0.0112395138,
0.0854155496,
0.4426003695,
0.6264767051,
-0.3793057501,
0.1955495626,
-0.4166077077,
-0.0423506759,
0.1656564474,
-0.2223813236,
-0.6628283858,
0.0662822276,
-0.0400794372,
0.1180479676,
0.0214091856,
0.1136315018,
0.4583935738,
0.10323634,
0.3721669018,
0.2542295754,
-0.3773190975,
0.2213817239,
-0.3497408032,
-0.2212026864,
0.0168304015,
-0.0439370424,
0.0643144175,
-0.138578698,
0.0896297246,
-0.165746361,
0.2688992023,
-0.2118355036,
0.0362545103,
0.1838577837,
0.2896965146,
-0.1664542258,
-0.1146837845,
-0.1004823893,
-0.299952209,
0.0535285361,
-0.2676371634,
-0.1073116064,
-0.2515853047,
-0.294473201,
-0.0730567724,
0.199547708,
0.0247374941,
-0.0814574733,
0.11329294,
0.0186101235,
0.1513359249,
-0.1031117812,
0.1201156676,
0.1809508204,
-0.4612055421,
-0.0600751489,
-0.2285696119,
0.1009553969,
-0.1340087205,
-0.3965064883,
-0.1587678641,
0.0104813436,
0.0488834232,
-0.0901871324,
-0.1125798374,
0.2798413038,
0.0239922404,
-0.3586606979,
-0.3417611718,
0.0024193851,
0.1557073742,
-0.1216349006,
0.2745079994,
0.0010635058,
0.0594686344,
-0.0877708942,
-0.0765740722,
0.2095308602,
0.1757121831,
0.1426494271,
-0.1151322797,
0.0512536988,
0.0651133955,
0.129843533,
0.1758109927,
0.0157210026,
0.1712499112,
0.2229857445,
0.3608556092,
-0.058063779,
-0.1580516249,
0.0946134701,
0.4701105356,
-0.0197819732,
0.1945523322,
0.138113305,
-0.2135621011,
-0.1268223524,
0.2226801217,
-0.1140942276,
0.3751446605,
0.2416902483,
-0.060277205,
-0.1704899967,
-0.0751103759,
-0.0352934897,
0.0658043921,
-0.0042864676,
0.2925326526,
0.0399405919,
0.4612779319,
-0.0292338226,
-0.2392121255,
-0.0579592474,
0.0077319001,
0.3310962319,
-0.1639626771,
0.0594537109,
0.1934714764,
-0.2000394464,
0.0213531218,
-0.2389667332,
-0.1020776853,
-0.1513520777,
-0.004653703,
0.2886987031,
-0.0756481066,
0.2363173664,
0.4554079771,
0.3434215486,
0.3280370831,
-0.1805103272,
0.163372919,
-0.1627670527,
-0.150252834,
0.1015177146,
0.3950356543,
-0.3732883632,
0.2742287517,
0.245591417,
-0.1506751776,
-0.1934230179,
-0.1251229644,
-0.1164163649,
0.052692797,
0.3520665765,
0.0071146488,
0.2117316872,
-0.1039762571,
-0.2358808666,
0.0012239366,
-0.007163845,
-0.2696328163,
-0.0120425429,
-0.031946063,
-0.0347350501,
-0.1717882305,
-0.1776196063,
-0.0253135022,
-0.5092659593,
-0.0226760544,
0.0186969358,
0.1199767515,
-0.2123199701,
0.3679848909,
0.1896443814,
0.0993029624,
-0.2219923735,
-0.0520101562,
-0.1427072138,
0.192228511,
-0.1869852543,
-0.3465237617,
0.0265485197,
0.0426836424,
0.0125976847,
0.3760281503,
-0.4561063051,
0.0023039402,
-0.2894492149,
0.391746968,
-0.1043550298,
0.0885510892,
0.4165964723,
0.2006843984,
-0.0801264718,
0.0194086153,
-0.3021275401,
-0.1463982612,
-0.0703578517,
0.3098172247,
-0.223472625,
0.5141127706,
0.1556687802,
0.8973590732,
0.1516394168,
-0.0577582382,
0.0690153241,
0.0083152624,
0.1206523702,
-0.1576683223,
-0.2264820337,
0.1268746108,
-0.3355574012,
-0.3323042989,
0.0300171524,
-0.1291039288,
-0.4020169973,
0.3145283163,
-0.0849063247,
-0.0833354443,
-0.1360343099,
0.4673127234,
-0.0168910325,
0.12124037,
0.0214408468,
-0.1180545017,
-0.3483948708,
-0.2420331836,
-0.1520870328,
-0.2942225933,
0.1402309835,
-0.0573591068,
-0.065333344,
0.0364748798,
-0.5067279935,
0.3724133968,
0.101229623,
0.0488495678,
0.0224717967,
-0.0511842556,
0.0589356422,
-0.0937977731,
0.9618670344,
0.146020785,
-0.0949706584,
0.0091300802,
0.0239053238,
-0.2868478298,
-0.1285872906,
-0.2825306654,
0.3173022866,
0.2238133252,
0.1256037802,
-0.0313245505,
0.1251302212,
0.4412666261,
0.1860028654,
-0.0615250729,
-0.0115610808,
-0.1872359961,
-0.3339577317,
-0.1719823927,
0.265489012,
0.1500135362,
0.2891027927,
-0.2220834345,
-0.2121141404,
-0.1066213474,
0.057149481,
-0.2158267349,
-0.0188476685,
0.4552587271,
-0.2401275486,
-0.0597652867,
-0.2460249364,
0.0746112168,
0.5032151937,
0.2407893389,
0.1431214958,
-0.1300384402,
0.1611729711,
-0.0793608874,
0.2580999434,
0.2065446526,
-0.3137194812,
-0.0913977027,
-0.2426700145,
0.3308961093,
-0.0635171011,
-0.084702678,
0.1200651973,
0.1214456931,
-0.2818758786,
-0.1997781396,
0.3138835132,
0.3711993098,
0.061033655,
0.6691934466,
-0.1313781589,
-0.3500020504,
0.4215915799,
0.3243148029,
0.8939198256,
-0.3097160459,
0.2265147716,
0.2086906731,
0.1708422452,
0.336150825,
-0.1273701042,
0.3945915997,
-0.127914086,
-0.1847926676,
0.2082967609,
-0.2740602195,
0.28285411,
0.0293359533,
-0.1533336043,
0.1581254452,
-0.2761293948,
0.0805426165,
-0.0515510254,
-0.2510461509,
0.1033606827,
-0.0902238041,
-0.2017545998,
0.0952299833,
-0.0807643682,
-0.2853992879,
-0.2575499713,
0.0739516765,
-0.1080404893,
-0.2995843887,
-0.4772166908,
-0.00779266,
-0.5179556608,
0.2383913249,
-0.1917430609,
-0.3832321763,
0.0471280515,
0.2057789862,
-0.0981286839,
0.174925819,
0.1243907288,
-0.1798556745,
0.1329533607,
-0.0863378271,
0.1112647653,
-0.0351901166,
0.0819876418,
-0.0383481011,
-0.1211851761,
0.327608794,
-0.0086859344,
-0.2479594648,
-0.075865075,
0.4736145437,
0.2426109314,
-0.4416618943,
-0.3372668028,
-0.1354171187,
-0.216290459,
-0.1437465549,
0.0940373763,
0.0507688001,
-0.1565545499,
0.2919935286,
-0.138919279,
-0.2969407141,
-0.0680983961,
0.1564763784,
0.2843622863,
-0.123844862,
0.2947799563,
0.1312450469,
-0.0740556568,
-0.0906924084,
-0.1408912539,
0.1929135919,
-0.4388518929,
0.2716916502,
-0.268658489,
0.0990873799,
-0.1028516367,
0.2368675172,
0.0850088149,
0.1902065873,
-0.1922501028,
-0.322548449,
-0.3980670571,
0.08703392,
0.0661114231,
0.1624577492,
0.1147591248,
-0.016353149,
0.0126980245,
0.0923114792,
-0.2672079504,
-0.0798373744,
-0.2256745547,
0.3586832881,
-0.0987116694,
0.3527520597,
0.1310482621,
0.0448109284,
0.0077460096,
0.2576084435,
-0.0334169045,
-0.2995724976,
0.1317290217,
0.0881334171,
-0.0561476164,
-0.0864238888,
0.1042060405,
-0.2668215036,
0.0462048873,
-0.2482133657,
0.4122291803,
0.1210994124,
0.0238681436,
-0.117462039,
0.2462502718,
-0.0301817376,
-0.034411896,
0.2263373584,
-0.0774528533,
-0.1418037415,
0.1454771906,
0.4433409572,
0.1424457878,
-0.043604359,
-0.069829978,
-0.0876395777,
-0.0290591307,
0.3505159616,
0.1029141247,
-0.3172495663,
-0.3241268992,
0.1262038648,
0.0980599597,
0.1775285155,
-0.3136764467,
-0.1726113856,
0.0411236621,
0.176245451,
-0.2664862871,
-0.1499407142,
0.2057940364,
-0.0397223011,
0.1245190576,
0.302714318,
-0.0670263618,
-0.1316403896,
0.0754143298,
0.0757920146,
0.2567967772,
-0.1814986169,
0.1550194472,
0.2464233637,
0.1312321126,
-0.1171646789,
0.3629879951,
0.09944278,
0.3190084994,
0.6573691964,
0.1554944217,
0.2676815391,
0.0792951882,
-0.0054267226,
-0.1145642325,
-0.3448477685,
0.1738632321,
0.3618226051,
-0.1329773068,
0.2186556607,
-0.0661172941,
-0.1043033004,
0.224795267,
-0.2719557285,
-0.0111368326,
-0.0111033414,
-0.3259142637,
0.1208395958,
-0.0492308997,
-0.0660874695,
0.3536933362,
0.10475903,
-0.0706807077,
-0.2263384461,
0.5584257245,
-0.0989886597,
-0.2886700034,
-0.1290519983,
0.1547274888,
0.2330648303,
-0.0544895902,
-0.2015145421,
0.3102817237,
-0.0705333278,
0.0473092161,
-0.3310429752,
0.5736221671,
0.6677613854,
0.59535712,
0.1157633141,
0.2989175916,
0.0259280894,
-0.1185858399,
-0.3550841212,
0.0213853344,
0.198481515,
0.2545178831,
-0.0234009922,
0.1852476001,
-0.1561180651,
0.2198586911,
0.3102975488,
0.0529097058,
-0.0390310548,
-0.1395923495,
-0.1171744689,
-0.5824773312,
-0.0470162258,
-0.0065989201,
-0.3027576208,
0.2128089815,
0.5031033158,
-0.0349761546,
0.1908441037,
0.058949329,
0.0676832125,
-0.1636146903,
0.4986672401,
0.3767556548,
0.1895918995,
-0.524199307,
-0.2742633224,
-0.2657105029,
0.2245099545,
-0.5641300082,
0.141417712,
0.0922592804,
0.3126161098,
-0.1720100939,
0.1259641945,
0.1591007859,
-0.0465502888,
-0.2695774138,
0.3187477589,
-0.4677337706,
-0.3614369929,
-0.0433811806,
-0.1730004549,
0.0797775239,
-0.5220760107,
0.2191436738,
-0.2119642794,
0.0654361024,
-0.1108839661,
0.1677155644,
0.2062461823,
0.1528917998,
0.3983175755,
0.2625643611,
0.199771598,
0.1089654341,
-0.113725394,
-0.280354023,
-0.0738904551,
-0.2468328178,
0.2457490414,
0.2761388123,
0.3112264872,
-0.3319994509,
-0.387717545,
-0.2573619783,
0.3337297142,
0.2134018987,
-0.0387281775,
0.1329558641,
0.0774705634,
0.1548876315,
-0.1490870863,
0.1535382569,
0.1817612052,
-0.0874544233,
0.2136540264,
-0.2977227569,
-0.2377317101,
0.2472134531,
-0.5494278669,
-0.2740102112,
0.0944089815,
0.1903613955,
-0.1410510242,
-0.4291653335,
-0.5124765038,
0.0349138789,
0.3105964661,
-0.0756044984,
-0.3254616559,
0.2370798737,
-0.2060529143,
0.1657158136,
-0.1125162467,
0.3683624864,
0.0324478634,
-0.3300302625,
0.2431683093,
-0.4985694885
] |
https://github.com/huggingface/datasets/issues/3099 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' | Hi @JTWang2000, thanks for reporting.
However, I cannot reproduce your reported bug:
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset("sst", "default")
>>> dataset
DatasetDict({
train: Dataset({
features: ['sentence', 'label', 'tokens', 'tree'],
num_rows: 8544
})
validation: Dataset({
features: ['sentence', 'label', 'tokens', 'tree'],
num_rows: 1101
})
test: Dataset({
features: ['sentence', 'label', 'tokens', 'tree'],
num_rows: 2210
})
})
```
Maybe, the cause is that you have a quite old version of `huggingface_hub`. Could you please try to update it and confirm if the problem persists?
```
pip install -U huggingface_hub
``` | ## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
| 90 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
Hi @JTWang2000, thanks for reporting.
However, I cannot reproduce your reported bug:
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset("sst", "default")
>>> dataset
DatasetDict({
train: Dataset({
features: ['sentence', 'label', 'tokens', 'tree'],
num_rows: 8544
})
validation: Dataset({
features: ['sentence', 'label', 'tokens', 'tree'],
num_rows: 1101
})
test: Dataset({
features: ['sentence', 'label', 'tokens', 'tree'],
num_rows: 2210
})
})
```
Maybe, the cause is that you have a quite old version of `huggingface_hub`. Could you please try to update it and confirm if the problem persists?
```
pip install -U huggingface_hub
``` | [
-0.4111837745,
-0.2402752638,
-0.0685085058,
0.432022661,
0.2099774629,
0.0242406782,
0.2803740501,
0.4057570994,
0.1470829546,
0.0813488215,
-0.2076935172,
0.3919777572,
-0.0483211763,
0.0626079962,
-0.0157080498,
-0.1405219734,
0.0408853665,
0.2579431832,
-0.3039068282,
-0.1304225773,
0.0125604328,
0.2599343956,
-0.0942889079,
0.0197071265,
-0.3638885915,
-0.137362048,
0.2644460499,
0.0650364086,
-0.2278314084,
-0.4140820205,
0.2953844368,
-0.1304873675,
0.0288114045,
0.3824129999,
-0.0001108762,
0.2163038105,
0.3906910121,
-0.0061177774,
-0.3889299333,
-0.1615570039,
-0.4061585665,
-0.0434613526,
0.1681844592,
-0.1199033782,
-0.0249256045,
-0.0406565294,
-0.142596662,
-0.3305261135,
0.3294389546,
0.3395953476,
0.2705218792,
0.4959826171,
0.3331588507,
-0.20632267,
-0.0917061791,
0.2692639828,
-0.2287530452,
0.149152711,
-0.0694681853,
0.1074012965,
0.0091459276,
0.2462648749,
-0.1224697828,
0.1727232933,
0.4893966019,
-0.0743136778,
-0.2408601046,
-0.3432417214,
0.0028929075,
0.1411682218,
0.3232001066,
-0.4975569844,
-0.5184062123,
-0.1447167546,
0.0205588173,
-0.0667386875,
0.2386428863,
0.0537123419,
-0.1103443727,
0.0854039341,
-0.1581890881,
-0.1327444911,
-0.084584944,
-0.0041268617,
-0.0971263945,
0.2198684514,
-0.1888699234,
0.0896136239,
-0.0369772241,
-0.1413609385,
0.101376541,
-0.1235720515,
-0.2180250883,
0.1011405364,
-0.3869353235,
-0.0875707045,
0.0201005973,
0.0376695059,
0.1170409173,
0.3247123063,
-0.1191571727,
-0.1074447483,
0.0774688497,
0.1526909918,
-0.0633715019,
0.2510498166,
0.0717840716,
0.405588299,
0.1644884497,
0.2256295979,
0.1903325766,
-0.0372534394,
-0.0465320274,
-0.1879574656,
-0.035416916,
-0.0767263994,
0.391194433,
-0.1857686341,
-0.460949868,
0.0816524774,
-0.0192960724,
-0.012649266,
0.1657831669,
0.3901852667,
-0.0508914962,
0.1958480626,
0.0338387303,
0.2480368614,
-0.0987044126,
-0.0549307764,
-0.2178040147,
0.1822754443,
0.044295378,
-0.0613647066,
0.2665496469,
-0.2043994069,
0.3732974827,
-0.0423151255,
0.3616086543,
0.0847417638,
0.0510847084,
-0.14545241,
-0.0255685709,
0.3968060017,
0.0152090481,
0.2378198504,
0.1801999509,
-0.1035068035,
-0.1647803485,
-0.0958935618,
-0.1918446124,
-0.1836182624,
-0.3192625046,
0.2162049264,
-0.0210419092,
-0.0921768099,
-0.3226117492,
-0.3689460456,
0.0944245383,
-0.0182125885,
0.1137153059,
-0.0906749293,
0.021538699,
-0.1323785186,
0.452668786,
0.5081090927,
-0.0831918865,
-0.1450251341,
0.0850342512,
-0.2529963255,
-0.0855869651,
0.0920885205,
-0.0484303311,
0.274001658,
-0.2953410149,
-0.0671791807,
0.4383234978,
-0.72797966,
-0.5659129024,
0.1156728193,
0.1477628797,
0.1233792156,
0.1726186424,
-0.0775598511,
0.1376909763,
0.1192027405,
0.1501125991,
0.1212865487,
0.0992891788,
-0.0077225384,
-0.1008376777,
-0.1766423285,
-0.1245832816,
0.1922002435,
0.1282690167,
0.0920149386,
0.0606449991,
-0.0919137299,
0.1492717564,
0.0344356708,
0.191365689,
0.3376877606,
0.1375070214,
-0.0066799717,
-0.0293334387,
-0.3104027212,
-0.3723599613,
0.2383066565,
0.0184980053,
-0.0546190068,
-0.4142488241,
-0.1267378777,
-0.3679560721,
0.1336207241,
-0.2611930668,
-0.3326177001,
0.1561787128,
0.1425205916,
0.0898753777,
-0.0342773832,
-0.2702408731,
0.6299433112,
0.162031129,
0.2853499055,
-0.5041021109,
0.4159919024,
-0.228356421,
-0.1928144693,
0.0165432468,
0.2877674103,
0.0604732558,
-0.1350451857,
-0.1276094466,
0.2860279083,
-0.0737569332,
0.1419701725,
-0.1714650393,
-0.0211530551,
0.2542781234,
-0.3687995076,
0.1102793217,
-0.161015138,
0.1525547057,
0.1148898378,
0.1559603512,
-0.067275174,
-0.0296018869,
0.1813691556,
0.0562232509,
0.1284667403,
0.1555490345,
0.0018368211,
-0.0128842397,
-0.3161042333,
0.2342730016,
-0.0157593004,
0.3669007719,
-0.1330785006,
-0.0506015345,
0.0338331088,
0.3739251494,
0.1390887052,
0.0664240122,
0.0390164778,
-0.3434298038,
0.397698164,
0.3328787982,
0.0874227956,
0.3656416833,
0.1534752101,
-0.3630248606,
0.0870316625,
-0.0286812559,
-0.0013225696,
0.2386495769,
0.1084728241,
0.1649439037,
0.1434298903,
-0.0002989766,
0.1899610609,
-0.134456113,
-0.5046705604,
-0.2546652257,
0.195454821,
-0.3641715348,
-0.0019553103,
-0.2530148029,
0.0832500383,
-0.1093071029,
-0.4048547149,
-0.1465943158,
-0.2161156982,
-0.2081963718,
0.2030974627,
0.022411935,
0.2812788785,
-0.2393127829,
-0.0625866801,
0.1110453308,
-0.2723606229,
-0.2848051488,
-0.0283504855,
-0.064784728,
0.0693343207,
0.1385721862,
0.1202728152,
0.3721860349,
-0.2688123286,
0.1781256795,
-0.2829393744,
-0.2431177199,
0.2052355558,
-0.1936718673,
0.2931851745,
0.3369630873,
0.0967693552,
0.0580182448,
-0.3787179887,
0.3081191182,
-0.0661888346,
-0.2518462837,
0.0720035508,
-0.1423131824,
-0.3741616011,
-0.058493115,
-0.2144788951,
-0.2503893971,
-0.5462629795,
0.1873143613,
0.2677693963,
0.1386936456,
0.2515628934,
0.148153618,
0.2667452097,
-0.0929771364,
0.3493959308,
0.018870445,
-0.1835743487,
0.3339468241,
-0.3508708775,
-0.2841076255,
-0.0293089971,
-0.0960199609,
0.376078546,
-0.0521922708,
-0.4940153956,
-0.3822027743,
-0.3773936331,
0.4545095563,
-0.2008544207,
0.0889414176,
0.3171698749,
0.2307830304,
0.0254349057,
-0.1975672096,
-0.1063172519,
0.0195996687,
-0.2402970195,
-0.0674571171,
0.0507312156,
0.2947298288,
-0.1363618672,
0.4734265208,
0.4305483103,
-0.138041392,
0.3442361653,
-0.1096345484,
0.3224721253,
-0.2545557618,
-0.6419273019,
0.1127223745,
0.0900771171,
0.2584553659,
-0.08034724,
-0.0657916293,
0.2727054358,
-0.1413852423,
-0.0396351926,
-0.1856802255,
-0.1835012138,
-0.1882561445,
-0.2394159734,
0.0854243115,
-0.0071622375,
0.1824040562,
-0.1316790134,
-0.0244111381,
0.326423943,
0.1701817065,
-0.1123283803,
0.0231716018,
-0.1080517769,
-0.1031826958,
-0.465366751,
0.2235034406,
0.0790441707,
0.3181741238,
-0.0147490501,
0.0062084696,
-0.0061157965,
-0.0445311032,
0.630243659,
0.0124474168,
-0.0499878936,
0.0197832808,
0.0804605335,
-0.5375168324,
0.0399416238,
-0.1338353008,
0.2266003042,
0.03729802,
0.3458897173,
-0.2658976316,
-0.328704685,
0.4324553907,
0.1550698429,
0.0611744598,
0.0652231351,
-0.3212061524,
-0.2729232311,
-0.4989219606,
-0.0810517222,
-0.0132073602,
0.2910779417,
0.2181857377,
-0.0177895259,
-0.3570695221,
-0.1983835697,
0.0926281512,
0.1460370719,
0.3157178462,
-0.1291662008,
0.3344779015,
0.1319186538,
0.2002490163,
0.3194769025,
0.644669652,
-0.087850675,
-0.523597002,
-0.0868761539,
0.0838999674,
0.0562606975,
0.100434497,
-0.0979675874,
-0.0320179313,
-0.1924769133,
0.2425475717,
-0.1834713817,
0.0715183914,
0.2161054164,
0.1635447592,
-0.2422329187,
-0.0681535825,
0.369020015,
0.0573611259,
0.0920922533,
0.4780094028,
0.6363886595,
-0.2343237549,
0.1816838533,
-0.0164593458,
0.7035281658,
0.4534170628,
0.0816512927,
0.4295413494,
-0.1792650968,
0.2659635842,
-0.1461487859,
0.0244233049,
-0.2304322273,
-0.4042992592,
-0.0679782107,
-0.144391492,
0.3169411421,
-0.2228757739,
-0.1909895241,
0.1780649573,
0.0108023807,
0.1799365133,
-0.1272001863,
0.0871852785,
-0.25491485,
-0.3470272124,
-0.1124341115,
0.2005055547,
-0.0338315926,
0.3074901104,
-0.0503774136,
0.039559219,
-0.2752838731,
-0.3104623258,
-0.2794536352,
0.1396056414,
-0.2440237403,
0.2333437353,
0.4532899261,
-0.3312791884,
0.2246737182,
0.0505967103,
0.3516990542,
0.1260749549,
-0.2278513312,
0.2217364311,
-0.1289776564,
-0.0068619712,
-0.0111964215,
0.0307889581,
0.2916074991,
-0.0905981213,
-0.2668638825,
0.1304555088,
-0.0779386088,
-0.118075788,
0.280200094,
0.0484187417,
0.1262674034,
-0.2912629843,
-0.0904569104,
-0.0340658873,
0.0932669938,
-0.157735467,
0.1631813645,
0.0614026636,
-0.1161681861,
0.1514851302,
0.0824725181,
-0.1915814728,
-0.1206383854,
0.4036396146,
-0.2198049724,
-0.0722686574,
0.456833005,
0.0028561372,
-0.2840671837,
-0.2434483021,
-0.0184960626,
0.1171788797,
-0.5752741694,
-0.0063193836,
-0.1082126871,
-0.125005275,
-0.1356116533,
0.1443482041,
0.0740422159,
-0.0532531478,
0.0989261568,
-0.4294728339,
-0.3662429452,
0.2560116649,
-0.1619792134,
0.1454372853,
0.0334509946,
0.1280633509,
-0.1160483211,
0.1385970712,
-0.3367099464,
-0.0441672467,
-0.2012764364,
0.0034374429,
0.1847909093,
-0.0656266883,
0.2171392888,
-0.1301319003,
0.2098069638,
0.1302860528,
-0.2614562213,
-0.2626340985,
-0.1669707596,
0.0882777199,
0.0241771117,
-0.3117093146,
0.0402812585,
0.0492566824,
-0.1221321896,
-0.2005802244,
0.2195033133,
0.1210735589,
-0.083846353,
0.1772986352,
0.0354856066,
-0.0519598275,
-0.2254253477,
0.0653544292,
0.0626639128,
0.205373466,
-0.0824998841,
0.15610075,
-0.1316598654,
0.0926043093,
-0.1257056147,
0.1367592067,
0.1169147044,
-0.0495662279,
0.3787105381,
-0.3153232634,
0.0670550019,
0.1791381687,
0.2130454183,
0.1259801239,
-0.2293982357,
-0.0212038867,
0.2414678782,
0.2713025212,
-0.2773506343,
-0.0588771552,
0.2508406341,
0.0628270432,
0.1473652869,
0.1828245521,
0.0025912637,
-0.1742157936,
0.2521598637,
0.3034750819,
0.3963967562,
-0.2181999832,
0.2311718762,
0.2707443237,
-0.0155018382,
0.0330313481,
0.4053876102,
0.1338233203,
0.3140208125,
0.6220415831,
-0.4703536332,
0.3776133657,
-0.138150081,
0.0500436723,
0.1782452017,
-0.2684495747,
0.0442482717,
-0.2581346035,
0.0374076925,
-0.1617573947,
0.0024643294,
0.2166943997,
-0.1458705217,
-0.1519913077,
-0.1860486865,
0.1483870298,
-0.167227149,
0.0655447692,
-0.0714027882,
-0.0695513338,
-0.105483219,
-0.1338015199,
0.0379430205,
-0.190281257,
0.3961416483,
0.1299105883,
-0.1748739183,
-0.548274219,
0.2178079784,
0.2818323672,
0.1062617525,
-0.1579884291,
0.3967570961,
0.3055476546,
-0.1000968814,
-0.2038764656,
0.5768453479,
0.5954797864,
0.2145644575,
0.1322197616,
0.0620219447,
-0.073001191,
-0.1752805114,
-0.0196335744,
0.2379042506,
-0.2017878741,
0.1163189188,
0.2152834088,
0.2604625225,
-0.2475313395,
-0.1703759432,
-0.076295279,
0.0688018575,
-0.3309392631,
0.4845588505,
-0.3293316364,
-0.259539932,
-0.0857399628,
-0.0874127597,
-0.4900284708,
0.031604711,
0.3719985187,
-0.0400501117,
0.016687328,
-0.3548586667,
0.1001645848,
-0.0864304826,
0.4342510998,
0.2829068601,
0.2116381824,
-0.1218907982,
-0.0893185139,
-0.3286599517,
0.2203587741,
0.0127801243,
-0.1638106853,
-0.0115683274,
0.0266690757,
-0.1778533459,
0.1253761202,
0.222632587,
0.1120704934,
0.2902598977,
0.016679436,
-0.3053414524,
-0.0752134994,
-0.1220302358,
-0.1132823676,
0.1427201778,
-0.402843833,
0.1064595804,
-0.1665898561,
0.0741798654,
-0.1052056178,
-0.0692192689,
0.2439991832,
-0.2990667224,
0.4611747563,
0.1164723411,
0.4591690898,
-0.1277641207,
-0.1874946654,
-0.2123903781,
-0.3932295442,
-0.2279269993,
0.1583047956,
0.0663981885,
0.3727277815,
-0.1284736991,
-0.3735390604,
-0.3333060741,
0.474134177,
-0.0150481639,
0.0468443334,
-0.2066664547,
0.3484679163,
-0.3783449233,
0.162539497,
0.0936463326,
0.1092469245,
-0.0426851176,
0.23578462,
-0.3180307746,
-0.5008897185,
0.4493025541,
-0.3432527184,
-0.2553569973,
-0.0851388723,
0.2158868015,
0.0658396482,
-0.3295117319,
-0.5746705532,
0.1020807922,
0.2760473788,
-0.1395709962,
-0.1272946298,
0.3145699799,
0.1119548008,
0.1150312424,
-0.0397334285,
0.5530535579,
0.0008198738,
-0.0703101903,
0.3039714396,
-0.033470802
] |
https://github.com/huggingface/datasets/issues/3099 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' | Im facing the same issue. I did run the upgrade command but that doesnt seem to resolve the issue | ## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
| 19 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
Im facing the same issue. I did run the upgrade command but that doesnt seem to resolve the issue | [
-0.4111837745,
-0.2402752638,
-0.0685085058,
0.432022661,
0.2099774629,
0.0242406782,
0.2803740501,
0.4057570994,
0.1470829546,
0.0813488215,
-0.2076935172,
0.3919777572,
-0.0483211763,
0.0626079962,
-0.0157080498,
-0.1405219734,
0.0408853665,
0.2579431832,
-0.3039068282,
-0.1304225773,
0.0125604328,
0.2599343956,
-0.0942889079,
0.0197071265,
-0.3638885915,
-0.137362048,
0.2644460499,
0.0650364086,
-0.2278314084,
-0.4140820205,
0.2953844368,
-0.1304873675,
0.0288114045,
0.3824129999,
-0.0001108762,
0.2163038105,
0.3906910121,
-0.0061177774,
-0.3889299333,
-0.1615570039,
-0.4061585665,
-0.0434613526,
0.1681844592,
-0.1199033782,
-0.0249256045,
-0.0406565294,
-0.142596662,
-0.3305261135,
0.3294389546,
0.3395953476,
0.2705218792,
0.4959826171,
0.3331588507,
-0.20632267,
-0.0917061791,
0.2692639828,
-0.2287530452,
0.149152711,
-0.0694681853,
0.1074012965,
0.0091459276,
0.2462648749,
-0.1224697828,
0.1727232933,
0.4893966019,
-0.0743136778,
-0.2408601046,
-0.3432417214,
0.0028929075,
0.1411682218,
0.3232001066,
-0.4975569844,
-0.5184062123,
-0.1447167546,
0.0205588173,
-0.0667386875,
0.2386428863,
0.0537123419,
-0.1103443727,
0.0854039341,
-0.1581890881,
-0.1327444911,
-0.084584944,
-0.0041268617,
-0.0971263945,
0.2198684514,
-0.1888699234,
0.0896136239,
-0.0369772241,
-0.1413609385,
0.101376541,
-0.1235720515,
-0.2180250883,
0.1011405364,
-0.3869353235,
-0.0875707045,
0.0201005973,
0.0376695059,
0.1170409173,
0.3247123063,
-0.1191571727,
-0.1074447483,
0.0774688497,
0.1526909918,
-0.0633715019,
0.2510498166,
0.0717840716,
0.405588299,
0.1644884497,
0.2256295979,
0.1903325766,
-0.0372534394,
-0.0465320274,
-0.1879574656,
-0.035416916,
-0.0767263994,
0.391194433,
-0.1857686341,
-0.460949868,
0.0816524774,
-0.0192960724,
-0.012649266,
0.1657831669,
0.3901852667,
-0.0508914962,
0.1958480626,
0.0338387303,
0.2480368614,
-0.0987044126,
-0.0549307764,
-0.2178040147,
0.1822754443,
0.044295378,
-0.0613647066,
0.2665496469,
-0.2043994069,
0.3732974827,
-0.0423151255,
0.3616086543,
0.0847417638,
0.0510847084,
-0.14545241,
-0.0255685709,
0.3968060017,
0.0152090481,
0.2378198504,
0.1801999509,
-0.1035068035,
-0.1647803485,
-0.0958935618,
-0.1918446124,
-0.1836182624,
-0.3192625046,
0.2162049264,
-0.0210419092,
-0.0921768099,
-0.3226117492,
-0.3689460456,
0.0944245383,
-0.0182125885,
0.1137153059,
-0.0906749293,
0.021538699,
-0.1323785186,
0.452668786,
0.5081090927,
-0.0831918865,
-0.1450251341,
0.0850342512,
-0.2529963255,
-0.0855869651,
0.0920885205,
-0.0484303311,
0.274001658,
-0.2953410149,
-0.0671791807,
0.4383234978,
-0.72797966,
-0.5659129024,
0.1156728193,
0.1477628797,
0.1233792156,
0.1726186424,
-0.0775598511,
0.1376909763,
0.1192027405,
0.1501125991,
0.1212865487,
0.0992891788,
-0.0077225384,
-0.1008376777,
-0.1766423285,
-0.1245832816,
0.1922002435,
0.1282690167,
0.0920149386,
0.0606449991,
-0.0919137299,
0.1492717564,
0.0344356708,
0.191365689,
0.3376877606,
0.1375070214,
-0.0066799717,
-0.0293334387,
-0.3104027212,
-0.3723599613,
0.2383066565,
0.0184980053,
-0.0546190068,
-0.4142488241,
-0.1267378777,
-0.3679560721,
0.1336207241,
-0.2611930668,
-0.3326177001,
0.1561787128,
0.1425205916,
0.0898753777,
-0.0342773832,
-0.2702408731,
0.6299433112,
0.162031129,
0.2853499055,
-0.5041021109,
0.4159919024,
-0.228356421,
-0.1928144693,
0.0165432468,
0.2877674103,
0.0604732558,
-0.1350451857,
-0.1276094466,
0.2860279083,
-0.0737569332,
0.1419701725,
-0.1714650393,
-0.0211530551,
0.2542781234,
-0.3687995076,
0.1102793217,
-0.161015138,
0.1525547057,
0.1148898378,
0.1559603512,
-0.067275174,
-0.0296018869,
0.1813691556,
0.0562232509,
0.1284667403,
0.1555490345,
0.0018368211,
-0.0128842397,
-0.3161042333,
0.2342730016,
-0.0157593004,
0.3669007719,
-0.1330785006,
-0.0506015345,
0.0338331088,
0.3739251494,
0.1390887052,
0.0664240122,
0.0390164778,
-0.3434298038,
0.397698164,
0.3328787982,
0.0874227956,
0.3656416833,
0.1534752101,
-0.3630248606,
0.0870316625,
-0.0286812559,
-0.0013225696,
0.2386495769,
0.1084728241,
0.1649439037,
0.1434298903,
-0.0002989766,
0.1899610609,
-0.134456113,
-0.5046705604,
-0.2546652257,
0.195454821,
-0.3641715348,
-0.0019553103,
-0.2530148029,
0.0832500383,
-0.1093071029,
-0.4048547149,
-0.1465943158,
-0.2161156982,
-0.2081963718,
0.2030974627,
0.022411935,
0.2812788785,
-0.2393127829,
-0.0625866801,
0.1110453308,
-0.2723606229,
-0.2848051488,
-0.0283504855,
-0.064784728,
0.0693343207,
0.1385721862,
0.1202728152,
0.3721860349,
-0.2688123286,
0.1781256795,
-0.2829393744,
-0.2431177199,
0.2052355558,
-0.1936718673,
0.2931851745,
0.3369630873,
0.0967693552,
0.0580182448,
-0.3787179887,
0.3081191182,
-0.0661888346,
-0.2518462837,
0.0720035508,
-0.1423131824,
-0.3741616011,
-0.058493115,
-0.2144788951,
-0.2503893971,
-0.5462629795,
0.1873143613,
0.2677693963,
0.1386936456,
0.2515628934,
0.148153618,
0.2667452097,
-0.0929771364,
0.3493959308,
0.018870445,
-0.1835743487,
0.3339468241,
-0.3508708775,
-0.2841076255,
-0.0293089971,
-0.0960199609,
0.376078546,
-0.0521922708,
-0.4940153956,
-0.3822027743,
-0.3773936331,
0.4545095563,
-0.2008544207,
0.0889414176,
0.3171698749,
0.2307830304,
0.0254349057,
-0.1975672096,
-0.1063172519,
0.0195996687,
-0.2402970195,
-0.0674571171,
0.0507312156,
0.2947298288,
-0.1363618672,
0.4734265208,
0.4305483103,
-0.138041392,
0.3442361653,
-0.1096345484,
0.3224721253,
-0.2545557618,
-0.6419273019,
0.1127223745,
0.0900771171,
0.2584553659,
-0.08034724,
-0.0657916293,
0.2727054358,
-0.1413852423,
-0.0396351926,
-0.1856802255,
-0.1835012138,
-0.1882561445,
-0.2394159734,
0.0854243115,
-0.0071622375,
0.1824040562,
-0.1316790134,
-0.0244111381,
0.326423943,
0.1701817065,
-0.1123283803,
0.0231716018,
-0.1080517769,
-0.1031826958,
-0.465366751,
0.2235034406,
0.0790441707,
0.3181741238,
-0.0147490501,
0.0062084696,
-0.0061157965,
-0.0445311032,
0.630243659,
0.0124474168,
-0.0499878936,
0.0197832808,
0.0804605335,
-0.5375168324,
0.0399416238,
-0.1338353008,
0.2266003042,
0.03729802,
0.3458897173,
-0.2658976316,
-0.328704685,
0.4324553907,
0.1550698429,
0.0611744598,
0.0652231351,
-0.3212061524,
-0.2729232311,
-0.4989219606,
-0.0810517222,
-0.0132073602,
0.2910779417,
0.2181857377,
-0.0177895259,
-0.3570695221,
-0.1983835697,
0.0926281512,
0.1460370719,
0.3157178462,
-0.1291662008,
0.3344779015,
0.1319186538,
0.2002490163,
0.3194769025,
0.644669652,
-0.087850675,
-0.523597002,
-0.0868761539,
0.0838999674,
0.0562606975,
0.100434497,
-0.0979675874,
-0.0320179313,
-0.1924769133,
0.2425475717,
-0.1834713817,
0.0715183914,
0.2161054164,
0.1635447592,
-0.2422329187,
-0.0681535825,
0.369020015,
0.0573611259,
0.0920922533,
0.4780094028,
0.6363886595,
-0.2343237549,
0.1816838533,
-0.0164593458,
0.7035281658,
0.4534170628,
0.0816512927,
0.4295413494,
-0.1792650968,
0.2659635842,
-0.1461487859,
0.0244233049,
-0.2304322273,
-0.4042992592,
-0.0679782107,
-0.144391492,
0.3169411421,
-0.2228757739,
-0.1909895241,
0.1780649573,
0.0108023807,
0.1799365133,
-0.1272001863,
0.0871852785,
-0.25491485,
-0.3470272124,
-0.1124341115,
0.2005055547,
-0.0338315926,
0.3074901104,
-0.0503774136,
0.039559219,
-0.2752838731,
-0.3104623258,
-0.2794536352,
0.1396056414,
-0.2440237403,
0.2333437353,
0.4532899261,
-0.3312791884,
0.2246737182,
0.0505967103,
0.3516990542,
0.1260749549,
-0.2278513312,
0.2217364311,
-0.1289776564,
-0.0068619712,
-0.0111964215,
0.0307889581,
0.2916074991,
-0.0905981213,
-0.2668638825,
0.1304555088,
-0.0779386088,
-0.118075788,
0.280200094,
0.0484187417,
0.1262674034,
-0.2912629843,
-0.0904569104,
-0.0340658873,
0.0932669938,
-0.157735467,
0.1631813645,
0.0614026636,
-0.1161681861,
0.1514851302,
0.0824725181,
-0.1915814728,
-0.1206383854,
0.4036396146,
-0.2198049724,
-0.0722686574,
0.456833005,
0.0028561372,
-0.2840671837,
-0.2434483021,
-0.0184960626,
0.1171788797,
-0.5752741694,
-0.0063193836,
-0.1082126871,
-0.125005275,
-0.1356116533,
0.1443482041,
0.0740422159,
-0.0532531478,
0.0989261568,
-0.4294728339,
-0.3662429452,
0.2560116649,
-0.1619792134,
0.1454372853,
0.0334509946,
0.1280633509,
-0.1160483211,
0.1385970712,
-0.3367099464,
-0.0441672467,
-0.2012764364,
0.0034374429,
0.1847909093,
-0.0656266883,
0.2171392888,
-0.1301319003,
0.2098069638,
0.1302860528,
-0.2614562213,
-0.2626340985,
-0.1669707596,
0.0882777199,
0.0241771117,
-0.3117093146,
0.0402812585,
0.0492566824,
-0.1221321896,
-0.2005802244,
0.2195033133,
0.1210735589,
-0.083846353,
0.1772986352,
0.0354856066,
-0.0519598275,
-0.2254253477,
0.0653544292,
0.0626639128,
0.205373466,
-0.0824998841,
0.15610075,
-0.1316598654,
0.0926043093,
-0.1257056147,
0.1367592067,
0.1169147044,
-0.0495662279,
0.3787105381,
-0.3153232634,
0.0670550019,
0.1791381687,
0.2130454183,
0.1259801239,
-0.2293982357,
-0.0212038867,
0.2414678782,
0.2713025212,
-0.2773506343,
-0.0588771552,
0.2508406341,
0.0628270432,
0.1473652869,
0.1828245521,
0.0025912637,
-0.1742157936,
0.2521598637,
0.3034750819,
0.3963967562,
-0.2181999832,
0.2311718762,
0.2707443237,
-0.0155018382,
0.0330313481,
0.4053876102,
0.1338233203,
0.3140208125,
0.6220415831,
-0.4703536332,
0.3776133657,
-0.138150081,
0.0500436723,
0.1782452017,
-0.2684495747,
0.0442482717,
-0.2581346035,
0.0374076925,
-0.1617573947,
0.0024643294,
0.2166943997,
-0.1458705217,
-0.1519913077,
-0.1860486865,
0.1483870298,
-0.167227149,
0.0655447692,
-0.0714027882,
-0.0695513338,
-0.105483219,
-0.1338015199,
0.0379430205,
-0.190281257,
0.3961416483,
0.1299105883,
-0.1748739183,
-0.548274219,
0.2178079784,
0.2818323672,
0.1062617525,
-0.1579884291,
0.3967570961,
0.3055476546,
-0.1000968814,
-0.2038764656,
0.5768453479,
0.5954797864,
0.2145644575,
0.1322197616,
0.0620219447,
-0.073001191,
-0.1752805114,
-0.0196335744,
0.2379042506,
-0.2017878741,
0.1163189188,
0.2152834088,
0.2604625225,
-0.2475313395,
-0.1703759432,
-0.076295279,
0.0688018575,
-0.3309392631,
0.4845588505,
-0.3293316364,
-0.259539932,
-0.0857399628,
-0.0874127597,
-0.4900284708,
0.031604711,
0.3719985187,
-0.0400501117,
0.016687328,
-0.3548586667,
0.1001645848,
-0.0864304826,
0.4342510998,
0.2829068601,
0.2116381824,
-0.1218907982,
-0.0893185139,
-0.3286599517,
0.2203587741,
0.0127801243,
-0.1638106853,
-0.0115683274,
0.0266690757,
-0.1778533459,
0.1253761202,
0.222632587,
0.1120704934,
0.2902598977,
0.016679436,
-0.3053414524,
-0.0752134994,
-0.1220302358,
-0.1132823676,
0.1427201778,
-0.402843833,
0.1064595804,
-0.1665898561,
0.0741798654,
-0.1052056178,
-0.0692192689,
0.2439991832,
-0.2990667224,
0.4611747563,
0.1164723411,
0.4591690898,
-0.1277641207,
-0.1874946654,
-0.2123903781,
-0.3932295442,
-0.2279269993,
0.1583047956,
0.0663981885,
0.3727277815,
-0.1284736991,
-0.3735390604,
-0.3333060741,
0.474134177,
-0.0150481639,
0.0468443334,
-0.2066664547,
0.3484679163,
-0.3783449233,
0.162539497,
0.0936463326,
0.1092469245,
-0.0426851176,
0.23578462,
-0.3180307746,
-0.5008897185,
0.4493025541,
-0.3432527184,
-0.2553569973,
-0.0851388723,
0.2158868015,
0.0658396482,
-0.3295117319,
-0.5746705532,
0.1020807922,
0.2760473788,
-0.1395709962,
-0.1272946298,
0.3145699799,
0.1119548008,
0.1150312424,
-0.0397334285,
0.5530535579,
0.0008198738,
-0.0703101903,
0.3039714396,
-0.033470802
] |
https://github.com/huggingface/datasets/issues/3099 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' | Hi @aneeshjain, could you please specify which `huggingface_hub` version you are using?
Besides that, please run `datasets-cli env` and copy-and-paste its output below. | ## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
| 23 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
Hi @aneeshjain, could you please specify which `huggingface_hub` version you are using?
Besides that, please run `datasets-cli env` and copy-and-paste its output below. | [
-0.4111837745,
-0.2402752638,
-0.0685085058,
0.432022661,
0.2099774629,
0.0242406782,
0.2803740501,
0.4057570994,
0.1470829546,
0.0813488215,
-0.2076935172,
0.3919777572,
-0.0483211763,
0.0626079962,
-0.0157080498,
-0.1405219734,
0.0408853665,
0.2579431832,
-0.3039068282,
-0.1304225773,
0.0125604328,
0.2599343956,
-0.0942889079,
0.0197071265,
-0.3638885915,
-0.137362048,
0.2644460499,
0.0650364086,
-0.2278314084,
-0.4140820205,
0.2953844368,
-0.1304873675,
0.0288114045,
0.3824129999,
-0.0001108762,
0.2163038105,
0.3906910121,
-0.0061177774,
-0.3889299333,
-0.1615570039,
-0.4061585665,
-0.0434613526,
0.1681844592,
-0.1199033782,
-0.0249256045,
-0.0406565294,
-0.142596662,
-0.3305261135,
0.3294389546,
0.3395953476,
0.2705218792,
0.4959826171,
0.3331588507,
-0.20632267,
-0.0917061791,
0.2692639828,
-0.2287530452,
0.149152711,
-0.0694681853,
0.1074012965,
0.0091459276,
0.2462648749,
-0.1224697828,
0.1727232933,
0.4893966019,
-0.0743136778,
-0.2408601046,
-0.3432417214,
0.0028929075,
0.1411682218,
0.3232001066,
-0.4975569844,
-0.5184062123,
-0.1447167546,
0.0205588173,
-0.0667386875,
0.2386428863,
0.0537123419,
-0.1103443727,
0.0854039341,
-0.1581890881,
-0.1327444911,
-0.084584944,
-0.0041268617,
-0.0971263945,
0.2198684514,
-0.1888699234,
0.0896136239,
-0.0369772241,
-0.1413609385,
0.101376541,
-0.1235720515,
-0.2180250883,
0.1011405364,
-0.3869353235,
-0.0875707045,
0.0201005973,
0.0376695059,
0.1170409173,
0.3247123063,
-0.1191571727,
-0.1074447483,
0.0774688497,
0.1526909918,
-0.0633715019,
0.2510498166,
0.0717840716,
0.405588299,
0.1644884497,
0.2256295979,
0.1903325766,
-0.0372534394,
-0.0465320274,
-0.1879574656,
-0.035416916,
-0.0767263994,
0.391194433,
-0.1857686341,
-0.460949868,
0.0816524774,
-0.0192960724,
-0.012649266,
0.1657831669,
0.3901852667,
-0.0508914962,
0.1958480626,
0.0338387303,
0.2480368614,
-0.0987044126,
-0.0549307764,
-0.2178040147,
0.1822754443,
0.044295378,
-0.0613647066,
0.2665496469,
-0.2043994069,
0.3732974827,
-0.0423151255,
0.3616086543,
0.0847417638,
0.0510847084,
-0.14545241,
-0.0255685709,
0.3968060017,
0.0152090481,
0.2378198504,
0.1801999509,
-0.1035068035,
-0.1647803485,
-0.0958935618,
-0.1918446124,
-0.1836182624,
-0.3192625046,
0.2162049264,
-0.0210419092,
-0.0921768099,
-0.3226117492,
-0.3689460456,
0.0944245383,
-0.0182125885,
0.1137153059,
-0.0906749293,
0.021538699,
-0.1323785186,
0.452668786,
0.5081090927,
-0.0831918865,
-0.1450251341,
0.0850342512,
-0.2529963255,
-0.0855869651,
0.0920885205,
-0.0484303311,
0.274001658,
-0.2953410149,
-0.0671791807,
0.4383234978,
-0.72797966,
-0.5659129024,
0.1156728193,
0.1477628797,
0.1233792156,
0.1726186424,
-0.0775598511,
0.1376909763,
0.1192027405,
0.1501125991,
0.1212865487,
0.0992891788,
-0.0077225384,
-0.1008376777,
-0.1766423285,
-0.1245832816,
0.1922002435,
0.1282690167,
0.0920149386,
0.0606449991,
-0.0919137299,
0.1492717564,
0.0344356708,
0.191365689,
0.3376877606,
0.1375070214,
-0.0066799717,
-0.0293334387,
-0.3104027212,
-0.3723599613,
0.2383066565,
0.0184980053,
-0.0546190068,
-0.4142488241,
-0.1267378777,
-0.3679560721,
0.1336207241,
-0.2611930668,
-0.3326177001,
0.1561787128,
0.1425205916,
0.0898753777,
-0.0342773832,
-0.2702408731,
0.6299433112,
0.162031129,
0.2853499055,
-0.5041021109,
0.4159919024,
-0.228356421,
-0.1928144693,
0.0165432468,
0.2877674103,
0.0604732558,
-0.1350451857,
-0.1276094466,
0.2860279083,
-0.0737569332,
0.1419701725,
-0.1714650393,
-0.0211530551,
0.2542781234,
-0.3687995076,
0.1102793217,
-0.161015138,
0.1525547057,
0.1148898378,
0.1559603512,
-0.067275174,
-0.0296018869,
0.1813691556,
0.0562232509,
0.1284667403,
0.1555490345,
0.0018368211,
-0.0128842397,
-0.3161042333,
0.2342730016,
-0.0157593004,
0.3669007719,
-0.1330785006,
-0.0506015345,
0.0338331088,
0.3739251494,
0.1390887052,
0.0664240122,
0.0390164778,
-0.3434298038,
0.397698164,
0.3328787982,
0.0874227956,
0.3656416833,
0.1534752101,
-0.3630248606,
0.0870316625,
-0.0286812559,
-0.0013225696,
0.2386495769,
0.1084728241,
0.1649439037,
0.1434298903,
-0.0002989766,
0.1899610609,
-0.134456113,
-0.5046705604,
-0.2546652257,
0.195454821,
-0.3641715348,
-0.0019553103,
-0.2530148029,
0.0832500383,
-0.1093071029,
-0.4048547149,
-0.1465943158,
-0.2161156982,
-0.2081963718,
0.2030974627,
0.022411935,
0.2812788785,
-0.2393127829,
-0.0625866801,
0.1110453308,
-0.2723606229,
-0.2848051488,
-0.0283504855,
-0.064784728,
0.0693343207,
0.1385721862,
0.1202728152,
0.3721860349,
-0.2688123286,
0.1781256795,
-0.2829393744,
-0.2431177199,
0.2052355558,
-0.1936718673,
0.2931851745,
0.3369630873,
0.0967693552,
0.0580182448,
-0.3787179887,
0.3081191182,
-0.0661888346,
-0.2518462837,
0.0720035508,
-0.1423131824,
-0.3741616011,
-0.058493115,
-0.2144788951,
-0.2503893971,
-0.5462629795,
0.1873143613,
0.2677693963,
0.1386936456,
0.2515628934,
0.148153618,
0.2667452097,
-0.0929771364,
0.3493959308,
0.018870445,
-0.1835743487,
0.3339468241,
-0.3508708775,
-0.2841076255,
-0.0293089971,
-0.0960199609,
0.376078546,
-0.0521922708,
-0.4940153956,
-0.3822027743,
-0.3773936331,
0.4545095563,
-0.2008544207,
0.0889414176,
0.3171698749,
0.2307830304,
0.0254349057,
-0.1975672096,
-0.1063172519,
0.0195996687,
-0.2402970195,
-0.0674571171,
0.0507312156,
0.2947298288,
-0.1363618672,
0.4734265208,
0.4305483103,
-0.138041392,
0.3442361653,
-0.1096345484,
0.3224721253,
-0.2545557618,
-0.6419273019,
0.1127223745,
0.0900771171,
0.2584553659,
-0.08034724,
-0.0657916293,
0.2727054358,
-0.1413852423,
-0.0396351926,
-0.1856802255,
-0.1835012138,
-0.1882561445,
-0.2394159734,
0.0854243115,
-0.0071622375,
0.1824040562,
-0.1316790134,
-0.0244111381,
0.326423943,
0.1701817065,
-0.1123283803,
0.0231716018,
-0.1080517769,
-0.1031826958,
-0.465366751,
0.2235034406,
0.0790441707,
0.3181741238,
-0.0147490501,
0.0062084696,
-0.0061157965,
-0.0445311032,
0.630243659,
0.0124474168,
-0.0499878936,
0.0197832808,
0.0804605335,
-0.5375168324,
0.0399416238,
-0.1338353008,
0.2266003042,
0.03729802,
0.3458897173,
-0.2658976316,
-0.328704685,
0.4324553907,
0.1550698429,
0.0611744598,
0.0652231351,
-0.3212061524,
-0.2729232311,
-0.4989219606,
-0.0810517222,
-0.0132073602,
0.2910779417,
0.2181857377,
-0.0177895259,
-0.3570695221,
-0.1983835697,
0.0926281512,
0.1460370719,
0.3157178462,
-0.1291662008,
0.3344779015,
0.1319186538,
0.2002490163,
0.3194769025,
0.644669652,
-0.087850675,
-0.523597002,
-0.0868761539,
0.0838999674,
0.0562606975,
0.100434497,
-0.0979675874,
-0.0320179313,
-0.1924769133,
0.2425475717,
-0.1834713817,
0.0715183914,
0.2161054164,
0.1635447592,
-0.2422329187,
-0.0681535825,
0.369020015,
0.0573611259,
0.0920922533,
0.4780094028,
0.6363886595,
-0.2343237549,
0.1816838533,
-0.0164593458,
0.7035281658,
0.4534170628,
0.0816512927,
0.4295413494,
-0.1792650968,
0.2659635842,
-0.1461487859,
0.0244233049,
-0.2304322273,
-0.4042992592,
-0.0679782107,
-0.144391492,
0.3169411421,
-0.2228757739,
-0.1909895241,
0.1780649573,
0.0108023807,
0.1799365133,
-0.1272001863,
0.0871852785,
-0.25491485,
-0.3470272124,
-0.1124341115,
0.2005055547,
-0.0338315926,
0.3074901104,
-0.0503774136,
0.039559219,
-0.2752838731,
-0.3104623258,
-0.2794536352,
0.1396056414,
-0.2440237403,
0.2333437353,
0.4532899261,
-0.3312791884,
0.2246737182,
0.0505967103,
0.3516990542,
0.1260749549,
-0.2278513312,
0.2217364311,
-0.1289776564,
-0.0068619712,
-0.0111964215,
0.0307889581,
0.2916074991,
-0.0905981213,
-0.2668638825,
0.1304555088,
-0.0779386088,
-0.118075788,
0.280200094,
0.0484187417,
0.1262674034,
-0.2912629843,
-0.0904569104,
-0.0340658873,
0.0932669938,
-0.157735467,
0.1631813645,
0.0614026636,
-0.1161681861,
0.1514851302,
0.0824725181,
-0.1915814728,
-0.1206383854,
0.4036396146,
-0.2198049724,
-0.0722686574,
0.456833005,
0.0028561372,
-0.2840671837,
-0.2434483021,
-0.0184960626,
0.1171788797,
-0.5752741694,
-0.0063193836,
-0.1082126871,
-0.125005275,
-0.1356116533,
0.1443482041,
0.0740422159,
-0.0532531478,
0.0989261568,
-0.4294728339,
-0.3662429452,
0.2560116649,
-0.1619792134,
0.1454372853,
0.0334509946,
0.1280633509,
-0.1160483211,
0.1385970712,
-0.3367099464,
-0.0441672467,
-0.2012764364,
0.0034374429,
0.1847909093,
-0.0656266883,
0.2171392888,
-0.1301319003,
0.2098069638,
0.1302860528,
-0.2614562213,
-0.2626340985,
-0.1669707596,
0.0882777199,
0.0241771117,
-0.3117093146,
0.0402812585,
0.0492566824,
-0.1221321896,
-0.2005802244,
0.2195033133,
0.1210735589,
-0.083846353,
0.1772986352,
0.0354856066,
-0.0519598275,
-0.2254253477,
0.0653544292,
0.0626639128,
0.205373466,
-0.0824998841,
0.15610075,
-0.1316598654,
0.0926043093,
-0.1257056147,
0.1367592067,
0.1169147044,
-0.0495662279,
0.3787105381,
-0.3153232634,
0.0670550019,
0.1791381687,
0.2130454183,
0.1259801239,
-0.2293982357,
-0.0212038867,
0.2414678782,
0.2713025212,
-0.2773506343,
-0.0588771552,
0.2508406341,
0.0628270432,
0.1473652869,
0.1828245521,
0.0025912637,
-0.1742157936,
0.2521598637,
0.3034750819,
0.3963967562,
-0.2181999832,
0.2311718762,
0.2707443237,
-0.0155018382,
0.0330313481,
0.4053876102,
0.1338233203,
0.3140208125,
0.6220415831,
-0.4703536332,
0.3776133657,
-0.138150081,
0.0500436723,
0.1782452017,
-0.2684495747,
0.0442482717,
-0.2581346035,
0.0374076925,
-0.1617573947,
0.0024643294,
0.2166943997,
-0.1458705217,
-0.1519913077,
-0.1860486865,
0.1483870298,
-0.167227149,
0.0655447692,
-0.0714027882,
-0.0695513338,
-0.105483219,
-0.1338015199,
0.0379430205,
-0.190281257,
0.3961416483,
0.1299105883,
-0.1748739183,
-0.548274219,
0.2178079784,
0.2818323672,
0.1062617525,
-0.1579884291,
0.3967570961,
0.3055476546,
-0.1000968814,
-0.2038764656,
0.5768453479,
0.5954797864,
0.2145644575,
0.1322197616,
0.0620219447,
-0.073001191,
-0.1752805114,
-0.0196335744,
0.2379042506,
-0.2017878741,
0.1163189188,
0.2152834088,
0.2604625225,
-0.2475313395,
-0.1703759432,
-0.076295279,
0.0688018575,
-0.3309392631,
0.4845588505,
-0.3293316364,
-0.259539932,
-0.0857399628,
-0.0874127597,
-0.4900284708,
0.031604711,
0.3719985187,
-0.0400501117,
0.016687328,
-0.3548586667,
0.1001645848,
-0.0864304826,
0.4342510998,
0.2829068601,
0.2116381824,
-0.1218907982,
-0.0893185139,
-0.3286599517,
0.2203587741,
0.0127801243,
-0.1638106853,
-0.0115683274,
0.0266690757,
-0.1778533459,
0.1253761202,
0.222632587,
0.1120704934,
0.2902598977,
0.016679436,
-0.3053414524,
-0.0752134994,
-0.1220302358,
-0.1132823676,
0.1427201778,
-0.402843833,
0.1064595804,
-0.1665898561,
0.0741798654,
-0.1052056178,
-0.0692192689,
0.2439991832,
-0.2990667224,
0.4611747563,
0.1164723411,
0.4591690898,
-0.1277641207,
-0.1874946654,
-0.2123903781,
-0.3932295442,
-0.2279269993,
0.1583047956,
0.0663981885,
0.3727277815,
-0.1284736991,
-0.3735390604,
-0.3333060741,
0.474134177,
-0.0150481639,
0.0468443334,
-0.2066664547,
0.3484679163,
-0.3783449233,
0.162539497,
0.0936463326,
0.1092469245,
-0.0426851176,
0.23578462,
-0.3180307746,
-0.5008897185,
0.4493025541,
-0.3432527184,
-0.2553569973,
-0.0851388723,
0.2158868015,
0.0658396482,
-0.3295117319,
-0.5746705532,
0.1020807922,
0.2760473788,
-0.1395709962,
-0.1272946298,
0.3145699799,
0.1119548008,
0.1150312424,
-0.0397334285,
0.5530535579,
0.0008198738,
-0.0703101903,
0.3039714396,
-0.033470802
] |
https://github.com/huggingface/datasets/issues/3099 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' | The problem seems to be with the latest version of `datasets`. After running `pip install -U datasets huggingface_hub`, I get the following:
```bash
python -c "import huggingface_hub; print(f'hbvers={huggingface_hub.__version__}'); import datasets; print(f'dvers={datasets.__version__}')"
hbvers=0.0.8
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/lib/python3.6/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/opt/conda/lib/python3.6/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/opt/conda/lib/python3.6/site-packages/datasets/data_files.py", line 122, in <module>
allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
````
Note that pip reports the latest `datasets` version as
```bash
pip show datasets
Name: datasets
Version: 1.14.0
```
However, if I downgrade datasets with `pip install datasets==1.11.0`, things now work
```bash
python -c "import huggingface_hub; print(f'hbvers={huggingface_hub.__version__}'); import datasets; print(f'dvers={datasets.__version__}')"
hbvers=0.0.8
dvers=1.11.0
```` | ## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
| 128 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
The problem seems to be with the latest version of `datasets`. After running `pip install -U datasets huggingface_hub`, I get the following:
```bash
python -c "import huggingface_hub; print(f'hbvers={huggingface_hub.__version__}'); import datasets; print(f'dvers={datasets.__version__}')"
hbvers=0.0.8
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/lib/python3.6/site-packages/datasets/__init__.py", line 37, in <module>
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File "/opt/conda/lib/python3.6/site-packages/datasets/builder.py", line 44, in <module>
from .data_files import DataFilesDict, _sanitize_patterns
File "/opt/conda/lib/python3.6/site-packages/datasets/data_files.py", line 122, in <module>
allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
````
Note that pip reports the latest `datasets` version as
```bash
pip show datasets
Name: datasets
Version: 1.14.0
```
However, if I downgrade datasets with `pip install datasets==1.11.0`, things now work
```bash
python -c "import huggingface_hub; print(f'hbvers={huggingface_hub.__version__}'); import datasets; print(f'dvers={datasets.__version__}')"
hbvers=0.0.8
dvers=1.11.0
```` | [
-0.4111837745,
-0.2402752638,
-0.0685085058,
0.432022661,
0.2099774629,
0.0242406782,
0.2803740501,
0.4057570994,
0.1470829546,
0.0813488215,
-0.2076935172,
0.3919777572,
-0.0483211763,
0.0626079962,
-0.0157080498,
-0.1405219734,
0.0408853665,
0.2579431832,
-0.3039068282,
-0.1304225773,
0.0125604328,
0.2599343956,
-0.0942889079,
0.0197071265,
-0.3638885915,
-0.137362048,
0.2644460499,
0.0650364086,
-0.2278314084,
-0.4140820205,
0.2953844368,
-0.1304873675,
0.0288114045,
0.3824129999,
-0.0001108762,
0.2163038105,
0.3906910121,
-0.0061177774,
-0.3889299333,
-0.1615570039,
-0.4061585665,
-0.0434613526,
0.1681844592,
-0.1199033782,
-0.0249256045,
-0.0406565294,
-0.142596662,
-0.3305261135,
0.3294389546,
0.3395953476,
0.2705218792,
0.4959826171,
0.3331588507,
-0.20632267,
-0.0917061791,
0.2692639828,
-0.2287530452,
0.149152711,
-0.0694681853,
0.1074012965,
0.0091459276,
0.2462648749,
-0.1224697828,
0.1727232933,
0.4893966019,
-0.0743136778,
-0.2408601046,
-0.3432417214,
0.0028929075,
0.1411682218,
0.3232001066,
-0.4975569844,
-0.5184062123,
-0.1447167546,
0.0205588173,
-0.0667386875,
0.2386428863,
0.0537123419,
-0.1103443727,
0.0854039341,
-0.1581890881,
-0.1327444911,
-0.084584944,
-0.0041268617,
-0.0971263945,
0.2198684514,
-0.1888699234,
0.0896136239,
-0.0369772241,
-0.1413609385,
0.101376541,
-0.1235720515,
-0.2180250883,
0.1011405364,
-0.3869353235,
-0.0875707045,
0.0201005973,
0.0376695059,
0.1170409173,
0.3247123063,
-0.1191571727,
-0.1074447483,
0.0774688497,
0.1526909918,
-0.0633715019,
0.2510498166,
0.0717840716,
0.405588299,
0.1644884497,
0.2256295979,
0.1903325766,
-0.0372534394,
-0.0465320274,
-0.1879574656,
-0.035416916,
-0.0767263994,
0.391194433,
-0.1857686341,
-0.460949868,
0.0816524774,
-0.0192960724,
-0.012649266,
0.1657831669,
0.3901852667,
-0.0508914962,
0.1958480626,
0.0338387303,
0.2480368614,
-0.0987044126,
-0.0549307764,
-0.2178040147,
0.1822754443,
0.044295378,
-0.0613647066,
0.2665496469,
-0.2043994069,
0.3732974827,
-0.0423151255,
0.3616086543,
0.0847417638,
0.0510847084,
-0.14545241,
-0.0255685709,
0.3968060017,
0.0152090481,
0.2378198504,
0.1801999509,
-0.1035068035,
-0.1647803485,
-0.0958935618,
-0.1918446124,
-0.1836182624,
-0.3192625046,
0.2162049264,
-0.0210419092,
-0.0921768099,
-0.3226117492,
-0.3689460456,
0.0944245383,
-0.0182125885,
0.1137153059,
-0.0906749293,
0.021538699,
-0.1323785186,
0.452668786,
0.5081090927,
-0.0831918865,
-0.1450251341,
0.0850342512,
-0.2529963255,
-0.0855869651,
0.0920885205,
-0.0484303311,
0.274001658,
-0.2953410149,
-0.0671791807,
0.4383234978,
-0.72797966,
-0.5659129024,
0.1156728193,
0.1477628797,
0.1233792156,
0.1726186424,
-0.0775598511,
0.1376909763,
0.1192027405,
0.1501125991,
0.1212865487,
0.0992891788,
-0.0077225384,
-0.1008376777,
-0.1766423285,
-0.1245832816,
0.1922002435,
0.1282690167,
0.0920149386,
0.0606449991,
-0.0919137299,
0.1492717564,
0.0344356708,
0.191365689,
0.3376877606,
0.1375070214,
-0.0066799717,
-0.0293334387,
-0.3104027212,
-0.3723599613,
0.2383066565,
0.0184980053,
-0.0546190068,
-0.4142488241,
-0.1267378777,
-0.3679560721,
0.1336207241,
-0.2611930668,
-0.3326177001,
0.1561787128,
0.1425205916,
0.0898753777,
-0.0342773832,
-0.2702408731,
0.6299433112,
0.162031129,
0.2853499055,
-0.5041021109,
0.4159919024,
-0.228356421,
-0.1928144693,
0.0165432468,
0.2877674103,
0.0604732558,
-0.1350451857,
-0.1276094466,
0.2860279083,
-0.0737569332,
0.1419701725,
-0.1714650393,
-0.0211530551,
0.2542781234,
-0.3687995076,
0.1102793217,
-0.161015138,
0.1525547057,
0.1148898378,
0.1559603512,
-0.067275174,
-0.0296018869,
0.1813691556,
0.0562232509,
0.1284667403,
0.1555490345,
0.0018368211,
-0.0128842397,
-0.3161042333,
0.2342730016,
-0.0157593004,
0.3669007719,
-0.1330785006,
-0.0506015345,
0.0338331088,
0.3739251494,
0.1390887052,
0.0664240122,
0.0390164778,
-0.3434298038,
0.397698164,
0.3328787982,
0.0874227956,
0.3656416833,
0.1534752101,
-0.3630248606,
0.0870316625,
-0.0286812559,
-0.0013225696,
0.2386495769,
0.1084728241,
0.1649439037,
0.1434298903,
-0.0002989766,
0.1899610609,
-0.134456113,
-0.5046705604,
-0.2546652257,
0.195454821,
-0.3641715348,
-0.0019553103,
-0.2530148029,
0.0832500383,
-0.1093071029,
-0.4048547149,
-0.1465943158,
-0.2161156982,
-0.2081963718,
0.2030974627,
0.022411935,
0.2812788785,
-0.2393127829,
-0.0625866801,
0.1110453308,
-0.2723606229,
-0.2848051488,
-0.0283504855,
-0.064784728,
0.0693343207,
0.1385721862,
0.1202728152,
0.3721860349,
-0.2688123286,
0.1781256795,
-0.2829393744,
-0.2431177199,
0.2052355558,
-0.1936718673,
0.2931851745,
0.3369630873,
0.0967693552,
0.0580182448,
-0.3787179887,
0.3081191182,
-0.0661888346,
-0.2518462837,
0.0720035508,
-0.1423131824,
-0.3741616011,
-0.058493115,
-0.2144788951,
-0.2503893971,
-0.5462629795,
0.1873143613,
0.2677693963,
0.1386936456,
0.2515628934,
0.148153618,
0.2667452097,
-0.0929771364,
0.3493959308,
0.018870445,
-0.1835743487,
0.3339468241,
-0.3508708775,
-0.2841076255,
-0.0293089971,
-0.0960199609,
0.376078546,
-0.0521922708,
-0.4940153956,
-0.3822027743,
-0.3773936331,
0.4545095563,
-0.2008544207,
0.0889414176,
0.3171698749,
0.2307830304,
0.0254349057,
-0.1975672096,
-0.1063172519,
0.0195996687,
-0.2402970195,
-0.0674571171,
0.0507312156,
0.2947298288,
-0.1363618672,
0.4734265208,
0.4305483103,
-0.138041392,
0.3442361653,
-0.1096345484,
0.3224721253,
-0.2545557618,
-0.6419273019,
0.1127223745,
0.0900771171,
0.2584553659,
-0.08034724,
-0.0657916293,
0.2727054358,
-0.1413852423,
-0.0396351926,
-0.1856802255,
-0.1835012138,
-0.1882561445,
-0.2394159734,
0.0854243115,
-0.0071622375,
0.1824040562,
-0.1316790134,
-0.0244111381,
0.326423943,
0.1701817065,
-0.1123283803,
0.0231716018,
-0.1080517769,
-0.1031826958,
-0.465366751,
0.2235034406,
0.0790441707,
0.3181741238,
-0.0147490501,
0.0062084696,
-0.0061157965,
-0.0445311032,
0.630243659,
0.0124474168,
-0.0499878936,
0.0197832808,
0.0804605335,
-0.5375168324,
0.0399416238,
-0.1338353008,
0.2266003042,
0.03729802,
0.3458897173,
-0.2658976316,
-0.328704685,
0.4324553907,
0.1550698429,
0.0611744598,
0.0652231351,
-0.3212061524,
-0.2729232311,
-0.4989219606,
-0.0810517222,
-0.0132073602,
0.2910779417,
0.2181857377,
-0.0177895259,
-0.3570695221,
-0.1983835697,
0.0926281512,
0.1460370719,
0.3157178462,
-0.1291662008,
0.3344779015,
0.1319186538,
0.2002490163,
0.3194769025,
0.644669652,
-0.087850675,
-0.523597002,
-0.0868761539,
0.0838999674,
0.0562606975,
0.100434497,
-0.0979675874,
-0.0320179313,
-0.1924769133,
0.2425475717,
-0.1834713817,
0.0715183914,
0.2161054164,
0.1635447592,
-0.2422329187,
-0.0681535825,
0.369020015,
0.0573611259,
0.0920922533,
0.4780094028,
0.6363886595,
-0.2343237549,
0.1816838533,
-0.0164593458,
0.7035281658,
0.4534170628,
0.0816512927,
0.4295413494,
-0.1792650968,
0.2659635842,
-0.1461487859,
0.0244233049,
-0.2304322273,
-0.4042992592,
-0.0679782107,
-0.144391492,
0.3169411421,
-0.2228757739,
-0.1909895241,
0.1780649573,
0.0108023807,
0.1799365133,
-0.1272001863,
0.0871852785,
-0.25491485,
-0.3470272124,
-0.1124341115,
0.2005055547,
-0.0338315926,
0.3074901104,
-0.0503774136,
0.039559219,
-0.2752838731,
-0.3104623258,
-0.2794536352,
0.1396056414,
-0.2440237403,
0.2333437353,
0.4532899261,
-0.3312791884,
0.2246737182,
0.0505967103,
0.3516990542,
0.1260749549,
-0.2278513312,
0.2217364311,
-0.1289776564,
-0.0068619712,
-0.0111964215,
0.0307889581,
0.2916074991,
-0.0905981213,
-0.2668638825,
0.1304555088,
-0.0779386088,
-0.118075788,
0.280200094,
0.0484187417,
0.1262674034,
-0.2912629843,
-0.0904569104,
-0.0340658873,
0.0932669938,
-0.157735467,
0.1631813645,
0.0614026636,
-0.1161681861,
0.1514851302,
0.0824725181,
-0.1915814728,
-0.1206383854,
0.4036396146,
-0.2198049724,
-0.0722686574,
0.456833005,
0.0028561372,
-0.2840671837,
-0.2434483021,
-0.0184960626,
0.1171788797,
-0.5752741694,
-0.0063193836,
-0.1082126871,
-0.125005275,
-0.1356116533,
0.1443482041,
0.0740422159,
-0.0532531478,
0.0989261568,
-0.4294728339,
-0.3662429452,
0.2560116649,
-0.1619792134,
0.1454372853,
0.0334509946,
0.1280633509,
-0.1160483211,
0.1385970712,
-0.3367099464,
-0.0441672467,
-0.2012764364,
0.0034374429,
0.1847909093,
-0.0656266883,
0.2171392888,
-0.1301319003,
0.2098069638,
0.1302860528,
-0.2614562213,
-0.2626340985,
-0.1669707596,
0.0882777199,
0.0241771117,
-0.3117093146,
0.0402812585,
0.0492566824,
-0.1221321896,
-0.2005802244,
0.2195033133,
0.1210735589,
-0.083846353,
0.1772986352,
0.0354856066,
-0.0519598275,
-0.2254253477,
0.0653544292,
0.0626639128,
0.205373466,
-0.0824998841,
0.15610075,
-0.1316598654,
0.0926043093,
-0.1257056147,
0.1367592067,
0.1169147044,
-0.0495662279,
0.3787105381,
-0.3153232634,
0.0670550019,
0.1791381687,
0.2130454183,
0.1259801239,
-0.2293982357,
-0.0212038867,
0.2414678782,
0.2713025212,
-0.2773506343,
-0.0588771552,
0.2508406341,
0.0628270432,
0.1473652869,
0.1828245521,
0.0025912637,
-0.1742157936,
0.2521598637,
0.3034750819,
0.3963967562,
-0.2181999832,
0.2311718762,
0.2707443237,
-0.0155018382,
0.0330313481,
0.4053876102,
0.1338233203,
0.3140208125,
0.6220415831,
-0.4703536332,
0.3776133657,
-0.138150081,
0.0500436723,
0.1782452017,
-0.2684495747,
0.0442482717,
-0.2581346035,
0.0374076925,
-0.1617573947,
0.0024643294,
0.2166943997,
-0.1458705217,
-0.1519913077,
-0.1860486865,
0.1483870298,
-0.167227149,
0.0655447692,
-0.0714027882,
-0.0695513338,
-0.105483219,
-0.1338015199,
0.0379430205,
-0.190281257,
0.3961416483,
0.1299105883,
-0.1748739183,
-0.548274219,
0.2178079784,
0.2818323672,
0.1062617525,
-0.1579884291,
0.3967570961,
0.3055476546,
-0.1000968814,
-0.2038764656,
0.5768453479,
0.5954797864,
0.2145644575,
0.1322197616,
0.0620219447,
-0.073001191,
-0.1752805114,
-0.0196335744,
0.2379042506,
-0.2017878741,
0.1163189188,
0.2152834088,
0.2604625225,
-0.2475313395,
-0.1703759432,
-0.076295279,
0.0688018575,
-0.3309392631,
0.4845588505,
-0.3293316364,
-0.259539932,
-0.0857399628,
-0.0874127597,
-0.4900284708,
0.031604711,
0.3719985187,
-0.0400501117,
0.016687328,
-0.3548586667,
0.1001645848,
-0.0864304826,
0.4342510998,
0.2829068601,
0.2116381824,
-0.1218907982,
-0.0893185139,
-0.3286599517,
0.2203587741,
0.0127801243,
-0.1638106853,
-0.0115683274,
0.0266690757,
-0.1778533459,
0.1253761202,
0.222632587,
0.1120704934,
0.2902598977,
0.016679436,
-0.3053414524,
-0.0752134994,
-0.1220302358,
-0.1132823676,
0.1427201778,
-0.402843833,
0.1064595804,
-0.1665898561,
0.0741798654,
-0.1052056178,
-0.0692192689,
0.2439991832,
-0.2990667224,
0.4611747563,
0.1164723411,
0.4591690898,
-0.1277641207,
-0.1874946654,
-0.2123903781,
-0.3932295442,
-0.2279269993,
0.1583047956,
0.0663981885,
0.3727277815,
-0.1284736991,
-0.3735390604,
-0.3333060741,
0.474134177,
-0.0150481639,
0.0468443334,
-0.2066664547,
0.3484679163,
-0.3783449233,
0.162539497,
0.0936463326,
0.1092469245,
-0.0426851176,
0.23578462,
-0.3180307746,
-0.5008897185,
0.4493025541,
-0.3432527184,
-0.2553569973,
-0.0851388723,
0.2158868015,
0.0658396482,
-0.3295117319,
-0.5746705532,
0.1020807922,
0.2760473788,
-0.1395709962,
-0.1272946298,
0.3145699799,
0.1119548008,
0.1150312424,
-0.0397334285,
0.5530535579,
0.0008198738,
-0.0703101903,
0.3039714396,
-0.033470802
] |
https://github.com/huggingface/datasets/issues/3099 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' | > Hi @JTWang2000, thanks for reporting.
>
> However, I cannot reproduce your reported bug:
>
> ```python
> >>> from datasets import load_dataset
>
> >>> dataset = load_dataset("sst", "default")
> >>> dataset
> DatasetDict({
> train: Dataset({
> features: ['sentence', 'label', 'tokens', 'tree'],
> num_rows: 8544
> })
> validation: Dataset({
> features: ['sentence', 'label', 'tokens', 'tree'],
> num_rows: 1101
> })
> test: Dataset({
> features: ['sentence', 'label', 'tokens', 'tree'],
> num_rows: 2210
> })
> })
> ```
>
> Maybe, the cause is that you have a quite old version of `huggingface_hub`. Could you please try to update it and confirm if the problem persists?
>
> ```
> pip install -U huggingface_hub
> ```
My problem solved after updating huggingface hub command. Thanks a lot and sorry for the late reply. | ## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
| 137 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
> Hi @JTWang2000, thanks for reporting.
>
> However, I cannot reproduce your reported bug:
>
> ```python
> >>> from datasets import load_dataset
>
> >>> dataset = load_dataset("sst", "default")
> >>> dataset
> DatasetDict({
> train: Dataset({
> features: ['sentence', 'label', 'tokens', 'tree'],
> num_rows: 8544
> })
> validation: Dataset({
> features: ['sentence', 'label', 'tokens', 'tree'],
> num_rows: 1101
> })
> test: Dataset({
> features: ['sentence', 'label', 'tokens', 'tree'],
> num_rows: 2210
> })
> })
> ```
>
> Maybe, the cause is that you have a quite old version of `huggingface_hub`. Could you please try to update it and confirm if the problem persists?
>
> ```
> pip install -U huggingface_hub
> ```
My problem solved after updating huggingface hub command. Thanks a lot and sorry for the late reply. | [
-0.4111837745,
-0.2402752638,
-0.0685085058,
0.432022661,
0.2099774629,
0.0242406782,
0.2803740501,
0.4057570994,
0.1470829546,
0.0813488215,
-0.2076935172,
0.3919777572,
-0.0483211763,
0.0626079962,
-0.0157080498,
-0.1405219734,
0.0408853665,
0.2579431832,
-0.3039068282,
-0.1304225773,
0.0125604328,
0.2599343956,
-0.0942889079,
0.0197071265,
-0.3638885915,
-0.137362048,
0.2644460499,
0.0650364086,
-0.2278314084,
-0.4140820205,
0.2953844368,
-0.1304873675,
0.0288114045,
0.3824129999,
-0.0001108762,
0.2163038105,
0.3906910121,
-0.0061177774,
-0.3889299333,
-0.1615570039,
-0.4061585665,
-0.0434613526,
0.1681844592,
-0.1199033782,
-0.0249256045,
-0.0406565294,
-0.142596662,
-0.3305261135,
0.3294389546,
0.3395953476,
0.2705218792,
0.4959826171,
0.3331588507,
-0.20632267,
-0.0917061791,
0.2692639828,
-0.2287530452,
0.149152711,
-0.0694681853,
0.1074012965,
0.0091459276,
0.2462648749,
-0.1224697828,
0.1727232933,
0.4893966019,
-0.0743136778,
-0.2408601046,
-0.3432417214,
0.0028929075,
0.1411682218,
0.3232001066,
-0.4975569844,
-0.5184062123,
-0.1447167546,
0.0205588173,
-0.0667386875,
0.2386428863,
0.0537123419,
-0.1103443727,
0.0854039341,
-0.1581890881,
-0.1327444911,
-0.084584944,
-0.0041268617,
-0.0971263945,
0.2198684514,
-0.1888699234,
0.0896136239,
-0.0369772241,
-0.1413609385,
0.101376541,
-0.1235720515,
-0.2180250883,
0.1011405364,
-0.3869353235,
-0.0875707045,
0.0201005973,
0.0376695059,
0.1170409173,
0.3247123063,
-0.1191571727,
-0.1074447483,
0.0774688497,
0.1526909918,
-0.0633715019,
0.2510498166,
0.0717840716,
0.405588299,
0.1644884497,
0.2256295979,
0.1903325766,
-0.0372534394,
-0.0465320274,
-0.1879574656,
-0.035416916,
-0.0767263994,
0.391194433,
-0.1857686341,
-0.460949868,
0.0816524774,
-0.0192960724,
-0.012649266,
0.1657831669,
0.3901852667,
-0.0508914962,
0.1958480626,
0.0338387303,
0.2480368614,
-0.0987044126,
-0.0549307764,
-0.2178040147,
0.1822754443,
0.044295378,
-0.0613647066,
0.2665496469,
-0.2043994069,
0.3732974827,
-0.0423151255,
0.3616086543,
0.0847417638,
0.0510847084,
-0.14545241,
-0.0255685709,
0.3968060017,
0.0152090481,
0.2378198504,
0.1801999509,
-0.1035068035,
-0.1647803485,
-0.0958935618,
-0.1918446124,
-0.1836182624,
-0.3192625046,
0.2162049264,
-0.0210419092,
-0.0921768099,
-0.3226117492,
-0.3689460456,
0.0944245383,
-0.0182125885,
0.1137153059,
-0.0906749293,
0.021538699,
-0.1323785186,
0.452668786,
0.5081090927,
-0.0831918865,
-0.1450251341,
0.0850342512,
-0.2529963255,
-0.0855869651,
0.0920885205,
-0.0484303311,
0.274001658,
-0.2953410149,
-0.0671791807,
0.4383234978,
-0.72797966,
-0.5659129024,
0.1156728193,
0.1477628797,
0.1233792156,
0.1726186424,
-0.0775598511,
0.1376909763,
0.1192027405,
0.1501125991,
0.1212865487,
0.0992891788,
-0.0077225384,
-0.1008376777,
-0.1766423285,
-0.1245832816,
0.1922002435,
0.1282690167,
0.0920149386,
0.0606449991,
-0.0919137299,
0.1492717564,
0.0344356708,
0.191365689,
0.3376877606,
0.1375070214,
-0.0066799717,
-0.0293334387,
-0.3104027212,
-0.3723599613,
0.2383066565,
0.0184980053,
-0.0546190068,
-0.4142488241,
-0.1267378777,
-0.3679560721,
0.1336207241,
-0.2611930668,
-0.3326177001,
0.1561787128,
0.1425205916,
0.0898753777,
-0.0342773832,
-0.2702408731,
0.6299433112,
0.162031129,
0.2853499055,
-0.5041021109,
0.4159919024,
-0.228356421,
-0.1928144693,
0.0165432468,
0.2877674103,
0.0604732558,
-0.1350451857,
-0.1276094466,
0.2860279083,
-0.0737569332,
0.1419701725,
-0.1714650393,
-0.0211530551,
0.2542781234,
-0.3687995076,
0.1102793217,
-0.161015138,
0.1525547057,
0.1148898378,
0.1559603512,
-0.067275174,
-0.0296018869,
0.1813691556,
0.0562232509,
0.1284667403,
0.1555490345,
0.0018368211,
-0.0128842397,
-0.3161042333,
0.2342730016,
-0.0157593004,
0.3669007719,
-0.1330785006,
-0.0506015345,
0.0338331088,
0.3739251494,
0.1390887052,
0.0664240122,
0.0390164778,
-0.3434298038,
0.397698164,
0.3328787982,
0.0874227956,
0.3656416833,
0.1534752101,
-0.3630248606,
0.0870316625,
-0.0286812559,
-0.0013225696,
0.2386495769,
0.1084728241,
0.1649439037,
0.1434298903,
-0.0002989766,
0.1899610609,
-0.134456113,
-0.5046705604,
-0.2546652257,
0.195454821,
-0.3641715348,
-0.0019553103,
-0.2530148029,
0.0832500383,
-0.1093071029,
-0.4048547149,
-0.1465943158,
-0.2161156982,
-0.2081963718,
0.2030974627,
0.022411935,
0.2812788785,
-0.2393127829,
-0.0625866801,
0.1110453308,
-0.2723606229,
-0.2848051488,
-0.0283504855,
-0.064784728,
0.0693343207,
0.1385721862,
0.1202728152,
0.3721860349,
-0.2688123286,
0.1781256795,
-0.2829393744,
-0.2431177199,
0.2052355558,
-0.1936718673,
0.2931851745,
0.3369630873,
0.0967693552,
0.0580182448,
-0.3787179887,
0.3081191182,
-0.0661888346,
-0.2518462837,
0.0720035508,
-0.1423131824,
-0.3741616011,
-0.058493115,
-0.2144788951,
-0.2503893971,
-0.5462629795,
0.1873143613,
0.2677693963,
0.1386936456,
0.2515628934,
0.148153618,
0.2667452097,
-0.0929771364,
0.3493959308,
0.018870445,
-0.1835743487,
0.3339468241,
-0.3508708775,
-0.2841076255,
-0.0293089971,
-0.0960199609,
0.376078546,
-0.0521922708,
-0.4940153956,
-0.3822027743,
-0.3773936331,
0.4545095563,
-0.2008544207,
0.0889414176,
0.3171698749,
0.2307830304,
0.0254349057,
-0.1975672096,
-0.1063172519,
0.0195996687,
-0.2402970195,
-0.0674571171,
0.0507312156,
0.2947298288,
-0.1363618672,
0.4734265208,
0.4305483103,
-0.138041392,
0.3442361653,
-0.1096345484,
0.3224721253,
-0.2545557618,
-0.6419273019,
0.1127223745,
0.0900771171,
0.2584553659,
-0.08034724,
-0.0657916293,
0.2727054358,
-0.1413852423,
-0.0396351926,
-0.1856802255,
-0.1835012138,
-0.1882561445,
-0.2394159734,
0.0854243115,
-0.0071622375,
0.1824040562,
-0.1316790134,
-0.0244111381,
0.326423943,
0.1701817065,
-0.1123283803,
0.0231716018,
-0.1080517769,
-0.1031826958,
-0.465366751,
0.2235034406,
0.0790441707,
0.3181741238,
-0.0147490501,
0.0062084696,
-0.0061157965,
-0.0445311032,
0.630243659,
0.0124474168,
-0.0499878936,
0.0197832808,
0.0804605335,
-0.5375168324,
0.0399416238,
-0.1338353008,
0.2266003042,
0.03729802,
0.3458897173,
-0.2658976316,
-0.328704685,
0.4324553907,
0.1550698429,
0.0611744598,
0.0652231351,
-0.3212061524,
-0.2729232311,
-0.4989219606,
-0.0810517222,
-0.0132073602,
0.2910779417,
0.2181857377,
-0.0177895259,
-0.3570695221,
-0.1983835697,
0.0926281512,
0.1460370719,
0.3157178462,
-0.1291662008,
0.3344779015,
0.1319186538,
0.2002490163,
0.3194769025,
0.644669652,
-0.087850675,
-0.523597002,
-0.0868761539,
0.0838999674,
0.0562606975,
0.100434497,
-0.0979675874,
-0.0320179313,
-0.1924769133,
0.2425475717,
-0.1834713817,
0.0715183914,
0.2161054164,
0.1635447592,
-0.2422329187,
-0.0681535825,
0.369020015,
0.0573611259,
0.0920922533,
0.4780094028,
0.6363886595,
-0.2343237549,
0.1816838533,
-0.0164593458,
0.7035281658,
0.4534170628,
0.0816512927,
0.4295413494,
-0.1792650968,
0.2659635842,
-0.1461487859,
0.0244233049,
-0.2304322273,
-0.4042992592,
-0.0679782107,
-0.144391492,
0.3169411421,
-0.2228757739,
-0.1909895241,
0.1780649573,
0.0108023807,
0.1799365133,
-0.1272001863,
0.0871852785,
-0.25491485,
-0.3470272124,
-0.1124341115,
0.2005055547,
-0.0338315926,
0.3074901104,
-0.0503774136,
0.039559219,
-0.2752838731,
-0.3104623258,
-0.2794536352,
0.1396056414,
-0.2440237403,
0.2333437353,
0.4532899261,
-0.3312791884,
0.2246737182,
0.0505967103,
0.3516990542,
0.1260749549,
-0.2278513312,
0.2217364311,
-0.1289776564,
-0.0068619712,
-0.0111964215,
0.0307889581,
0.2916074991,
-0.0905981213,
-0.2668638825,
0.1304555088,
-0.0779386088,
-0.118075788,
0.280200094,
0.0484187417,
0.1262674034,
-0.2912629843,
-0.0904569104,
-0.0340658873,
0.0932669938,
-0.157735467,
0.1631813645,
0.0614026636,
-0.1161681861,
0.1514851302,
0.0824725181,
-0.1915814728,
-0.1206383854,
0.4036396146,
-0.2198049724,
-0.0722686574,
0.456833005,
0.0028561372,
-0.2840671837,
-0.2434483021,
-0.0184960626,
0.1171788797,
-0.5752741694,
-0.0063193836,
-0.1082126871,
-0.125005275,
-0.1356116533,
0.1443482041,
0.0740422159,
-0.0532531478,
0.0989261568,
-0.4294728339,
-0.3662429452,
0.2560116649,
-0.1619792134,
0.1454372853,
0.0334509946,
0.1280633509,
-0.1160483211,
0.1385970712,
-0.3367099464,
-0.0441672467,
-0.2012764364,
0.0034374429,
0.1847909093,
-0.0656266883,
0.2171392888,
-0.1301319003,
0.2098069638,
0.1302860528,
-0.2614562213,
-0.2626340985,
-0.1669707596,
0.0882777199,
0.0241771117,
-0.3117093146,
0.0402812585,
0.0492566824,
-0.1221321896,
-0.2005802244,
0.2195033133,
0.1210735589,
-0.083846353,
0.1772986352,
0.0354856066,
-0.0519598275,
-0.2254253477,
0.0653544292,
0.0626639128,
0.205373466,
-0.0824998841,
0.15610075,
-0.1316598654,
0.0926043093,
-0.1257056147,
0.1367592067,
0.1169147044,
-0.0495662279,
0.3787105381,
-0.3153232634,
0.0670550019,
0.1791381687,
0.2130454183,
0.1259801239,
-0.2293982357,
-0.0212038867,
0.2414678782,
0.2713025212,
-0.2773506343,
-0.0588771552,
0.2508406341,
0.0628270432,
0.1473652869,
0.1828245521,
0.0025912637,
-0.1742157936,
0.2521598637,
0.3034750819,
0.3963967562,
-0.2181999832,
0.2311718762,
0.2707443237,
-0.0155018382,
0.0330313481,
0.4053876102,
0.1338233203,
0.3140208125,
0.6220415831,
-0.4703536332,
0.3776133657,
-0.138150081,
0.0500436723,
0.1782452017,
-0.2684495747,
0.0442482717,
-0.2581346035,
0.0374076925,
-0.1617573947,
0.0024643294,
0.2166943997,
-0.1458705217,
-0.1519913077,
-0.1860486865,
0.1483870298,
-0.167227149,
0.0655447692,
-0.0714027882,
-0.0695513338,
-0.105483219,
-0.1338015199,
0.0379430205,
-0.190281257,
0.3961416483,
0.1299105883,
-0.1748739183,
-0.548274219,
0.2178079784,
0.2818323672,
0.1062617525,
-0.1579884291,
0.3967570961,
0.3055476546,
-0.1000968814,
-0.2038764656,
0.5768453479,
0.5954797864,
0.2145644575,
0.1322197616,
0.0620219447,
-0.073001191,
-0.1752805114,
-0.0196335744,
0.2379042506,
-0.2017878741,
0.1163189188,
0.2152834088,
0.2604625225,
-0.2475313395,
-0.1703759432,
-0.076295279,
0.0688018575,
-0.3309392631,
0.4845588505,
-0.3293316364,
-0.259539932,
-0.0857399628,
-0.0874127597,
-0.4900284708,
0.031604711,
0.3719985187,
-0.0400501117,
0.016687328,
-0.3548586667,
0.1001645848,
-0.0864304826,
0.4342510998,
0.2829068601,
0.2116381824,
-0.1218907982,
-0.0893185139,
-0.3286599517,
0.2203587741,
0.0127801243,
-0.1638106853,
-0.0115683274,
0.0266690757,
-0.1778533459,
0.1253761202,
0.222632587,
0.1120704934,
0.2902598977,
0.016679436,
-0.3053414524,
-0.0752134994,
-0.1220302358,
-0.1132823676,
0.1427201778,
-0.402843833,
0.1064595804,
-0.1665898561,
0.0741798654,
-0.1052056178,
-0.0692192689,
0.2439991832,
-0.2990667224,
0.4611747563,
0.1164723411,
0.4591690898,
-0.1277641207,
-0.1874946654,
-0.2123903781,
-0.3932295442,
-0.2279269993,
0.1583047956,
0.0663981885,
0.3727277815,
-0.1284736991,
-0.3735390604,
-0.3333060741,
0.474134177,
-0.0150481639,
0.0468443334,
-0.2066664547,
0.3484679163,
-0.3783449233,
0.162539497,
0.0936463326,
0.1092469245,
-0.0426851176,
0.23578462,
-0.3180307746,
-0.5008897185,
0.4493025541,
-0.3432527184,
-0.2553569973,
-0.0851388723,
0.2158868015,
0.0658396482,
-0.3295117319,
-0.5746705532,
0.1020807922,
0.2760473788,
-0.1395709962,
-0.1272946298,
0.3145699799,
0.1119548008,
0.1150312424,
-0.0397334285,
0.5530535579,
0.0008198738,
-0.0703101903,
0.3039714396,
-0.033470802
] |
https://github.com/huggingface/datasets/issues/3099 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo' | @tjruwase, please note that versions of `datsets` and `huggingface_hub` must be compatible one with each other:
- In `datasets` version `1.11.0`, the requirement on `huggingface_hub` was: `huggingface_hub<0.1.0`
https://github.com/huggingface/datasets/blob/2cc00f372a96133e701275eec4d6b26d15257289/setup.py#L90
- Therefore, your installed `huggingface_hub` version `0.0.8` was compatible
- In `datasets` version `1.12.0`, the requirement on `huggingface_hub` was: `huggingface_hub>=0.0.14,<0.1.0`
https://github.com/huggingface/datasets/blob/6c766f9115d686182d76b1b937cb27e099c45d68/setup.py#L104
- Therefore, your installed `huggingface_hub` version `0.0.8` was no longer compatible
- Currently, in `datasets` version `1.15.1`, the requirement on `huggingface_hub` is: `huggingface_hub>=0.1.0,<1.0.0`
https://github.com/huggingface/datasets/blob/018100679d21cf27136f0eccb1c50e3a9c968ce2/setup.py#L102
@JTWang2000, thanks for your answer. I close this issue then. | ## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
| 83 | AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Describe the bug
When using `pip install datasets`
or use `conda install -c huggingface -c conda-forge datasets`
cannot install datasets
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("sst", "default")
```
## Actual results
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-fbe7981e6e21> in <module>
1 import torch
2 import transformers
----> 3 from datasets import load_dataset
4
5 dataset = load_dataset("sst", "default")
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/__init__.py in <module>
35 from .arrow_reader import ArrowReader, ReadInstruction
36 from .arrow_writer import ArrowWriter
---> 37 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
38 from .combine import interleave_datasets
39 from .dataset_dict import DatasetDict, IterableDatasetDict
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/builder.py in <module>
42 )
43 from .arrow_writer import ArrowWriter, BeamWriter
---> 44 from .data_files import DataFilesDict, _sanitize_patterns
45 from .dataset_dict import DatasetDict, IterableDatasetDict
46 from .fingerprint import Hasher
~/miniforge3/envs/actor/lib/python3.8/site-packages/datasets/data_files.py in <module>
118
119 def _exec_patterns_in_dataset_repository(
--> 120 dataset_info: huggingface_hub.hf_api.DatasetInfo,
121 patterns: List[str],
122 allowed_extensions: Optional[list] = None,
AttributeError: module 'huggingface_hub.hf_api' has no attribute 'DatasetInfo'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-11.3.1-arm64-arm-64bit
- Python version: 3.8.10
- PyArrow version: 5.0.0
@tjruwase, please note that versions of `datsets` and `huggingface_hub` must be compatible one with each other:
- In `datasets` version `1.11.0`, the requirement on `huggingface_hub` was: `huggingface_hub<0.1.0`
https://github.com/huggingface/datasets/blob/2cc00f372a96133e701275eec4d6b26d15257289/setup.py#L90
- Therefore, your installed `huggingface_hub` version `0.0.8` was compatible
- In `datasets` version `1.12.0`, the requirement on `huggingface_hub` was: `huggingface_hub>=0.0.14,<0.1.0`
https://github.com/huggingface/datasets/blob/6c766f9115d686182d76b1b937cb27e099c45d68/setup.py#L104
- Therefore, your installed `huggingface_hub` version `0.0.8` was no longer compatible
- Currently, in `datasets` version `1.15.1`, the requirement on `huggingface_hub` is: `huggingface_hub>=0.1.0,<1.0.0`
https://github.com/huggingface/datasets/blob/018100679d21cf27136f0eccb1c50e3a9c968ce2/setup.py#L102
@JTWang2000, thanks for your answer. I close this issue then. | [
-0.4111837745,
-0.2402752638,
-0.0685085058,
0.432022661,
0.2099774629,
0.0242406782,
0.2803740501,
0.4057570994,
0.1470829546,
0.0813488215,
-0.2076935172,
0.3919777572,
-0.0483211763,
0.0626079962,
-0.0157080498,
-0.1405219734,
0.0408853665,
0.2579431832,
-0.3039068282,
-0.1304225773,
0.0125604328,
0.2599343956,
-0.0942889079,
0.0197071265,
-0.3638885915,
-0.137362048,
0.2644460499,
0.0650364086,
-0.2278314084,
-0.4140820205,
0.2953844368,
-0.1304873675,
0.0288114045,
0.3824129999,
-0.0001108762,
0.2163038105,
0.3906910121,
-0.0061177774,
-0.3889299333,
-0.1615570039,
-0.4061585665,
-0.0434613526,
0.1681844592,
-0.1199033782,
-0.0249256045,
-0.0406565294,
-0.142596662,
-0.3305261135,
0.3294389546,
0.3395953476,
0.2705218792,
0.4959826171,
0.3331588507,
-0.20632267,
-0.0917061791,
0.2692639828,
-0.2287530452,
0.149152711,
-0.0694681853,
0.1074012965,
0.0091459276,
0.2462648749,
-0.1224697828,
0.1727232933,
0.4893966019,
-0.0743136778,
-0.2408601046,
-0.3432417214,
0.0028929075,
0.1411682218,
0.3232001066,
-0.4975569844,
-0.5184062123,
-0.1447167546,
0.0205588173,
-0.0667386875,
0.2386428863,
0.0537123419,
-0.1103443727,
0.0854039341,
-0.1581890881,
-0.1327444911,
-0.084584944,
-0.0041268617,
-0.0971263945,
0.2198684514,
-0.1888699234,
0.0896136239,
-0.0369772241,
-0.1413609385,
0.101376541,
-0.1235720515,
-0.2180250883,
0.1011405364,
-0.3869353235,
-0.0875707045,
0.0201005973,
0.0376695059,
0.1170409173,
0.3247123063,
-0.1191571727,
-0.1074447483,
0.0774688497,
0.1526909918,
-0.0633715019,
0.2510498166,
0.0717840716,
0.405588299,
0.1644884497,
0.2256295979,
0.1903325766,
-0.0372534394,
-0.0465320274,
-0.1879574656,
-0.035416916,
-0.0767263994,
0.391194433,
-0.1857686341,
-0.460949868,
0.0816524774,
-0.0192960724,
-0.012649266,
0.1657831669,
0.3901852667,
-0.0508914962,
0.1958480626,
0.0338387303,
0.2480368614,
-0.0987044126,
-0.0549307764,
-0.2178040147,
0.1822754443,
0.044295378,
-0.0613647066,
0.2665496469,
-0.2043994069,
0.3732974827,
-0.0423151255,
0.3616086543,
0.0847417638,
0.0510847084,
-0.14545241,
-0.0255685709,
0.3968060017,
0.0152090481,
0.2378198504,
0.1801999509,
-0.1035068035,
-0.1647803485,
-0.0958935618,
-0.1918446124,
-0.1836182624,
-0.3192625046,
0.2162049264,
-0.0210419092,
-0.0921768099,
-0.3226117492,
-0.3689460456,
0.0944245383,
-0.0182125885,
0.1137153059,
-0.0906749293,
0.021538699,
-0.1323785186,
0.452668786,
0.5081090927,
-0.0831918865,
-0.1450251341,
0.0850342512,
-0.2529963255,
-0.0855869651,
0.0920885205,
-0.0484303311,
0.274001658,
-0.2953410149,
-0.0671791807,
0.4383234978,
-0.72797966,
-0.5659129024,
0.1156728193,
0.1477628797,
0.1233792156,
0.1726186424,
-0.0775598511,
0.1376909763,
0.1192027405,
0.1501125991,
0.1212865487,
0.0992891788,
-0.0077225384,
-0.1008376777,
-0.1766423285,
-0.1245832816,
0.1922002435,
0.1282690167,
0.0920149386,
0.0606449991,
-0.0919137299,
0.1492717564,
0.0344356708,
0.191365689,
0.3376877606,
0.1375070214,
-0.0066799717,
-0.0293334387,
-0.3104027212,
-0.3723599613,
0.2383066565,
0.0184980053,
-0.0546190068,
-0.4142488241,
-0.1267378777,
-0.3679560721,
0.1336207241,
-0.2611930668,
-0.3326177001,
0.1561787128,
0.1425205916,
0.0898753777,
-0.0342773832,
-0.2702408731,
0.6299433112,
0.162031129,
0.2853499055,
-0.5041021109,
0.4159919024,
-0.228356421,
-0.1928144693,
0.0165432468,
0.2877674103,
0.0604732558,
-0.1350451857,
-0.1276094466,
0.2860279083,
-0.0737569332,
0.1419701725,
-0.1714650393,
-0.0211530551,
0.2542781234,
-0.3687995076,
0.1102793217,
-0.161015138,
0.1525547057,
0.1148898378,
0.1559603512,
-0.067275174,
-0.0296018869,
0.1813691556,
0.0562232509,
0.1284667403,
0.1555490345,
0.0018368211,
-0.0128842397,
-0.3161042333,
0.2342730016,
-0.0157593004,
0.3669007719,
-0.1330785006,
-0.0506015345,
0.0338331088,
0.3739251494,
0.1390887052,
0.0664240122,
0.0390164778,
-0.3434298038,
0.397698164,
0.3328787982,
0.0874227956,
0.3656416833,
0.1534752101,
-0.3630248606,
0.0870316625,
-0.0286812559,
-0.0013225696,
0.2386495769,
0.1084728241,
0.1649439037,
0.1434298903,
-0.0002989766,
0.1899610609,
-0.134456113,
-0.5046705604,
-0.2546652257,
0.195454821,
-0.3641715348,
-0.0019553103,
-0.2530148029,
0.0832500383,
-0.1093071029,
-0.4048547149,
-0.1465943158,
-0.2161156982,
-0.2081963718,
0.2030974627,
0.022411935,
0.2812788785,
-0.2393127829,
-0.0625866801,
0.1110453308,
-0.2723606229,
-0.2848051488,
-0.0283504855,
-0.064784728,
0.0693343207,
0.1385721862,
0.1202728152,
0.3721860349,
-0.2688123286,
0.1781256795,
-0.2829393744,
-0.2431177199,
0.2052355558,
-0.1936718673,
0.2931851745,
0.3369630873,
0.0967693552,
0.0580182448,
-0.3787179887,
0.3081191182,
-0.0661888346,
-0.2518462837,
0.0720035508,
-0.1423131824,
-0.3741616011,
-0.058493115,
-0.2144788951,
-0.2503893971,
-0.5462629795,
0.1873143613,
0.2677693963,
0.1386936456,
0.2515628934,
0.148153618,
0.2667452097,
-0.0929771364,
0.3493959308,
0.018870445,
-0.1835743487,
0.3339468241,
-0.3508708775,
-0.2841076255,
-0.0293089971,
-0.0960199609,
0.376078546,
-0.0521922708,
-0.4940153956,
-0.3822027743,
-0.3773936331,
0.4545095563,
-0.2008544207,
0.0889414176,
0.3171698749,
0.2307830304,
0.0254349057,
-0.1975672096,
-0.1063172519,
0.0195996687,
-0.2402970195,
-0.0674571171,
0.0507312156,
0.2947298288,
-0.1363618672,
0.4734265208,
0.4305483103,
-0.138041392,
0.3442361653,
-0.1096345484,
0.3224721253,
-0.2545557618,
-0.6419273019,
0.1127223745,
0.0900771171,
0.2584553659,
-0.08034724,
-0.0657916293,
0.2727054358,
-0.1413852423,
-0.0396351926,
-0.1856802255,
-0.1835012138,
-0.1882561445,
-0.2394159734,
0.0854243115,
-0.0071622375,
0.1824040562,
-0.1316790134,
-0.0244111381,
0.326423943,
0.1701817065,
-0.1123283803,
0.0231716018,
-0.1080517769,
-0.1031826958,
-0.465366751,
0.2235034406,
0.0790441707,
0.3181741238,
-0.0147490501,
0.0062084696,
-0.0061157965,
-0.0445311032,
0.630243659,
0.0124474168,
-0.0499878936,
0.0197832808,
0.0804605335,
-0.5375168324,
0.0399416238,
-0.1338353008,
0.2266003042,
0.03729802,
0.3458897173,
-0.2658976316,
-0.328704685,
0.4324553907,
0.1550698429,
0.0611744598,
0.0652231351,
-0.3212061524,
-0.2729232311,
-0.4989219606,
-0.0810517222,
-0.0132073602,
0.2910779417,
0.2181857377,
-0.0177895259,
-0.3570695221,
-0.1983835697,
0.0926281512,
0.1460370719,
0.3157178462,
-0.1291662008,
0.3344779015,
0.1319186538,
0.2002490163,
0.3194769025,
0.644669652,
-0.087850675,
-0.523597002,
-0.0868761539,
0.0838999674,
0.0562606975,
0.100434497,
-0.0979675874,
-0.0320179313,
-0.1924769133,
0.2425475717,
-0.1834713817,
0.0715183914,
0.2161054164,
0.1635447592,
-0.2422329187,
-0.0681535825,
0.369020015,
0.0573611259,
0.0920922533,
0.4780094028,
0.6363886595,
-0.2343237549,
0.1816838533,
-0.0164593458,
0.7035281658,
0.4534170628,
0.0816512927,
0.4295413494,
-0.1792650968,
0.2659635842,
-0.1461487859,
0.0244233049,
-0.2304322273,
-0.4042992592,
-0.0679782107,
-0.144391492,
0.3169411421,
-0.2228757739,
-0.1909895241,
0.1780649573,
0.0108023807,
0.1799365133,
-0.1272001863,
0.0871852785,
-0.25491485,
-0.3470272124,
-0.1124341115,
0.2005055547,
-0.0338315926,
0.3074901104,
-0.0503774136,
0.039559219,
-0.2752838731,
-0.3104623258,
-0.2794536352,
0.1396056414,
-0.2440237403,
0.2333437353,
0.4532899261,
-0.3312791884,
0.2246737182,
0.0505967103,
0.3516990542,
0.1260749549,
-0.2278513312,
0.2217364311,
-0.1289776564,
-0.0068619712,
-0.0111964215,
0.0307889581,
0.2916074991,
-0.0905981213,
-0.2668638825,
0.1304555088,
-0.0779386088,
-0.118075788,
0.280200094,
0.0484187417,
0.1262674034,
-0.2912629843,
-0.0904569104,
-0.0340658873,
0.0932669938,
-0.157735467,
0.1631813645,
0.0614026636,
-0.1161681861,
0.1514851302,
0.0824725181,
-0.1915814728,
-0.1206383854,
0.4036396146,
-0.2198049724,
-0.0722686574,
0.456833005,
0.0028561372,
-0.2840671837,
-0.2434483021,
-0.0184960626,
0.1171788797,
-0.5752741694,
-0.0063193836,
-0.1082126871,
-0.125005275,
-0.1356116533,
0.1443482041,
0.0740422159,
-0.0532531478,
0.0989261568,
-0.4294728339,
-0.3662429452,
0.2560116649,
-0.1619792134,
0.1454372853,
0.0334509946,
0.1280633509,
-0.1160483211,
0.1385970712,
-0.3367099464,
-0.0441672467,
-0.2012764364,
0.0034374429,
0.1847909093,
-0.0656266883,
0.2171392888,
-0.1301319003,
0.2098069638,
0.1302860528,
-0.2614562213,
-0.2626340985,
-0.1669707596,
0.0882777199,
0.0241771117,
-0.3117093146,
0.0402812585,
0.0492566824,
-0.1221321896,
-0.2005802244,
0.2195033133,
0.1210735589,
-0.083846353,
0.1772986352,
0.0354856066,
-0.0519598275,
-0.2254253477,
0.0653544292,
0.0626639128,
0.205373466,
-0.0824998841,
0.15610075,
-0.1316598654,
0.0926043093,
-0.1257056147,
0.1367592067,
0.1169147044,
-0.0495662279,
0.3787105381,
-0.3153232634,
0.0670550019,
0.1791381687,
0.2130454183,
0.1259801239,
-0.2293982357,
-0.0212038867,
0.2414678782,
0.2713025212,
-0.2773506343,
-0.0588771552,
0.2508406341,
0.0628270432,
0.1473652869,
0.1828245521,
0.0025912637,
-0.1742157936,
0.2521598637,
0.3034750819,
0.3963967562,
-0.2181999832,
0.2311718762,
0.2707443237,
-0.0155018382,
0.0330313481,
0.4053876102,
0.1338233203,
0.3140208125,
0.6220415831,
-0.4703536332,
0.3776133657,
-0.138150081,
0.0500436723,
0.1782452017,
-0.2684495747,
0.0442482717,
-0.2581346035,
0.0374076925,
-0.1617573947,
0.0024643294,
0.2166943997,
-0.1458705217,
-0.1519913077,
-0.1860486865,
0.1483870298,
-0.167227149,
0.0655447692,
-0.0714027882,
-0.0695513338,
-0.105483219,
-0.1338015199,
0.0379430205,
-0.190281257,
0.3961416483,
0.1299105883,
-0.1748739183,
-0.548274219,
0.2178079784,
0.2818323672,
0.1062617525,
-0.1579884291,
0.3967570961,
0.3055476546,
-0.1000968814,
-0.2038764656,
0.5768453479,
0.5954797864,
0.2145644575,
0.1322197616,
0.0620219447,
-0.073001191,
-0.1752805114,
-0.0196335744,
0.2379042506,
-0.2017878741,
0.1163189188,
0.2152834088,
0.2604625225,
-0.2475313395,
-0.1703759432,
-0.076295279,
0.0688018575,
-0.3309392631,
0.4845588505,
-0.3293316364,
-0.259539932,
-0.0857399628,
-0.0874127597,
-0.4900284708,
0.031604711,
0.3719985187,
-0.0400501117,
0.016687328,
-0.3548586667,
0.1001645848,
-0.0864304826,
0.4342510998,
0.2829068601,
0.2116381824,
-0.1218907982,
-0.0893185139,
-0.3286599517,
0.2203587741,
0.0127801243,
-0.1638106853,
-0.0115683274,
0.0266690757,
-0.1778533459,
0.1253761202,
0.222632587,
0.1120704934,
0.2902598977,
0.016679436,
-0.3053414524,
-0.0752134994,
-0.1220302358,
-0.1132823676,
0.1427201778,
-0.402843833,
0.1064595804,
-0.1665898561,
0.0741798654,
-0.1052056178,
-0.0692192689,
0.2439991832,
-0.2990667224,
0.4611747563,
0.1164723411,
0.4591690898,
-0.1277641207,
-0.1874946654,
-0.2123903781,
-0.3932295442,
-0.2279269993,
0.1583047956,
0.0663981885,
0.3727277815,
-0.1284736991,
-0.3735390604,
-0.3333060741,
0.474134177,
-0.0150481639,
0.0468443334,
-0.2066664547,
0.3484679163,
-0.3783449233,
0.162539497,
0.0936463326,
0.1092469245,
-0.0426851176,
0.23578462,
-0.3180307746,
-0.5008897185,
0.4493025541,
-0.3432527184,
-0.2553569973,
-0.0851388723,
0.2158868015,
0.0658396482,
-0.3295117319,
-0.5746705532,
0.1020807922,
0.2760473788,
-0.1395709962,
-0.1272946298,
0.3145699799,
0.1119548008,
0.1150312424,
-0.0397334285,
0.5530535579,
0.0008198738,
-0.0703101903,
0.3039714396,
-0.033470802
] |
https://github.com/huggingface/datasets/issues/3095 | `cast_column` makes audio decoding fail | Thanks for reporting, @patrickvonplaten.
I think the issue is related to mp3 resampling, not to `cast_column`.
You can check that `cast_column` works OK with non-mp3 audio files:
```python
from datasets import load_dataset
import datasets
ds = load_dataset("arabic_speech_corpus", split="train")
ds = ds.cast_column("audio", datasets.features.Audio(sampling_rate=16_000))
print(ds[0]["audio"])
```
I'm fixing it. | ## Describe the bug
After changing the sampling rate automatic decoding fails.
## Steps to reproduce the bug
```python
from datasets import load_dataset
import datasets
ds = load_dataset("common_voice", "ab", split="train")
ds = ds.cast_column("audio", datasets.features.Audio(sampling_rate=16_000))
print(ds[0]["audio"]) # <- this fails currently
```
yields:
```
TypeError: forward() takes 2 positional arguments but 4 were given
```
## Expected results
no failure
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 1.13.2 (master)
- Platform: Linux-5.11.0-1019-aws-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 5.0.0
| 47 | `cast_column` makes audio decoding fail
## Describe the bug
After changing the sampling rate automatic decoding fails.
## Steps to reproduce the bug
```python
from datasets import load_dataset
import datasets
ds = load_dataset("common_voice", "ab", split="train")
ds = ds.cast_column("audio", datasets.features.Audio(sampling_rate=16_000))
print(ds[0]["audio"]) # <- this fails currently
```
yields:
```
TypeError: forward() takes 2 positional arguments but 4 were given
```
## Expected results
no failure
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 1.13.2 (master)
- Platform: Linux-5.11.0-1019-aws-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 5.0.0
Thanks for reporting, @patrickvonplaten.
I think the issue is related to mp3 resampling, not to `cast_column`.
You can check that `cast_column` works OK with non-mp3 audio files:
```python
from datasets import load_dataset
import datasets
ds = load_dataset("arabic_speech_corpus", split="train")
ds = ds.cast_column("audio", datasets.features.Audio(sampling_rate=16_000))
print(ds[0]["audio"])
```
I'm fixing it. | [
-0.3449611366,
0.0809736252,
0.0290255547,
-0.1023004204,
0.513559401,
-0.0765639544,
0.3012081981,
0.2489967644,
-0.1418651044,
0.1867393106,
-0.2701362669,
0.4867173135,
0.0446885265,
-0.1314160675,
-0.32100299,
-0.292571187,
0.1798269302,
0.0890951827,
-0.0834234208,
-0.0481001623,
-0.3176520765,
0.3060375452,
-0.3996778727,
-0.0373013914,
0.2222269326,
0.1928587556,
0.0543187559,
-0.3391492367,
-0.1822621226,
-0.1845768988,
-0.0594689772,
-0.0365386419,
0.2364243716,
0.4648661315,
-0.0001053388,
0.0007051734,
0.3777334094,
0.0462335721,
-0.2197374105,
-0.2072674036,
-0.2072707117,
0.0201443173,
-0.1976715624,
-0.1809172183,
-0.2524718344,
-0.1413535923,
-0.3287433386,
-0.169254601,
0.2775699794,
0.3828302026,
0.2956798077,
0.1690140665,
-0.1836947352,
0.0336885154,
0.2160952538,
-0.1325874925,
-0.2135980725,
0.0396200791,
0.1416810751,
0.3767258227,
-0.1270406246,
0.285900861,
-0.4151909649,
0.1047780663,
-0.0718419477,
-0.0087777963,
0.0776619986,
-0.1245742366,
0.377092272,
0.0604701713,
0.7983116508,
-0.3676589727,
-0.3543494642,
0.0489502959,
0.2948669195,
-0.2519977987,
0.0515814871,
0.136444658,
-0.0881377459,
0.2334895879,
-0.168719396,
0.2179820538,
0.1454937011,
0.0681414977,
-0.1564673036,
0.2573389411,
-0.1629471332,
0.0102947913,
0.2681016326,
-0.1576936096,
0.043258816,
0.0677658319,
-0.0937255844,
0.1866410673,
-0.5204974413,
-0.2621380389,
-0.0441938117,
-0.0268953852,
-0.1150505021,
0.1886433363,
0.1597749144,
0.3290558159,
0.2473385334,
0.1465433538,
0.0074543087,
-0.0795154274,
-0.1272972524,
0.3528893292,
0.2860917151,
0.2613305449,
0.0291945096,
-0.0776751116,
0.1012394875,
-0.2413482666,
-0.0478985757,
0.0262440983,
-0.1553741544,
-0.1953725368,
-0.2192506045,
0.0387128629,
-0.1295911521,
-0.0303755179,
0.022330327,
0.2687177062,
0.1659384221,
0.216454789,
0.098940894,
0.4155563116,
-0.1189424694,
-0.2073541731,
-0.0624061637,
0.0301009342,
-0.0109614953,
0.0484938473,
0.0069296388,
0.0690907985,
0.1390099972,
0.3160803616,
0.0519831367,
-0.1286739558,
-0.0369593278,
-0.0484341457,
-0.0944309086,
0.3246289194,
-0.0400443599,
0.3260271549,
-0.2159683257,
0.1436409354,
-0.0463805273,
0.3565737903,
-0.1808858812,
-0.1850041747,
-0.0759027898,
0.2142335027,
0.0676716641,
-0.0897407159,
0.0325523838,
0.2903161943,
0.3790347576,
-0.5632773638,
0.0779880136,
-0.250846684,
-0.3133438528,
-0.0325338952,
0.2222625911,
-0.0758939236,
-0.1201799586,
0.018271381,
-0.2794311941,
0.2765015066,
0.4511859119,
0.3418484032,
-0.1031689942,
-0.2812898755,
-0.0589829572,
0.311882019,
0.4476525187,
-0.1174023077,
-0.3510473669,
0.2269933522,
0.2499116957,
-0.0513920151,
0.0173277818,
-0.1631332934,
0.2610940933,
-0.2571054101,
-0.1215981692,
0.5106364489,
0.1183717474,
0.210549444,
-0.1357176751,
-0.1571893543,
0.0917714685,
0.1592174619,
-0.1492058188,
0.167178452,
-0.0031397415,
0.1503481865,
0.1406586468,
-0.239748016,
-0.0223081056,
0.1785106659,
0.0318158753,
-0.3498950303,
0.2548888028,
-0.3011933267,
0.180547595,
0.0061925026,
0.2778678834,
0.1910153329,
-0.1984939575,
-0.2170056254,
-0.2080300599,
-0.2124697566,
-0.0244749375,
0.2528623044,
0.1450857073,
-0.0667069629,
0.005018896,
0.0023656895,
-0.1229431927,
-0.2412704825,
-0.1593764424,
-0.0379570983,
-0.1818116754,
0.1207715645,
0.0019270603,
-0.2949460745,
0.1429748982,
0.133398816,
0.2182688713,
0.1969207972,
-0.3609715104,
0.4032327235,
0.0128290327,
0.4149239659,
-0.6723425388,
0.0519546121,
0.1092595309,
-0.1187672839,
0.1229801923,
0.0888601542,
0.2584674656,
-0.0345961824,
0.1990092695,
0.2430264503,
0.1889055371,
0.1710929126,
0.0103076175,
-0.177174598,
0.3711969554,
0.0265532807,
-0.2208572477,
-0.0791861415,
0.0186765417,
-0.1220433488,
0.0332033113,
-0.0126940841,
-0.2701609433,
0.047189381,
0.5708184242,
-0.2198930234,
0.1009100676,
0.1899841428,
-0.1792981625,
-0.2092711776,
0.1678675562,
0.2484966218,
0.4910352826,
0.1546022743,
0.3089248836,
-0.0988950878,
-0.1900452673,
-0.2730259001,
0.2405869663,
0.1305105388,
-0.1630520076,
0.323859036,
0.1208309829,
-0.115757294,
-0.4485519826,
-0.1555053741,
0.188626036,
0.273432076,
-0.3962471187,
-0.0017578108,
-0.3865877092,
-0.0219331924,
-0.0628552809,
-0.2412040085,
0.1635365635,
-0.1281116009,
0.0197747927,
0.4063360095,
-0.3343636394,
0.2971400321,
-0.048579134,
-0.0473759621,
-0.0128936283,
0.037665125,
-0.2636218667,
0.0251876265,
-0.0557891689,
0.1422660649,
0.1981193572,
0.0936661139,
-0.0569623969,
0.0019343382,
-0.127277717,
-0.0272118952,
-0.0867734328,
-0.0322960988,
-0.197864309,
0.0632016733,
-0.139214918,
0.0124865174,
-0.1418849826,
-0.2218722403,
0.2023814917,
-0.0425731279,
0.0687744245,
0.3913084567,
-0.0025127006,
-0.0755853429,
-0.3350451589,
-0.2484965622,
-0.0712956935,
-0.458555311,
-0.2902999222,
-0.181440711,
-0.073213324,
-0.2245925218,
0.2778568566,
-0.0836514905,
0.0960082486,
0.2552134693,
-0.4077553749,
-0.1043933108,
0.4614211619,
-0.1774925739,
-0.2846853435,
-0.2384540737,
0.1728080064,
0.2652582824,
0.0886557698,
-0.1405787915,
0.2162234634,
-0.3612727225,
-0.0677033737,
-0.0640316904,
0.2609567046,
0.0717424154,
0.0576569736,
-0.0637434646,
-0.0079239188,
-0.0222727582,
-0.2573254704,
0.3364308178,
0.2316389233,
0.0983350649,
0.3216471076,
-0.025710905,
0.1738761812,
0.1444304436,
-0.2387275696,
0.3019503355,
-0.1285700798,
0.0388517976,
-0.2165509909,
0.0186565444,
0.0900131091,
-0.0366595164,
-0.1019980758,
0.1373493224,
0.1412435025,
-0.4428451359,
-0.0871981904,
0.0043572127,
-0.1342003644,
-0.3323358297,
0.1371085048,
-0.1129840389,
-0.015595519,
-0.0327015333,
0.2900099456,
0.1150177866,
-0.0483964086,
0.1578199416,
-0.2173033953,
0.0219291039,
-0.2740184665,
0.0104174772,
-0.346957922,
-0.4012242556,
0.1884356886,
0.1245295554,
0.4507123232,
0.0434169546,
0.0737625808,
0.250428319,
-0.0282824729,
0.1718135327,
-0.4908642471,
-0.0765124485,
0.0401189066,
0.5349573493,
-0.1968046278,
0.0385012366,
-0.3035593331,
-0.4006538689,
-0.1384836435,
0.1265206635,
-0.2950762808,
0.0932630226,
0.1601194441,
0.3645254076,
0.1742448211,
-0.1996074468,
-0.2656050324,
-0.5811826587,
-0.2639560997,
-0.0049311747,
0.3225468993,
0.0660554618,
-0.1411359757,
-0.1051898599,
0.3799627125,
-0.2156893313,
0.1067828834,
0.1165994033,
0.2068039775,
-0.0292545147,
0.2255942076,
-0.2200434208,
-0.4626433551,
-0.0073714973,
0.6588696241,
0.1443073452,
-0.1284888983,
0.023397848,
-0.0892737731,
0.1750264168,
0.1880951226,
0.0083801141,
0.320754081,
-0.1034182981,
0.1500526667,
-0.0950755551,
-0.5230970979,
0.4843647778,
0.26780653,
-0.0381843112,
-0.5232009292,
0.6288084388,
-0.1254828125,
-0.0718675852,
0.1339985728,
0.1717624068,
0.0021651492,
0.7221035957,
-0.1854235828,
0.9377894402,
0.2807384729,
-0.1337746382,
0.333954215,
-0.2619727254,
0.2141429484,
-0.0727880523,
0.1282907277,
-0.0569164976,
0.0002390836,
-0.0291998424,
0.1720616519,
0.2660656571,
0.0602073073,
-0.409935981,
-0.0080066109,
-0.1769413203,
-0.1374891847,
-0.021433631,
-0.0062834723,
-0.3993663788,
-0.3046313226,
-0.3688855469,
0.1881294996,
0.0217226855,
-0.1667662561,
0.3652958274,
0.0358869992,
0.0685735941,
-0.1739518046,
-0.3900656998,
0.206625253,
0.2769729793,
0.0025533875,
-0.1317223161,
-0.1854591817,
0.4574620724,
0.0132636717,
0.0764797851,
0.2593468726,
-0.1553443372,
0.211139828,
-0.0468910895,
0.4221689999,
0.1828568131,
0.0140746804,
0.2082639635,
-0.025844425,
-0.5041332841,
0.0615150407,
0.1297393292,
0.0135882236,
0.1127674878,
-0.2121029347,
0.0926687568,
-0.3573864102,
-0.2954503894,
0.0655771866,
0.0657478645,
-0.1899480373,
0.2244685143,
-0.242171824,
-0.4022819698,
0.5309266448,
-0.223790884,
-0.1637741774,
-0.1113952398,
0.6197935343,
0.1249015406,
0.1902049035,
0.2617749274,
0.0966472775,
-0.3156905174,
-0.1330594718,
-0.14293845,
-0.0424147882,
-0.417131424,
0.0020701338,
-0.0344028622,
-0.0695727766,
0.0405031182,
-0.0459009483,
-0.2380208969,
-0.0374952182,
-0.3067385852,
-0.1928160191,
-0.0445537269,
0.0357940942,
0.3289107978,
0.0335537642,
-0.0283369273,
0.0135559225,
-0.0427687205,
-0.0623667836,
-0.3780674338,
0.0392113402,
-0.0575633235,
0.325846225,
-0.0296329278,
-0.044800926,
-0.0689324588,
-0.0141739668,
0.250536859,
0.4176131487,
-0.0040540751,
-0.2107245475,
-0.1404362023,
0.1122147888,
0.1677444875,
0.0669246316,
-0.0832223818,
-0.2251135856,
-0.3945370317,
-0.3003676236,
0.2066991627,
0.2396045327,
-0.0370997973,
0.2211792022,
-0.0179273896,
0.0200388152,
0.089313589,
-0.0053784861,
-0.2428996116,
-0.167378813,
0.038940534,
0.227273643,
0.1442792267,
-0.0458787009,
-0.2642855942,
0.0686592236,
-0.1579900533,
-0.12697047,
0.5415115952,
0.0099091036,
0.3043508232,
-0.029875055,
0.4900064766,
0.2084812075,
-0.0080870017,
-0.495452702,
0.3151063025,
0.2519675493,
-0.3676252067,
-0.3307368457,
-0.3206540644,
-0.0141298082,
0.1823500693,
0.0366728008,
-0.0385424085,
-0.306106627,
0.0305290651,
-0.1462572217,
0.5706654787,
-0.2435121983,
-0.0444635674,
0.5043251514,
0.0803625211,
0.162788406,
0.1658814996,
-0.2157594413,
0.0983442143,
0.455232501,
-0.5120780468,
0.2507120073,
0.3413258493,
0.0869844109,
-0.0975916386,
-0.3559681177,
0.2778969109,
0.2822880447,
-0.0665331632,
0.1663734913,
0.3184815943,
0.0510742106,
-0.2478723973,
-0.0037382785,
-0.1177478135,
0.2348675281,
-0.1477551013,
-0.1170646474,
-0.2329424471,
-0.0022437933,
-0.2658644617,
-0.1059418172,
-0.0249256454,
0.3048864901,
0.4275311232,
0.050805293,
0.2132743001,
-0.1334729642,
-0.3205430508,
-0.2906436622,
0.3007610142,
-0.2405432165,
0.1900669485,
0.2480677664,
-0.0991672575,
0.4668041766,
-0.0957142189,
0.532315731,
0.0113157462,
0.0843929872,
0.1339948922,
-0.1821300089,
-0.1143800914,
0.1376342475,
0.4011213183,
0.244895786,
0.4066803455,
0.1468574256,
0.1804822683,
-0.2926576734,
-0.0565306321,
0.0797795206,
0.2930423915,
-0.217269063,
0.490367651,
-0.2412289977,
-0.2403038293,
-0.1936189383,
-0.3030838072,
-0.2902312577,
0.0127108637,
0.0610631183,
-0.4218993485,
0.0786809847,
-0.1392123699,
0.1230406687,
0.0492879823,
0.1970861554,
0.3116460443,
-0.3517548442,
-0.0165641736,
-0.0476225242,
-0.3984198272,
0.0879668966,
0.1728312522,
0.0380037241,
0.0100382231,
0.0361141786,
0.1346459836,
0.117770955,
0.0599402264,
0.111398302,
-0.1231960133,
0.3550777435,
0.0276152529,
-0.0462788641,
-0.2855262756,
0.0728008002,
-0.3168506622,
-0.3583407998,
0.2403253913,
-0.1600873023,
0.1467397064,
-0.1202984154,
-0.1648276895,
0.0391712785,
-0.1724978238,
0.1561756581,
0.1193583682,
0.3472028971,
-0.4518640935,
0.1611222476,
-0.1315285712,
-0.0307757109,
-0.0618027151,
0.0143848136,
-0.1488986015,
0.5032874942,
0.101272732,
0.2719761133,
-0.2011985183,
0.1425369531,
-0.107091397,
0.0435152724,
-0.3044504225,
0.2770904601,
-0.14447245,
0.1079699397,
-0.1385334879,
-0.0148879774,
0.2373876423,
0.2520566881,
-0.272149384,
-0.44252038,
0.52163589,
-0.2377031893,
-0.2862272263,
-0.0220056996,
0.2772179842,
-0.0971653834,
-0.0185719728,
-0.7178654671,
0.099598974,
0.0371817276,
0.0392908789,
-0.0447697192,
0.3363783956,
0.0702351257,
0.0759209171,
-0.1929600686,
0.3443697393,
0.1854577065,
-0.1291359067,
0.1183145866,
-0.289427042
] |
https://github.com/huggingface/datasets/issues/3093 | Error loading json dataset with multiple splits if keys in nested dicts have a different order | Hi,
even Pandas, which is less strict compared to PyArrow when it comes to reading JSON, doesn't support different orderings:
```python
import io
import pandas as pd
s = """
{"a": {"c": 8, "b": 5}}
{"a": {"b": 7, "c": 6}}
"""
buffer = io.StringIO(s)
df = pd.read_json(buffer, lines=True)
print(df.shape[0]) # 0
```
So we can't even fall back to Pandas in such cases.
It seems the only option is a script that recursively re-orders fields to enforce deterministic order:
```python
with open("train.json", "r") as fin:
with open("train_reordered.json", "w") as fout:
for line in fin:
obj_jsonl = json.loads(line.strip())
fout.write(json.dumps(obj_jsonl, sort_keys=True) + "\n")
``` | ## Describe the bug
Loading a json dataset with multiple splits that have nested dicts with keys in different order results in the error below.
If the keys in the nested dicts always have the same order or even if you just load a single split in which the nested dicts don't have the same order, everything works fine.
## Steps to reproduce the bug
Create two json files:
train.json
```
{"a": {"c": 8, "b": 5}}
{"a": {"b": 7, "c": 6}}
```
test.json
```
{"a": {"b": 1, "c": 2}}
{"a": {"b": 3, "c": 4}}
```
```python
from datasets import load_dataset
# Loading the files individually works (even though the keys in train.json don't have the same order)
load_dataset('json', data_files={"test": "test.json"})
load_dataset('json', data_files={"train": "train.json"})
# Loading both splits fails
load_dataset('json', data_files={"train": "train.json", "test": "test.json"})
```
## Expected results
Loading both splits should not give an error whether the nested dicts are have the same order or not.
## Actual results
```
>>> load_dataset('json', data_files={"train": "train.json", "test": "test.json"})
Using custom data configuration default-f1bc76fd07398c4c
Downloading and preparing dataset json/default to /home/dthulke/.cache/huggingface/datasets/json/default-f1bc76fd07398c4c/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426...
100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 2/2 [00:00<00:00, 8839.42it/s]
100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 2/2 [00:00<00:00, 477.82it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/datasets/load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/datasets/builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/datasets/builder.py", line 697, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/datasets/builder.py", line 1159, in _prepare_split
writer.write_table(table)
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/datasets/arrow_writer.py", line 428, in write_table
pa_table = pa.Table.from_arrays([pa_table[name] for name in self._schema.names], schema=self._schema)
File "pyarrow/table.pxi", line 1596, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 592, in pyarrow.lib._sanitize_arrays
File "pyarrow/array.pxi", line 329, in pyarrow.lib.asarray
File "pyarrow/table.pxi", line 277, in pyarrow.lib.ChunkedArray.cast
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/pyarrow/compute.py", line 297, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 527, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 337, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 120, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unsupported cast from struct<b: int64, c: int64> to struct using function cast_struct
```
## Environment info
- `datasets` version: 1.13.2
- Platform: Linux-4.15.0-147-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 5.0.0
| 102 | Error loading json dataset with multiple splits if keys in nested dicts have a different order
## Describe the bug
Loading a json dataset with multiple splits that have nested dicts with keys in different order results in the error below.
If the keys in the nested dicts always have the same order or even if you just load a single split in which the nested dicts don't have the same order, everything works fine.
## Steps to reproduce the bug
Create two json files:
train.json
```
{"a": {"c": 8, "b": 5}}
{"a": {"b": 7, "c": 6}}
```
test.json
```
{"a": {"b": 1, "c": 2}}
{"a": {"b": 3, "c": 4}}
```
```python
from datasets import load_dataset
# Loading the files individually works (even though the keys in train.json don't have the same order)
load_dataset('json', data_files={"test": "test.json"})
load_dataset('json', data_files={"train": "train.json"})
# Loading both splits fails
load_dataset('json', data_files={"train": "train.json", "test": "test.json"})
```
## Expected results
Loading both splits should not give an error whether the nested dicts are have the same order or not.
## Actual results
```
>>> load_dataset('json', data_files={"train": "train.json", "test": "test.json"})
Using custom data configuration default-f1bc76fd07398c4c
Downloading and preparing dataset json/default to /home/dthulke/.cache/huggingface/datasets/json/default-f1bc76fd07398c4c/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426...
100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 2/2 [00:00<00:00, 8839.42it/s]
100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 2/2 [00:00<00:00, 477.82it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/datasets/load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/datasets/builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/datasets/builder.py", line 697, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/datasets/builder.py", line 1159, in _prepare_split
writer.write_table(table)
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/datasets/arrow_writer.py", line 428, in write_table
pa_table = pa.Table.from_arrays([pa_table[name] for name in self._schema.names], schema=self._schema)
File "pyarrow/table.pxi", line 1596, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 592, in pyarrow.lib._sanitize_arrays
File "pyarrow/array.pxi", line 329, in pyarrow.lib.asarray
File "pyarrow/table.pxi", line 277, in pyarrow.lib.ChunkedArray.cast
File "/home/dthulke/venvs/venv_torch_transformers/lib/python3.6/site-packages/pyarrow/compute.py", line 297, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 527, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 337, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 120, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unsupported cast from struct<b: int64, c: int64> to struct using function cast_struct
```
## Environment info
- `datasets` version: 1.13.2
- Platform: Linux-4.15.0-147-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 5.0.0
Hi,
even Pandas, which is less strict compared to PyArrow when it comes to reading JSON, doesn't support different orderings:
```python
import io
import pandas as pd
s = """
{"a": {"c": 8, "b": 5}}
{"a": {"b": 7, "c": 6}}
"""
buffer = io.StringIO(s)
df = pd.read_json(buffer, lines=True)
print(df.shape[0]) # 0
```
So we can't even fall back to Pandas in such cases.
It seems the only option is a script that recursively re-orders fields to enforce deterministic order:
```python
with open("train.json", "r") as fin:
with open("train_reordered.json", "w") as fout:
for line in fin:
obj_jsonl = json.loads(line.strip())
fout.write(json.dumps(obj_jsonl, sort_keys=True) + "\n")
``` | [
0.0832343027,
-0.2473295927,
-0.0849277079,
0.4981232584,
-0.034176562,
0.0925235674,
0.4738396704,
0.2425033897,
0.4540650845,
-0.0762436315,
0.0957988128,
0.3503094018,
-0.0273534022,
0.1923106313,
-0.4392800927,
-0.3062129915,
0.1353116632,
0.0029305192,
0.2856116295,
0.2145691514,
-0.2677589059,
0.4219859838,
-0.25065732,
-0.0870388374,
-0.1292537451,
-0.1254861802,
-0.2167168856,
0.3957201838,
0.1152152792,
-0.4368100464,
0.3336632252,
0.148052454,
-0.1053344309,
0.3599999547,
-0.0001107044,
0.1831236035,
0.3657304049,
-0.0645588562,
-0.096833013,
-0.4886762798,
-0.3687758446,
-0.1478071064,
0.0328077003,
-0.2557143271,
-0.0578950606,
-0.1994663775,
-0.3122706413,
-0.4717563391,
0.8244410157,
0.0067786486,
0.1945835203,
-0.098012194,
0.0316923708,
-0.1428999007,
0.158169046,
0.1960923672,
0.1081519499,
0.155510813,
0.0031481998,
0.0758978054,
0.0521508902,
0.0470546894,
-0.0809780061,
0.2331054807,
-0.0050104749,
-0.0258184876,
0.0009369085,
-0.0631743222,
-0.1879123598,
0.3248146772,
0.3290959895,
-0.059683241,
-0.2868613005,
-0.5015627742,
0.0747118294,
-0.1104730144,
0.4031124413,
0.1024430394,
0.0294000655,
0.0785640851,
0.0645571649,
0.0587737784,
-0.0242206398,
0.030564243,
-0.0450765081,
0.0913377106,
-0.0512975752,
0.0944296643,
0.0445447713,
-0.2445055097,
0.0770111382,
-0.2397477627,
-0.2185720652,
-0.044978179,
-0.4027817845,
-0.0959676877,
-0.0221836735,
-0.3604854643,
0.0712329745,
0.2007467151,
0.0229707081,
-0.1043821201,
-0.0430624075,
0.0403810479,
0.6374559402,
0.0440494493,
-0.0302745495,
0.2815840542,
-0.0140825668,
0.4600858688,
-0.1894747913,
0.0386915952,
0.1659074575,
-0.2601967752,
-0.2329404652,
0.2749163508,
0.256305784,
-0.0129238619,
-0.3903874755,
-0.0083093848,
-0.379602164,
-0.1985426247,
0.1165085733,
0.2785374522,
0.1416194588,
0.331674099,
0.0210311338,
0.3642392159,
-0.0714406148,
0.1461277902,
-0.1550711095,
0.0217334293,
0.0350733101,
0.0234130304,
0.2252338082,
0.1573016942,
0.1591327786,
0.4804238677,
-0.0634091869,
-0.4145119786,
0.0372618698,
0.0220869724,
-0.185553804,
0.1593748033,
0.0625566691,
0.2160949409,
0.1256245673,
-0.1515459567,
-0.2374011278,
0.0220390763,
-0.4572147131,
-0.3092395663,
0.244209528,
0.2159642875,
-0.3086923361,
0.0167248473,
-0.5496592522,
0.2075622082,
0.2142507285,
-0.240901202,
-0.171631068,
-0.1412638277,
-0.2096137255,
-0.1820506454,
-0.032732185,
0.4727681577,
-0.2295393795,
-0.0511632077,
-0.4683586955,
-0.1293667853,
0.1181913391,
0.2323841453,
-0.1847353578,
0.175809592,
-0.3658022285,
0.4606000185,
-0.0540026166,
-0.3485623598,
-0.3616455495,
0.3621633351,
-0.0652220473,
0.3823273778,
0.1218418106,
-0.151488021,
0.2859786153,
-0.149778828,
0.10103181,
0.4230578542,
0.0862270892,
0.0726967603,
-0.1191033423,
-0.0560386404,
0.1950557232,
0.2336262912,
-0.372307092,
-0.2367300987,
-0.0159124043,
0.3431082666,
0.1683059484,
-0.0232570842,
-0.2583095133,
0.2677448392,
-0.0854806751,
0.0703555867,
0.1019482911,
-0.0994762182,
-0.6694179773,
0.3769907951,
-0.1641759872,
-0.2352905869,
-0.3481819928,
0.0272319652,
-0.2266201526,
-0.0394870788,
-0.5185477734,
0.0311724152,
0.1730408818,
0.1743472368,
-0.0501689352,
0.0340896808,
-0.0813141614,
0.0858602747,
0.1826338321,
0.0082552712,
-0.1941962838,
0.5570825934,
-0.0527561195,
0.1363333911,
0.1679028571,
0.1956675798,
0.2212679833,
-0.2614815235,
-0.0615088008,
0.3136240542,
0.4257161617,
-0.0116566205,
-0.272439599,
-0.4078132808,
0.2277289182,
-0.165547058,
-0.2152310014,
0.3736805618,
-0.0872405842,
-0.283061713,
-0.257450074,
0.5876536369,
-0.2200131714,
0.3982828557,
-0.1646180153,
-0.1117782742,
0.1969647557,
-0.0924869552,
0.0333526433,
-0.4297274649,
0.081936717,
0.003824725,
-0.044548288,
-0.1404554248,
-0.0764199123,
0.0134654511,
0.438498646,
0.077334404,
0.0010498837,
-0.1247931048,
0.2947216928,
-0.0813307762,
-0.0340290926,
0.493798852,
0.5339329839,
0.1765297502,
-0.2302030474,
-0.0351964571,
0.137659505,
-0.108190082,
0.1377430707,
-0.0493507683,
0.2462353408,
0.5046728849,
0.17115812,
-0.0443526544,
-0.2507884502,
-0.3934266567,
0.2088361531,
0.0583241247,
-0.3603426218,
0.1051313579,
-0.405179888,
0.0068078991,
-0.1658841372,
-0.1507854015,
-0.216314733,
-0.3028440773,
0.1574073732,
0.0236645136,
-0.3122570217,
0.0966825709,
0.2349249721,
0.0928786695,
0.0630638078,
-0.1791822165,
-0.2357360572,
-0.0773362964,
-0.0822453052,
0.0423692837,
0.4529549479,
0.0320167504,
0.1023061201,
-0.0800493807,
-0.4902331829,
0.1398570538,
-0.0170761123,
-0.0797474682,
-0.2178430855,
0.1513770223,
0.3310344219,
0.1548569798,
0.1933784932,
-0.3647662103,
0.2399512082,
0.3468097746,
-0.3739334345,
0.288028717,
0.1934473515,
0.177377671,
-0.1737245321,
-0.4609979689,
-0.1343503147,
-0.3501882255,
0.3151542246,
-0.0047269533,
0.0720180273,
-0.2132380009,
-0.1429643482,
-0.1715981811,
0.1552696675,
-0.0661985651,
-0.223002702,
-0.045754116,
-0.0175130423,
-0.1394258142,
-0.0874986798,
0.0254847929,
0.0036789258,
-0.0350360386,
-0.3163465261,
-0.5239713788,
0.0931534842,
-0.006650086,
0.1555082202,
-0.1819785088,
-0.2520925701,
0.1233974919,
0.1503538787,
0.0064760041,
-0.2298498303,
-0.044447273,
0.1513224691,
-0.0909061953,
0.1023092419,
-0.0785667524,
0.4628232718,
0.0011935299,
0.5358223915,
0.4185204506,
0.1086597443,
0.2101682276,
0.0492571816,
0.0273923408,
-0.0896056443,
-0.2067691684,
-0.2643718719,
-0.0380932428,
0.0822481364,
0.1894924343,
-0.0055367406,
-0.0674552321,
-0.1735717952,
-0.0116483746,
-0.0633424297,
-0.2193231583,
-0.0775926337,
-0.4430841804,
-0.0388225727,
-0.160812065,
0.0829516947,
0.1284380853,
0.1072487459,
-0.1617882401,
0.0566352867,
-0.0005251488,
-0.0016058341,
-0.3565875888,
-0.0821535438,
0.0953383073,
0.2124468833,
0.1135590002,
0.2763921916,
0.0667415708,
0.1379367858,
0.1489598304,
-0.2523010075,
0.602852881,
-0.1932878494,
0.3257780075,
0.3007761836,
-0.0660041347,
-0.3900153637,
-0.2371716797,
-0.1267696768,
0.2838714719,
0.2186238617,
0.785281837,
-0.5614432693,
-0.0841043741,
-0.0504059456,
0.0911282152,
-0.0716357902,
-0.5833187699,
-0.2787849307,
-0.1784607172,
-0.2650775313,
0.1441676617,
0.0935576856,
0.3499445617,
-0.3066650629,
-0.1748070717,
-0.0300030839,
-0.2736281455,
-0.141158998,
0.1091108993,
0.3373881876,
-0.1611368209,
0.2780069709,
0.3615297973,
0.0416710973,
0.2388508767,
0.882075727,
0.0454797,
-0.2613649368,
-0.1383937746,
0.2038272917,
-0.503009975,
0.1389887035,
0.0502632409,
0.0893345177,
0.1653635204,
-0.0583045222,
-0.0522861741,
-0.2891446352,
0.2378226221,
-0.1639744788,
-0.3407503068,
-0.2940075696,
0.6064572334,
-0.0226344354,
-0.0295414478,
0.1467170119,
0.044925116,
-0.322432965,
0.4953714013,
-0.072924085,
0.4631955922,
0.026479017,
-0.0334036574,
0.3299503326,
-0.168042019,
0.4558391571,
-0.2075621039,
0.1293429434,
-0.3115263581,
0.0839883387,
0.0418752767,
-0.214335531,
-0.1441056579,
0.3716036677,
-0.268520087,
0.0694849789,
-0.2411417812,
0.046368964,
-0.2951041162,
0.2473325282,
-0.0886672065,
0.0475821532,
-0.2651474774,
0.0958331451,
-0.0035905361,
0.0743404403,
-0.0705458075,
-0.0598920025,
0.0737478435,
-0.3111103177,
-0.4557242692,
0.2277091146,
0.0095820883,
0.466244787,
-0.0031392223,
0.0344458409,
0.3897215128,
0.2587327659,
-0.0071090683,
-0.0942041725,
-0.0684354752,
0.0956607014,
0.0016048991,
-0.0415058248,
-0.1512778699,
-0.0681985319,
0.1839129776,
0.0228865221,
-0.2398504913,
-0.2425127178,
-0.1564616561,
-0.2355315983,
-0.2727797031,
0.5861778259,
-0.3018541932,
-0.2944975197,
-0.1710328907,
0.1038603857,
0.2467043996,
-0.2689691782,
0.1450017095,
-0.0591731332,
-0.1025326476,
0.2245960534,
-0.3180137873,
-0.1773281097,
0.0660369843,
0.3332892954,
0.1701707244,
0.1646182984,
0.5772335529,
0.122898981,
-0.0224606395,
-0.2768228054,
0.1936921626,
0.1849790215,
-0.3119598925,
0.5144221783,
-0.2644920051,
0.1386704594,
0.1613535732,
0.1935583949,
0.2455048561,
0.1164182872,
0.2688546181,
-0.5453776717,
0.1482950002,
0.2438456863,
-0.2230311632,
0.1315697581,
-0.0350904241,
0.177852124,
-0.2592961192,
0.1624927074,
-0.2562701702,
0.2730023563,
-0.3050966859,
-0.0476330221,
-0.015577741,
-0.0611393489,
0.0108436067,
0.0727553666,
0.1922530532,
-0.034208443,
-0.1024408117,
-0.1745221466,
-0.0740835518,
0.0926947072,
0.0973712206,
0.2514200211,
-0.0674768388,
-0.3089334667,
-0.0187127292,
0.0379658639,
0.1271450222,
0.1745436639,
-0.0895201042,
0.1980790049,
0.245493114,
0.093194887,
-0.1849974096,
0.2764625549,
-0.1680683941,
0.0519108474,
-0.1258642077,
0.3200769722,
-0.0652420521,
0.0972947478,
-0.3384322822,
0.1004233956,
0.009985487,
0.2176926285,
0.2593015432,
-0.3651326299,
0.0788611472,
0.1090361401,
0.412735194,
0.4329190254,
-0.3033315837,
0.0693826154,
-0.0993736386,
0.2018698603,
-0.2136097848,
-0.1663316935,
0.2575342059,
0.1817404628,
-0.1537035704,
0.1239546388,
0.1703189909,
-0.1532163024,
-0.2365147769,
0.1565648466,
0.3527797461,
0.1232157871,
0.5848326087,
0.523522377,
-0.1783076972,
-0.0474014729,
0.1201786846,
-0.1359450519,
0.2796217203,
0.5566800237,
-0.0075116218,
0.1761375219,
0.0767857656,
0.0513747707,
0.0362366363,
-0.3583057225,
0.245294854,
0.0266148727,
0.1192155704,
0.0003270641,
0.206269592,
0.2282191366,
-0.4424985349,
-0.0972006693,
-0.2339061648,
0.1367390454,
-0.0731027648,
-0.1559161544,
-0.1127111241,
-0.1454334259,
-0.1874591708,
-0.0547316149,
-0.1728257984,
0.0707002282,
0.1985930502,
0.1591871232,
-0.0734633729,
-0.4307997525,
0.1081348732,
0.1805432737,
0.2436687499,
-0.3637180924,
0.264023155,
0.5496520996,
-0.2742041051,
0.4609459043,
-0.1114060953,
0.4535391033,
0.1973983049,
-0.2296889722,
-0.1775598377,
-0.0930124968,
-0.0055616871,
0.0318570063,
0.2410471141,
-0.0659413114,
-0.0789948106,
0.4252338707,
0.1213199198,
-0.1088975817,
0.0920462683,
0.4179436564,
0.3684535027,
-0.1905822754,
0.3106911182,
-0.5392755866,
0.177697897,
0.1278743893,
0.1143940985,
-0.2202973813,
-0.3543101847,
-0.0925468951,
0.2085892856,
0.1565031558,
-0.0052022468,
0.11343465,
-0.0709859505,
0.4630477726,
0.2073767334,
-0.1145180389,
-0.0940385237,
-0.0732693747,
-0.4962472022,
-0.0455363169,
-0.2325512767,
-0.1011290327,
0.141191557,
0.2021273226,
-0.074813433,
0.0180740468,
0.1211779192,
0.0624703206,
-0.0490867794,
0.2912166715,
-0.4271155298,
-0.1976181716,
0.235148564,
-0.1136174574,
-0.006784304,
-0.3402985334,
0.0039093932,
0.1284385622,
-0.0113175306,
-0.0601351485,
-0.0138372099,
0.032900665,
-0.2741902471,
0.0015022018,
0.3242987692,
0.3340375125,
0.0378990918,
-0.1689075977,
-0.248075664,
-0.4225228429,
-0.2817662954,
0.3604900539,
0.1721899658,
0.6015703678,
-0.1757930368,
-0.0003663395,
-0.2197629809,
-0.1243992671,
-0.1655262262,
0.0000664946,
-0.5134999752,
0.1022179201,
-0.089658536,
0.2234486341,
0.0546937883,
0.2985226512,
-0.1080620661,
0.2790491879,
-0.1165621728,
-0.4146386385,
0.4169105589,
-0.1722204685,
-0.1656425893,
0.1292588264,
0.289573729,
-0.0891489238,
0.1079680175,
-0.1135691851,
0.0680133775,
0.4673823714,
-0.0381071121,
-0.1883934736,
0.0434524678,
0.0533330776,
-0.2061480135,
-0.015528054,
-0.0006504463,
0.1910151839,
-0.2232696712,
0.2918289006,
-0.1646351665
] |
https://github.com/huggingface/datasets/issues/3091 | `blog_authorship_corpus` is broken | Hi @fdtomasi, thanks for reporting.
You are right: the original host data URL does no longer exist.
I've contacted the authors of the dataset to ask them if they host this dataset in another URL. | ## Describe the bug
The dataset `blog_authorship_corpus` is broken.
By bypassing the checksum checks, the loading does not return any error but the resulting dataset is empty.
I suspect it is because the data download url is broken (http://www.cs.biu.ac.il/~koppel/blogs/blogs.zip).
## Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset("blog_authorship_corpus", split="train", download_mode='force_redownload')
```
## Expected results
No error.
## Actual results
```
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
/tmp/ipykernel_5237/1729238701.py in <module>
2 ds = load_dataset(
3 "blog_authorship_corpus", split="train",
----> 4 download_mode='force_redownload'
5 )
/opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs)
1115 ignore_verifications=ignore_verifications,
1116 try_from_hf_gcs=try_from_hf_gcs,
-> 1117 use_auth_token=use_auth_token,
1118 )
1119
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
635 if not downloaded_from_gcs:
636 self._download_and_prepare(
--> 637 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
638 )
639 # Sync info
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
707 if verify_infos:
708 verify_checksums(
--> 709 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files"
710 )
711
/opt/conda/lib/python3.7/site-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
38 if len(bad_urls) > 0:
39 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 40 raise NonMatchingChecksumError(error_msg + str(bad_urls))
41 logger.info("All the checksums matched successfully" + for_verification_name)
42
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['http://www.cs.biu.ac.il/~koppel/blogs/blogs.zip']
```
## Environment info
- `datasets` version: 1.13.2
- Platform: Linux-4.19.0-18-cloud-amd64-x86_64-with-debian-10.11
- Python version: 3.7.10
- PyArrow version: 5.0.0 | 35 | `blog_authorship_corpus` is broken
## Describe the bug
The dataset `blog_authorship_corpus` is broken.
By bypassing the checksum checks, the loading does not return any error but the resulting dataset is empty.
I suspect it is because the data download url is broken (http://www.cs.biu.ac.il/~koppel/blogs/blogs.zip).
## Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset("blog_authorship_corpus", split="train", download_mode='force_redownload')
```
## Expected results
No error.
## Actual results
```
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
/tmp/ipykernel_5237/1729238701.py in <module>
2 ds = load_dataset(
3 "blog_authorship_corpus", split="train",
----> 4 download_mode='force_redownload'
5 )
/opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs)
1115 ignore_verifications=ignore_verifications,
1116 try_from_hf_gcs=try_from_hf_gcs,
-> 1117 use_auth_token=use_auth_token,
1118 )
1119
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
635 if not downloaded_from_gcs:
636 self._download_and_prepare(
--> 637 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
638 )
639 # Sync info
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
707 if verify_infos:
708 verify_checksums(
--> 709 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files"
710 )
711
/opt/conda/lib/python3.7/site-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
38 if len(bad_urls) > 0:
39 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 40 raise NonMatchingChecksumError(error_msg + str(bad_urls))
41 logger.info("All the checksums matched successfully" + for_verification_name)
42
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['http://www.cs.biu.ac.il/~koppel/blogs/blogs.zip']
```
## Environment info
- `datasets` version: 1.13.2
- Platform: Linux-4.19.0-18-cloud-amd64-x86_64-with-debian-10.11
- Python version: 3.7.10
- PyArrow version: 5.0.0
Hi @fdtomasi, thanks for reporting.
You are right: the original host data URL does no longer exist.
I've contacted the authors of the dataset to ask them if they host this dataset in another URL. | [
-0.0562496819,
0.4549151957,
-0.0059019011,
0.2907787561,
0.0022765598,
0.2032642514,
0.3583987057,
0.3165001571,
0.0460988358,
-0.0797857717,
-0.1252786815,
0.1028041691,
0.1488698423,
-0.2176861316,
0.0624524802,
0.1197558641,
0.0223905351,
0.0131186349,
-0.0396164022,
-0.1130264401,
-0.2584385872,
0.1730918288,
-0.5407016277,
-0.1771993041,
0.1287781596,
0.1898821741,
0.0294036474,
0.4739404023,
-0.2036673129,
-0.3458680511,
0.2739188969,
0.1237055883,
-0.1284816414,
0.5154024959,
-0.0001175366,
0.0210457034,
0.5677784681,
-0.0733787417,
-0.1515366882,
-0.4283047915,
-0.3305861354,
-0.0286645573,
-0.3226739466,
-0.2600147724,
0.2285938412,
0.2501415312,
-0.1276017576,
-0.041508127,
-0.0731105283,
0.5933790803,
0.1946097761,
0.1965474337,
0.0797099844,
0.0710581467,
0.2051686794,
0.0943980962,
-0.0187652316,
0.3861163259,
0.2865903378,
-0.2356246859,
-0.1877570897,
0.1918155253,
-0.515237689,
-0.0284459889,
0.2086839676,
-0.0382147878,
0.2911123633,
-0.0454506241,
0.2807459831,
0.2146051526,
0.6078282595,
-0.0456123613,
-0.096726805,
0.1149547994,
0.0032837286,
0.0163846873,
0.4927816391,
0.4497662187,
-0.3456457555,
0.1712205261,
-0.4183923304,
0.1020211726,
-0.124723956,
0.1432512999,
0.0230694339,
0.3162709773,
0.0796428397,
0.0394369215,
-0.2270581722,
0.147772342,
0.5298449397,
-0.1775357127,
-0.1715858132,
-0.031967558,
-0.166691944,
0.0424557924,
0.2628037035,
0.2457203716,
0.3852874935,
0.4644735157,
0.2309203446,
0.0300176684,
0.1323726177,
-0.0769821554,
0.1633689255,
-0.0325687304,
-0.0266183224,
0.2564400733,
0.3981126845,
0.2932430804,
-0.0797118023,
0.0269058049,
-0.0563322604,
-0.2070535123,
0.3356375694,
0.0772548243,
0.2912140787,
-0.4616055489,
-0.2208434492,
0.2300806791,
-0.0640777871,
-0.0186856017,
0.0230154134,
0.4758160114,
-0.3349997103,
-0.0102568949,
0.0728847086,
0.0538801514,
-0.2344476432,
-0.0806921422,
-0.1371880025,
-0.1417045444,
-0.0878916979,
-0.0856085494,
0.1774393022,
-0.3970321715,
0.3790169954,
-0.0875649303,
0.1221126243,
-0.3959285021,
0.1682016253,
-0.1995537281,
0.2365660965,
0.286290735,
0.050130453,
0.1428810507,
0.1178595498,
-0.2939454317,
-0.0031422032,
0.2348096073,
-0.3411172032,
-0.384123534,
-0.06743671,
0.1464073509,
-0.4109939635,
-0.1460254043,
-0.3116433918,
-0.1180970147,
0.2620731294,
-0.2313370556,
0.246119678,
0.0836493224,
-0.2958274782,
-0.1942915618,
0.1575952023,
0.6883995533,
0.3353040218,
-0.0320033245,
0.1838966012,
0.0495909676,
0.1735773385,
-0.3189139366,
0.0161540117,
0.3211494982,
-0.2240235656,
0.0012115693,
0.0918675289,
-0.5233066082,
-0.522126317,
0.0946467891,
0.1921859533,
0.1526596546,
-0.1431554556,
-0.1051851958,
0.1169561446,
-0.2258265018,
0.2228447497,
0.4428510666,
0.069435358,
0.1664800048,
-0.3666194379,
-0.1975313872,
-0.0557982437,
0.0327224284,
0.2255837321,
0.3249873519,
0.2355345935,
-0.0384468921,
0.34957546,
0.0162413344,
0.0182247832,
0.3924264312,
0.0703328252,
0.0658895746,
0.1781132668,
-0.1512549818,
-0.1944594979,
0.2105385959,
-0.0043564774,
0.1750831157,
-0.1962531656,
-0.0339201204,
-0.4856852293,
-0.0931695327,
-0.1027179137,
-0.188421905,
0.0546725057,
0.2442556322,
0.1145021394,
0.0681221709,
-0.19196558,
0.1694287658,
-0.3517130017,
0.1770363152,
-0.4465619922,
0.5283477902,
0.0425436087,
-0.1421765238,
0.0976662636,
0.1596237272,
0.2642472684,
-0.0415195599,
-0.1875713468,
0.482395947,
-0.2166811824,
0.3621065915,
-0.2178572118,
-0.048553586,
0.0688804612,
-0.5010015368,
-0.0342848636,
0.3659472466,
0.2796648741,
-0.127382651,
0.0827901736,
0.1090858802,
-0.3991434276,
0.2072759569,
-0.0735475346,
0.3174445927,
0.1260157228,
-0.3371312618,
-0.2400109321,
-0.0939148515,
0.519318819,
-0.2243625671,
-0.1208696514,
-0.1622358859,
0.0063206106,
-0.0731714219,
0.1223804802,
-0.0328619257,
0.0570480637,
0.0197379217,
-0.1723068506,
-0.002940878,
0.0070525026,
0.219932735,
0.4185920656,
-0.0728400946,
0.1047065035,
0.0952608064,
-0.0277523622,
-0.1943771988,
0.3323218822,
-0.0731078908,
-0.1470601708,
0.387655288,
0.2240037769,
-0.0216279421,
-0.3915558755,
-0.1572108269,
0.1719676107,
0.2584978044,
-0.495759517,
0.003248479,
-0.0541187003,
-0.0690850243,
-0.0273500923,
-0.1780721396,
-0.0977317318,
-0.2093312144,
-0.2477352619,
0.3272691369,
-0.081372194,
0.0711062104,
-0.558652997,
0.1249351576,
0.0156813115,
-0.2328924388,
0.0032783416,
-0.0019291766,
-0.044663325,
-0.0176292676,
0.3655643463,
0.2692745924,
0.192363143,
-0.3903415203,
-0.1112876534,
-0.3884453475,
-0.208228305,
0.0564377345,
-0.0130516253,
0.1784355491,
0.1140801758,
-0.0339964554,
0.3579766452,
0.0772602856,
0.2472269237,
-0.2603276372,
-0.2289706767,
0.2943041623,
0.2081559449,
0.0636171475,
-0.0599201508,
-0.1167049855,
0.0530767068,
-0.3387319744,
-0.3224051893,
0.1251634657,
0.1566277593,
0.3387775123,
-0.0553516857,
-0.0055501023,
0.1081809402,
0.4075171947,
-0.0881278813,
-0.4673669934,
0.3836572468,
-0.1355946809,
-0.4556311965,
-0.0193857439,
-0.0848917514,
0.2073909491,
0.1848548055,
-0.7427706122,
-0.0485430919,
-0.0603209771,
0.0184502285,
-0.2108022869,
-0.1129944995,
0.218408972,
0.0236280356,
-0.0093285413,
-0.1288455725,
-0.1308838278,
-0.1989982724,
-0.0542318486,
0.3603270352,
-0.046846576,
-0.0467918776,
-0.0536164455,
0.1725940108,
0.5298579335,
0.325861454,
0.1528927684,
0.0302760173,
0.2942608297,
0.1146890149,
-0.3815487623,
0.2307289094,
-0.1033838168,
-0.0116775967,
0.2470676899,
0.2767665684,
-0.2154877186,
-0.3835693598,
-0.0836042762,
-0.3212685287,
-0.3319438994,
0.0462041013,
-0.3977621496,
0.3138649464,
0.1225445122,
0.2295435667,
-0.1932317317,
-0.4621188343,
0.2342684418,
0.2931140065,
0.0201508086,
-0.1856675893,
-0.2875446379,
0.3283650875,
-0.3616182208,
0.2112930864,
-0.0060310401,
0.2138323784,
0.0372788198,
0.0284950137,
-0.038505584,
-0.1068816334,
0.537776649,
-0.6780661345,
0.3941650391,
0.2107314467,
0.2814673185,
-0.13681297,
-0.008796745,
-0.1102813482,
0.2358355522,
0.1168759316,
0.1394089907,
-0.0957956016,
0.3086901605,
0.3928622305,
0.0240438767,
-0.0646127909,
-0.4432458282,
-0.3642847836,
-0.5671656728,
-0.0755332485,
-0.1559861451,
0.0722966492,
0.2144263238,
-0.0433424674,
-0.0933986902,
-0.1258689165,
0.2225790471,
0.2240796238,
-0.0843860805,
0.055969663,
0.0098932348,
0.3210720122,
0.030833913,
-0.2153641284,
0.3374577463,
0.8928056955,
-0.2526557148,
-0.268511802,
-0.0060808347,
-0.3253484368,
-0.0719856918,
0.325871557,
-0.0157702602,
0.0767943859,
0.2791605592,
-0.0815163627,
-0.2950253785,
-0.1026511043,
-0.0280365609,
0.2119011134,
-0.3007182181,
-0.4455382824,
0.2070797235,
-0.0635436624,
-0.0001617049,
0.2934322655,
0.0387967154,
-0.2200673968,
0.3234884739,
0.12164592,
0.8971648812,
0.095042631,
-0.1347057968,
-0.0307270139,
0.0565867722,
0.2017473429,
-0.1809373349,
0.1803240776,
-0.2135387063,
-0.5042141676,
-0.2067655325,
-0.1600974798,
0.07577876,
0.0412281789,
-0.1974116266,
0.1910123974,
0.1212362051,
0.3326323628,
0.1616926938,
-0.1196185648,
-0.2478559315,
-0.1132421046,
-0.1359862089,
0.1260214597,
-0.0100409389,
0.3182193637,
-0.1433465332,
0.2071081698,
-0.0149807045,
-0.1123535633,
-0.5376099348,
0.2412369996,
0.0216209367,
-0.1783878505,
0.3286533058,
-0.2902865112,
0.0901151821,
0.2803780138,
0.2662723362,
0.2507255673,
-0.2153989226,
0.2129562497,
0.2391134948,
0.1157664806,
0.1713772416,
-0.0070367074,
0.4294746518,
-0.1073040217,
-0.349407196,
0.2403629124,
-0.0903597176,
-0.4218606055,
0.4485447407,
0.1560024917,
0.0935926586,
-0.1334808767,
-0.0172587149,
0.0469704531,
0.1681059599,
-0.3152034283,
0.0974867195,
0.2741082609,
-0.1400897503,
0.1749589592,
-0.0638801754,
-0.3486770988,
0.0509244688,
0.4418158531,
0.0263670031,
-0.3616971374,
0.3819676936,
0.1937888265,
0.0006398991,
-0.1569692045,
-0.1386936158,
-0.2426652908,
-0.396705538,
0.1354893893,
-0.4130164683,
0.2389557362,
-0.0890311226,
0.3447133303,
0.0209660195,
0.2634488046,
-0.0430771187,
-0.6026200652,
-0.0457533784,
0.0230221599,
0.1703133881,
-0.0940873474,
-0.3059487045,
-0.1214617714,
0.0103933886,
-0.0184029732,
-0.2718603313,
0.1523208916,
-0.5935850739,
0.0931075364,
0.0596533939,
0.1450904459,
-0.0332705565,
-0.2811922729,
0.0099166129,
0.1832663566,
0.119812049,
-0.1313562989,
-0.3120336831,
0.1906984448,
0.0939100832,
-0.267601043,
0.0524447039,
-0.3088720739,
-0.1346425265,
-0.0718562081,
-0.0522935353,
0.2440484166,
0.0004243993,
-0.0451330878,
-0.102891311,
0.1934829354,
-0.2909176946,
0.0978415161,
-0.2647270262,
0.0603794418,
-0.034527611,
0.1247493997,
-0.0449521467,
0.088266097,
-0.0733155534,
0.1718799323,
-0.1540033817,
-0.1279994994,
0.7183575034,
-0.1856666207,
0.16716066,
0.1988983601,
0.1677048504,
0.3398537636,
-0.3783355355,
0.1347049326,
0.0729604736,
0.2239471078,
-0.1554294229,
0.0366630815,
-0.3483215868,
0.2026140839,
0.0933089703,
0.2123963088,
-0.0765176788,
-0.5852072835,
-0.0955529213,
0.1208132803,
0.3813629746,
0.0175191108,
-0.01542788,
0.2496570945,
-0.102864407,
0.0522963218,
0.283312887,
-0.042477265,
-0.1429977566,
0.0204298068,
0.3575541973,
0.3131250739,
0.0434658714,
0.3119071424,
-0.2396560609,
-0.3948415518,
0.3876673281,
0.1107137501,
0.1181438491,
0.1928850412,
0.0567554273,
0.1328752488,
-0.2457017899,
0.0818431079,
-0.2136412263,
-0.0499607883,
0.0601617657,
-0.1336985677,
-0.538315177,
-0.2364788949,
0.0354861841,
0.0612940975,
0.0284315646,
-0.1304716319,
0.1639122963,
0.107600756,
-0.3041845262,
-0.6768807769,
0.0815893635,
0.0477329232,
0.1969769895,
-0.2897437513,
0.1932130903,
0.4528469145,
0.1143826917,
0.2065339237,
0.6013557911,
0.4882644415,
0.2035193145,
0.1884613335,
0.0728847533,
-0.0285479799,
-0.1409052312,
-0.0942732543,
0.7448015809,
0.3221995533,
0.1075685844,
0.126373902,
0.0722140744,
-0.1725434363,
0.1866167337,
0.1333463937,
0.2678399682,
-0.1051987931,
0.5440382957,
-0.1490770429,
-0.1431853324,
-0.3055748045,
-0.06456054,
-0.214658618,
-0.1592782438,
0.4645841122,
-0.1628547311,
0.1841011047,
-0.1370927393,
0.0525690615,
0.0821260959,
0.2761402726,
0.6455054879,
0.0531845205,
-0.2062486708,
-0.2679758072,
-0.5789553523,
0.404797554,
-0.1520074606,
-0.1077792943,
-0.0072299428,
0.0766233653,
-0.082312271,
0.3378161192,
-0.0996633098,
0.1011810005,
0.0252404213,
0.2112915963,
-0.2691845894,
-0.2691563368,
-0.1364222765,
0.0692299232,
-0.2064087838,
-0.4600066543,
0.1656238735,
-0.1823313087,
0.0435741767,
0.128871575,
-0.3471728563,
-0.0289363414,
0.2798025608,
0.135418281,
0.0240823086,
0.4111542106,
-0.0667467564,
-0.090013206,
-0.3876689374,
-0.1910502166,
-0.118961975,
0.3300001919,
0.0633070767,
0.0822838768,
-0.0611629114,
0.0740652457,
-0.0059938086,
0.3479243517,
0.0956563577,
-0.1886432767,
-0.3815116882,
0.0362805016,
-0.2049142271,
0.0193805248,
0.0388289951,
0.1742579937,
-0.1813543141,
0.0681177154,
-0.2355686873,
-0.4836503267,
0.3656917214,
-0.5160312057,
-0.2373711616,
-0.1031388044,
0.484262228,
-0.2768633664,
-0.0823419243,
-0.8109427691,
0.0334611051,
0.2562825978,
-0.1548018903,
-0.2822241187,
0.1242526248,
-0.4853644073,
0.3622594178,
-0.0311819222,
0.1626925319,
0.0751299113,
-0.2588825226,
0.074099265,
-0.120349057
] |
https://github.com/huggingface/datasets/issues/3091 | `blog_authorship_corpus` is broken | Hi, @fdtomasi, the URL is fixed.
The fix is already in our master branch and it will be accessible in our next release.
In the meantime, you can include the fix if you install the `datasets` library from the master branch:
```
pip install -U git+ssh://git@github.com/huggingface/datasets.git@master#egg=datasest
```
or
```
pip install -U git+https://github.com/huggingface/datasets.git@master#egg=datasets
``` | ## Describe the bug
The dataset `blog_authorship_corpus` is broken.
By bypassing the checksum checks, the loading does not return any error but the resulting dataset is empty.
I suspect it is because the data download url is broken (http://www.cs.biu.ac.il/~koppel/blogs/blogs.zip).
## Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset("blog_authorship_corpus", split="train", download_mode='force_redownload')
```
## Expected results
No error.
## Actual results
```
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
/tmp/ipykernel_5237/1729238701.py in <module>
2 ds = load_dataset(
3 "blog_authorship_corpus", split="train",
----> 4 download_mode='force_redownload'
5 )
/opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs)
1115 ignore_verifications=ignore_verifications,
1116 try_from_hf_gcs=try_from_hf_gcs,
-> 1117 use_auth_token=use_auth_token,
1118 )
1119
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
635 if not downloaded_from_gcs:
636 self._download_and_prepare(
--> 637 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
638 )
639 # Sync info
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
707 if verify_infos:
708 verify_checksums(
--> 709 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files"
710 )
711
/opt/conda/lib/python3.7/site-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
38 if len(bad_urls) > 0:
39 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 40 raise NonMatchingChecksumError(error_msg + str(bad_urls))
41 logger.info("All the checksums matched successfully" + for_verification_name)
42
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['http://www.cs.biu.ac.il/~koppel/blogs/blogs.zip']
```
## Environment info
- `datasets` version: 1.13.2
- Platform: Linux-4.19.0-18-cloud-amd64-x86_64-with-debian-10.11
- Python version: 3.7.10
- PyArrow version: 5.0.0 | 54 | `blog_authorship_corpus` is broken
## Describe the bug
The dataset `blog_authorship_corpus` is broken.
By bypassing the checksum checks, the loading does not return any error but the resulting dataset is empty.
I suspect it is because the data download url is broken (http://www.cs.biu.ac.il/~koppel/blogs/blogs.zip).
## Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset("blog_authorship_corpus", split="train", download_mode='force_redownload')
```
## Expected results
No error.
## Actual results
```
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
/tmp/ipykernel_5237/1729238701.py in <module>
2 ds = load_dataset(
3 "blog_authorship_corpus", split="train",
----> 4 download_mode='force_redownload'
5 )
/opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs)
1115 ignore_verifications=ignore_verifications,
1116 try_from_hf_gcs=try_from_hf_gcs,
-> 1117 use_auth_token=use_auth_token,
1118 )
1119
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
635 if not downloaded_from_gcs:
636 self._download_and_prepare(
--> 637 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
638 )
639 # Sync info
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
707 if verify_infos:
708 verify_checksums(
--> 709 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files"
710 )
711
/opt/conda/lib/python3.7/site-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
38 if len(bad_urls) > 0:
39 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 40 raise NonMatchingChecksumError(error_msg + str(bad_urls))
41 logger.info("All the checksums matched successfully" + for_verification_name)
42
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['http://www.cs.biu.ac.il/~koppel/blogs/blogs.zip']
```
## Environment info
- `datasets` version: 1.13.2
- Platform: Linux-4.19.0-18-cloud-amd64-x86_64-with-debian-10.11
- Python version: 3.7.10
- PyArrow version: 5.0.0
Hi, @fdtomasi, the URL is fixed.
The fix is already in our master branch and it will be accessible in our next release.
In the meantime, you can include the fix if you install the `datasets` library from the master branch:
```
pip install -U git+ssh://git@github.com/huggingface/datasets.git@master#egg=datasest
```
or
```
pip install -U git+https://github.com/huggingface/datasets.git@master#egg=datasets
``` | [
-0.0562496819,
0.4549151957,
-0.0059019011,
0.2907787561,
0.0022765598,
0.2032642514,
0.3583987057,
0.3165001571,
0.0460988358,
-0.0797857717,
-0.1252786815,
0.1028041691,
0.1488698423,
-0.2176861316,
0.0624524802,
0.1197558641,
0.0223905351,
0.0131186349,
-0.0396164022,
-0.1130264401,
-0.2584385872,
0.1730918288,
-0.5407016277,
-0.1771993041,
0.1287781596,
0.1898821741,
0.0294036474,
0.4739404023,
-0.2036673129,
-0.3458680511,
0.2739188969,
0.1237055883,
-0.1284816414,
0.5154024959,
-0.0001175366,
0.0210457034,
0.5677784681,
-0.0733787417,
-0.1515366882,
-0.4283047915,
-0.3305861354,
-0.0286645573,
-0.3226739466,
-0.2600147724,
0.2285938412,
0.2501415312,
-0.1276017576,
-0.041508127,
-0.0731105283,
0.5933790803,
0.1946097761,
0.1965474337,
0.0797099844,
0.0710581467,
0.2051686794,
0.0943980962,
-0.0187652316,
0.3861163259,
0.2865903378,
-0.2356246859,
-0.1877570897,
0.1918155253,
-0.515237689,
-0.0284459889,
0.2086839676,
-0.0382147878,
0.2911123633,
-0.0454506241,
0.2807459831,
0.2146051526,
0.6078282595,
-0.0456123613,
-0.096726805,
0.1149547994,
0.0032837286,
0.0163846873,
0.4927816391,
0.4497662187,
-0.3456457555,
0.1712205261,
-0.4183923304,
0.1020211726,
-0.124723956,
0.1432512999,
0.0230694339,
0.3162709773,
0.0796428397,
0.0394369215,
-0.2270581722,
0.147772342,
0.5298449397,
-0.1775357127,
-0.1715858132,
-0.031967558,
-0.166691944,
0.0424557924,
0.2628037035,
0.2457203716,
0.3852874935,
0.4644735157,
0.2309203446,
0.0300176684,
0.1323726177,
-0.0769821554,
0.1633689255,
-0.0325687304,
-0.0266183224,
0.2564400733,
0.3981126845,
0.2932430804,
-0.0797118023,
0.0269058049,
-0.0563322604,
-0.2070535123,
0.3356375694,
0.0772548243,
0.2912140787,
-0.4616055489,
-0.2208434492,
0.2300806791,
-0.0640777871,
-0.0186856017,
0.0230154134,
0.4758160114,
-0.3349997103,
-0.0102568949,
0.0728847086,
0.0538801514,
-0.2344476432,
-0.0806921422,
-0.1371880025,
-0.1417045444,
-0.0878916979,
-0.0856085494,
0.1774393022,
-0.3970321715,
0.3790169954,
-0.0875649303,
0.1221126243,
-0.3959285021,
0.1682016253,
-0.1995537281,
0.2365660965,
0.286290735,
0.050130453,
0.1428810507,
0.1178595498,
-0.2939454317,
-0.0031422032,
0.2348096073,
-0.3411172032,
-0.384123534,
-0.06743671,
0.1464073509,
-0.4109939635,
-0.1460254043,
-0.3116433918,
-0.1180970147,
0.2620731294,
-0.2313370556,
0.246119678,
0.0836493224,
-0.2958274782,
-0.1942915618,
0.1575952023,
0.6883995533,
0.3353040218,
-0.0320033245,
0.1838966012,
0.0495909676,
0.1735773385,
-0.3189139366,
0.0161540117,
0.3211494982,
-0.2240235656,
0.0012115693,
0.0918675289,
-0.5233066082,
-0.522126317,
0.0946467891,
0.1921859533,
0.1526596546,
-0.1431554556,
-0.1051851958,
0.1169561446,
-0.2258265018,
0.2228447497,
0.4428510666,
0.069435358,
0.1664800048,
-0.3666194379,
-0.1975313872,
-0.0557982437,
0.0327224284,
0.2255837321,
0.3249873519,
0.2355345935,
-0.0384468921,
0.34957546,
0.0162413344,
0.0182247832,
0.3924264312,
0.0703328252,
0.0658895746,
0.1781132668,
-0.1512549818,
-0.1944594979,
0.2105385959,
-0.0043564774,
0.1750831157,
-0.1962531656,
-0.0339201204,
-0.4856852293,
-0.0931695327,
-0.1027179137,
-0.188421905,
0.0546725057,
0.2442556322,
0.1145021394,
0.0681221709,
-0.19196558,
0.1694287658,
-0.3517130017,
0.1770363152,
-0.4465619922,
0.5283477902,
0.0425436087,
-0.1421765238,
0.0976662636,
0.1596237272,
0.2642472684,
-0.0415195599,
-0.1875713468,
0.482395947,
-0.2166811824,
0.3621065915,
-0.2178572118,
-0.048553586,
0.0688804612,
-0.5010015368,
-0.0342848636,
0.3659472466,
0.2796648741,
-0.127382651,
0.0827901736,
0.1090858802,
-0.3991434276,
0.2072759569,
-0.0735475346,
0.3174445927,
0.1260157228,
-0.3371312618,
-0.2400109321,
-0.0939148515,
0.519318819,
-0.2243625671,
-0.1208696514,
-0.1622358859,
0.0063206106,
-0.0731714219,
0.1223804802,
-0.0328619257,
0.0570480637,
0.0197379217,
-0.1723068506,
-0.002940878,
0.0070525026,
0.219932735,
0.4185920656,
-0.0728400946,
0.1047065035,
0.0952608064,
-0.0277523622,
-0.1943771988,
0.3323218822,
-0.0731078908,
-0.1470601708,
0.387655288,
0.2240037769,
-0.0216279421,
-0.3915558755,
-0.1572108269,
0.1719676107,
0.2584978044,
-0.495759517,
0.003248479,
-0.0541187003,
-0.0690850243,
-0.0273500923,
-0.1780721396,
-0.0977317318,
-0.2093312144,
-0.2477352619,
0.3272691369,
-0.081372194,
0.0711062104,
-0.558652997,
0.1249351576,
0.0156813115,
-0.2328924388,
0.0032783416,
-0.0019291766,
-0.044663325,
-0.0176292676,
0.3655643463,
0.2692745924,
0.192363143,
-0.3903415203,
-0.1112876534,
-0.3884453475,
-0.208228305,
0.0564377345,
-0.0130516253,
0.1784355491,
0.1140801758,
-0.0339964554,
0.3579766452,
0.0772602856,
0.2472269237,
-0.2603276372,
-0.2289706767,
0.2943041623,
0.2081559449,
0.0636171475,
-0.0599201508,
-0.1167049855,
0.0530767068,
-0.3387319744,
-0.3224051893,
0.1251634657,
0.1566277593,
0.3387775123,
-0.0553516857,
-0.0055501023,
0.1081809402,
0.4075171947,
-0.0881278813,
-0.4673669934,
0.3836572468,
-0.1355946809,
-0.4556311965,
-0.0193857439,
-0.0848917514,
0.2073909491,
0.1848548055,
-0.7427706122,
-0.0485430919,
-0.0603209771,
0.0184502285,
-0.2108022869,
-0.1129944995,
0.218408972,
0.0236280356,
-0.0093285413,
-0.1288455725,
-0.1308838278,
-0.1989982724,
-0.0542318486,
0.3603270352,
-0.046846576,
-0.0467918776,
-0.0536164455,
0.1725940108,
0.5298579335,
0.325861454,
0.1528927684,
0.0302760173,
0.2942608297,
0.1146890149,
-0.3815487623,
0.2307289094,
-0.1033838168,
-0.0116775967,
0.2470676899,
0.2767665684,
-0.2154877186,
-0.3835693598,
-0.0836042762,
-0.3212685287,
-0.3319438994,
0.0462041013,
-0.3977621496,
0.3138649464,
0.1225445122,
0.2295435667,
-0.1932317317,
-0.4621188343,
0.2342684418,
0.2931140065,
0.0201508086,
-0.1856675893,
-0.2875446379,
0.3283650875,
-0.3616182208,
0.2112930864,
-0.0060310401,
0.2138323784,
0.0372788198,
0.0284950137,
-0.038505584,
-0.1068816334,
0.537776649,
-0.6780661345,
0.3941650391,
0.2107314467,
0.2814673185,
-0.13681297,
-0.008796745,
-0.1102813482,
0.2358355522,
0.1168759316,
0.1394089907,
-0.0957956016,
0.3086901605,
0.3928622305,
0.0240438767,
-0.0646127909,
-0.4432458282,
-0.3642847836,
-0.5671656728,
-0.0755332485,
-0.1559861451,
0.0722966492,
0.2144263238,
-0.0433424674,
-0.0933986902,
-0.1258689165,
0.2225790471,
0.2240796238,
-0.0843860805,
0.055969663,
0.0098932348,
0.3210720122,
0.030833913,
-0.2153641284,
0.3374577463,
0.8928056955,
-0.2526557148,
-0.268511802,
-0.0060808347,
-0.3253484368,
-0.0719856918,
0.325871557,
-0.0157702602,
0.0767943859,
0.2791605592,
-0.0815163627,
-0.2950253785,
-0.1026511043,
-0.0280365609,
0.2119011134,
-0.3007182181,
-0.4455382824,
0.2070797235,
-0.0635436624,
-0.0001617049,
0.2934322655,
0.0387967154,
-0.2200673968,
0.3234884739,
0.12164592,
0.8971648812,
0.095042631,
-0.1347057968,
-0.0307270139,
0.0565867722,
0.2017473429,
-0.1809373349,
0.1803240776,
-0.2135387063,
-0.5042141676,
-0.2067655325,
-0.1600974798,
0.07577876,
0.0412281789,
-0.1974116266,
0.1910123974,
0.1212362051,
0.3326323628,
0.1616926938,
-0.1196185648,
-0.2478559315,
-0.1132421046,
-0.1359862089,
0.1260214597,
-0.0100409389,
0.3182193637,
-0.1433465332,
0.2071081698,
-0.0149807045,
-0.1123535633,
-0.5376099348,
0.2412369996,
0.0216209367,
-0.1783878505,
0.3286533058,
-0.2902865112,
0.0901151821,
0.2803780138,
0.2662723362,
0.2507255673,
-0.2153989226,
0.2129562497,
0.2391134948,
0.1157664806,
0.1713772416,
-0.0070367074,
0.4294746518,
-0.1073040217,
-0.349407196,
0.2403629124,
-0.0903597176,
-0.4218606055,
0.4485447407,
0.1560024917,
0.0935926586,
-0.1334808767,
-0.0172587149,
0.0469704531,
0.1681059599,
-0.3152034283,
0.0974867195,
0.2741082609,
-0.1400897503,
0.1749589592,
-0.0638801754,
-0.3486770988,
0.0509244688,
0.4418158531,
0.0263670031,
-0.3616971374,
0.3819676936,
0.1937888265,
0.0006398991,
-0.1569692045,
-0.1386936158,
-0.2426652908,
-0.396705538,
0.1354893893,
-0.4130164683,
0.2389557362,
-0.0890311226,
0.3447133303,
0.0209660195,
0.2634488046,
-0.0430771187,
-0.6026200652,
-0.0457533784,
0.0230221599,
0.1703133881,
-0.0940873474,
-0.3059487045,
-0.1214617714,
0.0103933886,
-0.0184029732,
-0.2718603313,
0.1523208916,
-0.5935850739,
0.0931075364,
0.0596533939,
0.1450904459,
-0.0332705565,
-0.2811922729,
0.0099166129,
0.1832663566,
0.119812049,
-0.1313562989,
-0.3120336831,
0.1906984448,
0.0939100832,
-0.267601043,
0.0524447039,
-0.3088720739,
-0.1346425265,
-0.0718562081,
-0.0522935353,
0.2440484166,
0.0004243993,
-0.0451330878,
-0.102891311,
0.1934829354,
-0.2909176946,
0.0978415161,
-0.2647270262,
0.0603794418,
-0.034527611,
0.1247493997,
-0.0449521467,
0.088266097,
-0.0733155534,
0.1718799323,
-0.1540033817,
-0.1279994994,
0.7183575034,
-0.1856666207,
0.16716066,
0.1988983601,
0.1677048504,
0.3398537636,
-0.3783355355,
0.1347049326,
0.0729604736,
0.2239471078,
-0.1554294229,
0.0366630815,
-0.3483215868,
0.2026140839,
0.0933089703,
0.2123963088,
-0.0765176788,
-0.5852072835,
-0.0955529213,
0.1208132803,
0.3813629746,
0.0175191108,
-0.01542788,
0.2496570945,
-0.102864407,
0.0522963218,
0.283312887,
-0.042477265,
-0.1429977566,
0.0204298068,
0.3575541973,
0.3131250739,
0.0434658714,
0.3119071424,
-0.2396560609,
-0.3948415518,
0.3876673281,
0.1107137501,
0.1181438491,
0.1928850412,
0.0567554273,
0.1328752488,
-0.2457017899,
0.0818431079,
-0.2136412263,
-0.0499607883,
0.0601617657,
-0.1336985677,
-0.538315177,
-0.2364788949,
0.0354861841,
0.0612940975,
0.0284315646,
-0.1304716319,
0.1639122963,
0.107600756,
-0.3041845262,
-0.6768807769,
0.0815893635,
0.0477329232,
0.1969769895,
-0.2897437513,
0.1932130903,
0.4528469145,
0.1143826917,
0.2065339237,
0.6013557911,
0.4882644415,
0.2035193145,
0.1884613335,
0.0728847533,
-0.0285479799,
-0.1409052312,
-0.0942732543,
0.7448015809,
0.3221995533,
0.1075685844,
0.126373902,
0.0722140744,
-0.1725434363,
0.1866167337,
0.1333463937,
0.2678399682,
-0.1051987931,
0.5440382957,
-0.1490770429,
-0.1431853324,
-0.3055748045,
-0.06456054,
-0.214658618,
-0.1592782438,
0.4645841122,
-0.1628547311,
0.1841011047,
-0.1370927393,
0.0525690615,
0.0821260959,
0.2761402726,
0.6455054879,
0.0531845205,
-0.2062486708,
-0.2679758072,
-0.5789553523,
0.404797554,
-0.1520074606,
-0.1077792943,
-0.0072299428,
0.0766233653,
-0.082312271,
0.3378161192,
-0.0996633098,
0.1011810005,
0.0252404213,
0.2112915963,
-0.2691845894,
-0.2691563368,
-0.1364222765,
0.0692299232,
-0.2064087838,
-0.4600066543,
0.1656238735,
-0.1823313087,
0.0435741767,
0.128871575,
-0.3471728563,
-0.0289363414,
0.2798025608,
0.135418281,
0.0240823086,
0.4111542106,
-0.0667467564,
-0.090013206,
-0.3876689374,
-0.1910502166,
-0.118961975,
0.3300001919,
0.0633070767,
0.0822838768,
-0.0611629114,
0.0740652457,
-0.0059938086,
0.3479243517,
0.0956563577,
-0.1886432767,
-0.3815116882,
0.0362805016,
-0.2049142271,
0.0193805248,
0.0388289951,
0.1742579937,
-0.1813543141,
0.0681177154,
-0.2355686873,
-0.4836503267,
0.3656917214,
-0.5160312057,
-0.2373711616,
-0.1031388044,
0.484262228,
-0.2768633664,
-0.0823419243,
-0.8109427691,
0.0334611051,
0.2562825978,
-0.1548018903,
-0.2822241187,
0.1242526248,
-0.4853644073,
0.3622594178,
-0.0311819222,
0.1626925319,
0.0751299113,
-0.2588825226,
0.074099265,
-0.120349057
] |
https://github.com/huggingface/datasets/issues/3089 | JNLPBA Dataset | # Steps to reproduce
To reproduce:
```python
from datasets import load_dataset
dataset = load_dataset('jnlpba')
dataset['train'].features['ner_tags']
```
Output:
```python
Sequence(feature=ClassLabel(num_classes=3, names=['O', 'B', 'I'], names_file=None, id=None), length=-1, id=None)
```
| ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
```
## Expected results
The dataset loading script for this dataset is incorrect. This is a biomedical dataset used for named entity recognition. The entities in the [script](https://github.com/huggingface/datasets/blob/master/datasets/jnlpba/jnlpba.py#L81-L83) are: O, B, and I. The correct entities from the original data file are:
['O',
'B-DNA',
'I-DNA',
'B-RNA',
'I-RNA',
'B-cell_line',
'I-cell_line',
'B-cell_type',
'I-cell_type',
'B-protein',
'I-protein']
## Actual results
The dataset loader script needs to include the following NER names:
['O',
'B-DNA',
'I-DNA',
'B-RNA',
'I-RNA',
'B-cell_line',
'I-cell_line',
'B-cell_type',
'I-cell_type',
'B-protein',
'I-protein']
And the [data](https://github.com/huggingface/datasets/blob/master/datasets/jnlpba/jnlpba.py#L46) that is being pulled has been modified from the original dataset and does not include the original NER tags.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform:
- Python version:
- PyArrow version:
| 27 | JNLPBA Dataset
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
```
## Expected results
The dataset loading script for this dataset is incorrect. This is a biomedical dataset used for named entity recognition. The entities in the [script](https://github.com/huggingface/datasets/blob/master/datasets/jnlpba/jnlpba.py#L81-L83) are: O, B, and I. The correct entities from the original data file are:
['O',
'B-DNA',
'I-DNA',
'B-RNA',
'I-RNA',
'B-cell_line',
'I-cell_line',
'B-cell_type',
'I-cell_type',
'B-protein',
'I-protein']
## Actual results
The dataset loader script needs to include the following NER names:
['O',
'B-DNA',
'I-DNA',
'B-RNA',
'I-RNA',
'B-cell_line',
'I-cell_line',
'B-cell_type',
'I-cell_type',
'B-protein',
'I-protein']
And the [data](https://github.com/huggingface/datasets/blob/master/datasets/jnlpba/jnlpba.py#L46) that is being pulled has been modified from the original dataset and does not include the original NER tags.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform:
- Python version:
- PyArrow version:
# Steps to reproduce
To reproduce:
```python
from datasets import load_dataset
dataset = load_dataset('jnlpba')
dataset['train'].features['ner_tags']
```
Output:
```python
Sequence(feature=ClassLabel(num_classes=3, names=['O', 'B', 'I'], names_file=None, id=None), length=-1, id=None)
```
| [
0.1463600993,
-0.0191736072,
0.0117603214,
0.1949786991,
0.2566965818,
0.0052962326,
0.2601889968,
0.3991121054,
0.1160128042,
0.2989786565,
-0.0805608705,
0.4474713504,
0.1182021126,
0.1445478052,
0.2085645497,
-0.0914914757,
0.0858130604,
0.201355502,
0.0577949509,
-0.0255822018,
-0.3360536695,
0.2513844371,
-0.1098309681,
0.2690391541,
-0.2118881196,
0.2803018987,
-0.0952115133,
0.3429388404,
0.0787798315,
-0.5406233072,
0.0587688722,
-0.1115865558,
-0.1144977584,
0.0836254507,
-0.0000995758,
0.0145969158,
0.2259088159,
0.0167556703,
-0.2911888361,
0.1107615381,
-0.0642673895,
-0.1970920861,
-0.0350904651,
-0.2666274309,
-0.1085737497,
-0.0839338601,
0.0456143841,
-0.2984904349,
0.1269730926,
0.2899159193,
0.3103593588,
0.1636269838,
-0.1090561673,
0.0113941301,
0.3258368969,
-0.0905955583,
-0.0421468541,
0.0557154641,
0.0873343721,
-0.2442820072,
-0.1869222522,
0.1201017797,
-0.0901626721,
-0.0324189141,
0.3049847782,
0.1963012666,
0.0829772428,
-0.1598602086,
0.0621583834,
0.129351303,
0.0082762577,
-0.2991342247,
-0.1368646771,
-0.2586811185,
0.1599681675,
-0.4779089093,
0.2018828094,
-0.0778620243,
-0.1334770769,
0.0169437341,
0.1629644483,
0.1471738368,
-0.0175578929,
-0.0262149815,
-0.2255603224,
0.1058036238,
0.0856315717,
-0.0124823246,
-0.1957396716,
-0.1070159674,
-0.2087607831,
-0.121709913,
0.1379987895,
0.1134553179,
-0.3052333891,
0.1128421798,
0.1268156022,
-0.0158507936,
0.1522596478,
0.303088218,
0.3197423518,
-0.1836348325,
-0.0971259698,
0.1343808025,
-0.0547342636,
0.1507386118,
-0.101267688,
-0.007549094,
0.2436989993,
0.1801061034,
-0.0959186554,
0.0936134905,
0.1251740903,
-0.0808035359,
0.3119716942,
0.044437822,
0.2627379,
-0.1939213425,
-0.4318827689,
0.234637782,
-0.1696218401,
0.0399941914,
-0.1252396852,
0.2835685611,
-0.2557702363,
0.1780018806,
0.2292883098,
0.0475605056,
-0.1701577753,
-0.3886728883,
-0.3570977747,
-0.0288498849,
-0.3093794584,
-0.0841220468,
0.3267869949,
-0.0753742456,
0.3364928663,
-0.0566535592,
-0.3255328536,
-0.0573196709,
-0.2185439765,
-0.0182521362,
-0.0344963633,
0.2155149877,
-0.0187462084,
-0.0810462609,
-0.0432806835,
-0.2400836647,
0.0931016356,
0.1197202951,
-0.0939785391,
0.0461263843,
-0.0610424913,
0.3555840552,
-0.0290881321,
-0.0418129973,
-0.0161722768,
-0.1399126947,
0.137773186,
-0.2332126349,
-0.065167062,
-0.1022221372,
-0.2301969379,
-0.2721505761,
0.2064380348,
0.3416981101,
-0.2484472394,
-0.2681773603,
-0.1877989322,
-0.0043545193,
0.2619189918,
0.2430830151,
0.0374764577,
0.2239933014,
-0.41895172,
0.4572796822,
0.1251332611,
-0.2661541402,
-0.3847002387,
-0.110324122,
-0.3015442491,
0.1265033334,
0.1089020967,
0.1903225183,
0.0282005966,
0.0032977539,
0.3662710488,
0.4877803624,
-0.0340399034,
0.1878728271,
-0.3471516371,
-0.003819989,
0.186205104,
0.1984107494,
0.0328476317,
0.1977488697,
-0.0282965917,
-0.0035028537,
0.2963939607,
-0.136043489,
-0.0016060896,
0.176052466,
0.0704082325,
0.1267873198,
0.1215297729,
-0.1289234161,
-0.4459970295,
0.1767303199,
-0.5278154016,
0.1567814052,
-0.2128062248,
-0.0938559771,
-0.4465480149,
0.0017754986,
-0.217955187,
-0.1521270871,
0.3087829649,
0.3826572597,
-0.1562136263,
0.0544425137,
-0.0001432791,
0.5229551792,
-0.0848167315,
0.2076077163,
-0.8496697545,
0.3504162431,
-0.2548977137,
0.0411185808,
0.1905799806,
0.3541077673,
0.1531740874,
0.0956458226,
-0.1535537392,
0.2666716576,
0.1260719746,
-0.1173188761,
-0.1097214893,
0.0633562952,
-0.096826084,
-0.2956202328,
0.1220707446,
0.4672611654,
0.2476153374,
-0.1148580536,
-0.1032520533,
0.3202202618,
-0.016657386,
0.193698585,
0.0672038347,
-0.0159944613,
0.1915368438,
-0.2973661125,
-0.1578668356,
-0.2219603956,
0.1719376743,
0.19990623,
0.293815881,
0.188436687,
-0.4167758226,
-0.1194063872,
0.5031080842,
0.0422315598,
0.0937425271,
0.1307172775,
-0.3267628253,
-0.1163206398,
-0.1790595502,
0.0449076369,
0.2279788852,
0.2547025681,
-0.1725229472,
0.2014107108,
-0.1616565883,
-0.1836088598,
0.1382441074,
0.0555133559,
0.1643092036,
0.3248465061,
0.4020849466,
0.1810912788,
-0.3269583285,
-0.3477652073,
-0.2029144019,
0.1982143968,
-0.5685583353,
0.1790291071,
-0.1477199644,
-0.4355046451,
-0.4034188986,
0.0567614809,
-0.1608052999,
-0.4438099861,
0.1425552517,
0.2031990141,
-0.1206563264,
0.1330451816,
-0.0643002391,
0.2573272884,
-0.0386120453,
0.1302261651,
-0.2416203171,
0.03581734,
-0.306245774,
0.1881211847,
-0.0023928534,
0.1904334873,
0.3202706575,
-0.3084127307,
0.0736784488,
-0.0333178453,
-0.4163534641,
0.0679721311,
-0.1694072336,
0.1468749195,
0.2279841751,
-0.0180283282,
0.2907317877,
-0.0949796587,
0.2520328164,
-0.0497786961,
-0.337390542,
0.3117391765,
0.0783136413,
0.1036424413,
-0.0584134273,
-0.4725944698,
-0.0067319963,
-0.3326850235,
0.0523949526,
0.0701840147,
0.1783391386,
0.3609489202,
-0.2437037379,
0.0992263332,
0.2264300585,
0.2708569467,
-0.0952142701,
0.1996334493,
0.1272150129,
-0.1807060391,
-0.2138818353,
-0.2146208733,
-0.2079819888,
0.2615093291,
-0.1770761162,
-0.3571332097,
0.0071647819,
-0.0365778767,
0.1872068495,
0.0964010209,
-0.098604694,
-0.0089867748,
0.1561371684,
-0.2820246518,
-0.2509305775,
-0.1882362366,
-0.0787644014,
-0.1478707492,
0.1132582054,
0.011485165,
0.2378219664,
-0.0925859213,
-0.1042097658,
0.1227941662,
-0.213206619,
0.4248068631,
-0.1675912887,
0.0151975434,
-0.2937703431,
-0.1926689893,
-0.1217688173,
0.0382131264,
-0.0526732244,
0.2458862811,
-0.1517132074,
-0.0608366653,
0.0537704341,
0.016533155,
-0.1609268188,
-0.1142023951,
0.0762957782,
-0.1461704671,
-0.0228756759,
0.1543164849,
-0.0316600539,
-0.1130712926,
-0.1601371467,
0.0091747241,
-0.0609037578,
-0.0028628781,
-0.1731280237,
-0.1370000243,
0.1198181584,
-0.406719923,
0.1854165047,
-0.0310102832,
0.3259411752,
0.0522604324,
-0.1511453539,
0.1438679695,
-0.2025090307,
0.5765597224,
-0.2373654842,
0.3455101252,
0.2499052882,
0.3002210557,
-0.2834683657,
0.0363353863,
-0.1931753755,
-0.038661655,
0.3912112415,
-0.008624305,
-0.0718381256,
-0.1927993149,
0.3468128145,
0.227684468,
-0.2768156826,
-0.1346765757,
-0.3233079314,
-0.1125171036,
-0.313586235,
-0.0981752425,
-0.093729876,
0.2252375931,
-0.158333987,
-0.1010254696,
-0.1547248811,
-0.2593097985,
0.0810875967,
0.2150933743,
0.1889661551,
-0.0389117897,
0.322953403,
-0.1635911465,
0.4201462269,
0.0600443706,
0.5680385232,
-0.1543018371,
-0.5047996044,
0.0034936045,
-0.1555256844,
0.0586508065,
0.1751808822,
0.2140540779,
0.0032954458,
0.0421427116,
0.0530326813,
-0.0399903394,
0.0740556568,
0.3442675769,
-0.0811407715,
-0.2394943386,
-0.2986574769,
0.4323894382,
0.2852117121,
-0.26483652,
0.0394236334,
0.0044627907,
-0.4018767476,
0.3734636307,
0.121826537,
0.7724682689,
0.1096835434,
0.1402801424,
0.4760640562,
-0.3482588828,
0.1497869343,
-0.0748779029,
0.0393122286,
-0.6928707957,
-0.0102542704,
0.059987288,
-0.027225133,
-0.0124490038,
0.0455994867,
-0.0641211197,
0.3500794172,
-0.2786816061,
-0.2021393925,
0.103786692,
0.219228074,
0.2746117115,
-0.1485402435,
-0.2963674068,
0.2198437303,
-0.2433749437,
0.2711556554,
0.1487773806,
-0.005548662,
-0.1477234811,
-0.1781394482,
-0.0261001587,
0.4186316133,
0.1788462996,
-0.0815876275,
-0.0170403905,
0.0172047913,
-0.1970459074,
0.2078558505,
0.4984844923,
0.0516796671,
-0.0320399329,
0.1006317735,
0.1897906512,
0.2214654535,
0.0979485735,
0.0996007398,
0.4730938375,
-0.0584874563,
-0.1065986156,
-0.0568044856,
0.0579603091,
-0.1774077117,
0.1190392897,
0.0536456779,
0.0182774644,
-0.3427215815,
0.2150067687,
-0.0333315022,
0.2113866508,
-0.4053171575,
0.2513805032,
0.1241509691,
-0.0533198826,
-0.069964163,
0.1498541087,
-0.1985182017,
-0.084453702,
0.2766097784,
0.3246519864,
0.2071810067,
0.4090036154,
0.1123096496,
-0.0395944417,
-0.2602370977,
-0.2713629901,
0.5164765716,
-0.570935607,
0.1458097249,
-0.1145717204,
-0.0349605605,
0.0748860464,
0.4575580657,
-0.122006692,
-0.0816156641,
-0.0420899093,
-0.4081271887,
-0.3147890568,
0.1159959286,
0.0670955852,
0.2244172245,
0.1814457625,
0.1963769794,
-0.1985462755,
0.0605499037,
-0.4449172914,
0.0589879006,
-0.2175783515,
0.1439869553,
0.2787786722,
0.0201489553,
-0.0773401633,
-0.012541865,
0.3403107226,
0.1457427889,
-0.1846446991,
-0.3321921825,
-0.1898794174,
0.0359530151,
-0.1288440824,
0.0102660647,
-0.172569856,
0.0952735096,
0.044470448,
-0.1441624463,
0.1118880063,
-0.0338261798,
0.0724806264,
0.284242034,
-0.002969671,
-0.0230393838,
0.2411025465,
-0.0006261851,
-0.1259088665,
-0.0145581206,
-0.0098722251,
0.1198368296,
-0.4027406573,
-0.0429289192,
-0.3788384795,
-0.0104440628,
-0.1231826097,
0.2306907475,
0.3507061601,
-0.4715675712,
-0.1833107024,
0.014212531,
0.1160675958,
0.2321899682,
-0.3036698103,
-0.2635131478,
0.0037988797,
0.3672129512,
-0.4237291217,
-0.1744891703,
0.1522667855,
-0.1836227477,
0.0885259956,
0.2122839093,
0.2835152745,
0.0497593321,
-0.154759407,
-0.0403783284,
0.2163303345,
-0.0220667906,
-0.127124846,
0.3395156264,
0.0240912735,
0.0442170799,
0.2517640889,
0.1054881439,
0.1671672165,
0.588503778,
0.0994278938,
0.1687369645,
-0.1918978095,
0.1251209974,
-0.0445436686,
-0.2048981935,
0.2915274203,
0.3261219561,
-0.1844035685,
0.0939707384,
0.293987453,
0.2126152515,
0.1571249217,
-0.1321929544,
-0.2396125793,
0.0942881629,
-0.1811557561,
-0.0933172032,
-0.3501729369,
-0.0895008147,
-0.2317707688,
0.0366419367,
-0.122122243,
0.0396665335,
0.2198031992,
-0.0778164566,
-0.2282121629,
-0.448846668,
-0.0453799516,
0.1592605412,
0.2020284683,
-0.3029910326,
0.2133952975,
0.1569747627,
-0.0944177583,
0.2000647932,
0.1718673557,
0.5057012439,
0.1219210103,
0.2138854414,
-0.2625674903,
-0.0775662288,
-0.2231332064,
-0.1889226437,
0.1137645617,
0.2042310685,
0.102750577,
0.3244321346,
0.2199997455,
-0.2263265252,
0.0145344418,
0.3296580315,
0.2714323401,
0.0046916348,
0.4634479284,
-0.0597908683,
-0.1474967748,
-0.3507522047,
-0.1668483317,
-0.3822698891,
0.0161295217,
-0.0048422371,
0.1515715718,
0.0498393141,
-0.0331915282,
0.1666209698,
-0.048693914,
0.3471961319,
0.2903781831,
-0.0102907671,
-0.1624000371,
-0.1614376009,
-0.4956218302,
0.3579446971,
-0.0963026062,
-0.2186902165,
0.1016124636,
0.0496477671,
-0.160091579,
-0.066917941,
-0.1388711333,
-0.0488321073,
0.0950786024,
0.3389368355,
-0.398550868,
-0.1790617257,
0.1063215733,
0.0586306192,
-0.004935124,
-0.2871027291,
0.0182421505,
-0.2304186374,
0.2377930582,
-0.0375583023,
0.1156420037,
-0.0353736877,
-0.0251102466,
0.4659314454,
0.1009363011,
0.3253709376,
-0.186398387,
-0.3314526975,
-0.2146002799,
-0.0704103038,
-0.2814504802,
0.1941291839,
0.1715343297,
0.6374152899,
0.2656776905,
-0.1164442897,
-0.0727602616,
0.1394927502,
0.1397088617,
0.0701509193,
-0.4170752764,
0.28681162,
0.0432905629,
0.2496739626,
-0.1278163791,
0.1786591709,
0.060413111,
0.1780382097,
-0.3865554929,
-0.5886471868,
0.5825101733,
-0.1096471921,
-0.1394871175,
-0.132379353,
0.410395503,
-0.0307667926,
-0.1167687774,
-0.4115015268,
0.063887611,
0.2688123584,
-0.1033926681,
-0.3172682226,
0.3132021725,
-0.0674677268,
0.0040566735,
-0.0360191651,
-0.2767798603,
0.1977517009,
-0.127731815,
0.1655072272,
-0.2773714066
] |
https://github.com/huggingface/datasets/issues/3089 | JNLPBA Dataset | Since I cannot create a branch here is the updated code:
```python
# coding=utf-8
# Copyright 2020 HuggingFace Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Lint as: python3
"""Introduction to the Bio-Entity Recognition Task at JNLPBA"""
import os
import datasets
logger = datasets.logging.get_logger(__name__)
_CITATION = """\
@inproceedings{kim2004introduction,
title={Introduction to the bio-entity recognition task at JNLPBA},
author={Kim, Jin-Dong and Ohta, Tomoko and Tsuruoka, Yoshimasa and Tateisi, Yuka and Collier, Nigel},
booktitle={Proceedings of the international joint workshop on natural language processing in biomedicine and its applications},
pages={70--75},
year={2004},
organization={Citeseer}
}
"""
_DESCRIPTION = """\
The data came from the GENIA version 3.02 corpus (Kim et al., 2003). This was formed from a controlled search
on MEDLINE using the MeSH terms human, blood cells and transcription factors. From this search 2,000 abstracts
were selected and hand annotated according to a small taxonomy of 48 classes based on a chemical classification.
Among the classes, 36 terminal classes were used to annotate the GENIA corpus.
"""
_HOMEPAGE = "http://www.geniaproject.org/shared-tasks/bionlp-jnlpba-shared-task-2004"
_TRAIN_URL = "http://www.nactem.ac.uk/GENIA/current/Shared-tasks/JNLPBA/Train/Genia4ERtraining.tar.gz"
_VAL_URL = 'http://www.nactem.ac.uk/GENIA/current/Shared-tasks/JNLPBA/Evaluation/Genia4ERtest.tar.gz'
_URLS = {
"train": _TRAIN_URL,
"val": _VAL_URL,
}
_TRAIN_DIRECTORY = "Genia4ERtraining"
_VAL_DIRECTORY = "Genia4ERtest"
_TRAIN_FILE = "Genia4ERtask1.iob2"
_VAL_FILE = "Genia4EReval1.iob2"
class JNLPBAConfig(datasets.BuilderConfig):
"""BuilderConfig for JNLPBA"""
def __init__(self, **kwargs):
"""BuilderConfig for JNLPBA.
Args:
**kwargs: keyword arguments forwarded to super.
"""
super(JNLPBAConfig, self).__init__(**kwargs)
class JNLPBA(datasets.GeneratorBasedBuilder):
"""JNLPBA dataset."""
BUILDER_CONFIGS = [
JNLPBAConfig(name="jnlpba", version=datasets.Version("1.0.0"), description="JNLPBA dataset"),
]
def _info(self):
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=datasets.Features(
{
"id": datasets.Value("string"),
"tokens": datasets.Sequence(datasets.Value("string")),
"ner_tags": datasets.Sequence(
datasets.features.ClassLabel(
names=[
'O',
'B-DNA',
'I-DNA',
'B-RNA',
'I-RNA',
'B-cell_line',
'I-cell_line',
'B-cell_type',
'I-cell_type',
'B-protein',
'I-protein',
]
)
),
}
),
supervised_keys=None,
homepage=_HOMEPAGE,
citation=_CITATION,
)
def _split_generators(self, dl_manager):
downloaded_files = dl_manager.download_and_extract(_URLS)
return [
datasets.SplitGenerator(name=datasets.Split.TRAIN,
gen_kwargs={"filepath": os.path.join(downloaded_files['train'], _TRAIN_FILE)}),
datasets.SplitGenerator(name=datasets.Split.VALIDATION,
gen_kwargs={"filepath": os.path.join(downloaded_files['val'], _VAL_FILE)})
]
def _generate_examples(self, filepath):
logger.info("β³ Generating examples from = %s", filepath)
with open(filepath, encoding="utf-8") as f:
guid = 0
tokens = []
ner_tags = []
for line in f:
if line.startswith('###'):
continue
if line == '' or line == '\n':
if tokens:
yield guid, {
"id": str(guid),
"tokens": tokens,
"ner_tags": ner_tags,
}
guid += 1
tokens = []
ner_tags = []
else:
# tokens are tab separated
splits = line.split("\t")
#print(splits)
#print(len(splits))
if len(splits) < 2:
splits = splits[0].split()
tokens.append(splits[0])
ner_tags.append(splits[1].rstrip())
# last example
yield guid, {
"id": str(guid),
"tokens": tokens,
"ner_tags": ner_tags,
}
``` | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
```
## Expected results
The dataset loading script for this dataset is incorrect. This is a biomedical dataset used for named entity recognition. The entities in the [script](https://github.com/huggingface/datasets/blob/master/datasets/jnlpba/jnlpba.py#L81-L83) are: O, B, and I. The correct entities from the original data file are:
['O',
'B-DNA',
'I-DNA',
'B-RNA',
'I-RNA',
'B-cell_line',
'I-cell_line',
'B-cell_type',
'I-cell_type',
'B-protein',
'I-protein']
## Actual results
The dataset loader script needs to include the following NER names:
['O',
'B-DNA',
'I-DNA',
'B-RNA',
'I-RNA',
'B-cell_line',
'I-cell_line',
'B-cell_type',
'I-cell_type',
'B-protein',
'I-protein']
And the [data](https://github.com/huggingface/datasets/blob/master/datasets/jnlpba/jnlpba.py#L46) that is being pulled has been modified from the original dataset and does not include the original NER tags.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform:
- Python version:
- PyArrow version:
| 455 | JNLPBA Dataset
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
```
## Expected results
The dataset loading script for this dataset is incorrect. This is a biomedical dataset used for named entity recognition. The entities in the [script](https://github.com/huggingface/datasets/blob/master/datasets/jnlpba/jnlpba.py#L81-L83) are: O, B, and I. The correct entities from the original data file are:
['O',
'B-DNA',
'I-DNA',
'B-RNA',
'I-RNA',
'B-cell_line',
'I-cell_line',
'B-cell_type',
'I-cell_type',
'B-protein',
'I-protein']
## Actual results
The dataset loader script needs to include the following NER names:
['O',
'B-DNA',
'I-DNA',
'B-RNA',
'I-RNA',
'B-cell_line',
'I-cell_line',
'B-cell_type',
'I-cell_type',
'B-protein',
'I-protein']
And the [data](https://github.com/huggingface/datasets/blob/master/datasets/jnlpba/jnlpba.py#L46) that is being pulled has been modified from the original dataset and does not include the original NER tags.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform:
- Python version:
- PyArrow version:
Since I cannot create a branch here is the updated code:
```python
# coding=utf-8
# Copyright 2020 HuggingFace Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Lint as: python3
"""Introduction to the Bio-Entity Recognition Task at JNLPBA"""
import os
import datasets
logger = datasets.logging.get_logger(__name__)
_CITATION = """\
@inproceedings{kim2004introduction,
title={Introduction to the bio-entity recognition task at JNLPBA},
author={Kim, Jin-Dong and Ohta, Tomoko and Tsuruoka, Yoshimasa and Tateisi, Yuka and Collier, Nigel},
booktitle={Proceedings of the international joint workshop on natural language processing in biomedicine and its applications},
pages={70--75},
year={2004},
organization={Citeseer}
}
"""
_DESCRIPTION = """\
The data came from the GENIA version 3.02 corpus (Kim et al., 2003). This was formed from a controlled search
on MEDLINE using the MeSH terms human, blood cells and transcription factors. From this search 2,000 abstracts
were selected and hand annotated according to a small taxonomy of 48 classes based on a chemical classification.
Among the classes, 36 terminal classes were used to annotate the GENIA corpus.
"""
_HOMEPAGE = "http://www.geniaproject.org/shared-tasks/bionlp-jnlpba-shared-task-2004"
_TRAIN_URL = "http://www.nactem.ac.uk/GENIA/current/Shared-tasks/JNLPBA/Train/Genia4ERtraining.tar.gz"
_VAL_URL = 'http://www.nactem.ac.uk/GENIA/current/Shared-tasks/JNLPBA/Evaluation/Genia4ERtest.tar.gz'
_URLS = {
"train": _TRAIN_URL,
"val": _VAL_URL,
}
_TRAIN_DIRECTORY = "Genia4ERtraining"
_VAL_DIRECTORY = "Genia4ERtest"
_TRAIN_FILE = "Genia4ERtask1.iob2"
_VAL_FILE = "Genia4EReval1.iob2"
class JNLPBAConfig(datasets.BuilderConfig):
"""BuilderConfig for JNLPBA"""
def __init__(self, **kwargs):
"""BuilderConfig for JNLPBA.
Args:
**kwargs: keyword arguments forwarded to super.
"""
super(JNLPBAConfig, self).__init__(**kwargs)
class JNLPBA(datasets.GeneratorBasedBuilder):
"""JNLPBA dataset."""
BUILDER_CONFIGS = [
JNLPBAConfig(name="jnlpba", version=datasets.Version("1.0.0"), description="JNLPBA dataset"),
]
def _info(self):
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=datasets.Features(
{
"id": datasets.Value("string"),
"tokens": datasets.Sequence(datasets.Value("string")),
"ner_tags": datasets.Sequence(
datasets.features.ClassLabel(
names=[
'O',
'B-DNA',
'I-DNA',
'B-RNA',
'I-RNA',
'B-cell_line',
'I-cell_line',
'B-cell_type',
'I-cell_type',
'B-protein',
'I-protein',
]
)
),
}
),
supervised_keys=None,
homepage=_HOMEPAGE,
citation=_CITATION,
)
def _split_generators(self, dl_manager):
downloaded_files = dl_manager.download_and_extract(_URLS)
return [
datasets.SplitGenerator(name=datasets.Split.TRAIN,
gen_kwargs={"filepath": os.path.join(downloaded_files['train'], _TRAIN_FILE)}),
datasets.SplitGenerator(name=datasets.Split.VALIDATION,
gen_kwargs={"filepath": os.path.join(downloaded_files['val'], _VAL_FILE)})
]
def _generate_examples(self, filepath):
logger.info("β³ Generating examples from = %s", filepath)
with open(filepath, encoding="utf-8") as f:
guid = 0
tokens = []
ner_tags = []
for line in f:
if line.startswith('###'):
continue
if line == '' or line == '\n':
if tokens:
yield guid, {
"id": str(guid),
"tokens": tokens,
"ner_tags": ner_tags,
}
guid += 1
tokens = []
ner_tags = []
else:
# tokens are tab separated
splits = line.split("\t")
#print(splits)
#print(len(splits))
if len(splits) < 2:
splits = splits[0].split()
tokens.append(splits[0])
ner_tags.append(splits[1].rstrip())
# last example
yield guid, {
"id": str(guid),
"tokens": tokens,
"ner_tags": ner_tags,
}
``` | [
0.1486541629,
-0.1739543825,
0.0470738113,
0.2513509691,
0.2042787522,
-0.0211737603,
0.1656205058,
0.4094052017,
0.1123951748,
0.2550165951,
-0.185700506,
0.3755782545,
0.1516994387,
0.121623002,
0.2561086714,
-0.143202588,
0.0996645615,
0.144936353,
-0.1114028543,
-0.0391411111,
-0.3574819863,
0.3411877751,
-0.0987750366,
0.2195610702,
-0.1219138056,
0.2415013313,
-0.0927374214,
0.4354268014,
0.0538866967,
-0.4518616199,
0.0315412916,
-0.1311706901,
-0.1589912772,
0.0748007149,
-0.0000998077,
0.0176515635,
0.2747311592,
-0.0076889219,
-0.3377412856,
0.116604358,
-0.0471346863,
-0.1622762978,
-0.0783114433,
-0.1985011399,
-0.064028956,
-0.1041447893,
0.0424185917,
-0.3402503431,
0.2538082302,
0.2019363344,
0.3115352392,
0.3132961988,
-0.0104706222,
-0.0118709235,
0.2484318167,
-0.0746832266,
-0.0220025852,
0.0596909486,
0.0891813412,
-0.2076162845,
-0.179251045,
0.0853663236,
-0.0747517794,
-0.0255769622,
0.3158914745,
0.1592071205,
0.0407511033,
-0.0886039138,
0.1557084918,
0.119827643,
-0.0091901207,
-0.3641085029,
-0.1562202722,
-0.2859895527,
0.1652781665,
-0.310834229,
0.2314649224,
-0.0242923684,
-0.1560339034,
0.0408794843,
0.1020191982,
0.1644133478,
-0.0294989571,
-0.020210227,
-0.1926052719,
-0.0071325297,
-0.0003410054,
0.025278002,
-0.1362307817,
-0.1014292985,
-0.296694845,
-0.1499616057,
0.097576566,
0.095589228,
-0.3157712519,
0.0780466944,
0.1170096174,
0.1942016184,
0.2848682106,
0.2893327773,
0.3281624615,
-0.1506710649,
-0.1320064366,
0.1818332821,
-0.0125355702,
0.130772844,
-0.1099272221,
-0.0973194018,
0.2371184528,
0.17856884,
-0.0377604961,
0.0847996622,
0.1637207121,
-0.0625108182,
0.1610236764,
-0.0619293898,
0.263756305,
-0.1708234251,
-0.4105324447,
0.2043031901,
-0.1301450133,
0.0287312176,
-0.092235364,
0.4057446122,
-0.260768801,
0.095630154,
0.2312327921,
0.0488529205,
-0.1597777754,
-0.4378919601,
-0.3238990605,
-0.0521844216,
-0.2988617122,
-0.0354351252,
0.3166691661,
-0.1213092208,
0.3524873555,
0.0058467742,
-0.2567110658,
0.0006497045,
-0.2640992105,
0.0600089841,
-0.0302442238,
0.2119548321,
0.0139652556,
-0.1476169229,
-0.0209178496,
-0.2071858793,
0.1009541526,
0.057340201,
-0.0117389662,
0.0636268035,
-0.1165739372,
0.3356428742,
-0.0460306853,
0.001875609,
-0.046979554,
-0.1121606082,
0.076058507,
-0.2198970169,
-0.0983341113,
-0.0247343909,
-0.0932754055,
-0.2576321363,
0.2355143577,
0.4389724731,
-0.1779844165,
-0.2355245501,
-0.2344191223,
-0.0277834684,
0.2220378071,
0.2717776299,
0.0717512593,
0.1474503875,
-0.4442257583,
0.4108541608,
-0.0351278447,
-0.1894633323,
-0.3233065605,
-0.0740292892,
-0.3137938678,
0.1746144444,
0.1123688966,
0.1378771067,
-0.0584507287,
-0.0120947417,
0.298091352,
0.4342543483,
-0.022132583,
0.2189135402,
-0.370631367,
-0.0379232913,
0.0156315956,
0.154279843,
-0.0380540974,
0.2045680732,
0.0491088219,
0.0366613865,
0.3298110068,
-0.1429269761,
0.0196292717,
0.150195241,
0.0348412395,
0.1237307489,
0.1393733472,
-0.1063575372,
-0.4866108,
0.1464652419,
-0.5135000944,
0.1034791172,
-0.2188749313,
-0.1047427952,
-0.4717841148,
0.0555044934,
-0.1455482095,
-0.1484250128,
0.2992919087,
0.368724376,
-0.0919173136,
0.0509217158,
-0.0215500388,
0.5519651175,
0.0327051803,
0.2379923165,
-0.925173223,
0.3091938496,
-0.2369477302,
0.084702298,
0.2500906587,
0.3630146682,
0.1217427328,
0.0178270731,
-0.0618554018,
0.2816225886,
0.0228089839,
0.0103071481,
-0.0169691145,
0.0206087902,
-0.0776506513,
-0.2262040675,
0.1686142534,
0.3716652393,
0.2862480879,
-0.0976485834,
-0.1370398998,
0.3213839531,
-0.0802313611,
0.1477452964,
0.0939129442,
-0.0149696171,
0.176680699,
-0.3173463345,
-0.1849628985,
-0.2703110874,
0.2467222512,
0.2320737243,
0.3753698766,
0.1426808685,
-0.4702479243,
-0.1110662743,
0.4145906568,
-0.02018255,
0.1152619496,
0.1399076283,
-0.3419932127,
-0.1128968671,
-0.1474758238,
0.089441441,
0.2654877603,
0.2984974384,
-0.1855388582,
0.2214673311,
-0.1002202481,
-0.2083885074,
0.1768091023,
0.0278409775,
0.0836078301,
0.2856024802,
0.3537325561,
0.1588978916,
-0.4217227697,
-0.2582751513,
-0.2430134863,
0.1711105704,
-0.5954359174,
0.1429010183,
-0.1243701056,
-0.4651801884,
-0.4144417942,
0.1556819975,
-0.2186874151,
-0.4113915861,
0.131499663,
0.2580560148,
-0.1569702327,
0.1083913818,
0.015962312,
0.3620450497,
-0.0896228924,
0.1762825549,
-0.3268771768,
0.1042957902,
-0.2564562857,
0.181063354,
0.0630737841,
0.1480295658,
0.4264528751,
-0.2966627181,
0.078570582,
-0.1034214422,
-0.4119957089,
0.0893335044,
-0.2357759774,
0.1846891493,
0.2707220912,
0.0499490239,
0.223773241,
-0.1040499881,
0.2670359313,
-0.0853618532,
-0.3717879057,
0.2826578617,
0.1080288291,
0.0379801095,
-0.0763391033,
-0.3449458778,
0.1134343892,
-0.2979824841,
0.2148335874,
0.0244685058,
0.1538876593,
0.3093246818,
-0.2652303576,
0.0868473798,
0.088837266,
0.2499281317,
-0.1681040674,
0.0860410482,
0.0531003587,
-0.2217128426,
-0.2689089179,
-0.3154871464,
-0.1304762512,
0.2968776524,
-0.2253630757,
-0.3732544482,
-0.0474584252,
-0.0715327784,
0.1360916048,
0.0954227224,
-0.0199735705,
-0.0502941124,
0.104947038,
-0.2946064472,
-0.3287936747,
-0.2536297739,
-0.093536146,
-0.1894424856,
0.1623019427,
0.0766088217,
0.2075244635,
-0.1003228053,
-0.1051674783,
0.2292076796,
-0.1119061336,
0.4383901656,
-0.1526433825,
0.103279382,
-0.2589288354,
-0.2632178366,
-0.0684087127,
0.0473158732,
-0.0328589752,
0.2844460607,
-0.0944618806,
0.0149353249,
0.0155981751,
-0.0393079892,
-0.2651994526,
-0.152827695,
0.072967343,
-0.117267713,
-0.0891000777,
0.1485246867,
-0.0762002319,
-0.1203612909,
-0.1015283316,
0.0132837715,
-0.0091788154,
0.0341163874,
-0.1495234817,
-0.0916573182,
0.1231943369,
-0.5242971182,
0.2599091232,
-0.1561967134,
0.3109707534,
0.0118722925,
-0.1367036104,
0.1469915509,
-0.2021901608,
0.582511127,
-0.140124768,
0.3979311287,
0.1061552539,
0.2271751314,
-0.3912007213,
0.1650682092,
-0.1586756855,
0.0044700983,
0.3836700916,
0.0401367024,
-0.183646813,
-0.1689876914,
0.3201785088,
0.216136992,
-0.2478141189,
-0.1983047277,
-0.3027527034,
-0.2002047747,
-0.3080417812,
-0.0935302451,
-0.122689575,
0.2188831866,
-0.0617322512,
-0.0772149265,
-0.0866564438,
-0.3097837269,
0.1047673225,
0.2747769058,
0.1585259587,
-0.0320136808,
0.3357860744,
-0.0131355273,
0.4573422074,
0.0423464626,
0.6041736603,
-0.1461855769,
-0.4406481385,
-0.0661086291,
-0.081063509,
0.0312243719,
0.2086943835,
0.2318826914,
0.0036907326,
0.0798875764,
0.1018778011,
-0.0085501838,
-0.008368942,
0.3205948174,
-0.0354679115,
-0.2584830225,
-0.2041181773,
0.4924121201,
0.2340492606,
-0.2515867651,
0.102861017,
0.1407596916,
-0.3816276789,
0.3313391507,
0.0540197901,
0.8019831777,
0.083630532,
0.1185924709,
0.4830293357,
-0.3778999746,
0.1295750439,
-0.0253951382,
-0.0215031765,
-0.6924074292,
0.0781903714,
0.1046462581,
-0.0354181938,
-0.0039779251,
-0.0408857763,
-0.059513595,
0.2432280034,
-0.2248166949,
-0.2073636651,
0.0868106484,
0.248120144,
0.1109145135,
-0.2104147077,
-0.4261097014,
0.2228179723,
-0.2058186829,
0.3375121355,
0.1361929774,
-0.0435659029,
-0.1409613043,
-0.2147114724,
-0.0775885284,
0.3501301706,
0.1283788681,
-0.1007166803,
-0.0186122041,
0.0109279836,
-0.1653676778,
0.2327846289,
0.5291729569,
0.1033921912,
-0.1290269643,
0.1173191965,
0.0991300344,
0.1598847955,
0.0431891754,
0.0797448009,
0.3655716479,
-0.0817104653,
-0.1178863198,
-0.1798481941,
0.0611711405,
-0.1574126035,
0.1045418009,
0.1117371172,
-0.0320451148,
-0.2965097427,
0.2060990781,
-0.0666474923,
0.2224662006,
-0.3730939329,
0.2358165532,
0.1338387132,
-0.0138449557,
-0.051835347,
0.207652539,
-0.2168859094,
-0.0960711911,
0.3386074603,
0.2057899982,
0.1920653582,
0.3862905502,
0.1149950027,
-0.0285042264,
-0.2488712072,
-0.2090512514,
0.4948579669,
-0.6158802509,
0.1721389592,
-0.1163589656,
-0.0153746419,
0.0685090125,
0.4133185148,
-0.0096758502,
-0.1721475273,
-0.0243614502,
-0.441578269,
-0.2588809133,
0.2117038816,
0.0402492136,
0.2162391841,
0.2979348898,
0.3041087389,
-0.1952600032,
0.0727884024,
-0.4443260431,
0.0562581867,
-0.1633715928,
0.1017669216,
0.3508411944,
-0.0045525548,
0.0383905545,
-0.054143209,
0.3460189104,
0.1579719335,
-0.2079018056,
-0.307185322,
-0.1727859378,
0.0485644713,
-0.1476411521,
-0.0873248205,
-0.1753130853,
0.115686819,
0.0504200757,
-0.1726805568,
0.1899119914,
0.0181462485,
0.0666879937,
0.1713133454,
0.0072156363,
-0.0600775853,
0.2432460636,
-0.0136412494,
-0.0393009,
-0.0454742573,
-0.0331212766,
0.099350132,
-0.4883182645,
-0.0873122215,
-0.2495591938,
0.0673795789,
-0.0415744483,
0.2828917801,
0.4041160047,
-0.404153645,
-0.2121108025,
0.023513848,
0.1594932079,
0.2358562797,
-0.2753170431,
-0.2006578743,
-0.0078497836,
0.3478519022,
-0.4308899045,
-0.1348990351,
0.1915530711,
-0.1798088402,
0.0682549924,
0.2193338424,
0.1956633329,
0.0124494964,
-0.1602812558,
-0.1063057631,
0.2837749124,
0.0117190285,
-0.1515834779,
0.326397419,
-0.0026649921,
0.0725495592,
0.2667668462,
0.1503651887,
0.1864843518,
0.5237704515,
0.0253749713,
0.0967930108,
-0.3384026289,
0.1891507208,
0.0260476153,
-0.1957954764,
0.3593093753,
0.3252014518,
-0.1888362169,
0.1133860275,
0.2797107995,
0.359231323,
0.0881403759,
-0.1039873362,
-0.2900237441,
0.1330040842,
-0.166231513,
-0.0845215991,
-0.3388785422,
-0.1007964537,
-0.1900901645,
0.0361340903,
-0.1502728909,
-0.0150100579,
0.2100373209,
-0.0984322578,
-0.2198310047,
-0.5281637311,
-0.0937697738,
0.1756410599,
0.2077830285,
-0.2950987518,
0.2303166837,
0.1902552843,
-0.0794675201,
0.2168713361,
0.2592215836,
0.5447952151,
0.0855396986,
0.2976456881,
-0.2424801141,
-0.1366612762,
-0.1706009209,
-0.229005754,
0.1417795271,
0.1881148219,
0.0385183431,
0.3726712465,
0.2261785418,
-0.2098085731,
-0.0398723744,
0.2798552513,
0.2688909173,
-0.0201576184,
0.3727714121,
-0.1962195486,
-0.1327724457,
-0.3903245926,
-0.2016040534,
-0.404099822,
0.0502661057,
-0.0700425804,
0.1183774471,
0.0352485813,
-0.0720340237,
0.1653389335,
0.0732659698,
0.4027247131,
0.3338279128,
-0.0622809976,
-0.1327653527,
-0.2480684966,
-0.5006334186,
0.3159117401,
-0.0527606457,
-0.1511688977,
0.0679920912,
0.0269964263,
-0.1049244329,
-0.0876434147,
-0.1004722416,
-0.0553627722,
0.0175688714,
0.3260577023,
-0.3124345541,
-0.1308713108,
0.128954649,
0.0394016653,
0.0421266742,
-0.2276585251,
0.0682931989,
-0.1592671573,
0.2085539997,
-0.0833497196,
0.2277446091,
-0.0987159088,
-0.2010772377,
0.3894760609,
0.1875452697,
0.2936486304,
-0.2352511138,
-0.381166786,
-0.2239867747,
-0.087155059,
-0.2716642916,
0.2450022101,
0.2081218809,
0.5757477283,
0.2854367793,
-0.2532333136,
-0.0404164232,
0.1759841591,
0.1013052315,
0.106534645,
-0.3934260905,
0.278326273,
0.0174718108,
0.1999126822,
-0.1848371476,
0.262288928,
0.0113049624,
0.2222187668,
-0.4452326596,
-0.5834658146,
0.5895826817,
-0.1593918204,
-0.1269791573,
-0.022401752,
0.4284527898,
-0.1004126072,
-0.2553220391,
-0.4403377771,
0.111782819,
0.2066365629,
-0.1178713888,
-0.2461171001,
0.3017070293,
-0.1434038877,
-0.0530168787,
-0.0212641768,
-0.1426830143,
0.2861615121,
-0.2240405381,
0.3236184418,
-0.1992203146
] |
https://github.com/huggingface/datasets/issues/3084 | VisibleDeprecationWarning when using `set_format("numpy")` | I just opened a PR and I verified that the code you provided doesn't show any deprecation warning :) | Code to reproduce:
```
from datasets import load_dataset
dataset = load_dataset("glue", "mnli")
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('distilbert-base-cased')
def tokenize_function(dataset):
return tokenizer(dataset['premise'])
tokenized_datasets = dataset.map(tokenize_function, batched=True, remove_columns=dataset['train'].features)
tokenized_datasets.set_format("numpy")
tokenized_datasets['train'][5:8]
```
Outputs:
```
python3.9/site-packages/datasets/formatting/formatting.py:167: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
return np.array(array, copy=False, **self.np_array_kwargs)
``` | 19 | VisibleDeprecationWarning when using `set_format("numpy")`
Code to reproduce:
```
from datasets import load_dataset
dataset = load_dataset("glue", "mnli")
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('distilbert-base-cased')
def tokenize_function(dataset):
return tokenizer(dataset['premise'])
tokenized_datasets = dataset.map(tokenize_function, batched=True, remove_columns=dataset['train'].features)
tokenized_datasets.set_format("numpy")
tokenized_datasets['train'][5:8]
```
Outputs:
```
python3.9/site-packages/datasets/formatting/formatting.py:167: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
return np.array(array, copy=False, **self.np_array_kwargs)
```
I just opened a PR and I verified that the code you provided doesn't show any deprecation warning :) | [
-0.2761725783,
-0.1842715144,
-0.0695534199,
-0.1787900478,
0.4122674465,
-0.0492860191,
0.558613658,
0.387201488,
-0.2987534106,
-0.0875777453,
0.0455400348,
0.4911158085,
-0.1978975683,
-0.103918694,
-0.0582349338,
-0.1153115556,
0.2907199562,
0.2943540215,
0.212075755,
0.1158555448,
-0.2081120312,
0.1070953682,
-0.4302380085,
0.228408888,
-0.418992579,
-0.152594313,
0.0408214517,
-0.2931668758,
-0.3349085152,
-0.7788206339,
0.0660459474,
0.0797621086,
0.0744715184,
0.2448987216,
-0.0001098288,
-0.09754356,
0.3597273529,
-0.0770137757,
-0.1247085407,
0.0742025524,
0.3560256064,
-0.4634506106,
0.05921546,
-0.2812362015,
-0.1970686167,
-0.4097885489,
-0.1290644556,
-0.347735256,
0.6323645115,
0.2891101539,
0.2063380331,
0.485213697,
0.2613782585,
0.0175003819,
-0.3670914769,
0.1488034278,
-0.1340200752,
0.1205150709,
0.1063918248,
-0.0354549326,
0.0198831763,
0.2753426135,
-0.1398333758,
-0.04592783,
0.1863445491,
0.1255586147,
0.0757421032,
-0.2062481791,
-0.1665847152,
0.1073327214,
0.0700935349,
-0.3210305572,
-0.2782008946,
-0.2676996887,
-0.069075793,
-0.5681188703,
0.0612049289,
-0.0869588703,
-0.2751306295,
0.0758053362,
-0.3220216036,
0.0978008434,
-0.2289744467,
0.1881924421,
0.0347902626,
0.6022424102,
-0.1596242338,
0.0375892185,
-0.2223692685,
-0.1647965163,
0.1067263037,
-0.00274169,
0.2140184641,
0.1306847334,
-0.0757352263,
-0.4122515321,
-0.1267645955,
-0.6793176532,
0.2326528728,
0.1209922135,
-0.1431965232,
0.3046105802,
-0.0060972539,
-0.0194616932,
-0.0591361932,
0.3057033122,
0.0737463981,
0.1135523096,
-0.0347445495,
0.1902700961,
0.4996116757,
-0.0076956362,
0.0276337191,
-0.1617164165,
0.1515795141,
0.2835578024,
0.2841198146,
0.0173876919,
-0.2379264235,
-0.087027438,
-0.2753243446,
-0.0983156636,
-0.1502567828,
0.0370623879,
0.1859233379,
-0.2279873341,
-0.2188481539,
0.3251947761,
-0.0943178013,
-0.0486951694,
-0.1035271734,
-0.1674335152,
-0.3179579675,
0.1329162419,
-0.088654384,
0.2242263258,
0.156044662,
0.1465633512,
-0.032421194,
0.0602971576,
0.0799859464,
-0.0460453331,
0.526907742,
-0.0566716194,
-0.3072919846,
0.2131790221,
0.2221235335,
-0.0400520824,
-0.2100963295,
-0.1289278716,
-0.0139502203,
-0.1564742327,
-0.5129190087,
0.1726047099,
-0.0554574877,
0.225440979,
0.3058404028,
0.1406796426,
0.5754804015,
-0.1065606922,
0.2052520216,
-0.3490456641,
-0.2888504565,
-0.310546577,
0.2269769162,
0.276370585,
-0.1726520211,
-0.070757933,
0.136637181,
-0.0064445566,
0.3465935886,
0.2848231792,
-0.1192949414,
0.068823792,
-0.287109375,
0.4187415242,
0.3586893678,
0.0476353876,
-0.0891479328,
0.0125328135,
-0.258990705,
-0.0262385812,
-0.0572705604,
-0.1622795463,
0.0134196784,
-0.203743875,
0.2283159345,
0.3728842735,
0.2259038389,
-0.1221141517,
-0.2184077054,
-0.2819756269,
0.3238853514,
-0.2155994922,
-0.1016643196,
-0.1215492859,
-0.2503407598,
0.1340951324,
0.2821193039,
-0.1773388982,
-0.0170628279,
-0.0387138538,
0.1763842851,
0.0143636903,
-0.1300523728,
-0.0771001503,
-0.0962048993,
-0.0671346486,
0.0520723313,
0.1208135337,
-0.385844022,
-0.3550817072,
-0.3253433704,
0.1257509142,
-0.3299171031,
-0.1742750853,
0.2626979351,
0.1670861244,
0.1895414889,
0.1613109708,
-0.0519949459,
-0.0429786332,
-0.0368719175,
0.190599218,
-0.2597706616,
0.1361262649,
-0.134671241,
-0.2055519521,
-0.0391566642,
0.3673567474,
0.2699647844,
-0.0914395228,
-0.1568431258,
0.3795862198,
0.0887939483,
-0.4257693291,
-0.7925299406,
0.0752185285,
0.2111436576,
-0.21604608,
0.1591638327,
0.4370612502,
-0.2216647863,
-0.0073351692,
-0.1069038883,
0.4940534234,
0.0331704505,
-0.0660157651,
-0.2693093419,
0.23542431,
0.0660542399,
0.2270791531,
-0.0189905036,
-0.701073885,
-0.2925938368,
-0.0455618165,
0.0268349089,
-0.1644274592,
0.0306235384,
0.1477357149,
0.3273429275,
-0.0889284611,
0.2476337105,
-0.0263729207,
-0.0485702455,
-0.2999771535,
0.1472764164,
-0.0194366816,
0.321382165,
0.0447838344,
-0.0328439884,
0.114898622,
-0.2355348617,
-0.2843551934,
0.1139829978,
0.298004508,
0.1014597043,
0.0132734794,
0.1308701038,
0.0618223697,
-0.1569893211,
-0.2117524147,
-0.0598074831,
-0.0292049311,
-0.1617594808,
0.0283771139,
-0.1302664429,
-0.1216724738,
-0.2465787083,
-0.1667916179,
0.0293444041,
-0.2007003278,
-0.1053788066,
-0.180810824,
0.034692619,
0.3763520718,
0.211314708,
0.152842164,
0.3686486781,
0.1845222712,
0.0241101403,
0.0304540116,
-0.1500763595,
0.0849776641,
-0.0184948947,
0.0062558805,
0.3324940801,
0.0571213514,
0.1146109328,
-0.2055231333,
-0.4484797418,
0.2463304251,
-0.1142503247,
-0.0003201793,
0.4293900132,
0.0370682552,
-0.1065906659,
-0.1725503504,
0.0679832622,
-0.0005198427,
-0.145363614,
-0.0901242495,
0.051501479,
0.1096312404,
-0.2149845809,
-0.0992181599,
-0.4176307619,
-0.0787722915,
-0.1055384502,
-0.0199242327,
0.1435372233,
0.3431912065,
-0.0873068199,
0.1519756466,
-0.056490913,
-0.0899889842,
-0.162941739,
0.340026468,
0.2989011705,
-0.3487620652,
-0.1448612064,
-0.3322185278,
-0.1197793856,
0.1044684723,
0.0479920581,
-0.0900229663,
-0.3131169081,
-0.140442729,
0.0738076717,
-0.043824628,
-0.302870214,
0.333373636,
0.3414777815,
-0.0922712013,
0.0533920862,
0.0581372455,
-0.0094671007,
-0.4543273151,
0.1178997532,
0.0117353452,
0.3174465597,
0.2539557219,
0.3056441247,
0.384044379,
-0.4130396247,
0.1981722414,
0.0329025947,
0.4008170068,
-0.2731596529,
0.0298931208,
-0.0963916481,
0.1519670039,
0.0200485457,
0.0627935827,
-0.1170375124,
-0.1345643103,
0.4111026525,
0.1269081533,
0.1346286833,
-0.1937813163,
0.0770189688,
-0.0023443904,
0.3452180326,
-0.0263036713,
0.5144810081,
-0.1300045103,
-0.2693334818,
-0.021550661,
-0.0366974398,
0.0604720935,
-0.0703812316,
-0.7067800164,
-0.1156131849,
-0.1229657158,
0.2857875824,
0.1963248551,
0.7743344903,
0.0144059276,
-0.1706524491,
-0.0271022469,
0.1813769639,
0.170218423,
-0.3503389657,
-0.2074744105,
0.4723655879,
0.0787500516,
-0.186935991,
-0.2216464579,
-0.1815851778,
0.1304099858,
0.2002488226,
0.8357346654,
-0.1662173271,
-0.2585978508,
0.2118559033,
0.2329179049,
-0.0216339231,
0.0593879707,
-0.1299221367,
-0.1439589411,
-0.2402778417,
0.1506227702,
0.0343649723,
0.259370476,
-0.0545090511,
-0.0206366405,
-0.1944893897,
-0.0806096196,
-0.1077171788,
0.2097163647,
0.3010157645,
0.1350098997,
-0.1297361702,
0.2194913477,
0.0598928854,
0.1171402708,
-0.4281165898,
0.0889206752,
-0.0512338579,
0.0368796028,
0.0257469099,
0.2322790921,
0.3278931975,
0.0454231687,
0.0526185036,
-0.1726520061,
0.2530302107,
-0.1700285077,
0.2390541732,
0.2515700758,
-0.0223974511,
-0.4761555493,
-0.3095216155,
0.0480473898,
0.0119683836,
-0.0417183153,
0.0783670768,
-0.0645796657,
-0.2217617184,
0.8371992707,
0.5175716281,
0.8665699959,
0.0356389731,
0.2699934542,
0.4331185222,
0.1420071125,
0.5858849287,
-0.0608369261,
0.0705013722,
-0.3739352822,
-0.1148642153,
0.0153357973,
-0.072956115,
0.2351259291,
-0.0417773612,
-0.4107122421,
0.1475914568,
-0.1769527644,
0.4199378788,
0.0602269322,
0.1098236516,
0.1608107537,
-0.2223059088,
-0.1910407543,
0.1238868386,
-0.0714769736,
0.0469420329,
-0.0605863705,
-0.1706968546,
0.2408675402,
-0.1367631853,
-0.1905061752,
-0.1061266288,
0.0265645646,
0.4966467321,
0.0342399739,
-0.3395669758,
0.204475224,
0.2006857544,
0.7671427727,
0.5296872258,
-0.1383274794,
-0.1102575213,
0.1320623159,
-0.1288476139,
-0.0789038464,
-0.17190063,
0.3340093493,
0.1229783297,
0.0551471561,
0.1847692728,
0.1118809655,
0.0991932824,
-0.4460523427,
-0.2100941986,
0.3707621694,
-0.4387943447,
0.0506887138,
-0.2929794192,
0.0604267456,
-0.2685529888,
0.1363656372,
0.0419869684,
-0.101844281,
-0.0827303901,
0.1137722954,
-0.2470772266,
-0.0542393997,
0.1877321154,
0.2536495626,
-0.3946892321,
0.5097338557,
0.0262424424,
-0.2099626064,
-0.2524142265,
0.1123583391,
0.1147188246,
-0.2655614913,
0.050122235,
0.0405328833,
-0.0358672589,
-0.1774404496,
0.1390665472,
0.1057891548,
0.1164416671,
-0.1535876691,
-0.061869029,
-0.3717362583,
-0.1098865792,
-0.0839612931,
0.430490613,
0.0808209032,
0.0481958576,
-0.2135297209,
-0.0793020949,
-0.3477219343,
-0.0392371155,
-0.16841124,
0.0412496328,
-0.2382775545,
-0.2725968063,
-0.1149911657,
0.0032983839,
0.1240721643,
0.3956379294,
-0.2231322229,
-0.1809127182,
-0.0689384639,
0.0934099779,
0.0393941328,
-0.3634620011,
0.015619589,
0.1741082519,
-0.1782350391,
-0.220127061,
0.1588597298,
-0.0175949354,
0.1690107286,
0.1448687166,
0.3155194819,
0.1236132085,
0.0585541688,
-0.3617250025,
-0.1513947397,
0.156357944,
0.1262821555,
0.1794906259,
-0.1041769311,
0.0020345435,
-0.1301725358,
0.3458892405,
0.3898117244,
0.063395381,
0.0935693607,
-0.2899805903,
-0.3283127844,
-0.2425294816,
0.1119671687,
0.2496812493,
-0.4240933359,
-0.5485109091,
0.3504314423,
0.2312301546,
-0.1182365119,
-0.0899356008,
0.0601548478,
0.1366713792,
0.0201158784,
0.2337869853,
0.1895928085,
0.081235595,
0.0618815869,
0.1305689663,
0.3769935966,
-0.1767690927,
0.2684887648,
0.5099027157,
-0.0337575637,
0.0417731591,
0.3761215508,
-0.0477865189,
0.348656714,
0.2130231112,
0.0478759147,
0.6716040969,
0.3292833865,
-0.1349800825,
-0.1768015325,
-0.1311538368,
-0.2236346453,
0.2496629506,
-0.008243327,
0.2102234662,
0.2663728595,
0.1045261249,
-0.1115003675,
-0.3481371701,
-0.1603322774,
0.0990151912,
-0.2940068543,
-0.040233098,
0.0614400506,
0.2084430009,
-0.0857759565,
-0.1151645854,
-0.1674017012,
0.0360040106,
-0.056438189,
-0.2116733193,
-0.0794788375,
-0.026891198,
0.3055905998,
0.1506650299,
0.1182599142,
-0.2167148441,
0.0668238401,
0.1345462948,
0.1710527688,
-0.139036417,
0.2238178551,
0.580177784,
0.3792957962,
-0.1092414185,
-0.3048151731,
-0.2815634906,
-0.0300109219,
0.087340273,
0.1364444941,
0.13078475,
0.007117996,
0.2835359573,
0.1528289616,
-0.1772872359,
-0.0306070186,
0.2302730829,
0.1487654895,
0.0813366175,
0.3577391207,
-0.2066491097,
-0.2849224508,
-0.0079032611,
-0.0000492123,
-0.5146244168,
0.1260481924,
0.6019111872,
0.3762814105,
0.1871507466,
-0.1257969439,
0.1135766357,
0.240020141,
0.3711015284,
0.0729014874,
-0.1402432173,
-0.0715126619,
-0.2469272316,
-0.4894788563,
0.0337486789,
0.1315781772,
0.0314227976,
0.0252757818,
-0.1053957269,
0.0925986469,
0.063770026,
-0.2623801827,
0.2589605749,
-0.343195498,
0.1965429485,
-0.2791619897,
0.1708393097,
0.0906003043,
-0.0487417541,
-0.006892873,
-0.2549384236,
0.3411185443,
-0.2028885037,
0.1106661782,
-0.0742111132,
0.1764371842,
-0.1602172107,
0.3431344032,
0.393201828,
0.2974283695,
0.1540116817,
-0.0669615641,
-0.0965273157,
-0.3513909876,
0.067908898,
0.0230903197,
0.5360065699,
0.0496433079,
0.4630756378,
-0.0212183055,
0.0411758684,
-0.2922020257,
0.2111245543,
0.0754635185,
-0.2811893523,
-0.1269402802,
0.3585872054,
-0.2954685688,
0.0825044438,
0.0587162413,
0.0617417321,
0.0853996351,
0.2999998629,
-0.1425838023,
-0.5035415888,
0.4728187919,
-0.31342116,
-0.4354901314,
-0.0953316689,
-0.049762819,
0.3963541389,
-0.1051528379,
-0.4840003848,
-0.0337530114,
0.3141046464,
-0.0389929712,
-0.4057216048,
0.2514773309,
0.0125539396,
-0.1744635701,
-0.2245573848,
0.4358297288,
-0.1382141113,
-0.2747823894,
-0.0670897439,
-0.1795383096
] |
https://github.com/huggingface/datasets/issues/3073 | Import error installing with ppc64le | This seems to be an issue with importing PyArrow so I posted the problem [here](https://issues.apache.org/jira/browse/ARROW-14323), and I'm closing this issue.
| ## Describe the bug
Installing the datasets library with a computer running with ppc64le seems to cause an issue when importing the datasets library.
```
python
Python 3.6.13 | packaged by conda-forge | (default, Sep 23 2021, 07:37:44)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import datasets
Illegal instruction (core dumped)
```
Error when importing
`Illegal instruction (core dumped)`
## Steps to reproduce the bug
I get this error when installing the library by using conda. I can't install with pip I believe because pyarrow only has the ppc64le library on conda forge
```
conda create --name transformers_py36_v2 python=3.6
conda activate transformers_py36_v2
conda install datasets
```
## Tracebacks
conda create --name transformers_py36_v2 python=3.6
```
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.9.2
latest version: 4.10.3
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /p/home/gerryc/.conda/envs/transformers_py36_v2
added / updated specs:
- python=3.6
The following NEW packages will be INSTALLED:
_libgcc_mutex conda-forge/linux-ppc64le::_libgcc_mutex-0.1-conda_forge
_openmp_mutex conda-forge/linux-ppc64le::_openmp_mutex-4.5-1_gnu
ca-certificates conda-forge/linux-ppc64le::ca-certificates-2021.10.8-h1084571_0
certifi pkgs/main/linux-ppc64le::certifi-2020.12.5-py36h6ffa863_0
ld_impl_linux-ppc~ conda-forge/linux-ppc64le::ld_impl_linux-ppc64le-2.36.1-ha35d02b_2
libffi conda-forge/linux-ppc64le::libffi-3.4.2-h3b9df90_4
libgcc-ng conda-forge/linux-ppc64le::libgcc-ng-11.2.0-h7698a5e_11
libgomp conda-forge/linux-ppc64le::libgomp-11.2.0-h7698a5e_11
libstdcxx-ng conda-forge/linux-ppc64le::libstdcxx-ng-11.2.0-habdf983_11
libzlib conda-forge/linux-ppc64le::libzlib-1.2.11-h339bb43_1013
ncurses conda-forge/linux-ppc64le::ncurses-6.2-hea85c5d_4
openssl conda-forge/linux-ppc64le::openssl-1.1.1l-h4e0d66e_0
pip conda-forge/noarch::pip-21.3-pyhd8ed1ab_0
python conda-forge/linux-ppc64le::python-3.6.13-h57873ef_2_cpython
readline conda-forge/linux-ppc64le::readline-8.1-h5c45dff_0
setuptools pkgs/main/linux-ppc64le::setuptools-58.0.4-py36h6ffa863_0
sqlite conda-forge/linux-ppc64le::sqlite-3.36.0-h4e2196e_2
tk conda-forge/linux-ppc64le::tk-8.6.11-h41c6715_1
wheel conda-forge/noarch::wheel-0.37.0-pyhd8ed1ab_1
xz conda-forge/linux-ppc64le::xz-5.2.5-h6eb9509_1
zlib conda-forge/linux-ppc64le::zlib-1.2.11-h339bb43_1013
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate transformers_py36_v2
#
# To deactivate an active environment, use
#
# $ conda deactivate
```
conda activate transformers_py36_v2
conda install datasets
```
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.9.2
latest version: 4.10.3
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /p/home/gerryc/.conda/envs/transformers_py36_v2
added / updated specs:
- datasets
The following NEW packages will be INSTALLED:
abseil-cpp conda-forge/linux-ppc64le::abseil-cpp-20210324.2-h3b9df90_0
aiohttp conda-forge/linux-ppc64le::aiohttp-3.7.4.post0-py36hc33305d_0
arrow-cpp conda-forge/linux-ppc64le::arrow-cpp-5.0.0-py36hf9cf308_8_cpu
async-timeout conda-forge/noarch::async-timeout-3.0.1-py_1000
attrs conda-forge/noarch::attrs-21.2.0-pyhd8ed1ab_0
aws-c-cal conda-forge/linux-ppc64le::aws-c-cal-0.5.11-hb3fac3d_0
aws-c-common conda-forge/linux-ppc64le::aws-c-common-0.6.2-h4e0d66e_0
aws-c-event-stream conda-forge/linux-ppc64le::aws-c-event-stream-0.2.7-h76da5f2_13
aws-c-io conda-forge/linux-ppc64le::aws-c-io-0.10.5-hf6a6c7c_0
aws-checksums conda-forge/linux-ppc64le::aws-checksums-0.1.11-hfe76d68_7
aws-sdk-cpp conda-forge/linux-ppc64le::aws-sdk-cpp-1.8.186-h90855e8_3
brotlipy conda-forge/linux-ppc64le::brotlipy-0.7.0-py36hc33305d_1001
bzip2 conda-forge/linux-ppc64le::bzip2-1.0.8-h4e0d66e_4
c-ares conda-forge/linux-ppc64le::c-ares-1.17.2-h4e0d66e_0
cffi conda-forge/linux-ppc64le::cffi-1.14.6-py36h021ab3c_1
chardet conda-forge/linux-ppc64le::chardet-4.0.0-py36h270354c_1
colorama conda-forge/noarch::colorama-0.4.4-pyh9f0ad1d_0
cryptography conda-forge/linux-ppc64le::cryptography-3.4.7-py36hc71b123_0
dataclasses conda-forge/noarch::dataclasses-0.8-pyh787bdff_2
datasets conda-forge/noarch::datasets-1.12.1-pyhd8ed1ab_1
dill conda-forge/noarch::dill-0.3.4-pyhd8ed1ab_0
filelock conda-forge/noarch::filelock-3.3.0-pyhd8ed1ab_0
fsspec conda-forge/noarch::fsspec-2021.10.0-pyhd8ed1ab_0
gflags conda-forge/linux-ppc64le::gflags-2.2.2-hb209c28_1004
glog conda-forge/linux-ppc64le::glog-0.5.0-h4040248_0
grpc-cpp conda-forge/linux-ppc64le::grpc-cpp-1.40.0-h2bf711c_2
huggingface_hub conda-forge/noarch::huggingface_hub-0.0.19-pyhd8ed1ab_0
idna conda-forge/noarch::idna-2.10-pyh9f0ad1d_0
idna_ssl conda-forge/noarch::idna_ssl-1.0.0-0
importlib-metadata conda-forge/linux-ppc64le::importlib-metadata-4.8.1-py36h270354c_0
importlib_metadata conda-forge/noarch::importlib_metadata-4.8.1-hd8ed1ab_0
krb5 conda-forge/linux-ppc64le::krb5-1.19.2-haf43566_2
libblas conda-forge/linux-ppc64le::libblas-3.9.0-11_linuxppc64le_openblas
libbrotlicommon conda-forge/linux-ppc64le::libbrotlicommon-1.0.9-h4e0d66e_5
libbrotlidec conda-forge/linux-ppc64le::libbrotlidec-1.0.9-h4e0d66e_5
libbrotlienc conda-forge/linux-ppc64le::libbrotlienc-1.0.9-h4e0d66e_5
libcblas conda-forge/linux-ppc64le::libcblas-3.9.0-11_linuxppc64le_openblas
libcurl conda-forge/linux-ppc64le::libcurl-7.79.1-he415e40_1
libedit conda-forge/linux-ppc64le::libedit-3.1.20191231-h41a240f_2
libev conda-forge/linux-ppc64le::libev-4.33-h6eb9509_1
libevent conda-forge/linux-ppc64le::libevent-2.1.10-h97db324_4
libgfortran-ng conda-forge/linux-ppc64le::libgfortran-ng-11.2.0-hfdc3801_11
libgfortran5 conda-forge/linux-ppc64le::libgfortran5-11.2.0-he58fbb4_11
liblapack conda-forge/linux-ppc64le::liblapack-3.9.0-11_linuxppc64le_openblas
libnghttp2 conda-forge/linux-ppc64le::libnghttp2-1.43.0-h42039ad_1
libopenblas conda-forge/linux-ppc64le::libopenblas-0.3.17-pthreads_h486567c_1
libprotobuf conda-forge/linux-ppc64le::libprotobuf-3.18.1-h690f14c_0
libssh2 conda-forge/linux-ppc64le::libssh2-1.10.0-ha5a9321_2
libthrift conda-forge/linux-ppc64le::libthrift-0.15.0-h54f692e_1
libutf8proc conda-forge/linux-ppc64le::libutf8proc-2.6.1-h4e0d66e_0
lz4-c conda-forge/linux-ppc64le::lz4-c-1.9.3-h3b9df90_1
multidict conda-forge/linux-ppc64le::multidict-5.2.0-py36hc33305d_0
multiprocess conda-forge/linux-ppc64le::multiprocess-0.70.12.2-py36hc33305d_0
numpy conda-forge/linux-ppc64le::numpy-1.19.5-py36h86665d4_1
orc conda-forge/linux-ppc64le::orc-1.7.0-hae6b4bd_0
packaging conda-forge/noarch::packaging-21.0-pyhd8ed1ab_0
pandas conda-forge/linux-ppc64le::pandas-1.1.5-py36hab1a6e6_0
parquet-cpp conda-forge/noarch::parquet-cpp-1.5.1-2
pyarrow conda-forge/linux-ppc64le::pyarrow-5.0.0-py36h7a46c7e_8_cpu
pycparser conda-forge/noarch::pycparser-2.20-pyh9f0ad1d_2
pyopenssl conda-forge/noarch::pyopenssl-21.0.0-pyhd8ed1ab_0
pyparsing conda-forge/noarch::pyparsing-2.4.7-pyh9f0ad1d_0
pysocks conda-forge/linux-ppc64le::pysocks-1.7.1-py36h270354c_3
python-dateutil conda-forge/noarch::python-dateutil-2.8.2-pyhd8ed1ab_0
python-xxhash conda-forge/linux-ppc64le::python-xxhash-2.0.2-py36hc33305d_0
python_abi conda-forge/linux-ppc64le::python_abi-3.6-2_cp36m
pytz conda-forge/noarch::pytz-2021.3-pyhd8ed1ab_0
pyyaml conda-forge/linux-ppc64le::pyyaml-5.4.1-py36hc33305d_1
re2 conda-forge/linux-ppc64le::re2-2021.09.01-h3b9df90_0
requests conda-forge/noarch::requests-2.25.1-pyhd3deb0d_0
s2n conda-forge/linux-ppc64le::s2n-1.0.10-h97db324_0
six conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
snappy conda-forge/linux-ppc64le::snappy-1.1.8-hb209c28_3
tqdm conda-forge/noarch::tqdm-4.62.3-pyhd8ed1ab_0
typing-extensions conda-forge/noarch::typing-extensions-3.10.0.2-hd8ed1ab_0
typing_extensions conda-forge/noarch::typing_extensions-3.10.0.2-pyha770c72_0
urllib3 conda-forge/noarch::urllib3-1.26.7-pyhd8ed1ab_0
xxhash conda-forge/linux-ppc64le::xxhash-0.8.0-h4e0d66e_3
yaml conda-forge/linux-ppc64le::yaml-0.2.5-h6eb9509_0
yarl conda-forge/linux-ppc64le::yarl-1.6.3-py36hc33305d_2
zipp conda-forge/noarch::zipp-3.6.0-pyhd8ed1ab_0
zstd conda-forge/linux-ppc64le::zstd-1.5.0-h65c4b1a_0
The following packages will be UPDATED:
certifi pkgs/main::certifi-2020.12.5-py36h6ff~ --> conda-forge::certifi-2021.5.30-py36h270354c_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: Red Hat Enterprise Linux 8.2 (Ootpa)
- Python version: 3.6
- PyArrow version: pyarrow - 5.0.0 - py36h7a46c7e_8_cpu - conda-forge
Any help would be appreciated! I've been struggling on installing datasets on this machine.
| 20 | Import error installing with ppc64le
## Describe the bug
Installing the datasets library with a computer running with ppc64le seems to cause an issue when importing the datasets library.
```
python
Python 3.6.13 | packaged by conda-forge | (default, Sep 23 2021, 07:37:44)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import datasets
Illegal instruction (core dumped)
```
Error when importing
`Illegal instruction (core dumped)`
## Steps to reproduce the bug
I get this error when installing the library by using conda. I can't install with pip I believe because pyarrow only has the ppc64le library on conda forge
```
conda create --name transformers_py36_v2 python=3.6
conda activate transformers_py36_v2
conda install datasets
```
## Tracebacks
conda create --name transformers_py36_v2 python=3.6
```
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.9.2
latest version: 4.10.3
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /p/home/gerryc/.conda/envs/transformers_py36_v2
added / updated specs:
- python=3.6
The following NEW packages will be INSTALLED:
_libgcc_mutex conda-forge/linux-ppc64le::_libgcc_mutex-0.1-conda_forge
_openmp_mutex conda-forge/linux-ppc64le::_openmp_mutex-4.5-1_gnu
ca-certificates conda-forge/linux-ppc64le::ca-certificates-2021.10.8-h1084571_0
certifi pkgs/main/linux-ppc64le::certifi-2020.12.5-py36h6ffa863_0
ld_impl_linux-ppc~ conda-forge/linux-ppc64le::ld_impl_linux-ppc64le-2.36.1-ha35d02b_2
libffi conda-forge/linux-ppc64le::libffi-3.4.2-h3b9df90_4
libgcc-ng conda-forge/linux-ppc64le::libgcc-ng-11.2.0-h7698a5e_11
libgomp conda-forge/linux-ppc64le::libgomp-11.2.0-h7698a5e_11
libstdcxx-ng conda-forge/linux-ppc64le::libstdcxx-ng-11.2.0-habdf983_11
libzlib conda-forge/linux-ppc64le::libzlib-1.2.11-h339bb43_1013
ncurses conda-forge/linux-ppc64le::ncurses-6.2-hea85c5d_4
openssl conda-forge/linux-ppc64le::openssl-1.1.1l-h4e0d66e_0
pip conda-forge/noarch::pip-21.3-pyhd8ed1ab_0
python conda-forge/linux-ppc64le::python-3.6.13-h57873ef_2_cpython
readline conda-forge/linux-ppc64le::readline-8.1-h5c45dff_0
setuptools pkgs/main/linux-ppc64le::setuptools-58.0.4-py36h6ffa863_0
sqlite conda-forge/linux-ppc64le::sqlite-3.36.0-h4e2196e_2
tk conda-forge/linux-ppc64le::tk-8.6.11-h41c6715_1
wheel conda-forge/noarch::wheel-0.37.0-pyhd8ed1ab_1
xz conda-forge/linux-ppc64le::xz-5.2.5-h6eb9509_1
zlib conda-forge/linux-ppc64le::zlib-1.2.11-h339bb43_1013
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate transformers_py36_v2
#
# To deactivate an active environment, use
#
# $ conda deactivate
```
conda activate transformers_py36_v2
conda install datasets
```
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.9.2
latest version: 4.10.3
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /p/home/gerryc/.conda/envs/transformers_py36_v2
added / updated specs:
- datasets
The following NEW packages will be INSTALLED:
abseil-cpp conda-forge/linux-ppc64le::abseil-cpp-20210324.2-h3b9df90_0
aiohttp conda-forge/linux-ppc64le::aiohttp-3.7.4.post0-py36hc33305d_0
arrow-cpp conda-forge/linux-ppc64le::arrow-cpp-5.0.0-py36hf9cf308_8_cpu
async-timeout conda-forge/noarch::async-timeout-3.0.1-py_1000
attrs conda-forge/noarch::attrs-21.2.0-pyhd8ed1ab_0
aws-c-cal conda-forge/linux-ppc64le::aws-c-cal-0.5.11-hb3fac3d_0
aws-c-common conda-forge/linux-ppc64le::aws-c-common-0.6.2-h4e0d66e_0
aws-c-event-stream conda-forge/linux-ppc64le::aws-c-event-stream-0.2.7-h76da5f2_13
aws-c-io conda-forge/linux-ppc64le::aws-c-io-0.10.5-hf6a6c7c_0
aws-checksums conda-forge/linux-ppc64le::aws-checksums-0.1.11-hfe76d68_7
aws-sdk-cpp conda-forge/linux-ppc64le::aws-sdk-cpp-1.8.186-h90855e8_3
brotlipy conda-forge/linux-ppc64le::brotlipy-0.7.0-py36hc33305d_1001
bzip2 conda-forge/linux-ppc64le::bzip2-1.0.8-h4e0d66e_4
c-ares conda-forge/linux-ppc64le::c-ares-1.17.2-h4e0d66e_0
cffi conda-forge/linux-ppc64le::cffi-1.14.6-py36h021ab3c_1
chardet conda-forge/linux-ppc64le::chardet-4.0.0-py36h270354c_1
colorama conda-forge/noarch::colorama-0.4.4-pyh9f0ad1d_0
cryptography conda-forge/linux-ppc64le::cryptography-3.4.7-py36hc71b123_0
dataclasses conda-forge/noarch::dataclasses-0.8-pyh787bdff_2
datasets conda-forge/noarch::datasets-1.12.1-pyhd8ed1ab_1
dill conda-forge/noarch::dill-0.3.4-pyhd8ed1ab_0
filelock conda-forge/noarch::filelock-3.3.0-pyhd8ed1ab_0
fsspec conda-forge/noarch::fsspec-2021.10.0-pyhd8ed1ab_0
gflags conda-forge/linux-ppc64le::gflags-2.2.2-hb209c28_1004
glog conda-forge/linux-ppc64le::glog-0.5.0-h4040248_0
grpc-cpp conda-forge/linux-ppc64le::grpc-cpp-1.40.0-h2bf711c_2
huggingface_hub conda-forge/noarch::huggingface_hub-0.0.19-pyhd8ed1ab_0
idna conda-forge/noarch::idna-2.10-pyh9f0ad1d_0
idna_ssl conda-forge/noarch::idna_ssl-1.0.0-0
importlib-metadata conda-forge/linux-ppc64le::importlib-metadata-4.8.1-py36h270354c_0
importlib_metadata conda-forge/noarch::importlib_metadata-4.8.1-hd8ed1ab_0
krb5 conda-forge/linux-ppc64le::krb5-1.19.2-haf43566_2
libblas conda-forge/linux-ppc64le::libblas-3.9.0-11_linuxppc64le_openblas
libbrotlicommon conda-forge/linux-ppc64le::libbrotlicommon-1.0.9-h4e0d66e_5
libbrotlidec conda-forge/linux-ppc64le::libbrotlidec-1.0.9-h4e0d66e_5
libbrotlienc conda-forge/linux-ppc64le::libbrotlienc-1.0.9-h4e0d66e_5
libcblas conda-forge/linux-ppc64le::libcblas-3.9.0-11_linuxppc64le_openblas
libcurl conda-forge/linux-ppc64le::libcurl-7.79.1-he415e40_1
libedit conda-forge/linux-ppc64le::libedit-3.1.20191231-h41a240f_2
libev conda-forge/linux-ppc64le::libev-4.33-h6eb9509_1
libevent conda-forge/linux-ppc64le::libevent-2.1.10-h97db324_4
libgfortran-ng conda-forge/linux-ppc64le::libgfortran-ng-11.2.0-hfdc3801_11
libgfortran5 conda-forge/linux-ppc64le::libgfortran5-11.2.0-he58fbb4_11
liblapack conda-forge/linux-ppc64le::liblapack-3.9.0-11_linuxppc64le_openblas
libnghttp2 conda-forge/linux-ppc64le::libnghttp2-1.43.0-h42039ad_1
libopenblas conda-forge/linux-ppc64le::libopenblas-0.3.17-pthreads_h486567c_1
libprotobuf conda-forge/linux-ppc64le::libprotobuf-3.18.1-h690f14c_0
libssh2 conda-forge/linux-ppc64le::libssh2-1.10.0-ha5a9321_2
libthrift conda-forge/linux-ppc64le::libthrift-0.15.0-h54f692e_1
libutf8proc conda-forge/linux-ppc64le::libutf8proc-2.6.1-h4e0d66e_0
lz4-c conda-forge/linux-ppc64le::lz4-c-1.9.3-h3b9df90_1
multidict conda-forge/linux-ppc64le::multidict-5.2.0-py36hc33305d_0
multiprocess conda-forge/linux-ppc64le::multiprocess-0.70.12.2-py36hc33305d_0
numpy conda-forge/linux-ppc64le::numpy-1.19.5-py36h86665d4_1
orc conda-forge/linux-ppc64le::orc-1.7.0-hae6b4bd_0
packaging conda-forge/noarch::packaging-21.0-pyhd8ed1ab_0
pandas conda-forge/linux-ppc64le::pandas-1.1.5-py36hab1a6e6_0
parquet-cpp conda-forge/noarch::parquet-cpp-1.5.1-2
pyarrow conda-forge/linux-ppc64le::pyarrow-5.0.0-py36h7a46c7e_8_cpu
pycparser conda-forge/noarch::pycparser-2.20-pyh9f0ad1d_2
pyopenssl conda-forge/noarch::pyopenssl-21.0.0-pyhd8ed1ab_0
pyparsing conda-forge/noarch::pyparsing-2.4.7-pyh9f0ad1d_0
pysocks conda-forge/linux-ppc64le::pysocks-1.7.1-py36h270354c_3
python-dateutil conda-forge/noarch::python-dateutil-2.8.2-pyhd8ed1ab_0
python-xxhash conda-forge/linux-ppc64le::python-xxhash-2.0.2-py36hc33305d_0
python_abi conda-forge/linux-ppc64le::python_abi-3.6-2_cp36m
pytz conda-forge/noarch::pytz-2021.3-pyhd8ed1ab_0
pyyaml conda-forge/linux-ppc64le::pyyaml-5.4.1-py36hc33305d_1
re2 conda-forge/linux-ppc64le::re2-2021.09.01-h3b9df90_0
requests conda-forge/noarch::requests-2.25.1-pyhd3deb0d_0
s2n conda-forge/linux-ppc64le::s2n-1.0.10-h97db324_0
six conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
snappy conda-forge/linux-ppc64le::snappy-1.1.8-hb209c28_3
tqdm conda-forge/noarch::tqdm-4.62.3-pyhd8ed1ab_0
typing-extensions conda-forge/noarch::typing-extensions-3.10.0.2-hd8ed1ab_0
typing_extensions conda-forge/noarch::typing_extensions-3.10.0.2-pyha770c72_0
urllib3 conda-forge/noarch::urllib3-1.26.7-pyhd8ed1ab_0
xxhash conda-forge/linux-ppc64le::xxhash-0.8.0-h4e0d66e_3
yaml conda-forge/linux-ppc64le::yaml-0.2.5-h6eb9509_0
yarl conda-forge/linux-ppc64le::yarl-1.6.3-py36hc33305d_2
zipp conda-forge/noarch::zipp-3.6.0-pyhd8ed1ab_0
zstd conda-forge/linux-ppc64le::zstd-1.5.0-h65c4b1a_0
The following packages will be UPDATED:
certifi pkgs/main::certifi-2020.12.5-py36h6ff~ --> conda-forge::certifi-2021.5.30-py36h270354c_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: Red Hat Enterprise Linux 8.2 (Ootpa)
- Python version: 3.6
- PyArrow version: pyarrow - 5.0.0 - py36h7a46c7e_8_cpu - conda-forge
Any help would be appreciated! I've been struggling on installing datasets on this machine.
This seems to be an issue with importing PyArrow so I posted the problem [here](https://issues.apache.org/jira/browse/ARROW-14323), and I'm closing this issue.
| [
-0.1681165248,
0.1741706878,
0.0191158,
0.2278842032,
0.2522402406,
0.2248131782,
0.3580008447,
0.2304055691,
-0.3304048181,
-0.1519774348,
-0.155306071,
0.3825338483,
-0.0719909519,
-0.1810771525,
0.1235699058,
-0.1017437503,
0.2075526714,
0.1592648178,
-0.3558947444,
0.0104448143,
0.0393025167,
0.0991439968,
-0.2588663995,
-0.0131988134,
-0.2772496343,
-0.0752696693,
0.1208347827,
0.2642082274,
-0.3207326531,
-0.4877250493,
0.4658449292,
0.0226073954,
0.2885296941,
0.5494136214,
-0.0001185895,
0.0614437722,
0.1450080723,
0.0612168759,
-0.3407801986,
0.1261231303,
-0.2262352556,
-0.1255423129,
0.0684668422,
-0.3169624507,
0.2733926177,
-0.1515474319,
-0.2632461786,
-0.026699014,
0.3241506815,
0.3755487502,
0.1832676977,
0.4011487067,
0.4120344222,
-0.1107695401,
-0.1212259158,
-0.0766372606,
-0.1382633299,
0.4454353452,
-0.0906639993,
0.0604203008,
0.2833495438,
-0.1074115783,
-0.409756273,
-0.100444153,
0.0622544214,
-0.255521208,
0.0053109769,
-0.3622722924,
-0.077031903,
0.0977197811,
0.4057970345,
-0.5244995952,
-0.3740677238,
-0.1321483701,
0.0982758179,
-0.1443514526,
0.0384261757,
0.328890413,
-0.0268838629,
0.4496762753,
-0.1365010142,
-0.1078771353,
-0.1149710342,
-0.1255889386,
-0.1303062737,
0.2772201002,
0.0795135722,
0.0621867217,
0.3043603301,
0.0229974352,
0.2511218488,
-0.0277937707,
-0.1933029443,
0.208525762,
-0.2977027297,
0.0448925458,
-0.0169852208,
0.3024374545,
0.0574735068,
-0.0868086144,
-0.4460229874,
-0.2258905619,
-0.12846075,
0.4202296138,
0.0785935372,
0.1287725568,
-0.2310455143,
0.6227788925,
0.1722636223,
0.0070313909,
0.1491640806,
0.1725922227,
-0.026954772,
-0.2498264462,
-0.1854351312,
0.0644904524,
0.2040726691,
-0.3807356656,
-0.619361639,
0.1034226641,
-0.0806263983,
0.0323943682,
0.0463373587,
0.3786562681,
-0.0428490713,
0.267095387,
-0.09003786,
0.1296769977,
-0.0506840311,
-0.1650952399,
-0.0085960543,
0.1578429639,
-0.1412445009,
-0.1000749618,
0.1378430873,
-0.2330302447,
0.1386906803,
0.3562195897,
0.1905655414,
-0.0444922224,
-0.0948983654,
-0.1628221124,
-0.0110508045,
0.5177471638,
-0.1413877457,
0.1911186874,
0.0758850053,
-0.1573006958,
-0.1927103698,
0.3283711374,
-0.2758985758,
-0.2721927166,
-0.3044762909,
0.0428349599,
-0.2530062497,
-0.0404011905,
-0.102237314,
-0.3184183836,
0.1914586276,
-0.3537463248,
0.0429675169,
-0.2561555207,
0.2510428429,
-0.3389221728,
0.1608778387,
0.3802630901,
-0.3298734128,
-0.0096451323,
-0.1356585175,
-0.1638524234,
0.0697239041,
0.3967145681,
-0.0640764162,
0.1426306069,
-0.1877410263,
0.0592674762,
0.1169533506,
-0.6120998859,
-0.4776154757,
0.1241763309,
-0.0072813588,
0.1154377162,
-0.1382436007,
-0.0577719882,
0.1037283242,
-0.2769390047,
-0.0251633544,
0.197421357,
-0.1917706579,
-0.0228512101,
-0.2093311399,
-0.3600583971,
0.1762978882,
0.0794563293,
-0.0742753223,
0.1226182953,
0.0729385242,
-0.1260176152,
0.1474113762,
-0.0943459943,
-0.1373967528,
0.3990387321,
0.459002763,
-0.0205616839,
-0.0649978667,
-0.0202440657,
-0.4134481847,
0.1031624898,
0.1382995248,
0.1192228794,
-0.5537195206,
-0.2069348991,
-0.1882446259,
0.1518905014,
-0.0850866139,
-0.1587784439,
-0.0216947142,
-0.1237899289,
0.0485547893,
0.0719101578,
0.0880475789,
0.4626566768,
0.2365571111,
0.3100977838,
-0.027607765,
0.0221239142,
-0.3907717168,
-0.0591376945,
-0.0258065369,
0.2370865792,
0.394913584,
-0.202769801,
-0.0885349438,
0.3065520525,
0.0062374542,
-0.0289252345,
-0.2997792661,
0.320317328,
0.3272385597,
-0.3317566216,
0.0145080797,
-0.162565589,
0.0816531107,
0.1551701576,
0.3347972929,
0.1416380852,
0.0082724104,
-0.0588764437,
0.0277062822,
0.2139033675,
0.4728176594,
0.1253751218,
0.1064170524,
-0.3569252789,
0.2567153573,
0.2894699574,
0.3512605131,
0.1421396583,
-0.0006212884,
-0.1016294435,
0.3808917999,
-0.0531532057,
-0.0684336647,
0.0168286636,
-0.1259626448,
0.277559489,
0.4140893817,
0.2114193588,
0.4604666829,
0.1008697227,
-0.2999581695,
0.0760146827,
-0.0933908895,
-0.0398390107,
0.1069484502,
0.0131416814,
0.0878638476,
-0.1818795204,
0.0280345101,
0.1651901603,
-0.0290528387,
-0.3745673299,
-0.014659862,
0.3565303981,
-0.2384230196,
0.3197470605,
-0.3326585293,
0.0320677571,
-0.2852924168,
-0.4586714208,
-0.1252919585,
0.0092238523,
-0.2183822989,
0.0172383301,
-0.0140599906,
0.2438280433,
-0.1330537796,
0.0772268325,
-0.1235712245,
-0.3615932465,
0.0415625833,
-0.0689858869,
-0.2089127451,
-0.0383706726,
0.316118747,
-0.0648595691,
0.2453090101,
-0.063155219,
-0.0479899459,
0.0697788298,
-0.5097410679,
0.187092945,
-0.0384007469,
0.2822636664,
-0.0371473804,
0.0251931511,
0.0235878807,
-0.3928711712,
0.0445803106,
-0.059856385,
0.0154010225,
-0.0135763753,
-0.1440774202,
-0.3158507347,
-0.3546178341,
-0.1802107096,
-0.3794824183,
-0.2938171625,
0.1727314442,
0.2120231241,
0.0663114414,
0.0445279106,
0.1872193515,
-0.0173459649,
0.0800267532,
0.0523342863,
0.0117524648,
-0.1039146483,
0.337003231,
-0.2633852363,
-0.2863166332,
-0.0022647153,
-0.0298105124,
0.4419112504,
0.1153196841,
-0.2360552102,
0.2469997704,
-0.3731721342,
0.6139397025,
0.0336664692,
-0.0038019302,
0.152248919,
0.1148400009,
0.2189618796,
-0.1268131137,
-0.2673539221,
-0.0462667197,
-0.0977066308,
-0.0782298595,
-0.11101605,
0.1414682418,
0.0398478247,
0.4579199255,
-0.0062669637,
-0.2128997445,
0.183843255,
0.0348558985,
0.3761180937,
-0.0162684564,
-0.2655894458,
0.0858875811,
0.0678910539,
-0.243859604,
-0.0471565872,
-0.1445735544,
-0.3252578974,
-0.2563632727,
0.2473487109,
-0.4485626519,
-0.2551050484,
-0.1158254445,
0.1002290472,
0.3252227902,
0.2347514331,
0.1707500219,
0.0336414948,
-0.082951583,
0.0387605093,
0.188009724,
-0.0916456729,
0.0175284576,
0.0472209752,
-0.2485779226,
-0.2168777138,
0.2224240154,
0.015644284,
0.5708821416,
0.0462725237,
0.1224859729,
-0.0012865887,
0.0993517339,
0.2476229221,
0.1929284334,
-0.1817519516,
0.1294832081,
0.3719483614,
-0.2349201888,
-0.3579830527,
-0.0112349233,
0.2433957309,
0.5500505567,
-0.195099324,
-0.4561497569,
0.1552610695,
0.2498654574,
0.3940430284,
0.0224915277,
-0.088997744,
-0.2777659297,
-0.4026123583,
-0.2786273062,
-0.0761708617,
0.2596023381,
0.2287546992,
-0.155673638,
0.1181932539,
0.0292764138,
0.0230915155,
0.0939194709,
0.2643624246,
0.3219034076,
-0.3164744079,
0.216847077,
0.119269833,
-0.2579005957,
0.4976799488,
0.5331967473,
0.067241706,
-0.3038301766,
-0.2129804045,
0.0068591279,
0.0049701612,
0.0156772099,
-0.0006569729,
-0.0857973322,
0.0941705257,
-0.1116576344,
-0.0022147649,
-0.096536696,
0.1440535188,
0.1223436669,
-0.5658999085,
-0.520033896,
0.2048701346,
0.2990089357,
0.0185688939,
0.3848749697,
0.0073892986,
-0.1313932687,
0.2138489634,
0.0115784658,
0.9470586777,
-0.0895349309,
-0.0294205137,
0.4582909346,
-0.0951127857,
0.5252352953,
-0.242637977,
0.0292023234,
-0.5004669428,
-0.0463416204,
0.0966713727,
-0.1997254193,
0.4161533117,
-0.0929141566,
-0.3319837749,
0.1409898102,
-0.3223989606,
0.1478520781,
0.2160704434,
-0.0585109778,
0.0947979316,
-0.2214742303,
-0.1578754187,
0.0879128873,
0.0545075536,
0.1548904926,
-0.3104783297,
-0.0773418173,
-0.240946576,
-0.4220793545,
-0.5121933818,
0.1234588549,
-0.1304969192,
0.3496528864,
0.2548051775,
0.0100979991,
0.3488655686,
0.3507111669,
0.3449663818,
0.2735276222,
-0.2155691385,
0.209775418,
-0.069159463,
-0.2133927643,
0.3395882547,
0.0622996651,
0.1137941554,
0.0503295176,
-0.1222689971,
0.1663968712,
-0.1328350008,
-0.2397918254,
0.207164824,
0.3333910406,
-0.0232117139,
-0.1224120781,
-0.3166197538,
-0.0340987481,
0.2037834674,
-0.1332583725,
0.0731066465,
0.1535768807,
-0.1908333898,
0.4448906481,
-0.1607529372,
-0.2471764982,
-0.2035760581,
0.2230089456,
-0.0560774505,
-0.1549070776,
0.3460103869,
0.0703346655,
-0.2152763009,
-0.0868806764,
-0.2449208647,
-0.5157616735,
-0.6391205192,
0.0039498,
-0.0094850119,
-0.0789395198,
-0.0374825634,
-0.1002264023,
-0.0345668979,
0.0615463704,
-0.171059072,
-0.380785197,
-0.3611551225,
-0.0775750205,
-0.2952840328,
-0.242646426,
0.3079384863,
0.4326149225,
-0.1670420319,
0.0161496792,
-0.1870009303,
0.0160833895,
-0.2430728078,
0.0738096386,
0.3819099665,
0.1014139503,
0.0283043627,
-0.2471321523,
0.0675149262,
0.251419425,
0.0723229572,
-0.0623426549,
-0.2687621713,
0.1546283811,
0.1230136231,
-0.278577745,
0.0864051431,
-0.0441080406,
-0.0793232545,
-0.0326586142,
0.0861338228,
0.2610130906,
0.0105814934,
0.1664053351,
-0.1115659326,
0.2535095513,
-0.30656901,
0.1966225356,
-0.2346198708,
0.1273009926,
0.3725924492,
0.374132812,
-0.1633792669,
0.1346495152,
-0.1232431605,
-0.0570580848,
-0.0684483573,
0.0464609042,
0.1407158673,
-0.3885396421,
0.4025597572,
0.2372419238,
0.1293118894,
0.432508558,
-0.2429381311,
-0.0492090024,
0.5442179441,
0.1642726064,
-0.0937438533,
-0.3481790125,
0.2209467143,
-0.1336958259,
-0.1583758295,
0.2469579428,
0.2552709877,
-0.1648264527,
0.0688955337,
0.1421236843,
0.2679085433,
0.1017659754,
0.4142141044,
0.6663318872,
0.1814168394,
0.1696005762,
0.2866256535,
-0.0415889099,
0.1526287496,
0.5017254353,
-0.6278282404,
-0.0965940878,
0.00011007,
-0.1842855662,
0.1180710867,
-0.4840863049,
0.0602840856,
-0.0797040462,
0.1539479643,
0.1224922761,
0.1548447609,
0.3634155095,
-0.19151631,
-0.1740548313,
-0.0785613433,
0.1549069583,
-0.2351357341,
0.1976986825,
0.3357442915,
0.0950485244,
-0.0111599322,
0.0491793714,
-0.0599995889,
-0.1406822205,
0.4470031857,
0.1713102162,
-0.2664545476,
-0.5425674319,
0.1834225059,
0.2370389402,
-0.0344795138,
-0.0858569071,
0.0999337509,
0.1509660184,
-0.4036349356,
-0.1313198954,
-0.052373562,
0.7369081974,
0.4600362182,
0.2195329219,
0.0216746982,
-0.2568705976,
0.0872551501,
-0.046504721,
0.2174443752,
-0.122560218,
0.4390100241,
0.0807262883,
0.1086467952,
-0.1789754331,
-0.1932831854,
0.1670221835,
0.3879323006,
-0.1482105851,
0.2572209537,
-0.1718730181,
-0.3101620376,
-0.137986958,
0.236883983,
-0.1211682558,
0.1966705918,
0.4020818174,
0.0783709288,
-0.0255222898,
-0.1421806663,
0.0334618613,
0.0486806333,
0.5396218896,
0.4285239279,
0.3805049658,
-0.1084982008,
-0.2067134231,
-0.6746647358,
0.0725475326,
-0.2001444101,
-0.1697265655,
0.1836580187,
-0.0501270741,
-0.0803679004,
0.3043618202,
0.1199089214,
0.0636595264,
0.4061343074,
0.1195967346,
-0.190737471,
0.0294411648,
-0.3364818692,
-0.0819065273,
0.0027694064,
-0.5376127958,
0.1335544139,
-0.2152360678,
0.0179142263,
-0.3247642815,
-0.1138894632,
-0.0278928522,
0.0190407597,
0.5973479748,
0.2429446578,
0.627661705,
0.040598359,
-0.1932166219,
-0.2600381374,
-0.0696631372,
-0.2107816339,
-0.0389158241,
-0.031361226,
0.0530103445,
-0.2201778293,
-0.0530226789,
-0.4429378808,
0.5793264508,
0.1380111426,
0.1636004746,
-0.2278626263,
0.1884111315,
-0.2345717996,
0.2354549617,
0.0957450792,
0.1250541955,
0.1147531867,
0.2572215497,
-0.2979015112,
-0.2864818871,
0.5947666168,
-0.456785351,
-0.1400328577,
-0.1205132678,
0.2115678489,
0.1151131243,
-0.4714075029,
-0.4725929797,
0.1720367372,
0.1515992284,
-0.1273197383,
-0.3696570992,
0.2614586949,
-0.1084452048,
0.0392041244,
0.0291061159,
0.4668177068,
0.0047007105,
-0.2129874378,
0.3137938082,
-0.0828800127
] |
https://github.com/huggingface/datasets/issues/3071 | Custom plain text dataset, plain json dataset and plain csv dataset are remove from datasets template folder | Hi @zixiliuUSC,
As explained in the documentation (https://huggingface.co/docs/datasets/loading.html#json), we support loading any dataset in JSON (as well as CSV, text, Parquet) format:
```python
ds = load_dataset('json', data_files='my_file.json')
``` | ## Adding a Dataset
- **Name:** text, json, csv
- **Description:** I am developing a customized dataset loading script. The problem is mainly about my custom dataset is seperate into many files and I only find a dataset loading template in [https://github.com/huggingface/datasets/blob/1.2.1/datasets/json/json.py](https://github.com/huggingface/datasets/blob/1.2.1/datasets/json/json.py) that can handle my circumstance. I'm afraid these templates are too old to use. Could you re-add these three templates to current master branch?
| 28 | Custom plain text dataset, plain json dataset and plain csv dataset are remove from datasets template folder
## Adding a Dataset
- **Name:** text, json, csv
- **Description:** I am developing a customized dataset loading script. The problem is mainly about my custom dataset is seperate into many files and I only find a dataset loading template in [https://github.com/huggingface/datasets/blob/1.2.1/datasets/json/json.py](https://github.com/huggingface/datasets/blob/1.2.1/datasets/json/json.py) that can handle my circumstance. I'm afraid these templates are too old to use. Could you re-add these three templates to current master branch?
Hi @zixiliuUSC,
As explained in the documentation (https://huggingface.co/docs/datasets/loading.html#json), we support loading any dataset in JSON (as well as CSV, text, Parquet) format:
```python
ds = load_dataset('json', data_files='my_file.json')
``` | [
0.2397148758,
-0.3320982158,
-0.0408485979,
0.3953283131,
0.1127283648,
0.2876621783,
0.1925071627,
0.1587703377,
0.2423329651,
-0.1266016215,
-0.3314575255,
0.1281609088,
-0.1774953157,
0.2487667352,
-0.103711836,
-0.130127281,
0.0871858671,
0.2242774665,
0.0038969533,
-0.048604425,
-0.2215839475,
0.3855487704,
0.116410315,
-0.2304293662,
-0.0053819986,
0.0183716696,
-0.2670786083,
0.1515718102,
-0.2334828675,
-0.4484165907,
0.1706113368,
0.2603549957,
0.2933292985,
0.3570084572,
-0.0001270182,
0.0855693743,
0.1895281076,
-0.1176055148,
-0.416524142,
-0.1284475774,
-0.332868576,
-0.3567738235,
0.3995293379,
0.0487889126,
-0.1988207996,
-0.492228359,
-0.1915898025,
-0.1317304224,
0.5035948157,
0.2088763565,
0.0827729553,
0.0383540541,
-0.1548606306,
-0.107883662,
0.049498491,
0.600278616,
-0.0121492045,
0.2295688093,
0.4843373299,
0.0863156021,
0.1955572665,
0.0946904421,
0.0150247989,
0.0831777155,
0.4629557133,
0.0208379123,
0.0096442951,
-0.1580658555,
-0.1981610656,
0.1376043111,
0.4504591525,
-0.3374324441,
-0.403801769,
-0.5566545129,
0.0242958162,
-0.3005296886,
-0.0943674892,
-0.0194391049,
0.1944103241,
0.1993810534,
-0.2086915225,
-0.4415774047,
-0.077004984,
0.2398842126,
0.2977451384,
-0.0771940723,
-0.2071595639,
-0.0595258549,
0.029685095,
0.0251893401,
0.0668663457,
-0.3175987303,
-0.0541375838,
0.0322852693,
0.2081819624,
0.0221924875,
0.0432683378,
-0.149715215,
0.0414741188,
0.4109559655,
0.3230082691,
0.0359936357,
-0.1076199859,
-0.0438908897,
0.308681041,
-0.1575551331,
0.0908614546,
-0.2401915491,
0.1258212626,
0.3245790005,
0.1483539343,
-0.2518950105,
0.002308686,
0.1757756323,
-0.2206166983,
-0.0294434875,
0.3159922063,
-0.1350585371,
0.109447971,
-0.2391661853,
0.1018564329,
-0.1552808136,
0.0484646857,
0.1559967399,
0.0737821013,
0.1199027374,
-0.1991562843,
0.1684159786,
-0.0012952868,
-0.0881194323,
-0.0571256429,
0.107263431,
-0.1512747854,
0.0625318065,
0.3269739151,
-0.4262292683,
0.1753564328,
0.3152213693,
0.1370834708,
-0.1612690985,
-0.1031879038,
0.0785498843,
0.0275693871,
-0.0194566771,
-0.1305348724,
0.3504500091,
0.1866630912,
-0.0250371937,
-0.2299424857,
-0.317636162,
-0.4796578288,
-0.4421069622,
0.0077493303,
0.028126834,
-0.184062764,
-0.0144503554,
-0.6208385229,
0.0688328147,
-0.2443321645,
0.0150117092,
-0.0344264917,
-0.2237186432,
0.045417171,
-0.1178496853,
-0.1009648964,
0.6085811853,
-0.4475252032,
-0.205144912,
-0.1917372197,
-0.1002581194,
-0.12422961,
0.4132974744,
-0.2120758742,
0.335585773,
-0.4235164821,
-0.2918104827,
0.1010815501,
-0.3979909718,
-0.0674587712,
0.2771719694,
0.1737131923,
0.3372459412,
0.1782289445,
-0.2543136179,
0.2949807942,
-0.0832667351,
0.1074689329,
-0.0382451303,
0.2500596941,
-0.0525425076,
0.0474157296,
-0.2523854971,
-0.0321012735,
0.1409665793,
-0.0292489808,
0.1200669408,
0.0816778094,
-0.1346356571,
0.1620997339,
-0.1568423212,
0.0757811144,
0.5549688339,
0.1322447509,
0.1574084759,
0.1006557792,
-0.0453231335,
-0.7832225561,
0.145456925,
0.1175627634,
0.0269905068,
-0.1429137737,
0.0296680517,
-0.1743670106,
-0.2783117592,
-0.5661079288,
0.0545508526,
-0.0431764163,
0.2712214589,
0.2243045866,
-0.2082614154,
-0.1836108565,
0.1898403168,
-0.1496699303,
0.3285489678,
-0.4608426988,
0.1921833605,
0.2395592779,
0.0532000326,
0.2668138742,
0.3015272021,
0.1350749582,
-0.3465777636,
0.1267356426,
0.0461854599,
0.0917382017,
0.2308923006,
0.0867486075,
0.2341104895,
0.1296196431,
-0.1140034422,
0.2505320609,
0.1158946902,
-0.1319597811,
-0.2133676708,
-0.2606642246,
0.5038950443,
-0.0521394908,
0.3009725511,
-0.0150967846,
-0.2108558118,
0.3173793554,
0.1088862047,
-0.0965019986,
-0.4358345866,
-0.0398295373,
0.2355493009,
0.2854885161,
0.0052204751,
-0.2784568369,
0.0539462715,
0.454061985,
-0.1289983243,
0.045070719,
0.1819263399,
-0.2471078932,
-0.1772561669,
0.0697942674,
0.0478819944,
0.4118825197,
0.1054504514,
-0.1226218343,
0.0757025778,
0.3979729116,
-0.3457883298,
0.1606610715,
-0.0312533788,
-0.016178323,
0.3589908779,
0.3641777933,
-0.170521453,
-0.5319750309,
0.0122349365,
0.0764479041,
0.2014377415,
-0.2536534965,
-0.0643997267,
-0.5378641486,
-0.1128429174,
-0.1268004477,
-0.1751128435,
-0.3331823647,
-0.2573070824,
0.0661083683,
0.0955180377,
0.0357882902,
-0.0074394657,
0.2278430313,
0.2622529566,
-0.3420830369,
-0.2399760783,
-0.4923954308,
0.0763995573,
0.0508606546,
-0.0635071099,
0.1058096737,
-0.0384407118,
0.304107368,
-0.196871832,
0.0930494368,
-0.5297381878,
-0.059538655,
0.1809661984,
-0.1568979472,
0.1744409055,
0.4398269057,
0.2253000587,
0.1713787913,
0.0832551047,
0.1815665364,
0.0382153317,
-0.1479777843,
-0.0162075981,
-0.2678100467,
0.3210026324,
0.0637023225,
-0.2019532174,
-0.3397629857,
-0.2309110612,
0.3177538216,
0.1296044886,
-0.0362548791,
0.2082757205,
0.0296571162,
-0.161469698,
-0.3054534197,
0.1565803438,
-0.224349767,
-0.5733682513,
0.2647681534,
-0.1850541234,
-0.0171696562,
0.1135955602,
0.1869443208,
0.2208565772,
-0.1500974447,
-0.3529198766,
-0.0823229626,
0.0041405605,
0.0001949813,
0.144459337,
0.0141252,
0.1902521253,
0.1661313176,
0.0782992244,
-0.0757938996,
-0.1163700446,
-0.2609503269,
0.0338218287,
0.1316010207,
0.0152775366,
0.4550559223,
-0.1840874702,
0.6422144175,
0.2391361594,
-0.0652931929,
0.3699790835,
0.0501431935,
0.5908278823,
-0.2770811021,
-0.5382220745,
-0.1669813097,
-0.0469094701,
0.2336169034,
0.2943534255,
0.1353858113,
0.3733932078,
0.0219456796,
-0.0147809638,
-0.2404708564,
-0.21549128,
0.0119367139,
0.1623507887,
0.0673810542,
0.0270643495,
0.0339475758,
-0.2630703449,
-0.122621268,
0.0677362978,
0.6186633706,
0.1842089593,
0.0208386853,
-0.6254526377,
0.0318106413,
-0.2534042597,
0.2629398704,
-0.0111908102,
-0.0383190662,
0.0312034842,
0.2303135097,
0.157139942,
0.0961916894,
0.4666506052,
-0.2096264809,
-0.0888841301,
0.3087800145,
-0.3565413356,
-0.099937968,
-0.1627462208,
-0.1400017887,
0.3957551718,
0.4385966957,
0.8707912564,
-0.2756323218,
-0.5535838604,
-0.0813208446,
0.2055552602,
-0.1258433759,
-0.1719008833,
0.037884485,
-0.0863093436,
-0.3238691688,
-0.0684999302,
-0.1108700186,
0.0817488357,
-0.1879000813,
-0.2762692273,
-0.0456581451,
-0.2236237228,
0.259899646,
-0.0027028227,
0.2243065238,
0.2140446454,
-0.0219609346,
0.1832161993,
0.4428210855,
0.5834465027,
0.4826786816,
-0.3791466057,
-0.4357997179,
-0.1137891337,
0.0565371066,
0.3294166923,
0.3544004858,
0.0616898462,
0.2598880529,
-0.0419841595,
0.0667062402,
-0.1764343083,
0.0556444637,
0.1638633013,
-0.1708322316,
-0.5641239882,
-0.553950429,
0.2473821789,
0.0682259351,
-0.0512730889,
0.1518602073,
-0.0332061164,
-0.4362905622,
0.0193366818,
-0.1102236658,
0.8184725642,
-0.2128971517,
0.3663314581,
0.1549927443,
0.0470312685,
0.58494699,
-0.2605105639,
-0.0726684108,
-0.2870001793,
0.1141041443,
-0.0544412881,
-0.1008695662,
0.1630161554,
0.2958575189,
0.1084232032,
0.4954238832,
0.1873217821,
0.565189898,
-0.2139371336,
0.5655242205,
-0.0982436687,
-0.235627532,
-0.6154531837,
-0.0256984532,
-0.034974996,
0.2329174727,
-0.1857506633,
-0.2753071487,
0.0537325032,
-0.093876183,
-0.0184274428,
-0.2036941797,
-0.1995723397,
0.1770752966,
0.0270680469,
-0.6273778081,
0.2591113746,
-0.0960471854,
0.1897982061,
-0.0095473602,
-0.3810174763,
0.0069084098,
-0.1997354478,
-0.2108619809,
-0.5080989003,
0.0606125817,
-0.1040564179,
0.1737435311,
-0.0217610728,
-0.0850809216,
-0.0375293978,
-0.4349860549,
-0.4135900438,
0.0915183425,
-0.2353129983,
-0.4879458249,
-0.3351947367,
-0.1737661511,
0.1738214195,
-0.1759113818,
-0.0330907963,
0.2972376943,
0.3138723373,
0.1156930402,
0.0633782148,
0.0006566455,
-0.1970031112,
0.203898415,
-0.1411626935,
-0.1996242851,
0.6020202041,
0.4652715623,
-0.0071298671,
-0.2594139576,
0.2235565931,
0.495408386,
-0.2445669621,
0.3371668458,
0.3427981138,
0.0464118719,
0.1150592566,
0.2810317278,
0.0847890973,
-0.2916143835,
0.0157086384,
-0.3692415357,
-0.2222075164,
0.2805104256,
-0.0775408745,
0.2553771734,
0.0525390729,
0.0838425606,
-0.0629567727,
-0.0682601705,
-0.1788811684,
0.5020659566,
0.3491006196,
-0.2081835121,
0.2474675626,
0.0279305354,
0.2416724563,
-0.0312434584,
-0.0703564212,
-0.1320528835,
-0.2092963457,
-0.0561097227,
-0.0623061657,
0.2378508002,
0.0599826276,
0.1167258769,
-0.0235117283,
0.1022679955,
-0.0047352989,
-0.2815436125,
0.1981865019,
0.0869061351,
0.2417763919,
0.4040038586,
0.0784539208,
-0.2678634226,
0.0225646831,
-0.0265090205,
0.0099457223,
0.2501045167,
0.0762328058,
0.0968987942,
-0.1562591493,
-0.0151989199,
-0.2200567424,
0.357901305,
0.2013137341,
0.2877315879,
0.3770961165,
-0.0652385429,
0.0511924475,
0.1926933229,
0.1744208783,
0.2288920134,
-0.1710598469,
0.179135859,
-0.0800210014,
0.0031706414,
-0.2048755586,
-0.2593629956,
0.3361970782,
0.3569964468,
0.0233874191,
0.3134402931,
0.2367906421,
-0.1320507079,
-0.0339871868,
-0.1296510547,
0.516795516,
0.1828440726,
0.2451101989,
0.5322087407,
0.346927911,
-0.2815813124,
0.3507432342,
0.3255013824,
0.0678586736,
0.3691199422,
-0.0144349048,
0.1529693156,
-0.019472383,
0.1393583715,
0.1166511849,
-0.5439651012,
0.031536907,
0.3507408798,
0.359975189,
0.1700488925,
0.0316475555,
0.6946238279,
0.1552208513,
0.0164806265,
-0.2761365175,
0.4400485158,
0.0393120907,
-0.3624322116,
-0.1201803833,
-0.1553038657,
0.0501351953,
0.1644178033,
-0.1823739558,
-0.348888427,
-0.0364742652,
-0.0296967346,
0.0394998118,
-0.3704347312,
0.2223232836,
0.1108416095,
0.12017712,
-0.0971241966,
0.0404444709,
0.0493648872,
-0.1824959069,
0.2374141067,
0.0927087143,
0.2702251077,
-0.0711825192,
0.1437924206,
0.1021001637,
-0.2955456376,
-0.0722976401,
0.0214577895,
0.2224892825,
0.0113723027,
-0.0236034486,
0.0481674485,
0.0105954828,
-0.000686196,
-0.039500773,
0.0625072867,
-0.2229226083,
-0.5362879634,
0.4446891546,
0.0980193689,
-0.253932476,
-0.0440499373,
0.0866357237,
-0.3530939221,
-0.3320171237,
0.6268610954,
0.3343161345,
0.0735884607,
-0.0419729948,
-0.0049105771,
-0.0872794464,
0.2071861178,
0.3080183864,
-0.0698980391,
-0.0940702409,
-0.1985960305,
-0.3967391849,
-0.2216920555,
-0.1128759384,
0.2133998573,
0.1673093736,
-0.0206812173,
0.2646416128,
-0.0550655834,
0.0640492961,
0.2023330182,
-0.2018713653,
-0.0731024072,
-0.3718400598,
0.0254064389,
-0.0412955247,
0.2429656684,
0.1624510288,
0.1796571761,
-0.0148763265,
0.2119984031,
-0.1789027154,
-0.3030984104,
0.3742583096,
-0.0755791515,
-0.2316542715,
0.3650611937,
0.0308675561,
-0.0605407879,
0.0498180613,
-0.351447612,
-0.236622557,
-0.2597874701,
-0.0146443248,
0.7678321004,
-0.103413634,
0.499036938,
-0.2677931786,
-0.1584914476,
-0.3570189178,
-0.1289311945,
-0.0488359667,
-0.1427121609,
-0.4016696215,
0.305246383,
-0.2093249708,
0.0754747614,
0.1338661462,
0.4009707272,
-0.1056904197,
0.1659179628,
-0.1892859191,
-0.0638161749,
0.2629091144,
-0.3657131493,
-0.1237750724,
0.0501316041,
0.220532164,
0.1568884254,
-0.1998212188,
-0.5905562043,
0.1804194748,
0.4231565595,
0.0044092163,
-0.0180161167,
0.2220932841,
0.0674595162,
-0.1042276174,
-0.1239817441,
0.1498662084,
0.3640444577,
-0.1567032635,
-0.1229707226,
-0.0457939208
] |
https://github.com/huggingface/datasets/issues/3064 | Make `interleave_datasets` more robust | Hi ! Sorry for the late response
I agree `interleave_datasets` would benefit a lot from having more flexibility. If I understand correctly it would be nice to be able to define stopping strategies like `stop="first_exhausted"` (default) or `stop="all_exhausted"`. If you'd like to contribute this feature I'd be happy to give you some pointers :)
Also one can already set the max number of iterations per dataset by doing `dataset.take(n)` on the dataset that should only have `n` samples.
Regarding the `iter_cnt` counter, I think this requires a bit more thoughts, since we might have to be able to backpropagate the the counter if `map` or other transforms have been applied after `interleave_datasets`. | **Is your feature request related to a problem? Please describe.**
Right now there are few hiccups using `interleave_datasets`. Interleaved dataset iterates until the smallest dataset completes it's iterator. In this way larger datasets may not complete full epoch of iteration.
It creates new problems in calculation of epoch since there are no way to track which dataset from `interleave_datasets` completes how many epoch.
**Describe the solution you'd like**
For `interleave_datasets` module,
- [ ] Add a boolean argument `--stop-iter` in `interleave_datasets` that enables dataset to either iterate infinite amount of time or not. That means it should not return `StopIterator` exception in case `--stop-iter=False`.
- [ ] Internal list variable `iter_cnt` that explains how many times (in steps/epochs) each dataset iterates at a given point.
- [ ] Add an argument `--max-iter` (list type) that explain maximum amount of time each of the dataset can iterate. After complete `--max-iter` of one dataset, other dataset should continue sampling and when all the dataset finish their respective `--max-iter`, only then return `StopIterator`
Note: I'm new to `datasets` api. May be these features are already there in the datasets.
Since multitask training is the latest trends, I believe this feature would make the `datasets` api more popular.
@lhoestq | 112 | Make `interleave_datasets` more robust
**Is your feature request related to a problem? Please describe.**
Right now there are few hiccups using `interleave_datasets`. Interleaved dataset iterates until the smallest dataset completes it's iterator. In this way larger datasets may not complete full epoch of iteration.
It creates new problems in calculation of epoch since there are no way to track which dataset from `interleave_datasets` completes how many epoch.
**Describe the solution you'd like**
For `interleave_datasets` module,
- [ ] Add a boolean argument `--stop-iter` in `interleave_datasets` that enables dataset to either iterate infinite amount of time or not. That means it should not return `StopIterator` exception in case `--stop-iter=False`.
- [ ] Internal list variable `iter_cnt` that explains how many times (in steps/epochs) each dataset iterates at a given point.
- [ ] Add an argument `--max-iter` (list type) that explain maximum amount of time each of the dataset can iterate. After complete `--max-iter` of one dataset, other dataset should continue sampling and when all the dataset finish their respective `--max-iter`, only then return `StopIterator`
Note: I'm new to `datasets` api. May be these features are already there in the datasets.
Since multitask training is the latest trends, I believe this feature would make the `datasets` api more popular.
@lhoestq
Hi ! Sorry for the late response
I agree `interleave_datasets` would benefit a lot from having more flexibility. If I understand correctly it would be nice to be able to define stopping strategies like `stop="first_exhausted"` (default) or `stop="all_exhausted"`. If you'd like to contribute this feature I'd be happy to give you some pointers :)
Also one can already set the max number of iterations per dataset by doing `dataset.take(n)` on the dataset that should only have `n` samples.
Regarding the `iter_cnt` counter, I think this requires a bit more thoughts, since we might have to be able to backpropagate the the counter if `map` or other transforms have been applied after `interleave_datasets`. | [
-0.2761626542,
-0.0267761201,
-0.2281200737,
0.0825817436,
-0.1436164826,
0.0176417418,
0.2350521237,
0.1321875006,
0.0668103099,
0.1262001544,
-0.0727010593,
0.2160599679,
-0.293736428,
0.2195408344,
-0.3901974857,
-0.0787840784,
-0.1078506485,
0.0256603323,
0.0055010775,
0.1084580943,
-0.0884692967,
-0.0392374694,
-0.2320857495,
-0.1774739474,
0.0324006453,
-0.1613915563,
-0.0217498336,
0.0201284382,
-0.133541733,
-0.4846922159,
0.3222346306,
0.4989811778,
0.0576685742,
0.1844523251,
-0.0001029102,
-0.2331841439,
0.3096973002,
0.1142620444,
-0.360604167,
-0.0330444649,
-0.5180082917,
-0.477447629,
-0.1173812747,
-0.3793341219,
0.0158073604,
0.1882889271,
-0.136042133,
-0.5695604682,
0.2349877059,
-0.0331540368,
0.2335600704,
0.3637518287,
-0.0868421197,
0.0042795036,
-0.0054749525,
0.0639813766,
-0.0719710141,
0.2152411938,
0.4655752182,
-0.2399193496,
-0.0605855696,
0.1811533868,
-0.1347376257,
-0.0486223474,
0.0804680064,
-0.2488143742,
-0.0615495369,
-0.4173455834,
-0.2095305622,
0.1878649741,
0.5767527223,
-0.1077379659,
-0.2158647329,
-0.3405232131,
-0.0137395263,
-0.3075168431,
-0.1475153118,
-0.0802641362,
0.0262688808,
0.1085492745,
0.0721837431,
-0.0207370073,
-0.2463062257,
0.1354743391,
0.0203033444,
0.0823239163,
0.0546910912,
0.1637767255,
0.4462386668,
0.0391026661,
0.0350314789,
0.1061129272,
0.0921783522,
-0.0442178734,
-0.6266489625,
-0.503303349,
-0.1581689119,
-0.2036352158,
0.2942442,
0.4275058508,
-0.2296902835,
0.0484991223,
0.1123306304,
0.0447132848,
0.4000860155,
-0.3253968954,
0.1758277714,
-0.1144141257,
0.0615939423,
0.1119978204,
-0.0483093262,
-0.003519858,
0.1458292603,
-0.349663347,
0.11504592,
0.1069428548,
0.0713466182,
0.0099366354,
-0.1509801596,
0.2501092553,
-0.5350491405,
-0.3373632431,
0.218386665,
-0.1414047629,
-0.0138420034,
0.2098987699,
-0.2002767026,
-0.1695431918,
-0.1640756279,
-0.6169528961,
-0.0785164535,
0.0631309673,
-0.2880619466,
0.2551537752,
-0.0768859237,
-0.0448969044,
-0.0647564456,
-0.0853221118,
0.2049807906,
0.159753859,
0.5050390959,
-0.3570486605,
0.1511261016,
-0.2078458816,
-0.028805105,
0.2093071193,
-0.0869179666,
0.1348392367,
-0.1966568381,
-0.1745512486,
-0.135131374,
-0.288330704,
-0.132542327,
0.1660278887,
-0.2140273899,
0.0277725812,
-0.0658381358,
0.3107148111,
0.30578655,
-0.1665900797,
0.3925977647,
0.090829812,
-0.1815750748,
-0.1461798251,
0.0994148701,
0.4297355115,
0.0119545991,
0.1964032203,
0.1481449008,
-0.0119801192,
0.0240346566,
0.2500755787,
-0.1783517599,
-0.0444203317,
-0.0417910963,
-0.0229498185,
0.1276229173,
-0.1836031526,
-0.1798062921,
0.2569541037,
-0.0539084002,
0.2733897567,
0.1144919619,
0.1367234141,
0.5195673704,
-0.3457625508,
0.0220503546,
0.5118299723,
-0.160142377,
-0.2958234847,
-0.4167277515,
-0.086557515,
0.1959230602,
0.1398714781,
0.2151270211,
-0.2331659794,
-0.0308476277,
0.0522227474,
0.2759746611,
0.1573490649,
0.2952463627,
-0.0553005077,
0.4072126746,
0.0379640386,
0.0288080778,
-0.4155164659,
-0.0262870621,
0.2050916255,
0.2495896816,
0.1296097636,
0.3035627902,
0.0488013029,
0.0404998995,
0.0614995174,
-0.1039399058,
-0.01783932,
0.1349076182,
-0.0732683539,
-0.0176342055,
0.0678858832,
-0.1362334639,
0.2613454759,
-0.3604566157,
-0.1066880822,
-0.65340662,
0.4651686251,
0.2425227016,
0.1305311918,
-0.1394575834,
0.3135088384,
-0.1479272544,
-0.1994354874,
-0.0461135507,
0.2845727205,
0.0486246273,
0.2347506434,
0.1556003094,
0.4761672616,
0.1809286773,
-0.1338783056,
0.0703294575,
-0.2648160756,
0.0606847703,
-0.0007646774,
0.3175529838,
0.3998209834,
-0.0225803051,
0.4803766906,
0.0087626055,
0.1190413982,
-0.0160874054,
-0.1284975708,
-0.5069757104,
-0.1207978278,
0.0210188236,
-0.2364460081,
0.2024458796,
-0.0713077113,
-0.2207448483,
0.1953629404,
0.2489751726,
-0.0248506498,
-0.3835273385,
0.0415533371,
0.0163259562,
-0.0897902995,
0.1042405739,
-0.1161223948,
0.2828413546,
0.1330424696,
0.1301642358,
-0.3483981788,
-0.0380273648,
-0.0086030373,
0.2595033646,
0.3655456305,
0.1674198061,
0.0564052723,
0.1204473153,
0.0014809724,
0.0527572073,
-0.5950493217,
-0.0385448821,
0.1770842522,
0.1096940637,
0.0640885532,
-0.2621548772,
-0.3680079281,
0.0681927726,
-0.6488364935,
0.0381750502,
-0.257752955,
-0.1157431379,
0.3055374026,
0.025289882,
0.1727220863,
-0.1768371463,
0.5564209223,
0.070098348,
0.227982536,
0.1557437479,
-0.2228522897,
0.039395947,
0.1696689874,
0.3473254144,
0.0329627357,
0.5358963013,
0.2583575547,
-0.3434817195,
-0.2942487299,
-0.1255072653,
0.1039746031,
0.0212982688,
0.1633990109,
0.246110335,
-0.0434244424,
0.257926017,
-0.1064334437,
0.0973774269,
-0.1943291128,
0.03528326,
-0.2851584256,
-0.0966189355,
0.1293206811,
0.1373204738,
-0.2061397135,
-0.3907788098,
-0.5744430423,
0.1830541641,
-0.2630295157,
-0.0226064119,
0.0733753517,
-0.0145275164,
-0.0554197654,
0.2439114451,
-0.1379729211,
-0.4275581241,
-0.4541753829,
0.0083820373,
-0.3154561818,
0.0962807313,
-0.2089748681,
-0.2178546339,
0.3601082563,
0.0404323712,
-0.2113342732,
-0.1156140566,
-0.1259365678,
0.1275995523,
-0.25697276,
0.0564380884,
0.0040962938,
-0.0781360865,
-0.0251575522,
0.1415208429,
-0.1160396338,
0.2345011085,
0.33520329,
0.1150433421,
0.1914424449,
0.4896913171,
0.2744141221,
0.7609333992,
0.3432421982,
-0.0963389203,
0.142967239,
0.2494645417,
-0.0945328698,
0.0588525832,
-0.5456919074,
0.4895896912,
0.0015681223,
-0.0970306322,
0.2695907354,
-0.286446631,
-0.1988336593,
-0.0486961938,
-0.3061585128,
0.3671477139,
-0.3562508523,
0.2613588572,
-0.3317248523,
0.27297768,
-0.1511546969,
-0.1053208858,
-0.278429389,
-0.004035803,
-0.0373990685,
0.2130173445,
0.1948437095,
-0.0525230505,
-0.3240876496,
-0.0642312467,
-0.2332120538,
0.1742207855,
0.0873204768,
0.345932126,
0.2818591595,
-0.105315879,
-0.0817433372,
0.1582345068,
0.7222215533,
-0.3114627302,
-0.5551156998,
0.1340234727,
0.0648699626,
0.0192037839,
-0.3548582494,
0.0180470198,
0.2959226668,
0.2212910801,
-0.1563899964,
-0.2084855586,
-0.2348103523,
0.3737162054,
0.3056000769,
-0.0898227394,
-0.0704468712,
0.0619201474,
0.0762164593,
-0.3441216946,
0.2873844802,
0.0337309986,
0.0461927503,
-0.1047631577,
-0.2671455443,
0.0188835207,
0.012785376,
0.1973580569,
0.0906035155,
-0.1157366857,
0.0169609766,
0.5883552432,
0.0182771757,
-0.1489591897,
0.5764240623,
0.1549021453,
-0.2434139103,
-0.1515685618,
0.2016177177,
-0.1040413529,
0.4035460949,
0.2890859544,
0.0742718577,
0.5085603595,
0.0030642289,
0.3295544982,
-0.2448315173,
0.0780162662,
0.1664182544,
0.1162916198,
-0.7030425668,
-0.590485692,
0.0642056689,
0.0322855078,
-0.0761826858,
0.4305678308,
-0.115800634,
-0.2085127532,
0.0508219227,
0.3368352056,
0.8604176044,
0.360619247,
-0.0750161484,
0.0744652748,
0.2545908093,
0.449174583,
-0.0362083092,
0.1329980195,
-0.0857974514,
-0.3474788666,
-0.0031945088,
0.0241820477,
0.1616621912,
-0.0709153116,
-0.0723145306,
0.2523295581,
0.3672229052,
0.0938563794,
-0.17213884,
0.3993476927,
0.0004499771,
-0.41174981,
0.3311938345,
0.2221333534,
0.0046207979,
-0.1825019717,
0.0168254115,
-0.3654454648,
0.3470976353,
0.1927722245,
-0.3309963048,
-0.2824005187,
-0.0503113903,
0.216730237,
0.0079709608,
-0.3740527034,
0.3721043468,
-0.4396039844,
0.2947409749,
-0.0674411207,
0.0102867745,
-0.186262086,
0.0138871651,
-0.107808359,
-0.2023714334,
-0.2371544242,
0.4169392884,
-0.0831814036,
-0.1120240018,
0.1351840198,
0.2699114978,
-0.363661021,
-0.1257140636,
0.2061719447,
0.2581404746,
-0.188208878,
-0.0663169548,
0.3081656694,
-0.2076971382,
-0.234886378,
0.1007845998,
0.2526904941,
-0.1056422219,
0.48655653,
-0.4305216074,
0.0784016401,
-0.256313622,
0.0552774742,
0.1049218774,
-0.2500307262,
0.1733135879,
-0.0421512723,
-0.182471022,
-0.2439904958,
0.0096364385,
-0.0839388371,
0.0362471342,
0.1757906675,
-0.0082289251,
0.1885090172,
0.0617012121,
0.0123106856,
0.0951648951,
0.2268522978,
0.0752978846,
-0.2638118863,
-0.0574302077,
0.2188041061,
-0.206100449,
0.3463867903,
-0.385748595,
0.1912776828,
-0.2178329974,
0.1579710394,
-0.3925349712,
-0.0741575211,
-0.1421019733,
-0.0490503497,
0.2183902711,
-0.2363431603,
-0.2576970756,
0.0037254954,
-0.0201670714,
0.2137810439,
-0.1747779548,
-0.1919153631,
-0.1987366229,
0.133746475,
-0.0492800362,
-0.0509340577,
0.1770399809,
-0.2157661915,
-0.1235648468,
-0.2638663948,
-0.2277896404,
0.0387179628,
-0.0440592542,
0.0838172883,
-0.0177758429,
-0.0336238593,
-0.2228915095,
0.3209040463,
0.1810186505,
-0.1575000733,
0.2742424607,
0.355466783,
0.0772905424,
-0.0979991853,
-0.0463829301,
0.1929279715,
0.0931088179,
0.0357314087,
0.1579048336,
0.2035206854,
-0.3657192588,
0.4008671939,
0.124593921,
0.5284941792,
-0.0122590521,
-0.0422281921,
0.2203851491,
0.2677904665,
-0.0073692356,
-0.0058886739,
0.2005664855,
-0.1447496861,
0.3313490748,
0.3302953839,
0.4344480038,
-0.1080451757,
0.2477636933,
0.0702165812,
0.0477190129,
-0.2505245507,
0.1798581332,
0.0360429101,
0.2099447548,
-0.1680547297,
0.2113362253,
-0.0052543571,
0.5013081431,
-0.0486741439,
-0.2820392549,
0.7008604407,
0.4868066013,
-0.11184825,
0.166610077,
-0.2292528152,
-0.1280578822,
-0.075815551,
-0.0389574692,
0.2300097942,
0.1298476756,
0.3741781712,
-0.17259565,
-0.2706383467,
-0.125459671,
0.0742492452,
0.107614994,
0.1227596253,
-0.2761703134,
-0.2444304675,
-0.2058436722,
-0.162746653,
0.092213586,
-0.2115715295,
0.4800365269,
-0.123580955,
0.0213443227,
-0.2118493468,
-0.0869558081,
0.1720244884,
0.4276495278,
-0.1635295451,
-0.2379618734,
0.1962097734,
-0.3103709519,
-0.2285367399,
0.106379576,
0.0269810241,
0.2037806213,
-0.1482574642,
0.1129838005,
0.2376998812,
-0.0922173411,
-0.1495512575,
0.2032451779,
-0.1262734383,
-0.4152325988,
0.2803137302,
0.1475587189,
-0.1699875295,
0.1470807046,
0.2744928598,
-0.0336759277,
-0.6721982956,
-0.2449236661,
0.5375427604,
-0.0481823981,
0.0871027261,
0.0781857297,
-0.3772150278,
-0.0396196507,
0.0426837243,
-0.1299320012,
0.0467182323,
-0.0969446748,
0.1100036725,
-0.320874691,
0.3577213585,
0.2421654761,
0.0408682823,
-0.179705292,
-0.0914953277,
-0.3529822528,
0.0526255257,
-0.2286632955,
0.0480630472,
0.0186271556,
0.3561455309,
0.2489047199,
0.0996083245,
0.141441077,
-0.2141195685,
-0.0598050095,
0.3682254851,
-0.5179527998,
-0.236841768,
0.2555785775,
-0.0939005762,
0.1941444278,
0.0620495752,
-0.0315496661,
0.0236588027,
0.0231518839,
-0.0510143191,
-0.2416455001,
0.3693784475,
-0.0077326493,
0.4189554155,
0.1523561925,
-0.0776539221,
-0.1758160442,
0.0051944703,
-0.3048619926,
0.0684786811,
-0.2062593251,
0.1330435574,
0.2166733295,
0.3807476461,
-0.1131553724,
0.1587845087,
-0.1512965858,
0.2788232267,
0.1332842857,
0.1524124891,
-0.3281281888,
0.0761575252,
0.2165745497,
0.269549638,
-0.2904874682,
0.4091742039,
0.1117756665,
0.1499643922,
-0.2570094764,
-0.182657972,
0.1130364612,
-0.171718806,
-0.2804019451,
-0.3152144253,
0.265955925,
0.2362642437,
0.1107179224,
-0.2155899107,
-0.2418521792,
0.3096811473,
-0.0879577175,
-0.2252341658,
0.4660971463,
0.3410204053,
0.1739435196,
-0.1150403917,
0.065143846,
0.0082160868,
-0.2375076562,
0.2921960354,
-0.2606096566
] |
https://github.com/huggingface/datasets/issues/3063 | Windows CI is unable to test streaming properly because of SSL issues | I think this problem is already fixed:
```python
In [4]: import fsspec
...:
...: url = "https://moon-staging.huggingface.co/datasets/__DUMMY_TRANSFORMERS_USER__/my-dataset-16242824690709/resolve/main/.gitattributes"
...:
...: fsspec.open(url).open()
Out[4]: <File-like object HTTPFileSystem, https://moon-staging.huggingface.co/datasets/__DUMMY_TRANSFORMERS_USER__/my-dataset-16242824690709/resolve/main/.gitattribu
``` | In https://github.com/huggingface/datasets/pull/3041 the windows tests were skipped because of SSL issues with moon-staging.huggingface.co:443
The issue appears only on windows with asyncio. On Linux it works. With requests it works as well. And with the production environment huggingface.co it also works.
to reproduce on windows:
```python
import fsspec
# use any URL to a file in a dataset repo
url = "https://moon-staging.huggingface.co/datasets/__DUMMY_TRANSFORMERS_USER__/my-dataset-16242824690709/resolve/main/.gitattributes"
fsspec.open(url).open()
```
raises
```python
FileNotFoundError: https://moon-staging.huggingface.co/datasets/__DUMMY_TRANSFORMERS_USER__/my-dataset-16242824690709/resolve/main/.gitattributes
```
because of
```python
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host moon-staging.huggingface.co:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1131)')]
``` | 26 | Windows CI is unable to test streaming properly because of SSL issues
In https://github.com/huggingface/datasets/pull/3041 the windows tests were skipped because of SSL issues with moon-staging.huggingface.co:443
The issue appears only on windows with asyncio. On Linux it works. With requests it works as well. And with the production environment huggingface.co it also works.
to reproduce on windows:
```python
import fsspec
# use any URL to a file in a dataset repo
url = "https://moon-staging.huggingface.co/datasets/__DUMMY_TRANSFORMERS_USER__/my-dataset-16242824690709/resolve/main/.gitattributes"
fsspec.open(url).open()
```
raises
```python
FileNotFoundError: https://moon-staging.huggingface.co/datasets/__DUMMY_TRANSFORMERS_USER__/my-dataset-16242824690709/resolve/main/.gitattributes
```
because of
```python
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host moon-staging.huggingface.co:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1131)')]
```
I think this problem is already fixed:
```python
In [4]: import fsspec
...:
...: url = "https://moon-staging.huggingface.co/datasets/__DUMMY_TRANSFORMERS_USER__/my-dataset-16242824690709/resolve/main/.gitattributes"
...:
...: fsspec.open(url).open()
Out[4]: <File-like object HTTPFileSystem, https://moon-staging.huggingface.co/datasets/__DUMMY_TRANSFORMERS_USER__/my-dataset-16242824690709/resolve/main/.gitattribu
``` | [
-0.354352355,
0.0034217243,
0.0198071152,
0.0342933424,
0.0507179536,
-0.1108404174,
0.2119017243,
0.131444484,
0.028769182,
-0.0833966061,
0.0598858893,
-0.2223212123,
0.1826367676,
0.2124496251,
-0.0842105299,
-0.102616176,
0.0015288341,
-0.2221381366,
0.0797981322,
0.1013273373,
-0.1483763009,
0.2218105048,
-0.1631115079,
-0.2483711243,
0.0282208733,
-0.097083807,
-0.1524080187,
0.2261844128,
-0.0843155012,
-0.1519061625,
0.3168168068,
-0.0242451001,
0.1006000862,
0.3102076948,
-0.0001256052,
0.1159604564,
0.4257008433,
-0.0735929459,
-0.1649600863,
-0.0896569714,
-0.0487795398,
0.1262587011,
-0.0519585162,
0.1272165626,
-0.1898978204,
0.2872739732,
-0.0654393211,
-0.2645673752,
0.3044871688,
0.369735837,
0.0502638072,
0.6486271024,
-0.1948170662,
0.1332776695,
-0.0445337631,
0.2740882039,
-0.1210537329,
0.1870934516,
0.2344524413,
-0.1632011086,
0.0114353132,
0.0519904085,
0.0575875267,
-0.0248537753,
-0.2013207674,
-0.025243694,
-0.0615368076,
-0.4755299985,
0.1112511382,
-0.0192216951,
0.0919250697,
-0.182092756,
-0.3352395594,
0.0066400794,
-0.0352363735,
-0.0330465734,
0.3889963925,
0.4129363298,
-0.2233092189,
-0.1475993693,
-0.2206350565,
0.1108859628,
-0.298828721,
0.2456121892,
0.1633146554,
0.0565294884,
-0.1586240679,
0.1210287735,
0.0075567546,
-0.1215823814,
-0.2040594667,
-0.3106708527,
-0.3100169003,
0.0135262096,
-0.3462364674,
-0.1128348187,
-0.1071452796,
0.3016142845,
-0.0281992164,
0.4423435926,
-0.0670458525,
0.0521027744,
0.3095787168,
0.0470108874,
0.0270675458,
0.3487999737,
0.2669853866,
-0.0430110395,
0.555398643,
0.5416620374,
0.1450489908,
0.0070085614,
-0.0796130747,
-0.4109812677,
-0.5638800859,
-0.0065119439,
0.6815709472,
-0.415949434,
-0.3877806664,
0.0852676332,
-0.3326853514,
-0.0487377346,
0.2230422795,
0.3753297329,
0.1078904271,
0.1556037664,
0.0414420106,
0.3619267344,
-0.1772623211,
0.1067659408,
0.0516679995,
-0.1916961521,
-0.0455030426,
0.2198714316,
0.5214276314,
-0.0763026178,
0.2492324412,
0.0417199023,
0.2694269121,
-0.0677996501,
-0.0662207603,
0.068945162,
0.2365227491,
0.3781506121,
0.1813644618,
0.0680552498,
0.0001432557,
-0.0633998513,
-0.0695229918,
-0.0530408174,
0.0870256871,
-0.0660540611,
0.2422848195,
0.0555335097,
-0.4479528666,
-0.0627524629,
-0.1213540509,
-0.0325019136,
-0.1565563828,
-0.0136665488,
0.1629216522,
-0.0629072338,
-0.1408005655,
0.1388533115,
0.3069669008,
0.4528587759,
0.3826235533,
-0.2743982375,
0.1454560608,
-0.0962863415,
0.1617183685,
0.385291636,
0.0428223088,
-0.3558398485,
-0.3128454685,
-0.0219434761,
0.0151560614,
-0.2400059998,
-0.5203031898,
0.5559725165,
0.0358434394,
0.2131424546,
0.1763976812,
-0.0707729086,
0.3806972802,
0.0235637128,
-0.0875861049,
0.1388109326,
-0.0072863158,
0.0403366163,
-0.2413898557,
-0.2984218895,
-0.1722082496,
0.160816893,
-0.2495588511,
0.1097410694,
0.1748132557,
-0.0763374344,
0.2224630415,
-0.017277902,
-0.0035832524,
0.154145807,
0.5449123979,
-0.1085760072,
0.0107051628,
0.2868560255,
-0.5678370595,
0.1539327204,
0.0707013234,
0.1635652035,
-0.2626014948,
-0.2345350385,
0.1239507869,
0.0243810508,
-0.108152613,
-0.5437306762,
-0.0796097517,
0.2259244919,
0.3211644888,
-0.075787738,
0.0946623906,
0.0847373307,
-0.0091291713,
0.0257860869,
-0.1007328853,
0.3716409504,
-0.1310217381,
-0.1361418217,
0.212908119,
0.0635739714,
0.2995782793,
-0.315056324,
-0.0858871117,
0.1598909348,
-0.1246623993,
0.3734058142,
0.2078060061,
0.4243704379,
0.4627770782,
-0.498663336,
-0.2132528275,
0.6479543447,
-0.040758647,
0.1814226359,
-0.2019174099,
0.4523841441,
-0.2229153514,
0.3383367062,
0.1330454946,
0.2408159524,
0.2969436944,
-0.0994413868,
-0.4279640019,
0.1542134434,
0.6061841846,
-0.2365878373,
-0.156320706,
-0.122171253,
-0.1459847391,
0.0173813887,
0.118777208,
-0.1694775224,
-0.1393553019,
0.1243505925,
-0.1064148247,
0.1199971214,
0.25277403,
-0.067319423,
0.4469707906,
-0.0795333087,
-0.114668034,
0.326713562,
-0.0286483429,
-0.4041204751,
0.3785721064,
0.1742649674,
-0.529968977,
0.1651254892,
0.0334791653,
0.0171060897,
-0.4112296104,
-0.0617914759,
0.2394534498,
0.0368295163,
-0.4693357646,
0.1741779,
-0.0134170512,
-0.3946729898,
-0.267273277,
-0.0977182239,
-0.2567537725,
-0.1608510613,
-0.0846930593,
0.4543421865,
-0.3679558039,
0.2305579185,
-0.1533097923,
0.3281267881,
0.2198003531,
-0.338839829,
-0.2680552304,
0.0348572172,
-0.0899651274,
0.0275851507,
0.4766932726,
-0.331957072,
0.2846602201,
-0.2303346395,
-0.0388994776,
-0.4945639968,
-0.4030043185,
-0.0059384932,
0.1876982003,
0.5563306808,
-0.2929015458,
0.1156144813,
0.0900929123,
-0.2526040077,
0.2472032309,
-0.4906113148,
-0.0893013924,
0.0471944958,
0.0073554683,
-0.2612390518,
-0.3027017117,
-0.1954979897,
0.1596341878,
-0.2441182882,
0.2415453941,
-0.2124280483,
-0.0576147996,
-0.0586838685,
-0.0694765747,
-0.0450457521,
0.0413019471,
-0.2106052786,
-0.0918875039,
-0.4115784764,
0.2073515505,
-0.0037109435,
-0.5209704638,
0.0635149702,
0.1812873036,
0.0283919983,
-0.02706277,
-0.4344806969,
-0.2439691275,
-0.1412710398,
0.3977647722,
0.1795967668,
-0.1648499072,
0.0508696176,
-0.2716767788,
0.0724269673,
-0.1170073673,
-0.1901364475,
0.0704550296,
0.1410787553,
0.2725575566,
0.0390481465,
0.3403048813,
-0.0361914635,
0.6463868618,
0.5762210488,
-0.1934783906,
0.2602938414,
-0.109471418,
0.0681628585,
0.4510734677,
-0.2222088724,
0.3604086936,
-0.1615879387,
0.135405615,
0.3533317447,
0.1629254222,
0.06660036,
-0.2013647854,
0.0237342697,
-0.0527508445,
-0.4586704969,
0.1565628052,
-0.3804683983,
0.4133293629,
0.0821458548,
0.2005486488,
0.350259304,
-0.3077577055,
0.2544075847,
0.6406585574,
-0.0100258552,
0.0482451357,
0.0133054424,
-0.3494971693,
-0.678625524,
0.3148617446,
0.0633833706,
0.8817678094,
-0.2992218733,
-0.0597954728,
-0.0015529294,
-0.183352977,
0.6009377241,
0.0252178758,
0.1883447468,
0.1558782458,
-0.0850384533,
-0.1935125291,
-0.0680602342,
-0.2964985073,
0.1062428877,
0.1420727223,
0.5295228958,
-0.0617774017,
-0.0865294933,
-0.2021666467,
-0.0848823935,
0.0211695656,
0.1148652732,
-0.3521085978,
-0.3639077246,
-0.1918914765,
0.268435806,
-0.1703605503,
-0.0379919298,
-0.581720829,
0.2373066097,
0.1256251782,
0.1323844939,
0.1049461067,
0.1767213196,
0.02874236,
0.031539239,
0.3064982295,
0.391598016,
0.4424009621,
0.1725357026,
0.7667027116,
0.2077957094,
-0.3386178017,
0.3461310565,
0.2423913479,
-0.0521170609,
0.4009889662,
-0.0788548514,
0.1433257759,
0.283180058,
0.2070762366,
-0.5934994817,
0.1747964621,
0.336790204,
0.3475395143,
0.1291127801,
0.0347979777,
0.1176316366,
-0.2564025223,
-0.043229565,
0.075335823,
-0.0747328699,
-0.0624772273,
-0.1211596429,
-0.0276973099,
0.6129004955,
0.1745699197,
0.1564966142,
0.1456301659,
-0.4241720736,
0.0786549971,
-0.081945993,
0.1831202358,
-0.0261399914,
0.0964656025,
-0.0172067918,
-0.1832128912,
0.4889026284,
-0.2752951384,
-0.4198782742,
0.0502418689,
0.4786467254,
0.4271408319,
0.2497342527,
0.1638198644,
-0.2609253228,
-0.0812288597,
-0.3544981778,
0.0344901904,
0.078515172,
0.5296278,
-0.067567043,
-0.0295007098,
0.1659638733,
-0.4157522321,
-0.2298304886,
0.3651676476,
-0.4647427201,
-0.0529116429,
-0.1880792528,
-0.0611026734,
0.2839844823,
0.1660768837,
0.0203728378,
-0.0799135566,
-0.3984303474,
0.3897294402,
0.1744480431,
0.3111103773,
0.1112750769,
-0.1472045779,
-0.11138165,
-0.0982017815,
-0.2532021701,
0.0448409095,
0.0283732004,
-0.0699128062,
-0.1990567148,
-0.0351617187,
-0.0741914213,
-0.1644522995,
0.24587515,
-0.2951423228,
-0.2140073031,
-0.2063097507,
0.0329323858,
-0.0591657534,
-0.2639268935,
0.0480812266,
-0.0166790765,
-0.1664895266,
-0.0663468316,
0.4471906126,
-0.5583490729,
0.0983124748,
0.2799993753,
0.0384954847,
0.1584446877,
-0.2074221373,
0.0482781939,
-0.4591048956,
-0.3137159944,
-0.0582128651,
-0.0990352705,
0.0433362499,
-0.1241659224,
0.1899111122,
0.1359187812,
-0.0174848828,
0.0412485264,
-0.5547186732,
-0.0436258875,
0.0373888277,
0.0983233452,
-0.0539648645,
-0.0424412601,
0.2105237246,
0.0599094927,
-0.2586090863,
-0.1325812936,
-0.0263627395,
-0.2311369628,
0.196824044,
0.1643068343,
-0.0694066361,
0.6016634703,
-0.0676967278,
-0.0893910602,
-0.1280175894,
-0.0559732728,
-0.0232715197,
-0.2279176265,
0.1379934102,
0.0829252154,
-0.3923102915,
-0.0403416343,
0.0505664945,
0.1541416049,
0.0254126471,
0.1585981846,
-0.1044792458,
-0.2028943449,
-0.1974476725,
-0.3139294088,
-0.0195720326,
-0.2793597579,
0.1479010582,
-0.1119180396,
0.4384681284,
-0.0022445098,
0.1032720804,
-0.0998002738,
0.0564459786,
0.2011782974,
0.0200283267,
0.0279453024,
0.0887840241,
0.2249017656,
-0.0137520479,
-0.0300951153,
-0.1154142022,
0.2884106636,
0.3479905725,
-0.1296097636,
0.1528158188,
0.1013871878,
0.029349884,
0.0043106042,
0.1038123071,
-0.0135884294,
-0.065976426,
0.0670940354,
-0.0047114799,
0.1875374466,
-0.1654207855,
0.1969502121,
-0.1069804654,
0.2739998698,
0.435675472,
0.3215222061,
0.3497774005,
-0.0536754765,
0.3960693777,
-0.1465158463,
-0.2987143397,
-0.0071099629,
-0.1677992046,
-0.2104945481,
0.1794316322,
-0.1314417124,
0.3233220875,
0.0991315693,
-0.2032625973,
-0.1371831745,
-0.4005586207,
-0.0486636199,
0.3850210905,
-0.0528988354,
0.3306680322,
-0.5000441074,
-0.3042209744,
-0.2671271861,
0.0523777269,
-0.0319586918,
-0.296251595,
-0.2330759466,
-0.0374170505,
-0.0363523625,
0.249904722,
0.1633895189,
0.0310515519,
0.0131909037,
0.0692987442,
-0.2547488213,
-0.1942534,
-0.1881619841,
0.3213927746,
0.0749963224,
-0.0648958459,
0.4970127046,
0.2665729225,
-0.1240606606,
0.1068437919,
0.2521909475,
0.5511546731,
-0.1227313951,
0.1353244185,
0.2183250785,
0.1576872319,
0.098112829,
-0.0217436105,
0.4506420195,
0.1955036223,
-0.2252326161,
0.1495496035,
0.0489597283,
-0.0402264073,
0.0628083646,
-0.1782613695,
-0.0125284409,
0.0165609568,
0.3636972308,
-0.4123941362,
0.1143281013,
-0.2474395931,
-0.1551505178,
-0.0928277001,
0.1869901866,
0.0069886311,
-0.2390809059,
0.1249686629,
-0.1858355254,
0.0174054354,
0.0139228636,
0.6570314765,
0.2901488245,
0.2338239551,
-0.152503401,
-0.3728048205,
-0.4441262782,
0.0720361099,
0.3098844886,
-0.0185040608,
-0.1626708061,
-0.042762395,
-0.1060219333,
0.0345468298,
-0.0494154878,
-0.4919582307,
0.1873028725,
0.0547218472,
-0.1541712284,
0.1363923252,
-0.0786448494,
0.148619473,
0.0259603169,
-0.3806833923,
0.388461858,
0.0372762941,
-0.1440400034,
0.1344927847,
-0.0396147072,
-0.3102136552,
-0.3237249255,
0.1689308435,
0.3744958341,
0.4534607232,
-0.1259223968,
-0.022309171,
-0.2715059817,
-0.2761762738,
0.1159859151,
-0.0663551092,
-0.2192667127,
0.2399908304,
0.0214235019,
-0.1741050631,
-0.3365830481,
0.0315089934,
0.1196100712,
-0.5234785676,
-0.0378639437,
-0.0785463899,
-0.2699174285,
0.1238171458,
-0.0332456417,
0.57199651,
-0.2663242817,
-0.2031322122,
-0.1516475827,
-0.0674831122,
0.3230618238,
-0.6913233399,
0.0605716333,
-0.0718741417,
0.3690217733,
-0.14076671,
0.058771085,
-0.0833053663,
-0.0272755511,
0.1111791506,
-0.0922503844,
-0.2578233182,
0.113130033,
0.0253055636,
-0.1095509753,
-0.0440855734,
0.2553946376,
0.2229792923,
-0.2471196055,
0.4760658741,
-0.0957567766
] |
https://github.com/huggingface/datasets/issues/3061 | Feature request : add leave=True to dataset.map to enable tqdm nested bars (and whilst we're at it couldn't we get a way to access directly tqdm underneath?) | @lhoestq, @albertvillanova can we have `**tqdm_kwargs` in `map`? If there are any fields that are important to our tqdm (like iterable or unit), we can pop them before initialising the tqdm object so as to avoid duplicity. | **A clear and concise description of what you want to happen.**
It would be so nice to be able to nest HuggingFace `Datasets.map() ` progress bars in the grander scheme of things and whilst we're at it why not other functions.
**Describe alternatives you've considered**
By the way is there not a way to directly interact with underlying tqdm module ? **kwargs-ish?
**Additional context**
Furthering tqdm integration #2374 and huggingface/transformers#11797 solutioned by huggingface/transformers#12226 provided with tqdm description as `desc=`
@sgugger @bhavitvyamalik | 37 | Feature request : add leave=True to dataset.map to enable tqdm nested bars (and whilst we're at it couldn't we get a way to access directly tqdm underneath?)
**A clear and concise description of what you want to happen.**
It would be so nice to be able to nest HuggingFace `Datasets.map() ` progress bars in the grander scheme of things and whilst we're at it why not other functions.
**Describe alternatives you've considered**
By the way is there not a way to directly interact with underlying tqdm module ? **kwargs-ish?
**Additional context**
Furthering tqdm integration #2374 and huggingface/transformers#11797 solutioned by huggingface/transformers#12226 provided with tqdm description as `desc=`
@sgugger @bhavitvyamalik
@lhoestq, @albertvillanova can we have `**tqdm_kwargs` in `map`? If there are any fields that are important to our tqdm (like iterable or unit), we can pop them before initialising the tqdm object so as to avoid duplicity. | [
-0.3079598546,
-0.4473890662,
-0.0674706623,
-0.1451707333,
0.1558555812,
-0.0401673317,
0.3228403628,
0.1836805046,
-0.2261488438,
0.1609632969,
-0.2775020897,
0.5143533945,
-0.0580768585,
0.4776198864,
-0.0116167683,
-0.0091586513,
-0.0279599,
-0.0164654795,
-0.5783259869,
0.2839635313,
-0.2386757135,
0.1177633703,
-0.2052086294,
0.0140313739,
-0.1283075064,
-0.2181259245,
-0.0727003664,
0.0891772062,
0.2378112674,
-0.4380877018,
0.13635768,
0.4961161911,
-0.0845473185,
0.3012765646,
-0.0001123342,
-0.1186003387,
0.2314581275,
0.0678120404,
0.0905243829,
0.2309412211,
0.0704172403,
-0.3954607546,
0.217163831,
-0.2037577629,
0.0039230529,
0.0778370649,
-0.2011008859,
-0.2251550704,
0.6380643249,
-0.3206145763,
0.2035882324,
0.5751173496,
-0.3614920378,
-0.0999107137,
-0.0673890188,
-0.1439174861,
-0.3479076624,
0.1304283738,
0.6831460595,
-0.0604309104,
-0.4105484486,
0.3436619937,
0.1126456931,
-0.109734565,
0.4672140479,
0.1040431634,
0.3632028997,
-0.3507687151,
-0.0940831304,
0.3984418511,
0.2598359883,
-0.4390259385,
-0.3076882064,
-0.5278616548,
-0.1148562804,
0.0443198569,
0.1853926778,
-0.4412871003,
-0.2632368505,
0.2405501902,
-0.7522947192,
-0.2109109461,
-0.095179528,
-0.1344124079,
-0.0059545455,
-0.1206199974,
-0.0429762974,
-0.0671916232,
0.2441699654,
0.057843674,
-0.1306303144,
0.1659181565,
0.0655495673,
0.0699953139,
-0.0650798902,
-0.3877478242,
0.3482091129,
0.182020843,
0.3610502481,
0.4487198889,
-0.2333021015,
0.2086692005,
-0.2075908184,
0.1894374788,
0.0458504632,
0.0350826122,
0.2099638283,
-0.6823459864,
0.3317910433,
-0.0910228565,
-0.0064955316,
0.0663159788,
0.4740938842,
-0.3375525475,
0.012279111,
0.14853248,
0.0290583167,
0.2503145933,
0.0655545443,
0.0614344962,
0.4400542974,
0.0182003174,
0.216186136,
0.2555681169,
0.2323509604,
-0.1577081382,
-0.1825526804,
0.2060039937,
0.052552674,
-0.2602239251,
-0.1048512533,
-0.1484538168,
-0.0115251923,
0.1889913678,
-0.1758657098,
-0.0578746907,
0.114317894,
0.1035190895,
0.2416134179,
0.379394114,
0.0099140219,
0.2401106954,
0.4376009405,
0.1714744717,
-0.1935146898,
-0.033256311,
0.023152424,
-0.0273960084,
-0.2909916341,
0.1589659303,
0.1512231678,
-0.3906765878,
-0.0128473602,
0.0756796673,
-0.2792849243,
-0.02377625,
-0.1771700233,
0.4996310771,
-0.1845144182,
0.2341128141,
0.2909580767,
0.2248270512,
-0.3258741498,
-0.1309425235,
0.2822684944,
0.5106950402,
-0.0458274446,
-0.379268378,
-0.1266292632,
-0.2145802081,
-0.1766168326,
-0.0663957596,
-0.026123574,
0.2818355262,
-0.217633605,
0.3067017794,
0.1366123259,
-0.3151676655,
-0.3274069428,
0.3661195636,
-0.2542597353,
0.0249002744,
-0.0088648405,
-0.0543350168,
0.2999835312,
-0.0839863569,
0.0227349624,
0.1365930736,
-0.2591520548,
0.0553288534,
-0.1001940295,
-0.1960332096,
0.2590193748,
-0.0960544199,
-0.0300322026,
0.0128160492,
0.2516792119,
-0.5225575566,
0.3692957759,
0.1973551065,
0.1636330783,
0.0467099659,
0.1135137454,
-0.3524399102,
-0.3397784233,
-0.2655185163,
-0.5118913651,
0.2580672503,
0.1038689762,
0.0176617298,
-0.0429077297,
-0.2247074842,
-0.2403956652,
0.0763086304,
-0.1565578878,
-0.1037589833,
0.0943127573,
-0.3427302539,
-0.1491200179,
-0.0871926099,
-0.4087626636,
-0.070299536,
0.2064338028,
0.1776584089,
0.1126248837,
0.218654573,
0.2959973514,
-0.0322696641,
0.0210867617,
0.3266245425,
0.0145898778,
0.0012068371,
0.1127388477,
0.3950477242,
-0.1125113294,
0.3109879196,
0.2542628944,
0.1912205368,
0.2630429864,
-0.0523687117,
-0.264205128,
-0.0862905607,
-0.3357796371,
0.065310806,
-0.0492221117,
0.3589414358,
-0.0728802383,
0.1659179181,
-0.1286819726,
0.3595975935,
-0.111025691,
-0.1444561183,
-0.4122584462,
-0.5489954948,
-0.1054247245,
0.1291073114,
0.1533345431,
-0.3521597981,
0.0710344315,
0.5648081303,
0.3756908476,
0.2095337659,
-0.0012232607,
-0.1501521617,
-0.0600566864,
0.1590241343,
0.229541868,
0.235370338,
0.2767286301,
0.2107118815,
0.2865695953,
0.4345590174,
0.0733936131,
-0.1249687895,
-0.096118018,
0.1896224618,
-0.0576757677,
-0.0183900483,
-0.1182684526,
0.1323442012,
-0.259925276,
-0.1802597344,
-0.1607865244,
-0.117503345,
-0.1150864735,
-0.2908861935,
-0.1277651489,
-0.0496660322,
0.1294684857,
-0.199399814,
-0.3898546398,
-0.3082324862,
0.2844224274,
-0.031128129,
-0.4053138494,
0.5885396004,
0.2347526848,
0.3873146176,
-0.0802631676,
0.2060905695,
-0.3127576411,
-0.2263651192,
0.3307776451,
0.0512521826,
-0.0053935153,
-0.218738094,
0.436296463,
-0.097073622,
0.2674234509,
-0.3897659183,
-0.3612947464,
0.151294142,
-0.0600558519,
0.2392493933,
0.151469171,
0.1445384771,
-0.0809321702,
0.3444689214,
0.2372222245,
-0.1546775401,
-0.4039936066,
-0.3191619515,
0.1283711046,
0.0445721038,
-0.3029712737,
0.309224844,
-0.1115620807,
-0.5240485668,
0.4612877965,
-0.3300387859,
-0.0152331088,
0.0264015887,
-0.2810368836,
0.0605540089,
-0.2266515642,
-0.0913028419,
-0.0311452225,
-0.4570118785,
0.2387092859,
-0.4413647056,
-0.0169713534,
0.1272776574,
-0.1762621999,
0.2201118767,
-0.084284395,
-0.2619676888,
-0.4975877404,
-0.0580400266,
0.615367949,
-0.0036958936,
0.1284218132,
0.2658994198,
0.2732686102,
-0.0307141505,
-0.0217981655,
-0.1772907972,
0.1602830887,
-0.0554742031,
-0.1159464642,
-0.200339973,
0.1310293078,
0.1367263645,
0.3860690892,
0.2768524289,
0.2165237814,
-0.0172467381,
-0.1478402615,
0.2377213985,
-0.0361543298,
-0.267618686,
-0.2463226467,
-0.1253992021,
0.1873372048,
0.1524000913,
0.1103361398,
0.5323340893,
-0.0550315119,
-0.1106821522,
0.0367009193,
-0.4134680927,
-0.0533716641,
-0.3272793293,
0.3181590736,
-0.1187430546,
-0.0237752609,
-0.0219993684,
0.1382639557,
0.3057666421,
0.2365096658,
0.3645184934,
-0.2059953511,
-0.2580759823,
0.0205002427,
-0.4284019768,
0.2829120159,
0.3079499304,
-0.4551295638,
-0.0430456661,
-0.1992517263,
0.0036604411,
0.2122071087,
0.4806624949,
-0.136103183,
0.0177880637,
0.0869433433,
-0.4581033289,
-0.3581671715,
0.2698995173,
0.2395563573,
0.041498702,
0.2690403759,
0.4043745995,
-0.1198631972,
-0.142975986,
-0.1352114528,
-0.0541738197,
-0.1874586046,
-0.3859993219,
-0.0378165618,
-0.1121894345,
-0.1754401326,
0.1836380512,
0.2874326706,
-0.274618417,
-0.0197516643,
-0.2980911136,
0.0891778991,
-0.4177370369,
-0.0461513512,
0.3134401441,
0.2796218395,
0.0517937094,
0.3462357819,
0.2397902459,
-0.1077147052,
-0.1605640352,
0.2956916094,
-0.1598584056,
-0.0765472949,
-0.0837884992,
-0.1610143185,
0.3088436425,
0.3466403484,
-0.0157804992,
0.5179919004,
0.064991191,
0.2406024337,
-0.3617164791,
-0.0719189867,
-0.0955393836,
-0.0896513015,
0.1544226408,
0.1589310169,
0.3013678491,
-0.2601183951,
-0.1489306688,
-0.051218383,
0.0548595749,
-0.1608542651,
-0.4323640466,
0.1226496994,
0.7112027407,
-0.1058299765,
0.0923467204,
0.1014451832,
0.1311573088,
0.0038972434,
-0.0180699062,
0.1693669707,
-0.3325290978,
-0.1780240387,
-0.0458085388,
-0.1381378323,
0.2062424272,
0.172963962,
-0.245801881,
-0.1505811363,
0.2265711278,
0.3213356733,
-0.0253964011,
-0.06573838,
-0.0650532767,
-0.3618823588,
-0.4196946025,
0.0360011756,
0.2095350176,
0.0430314094,
-0.1736160666,
-0.1867323518,
0.2323136926,
0.1563873738,
0.0122196209,
-0.3663260937,
-0.4987095892,
0.2171928734,
0.5369871855,
-0.1710358858,
0.2462648004,
0.2244877666,
0.5243900418,
0.0157562625,
-0.255317837,
0.1333225965,
0.1164686978,
0.2228744924,
-0.0389447883,
-0.0541876964,
0.3368652761,
-0.2029790729,
0.1345702857,
0.2291470915,
0.0719591379,
-0.3100885153,
-0.0528707914,
0.2243188024,
-0.0004369958,
-0.081101723,
0.4640404582,
0.0954198688,
0.3319552541,
-0.2853175402,
0.0346096866,
0.3920827806,
-0.1414988339,
0.3133300245,
-0.1350870728,
-0.0116120465,
0.0027598282,
0.1139258966,
-0.3579493165,
0.0803373531,
-0.0342528075,
0.1931811273,
-0.2183903754,
-0.184302032,
0.3139200211,
0.118890062,
-0.1605274528,
0.418428421,
-0.0507419705,
-0.037932016,
-0.2151823044,
0.4053387046,
0.0555078052,
-0.1883644164,
-0.1684174091,
-0.0114359818,
-0.7185843587,
0.1772079766,
-0.1116203591,
0.0056862589,
-0.0390410833,
0.5374656916,
0.0438084379,
0.0517912023,
-0.3342722952,
-0.1673933566,
-0.0219947957,
-0.1079778522,
0.4607011676,
-0.2443812639,
0.2428596467,
-0.1013534665,
-0.088077575,
0.2152879685,
-0.4483236372,
-0.1463301331,
-0.2030333728,
0.1402714103,
-0.0981263518,
0.0424849875,
0.1345150322,
0.1746246815,
-0.1228242368,
-0.1921611577,
0.1816943586,
-0.0034634296,
0.2497635335,
0.0471639894,
0.1410747468,
-0.0253766701,
-0.2238833606,
-0.0965509936,
0.3612346649,
0.21448268,
0.0153002338,
-0.0107235638,
-0.4279974997,
0.0101851728,
0.4613839984,
0.3655160964,
0.3580304086,
0.0578353219,
0.1415162534,
0.1903230399,
-0.1226521507,
0.100027658,
0.3340478837,
-0.0635399818,
-0.3628249168,
-0.1969486475,
0.1457906812,
0.1602486968,
-0.1704230607,
0.1039488018,
0.1653949767,
0.060048528,
0.5102699995,
0.3971698284,
0.0257417299,
0.2811403871,
0.0146288145,
0.0934443027,
0.0790826008,
-0.1124542505,
-0.055602476,
-0.0310363714,
-0.015315243,
0.1715483665,
0.596047163,
0.4578203559,
0.275147289,
-0.0920186713,
-0.08446116,
0.2329474986,
-0.1217728034,
-0.1028100923,
0.2124585807,
-0.2279577255,
0.0134694818,
-0.2865481377,
0.1162368655,
-0.2742924094,
-0.0083114812,
0.3121451735,
0.1068454608,
-0.3912997842,
-0.0741018504,
0.3203426301,
0.0198712964,
-0.1523642987,
0.5174318552,
-0.089183189,
-0.0428177789,
0.021020513,
-0.0773608312,
-0.1162614673,
0.4468265176,
-0.2826785445,
0.5891205072,
-0.0764025599,
-0.2300335765,
0.1473689526,
0.2812369466,
-0.1380714178,
-0.2906976342,
0.1291022152,
0.0191577282,
0.0283461232,
0.1322131157,
0.1480834037,
-0.1200130507,
-0.3032622039,
0.0365009084,
-0.2405078709,
0.0260053966,
-0.2449949682,
-0.0002396767,
-0.0114384731,
0.015223721,
0.3244053125,
0.0763390884,
-0.1729281098,
0.2720705271,
-0.0527421609,
0.2494124025,
-0.3500225544,
0.3539063334,
0.1124977767,
-0.1260746568,
0.0958166718,
-0.0649722219,
-0.0226737186,
-0.4377592802,
0.3389492333,
-0.3664696217,
-0.0100784041,
-0.298671484,
0.0826485977,
0.0714122504,
0.3799296916,
0.1442919672,
0.1324598193,
-0.1859617531,
-0.2818081975,
-0.6047677994,
-0.0167081729,
0.3409602344,
-0.1710684299,
0.2054335624,
-0.0792283714,
-0.0259080138,
0.4994179308,
0.4722795188,
-0.2775587142,
-0.1868780851,
-0.3727012277,
-0.2101685554,
0.0060391161,
-0.237767145,
-0.065528132,
0.1622737497,
0.0259926841,
0.1533260494,
0.254062891,
0.0237050653,
0.2063132972,
0.0899036452,
0.1258647889,
-0.0667200014,
0.1834977567,
0.0401997603,
-0.1641305089,
-0.0407553501,
-0.1256774664,
0.1631113738,
-0.0697668865,
0.0062085949,
0.1460210532,
0.0130825546,
0.23141101,
-0.2865377963,
-0.1768669188,
-0.1834515631,
-0.0201785006,
0.3263638914,
0.0528965667,
-0.1163633019,
0.3094544411,
0.0881678611,
0.0910656527,
0.102478914,
0.345256269,
-0.0138114681,
0.5606895089,
-0.1966490149,
-0.2451069951,
0.3847887516,
-0.172937274,
-0.2899033725,
0.0254788473,
0.0791536868,
0.1243090034,
-0.2198643833,
-0.5411441922,
-0.3565155864,
0.1669936031,
-0.0691928938,
-0.2343691736,
0.4092411697,
-0.2550200224,
-0.1746028066,
0.0702136606,
0.1520514041,
0.1930810064,
0.084513098,
-0.1515317559,
-0.1092294753
] |
https://github.com/huggingface/datasets/issues/3061 | Feature request : add leave=True to dataset.map to enable tqdm nested bars (and whilst we're at it couldn't we get a way to access directly tqdm underneath?) | Hi ! Sounds like a good idea :)
Also I think it would be better to have this as an actual parameters instead of kwargs to make it clearer | **A clear and concise description of what you want to happen.**
It would be so nice to be able to nest HuggingFace `Datasets.map() ` progress bars in the grander scheme of things and whilst we're at it why not other functions.
**Describe alternatives you've considered**
By the way is there not a way to directly interact with underlying tqdm module ? **kwargs-ish?
**Additional context**
Furthering tqdm integration #2374 and huggingface/transformers#11797 solutioned by huggingface/transformers#12226 provided with tqdm description as `desc=`
@sgugger @bhavitvyamalik | 29 | Feature request : add leave=True to dataset.map to enable tqdm nested bars (and whilst we're at it couldn't we get a way to access directly tqdm underneath?)
**A clear and concise description of what you want to happen.**
It would be so nice to be able to nest HuggingFace `Datasets.map() ` progress bars in the grander scheme of things and whilst we're at it why not other functions.
**Describe alternatives you've considered**
By the way is there not a way to directly interact with underlying tqdm module ? **kwargs-ish?
**Additional context**
Furthering tqdm integration #2374 and huggingface/transformers#11797 solutioned by huggingface/transformers#12226 provided with tqdm description as `desc=`
@sgugger @bhavitvyamalik
Hi ! Sounds like a good idea :)
Also I think it would be better to have this as an actual parameters instead of kwargs to make it clearer | [
-0.3040522933,
-0.4401244819,
-0.0733553544,
-0.1609271765,
0.1207133383,
-0.083848469,
0.3616036177,
0.1839642376,
-0.2422847599,
0.1404825151,
-0.2260065824,
0.503369689,
-0.020245567,
0.5093122721,
-0.0045803525,
-0.0898854882,
-0.0212960914,
0.0006459563,
-0.5398647785,
0.2524980307,
-0.2420829386,
0.1321515739,
-0.1777398586,
0.0366458856,
-0.1847935021,
-0.2185877711,
-0.0785343722,
0.1085538492,
0.2125887275,
-0.4118736684,
0.1750570238,
0.511803031,
-0.0924809799,
0.2173539847,
-0.0001114059,
-0.1403515637,
0.2472056448,
0.0254466794,
0.0924286768,
0.2744342089,
0.0252305213,
-0.3768672645,
0.2074666172,
-0.2283929735,
-0.0416658632,
0.074929744,
-0.2352410108,
-0.1270354688,
0.6391502619,
-0.3022736907,
0.2194513083,
0.5766599178,
-0.3688625097,
-0.1105956137,
-0.0363928378,
-0.0876144469,
-0.3601967096,
0.0621497892,
0.6224274039,
-0.0555488467,
-0.4059792161,
0.4138613343,
0.0508025289,
-0.1347207278,
0.4756096303,
0.0972012505,
0.3391202092,
-0.3385725021,
-0.0631172508,
0.390096873,
0.2385013849,
-0.4620217383,
-0.3017432094,
-0.5928296447,
-0.1061995253,
0.0222148765,
0.141768977,
-0.4166000187,
-0.3606657088,
0.2118470818,
-0.7446246743,
-0.1906603724,
-0.1046319529,
-0.1145512983,
-0.013260508,
-0.059855707,
-0.0383015014,
-0.0679128543,
0.2490648925,
0.0716849118,
-0.1656598151,
0.1634162366,
0.0414614715,
0.072912991,
-0.061586868,
-0.3877875209,
0.3571754992,
0.2380766869,
0.3436077237,
0.4493228197,
-0.2292792946,
0.1998807192,
-0.1638221443,
0.1955309063,
0.0026401931,
0.0687607825,
0.2191923112,
-0.7096217871,
0.380107224,
-0.0600184575,
0.0188221727,
0.072477527,
0.5096792579,
-0.341483146,
-0.0232226532,
0.1497006714,
0.0764116049,
0.1847014576,
0.0494537205,
0.0659918934,
0.489299655,
0.0403445251,
0.1812067181,
0.2243424952,
0.1911826283,
-0.1756917685,
-0.1308942288,
0.2162924558,
0.0709821954,
-0.1664345115,
-0.1119687632,
-0.143353343,
-0.0387450457,
0.2185350806,
-0.1589704901,
-0.0334536918,
0.1354028583,
0.1309199184,
0.2110911906,
0.3881797194,
-0.0323358029,
0.3138101399,
0.3814647794,
0.1778327972,
-0.2244286686,
-0.0523887537,
-0.0012406668,
-0.0032922134,
-0.2528927624,
0.1842806339,
0.1515645534,
-0.3615581095,
-0.0192729533,
0.0795274228,
-0.3050709069,
-0.0699196681,
-0.1832274348,
0.4967522919,
-0.157029435,
0.2529946566,
0.3311840594,
0.2205493003,
-0.3214265704,
-0.1257991046,
0.2778689861,
0.5231167674,
-0.0092246691,
-0.4374573231,
-0.117447935,
-0.2013552636,
-0.1516334265,
-0.0473439097,
-0.0687666833,
0.1946767718,
-0.2248228937,
0.312948823,
0.148486197,
-0.2415236235,
-0.340249747,
0.3427256048,
-0.2442866564,
0.0049837958,
0.070116058,
-0.020551445,
0.3069840074,
-0.0192297231,
-0.014108154,
0.1990293264,
-0.2121520191,
0.0793271959,
-0.1258688569,
-0.230399549,
0.2429475933,
-0.0506802946,
0.0117276255,
0.0063220169,
0.2339882851,
-0.5024091601,
0.4072948098,
0.1495753527,
0.1827937812,
0.0449885502,
0.1284586936,
-0.3524283171,
-0.301992327,
-0.2372847944,
-0.4979461133,
0.1862054318,
0.0497495309,
0.0373185687,
-0.0976102129,
-0.2728349566,
-0.2762614787,
0.0262668934,
-0.1709609628,
-0.1258241683,
0.0885968432,
-0.3336373568,
-0.1573249847,
-0.0924690738,
-0.370446831,
-0.0190583281,
0.2088934481,
0.1469106078,
0.1239177436,
0.2826067209,
0.3062504232,
-0.0597986132,
0.0039735334,
0.3212854266,
0.0433721952,
0.057432387,
0.1334159076,
0.3368080854,
-0.1559197158,
0.3341628015,
0.200148806,
0.1550644636,
0.2686702311,
-0.0097828489,
-0.1922695041,
-0.0485806987,
-0.3267364204,
0.0513555184,
-0.1022883728,
0.4136487842,
-0.0621530227,
0.1770101339,
-0.1507861316,
0.3069582582,
-0.1460066736,
-0.182486847,
-0.4050616026,
-0.5421484709,
-0.0835585222,
0.1085507795,
0.1905283332,
-0.3169668913,
0.0083620921,
0.5795345306,
0.3920888901,
0.2365942448,
0.0256103594,
-0.087943472,
-0.0739518851,
0.1709173024,
0.2626285553,
0.2539459765,
0.2087326199,
0.2654322088,
0.226652205,
0.4055886865,
0.0679123923,
-0.1610928476,
-0.0923356563,
0.1664828807,
-0.0830576792,
0.028900465,
-0.127592504,
0.0821364149,
-0.3430140018,
-0.1516445279,
-0.1561578512,
-0.1161330417,
-0.131495446,
-0.2932076454,
-0.1001698524,
-0.1434506178,
0.0620870404,
-0.2277710438,
-0.4332292974,
-0.3049089909,
0.3392318785,
0.0068841744,
-0.4466091692,
0.5754475594,
0.1684541851,
0.410164535,
-0.1021783724,
0.169963643,
-0.3442571461,
-0.2505163252,
0.3481220603,
0.0732135773,
-0.064526774,
-0.1695848852,
0.4388559759,
-0.0586819872,
0.2961874604,
-0.3456122279,
-0.3851078749,
0.0845564827,
-0.0978161097,
0.2158662826,
0.155765906,
0.2050775588,
-0.0546312258,
0.2470745146,
0.2673864961,
-0.1088442206,
-0.3712067008,
-0.3445517719,
0.1556956023,
0.0345050581,
-0.3399261534,
0.3345479667,
-0.1021224335,
-0.5162630081,
0.4678385854,
-0.3595432639,
-0.0251822378,
0.0904208422,
-0.2080748975,
0.0643903092,
-0.1926522255,
-0.0894384831,
-0.0026038929,
-0.4241378009,
0.2659582496,
-0.4216690361,
0.0232196916,
0.0545667075,
-0.1467906237,
0.1811045408,
-0.099519141,
-0.2360967696,
-0.5348482728,
-0.1099297479,
0.6421710849,
0.0428268015,
0.1460505873,
0.2659364641,
0.2887929976,
-0.055025164,
-0.014485931,
-0.205970332,
0.1521561593,
-0.0602106787,
-0.0986837968,
-0.1958975047,
0.1586374044,
0.0881339014,
0.4038791656,
0.2201343924,
0.1810511798,
0.0500223972,
-0.1471752971,
0.2583083212,
-0.0364407375,
-0.3042580485,
-0.2432434708,
-0.1019823551,
0.1921323091,
0.1274716705,
0.1398499757,
0.48576352,
-0.0751013532,
-0.2049827427,
0.0785305202,
-0.3986292779,
-0.0342295468,
-0.2419998348,
0.2975549698,
-0.1365187615,
0.0064350255,
-0.0147022521,
0.0930987149,
0.3133538961,
0.2680286169,
0.3839826584,
-0.1957172751,
-0.2194252908,
0.0553532951,
-0.4264831245,
0.3121030927,
0.3290685117,
-0.5016032457,
-0.0414707437,
-0.185063839,
0.0117410449,
0.2056855112,
0.5050305724,
-0.0873139873,
0.01003036,
0.0609086789,
-0.4131025672,
-0.3722875416,
0.2382691056,
0.2806454301,
0.042679403,
0.1858507693,
0.3858157694,
-0.0998689011,
-0.1438349485,
-0.1091301814,
-0.087392658,
-0.1823556423,
-0.3561813533,
-0.1118983626,
-0.1216461807,
-0.2173033357,
0.2915789485,
0.2890270948,
-0.293265909,
-0.0617325343,
-0.3027813733,
0.0660200864,
-0.4239275455,
-0.0605749227,
0.3356333375,
0.316757232,
0.0969093964,
0.2703156471,
0.149353385,
-0.077240549,
-0.1751399785,
0.2805526853,
-0.185915783,
-0.0507894307,
-0.1274067611,
-0.1942798793,
0.3486397862,
0.3845558465,
-0.0454276241,
0.5756070018,
0.1140873954,
0.2552883625,
-0.3540510535,
-0.1022874638,
-0.0821051821,
-0.0987690091,
0.1835960597,
0.1349143982,
0.3692765832,
-0.2820003629,
-0.1859306395,
-0.0942213014,
0.080593124,
-0.1923603266,
-0.4546712935,
0.1168460995,
0.7653387785,
-0.0037138015,
0.1579690874,
0.0676363111,
0.0977412909,
0.0159089472,
0.0393563285,
0.2007669806,
-0.3595065475,
-0.1557558477,
-0.0449758098,
-0.1185567155,
0.160659641,
0.1628230214,
-0.2720500231,
-0.1289010942,
0.1502568871,
0.268615067,
-0.0575806499,
-0.0649616942,
-0.0925564319,
-0.3470129073,
-0.5187239647,
0.036596071,
0.184552446,
0.1087146178,
-0.1867199987,
-0.2166245431,
0.2581209838,
0.0950783342,
0.0175468698,
-0.3183019757,
-0.4547729492,
0.1873540431,
0.4805928469,
-0.1503753215,
0.1987640113,
0.2174555063,
0.5176846981,
0.0370951667,
-0.2842105925,
0.1882832199,
0.0563130677,
0.2306719124,
-0.0667728558,
-0.0275204815,
0.3067476749,
-0.2084532231,
0.0841897279,
0.2535698414,
0.0833761692,
-0.3823863268,
-0.124178499,
0.1690422297,
-0.0396842323,
-0.0854315236,
0.4847454429,
0.073319234,
0.3472259939,
-0.3178984523,
0.0468536168,
0.3795194328,
-0.1297904998,
0.3593478501,
-0.1050626934,
-0.0301508978,
-0.0039641475,
0.1981975585,
-0.3212210238,
0.0679697841,
-0.0317307599,
0.2098205984,
-0.2484878153,
-0.2078119367,
0.2450027019,
0.1598617435,
-0.1893313378,
0.4494188428,
0.0106592849,
-0.0601965412,
-0.2026674598,
0.4340812862,
0.0331897065,
-0.1460762471,
-0.1331424117,
-0.0121473689,
-0.6820909381,
0.1568771303,
-0.1181585267,
0.108751215,
-0.0115267253,
0.4750425518,
0.1192359552,
0.0049648681,
-0.3482022583,
-0.1598510742,
-0.0200071819,
-0.0770210847,
0.5010874867,
-0.2574797869,
0.2343609631,
-0.0452957079,
-0.0879401639,
0.1977234781,
-0.4247972369,
-0.1439074725,
-0.2219490558,
0.1332488358,
-0.1362675279,
0.048075702,
0.1428617239,
0.1807457805,
-0.1450524926,
-0.1453189403,
0.3229390681,
0.0172274616,
0.2267350852,
0.0579782538,
0.1322253197,
-0.044521004,
-0.1947350353,
-0.1247256696,
0.362249434,
0.1649876088,
0.0136567624,
-0.0301956553,
-0.3998121917,
0.0300396327,
0.5248731971,
0.4006969631,
0.3869502842,
0.0913013145,
0.0549619645,
0.1842947751,
-0.1543201953,
0.0828298703,
0.3484589756,
-0.0788549781,
-0.3050661087,
-0.1995486021,
0.1510353088,
0.1807101816,
-0.1955881715,
0.0586941354,
0.1538312137,
0.0356284417,
0.4901196957,
0.3801668882,
0.0546690002,
0.248588711,
0.0624957196,
0.0795886144,
0.1181508973,
-0.1145693138,
-0.0538398847,
0.0000380852,
0.0106564956,
0.1383227408,
0.5835257769,
0.4374544024,
0.2474568337,
-0.0863376185,
-0.1315152794,
0.1783097833,
-0.093254894,
-0.0892753154,
0.182066232,
-0.1789342612,
-0.0213933941,
-0.3063968122,
0.0521764271,
-0.2366059572,
-0.0220763851,
0.3424707651,
0.1562362909,
-0.4239875972,
-0.1061863005,
0.3574419618,
-0.0121772001,
-0.1808656752,
0.4242244363,
-0.1734801382,
-0.1008119658,
0.0511902981,
-0.0599337667,
-0.1023039147,
0.4667431414,
-0.3101054728,
0.5773926377,
-0.0438586771,
-0.1934449673,
0.1347535104,
0.3207572699,
-0.1712986678,
-0.2745136619,
0.1804597974,
0.0064207795,
0.0403036512,
0.1184207723,
0.1707593501,
-0.1277702153,
-0.2271203846,
0.0364668332,
-0.2135153264,
0.0258555077,
-0.2545168698,
0.010128106,
0.0153954662,
0.0270067565,
0.3086263239,
0.101586774,
-0.2073560059,
0.2653199136,
-0.0779915079,
0.2468757033,
-0.3303636611,
0.3154093921,
0.1312186122,
-0.149439618,
0.0566825904,
-0.0903211609,
-0.0509448387,
-0.4332463443,
0.3301745951,
-0.3417446613,
-0.0232762937,
-0.3039070368,
0.0867740065,
0.0412963219,
0.4376169741,
0.1315126866,
0.1720189154,
-0.140305236,
-0.2512051463,
-0.5865774751,
-0.0481642894,
0.3888118267,
-0.2012027651,
0.1904443502,
-0.1426077932,
-0.0290473755,
0.445656538,
0.4327638149,
-0.2663417161,
-0.1197196469,
-0.4057604671,
-0.2368277609,
0.1115649864,
-0.1671514809,
-0.0766429603,
0.1948795766,
-0.0162598994,
0.129255265,
0.221099779,
0.052779384,
0.1816640794,
0.1081910953,
0.0954634696,
-0.0794443041,
0.2021182179,
0.0138663705,
-0.1113407239,
-0.0235060621,
-0.1390835047,
0.137424469,
-0.0960782394,
-0.0283752382,
0.086919874,
0.0343847349,
0.2981600165,
-0.2255613208,
-0.182695955,
-0.2179438174,
0.0520472527,
0.3934882283,
0.1016922146,
0.001786797,
0.2695514262,
0.0676919147,
0.0697425157,
0.0995281488,
0.2965598404,
-0.005558663,
0.4987204075,
-0.1723838449,
-0.317953229,
0.4141159356,
-0.1776117682,
-0.3244431019,
-0.0225767158,
0.1040270254,
0.1147697046,
-0.2183252722,
-0.5494413376,
-0.3264567852,
0.1322169751,
-0.0474934727,
-0.211196363,
0.4895415306,
-0.2248502672,
-0.191565305,
0.0401823632,
0.069671385,
0.226744473,
0.0818829685,
-0.2015450001,
-0.1697608531
] |
https://github.com/huggingface/datasets/issues/3060 | load_dataset('openwebtext') yields "Compressed file ended before the end-of-stream marker was reached" | Hi @RylanSchaeffer, thanks for reporting.
I'm sorry, but I was not able to reproduce your problem.
Normally, the reason for this type of error is that, during your download of the data files, this was not fully complete.
Could you please try to load the dataset again but forcing its redownload? Please use:
```python
dataset = load_dataset("openwebtext", download_mode="FORCE_REDOWNLOAD")
```
Let me know if the problem persists. | ## Describe the bug
When I try `load_dataset('openwebtext')`, I receive a "EOFError: Compressed file ended before the end-of-stream marker was reached" error.
## Steps to reproduce the bug
```
from datasets import load_dataset
dataset = load_dataset('openwebtext')
```
## Expected results
I expect the `dataset` variable to be properly constructed.
## Actual results
```
File "/home/rschaef/CoCoSci-Language-Distillation/distillation_v2/ratchet_learning/tasks/base.py", line 37, in create_dataset
dataset_str,
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/load.py", line 1117, in load_dataset
use_auth_token=use_auth_token,
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/builder.py", line 637, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/builder.py", line 704, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/rschaef/.cache/huggingface/modules/datasets_modules/datasets/openwebtext/85b3ae7051d2d72e7c5fdf6dfb462603aaa26e9ed506202bf3a24d261c6c40a1/openwebtext.py", line 61, in _split_generators
dl_dir = dl_manager.download_and_extract(_URL)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 284, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 261, in extract
partial(cached_path, download_config=download_config), path_or_paths, num_proc=num_proc, disable_tqdm=False
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/py_utils.py", line 197, in map_nested
return function(data_struct)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 316, in cached_path
output_path, force_extract=download_config.force_extract
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 40, in extract
self.extractor.extract(input_path, output_path, extractor=extractor)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 179, in extract
return extractor.extract(input_path, output_path)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 53, in extract
tar_file.extractall(output_path)
File "/usr/lib/python3.6/tarfile.py", line 2010, in extractall
numeric_owner=numeric_owner)
File "/usr/lib/python3.6/tarfile.py", line 2052, in extract
numeric_owner=numeric_owner)
File "/usr/lib/python3.6/tarfile.py", line 2122, in _extract_member
self.makefile(tarinfo, targetpath)
File "/usr/lib/python3.6/tarfile.py", line 2171, in makefile
copyfileobj(source, target, tarinfo.size, ReadError, bufsize)
File "/usr/lib/python3.6/tarfile.py", line 249, in copyfileobj
buf = src.read(bufsize)
File "/usr/lib/python3.6/lzma.py", line 200, in read
return self._buffer.read(size)
File "/usr/lib/python3.6/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/usr/lib/python3.6/_compression.py", line 99, in read
raise EOFError("Compressed file ended before the "
python-BaseException
EOFError: Compressed file ended before the end-of-stream marker was reached
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-4.4.0-173-generic-x86_64-with-Ubuntu-16.04-xenial
- Python version: 3.6.10
- PyArrow version: 5.0.0 | 66 | load_dataset('openwebtext') yields "Compressed file ended before the end-of-stream marker was reached"
## Describe the bug
When I try `load_dataset('openwebtext')`, I receive a "EOFError: Compressed file ended before the end-of-stream marker was reached" error.
## Steps to reproduce the bug
```
from datasets import load_dataset
dataset = load_dataset('openwebtext')
```
## Expected results
I expect the `dataset` variable to be properly constructed.
## Actual results
```
File "/home/rschaef/CoCoSci-Language-Distillation/distillation_v2/ratchet_learning/tasks/base.py", line 37, in create_dataset
dataset_str,
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/load.py", line 1117, in load_dataset
use_auth_token=use_auth_token,
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/builder.py", line 637, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/builder.py", line 704, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/rschaef/.cache/huggingface/modules/datasets_modules/datasets/openwebtext/85b3ae7051d2d72e7c5fdf6dfb462603aaa26e9ed506202bf3a24d261c6c40a1/openwebtext.py", line 61, in _split_generators
dl_dir = dl_manager.download_and_extract(_URL)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 284, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 261, in extract
partial(cached_path, download_config=download_config), path_or_paths, num_proc=num_proc, disable_tqdm=False
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/py_utils.py", line 197, in map_nested
return function(data_struct)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 316, in cached_path
output_path, force_extract=download_config.force_extract
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 40, in extract
self.extractor.extract(input_path, output_path, extractor=extractor)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 179, in extract
return extractor.extract(input_path, output_path)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 53, in extract
tar_file.extractall(output_path)
File "/usr/lib/python3.6/tarfile.py", line 2010, in extractall
numeric_owner=numeric_owner)
File "/usr/lib/python3.6/tarfile.py", line 2052, in extract
numeric_owner=numeric_owner)
File "/usr/lib/python3.6/tarfile.py", line 2122, in _extract_member
self.makefile(tarinfo, targetpath)
File "/usr/lib/python3.6/tarfile.py", line 2171, in makefile
copyfileobj(source, target, tarinfo.size, ReadError, bufsize)
File "/usr/lib/python3.6/tarfile.py", line 249, in copyfileobj
buf = src.read(bufsize)
File "/usr/lib/python3.6/lzma.py", line 200, in read
return self._buffer.read(size)
File "/usr/lib/python3.6/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/usr/lib/python3.6/_compression.py", line 99, in read
raise EOFError("Compressed file ended before the "
python-BaseException
EOFError: Compressed file ended before the end-of-stream marker was reached
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-4.4.0-173-generic-x86_64-with-Ubuntu-16.04-xenial
- Python version: 3.6.10
- PyArrow version: 5.0.0
Hi @RylanSchaeffer, thanks for reporting.
I'm sorry, but I was not able to reproduce your problem.
Normally, the reason for this type of error is that, during your download of the data files, this was not fully complete.
Could you please try to load the dataset again but forcing its redownload? Please use:
```python
dataset = load_dataset("openwebtext", download_mode="FORCE_REDOWNLOAD")
```
Let me know if the problem persists. | [
-0.3312988877,
-0.0927271023,
0.003960914,
0.4996192455,
0.2171835154,
0.021186851,
0.1519744992,
0.3008338213,
-0.0964679196,
0.2880549431,
0.0456488989,
0.4010351002,
0.1004999951,
0.157242164,
-0.1340151429,
0.1229330227,
-0.0532350391,
0.227064684,
-0.3442712724,
-0.1649356484,
-0.3830605745,
0.18088153,
-0.2773353457,
0.0628776476,
-0.1111838743,
-0.0469828062,
-0.0431890301,
0.4383740425,
-0.1630147547,
-0.2796114087,
0.2136626095,
-0.2695502639,
0.0539577864,
0.6261739135,
-0.0001161531,
-0.0926101282,
0.3415844142,
-0.1594272852,
-0.5765927434,
-0.3982525766,
-0.3595907688,
-0.17110309,
-0.0351356752,
-0.2234363705,
0.1131687909,
-0.3637068272,
-0.0003500305,
-0.903801918,
0.401437521,
0.3819847107,
0.1780740619,
0.2864636481,
0.1049727201,
0.0262466352,
0.2313107997,
-0.1325445175,
-0.1141460687,
0.0244515929,
0.1257954538,
0.0218918212,
0.0266762674,
0.1473561078,
0.0009366641,
0.2005744129,
0.1641595066,
0.1365945935,
0.0048937532,
-0.2551263571,
0.0068791676,
0.2073962092,
0.4921974242,
-0.174404785,
-0.4262571037,
-0.140174523,
-0.1636831313,
-0.2943091094,
0.3465164006,
0.4004842937,
-0.0935190096,
0.2845865786,
-0.1182854921,
0.0399829224,
-0.2083886266,
0.2447597384,
-0.1515057236,
0.5106204748,
-0.1901017129,
0.1200769097,
-0.0266890079,
0.0143502764,
0.2320244908,
-0.2181991041,
-0.2323103845,
0.1040348634,
-0.2871169448,
0.0572171062,
0.052177798,
0.0754539147,
0.3376554549,
0.3926326931,
0.4226470888,
0.0361552797,
-0.057887353,
0.0168297254,
0.4293918312,
0.4896796048,
0.1440077424,
0.3416920602,
0.128161937,
0.0548678041,
-0.1055299714,
-0.0860909745,
-0.1812630296,
-0.3085368276,
0.1995104551,
0.0358863622,
0.4818579257,
-0.2016385794,
-0.408526659,
0.0601196028,
0.0011184174,
-0.0490920432,
-0.1270445287,
0.3839947283,
-0.2501536012,
0.1746228635,
0.2353310585,
0.1076787859,
-0.167091161,
-0.3009108603,
-0.1993412822,
-0.0774162263,
-0.1510993093,
-0.1715003997,
0.0437889919,
-0.4479245543,
0.3691601157,
-0.0233907141,
0.0399988927,
-0.2815098763,
0.1289475262,
-0.1110007763,
0.252485007,
-0.0073833778,
0.0215790439,
0.1751913577,
0.2928542495,
-0.0335102938,
-0.0665790066,
0.2539947033,
-0.3219538331,
-0.370703131,
-0.2056259513,
0.2098764926,
-0.205297485,
-0.0307981893,
-0.139787972,
-0.1158813834,
0.3711584508,
0.0239749569,
-0.2101042271,
-0.0913010985,
-0.3554475009,
-0.1127242148,
0.2910827398,
0.4761278927,
-0.2243701518,
-0.1116759256,
-0.0586350821,
0.0355623662,
0.3517947197,
0.0072027124,
-0.1956916451,
0.1678810269,
-0.3378800452,
-0.0389307141,
0.4461310804,
-0.3789563477,
-0.5029713511,
0.2231993824,
-0.1793848723,
0.2654218376,
0.0531425625,
-0.4097701013,
0.2695761919,
-0.0952483714,
0.1045241281,
0.3907121122,
-0.1543831378,
0.2037487328,
-0.2764239907,
-0.2854370475,
0.42281726,
0.079649061,
-0.1850768477,
0.1122497991,
0.1673433781,
0.1180896312,
0.2080081254,
-0.0696031079,
0.1277029067,
-0.1067370996,
0.0522446372,
-0.1227005199,
0.1166331023,
-0.0956515297,
-0.1017509401,
0.1730464846,
0.0438249111,
0.0972485542,
-0.2194464803,
0.094084017,
-0.4863501787,
0.0839415267,
-0.4505892396,
-0.23581101,
0.091042392,
0.2770381272,
0.0987460241,
0.0791370869,
-0.1225552633,
0.3559845686,
-0.099719204,
0.0703954697,
-0.2106670588,
0.0668474585,
0.0505847521,
0.0439951979,
0.1814975291,
0.1181752533,
0.0629806072,
-0.3363868594,
-0.4088575542,
0.4617057145,
-0.0457720719,
0.2274632752,
-0.1359809637,
-0.1161871478,
0.1352994442,
-0.2820350528,
0.1351781338,
0.1544812024,
0.1860886067,
0.0585613139,
0.0533634946,
0.1390979141,
0.3611160219,
0.1057875231,
0.0357285514,
-0.0800555199,
0.0920298398,
-0.1346666068,
0.0610869266,
-0.2376103699,
0.1896294802,
-0.0795637146,
0.348770678,
-0.0830519795,
0.3082595468,
0.1251769066,
0.5375604033,
0.0301422458,
0.0406417102,
0.4136206508,
-0.1843683124,
-0.1502150148,
-0.1502022594,
0.2045321018,
0.4924979806,
0.2075411379,
0.1358684301,
0.0057755322,
0.1321403682,
-0.0433416106,
0.4621792734,
0.1222951859,
0.2442748845,
0.3935103416,
0.0905457363,
0.0110954158,
-0.1202891245,
-0.1793652922,
-0.0723669156,
0.1638977081,
-0.3875533342,
0.1813229024,
-0.3384013772,
0.1017310098,
-0.0136560341,
0.0421159938,
0.0607790947,
-0.2998275459,
-0.1119078472,
-0.0727641061,
-0.1296860278,
0.2440656573,
-0.0383231044,
0.2057430595,
0.2878132164,
0.0611636043,
0.104104504,
-0.1987076551,
-0.3906429112,
0.0209228303,
0.2030636519,
-0.0895023271,
0.1980610043,
-0.2523884177,
-0.0873996615,
-0.0960291773,
-0.0607470535,
0.2478196919,
0.0834888145,
0.3964467645,
0.1029935926,
0.1237237826,
0.1531061381,
-0.3236401677,
0.2378219068,
-0.0654019043,
-0.248344481,
0.1270751208,
0.0302285459,
0.0454626419,
-0.0411411226,
-0.5968303084,
-0.253313601,
-0.5044032335,
-0.0213333853,
-0.0189506356,
0.1721515805,
0.275108695,
0.1224142611,
0.056617789,
0.1341882944,
0.1148348078,
-0.2150577903,
-0.5697594285,
0.3551084697,
-0.2896881104,
-0.319716543,
-0.0250024684,
0.0350133441,
0.027304681,
0.177540049,
-0.4853966534,
0.2039100081,
-0.1991742402,
-0.121623449,
-0.3832294643,
0.253744483,
0.1903078407,
0.0784887448,
-0.0645282716,
-0.3062005043,
-0.0401636437,
0.1397824436,
-0.0769659951,
0.3363406658,
-0.0793641508,
0.3724678755,
0.028379783,
0.0935250074,
0.3273429275,
0.0059198705,
0.35417822,
0.0358773172,
0.2581320703,
-0.1097091883,
-0.1072167978,
0.1250616163,
-0.1380741149,
-0.0532405302,
0.4216043353,
0.2599181235,
0.1153892577,
-0.2754814923,
0.0507023521,
-0.3561891019,
-0.1660093069,
-0.1081347391,
-0.0020899519,
0.1543161422,
0.0809338391,
0.0899867713,
-0.142625913,
0.052763287,
0.0186591335,
-0.0419510975,
0.0568334647,
-0.1710411012,
0.023172345,
0.3124596179,
-0.5204684734,
0.2605834007,
0.0894669145,
0.2842404544,
0.0010524605,
-0.1432711333,
-0.0881001055,
0.0277305674,
0.3974627852,
-0.07891386,
0.3769082129,
0.0784198344,
0.3022578955,
-0.2235931605,
0.0230770744,
-0.0580022894,
0.1995112598,
0.1498233825,
0.1262691617,
-0.2742858231,
0.0526906513,
0.2208815664,
0.3646791875,
-0.2093191445,
-0.1218706295,
-0.1677191108,
-0.3943433166,
-0.2403149158,
-0.2420591712,
0.0252913367,
0.3883754313,
-0.1794861108,
-0.3364024758,
-0.0400849059,
-0.2860060632,
0.0538075753,
0.0979004577,
0.2472581267,
-0.1630391628,
0.2312535197,
-0.0394423753,
0.2188844532,
0.3812593222,
0.7686731815,
0.0726296008,
-0.4599885643,
0.1760658175,
-0.0878915861,
0.0436839797,
0.0327387936,
-0.2629179358,
-0.2616370916,
0.0148434062,
0.3235076368,
-0.2305272222,
0.3005500138,
0.1901090592,
0.1412063092,
-0.4759507179,
-0.4383702278,
0.4097526968,
-0.20084849,
0.090850234,
0.7001901269,
-0.2823852301,
-0.359375596,
0.3701682389,
-0.0882115439,
0.9076275826,
0.1315838099,
-0.1430114508,
0.3270440698,
-0.1164640337,
0.2704944313,
-0.1891549081,
-0.1353436261,
-0.158711642,
-0.381988585,
0.0861666128,
-0.1358551681,
0.0220863465,
0.2708484232,
-0.4869176745,
0.1187654659,
-0.2245688885,
-0.2238392979,
0.1922368407,
0.2945992053,
-0.2236884832,
-0.2112635076,
-0.4546410143,
0.1113536358,
-0.1514761597,
0.1542664319,
-0.0210540779,
0.0075532822,
-0.2183408886,
-0.237165302,
-0.21413441,
0.3838076293,
-0.4636153281,
0.0603889674,
-0.3841510415,
-0.332883656,
0.2481715232,
0.101375632,
0.098665975,
0.1167774126,
-0.0728795826,
0.2114423215,
0.0380652025,
0.038793426,
0.035578195,
0.0973790884,
0.2303489596,
-0.0861830786,
-0.0951276571,
0.1453273743,
-0.218667686,
-0.2722501159,
0.5731282234,
0.0039058556,
0.2937593162,
-0.4113661051,
-0.1326768398,
-0.0984923393,
0.0489348844,
-0.3025235534,
0.1013436243,
0.2192643583,
-0.233411029,
0.1533553153,
0.0818627179,
-0.3589735031,
-0.1407090276,
0.2947538793,
-0.1721216142,
0.0233769286,
0.5264533162,
0.2204819322,
0.002052943,
-0.1068608537,
0.3472933471,
-0.0313727409,
-0.5548990369,
0.4126236737,
-0.08650475,
0.3118653893,
-0.2100648284,
0.6979729533,
0.2385826856,
0.3482574522,
-0.0108662006,
-0.5089680552,
-0.0298537593,
-0.131516546,
-0.3001740277,
0.1154470369,
-0.0162786525,
0.2895541787,
-0.0469010435,
-0.007480266,
-0.2750293911,
0.0150734847,
-0.0468256883,
0.0365487263,
0.3245360553,
0.1357449889,
0.2842974067,
0.0047923345,
0.0759070218,
0.0591901541,
-0.0705470964,
-0.2451153994,
-0.2655249834,
0.2086173892,
0.011845801,
-0.2169550955,
-0.0379030704,
-0.1300314516,
-0.0766467676,
-0.3203713298,
0.209849149,
-0.0988665372,
-0.1485647261,
-0.0844758302,
0.1864529848,
0.0134584401,
-0.202308774,
-0.084979564,
-0.139017731,
0.3465050161,
0.0737654939,
0.2523389757,
0.0113251992,
-0.147742793,
-0.0769291073,
-0.078416422,
-0.0100989295,
0.0777383596,
0.4048353434,
-0.380305618,
-0.0524063595,
0.3725064397,
0.2295116335,
0.3335460424,
-0.2639978826,
-0.1194755957,
0.0723414347,
0.2322455496,
-0.1748506278,
-0.0742867365,
-0.1705978364,
0.047526516,
-0.148920849,
0.095879145,
-0.2028842866,
-0.2803359032,
-0.2927046716,
-0.0331137143,
0.364756912,
0.0355128981,
0.5340806246,
0.3414118588,
-0.1694129407,
0.135183543,
0.0058016609,
-0.1388050914,
0.2735061944,
0.2553638816,
0.0600787625,
0.2107769996,
0.2442286313,
0.4803508818,
-0.4113744795,
-0.5874173641,
0.1207619905,
0.2656997442,
-0.0921041816,
0.379948765,
0.1737385392,
0.2689506412,
-0.3746724725,
0.0531300269,
-0.3565824032,
0.1593292058,
0.0366865546,
-0.0217265282,
0.2121944726,
-0.1986453533,
-0.0490229689,
-0.0160135105,
-0.0138671026,
-0.0852613002,
-0.2170169353,
0.0516322292,
-0.1664080173,
-0.1581416577,
-0.2040442377,
0.1244699806,
0.2201447785,
-0.4705683887,
0.2944374084,
0.4026512504,
-0.1701406538,
-0.0883051008,
0.3750337362,
0.5729664564,
0.5070333481,
0.0282177795,
0.0749278888,
0.1327108294,
-0.0337622277,
-0.0668656453,
0.2761418223,
0.0967159569,
0.016379822,
0.4060317576,
0.1539083719,
-0.1768600047,
-0.1412083954,
0.2871555686,
0.1493650973,
-0.3433717787,
0.0214406941,
-0.0026767387,
-0.0833675787,
-0.1989475042,
0.0653603449,
-0.3520376384,
0.117427215,
0.1061421186,
-0.0536124669,
0.0961891487,
0.0305512771,
0.0917767957,
-0.0451874956,
0.3622714281,
0.2896974683,
0.0950393975,
-0.2613437772,
-0.5776646733,
-0.5151473284,
0.4017106593,
-0.1313642263,
-0.3677325845,
0.0209536795,
0.2548774779,
-0.0252445526,
0.1857420504,
0.093218416,
0.1646309048,
0.1397868544,
0.0374460593,
-0.4324445724,
-0.5413466692,
-0.0227521956,
0.1812511981,
-0.0681804046,
-0.5608495474,
-0.0752050728,
-0.1445596814,
-0.0256240703,
-0.0834025741,
-0.0101696001,
0.064334482,
-0.2508777976,
0.5731600523,
0.1947072446,
0.321662426,
-0.2487639785,
0.0036879804,
-0.1730528474,
-0.3250439465,
-0.0488475822,
0.2271833271,
0.2104657441,
0.366597116,
-0.1545477211,
-0.1176962852,
-0.367703855,
0.3246559799,
0.1541641653,
-0.1898601353,
-0.2531887889,
0.0225646123,
0.0593405962,
-0.2581817508,
0.2213531584,
0.0524688661,
-0.1691340804,
0.0093487762,
0.1431344599,
-0.3134629726,
0.294228971,
-0.2488835305,
-0.3202434778,
0.1681115329,
0.2727462053,
0.0672925115,
-0.1146676913,
-0.3479161561,
0.268245399,
0.56110847,
0.123751536,
-0.284481287,
0.309910953,
-0.2426677048,
0.1090398356,
0.0541870184,
0.4132000506,
0.0294011123,
-0.3632503152,
0.1009882912,
-0.3212276399
] |
https://github.com/huggingface/datasets/issues/3060 | load_dataset('openwebtext') yields "Compressed file ended before the end-of-stream marker was reached" | I close this issue for the moment. Feel free to re-open it again if the problem persists. | ## Describe the bug
When I try `load_dataset('openwebtext')`, I receive a "EOFError: Compressed file ended before the end-of-stream marker was reached" error.
## Steps to reproduce the bug
```
from datasets import load_dataset
dataset = load_dataset('openwebtext')
```
## Expected results
I expect the `dataset` variable to be properly constructed.
## Actual results
```
File "/home/rschaef/CoCoSci-Language-Distillation/distillation_v2/ratchet_learning/tasks/base.py", line 37, in create_dataset
dataset_str,
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/load.py", line 1117, in load_dataset
use_auth_token=use_auth_token,
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/builder.py", line 637, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/builder.py", line 704, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/rschaef/.cache/huggingface/modules/datasets_modules/datasets/openwebtext/85b3ae7051d2d72e7c5fdf6dfb462603aaa26e9ed506202bf3a24d261c6c40a1/openwebtext.py", line 61, in _split_generators
dl_dir = dl_manager.download_and_extract(_URL)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 284, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 261, in extract
partial(cached_path, download_config=download_config), path_or_paths, num_proc=num_proc, disable_tqdm=False
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/py_utils.py", line 197, in map_nested
return function(data_struct)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 316, in cached_path
output_path, force_extract=download_config.force_extract
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 40, in extract
self.extractor.extract(input_path, output_path, extractor=extractor)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 179, in extract
return extractor.extract(input_path, output_path)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 53, in extract
tar_file.extractall(output_path)
File "/usr/lib/python3.6/tarfile.py", line 2010, in extractall
numeric_owner=numeric_owner)
File "/usr/lib/python3.6/tarfile.py", line 2052, in extract
numeric_owner=numeric_owner)
File "/usr/lib/python3.6/tarfile.py", line 2122, in _extract_member
self.makefile(tarinfo, targetpath)
File "/usr/lib/python3.6/tarfile.py", line 2171, in makefile
copyfileobj(source, target, tarinfo.size, ReadError, bufsize)
File "/usr/lib/python3.6/tarfile.py", line 249, in copyfileobj
buf = src.read(bufsize)
File "/usr/lib/python3.6/lzma.py", line 200, in read
return self._buffer.read(size)
File "/usr/lib/python3.6/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/usr/lib/python3.6/_compression.py", line 99, in read
raise EOFError("Compressed file ended before the "
python-BaseException
EOFError: Compressed file ended before the end-of-stream marker was reached
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-4.4.0-173-generic-x86_64-with-Ubuntu-16.04-xenial
- Python version: 3.6.10
- PyArrow version: 5.0.0 | 17 | load_dataset('openwebtext') yields "Compressed file ended before the end-of-stream marker was reached"
## Describe the bug
When I try `load_dataset('openwebtext')`, I receive a "EOFError: Compressed file ended before the end-of-stream marker was reached" error.
## Steps to reproduce the bug
```
from datasets import load_dataset
dataset = load_dataset('openwebtext')
```
## Expected results
I expect the `dataset` variable to be properly constructed.
## Actual results
```
File "/home/rschaef/CoCoSci-Language-Distillation/distillation_v2/ratchet_learning/tasks/base.py", line 37, in create_dataset
dataset_str,
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/load.py", line 1117, in load_dataset
use_auth_token=use_auth_token,
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/builder.py", line 637, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/builder.py", line 704, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/home/rschaef/.cache/huggingface/modules/datasets_modules/datasets/openwebtext/85b3ae7051d2d72e7c5fdf6dfb462603aaa26e9ed506202bf3a24d261c6c40a1/openwebtext.py", line 61, in _split_generators
dl_dir = dl_manager.download_and_extract(_URL)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 284, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/download_manager.py", line 261, in extract
partial(cached_path, download_config=download_config), path_or_paths, num_proc=num_proc, disable_tqdm=False
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/py_utils.py", line 197, in map_nested
return function(data_struct)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 316, in cached_path
output_path, force_extract=download_config.force_extract
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 40, in extract
self.extractor.extract(input_path, output_path, extractor=extractor)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 179, in extract
return extractor.extract(input_path, output_path)
File "/home/rschaef/CoCoSci-Language-Distillation/cocosci/lib/python3.6/site-packages/datasets/utils/extract.py", line 53, in extract
tar_file.extractall(output_path)
File "/usr/lib/python3.6/tarfile.py", line 2010, in extractall
numeric_owner=numeric_owner)
File "/usr/lib/python3.6/tarfile.py", line 2052, in extract
numeric_owner=numeric_owner)
File "/usr/lib/python3.6/tarfile.py", line 2122, in _extract_member
self.makefile(tarinfo, targetpath)
File "/usr/lib/python3.6/tarfile.py", line 2171, in makefile
copyfileobj(source, target, tarinfo.size, ReadError, bufsize)
File "/usr/lib/python3.6/tarfile.py", line 249, in copyfileobj
buf = src.read(bufsize)
File "/usr/lib/python3.6/lzma.py", line 200, in read
return self._buffer.read(size)
File "/usr/lib/python3.6/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/usr/lib/python3.6/_compression.py", line 99, in read
raise EOFError("Compressed file ended before the "
python-BaseException
EOFError: Compressed file ended before the end-of-stream marker was reached
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-4.4.0-173-generic-x86_64-with-Ubuntu-16.04-xenial
- Python version: 3.6.10
- PyArrow version: 5.0.0
I close this issue for the moment. Feel free to re-open it again if the problem persists. | [
-0.3312988877,
-0.0927271023,
0.003960914,
0.4996192455,
0.2171835154,
0.021186851,
0.1519744992,
0.3008338213,
-0.0964679196,
0.2880549431,
0.0456488989,
0.4010351002,
0.1004999951,
0.157242164,
-0.1340151429,
0.1229330227,
-0.0532350391,
0.227064684,
-0.3442712724,
-0.1649356484,
-0.3830605745,
0.18088153,
-0.2773353457,
0.0628776476,
-0.1111838743,
-0.0469828062,
-0.0431890301,
0.4383740425,
-0.1630147547,
-0.2796114087,
0.2136626095,
-0.2695502639,
0.0539577864,
0.6261739135,
-0.0001161531,
-0.0926101282,
0.3415844142,
-0.1594272852,
-0.5765927434,
-0.3982525766,
-0.3595907688,
-0.17110309,
-0.0351356752,
-0.2234363705,
0.1131687909,
-0.3637068272,
-0.0003500305,
-0.903801918,
0.401437521,
0.3819847107,
0.1780740619,
0.2864636481,
0.1049727201,
0.0262466352,
0.2313107997,
-0.1325445175,
-0.1141460687,
0.0244515929,
0.1257954538,
0.0218918212,
0.0266762674,
0.1473561078,
0.0009366641,
0.2005744129,
0.1641595066,
0.1365945935,
0.0048937532,
-0.2551263571,
0.0068791676,
0.2073962092,
0.4921974242,
-0.174404785,
-0.4262571037,
-0.140174523,
-0.1636831313,
-0.2943091094,
0.3465164006,
0.4004842937,
-0.0935190096,
0.2845865786,
-0.1182854921,
0.0399829224,
-0.2083886266,
0.2447597384,
-0.1515057236,
0.5106204748,
-0.1901017129,
0.1200769097,
-0.0266890079,
0.0143502764,
0.2320244908,
-0.2181991041,
-0.2323103845,
0.1040348634,
-0.2871169448,
0.0572171062,
0.052177798,
0.0754539147,
0.3376554549,
0.3926326931,
0.4226470888,
0.0361552797,
-0.057887353,
0.0168297254,
0.4293918312,
0.4896796048,
0.1440077424,
0.3416920602,
0.128161937,
0.0548678041,
-0.1055299714,
-0.0860909745,
-0.1812630296,
-0.3085368276,
0.1995104551,
0.0358863622,
0.4818579257,
-0.2016385794,
-0.408526659,
0.0601196028,
0.0011184174,
-0.0490920432,
-0.1270445287,
0.3839947283,
-0.2501536012,
0.1746228635,
0.2353310585,
0.1076787859,
-0.167091161,
-0.3009108603,
-0.1993412822,
-0.0774162263,
-0.1510993093,
-0.1715003997,
0.0437889919,
-0.4479245543,
0.3691601157,
-0.0233907141,
0.0399988927,
-0.2815098763,
0.1289475262,
-0.1110007763,
0.252485007,
-0.0073833778,
0.0215790439,
0.1751913577,
0.2928542495,
-0.0335102938,
-0.0665790066,
0.2539947033,
-0.3219538331,
-0.370703131,
-0.2056259513,
0.2098764926,
-0.205297485,
-0.0307981893,
-0.139787972,
-0.1158813834,
0.3711584508,
0.0239749569,
-0.2101042271,
-0.0913010985,
-0.3554475009,
-0.1127242148,
0.2910827398,
0.4761278927,
-0.2243701518,
-0.1116759256,
-0.0586350821,
0.0355623662,
0.3517947197,
0.0072027124,
-0.1956916451,
0.1678810269,
-0.3378800452,
-0.0389307141,
0.4461310804,
-0.3789563477,
-0.5029713511,
0.2231993824,
-0.1793848723,
0.2654218376,
0.0531425625,
-0.4097701013,
0.2695761919,
-0.0952483714,
0.1045241281,
0.3907121122,
-0.1543831378,
0.2037487328,
-0.2764239907,
-0.2854370475,
0.42281726,
0.079649061,
-0.1850768477,
0.1122497991,
0.1673433781,
0.1180896312,
0.2080081254,
-0.0696031079,
0.1277029067,
-0.1067370996,
0.0522446372,
-0.1227005199,
0.1166331023,
-0.0956515297,
-0.1017509401,
0.1730464846,
0.0438249111,
0.0972485542,
-0.2194464803,
0.094084017,
-0.4863501787,
0.0839415267,
-0.4505892396,
-0.23581101,
0.091042392,
0.2770381272,
0.0987460241,
0.0791370869,
-0.1225552633,
0.3559845686,
-0.099719204,
0.0703954697,
-0.2106670588,
0.0668474585,
0.0505847521,
0.0439951979,
0.1814975291,
0.1181752533,
0.0629806072,
-0.3363868594,
-0.4088575542,
0.4617057145,
-0.0457720719,
0.2274632752,
-0.1359809637,
-0.1161871478,
0.1352994442,
-0.2820350528,
0.1351781338,
0.1544812024,
0.1860886067,
0.0585613139,
0.0533634946,
0.1390979141,
0.3611160219,
0.1057875231,
0.0357285514,
-0.0800555199,
0.0920298398,
-0.1346666068,
0.0610869266,
-0.2376103699,
0.1896294802,
-0.0795637146,
0.348770678,
-0.0830519795,
0.3082595468,
0.1251769066,
0.5375604033,
0.0301422458,
0.0406417102,
0.4136206508,
-0.1843683124,
-0.1502150148,
-0.1502022594,
0.2045321018,
0.4924979806,
0.2075411379,
0.1358684301,
0.0057755322,
0.1321403682,
-0.0433416106,
0.4621792734,
0.1222951859,
0.2442748845,
0.3935103416,
0.0905457363,
0.0110954158,
-0.1202891245,
-0.1793652922,
-0.0723669156,
0.1638977081,
-0.3875533342,
0.1813229024,
-0.3384013772,
0.1017310098,
-0.0136560341,
0.0421159938,
0.0607790947,
-0.2998275459,
-0.1119078472,
-0.0727641061,
-0.1296860278,
0.2440656573,
-0.0383231044,
0.2057430595,
0.2878132164,
0.0611636043,
0.104104504,
-0.1987076551,
-0.3906429112,
0.0209228303,
0.2030636519,
-0.0895023271,
0.1980610043,
-0.2523884177,
-0.0873996615,
-0.0960291773,
-0.0607470535,
0.2478196919,
0.0834888145,
0.3964467645,
0.1029935926,
0.1237237826,
0.1531061381,
-0.3236401677,
0.2378219068,
-0.0654019043,
-0.248344481,
0.1270751208,
0.0302285459,
0.0454626419,
-0.0411411226,
-0.5968303084,
-0.253313601,
-0.5044032335,
-0.0213333853,
-0.0189506356,
0.1721515805,
0.275108695,
0.1224142611,
0.056617789,
0.1341882944,
0.1148348078,
-0.2150577903,
-0.5697594285,
0.3551084697,
-0.2896881104,
-0.319716543,
-0.0250024684,
0.0350133441,
0.027304681,
0.177540049,
-0.4853966534,
0.2039100081,
-0.1991742402,
-0.121623449,
-0.3832294643,
0.253744483,
0.1903078407,
0.0784887448,
-0.0645282716,
-0.3062005043,
-0.0401636437,
0.1397824436,
-0.0769659951,
0.3363406658,
-0.0793641508,
0.3724678755,
0.028379783,
0.0935250074,
0.3273429275,
0.0059198705,
0.35417822,
0.0358773172,
0.2581320703,
-0.1097091883,
-0.1072167978,
0.1250616163,
-0.1380741149,
-0.0532405302,
0.4216043353,
0.2599181235,
0.1153892577,
-0.2754814923,
0.0507023521,
-0.3561891019,
-0.1660093069,
-0.1081347391,
-0.0020899519,
0.1543161422,
0.0809338391,
0.0899867713,
-0.142625913,
0.052763287,
0.0186591335,
-0.0419510975,
0.0568334647,
-0.1710411012,
0.023172345,
0.3124596179,
-0.5204684734,
0.2605834007,
0.0894669145,
0.2842404544,
0.0010524605,
-0.1432711333,
-0.0881001055,
0.0277305674,
0.3974627852,
-0.07891386,
0.3769082129,
0.0784198344,
0.3022578955,
-0.2235931605,
0.0230770744,
-0.0580022894,
0.1995112598,
0.1498233825,
0.1262691617,
-0.2742858231,
0.0526906513,
0.2208815664,
0.3646791875,
-0.2093191445,
-0.1218706295,
-0.1677191108,
-0.3943433166,
-0.2403149158,
-0.2420591712,
0.0252913367,
0.3883754313,
-0.1794861108,
-0.3364024758,
-0.0400849059,
-0.2860060632,
0.0538075753,
0.0979004577,
0.2472581267,
-0.1630391628,
0.2312535197,
-0.0394423753,
0.2188844532,
0.3812593222,
0.7686731815,
0.0726296008,
-0.4599885643,
0.1760658175,
-0.0878915861,
0.0436839797,
0.0327387936,
-0.2629179358,
-0.2616370916,
0.0148434062,
0.3235076368,
-0.2305272222,
0.3005500138,
0.1901090592,
0.1412063092,
-0.4759507179,
-0.4383702278,
0.4097526968,
-0.20084849,
0.090850234,
0.7001901269,
-0.2823852301,
-0.359375596,
0.3701682389,
-0.0882115439,
0.9076275826,
0.1315838099,
-0.1430114508,
0.3270440698,
-0.1164640337,
0.2704944313,
-0.1891549081,
-0.1353436261,
-0.158711642,
-0.381988585,
0.0861666128,
-0.1358551681,
0.0220863465,
0.2708484232,
-0.4869176745,
0.1187654659,
-0.2245688885,
-0.2238392979,
0.1922368407,
0.2945992053,
-0.2236884832,
-0.2112635076,
-0.4546410143,
0.1113536358,
-0.1514761597,
0.1542664319,
-0.0210540779,
0.0075532822,
-0.2183408886,
-0.237165302,
-0.21413441,
0.3838076293,
-0.4636153281,
0.0603889674,
-0.3841510415,
-0.332883656,
0.2481715232,
0.101375632,
0.098665975,
0.1167774126,
-0.0728795826,
0.2114423215,
0.0380652025,
0.038793426,
0.035578195,
0.0973790884,
0.2303489596,
-0.0861830786,
-0.0951276571,
0.1453273743,
-0.218667686,
-0.2722501159,
0.5731282234,
0.0039058556,
0.2937593162,
-0.4113661051,
-0.1326768398,
-0.0984923393,
0.0489348844,
-0.3025235534,
0.1013436243,
0.2192643583,
-0.233411029,
0.1533553153,
0.0818627179,
-0.3589735031,
-0.1407090276,
0.2947538793,
-0.1721216142,
0.0233769286,
0.5264533162,
0.2204819322,
0.002052943,
-0.1068608537,
0.3472933471,
-0.0313727409,
-0.5548990369,
0.4126236737,
-0.08650475,
0.3118653893,
-0.2100648284,
0.6979729533,
0.2385826856,
0.3482574522,
-0.0108662006,
-0.5089680552,
-0.0298537593,
-0.131516546,
-0.3001740277,
0.1154470369,
-0.0162786525,
0.2895541787,
-0.0469010435,
-0.007480266,
-0.2750293911,
0.0150734847,
-0.0468256883,
0.0365487263,
0.3245360553,
0.1357449889,
0.2842974067,
0.0047923345,
0.0759070218,
0.0591901541,
-0.0705470964,
-0.2451153994,
-0.2655249834,
0.2086173892,
0.011845801,
-0.2169550955,
-0.0379030704,
-0.1300314516,
-0.0766467676,
-0.3203713298,
0.209849149,
-0.0988665372,
-0.1485647261,
-0.0844758302,
0.1864529848,
0.0134584401,
-0.202308774,
-0.084979564,
-0.139017731,
0.3465050161,
0.0737654939,
0.2523389757,
0.0113251992,
-0.147742793,
-0.0769291073,
-0.078416422,
-0.0100989295,
0.0777383596,
0.4048353434,
-0.380305618,
-0.0524063595,
0.3725064397,
0.2295116335,
0.3335460424,
-0.2639978826,
-0.1194755957,
0.0723414347,
0.2322455496,
-0.1748506278,
-0.0742867365,
-0.1705978364,
0.047526516,
-0.148920849,
0.095879145,
-0.2028842866,
-0.2803359032,
-0.2927046716,
-0.0331137143,
0.364756912,
0.0355128981,
0.5340806246,
0.3414118588,
-0.1694129407,
0.135183543,
0.0058016609,
-0.1388050914,
0.2735061944,
0.2553638816,
0.0600787625,
0.2107769996,
0.2442286313,
0.4803508818,
-0.4113744795,
-0.5874173641,
0.1207619905,
0.2656997442,
-0.0921041816,
0.379948765,
0.1737385392,
0.2689506412,
-0.3746724725,
0.0531300269,
-0.3565824032,
0.1593292058,
0.0366865546,
-0.0217265282,
0.2121944726,
-0.1986453533,
-0.0490229689,
-0.0160135105,
-0.0138671026,
-0.0852613002,
-0.2170169353,
0.0516322292,
-0.1664080173,
-0.1581416577,
-0.2040442377,
0.1244699806,
0.2201447785,
-0.4705683887,
0.2944374084,
0.4026512504,
-0.1701406538,
-0.0883051008,
0.3750337362,
0.5729664564,
0.5070333481,
0.0282177795,
0.0749278888,
0.1327108294,
-0.0337622277,
-0.0668656453,
0.2761418223,
0.0967159569,
0.016379822,
0.4060317576,
0.1539083719,
-0.1768600047,
-0.1412083954,
0.2871555686,
0.1493650973,
-0.3433717787,
0.0214406941,
-0.0026767387,
-0.0833675787,
-0.1989475042,
0.0653603449,
-0.3520376384,
0.117427215,
0.1061421186,
-0.0536124669,
0.0961891487,
0.0305512771,
0.0917767957,
-0.0451874956,
0.3622714281,
0.2896974683,
0.0950393975,
-0.2613437772,
-0.5776646733,
-0.5151473284,
0.4017106593,
-0.1313642263,
-0.3677325845,
0.0209536795,
0.2548774779,
-0.0252445526,
0.1857420504,
0.093218416,
0.1646309048,
0.1397868544,
0.0374460593,
-0.4324445724,
-0.5413466692,
-0.0227521956,
0.1812511981,
-0.0681804046,
-0.5608495474,
-0.0752050728,
-0.1445596814,
-0.0256240703,
-0.0834025741,
-0.0101696001,
0.064334482,
-0.2508777976,
0.5731600523,
0.1947072446,
0.321662426,
-0.2487639785,
0.0036879804,
-0.1730528474,
-0.3250439465,
-0.0488475822,
0.2271833271,
0.2104657441,
0.366597116,
-0.1545477211,
-0.1176962852,
-0.367703855,
0.3246559799,
0.1541641653,
-0.1898601353,
-0.2531887889,
0.0225646123,
0.0593405962,
-0.2581817508,
0.2213531584,
0.0524688661,
-0.1691340804,
0.0093487762,
0.1431344599,
-0.3134629726,
0.294228971,
-0.2488835305,
-0.3202434778,
0.1681115329,
0.2727462053,
0.0672925115,
-0.1146676913,
-0.3479161561,
0.268245399,
0.56110847,
0.123751536,
-0.284481287,
0.309910953,
-0.2426677048,
0.1090398356,
0.0541870184,
0.4132000506,
0.0294011123,
-0.3632503152,
0.1009882912,
-0.3212276399
] |
https://github.com/huggingface/datasets/issues/3058 | Dataset wikipedia and Bookcorpusopen cannot be fetched from dataloader. | Hi ! I think this issue is more related to the `transformers` project. Could you open an issue on https://github.com/huggingface/transformers ?
Anyway I think the issue could be that both wikipedia and bookcorpusopen have an additional "title" column, contrary to wikitext which only has a "text" column. After calling `load_dataset`, can you try doing `dataset = dataset.remove_columns("title")` ? | ## Describe the bug
I have used the previous version of `transformers` and `datasets`. The dataset `wikipedia` can be successfully used. Recently, I upgrade them to the newest version and find it raises errors. I also tried other datasets. The `wikitext` works and the `bookcorpusopen` raises the same errors as `wikipedia`.
## Steps to reproduce the bug
Run the `run_mlm_no_trainer.py` and the given script on this [link](https://github.com/huggingface/transformers/tree/master/examples/pytorch/language-modeling). Change the dataset from wikitext to wikipedia or bookcorpusopen. BTW, the library transformers is of version 4.11.3.
## Expected results
The data batchs are fetched from the data loader and train.
## Actual results
The first time to fetch data batch occurs error.
`Traceback (most recent call last):
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 705, in convert_to_tensors
tensor = as_tensor(value)
ValueError: too many dimensions 'str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "src/original_run_mlm_no_trainer.py", line 528, in <module>
main()
File "src/original_run_mlm_no_trainer.py", line 488, in main
for step, batch in enumerate(train_dataloader):
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/accelerate/data_loader.py", line 303, in __iter__
for batch in super().__iter__():
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
data = self._next_data()
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 557, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
return self.collate_fn(data)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/data/data_collator.py", line 41, in __call__
return self.torch_call(features)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/data/data_collator.py", line 671, in torch_call
batch = self.tokenizer.pad(examples, return_tensors="pt", pad_to_multiple_of=self.pad_to_multiple_of)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2774, in pad
return BatchEncoding(batch_outputs, tensor_type=return_tensors)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 210, in __init__
self.convert_to_tensors(tensor_type=tensor_type, prepend_batch_axis=prepend_batch_axis)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 722, in convert_to_tensors
"Unable to create tensor, you should probably activate truncation and/or padding "
ValueError: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length.
`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: Linux-5.8.0-59-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.6
- PyArrow version: 5.0.0
| 58 | Dataset wikipedia and Bookcorpusopen cannot be fetched from dataloader.
## Describe the bug
I have used the previous version of `transformers` and `datasets`. The dataset `wikipedia` can be successfully used. Recently, I upgrade them to the newest version and find it raises errors. I also tried other datasets. The `wikitext` works and the `bookcorpusopen` raises the same errors as `wikipedia`.
## Steps to reproduce the bug
Run the `run_mlm_no_trainer.py` and the given script on this [link](https://github.com/huggingface/transformers/tree/master/examples/pytorch/language-modeling). Change the dataset from wikitext to wikipedia or bookcorpusopen. BTW, the library transformers is of version 4.11.3.
## Expected results
The data batchs are fetched from the data loader and train.
## Actual results
The first time to fetch data batch occurs error.
`Traceback (most recent call last):
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 705, in convert_to_tensors
tensor = as_tensor(value)
ValueError: too many dimensions 'str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "src/original_run_mlm_no_trainer.py", line 528, in <module>
main()
File "src/original_run_mlm_no_trainer.py", line 488, in main
for step, batch in enumerate(train_dataloader):
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/accelerate/data_loader.py", line 303, in __iter__
for batch in super().__iter__():
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
data = self._next_data()
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 557, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
return self.collate_fn(data)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/data/data_collator.py", line 41, in __call__
return self.torch_call(features)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/data/data_collator.py", line 671, in torch_call
batch = self.tokenizer.pad(examples, return_tensors="pt", pad_to_multiple_of=self.pad_to_multiple_of)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2774, in pad
return BatchEncoding(batch_outputs, tensor_type=return_tensors)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 210, in __init__
self.convert_to_tensors(tensor_type=tensor_type, prepend_batch_axis=prepend_batch_axis)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 722, in convert_to_tensors
"Unable to create tensor, you should probably activate truncation and/or padding "
ValueError: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length.
`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: Linux-5.8.0-59-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.6
- PyArrow version: 5.0.0
Hi ! I think this issue is more related to the `transformers` project. Could you open an issue on https://github.com/huggingface/transformers ?
Anyway I think the issue could be that both wikipedia and bookcorpusopen have an additional "title" column, contrary to wikitext which only has a "text" column. After calling `load_dataset`, can you try doing `dataset = dataset.remove_columns("title")` ? | [
-0.1171703935,
-0.0888658836,
0.0287200026,
0.5902850032,
0.1981574446,
0.0083723227,
0.4193763435,
0.2448296249,
0.0080309622,
0.0493949912,
-0.2614282072,
0.0099563012,
0.0961200818,
-0.1403683573,
-0.186207518,
-0.5285599828,
0.087584205,
0.1113325432,
-0.438457042,
-0.0591083802,
-0.234715566,
0.2510100007,
-0.2473160475,
0.1419706792,
-0.4807750583,
-0.1802390069,
-0.0386592671,
-0.0276200175,
-0.0100244191,
-0.2176780999,
0.4571981728,
-0.0493430644,
0.4165706038,
0.6459464431,
-0.0001281459,
0.1455686837,
0.3086574078,
-0.0806099027,
-0.406444639,
-0.3418370187,
0.0844814926,
-0.3148393929,
0.3177811801,
-0.2916398644,
-0.1006429046,
-0.1809125245,
-0.1234994084,
-0.1434836835,
0.4752550125,
0.4050861895,
0.0876133442,
0.4899053276,
0.2896857858,
-0.0910832733,
0.4336785376,
0.2441263646,
-0.1686101258,
0.1206396967,
0.2548328936,
-0.0317672007,
-0.0894667506,
0.2407542169,
-0.0562879816,
0.2046242505,
0.2193749547,
0.190347299,
0.1454553306,
-0.4963713884,
0.062313471,
0.282484293,
0.6721063256,
-0.2857174575,
-0.5109416246,
-0.240803957,
-0.1129162684,
0.0782910064,
0.3663066626,
0.1060312763,
-0.0971277133,
-0.0947540402,
-0.1954411864,
-0.2011727691,
-0.2782557905,
0.3333958387,
-0.229327485,
0.6383188963,
0.03425036,
0.2232230455,
0.1940725595,
-0.0854956359,
0.2722283006,
-0.1412296742,
0.2133421153,
0.3040313423,
-0.2496558726,
-0.063440837,
-0.1190445349,
-0.4535714686,
-0.2244600803,
-0.1983704418,
-0.0865398198,
-0.2103539258,
-0.0466720127,
0.0776927546,
0.3683885634,
0.3098662198,
-0.0909319893,
0.5451512933,
0.378529042,
0.39108634,
-0.0818723366,
-0.0154220108,
0.017925648,
-0.015124565,
-0.1180351302,
0.1055032387,
0.3192505538,
-0.1981033832,
0.0307711512,
-0.0314476863,
-0.1382979155,
-0.2237644494,
0.1434347928,
0.2013050169,
-0.2833175659,
0.4591159225,
0.2934340835,
0.2424464971,
-0.1315659881,
-0.1539353877,
-0.0161547773,
0.2229111046,
-0.2253090143,
0.1299216598,
0.4849186838,
-0.0583619252,
0.207994774,
0.1109641492,
0.0612231381,
-0.2180413157,
-0.0050381152,
-0.4270086288,
-0.0926464424,
0.2091380507,
-0.0764839649,
0.4124710858,
0.066762045,
0.0055020936,
-0.1326866597,
0.1776529849,
-0.5252424479,
-0.0866227746,
-0.1289569736,
0.0689048842,
-0.1025049239,
0.1387516409,
-0.2886663079,
0.1624600887,
0.4378766119,
-0.2315799445,
0.0823424533,
-0.341763705,
-0.009868281,
-0.0583570115,
0.1542675644,
0.2835452855,
-0.2258251011,
-0.2675381005,
-0.0562046207,
-0.0233823657,
0.2037675977,
0.3895205259,
-0.4370260239,
0.2606164813,
-0.1095651165,
0.0259378981,
0.3239628971,
-0.3485061228,
-0.5067796707,
0.0822415054,
0.1392826736,
0.1930875033,
-0.0024982006,
0.0781060457,
0.2480257899,
-0.0567221716,
-0.0810235962,
0.4235646725,
0.1310388297,
0.1502451748,
-0.2206773758,
-0.3404783607,
0.4318113327,
0.3021396995,
0.5274088383,
0.0506260432,
0.0029891573,
0.5645061731,
0.1752803475,
-0.2198447287,
0.1318727732,
0.3785248101,
-0.076873824,
-0.0214930438,
0.2138983458,
-0.1895804703,
-0.5815828443,
0.2631796896,
-0.4444319904,
0.327044487,
-0.065880172,
0.034655571,
-0.0846819431,
0.0045283805,
-0.1166415289,
-0.1295530945,
0.0068399296,
0.029696757,
0.0795700252,
0.127587378,
0.1058194786,
-0.0091677224,
-0.0868385807,
0.1810749769,
-0.4302276969,
0.669971168,
-0.0863272101,
-0.1038034111,
-0.2037699521,
0.0931570753,
0.2730451524,
-0.18780303,
-0.1515585929,
0.0965948403,
0.0587591827,
0.008226607,
-0.2379565537,
0.1389171779,
0.4958922863,
-0.3601183295,
0.268872112,
0.3903030753,
0.1611916274,
-0.0840756595,
-0.0987917334,
0.0845495239,
0.0638572201,
0.3242053688,
0.1774786562,
0.0445013978,
0.1756591201,
-0.0550794937,
-0.0217928812,
-0.1192780361,
0.0884169638,
-0.1062046885,
0.0800943449,
-0.0524799824,
-0.0873330235,
-0.1037756577,
0.401524514,
0.0314122587,
0.2027189583,
0.231085673,
-0.4405786693,
-0.0669258237,
-0.0037618168,
0.0802351981,
0.1953768283,
-0.0142133767,
0.0023399014,
-0.1138559431,
-0.0544695929,
-0.0266035572,
0.2037664056,
0.4041629136,
0.2687700391,
0.1880780905,
0.2951117456,
0.0657680556,
-0.1009710357,
-0.2959223092,
0.0578402095,
0.329582572,
-0.2637157738,
0.1906747073,
-0.1156064048,
-0.1797398329,
-0.3497118652,
-0.276003927,
-0.4515841901,
-0.2150101662,
-0.2188575417,
0.4294587076,
-0.0150340917,
0.1557557583,
0.0451591983,
-0.0121268556,
0.0492922403,
0.0540843382,
-0.1029285714,
0.0002993783,
-0.2656460702,
-0.0639111847,
0.135194391,
-0.2079047859,
-0.0924979001,
-0.0064729103,
-0.0969610363,
-0.402687788,
-0.4037210643,
0.2633166015,
0.049879659,
0.3535008132,
-0.0341054201,
0.2956376672,
-0.0522307716,
-0.4987384677,
0.2341711968,
-0.2217988521,
0.0341942348,
0.2018873394,
-0.0928441808,
0.1023059562,
-0.0496038049,
-0.5121682882,
-0.4480068386,
-0.3077343702,
-0.0585261248,
0.111749649,
0.1526692808,
0.4017453492,
0.0558007918,
0.0782741308,
0.2752711475,
0.1532313675,
-0.0719690993,
0.0218490418,
0.4701944292,
-0.0880749077,
-0.3648936749,
-0.1620920599,
-0.1677837521,
0.0799676329,
0.2666203976,
-0.587105751,
-0.060787674,
-0.2496202737,
0.0943386704,
-0.0796471089,
0.1099922135,
0.1963576227,
0.0037183298,
0.136105597,
-0.0127288317,
-0.027274264,
0.0776351616,
0.1489041001,
0.3079799712,
0.0135949356,
0.3438877463,
-0.1361531913,
0.9339315295,
0.1448739171,
-0.1148534939,
0.280800432,
0.2016265541,
0.1213694587,
0.0132451458,
-0.5149045587,
-0.1874068826,
-0.2477411479,
0.066923894,
0.2418576628,
-0.1482755393,
-0.3719799817,
-0.2271694541,
-0.0571675487,
-0.2921555638,
-0.3293819726,
0.1470724195,
0.0263394732,
0.3216875792,
0.0163433198,
0.2940445244,
-0.1134624705,
-0.3156494796,
-0.0535401814,
0.0800503343,
-0.0711550862,
0.1863072664,
-0.2343780547,
-0.3660222292,
-0.3364728987,
0.1730324775,
0.133235082,
0.4602352083,
0.0242913365,
0.0411275886,
0.1570057422,
0.0782166198,
0.5091132522,
-0.017528126,
-0.0927421451,
0.1279959828,
-0.3724597991,
-0.4616313279,
-0.2451295406,
-0.4739657044,
0.1955102235,
0.3858444989,
0.4522669911,
-0.3439494073,
-0.0451275483,
0.2529805899,
0.2160046697,
-0.183316648,
-0.110708192,
-0.0648349896,
-0.0681736693,
-0.3261941075,
0.0151140727,
0.0376317576,
0.2877973318,
-0.3037428558,
0.0013248245,
0.0469482429,
-0.0326920114,
0.1790403873,
0.2479409873,
0.2654923201,
0.1290815175,
0.1594572961,
0.0882677436,
0.0903590173,
0.0951968208,
0.5268136263,
-0.0514802784,
-0.3881169856,
0.2169416994,
-0.0221666861,
-0.147244975,
0.2474056333,
-0.0628964826,
0.2551638782,
0.2499764115,
0.0210730955,
-0.007129638,
0.2071488351,
0.2191333026,
-0.0819056258,
-0.4956827462,
-0.2813416123,
0.4548181593,
0.1052815765,
-0.0640055463,
0.1878258139,
-0.0415771678,
-0.3987191021,
0.1577150524,
0.0811226368,
0.916120708,
-0.0061556282,
0.120254539,
0.0927432999,
0.1487076283,
0.6694626808,
-0.226589337,
0.2461767495,
-0.3382923603,
-0.1845317781,
-0.0770696402,
-0.2236389667,
0.015270438,
0.0766333193,
-0.312828362,
0.2537166774,
-0.0499240533,
0.2261508703,
-0.0112717226,
0.2821824849,
0.1227391064,
-0.249536097,
-0.2770478129,
0.0075061908,
-0.3736134171,
0.3348962069,
-0.0336873494,
-0.063625738,
-0.2817168236,
-0.3451817036,
-0.3058497012,
0.2641847134,
-0.2628068626,
0.5294766426,
0.268222034,
-0.2669427991,
0.2213701159,
0.1951458752,
0.2200457454,
0.0358266272,
-0.3625917733,
-0.0205115322,
-0.4450185299,
-0.1483029425,
-0.0100367377,
0.1212563217,
0.4487466812,
-0.0168109704,
-0.2234736234,
0.1049106196,
-0.1720518321,
-0.2014801651,
-0.0635548532,
-0.037481565,
0.1955937296,
-0.2294775248,
0.0149915125,
-0.0727272853,
-0.1087214351,
-0.2378034294,
0.0079488344,
0.0469012931,
-0.0465733595,
0.0379332975,
0.230225563,
-0.1209119111,
-0.0464769565,
0.600204587,
0.382786572,
-0.0102788461,
0.5690379143,
0.6124482155,
-0.2357873768,
-0.0705645382,
-0.1073924974,
-0.055966448,
-0.8141795993,
0.149412781,
-0.0878952816,
-0.1295973212,
-0.2102134377,
0.3848188221,
0.2228289247,
-0.1048904508,
-0.1543703377,
-0.4591605961,
-0.4079846144,
0.2657253444,
0.0468045026,
0.1880933642,
0.1660251617,
-0.0863968879,
0.1351665407,
0.1610873193,
-0.1421513557,
0.0717597082,
-0.2580932975,
0.1412941366,
0.2510513663,
-0.224781096,
-0.0519339144,
-0.0819724053,
-0.0975886658,
-0.0710691288,
-0.0432861932,
-0.031686075,
-0.2481022924,
0.1943457425,
0.1046494842,
-0.3088172376,
-0.3422865868,
-0.3058051169,
0.0320818312,
-0.2903951108,
0.099318631,
0.0458699912,
0.0694904178,
0.3633150756,
0.0538212508,
0.0820324868,
-0.2712943256,
0.3214924037,
-0.116795592,
-0.0669613332,
0.3262191713,
0.3050458729,
0.3494804204,
0.0868693218,
-0.6275851727,
0.0909303501,
0.1131835505,
0.088254191,
0.3551674187,
-0.3227010071,
0.0883730128,
0.2234397233,
0.0577416606,
0.2909789681,
-0.0653547272,
-0.0407194644,
0.1145476773,
0.0742468685,
-0.3489328623,
-0.3547517359,
0.3190295696,
0.0647032037,
-0.0996695086,
0.2652210891,
0.2227698714,
-0.0790277049,
0.4391955137,
0.2226370573,
0.425760597,
0.0200721584,
0.4900477529,
0.4390822053,
-0.0182907861,
0.1051096618,
0.2384385765,
0.0215956569,
0.1314693838,
0.133665964,
-0.12453904,
0.2361516058,
-0.2021166086,
-0.0374762826,
0.3724545538,
-0.2250267118,
0.0308315828,
-0.0525994897,
-0.0641579553,
0.0654089972,
-0.13137725,
0.1948757023,
-0.1366693825,
0.0048341881,
-0.5221880674,
0.2069921345,
-0.2634139657,
-0.0664385185,
0.0273606665,
-0.3071012497,
-0.0857570618,
-0.0980287567,
-0.1292753816,
-0.1602961421,
0.2491050512,
0.0122926841,
-0.3724072576,
-0.4032562673,
0.1413746774,
0.3118050694,
-0.0537675768,
-0.2071280777,
0.2542580068,
0.1893884838,
-0.0612548701,
-0.1748814732,
0.3261695504,
0.2719356716,
0.3447183073,
-0.1956269741,
-0.02273928,
0.1569269896,
-0.1064622104,
0.0689168349,
0.3064603508,
0.0684707537,
0.1061414704,
0.264234066,
-0.0058615389,
-0.1090280265,
-0.0445144176,
-0.0708428323,
0.1823125333,
-0.2198441923,
0.3130636811,
-0.0586234406,
-0.1530406773,
0.0496235564,
-0.1792512387,
-0.3795902133,
0.1406917572,
0.4293881953,
-0.1168007404,
0.0368220024,
-0.0900147185,
-0.0323619582,
-0.0650790408,
0.4091814458,
0.4153811336,
0.1210026443,
-0.2627842426,
0.168228671,
-0.4695402384,
0.1406287253,
-0.0327849835,
0.0324134193,
0.1455588192,
0.193264693,
0.0088566057,
0.1032676324,
0.2164214104,
-0.0842590556,
-0.0362903327,
-0.0259330738,
-0.5294517279,
-0.1799438745,
-0.1004116982,
0.0848561302,
-0.0291591566,
-0.1817051023,
0.2558789849,
0.1350069195,
-0.1519777179,
-0.3550891578,
-0.2189487517,
0.1549503058,
-0.138134703,
0.4324792325,
0.2043059319,
0.5696884394,
0.0894159302,
0.0474709086,
-0.3112934232,
-0.3568406105,
0.0348686054,
0.063546136,
-0.0189918503,
0.7160930037,
-0.2120592743,
-0.1151492298,
-0.3567176461,
0.1224273667,
0.0502324291,
0.1020850316,
-0.2292045355,
0.1826595068,
-0.2032923549,
0.0399373099,
0.1501516253,
0.0195634887,
0.086910978,
0.063646473,
-0.3101151288,
-0.4161630273,
0.3198127449,
-0.5340050459,
-0.3824241459,
-0.4362963736,
0.1608828604,
0.0582094826,
0.0785638019,
-0.7182446122,
-0.0322753862,
0.3463797271,
-0.171214208,
-0.298832953,
-0.0317598917,
0.0066046161,
0.0885862038,
-0.1590428054,
0.3739167154,
0.0468717888,
-0.2517427802,
-0.1608271152,
-0.1572251767
] |
https://github.com/huggingface/datasets/issues/3058 | Dataset wikipedia and Bookcorpusopen cannot be fetched from dataloader. | Removing the "title" column works! Thanks for your advice.
Maybe I should still create an issue to `transformers' to mark this solution? | ## Describe the bug
I have used the previous version of `transformers` and `datasets`. The dataset `wikipedia` can be successfully used. Recently, I upgrade them to the newest version and find it raises errors. I also tried other datasets. The `wikitext` works and the `bookcorpusopen` raises the same errors as `wikipedia`.
## Steps to reproduce the bug
Run the `run_mlm_no_trainer.py` and the given script on this [link](https://github.com/huggingface/transformers/tree/master/examples/pytorch/language-modeling). Change the dataset from wikitext to wikipedia or bookcorpusopen. BTW, the library transformers is of version 4.11.3.
## Expected results
The data batchs are fetched from the data loader and train.
## Actual results
The first time to fetch data batch occurs error.
`Traceback (most recent call last):
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 705, in convert_to_tensors
tensor = as_tensor(value)
ValueError: too many dimensions 'str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "src/original_run_mlm_no_trainer.py", line 528, in <module>
main()
File "src/original_run_mlm_no_trainer.py", line 488, in main
for step, batch in enumerate(train_dataloader):
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/accelerate/data_loader.py", line 303, in __iter__
for batch in super().__iter__():
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
data = self._next_data()
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 557, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
return self.collate_fn(data)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/data/data_collator.py", line 41, in __call__
return self.torch_call(features)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/data/data_collator.py", line 671, in torch_call
batch = self.tokenizer.pad(examples, return_tensors="pt", pad_to_multiple_of=self.pad_to_multiple_of)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2774, in pad
return BatchEncoding(batch_outputs, tensor_type=return_tensors)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 210, in __init__
self.convert_to_tensors(tensor_type=tensor_type, prepend_batch_axis=prepend_batch_axis)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 722, in convert_to_tensors
"Unable to create tensor, you should probably activate truncation and/or padding "
ValueError: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length.
`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: Linux-5.8.0-59-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.6
- PyArrow version: 5.0.0
| 22 | Dataset wikipedia and Bookcorpusopen cannot be fetched from dataloader.
## Describe the bug
I have used the previous version of `transformers` and `datasets`. The dataset `wikipedia` can be successfully used. Recently, I upgrade them to the newest version and find it raises errors. I also tried other datasets. The `wikitext` works and the `bookcorpusopen` raises the same errors as `wikipedia`.
## Steps to reproduce the bug
Run the `run_mlm_no_trainer.py` and the given script on this [link](https://github.com/huggingface/transformers/tree/master/examples/pytorch/language-modeling). Change the dataset from wikitext to wikipedia or bookcorpusopen. BTW, the library transformers is of version 4.11.3.
## Expected results
The data batchs are fetched from the data loader and train.
## Actual results
The first time to fetch data batch occurs error.
`Traceback (most recent call last):
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 705, in convert_to_tensors
tensor = as_tensor(value)
ValueError: too many dimensions 'str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "src/original_run_mlm_no_trainer.py", line 528, in <module>
main()
File "src/original_run_mlm_no_trainer.py", line 488, in main
for step, batch in enumerate(train_dataloader):
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/accelerate/data_loader.py", line 303, in __iter__
for batch in super().__iter__():
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
data = self._next_data()
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 557, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
return self.collate_fn(data)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/data/data_collator.py", line 41, in __call__
return self.torch_call(features)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/data/data_collator.py", line 671, in torch_call
batch = self.tokenizer.pad(examples, return_tensors="pt", pad_to_multiple_of=self.pad_to_multiple_of)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2774, in pad
return BatchEncoding(batch_outputs, tensor_type=return_tensors)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 210, in __init__
self.convert_to_tensors(tensor_type=tensor_type, prepend_batch_axis=prepend_batch_axis)
File "/home/zyli/anaconda3/envs/LatestStacking/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 722, in convert_to_tensors
"Unable to create tensor, you should probably activate truncation and/or padding "
ValueError: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length.
`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: Linux-5.8.0-59-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.6
- PyArrow version: 5.0.0
Removing the "title" column works! Thanks for your advice.
Maybe I should still create an issue to `transformers' to mark this solution? | [
-0.1171703935,
-0.0888658836,
0.0287200026,
0.5902850032,
0.1981574446,
0.0083723227,
0.4193763435,
0.2448296249,
0.0080309622,
0.0493949912,
-0.2614282072,
0.0099563012,
0.0961200818,
-0.1403683573,
-0.186207518,
-0.5285599828,
0.087584205,
0.1113325432,
-0.438457042,
-0.0591083802,
-0.234715566,
0.2510100007,
-0.2473160475,
0.1419706792,
-0.4807750583,
-0.1802390069,
-0.0386592671,
-0.0276200175,
-0.0100244191,
-0.2176780999,
0.4571981728,
-0.0493430644,
0.4165706038,
0.6459464431,
-0.0001281459,
0.1455686837,
0.3086574078,
-0.0806099027,
-0.406444639,
-0.3418370187,
0.0844814926,
-0.3148393929,
0.3177811801,
-0.2916398644,
-0.1006429046,
-0.1809125245,
-0.1234994084,
-0.1434836835,
0.4752550125,
0.4050861895,
0.0876133442,
0.4899053276,
0.2896857858,
-0.0910832733,
0.4336785376,
0.2441263646,
-0.1686101258,
0.1206396967,
0.2548328936,
-0.0317672007,
-0.0894667506,
0.2407542169,
-0.0562879816,
0.2046242505,
0.2193749547,
0.190347299,
0.1454553306,
-0.4963713884,
0.062313471,
0.282484293,
0.6721063256,
-0.2857174575,
-0.5109416246,
-0.240803957,
-0.1129162684,
0.0782910064,
0.3663066626,
0.1060312763,
-0.0971277133,
-0.0947540402,
-0.1954411864,
-0.2011727691,
-0.2782557905,
0.3333958387,
-0.229327485,
0.6383188963,
0.03425036,
0.2232230455,
0.1940725595,
-0.0854956359,
0.2722283006,
-0.1412296742,
0.2133421153,
0.3040313423,
-0.2496558726,
-0.063440837,
-0.1190445349,
-0.4535714686,
-0.2244600803,
-0.1983704418,
-0.0865398198,
-0.2103539258,
-0.0466720127,
0.0776927546,
0.3683885634,
0.3098662198,
-0.0909319893,
0.5451512933,
0.378529042,
0.39108634,
-0.0818723366,
-0.0154220108,
0.017925648,
-0.015124565,
-0.1180351302,
0.1055032387,
0.3192505538,
-0.1981033832,
0.0307711512,
-0.0314476863,
-0.1382979155,
-0.2237644494,
0.1434347928,
0.2013050169,
-0.2833175659,
0.4591159225,
0.2934340835,
0.2424464971,
-0.1315659881,
-0.1539353877,
-0.0161547773,
0.2229111046,
-0.2253090143,
0.1299216598,
0.4849186838,
-0.0583619252,
0.207994774,
0.1109641492,
0.0612231381,
-0.2180413157,
-0.0050381152,
-0.4270086288,
-0.0926464424,
0.2091380507,
-0.0764839649,
0.4124710858,
0.066762045,
0.0055020936,
-0.1326866597,
0.1776529849,
-0.5252424479,
-0.0866227746,
-0.1289569736,
0.0689048842,
-0.1025049239,
0.1387516409,
-0.2886663079,
0.1624600887,
0.4378766119,
-0.2315799445,
0.0823424533,
-0.341763705,
-0.009868281,
-0.0583570115,
0.1542675644,
0.2835452855,
-0.2258251011,
-0.2675381005,
-0.0562046207,
-0.0233823657,
0.2037675977,
0.3895205259,
-0.4370260239,
0.2606164813,
-0.1095651165,
0.0259378981,
0.3239628971,
-0.3485061228,
-0.5067796707,
0.0822415054,
0.1392826736,
0.1930875033,
-0.0024982006,
0.0781060457,
0.2480257899,
-0.0567221716,
-0.0810235962,
0.4235646725,
0.1310388297,
0.1502451748,
-0.2206773758,
-0.3404783607,
0.4318113327,
0.3021396995,
0.5274088383,
0.0506260432,
0.0029891573,
0.5645061731,
0.1752803475,
-0.2198447287,
0.1318727732,
0.3785248101,
-0.076873824,
-0.0214930438,
0.2138983458,
-0.1895804703,
-0.5815828443,
0.2631796896,
-0.4444319904,
0.327044487,
-0.065880172,
0.034655571,
-0.0846819431,
0.0045283805,
-0.1166415289,
-0.1295530945,
0.0068399296,
0.029696757,
0.0795700252,
0.127587378,
0.1058194786,
-0.0091677224,
-0.0868385807,
0.1810749769,
-0.4302276969,
0.669971168,
-0.0863272101,
-0.1038034111,
-0.2037699521,
0.0931570753,
0.2730451524,
-0.18780303,
-0.1515585929,
0.0965948403,
0.0587591827,
0.008226607,
-0.2379565537,
0.1389171779,
0.4958922863,
-0.3601183295,
0.268872112,
0.3903030753,
0.1611916274,
-0.0840756595,
-0.0987917334,
0.0845495239,
0.0638572201,
0.3242053688,
0.1774786562,
0.0445013978,
0.1756591201,
-0.0550794937,
-0.0217928812,
-0.1192780361,
0.0884169638,
-0.1062046885,
0.0800943449,
-0.0524799824,
-0.0873330235,
-0.1037756577,
0.401524514,
0.0314122587,
0.2027189583,
0.231085673,
-0.4405786693,
-0.0669258237,
-0.0037618168,
0.0802351981,
0.1953768283,
-0.0142133767,
0.0023399014,
-0.1138559431,
-0.0544695929,
-0.0266035572,
0.2037664056,
0.4041629136,
0.2687700391,
0.1880780905,
0.2951117456,
0.0657680556,
-0.1009710357,
-0.2959223092,
0.0578402095,
0.329582572,
-0.2637157738,
0.1906747073,
-0.1156064048,
-0.1797398329,
-0.3497118652,
-0.276003927,
-0.4515841901,
-0.2150101662,
-0.2188575417,
0.4294587076,
-0.0150340917,
0.1557557583,
0.0451591983,
-0.0121268556,
0.0492922403,
0.0540843382,
-0.1029285714,
0.0002993783,
-0.2656460702,
-0.0639111847,
0.135194391,
-0.2079047859,
-0.0924979001,
-0.0064729103,
-0.0969610363,
-0.402687788,
-0.4037210643,
0.2633166015,
0.049879659,
0.3535008132,
-0.0341054201,
0.2956376672,
-0.0522307716,
-0.4987384677,
0.2341711968,
-0.2217988521,
0.0341942348,
0.2018873394,
-0.0928441808,
0.1023059562,
-0.0496038049,
-0.5121682882,
-0.4480068386,
-0.3077343702,
-0.0585261248,
0.111749649,
0.1526692808,
0.4017453492,
0.0558007918,
0.0782741308,
0.2752711475,
0.1532313675,
-0.0719690993,
0.0218490418,
0.4701944292,
-0.0880749077,
-0.3648936749,
-0.1620920599,
-0.1677837521,
0.0799676329,
0.2666203976,
-0.587105751,
-0.060787674,
-0.2496202737,
0.0943386704,
-0.0796471089,
0.1099922135,
0.1963576227,
0.0037183298,
0.136105597,
-0.0127288317,
-0.027274264,
0.0776351616,
0.1489041001,
0.3079799712,
0.0135949356,
0.3438877463,
-0.1361531913,
0.9339315295,
0.1448739171,
-0.1148534939,
0.280800432,
0.2016265541,
0.1213694587,
0.0132451458,
-0.5149045587,
-0.1874068826,
-0.2477411479,
0.066923894,
0.2418576628,
-0.1482755393,
-0.3719799817,
-0.2271694541,
-0.0571675487,
-0.2921555638,
-0.3293819726,
0.1470724195,
0.0263394732,
0.3216875792,
0.0163433198,
0.2940445244,
-0.1134624705,
-0.3156494796,
-0.0535401814,
0.0800503343,
-0.0711550862,
0.1863072664,
-0.2343780547,
-0.3660222292,
-0.3364728987,
0.1730324775,
0.133235082,
0.4602352083,
0.0242913365,
0.0411275886,
0.1570057422,
0.0782166198,
0.5091132522,
-0.017528126,
-0.0927421451,
0.1279959828,
-0.3724597991,
-0.4616313279,
-0.2451295406,
-0.4739657044,
0.1955102235,
0.3858444989,
0.4522669911,
-0.3439494073,
-0.0451275483,
0.2529805899,
0.2160046697,
-0.183316648,
-0.110708192,
-0.0648349896,
-0.0681736693,
-0.3261941075,
0.0151140727,
0.0376317576,
0.2877973318,
-0.3037428558,
0.0013248245,
0.0469482429,
-0.0326920114,
0.1790403873,
0.2479409873,
0.2654923201,
0.1290815175,
0.1594572961,
0.0882677436,
0.0903590173,
0.0951968208,
0.5268136263,
-0.0514802784,
-0.3881169856,
0.2169416994,
-0.0221666861,
-0.147244975,
0.2474056333,
-0.0628964826,
0.2551638782,
0.2499764115,
0.0210730955,
-0.007129638,
0.2071488351,
0.2191333026,
-0.0819056258,
-0.4956827462,
-0.2813416123,
0.4548181593,
0.1052815765,
-0.0640055463,
0.1878258139,
-0.0415771678,
-0.3987191021,
0.1577150524,
0.0811226368,
0.916120708,
-0.0061556282,
0.120254539,
0.0927432999,
0.1487076283,
0.6694626808,
-0.226589337,
0.2461767495,
-0.3382923603,
-0.1845317781,
-0.0770696402,
-0.2236389667,
0.015270438,
0.0766333193,
-0.312828362,
0.2537166774,
-0.0499240533,
0.2261508703,
-0.0112717226,
0.2821824849,
0.1227391064,
-0.249536097,
-0.2770478129,
0.0075061908,
-0.3736134171,
0.3348962069,
-0.0336873494,
-0.063625738,
-0.2817168236,
-0.3451817036,
-0.3058497012,
0.2641847134,
-0.2628068626,
0.5294766426,
0.268222034,
-0.2669427991,
0.2213701159,
0.1951458752,
0.2200457454,
0.0358266272,
-0.3625917733,
-0.0205115322,
-0.4450185299,
-0.1483029425,
-0.0100367377,
0.1212563217,
0.4487466812,
-0.0168109704,
-0.2234736234,
0.1049106196,
-0.1720518321,
-0.2014801651,
-0.0635548532,
-0.037481565,
0.1955937296,
-0.2294775248,
0.0149915125,
-0.0727272853,
-0.1087214351,
-0.2378034294,
0.0079488344,
0.0469012931,
-0.0465733595,
0.0379332975,
0.230225563,
-0.1209119111,
-0.0464769565,
0.600204587,
0.382786572,
-0.0102788461,
0.5690379143,
0.6124482155,
-0.2357873768,
-0.0705645382,
-0.1073924974,
-0.055966448,
-0.8141795993,
0.149412781,
-0.0878952816,
-0.1295973212,
-0.2102134377,
0.3848188221,
0.2228289247,
-0.1048904508,
-0.1543703377,
-0.4591605961,
-0.4079846144,
0.2657253444,
0.0468045026,
0.1880933642,
0.1660251617,
-0.0863968879,
0.1351665407,
0.1610873193,
-0.1421513557,
0.0717597082,
-0.2580932975,
0.1412941366,
0.2510513663,
-0.224781096,
-0.0519339144,
-0.0819724053,
-0.0975886658,
-0.0710691288,
-0.0432861932,
-0.031686075,
-0.2481022924,
0.1943457425,
0.1046494842,
-0.3088172376,
-0.3422865868,
-0.3058051169,
0.0320818312,
-0.2903951108,
0.099318631,
0.0458699912,
0.0694904178,
0.3633150756,
0.0538212508,
0.0820324868,
-0.2712943256,
0.3214924037,
-0.116795592,
-0.0669613332,
0.3262191713,
0.3050458729,
0.3494804204,
0.0868693218,
-0.6275851727,
0.0909303501,
0.1131835505,
0.088254191,
0.3551674187,
-0.3227010071,
0.0883730128,
0.2234397233,
0.0577416606,
0.2909789681,
-0.0653547272,
-0.0407194644,
0.1145476773,
0.0742468685,
-0.3489328623,
-0.3547517359,
0.3190295696,
0.0647032037,
-0.0996695086,
0.2652210891,
0.2227698714,
-0.0790277049,
0.4391955137,
0.2226370573,
0.425760597,
0.0200721584,
0.4900477529,
0.4390822053,
-0.0182907861,
0.1051096618,
0.2384385765,
0.0215956569,
0.1314693838,
0.133665964,
-0.12453904,
0.2361516058,
-0.2021166086,
-0.0374762826,
0.3724545538,
-0.2250267118,
0.0308315828,
-0.0525994897,
-0.0641579553,
0.0654089972,
-0.13137725,
0.1948757023,
-0.1366693825,
0.0048341881,
-0.5221880674,
0.2069921345,
-0.2634139657,
-0.0664385185,
0.0273606665,
-0.3071012497,
-0.0857570618,
-0.0980287567,
-0.1292753816,
-0.1602961421,
0.2491050512,
0.0122926841,
-0.3724072576,
-0.4032562673,
0.1413746774,
0.3118050694,
-0.0537675768,
-0.2071280777,
0.2542580068,
0.1893884838,
-0.0612548701,
-0.1748814732,
0.3261695504,
0.2719356716,
0.3447183073,
-0.1956269741,
-0.02273928,
0.1569269896,
-0.1064622104,
0.0689168349,
0.3064603508,
0.0684707537,
0.1061414704,
0.264234066,
-0.0058615389,
-0.1090280265,
-0.0445144176,
-0.0708428323,
0.1823125333,
-0.2198441923,
0.3130636811,
-0.0586234406,
-0.1530406773,
0.0496235564,
-0.1792512387,
-0.3795902133,
0.1406917572,
0.4293881953,
-0.1168007404,
0.0368220024,
-0.0900147185,
-0.0323619582,
-0.0650790408,
0.4091814458,
0.4153811336,
0.1210026443,
-0.2627842426,
0.168228671,
-0.4695402384,
0.1406287253,
-0.0327849835,
0.0324134193,
0.1455588192,
0.193264693,
0.0088566057,
0.1032676324,
0.2164214104,
-0.0842590556,
-0.0362903327,
-0.0259330738,
-0.5294517279,
-0.1799438745,
-0.1004116982,
0.0848561302,
-0.0291591566,
-0.1817051023,
0.2558789849,
0.1350069195,
-0.1519777179,
-0.3550891578,
-0.2189487517,
0.1549503058,
-0.138134703,
0.4324792325,
0.2043059319,
0.5696884394,
0.0894159302,
0.0474709086,
-0.3112934232,
-0.3568406105,
0.0348686054,
0.063546136,
-0.0189918503,
0.7160930037,
-0.2120592743,
-0.1151492298,
-0.3567176461,
0.1224273667,
0.0502324291,
0.1020850316,
-0.2292045355,
0.1826595068,
-0.2032923549,
0.0399373099,
0.1501516253,
0.0195634887,
0.086910978,
0.063646473,
-0.3101151288,
-0.4161630273,
0.3198127449,
-0.5340050459,
-0.3824241459,
-0.4362963736,
0.1608828604,
0.0582094826,
0.0785638019,
-0.7182446122,
-0.0322753862,
0.3463797271,
-0.171214208,
-0.298832953,
-0.0317598917,
0.0066046161,
0.0885862038,
-0.1590428054,
0.3739167154,
0.0468717888,
-0.2517427802,
-0.1608271152,
-0.1572251767
] |
https://github.com/huggingface/datasets/issues/3057 | Error in per class precision computation | Hi @tidhamecha2, thanks for reporting.
Indeed, we fixed this issue just one week ago: #3008
The fix will be included in our next version release.
In the meantime, you can incorporate the fix by installing `datasets` from the master branch:
```
pip install -U git+ssh://git@github.com/huggingface/datasets.git@master#egg=datasest
```
or
```
pip install -U git+https://github.com/huggingface/datasets.git@master#egg=datasets
``` | ## Describe the bug
When trying to get the per class precision values by providing `average=None`, following error is thrown `ValueError: can only convert an array of size 1 to a Python scalar`
## Steps to reproduce the bug
```python
from datasets import load_dataset, load_metric
precision_metric = load_metric("precision")
predictions = [0, 2, 1, 0, 0, 1]
references = [0, 1, 2, 0, 1, 2]
results = precision_metric.compute(predictions=predictions, references=references, average=None)
```
## Expected results
` {'precision': array([0.66666667, 0. , 0. ])}`
as per https://github.com/huggingface/datasets/blob/master/metrics/precision/precision.py
## Actual results
```
output = self._compute(predictions=predictions, references=references, **kwargs)
File "~/.cache/huggingface/modules/datasets_modules/metrics/precision/94709a71c6fe37171ef49d3466fec24dee9a79846c9f176dff66a649e9811690/precision.py", line 110, in _compute
sample_weight=sample_weight,
ValueError: can only convert an array of size 1 to a Python scalar
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: linux
- Python version: 3.6.9
- PyArrow version: 5.0.0
| 53 | Error in per class precision computation
## Describe the bug
When trying to get the per class precision values by providing `average=None`, following error is thrown `ValueError: can only convert an array of size 1 to a Python scalar`
## Steps to reproduce the bug
```python
from datasets import load_dataset, load_metric
precision_metric = load_metric("precision")
predictions = [0, 2, 1, 0, 0, 1]
references = [0, 1, 2, 0, 1, 2]
results = precision_metric.compute(predictions=predictions, references=references, average=None)
```
## Expected results
` {'precision': array([0.66666667, 0. , 0. ])}`
as per https://github.com/huggingface/datasets/blob/master/metrics/precision/precision.py
## Actual results
```
output = self._compute(predictions=predictions, references=references, **kwargs)
File "~/.cache/huggingface/modules/datasets_modules/metrics/precision/94709a71c6fe37171ef49d3466fec24dee9a79846c9f176dff66a649e9811690/precision.py", line 110, in _compute
sample_weight=sample_weight,
ValueError: can only convert an array of size 1 to a Python scalar
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: linux
- Python version: 3.6.9
- PyArrow version: 5.0.0
Hi @tidhamecha2, thanks for reporting.
Indeed, we fixed this issue just one week ago: #3008
The fix will be included in our next version release.
In the meantime, you can incorporate the fix by installing `datasets` from the master branch:
```
pip install -U git+ssh://git@github.com/huggingface/datasets.git@master#egg=datasest
```
or
```
pip install -U git+https://github.com/huggingface/datasets.git@master#egg=datasets
``` | [
-0.1642785072,
-0.414196521,
-0.0621304736,
0.3582138419,
0.5411623716,
0.1221359745,
0.0809524357,
0.1405230761,
-0.0493667312,
0.6348305345,
-0.0748264343,
0.1664376706,
-0.0171341896,
0.1542899907,
-0.1672088653,
-0.1889114827,
-0.0766216815,
0.2445577085,
-0.2314056754,
-0.0811214224,
-0.2428577691,
0.1677614301,
-0.2075737417,
-0.1134951264,
-0.0342367813,
-0.0433459915,
0.0320151336,
-0.0701468959,
-0.1811208129,
-0.2452349812,
0.5854548812,
-0.1199146286,
-0.0246812738,
0.5421236753,
-0.000109252,
0.0344294235,
0.1995839626,
-0.0679613128,
0.0439430922,
-0.0125632212,
0.173224315,
-0.3171205521,
0.0496169478,
-0.360556066,
-0.0957352519,
0.1044580191,
-0.1465980709,
-0.4334391654,
0.1332167238,
0.1467652321,
0.2312606871,
0.3048002422,
0.1135821566,
-0.1844074726,
-0.1475374997,
-0.0382654704,
-0.0581901595,
0.298325032,
-0.1915530264,
0.253123194,
-0.1129277274,
0.2372668386,
-0.0117657762,
0.0728570148,
0.3472219706,
0.0826097578,
0.1160902157,
-0.2710083127,
-0.076733999,
-0.0471143015,
0.0637197047,
-0.2755127847,
-0.4951064885,
-0.2424661666,
0.1073005795,
-0.4786441922,
-0.1084214896,
0.2575414181,
-0.2065346986,
-0.0887252837,
-0.4264821112,
0.1642452925,
-0.4307791889,
-0.0183308069,
0.0105907097,
0.0735079944,
-0.1967829764,
0.1328272074,
0.1659914702,
-0.0923232287,
-0.3665850759,
0.1136850119,
0.3257920444,
0.255364567,
-0.4922659397,
-0.1202570572,
-0.0069113001,
-0.0941243619,
0.1079660058,
-0.1188324094,
0.2723201215,
0.251957953,
0.1970918179,
0.1118397489,
-0.0486193337,
0.5292057395,
0.1057305261,
0.1572882235,
0.2328598648,
0.3633663952,
0.0790531114,
0.1107819676,
0.3502546847,
-0.147895366,
0.0180971343,
0.0503955185,
0.0839344412,
-0.1485373825,
-0.2498826981,
0.1619848013,
-0.1146430299,
0.1252567917,
0.0074048727,
0.1748040915,
0.1407478303,
0.3416101933,
0.2224611044,
0.1269018352,
-0.1341766268,
-0.312312156,
-0.268523097,
0.0823621973,
-0.1030989364,
0.1653856486,
0.1571235806,
-0.0920848623,
0.1091012061,
0.214441061,
0.2966881096,
-0.3067883253,
-0.110645473,
-0.0527688861,
-0.1596209258,
0.227531746,
-0.165375337,
0.0245514419,
0.2818194628,
-0.1193354353,
0.0505630337,
0.1132711768,
-0.2201228887,
-0.101088509,
0.2045729905,
0.2235240042,
-0.1137975007,
0.0192235094,
-0.3351352513,
0.3108472824,
0.2783311307,
0.0677503571,
-0.1220610365,
-0.2067772895,
-0.4401350021,
-0.3280391097,
0.3332183659,
-0.0279470831,
-0.1649879813,
-0.1342420727,
0.2150938362,
-0.1916711926,
0.1266338229,
0.2586928606,
0.0784290507,
0.1456569284,
-0.1856607795,
0.218974039,
0.0652347654,
-0.3232422471,
-0.3575800359,
-0.0842359588,
0.0535261706,
-0.162831232,
0.1398750842,
0.0354871787,
0.2864257693,
0.1063265577,
-0.0179317538,
-0.0202655941,
0.0516320206,
0.0028286437,
-0.4600215256,
-0.1886983216,
0.156580925,
0.1908864081,
0.1541029662,
0.1737860739,
-0.0167412143,
-0.1339861602,
0.171292752,
-0.4382629991,
0.0141522577,
0.3480499387,
0.1750998795,
-0.3897573352,
0.166606769,
-0.4405605495,
-0.2117421776,
0.3000278771,
-0.1076467112,
0.1818446964,
0.1039112061,
-0.0475895554,
-0.3701082766,
-0.1257907152,
-0.0862574503,
0.0743677691,
0.2409288287,
-0.293112129,
0.3394933641,
-0.0490060262,
-0.0258722976,
0.0741944462,
-0.3482827544,
0.1723864675,
-0.330614984,
0.0988353044,
0.000280097,
-0.3719062209,
0.0021474776,
0.1552318484,
0.2212849557,
-0.0484936908,
-0.2107049674,
0.36287117,
0.0959679559,
0.0079475632,
0.0661716759,
0.2228799015,
0.044576183,
-0.1284400225,
0.0397047028,
0.1112958342,
0.2196476161,
-0.040930666,
-0.1681112647,
0.809614718,
0.1643650532,
0.0814216137,
-0.0043153875,
0.1086640731,
0.1563539803,
0.0717948899,
0.0073271468,
-0.1458166987,
0.2394859046,
-0.3244335055,
0.3670500517,
-0.1767276227,
-0.2085166723,
-0.1059382781,
0.1006931961,
-0.1409004033,
0.0489815958,
0.0957315415,
0.1083061993,
0.1183316931,
-0.1365237236,
0.0232542884,
0.4859462976,
0.0970366225,
-0.1279266626,
0.2964471281,
-0.0409600995,
0.0279607214,
0.0629497841,
0.0925426409,
0.1806249022,
0.1303046346,
0.0704175308,
-0.0265599769,
-0.4172136188,
0.1046434641,
-0.255074352,
0.1777276695,
-0.3576977253,
0.0332617536,
-0.0505345538,
0.3547066748,
-0.2645373642,
-0.0980488956,
-0.3411878049,
-0.3228209019,
-0.1120150462,
0.0200070869,
-0.0697501525,
-0.0079261325,
0.0052729915,
0.3315381408,
0.1463106424,
0.2327751666,
-0.2720113397,
0.1737281829,
-0.1649525911,
-0.0070554675,
0.036606729,
-0.1410150528,
0.2186911702,
0.0287686773,
0.0895848796,
-0.0630356073,
-0.3871897161,
-0.29359743,
-0.2791938186,
0.3302842379,
0.2702201903,
-0.1042705998,
-0.2102461904,
0.0762792081,
0.4136543274,
-0.3010395765,
-0.1579013765,
0.3228687644,
-0.090086624,
0.0422288664,
-0.3177700639,
-0.1696227789,
-0.2323239446,
-0.039222274,
0.0643534437,
0.1191190928,
0.1743203849,
-0.2292363942,
0.0867132097,
0.2089663595,
-0.0061572222,
0.0451916605,
-0.3585213423,
-0.1896910369,
0.1969543546,
-0.0836358592,
-0.4709041417,
-0.0525664501,
-0.054627452,
0.4495640993,
-0.1232961267,
-0.2685033083,
-0.267735213,
-0.1713540405,
0.1907432526,
-0.4779600501,
0.2603842914,
0.1594992131,
-0.1738594323,
-0.0435349122,
-0.2163252085,
-0.2287624925,
0.064043209,
-0.4279389679,
-0.1116900891,
-0.218062371,
0.322543174,
0.2558867633,
0.5785426497,
0.4294579029,
-0.1259106994,
0.0114291403,
0.0859188288,
0.265820533,
-0.0109282192,
-0.2418479323,
0.1489302218,
0.0173247568,
-0.183743,
0.0332489461,
-0.0266822986,
-0.0211250838,
-0.1454429775,
0.0009876245,
-0.1123074517,
-0.2780795395,
-0.0784015283,
-0.0315942839,
0.1578425169,
0.025706714,
0.2427298576,
-0.2341486514,
-0.113535814,
-0.1281912923,
-0.061745964,
-0.2123086005,
-0.1238232329,
-0.3357998133,
-0.2832110822,
-0.3398574591,
0.5780597329,
-0.0012258195,
0.5205252171,
0.0558885485,
0.0628801882,
0.0985695273,
0.1587877423,
0.503059566,
-0.033281967,
0.0352790356,
0.002899094,
-0.0516345203,
-0.4585819244,
-0.172888115,
-0.4375658631,
0.0785762891,
0.2693134546,
0.2820393741,
-0.444417417,
-0.1520235538,
0.1118751019,
0.1377121359,
-0.2051396519,
-0.2276665568,
-0.2706454396,
-0.3053297698,
0.1059401855,
0.1647882611,
0.032659471,
0.5073103905,
-0.0755241364,
-0.0545933209,
-0.1585567147,
-0.1119576469,
0.1654962748,
-0.0767051876,
0.2643539608,
-0.0636547729,
0.0134737249,
-0.0313826054,
-0.2163060606,
0.0158176757,
0.3409193456,
0.0408145823,
-0.3991961479,
0.1460820287,
0.0381067395,
0.3240533173,
0.1054835692,
-0.2490455657,
-0.2923247516,
0.0491433628,
0.4328869581,
-0.220089525,
-0.2663168907,
0.1885458529,
0.14509359,
-0.2272975892,
0.2298046798,
0.7185584903,
0.2139741331,
0.1092868149,
0.1303031147,
0.1234583184,
-0.2331031859,
0.312635988,
0.2248610109,
0.6809942126,
0.0375607684,
-0.0940206721,
0.3766589463,
0.1431115717,
0.3016184866,
0.208454147,
0.2485913634,
-0.3907631636,
-0.3726086915,
0.0459758118,
-0.1063179076,
0.193220064,
0.0575449653,
-0.1805072129,
0.3652167916,
-0.1493538618,
0.1494352371,
0.1398075223,
-0.0646814704,
-0.1085891053,
-0.1990263313,
-0.5009471178,
0.218377769,
-0.2057845891,
0.0840529948,
0.0983506069,
0.0164571386,
-0.2639561892,
-0.3125876486,
-0.2703993917,
-0.1496704966,
-0.3187796772,
0.1134589985,
0.2270327359,
-0.0421542116,
-0.0119492291,
0.1330221146,
0.1640876979,
0.3001230657,
-0.2147267759,
-0.1906993836,
-0.3310371339,
0.2600383461,
0.2297172844,
0.140118286,
0.1341013461,
-0.1002209187,
-0.1522967219,
0.0497016497,
-0.1526814997,
-0.0741507709,
0.1169096604,
-0.0697127879,
-0.1853014082,
-0.5423143506,
-0.0983537734,
-0.3544826508,
0.2376226634,
-0.2958389223,
0.1683527678,
0.2658821642,
-0.3300108612,
0.5124779344,
0.0815256685,
-0.2033652961,
0.0980896354,
0.5110055208,
0.2963282466,
-0.4478470087,
0.2377491742,
-0.1107081249,
-0.0871593356,
-0.1446134746,
0.3030205071,
-0.1293806583,
-0.1542374194,
0.336212188,
0.0452206396,
0.2047202289,
-0.0626526102,
0.2726621032,
0.2831775546,
0.1761211753,
-0.1223726273,
-0.4541599751,
-0.227957204,
0.0555787049,
0.1630501151,
0.2339222133,
-0.0623068623,
0.069254376,
-0.0366569683,
0.0794682652,
-0.3567445278,
0.0284881163,
-0.2722090185,
-0.1683913469,
0.3577240705,
-0.0159084052,
0.1050985754,
0.2376275957,
0.1459625512,
0.3484098613,
-0.2188592702,
-0.2117573768,
0.0929409936,
0.1129851341,
0.0497658439,
0.1365288496,
0.2419456393,
0.2411868572,
-0.2333100438,
-0.1589957476,
0.0686175674,
0.2544229031,
-0.0297934394,
0.4409849346,
0.2067046463,
0.5164738894,
0.2211489379,
-0.0960345119,
-0.0014874779,
0.0193018876,
0.0956242159,
0.2565787733,
-0.0466152057,
-0.1211292297,
-0.0575787313,
-0.1319116354,
-0.0824663565,
-0.1839697212,
0.1729021966,
-0.460445106,
-0.1534623802,
0.2744814456,
0.459289521,
0.2708219886,
-0.3164736927,
0.0313723944,
-0.3876005113,
0.2490131259,
-0.2747986317,
-0.0780773982,
0.3570889533,
0.3549429774,
-0.0327769704,
0.2992209792,
0.0890925303,
-0.1415181607,
0.0856889263,
-0.113327615,
0.3778678179,
-0.2932097316,
0.3197647631,
0.0369173549,
0.0423763208,
-0.100975737,
0.352621913,
-0.1722205132,
0.2741524577,
0.4364845455,
-0.3570103049,
0.4312897027,
-0.3858456314,
0.037332952,
-0.1559222192,
-0.2061263472,
0.0449796095,
0.3547489643,
-0.0392772108,
-0.0681217462,
-0.3053265214,
0.5874361396,
-0.4851510525,
-0.2915436924,
-0.3080571294,
0.0945845172,
-0.2448973954,
0.0376526266,
-0.2436753958,
-0.2116183341,
-0.0625730827,
-0.1713661849,
-0.1047119498,
-0.1562698781,
0.5076798797,
-0.0029936512,
-0.1181738675,
-0.1935997903,
-0.2117963284,
0.3115866482,
0.3456214368,
-0.0605052114,
0.1651974618,
0.3299376965,
0.130426228,
-0.0723079368,
0.3381169438,
0.4496158957,
0.3739292324,
0.0692196563,
0.1301158369,
0.0600310341,
-0.1158347875,
0.0895098895,
0.268566519,
0.0737364367,
-0.1088303104,
0.3471778929,
0.1415655464,
-0.2163080126,
0.0100233229,
0.0150900604,
0.4588386714,
-0.3920962811,
0.3733259141,
-0.2258038968,
-0.0037848712,
-0.1173533052,
-0.1458846778,
-0.2927847207,
-0.0478419773,
-0.0106796278,
0.117317155,
-0.0810278952,
-0.2386761457,
0.1136466786,
0.0340832584,
0.4322584569,
0.1445553005,
0.0642893463,
-0.4238937199,
-0.0792559758,
-0.5307914019,
0.2905158103,
0.2964377403,
0.1440283358,
0.1200787202,
0.3745247722,
-0.1482656598,
0.0804856494,
0.4876260161,
-0.022036301,
0.0964327902,
0.0891929418,
-0.2946881652,
0.0182500314,
-0.3477780223,
-0.5018592477,
0.2702705264,
-0.2557947934,
0.0164672956,
-0.1700465381,
0.0662157834,
0.0828563496,
0.2639176846,
-0.0951061621,
0.242631346,
0.3294848204,
0.2906573117,
0.1723425686,
0.0868612826,
-0.1852866858,
-0.0428497791,
-0.0207433589,
-0.3158548772,
0.3469443917,
-0.0768080503,
0.471026659,
-0.036174275,
-0.1678971946,
-0.0876009092,
0.2859790921,
0.2838338017,
-0.240549773,
-0.1551332474,
0.3994323015,
-0.0457106791,
-0.0595276617,
0.1128745005,
0.014968629,
0.1005199477,
0.5949597359,
-0.3395117521,
-0.4136885107,
0.4893684089,
-0.2549514771,
-0.1707617939,
-0.0793689787,
0.3165194988,
-0.1011476889,
-0.3925534487,
-0.8377333283,
-0.0549533144,
0.4024554789,
0.0569330528,
-0.0016011889,
0.3745991588,
-0.3035084009,
-0.1314708889,
0.0991027206,
0.4862998426,
0.0881878436,
-0.1963284165,
0.1255525053,
-0.3345629871
] |
https://github.com/huggingface/datasets/issues/3052 | load_dataset cannot download the data and hangs on forever if cache dir specified | Issue was environment inconsistency, updating packages did the trick
`conda install -c huggingface -c conda-forge datasets`
> Collecting package metadata (current_repodata.json): done
> Solving environment: |
> The environment is inconsistent, please check the package plan carefully
> The following packages are causing the inconsistency:
>
> - conda-forge/noarch::datasets==1.12.1=pyhd8ed1ab_1
> - conda-forge/win-64::multiprocess==0.70.12.2=py38h294d835_0
> done
>
> Package Plan
>
> environment location: C:\xxx\anaconda3\envs\UnBias-94-1
>
> added / updated specs:
> - datasets
>
>
> The following NEW packages will be INSTALLED:
>
> dill conda-forge/noarch::dill-0.3.4-pyhd8ed1ab_0
>
> The following packages will be UPDATED:
>
> ca-certificates pkgs/main::ca-certificates-2021.9.30-~ --> conda-forge::ca-certificates-2021.10.8-h5b45459_0
> certifi pkgs/main::certifi-2021.5.30-py38haa9~ --> conda-forge::certifi-2021.10.8-py38haa244fe_0
>
> The following packages will be SUPERSEDED by a higher-priority channel:
> | ## Describe the bug
After updating datasets, a code that ran just fine for ages began to fail. Specifying _datasets.load_dataset_'s _cache_dir_ optional argument on Windows 10 machine results in data download to hang on forever. Same call without cache_dir works just fine. Surprisingly exact same code just runs perfectly fine on Linux docker instance running in cloud.
Unfortunately I updated Windows also at the same time and I can't remember which version of datasets was running in my conda environment prior to the update otherwise I would have tried both to check this out. :(
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
```
cache_dir = 'c:/data/datasets'
dataset = load_dataset('wikipedia', '20200501.en', split='train',cache_dir=cache_dir)
```
Note that exact same code without specifying _cache_dir_ argument works perfectly fine.
```
cache_dir = 'c:/data/datasets'
dataset = load_dataset('wikipedia', '20200501.en', split='train')
```
## Expected results
Downloads the dataset and cache is handled in the _cache_dir_ directory
## Actual results
Data download keeps hanging on forever, **NO TRACEBACK**!
## Environment info
- `datasets` version: 1.12.1
- Platform: Windows-10-10.0.19042-SP0
- Python version: 3.8.11
- PyArrow version: 3.0.0
| 118 | load_dataset cannot download the data and hangs on forever if cache dir specified
## Describe the bug
After updating datasets, a code that ran just fine for ages began to fail. Specifying _datasets.load_dataset_'s _cache_dir_ optional argument on Windows 10 machine results in data download to hang on forever. Same call without cache_dir works just fine. Surprisingly exact same code just runs perfectly fine on Linux docker instance running in cloud.
Unfortunately I updated Windows also at the same time and I can't remember which version of datasets was running in my conda environment prior to the update otherwise I would have tried both to check this out. :(
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
```
cache_dir = 'c:/data/datasets'
dataset = load_dataset('wikipedia', '20200501.en', split='train',cache_dir=cache_dir)
```
Note that exact same code without specifying _cache_dir_ argument works perfectly fine.
```
cache_dir = 'c:/data/datasets'
dataset = load_dataset('wikipedia', '20200501.en', split='train')
```
## Expected results
Downloads the dataset and cache is handled in the _cache_dir_ directory
## Actual results
Data download keeps hanging on forever, **NO TRACEBACK**!
## Environment info
- `datasets` version: 1.12.1
- Platform: Windows-10-10.0.19042-SP0
- Python version: 3.8.11
- PyArrow version: 3.0.0
Issue was environment inconsistency, updating packages did the trick
`conda install -c huggingface -c conda-forge datasets`
> Collecting package metadata (current_repodata.json): done
> Solving environment: |
> The environment is inconsistent, please check the package plan carefully
> The following packages are causing the inconsistency:
>
> - conda-forge/noarch::datasets==1.12.1=pyhd8ed1ab_1
> - conda-forge/win-64::multiprocess==0.70.12.2=py38h294d835_0
> done
>
> Package Plan
>
> environment location: C:\xxx\anaconda3\envs\UnBias-94-1
>
> added / updated specs:
> - datasets
>
>
> The following NEW packages will be INSTALLED:
>
> dill conda-forge/noarch::dill-0.3.4-pyhd8ed1ab_0
>
> The following packages will be UPDATED:
>
> ca-certificates pkgs/main::ca-certificates-2021.9.30-~ --> conda-forge::ca-certificates-2021.10.8-h5b45459_0
> certifi pkgs/main::certifi-2021.5.30-py38haa9~ --> conda-forge::certifi-2021.10.8-py38haa244fe_0
>
> The following packages will be SUPERSEDED by a higher-priority channel:
> | [
-0.3561401665,
0.6039686203,
-0.112191759,
0.0641633123,
0.3905137181,
0.0553010851,
0.4375729859,
0.094742924,
-0.0405043215,
0.1036619917,
-0.0045552352,
0.4003577232,
0.1727004349,
-0.2531112432,
-0.1021793559,
0.0295671653,
0.3168690503,
0.0264830776,
-0.2681316733,
0.0297461879,
-0.2495431155,
0.2640099525,
-0.2353763878,
-0.4714941084,
-0.2003559917,
-0.0489062406,
-0.2070272267,
0.107666105,
0.1263349056,
-0.2291529328,
0.693495214,
0.1439462602,
0.1560624987,
0.5367052555,
-0.0001202162,
0.0958736986,
0.3693864942,
-0.0959903598,
-0.4860747457,
-0.3124610782,
-0.286380738,
-0.030309191,
-0.0791931897,
-0.0946828797,
0.0081589762,
0.125619337,
-0.1083494946,
-0.3397780657,
0.0216178671,
0.2030917406,
0.1220713183,
0.2138336748,
-0.286298126,
-0.0725891963,
-0.1225803867,
-0.085908629,
-0.1183942035,
0.4290118814,
0.2122634351,
-0.2387333512,
-0.0806100294,
0.3098605275,
-0.1757373661,
0.0349389128,
0.0217308905,
0.0283049606,
-0.0183839109,
-0.2174424231,
0.32195732,
0.1853059679,
0.8403254747,
-0.0948717371,
-0.4498531222,
-0.1286432594,
-0.0980321988,
-0.2223899961,
0.4954180121,
-0.043225918,
-0.1865182668,
0.1415534467,
-0.2130139321,
0.1438461542,
-0.0483436584,
0.2191597521,
-0.1538938582,
0.2648843229,
-0.1285952479,
0.136689961,
-0.0659740642,
0.0993133038,
0.307238698,
-0.1743252128,
-0.0539876185,
-0.0627528131,
-0.4286941886,
0.2477129549,
-0.056840647,
0.1115808859,
-0.1672258973,
0.4133312702,
0.0022224083,
-0.012448159,
0.1904801726,
-0.0292751268,
0.0703516081,
0.2698026299,
0.1381771415,
-0.0201795511,
0.3505204916,
-0.1332506984,
0.1946266741,
-0.0011617726,
-0.2148600221,
-0.451628983,
0.1492691487,
0.0707370788,
0.3595532775,
-0.0901591033,
-0.274351269,
-0.0326105207,
0.1868334264,
0.0980014056,
0.2361395657,
0.3796735406,
-0.1548823416,
0.2310489714,
0.0266754702,
0.2128875703,
-0.0322332606,
0.240600422,
-0.0346373729,
-0.3236967325,
-0.1044693813,
-0.110182941,
0.5441452861,
-0.0901750699,
0.2831687033,
0.037060637,
0.0996611863,
0.108885549,
-0.2050813884,
-0.2520250678,
0.0669409782,
0.4053681791,
-0.1560276598,
0.4056854546,
-0.0345892645,
0.066208072,
-0.1095357463,
0.2739044726,
-0.1516905427,
-0.1378235817,
-0.0534268394,
0.086989969,
-0.0315999314,
-0.0592002794,
-0.0899845511,
0.0357230529,
0.2812821567,
-0.0926437527,
0.2651129365,
-0.1087724864,
-0.3155533969,
-0.2231964022,
0.2660959661,
0.5889155269,
-0.3032974601,
0.0547232777,
0.2194678932,
-0.0238582063,
-0.1606469452,
-0.0041038813,
-0.1345838159,
-0.1107454449,
-0.2034518868,
-0.1344526857,
0.0125383474,
-0.6004806757,
-0.6698055863,
0.0681888759,
0.0708948225,
0.1877202541,
0.1042156219,
0.0995242894,
0.5421273112,
-0.1580363214,
0.3136377931,
0.3300454319,
0.0626564175,
-0.0096318051,
-0.133781001,
-0.1625637859,
0.1676181108,
0.205095768,
-0.1113279983,
0.121892482,
-0.0637390986,
0.1367575228,
0.1477037519,
0.0949005112,
0.0582232252,
0.4527845979,
0.3112200499,
0.127506122,
0.0873612016,
0.0116041359,
-0.6116012931,
0.3960733414,
0.3855992258,
-0.0556120872,
-0.1278110743,
-0.0118451975,
-0.0451624021,
0.0089683067,
-0.1459645033,
-0.2862280011,
0.0147884423,
0.036172688,
0.4405017793,
0.0457920991,
0.2262168378,
0.6840984821,
-0.0924961418,
0.1363714486,
0.1912951022,
0.131665051,
-0.0418204777,
-0.2118576318,
-0.1060254648,
-0.0861339942,
0.2125009596,
-0.3178163469,
-0.2629686296,
0.3547350764,
0.0062593473,
0.1413897723,
-0.1804890186,
-0.0904804096,
0.0628244653,
0.269707799,
0.1126988381,
0.2042086124,
0.0560870767,
-0.138526544,
-0.2030048668,
0.0152517408,
-0.2267746776,
0.4514896572,
-0.2298701108,
0.0473287664,
0.3283419311,
-0.0404073,
-0.0451531038,
-0.0092129698,
0.3699362874,
0.0761349872,
0.7866382003,
-0.1031313092,
-0.020713171,
0.2158173472,
0.1550826132,
-0.083694011,
-0.1395697296,
0.2248543352,
-0.0725988746,
0.0915467069,
0.294531703,
0.1413752735,
0.7083224058,
0.1089650169,
0.044726301,
-0.0855375007,
-0.0482887477,
-0.1427140385,
0.3194249868,
0.1458653808,
0.1138140559,
0.2443242669,
0.2343640178,
0.1475977153,
-0.0981729254,
-0.0656546354,
0.1221986562,
0.0012697121,
-0.0698846653,
0.4231151938,
-0.2086410224,
0.1271634847,
-0.0015748948,
-0.3924122751,
-0.2408439815,
-0.1327706426,
-0.3058378994,
0.4189912677,
0.1341692358,
0.2510224879,
-0.166988045,
0.0067092581,
0.1597807407,
-0.6780967116,
-0.2889810205,
0.0099611506,
-0.2868140638,
-0.0934738219,
0.2684735656,
-0.361222893,
0.2959712744,
-0.210603267,
0.0581749491,
-0.1788845062,
-0.2969026566,
0.0250532851,
-0.1173216254,
0.6192768812,
0.0547962449,
0.2199087292,
0.2093656361,
-0.0874331146,
0.0721124858,
-0.0710494891,
0.0409997366,
-0.0398195796,
0.0543956421,
-0.1702723205,
-0.2764616609,
-0.2766988575,
-0.3255561888,
-0.3159666061,
0.0451343879,
-0.2163440883,
0.0257782284,
0.1682652682,
0.2520622313,
-0.0545259528,
0.2443564534,
-0.0465125479,
-0.204833433,
-0.2515769601,
0.2740578949,
-0.0564877465,
-0.2066797763,
-0.0595027693,
0.1681277752,
0.1541517377,
0.3597891033,
-0.4254632294,
-0.0685490742,
-0.151534155,
0.4692496657,
-0.0339306742,
-0.2266766578,
0.6091626287,
-0.0619132891,
0.0270470809,
-0.2075814903,
-0.3350028992,
0.1080315039,
-0.0258505829,
0.1700232029,
0.0955807716,
0.1403123587,
0.0214786865,
0.5157607198,
0.1488061547,
-0.0883810446,
0.1787942946,
0.1980432719,
0.6143235564,
-0.0056669572,
-0.2915373445,
0.048213955,
-0.2453692257,
-0.1042845026,
0.0070275725,
0.1470182836,
-0.2044176161,
-0.1424491107,
-0.3281597197,
-0.1016932279,
-0.2527590394,
0.2328048944,
-0.3123170733,
0.0629983172,
0.2108417749,
0.2870444655,
-0.2368194759,
-0.1172970608,
-0.0693343878,
0.6562947631,
-0.2235604674,
0.0987473652,
-0.1540783346,
0.0876920447,
-0.5197450519,
0.1269492656,
-0.0407030098,
0.5385600328,
0.0354134068,
0.055143021,
0.0344617441,
-0.3676826656,
1.0852470398,
-0.1220549047,
0.0688650459,
0.1206845045,
0.2016750276,
-0.1989164054,
-0.2154625207,
-0.0729265064,
0.2947713435,
0.1647445112,
0.3307080567,
-0.0286325645,
-0.3985378444,
-0.1628690958,
0.278953582,
-0.1150063798,
-0.1569465399,
-0.2421207726,
-0.2353642732,
-0.0948364735,
0.0642581284,
-0.0384322554,
0.0039821276,
-0.2460452616,
0.0155933788,
-0.2575435042,
0.0041829487,
-0.0676018298,
0.0582271554,
0.1971231103,
-0.1957297623,
0.3663660288,
0.0460986383,
0.0661918446,
0.4760604203,
0.3568176031,
-0.4139622748,
-0.0829394087,
0.090558812,
-0.1463579684,
-0.1276850104,
0.4075097442,
-0.2383764535,
-0.2483644187,
-0.1930097193,
0.0506847203,
-0.4257858098,
0.0784573033,
0.1349960864,
0.2375907898,
-0.261695236,
-0.2561470866,
0.4801069498,
0.0982718021,
-0.2785361111,
0.7662409544,
-0.0427615717,
-0.3386245668,
0.181533739,
-0.0353446975,
0.6245467067,
0.1707590669,
0.2567971051,
0.1808493435,
-0.3066928685,
0.0941445306,
-0.0330731124,
0.1882015318,
0.0093158428,
-0.1667512506,
-0.1348296702,
-0.1269878447,
0.1050069481,
0.1694552898,
-0.3965283036,
0.2701276541,
-0.1561567485,
0.0551270545,
0.1063575298,
-0.0738746747,
-0.213893503,
-0.3332728446,
-0.173907876,
0.1439343095,
0.0881174803,
0.4246910214,
-0.1289371252,
0.0245681573,
-0.2379393727,
-0.2370394319,
-0.3720033765,
0.2290747613,
-0.2875256836,
0.084412612,
-0.0016333776,
-0.3715946972,
-0.098421596,
0.1421989202,
0.262352258,
0.0122335535,
-0.2025819868,
0.2866654396,
-0.0605157316,
0.1620835811,
0.154729709,
-0.3212350607,
0.0601315647,
0.0872744471,
-0.223221153,
-0.2415317893,
-0.4499293864,
-0.2746393085,
0.0530382879,
0.1907922179,
0.0200381093,
0.0578222498,
-0.0710739791,
0.0566283949,
0.1001925617,
-0.1621157527,
0.0794036984,
-0.1854893565,
0.3656358421,
0.4359614253,
-0.37825194,
-0.2716470659,
-0.0609389506,
0.577707231,
-0.3328143358,
-0.1295216233,
0.4854799211,
-0.1169701293,
-0.1809446514,
-0.1869335175,
-0.1622572988,
-0.5565850139,
-0.1605039388,
-0.0295342244,
-0.0301457383,
0.1691431254,
0.1414309144,
-0.2027180791,
0.0868267715,
0.0088082468,
-0.0033547226,
-0.5243386626,
-0.0393017009,
-0.0478363074,
-0.0584443882,
-0.0327380337,
-0.0089320419,
-0.1102538928,
0.1994671226,
-0.196007818,
-0.2246533036,
0.1012022793,
-0.1693882048,
0.0343662016,
0.1511266083,
-0.1329582185,
0.3666710854,
-0.2431090623,
-0.0935394689,
-0.0652713925,
-0.1330795884,
-0.107016027,
-0.3126215339,
0.1523672491,
0.004722923,
-0.0024158345,
0.0439394265,
-0.3631027043,
0.0344438851,
-0.0848204643,
0.3058672547,
0.3003406227,
-0.1408586502,
-0.1059447601,
-0.2529610097,
0.6175537109,
-0.0831766799,
0.1928494126,
-0.108864978,
0.0769047961,
-0.0570975915,
0.3122292161,
0.0403319858,
0.1245849729,
-0.3024496138,
0.116799742,
-0.2277596593,
-0.0830846652,
0.1651952565,
-0.147760272,
0.1936271489,
0.0564756133,
0.0285527948,
0.4006415308,
-0.1670253873,
-0.1418097466,
0.2710729539,
0.1708958894,
-0.12136437,
-0.1844535172,
-0.228019461,
0.0653886646,
0.0474968553,
0.1583589464,
0.2423804402,
-0.5154852867,
0.3277848065,
0.1843088716,
0.8116038442,
-0.1786281168,
0.0683991238,
0.5087782145,
0.1471769214,
0.3969157338,
0.3379201889,
0.1547414362,
0.0255423635,
0.5745883584,
0.0216319319,
0.2738996148,
0.1438498646,
0.0932104364,
-0.2339085937,
-0.4939319789,
-0.0269856714,
-0.0729312003,
-0.1223713979,
0.167033866,
-0.1335856915,
0.2940017879,
-0.5855457783,
-0.2348704487,
-0.2959794104,
-0.0688123927,
-0.1353581548,
-0.2272451669,
0.0111580268,
-0.0249666162,
0.2784904838,
0.0478637777,
0.0223660786,
-0.3192076087,
0.3953395784,
-0.0501922891,
-0.2723885775,
-0.428702265,
-0.2021355927,
0.012700581,
-0.1697930992,
-0.0098439325,
0.3430940211,
0.2749564648,
-0.1080651507,
0.0582133159,
0.1425981224,
0.5358492732,
0.5044576526,
-0.0036623525,
-0.0487722568,
0.1131567135,
-0.00085388,
-0.1199686676,
0.3510358632,
-0.1070636064,
-0.2019970864,
0.032119114,
0.1106074601,
-0.0971023217,
0.3354794979,
0.1482169032,
0.2266811877,
-0.0954414979,
0.09305536,
0.0023666394,
0.1940339655,
-0.0938569084,
0.0880346894,
-0.2089995891,
0.1798035651,
0.4431070089,
-0.1605854034,
0.166694507,
0.1645088494,
0.0555718094,
-0.0048722932,
0.3563423157,
0.1259744465,
-0.0059572337,
-0.1746676713,
-0.0543706231,
-0.5395665169,
-0.0687857494,
-0.1866807193,
0.0984909236,
-0.2820134163,
-0.0070394431,
0.0130601926,
0.0321971402,
0.1823778301,
-0.1184736192,
0.1362945437,
0.0272415727,
-0.5124003291,
0.1022217274,
-0.1699999422,
0.1803064048,
0.0572790243,
-0.6249797344,
0.1367784888,
0.2196754813,
-0.0085668545,
-0.2087750435,
0.0150550064,
0.2375310808,
0.1920729429,
0.4078028798,
-0.0739339739,
0.1610144973,
0.1292421222,
-0.2603734434,
-0.4927840233,
0.022132488,
-0.0531182177,
-0.0360325389,
0.0106748054,
0.0175459143,
-0.506693244,
-0.2232177705,
-0.0644755885,
0.1209456697,
0.0880722702,
0.1176076084,
-0.1014673412,
0.1244839206,
-0.0363124982,
0.2562620044,
0.0812848583,
0.3374518454,
-0.0551904552,
0.1984125227,
-0.45265311,
-0.2111461759,
0.2064428777,
-0.5447890162,
-0.3847075105,
-0.0795358196,
0.0543823019,
-0.2644144595,
0.0431967527,
-0.3573532403,
0.1220012456,
0.2409059703,
-0.1128570735,
-0.3980174959,
0.1377186477,
-0.1379918754,
0.0293385684,
-0.0875198618,
0.4050817192,
0.0529772192,
-0.2982282639,
0.0653887689,
-0.1678641737
] |
https://github.com/huggingface/datasets/issues/3051 | Non-Matching Checksum Error with crd3 dataset | I got the same error for another dataset (`multi_woz_v22`):
```
datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/dialog_acts.json', 'https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/test/dialogues_001.json']
``` | ## Describe the bug
When I try loading the crd3 dataset (https://huggingface.co/datasets/crd3), an error is thrown.
## Steps to reproduce the bug
```python
dataset = load_dataset('crd3', split='train')
```
## Expected results
I expect no error to be thrown.
## Actual results
A non-matching checksum error is thrown.
```
datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/RevanthRameshkumar/CRD3/archive/master.zip']
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-4.4.0-173-generic-x86_64-with-Ubuntu-16.04-xenial
- Python version: 3.6.10
- PyArrow version: 5.0.0
| 21 | Non-Matching Checksum Error with crd3 dataset
## Describe the bug
When I try loading the crd3 dataset (https://huggingface.co/datasets/crd3), an error is thrown.
## Steps to reproduce the bug
```python
dataset = load_dataset('crd3', split='train')
```
## Expected results
I expect no error to be thrown.
## Actual results
A non-matching checksum error is thrown.
```
datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/RevanthRameshkumar/CRD3/archive/master.zip']
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-4.4.0-173-generic-x86_64-with-Ubuntu-16.04-xenial
- Python version: 3.6.10
- PyArrow version: 5.0.0
I got the same error for another dataset (`multi_woz_v22`):
```
datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/dialog_acts.json', 'https://github.com/budzianowski/multiwoz/raw/master/data/MultiWOZ_2.2/test/dialogues_001.json']
``` | [
0.0334027298,
-0.0302853491,
0.0008105278,
0.2788746953,
0.017549051,
-0.0104441335,
0.265627861,
0.3295178413,
-0.037674509,
-0.0168874599,
0.0127356676,
0.1477050483,
0.1147076041,
0.0427603424,
-0.1140761748,
-0.0273571424,
0.3024690747,
0.0541087575,
0.1257388145,
-0.0328546092,
-0.1098992899,
0.1389320642,
-0.2276904434,
0.0113814175,
-0.0697476119,
0.2781862617,
0.0035587363,
0.346434176,
0.0303116646,
-0.0911196247,
0.5705821514,
0.161265716,
0.1096181124,
0.679661572,
-0.0001145116,
-0.0514410995,
0.3022955954,
-0.1902943105,
-0.1386957169,
-0.3195829988,
-0.4316025972,
-0.2920105159,
-0.0718896911,
-0.2248137742,
0.0259776544,
0.2991980314,
-0.2701680362,
-0.0158153027,
-0.0014765116,
-0.1409104019,
0.2136477977,
0.6153892875,
0.1170384139,
0.1221040636,
0.0792808756,
0.1203394011,
0.0231933352,
0.6040295362,
0.3690383434,
-0.056172017,
-0.0219493918,
0.144244954,
-0.3300773203,
0.1867074072,
0.1652890593,
-0.0224611722,
-0.2784797847,
0.0593474507,
-0.023262484,
0.6013777852,
0.054458268,
-0.2938162684,
-0.3598977327,
-0.1170255765,
-0.0946370214,
-0.4865976572,
0.3369047046,
0.1865319014,
-0.1341731995,
-0.1014836952,
-0.5206213593,
0.1967920065,
0.0010658881,
0.1569823027,
0.0405209661,
0.0763625354,
0.0658670142,
-0.0411716551,
0.1133173555,
-0.2226429582,
0.194414109,
-0.2851201296,
-0.2304154634,
0.0046867169,
-0.6093122959,
-0.2500115931,
-0.2335205972,
0.5036346316,
0.4081349969,
0.3797471523,
-0.0246294122,
0.1881057322,
0.0500277206,
0.0253397711,
0.1391054243,
0.135603711,
-0.0616216287,
0.3133068681,
0.1828379929,
0.3394801915,
-0.0898900479,
0.1667278409,
-0.026457984,
-0.1692326665,
0.6086746454,
0.0562598519,
0.1235864908,
-0.3384869397,
-0.0623676963,
0.2706259191,
0.063787356,
-0.0351836234,
0.0791989714,
0.2678135037,
-0.2224631011,
0.141270563,
-0.1128853783,
0.3238133788,
-0.2578124404,
0.0398012586,
-0.1379940808,
-0.1428778768,
-0.1101930365,
-0.0433789864,
0.1768587679,
-0.1917888671,
0.3768379092,
-0.1522659212,
0.4074714184,
-0.0106652342,
0.0010702822,
0.0462027304,
-0.0042664865,
0.2696409225,
0.0373193026,
0.182798028,
0.146923542,
0.1544154286,
0.0166848563,
0.0283673257,
-0.267957598,
-0.268088311,
-0.3479526937,
0.1990947127,
-0.7517386675,
-0.1056779623,
-0.0398927145,
-0.4248103201,
0.271897763,
-0.2394350618,
0.0164000541,
-0.3164392412,
-0.2812263072,
-0.2570577264,
0.1465521604,
0.105991669,
0.0172468163,
0.2588035762,
-0.2220122218,
-0.1420879513,
0.2174442261,
0.2261410058,
-0.0803290233,
-0.2999187112,
-0.2428378314,
0.0969998017,
0.0712970644,
-0.5103933811,
-0.5260895491,
0.087770246,
0.0451155566,
0.3469475508,
-0.0794484243,
0.1229038835,
-0.0831523985,
-0.2634930909,
0.241193369,
0.0855121389,
0.0120579861,
0.2704756856,
-0.0931820422,
-0.1950540245,
0.2055422515,
0.1910838634,
-0.0510343462,
-0.1572392285,
0.0612888783,
-0.1809064895,
0.4714627862,
-0.1275044233,
-0.1305403113,
0.0314627476,
0.5298318863,
-0.0231172815,
0.1206786856,
-0.1474152505,
-0.4394849539,
0.4606892467,
-0.1143049747,
-0.1152105629,
-0.0471235774,
0.085027881,
-0.2308355272,
-0.1428096145,
-0.4497534633,
0.2097348273,
0.114458397,
0.0779338181,
0.0232082773,
-0.2181333899,
-0.2973219752,
-0.0552935936,
-0.3006826341,
0.1130248904,
-0.2625951171,
0.2755221725,
-0.1537061185,
-0.1574431658,
0.0881768018,
0.2783005834,
0.0660185814,
-0.0398225039,
-0.1973527521,
0.4403559268,
0.18939358,
0.1783677489,
-0.2212109715,
0.1743725985,
-0.0205576066,
-0.5043705702,
-0.197232157,
0.222274065,
0.1445054263,
-0.0836560801,
0.1542646587,
0.3256598413,
0.046994064,
0.2012372166,
-0.1187431142,
-0.0244208518,
0.0809819847,
-0.3183219433,
-0.1043488085,
-0.314383477,
0.3306579292,
0.0669426098,
-0.0498436093,
0.364422828,
-0.1433967501,
-0.2364380807,
0.2562754154,
-0.1630936265,
0.0166429803,
-0.026204925,
0.0526053831,
0.0161146559,
-0.1365389824,
0.5215737224,
0.3676492274,
0.0759983286,
-0.0556293391,
0.2547418773,
-0.168482706,
0.0051102526,
-0.1327621192,
0.0308121145,
0.441336453,
0.5746247768,
0.0918349773,
-0.0614508763,
-0.1359845847,
-0.1500113755,
0.0318572819,
0.097265549,
-0.4689370692,
-0.0825084522,
-0.3472765982,
-0.0520658977,
-0.2333784699,
-0.4814293385,
-0.425247103,
-0.1412816048,
-0.208807379,
0.2533642352,
-0.1031533033,
0.1241185963,
-0.5149739385,
-0.2665117681,
-0.0047690095,
-0.2358536422,
0.0412262827,
-0.1164911166,
-0.0986886024,
0.0302726533,
0.3584021628,
-0.123590976,
0.3141860068,
-0.3931680322,
-0.1273626387,
-0.2688836753,
-0.2275179476,
0.0751743987,
0.0303655118,
0.2022958398,
0.3887100816,
0.0176300183,
0.1774820834,
-0.3341085315,
0.2367105633,
-0.0342042483,
-0.4332149625,
0.4542860985,
-0.0338085666,
-0.0439045466,
0.1590162963,
0.1034133136,
0.0255463496,
-0.1891104877,
-0.2271224111,
-0.1617022902,
0.1750957817,
0.3050271869,
-0.0588240661,
0.1737568676,
-0.2385279983,
0.2457226515,
-0.0914775804,
-0.3930362463,
0.447337389,
0.134859547,
-0.3894414008,
-0.0014069312,
-0.1381111592,
0.2023783922,
0.0179263726,
-0.2059975415,
-0.2789628804,
-0.3191368282,
-0.2040817589,
0.26968804,
-0.1908817887,
0.1036993489,
-0.140505895,
0.0116645927,
-0.3016442955,
-0.2897189558,
0.0866185576,
0.1963248253,
0.5354510546,
-0.0306563452,
0.1845717132,
-0.0003156719,
0.4918315113,
0.5818006992,
-0.2668008208,
0.1558620632,
0.197410062,
0.3984072208,
0.0478723682,
-0.3073433936,
-0.2197987288,
-0.0746402144,
0.0424399935,
0.0069636405,
-0.0772387162,
-0.2518044114,
-0.1640636027,
-0.0761349797,
-0.2413391918,
-0.1472546756,
-0.281752944,
-0.0984955505,
0.137337327,
0.1561788917,
-0.1206755638,
0.0419567637,
-0.3562529087,
0.1194458753,
0.4022803009,
-0.0736166462,
-0.1120868176,
-0.4178933799,
-0.3026034832,
-0.0232694149,
0.1030340269,
0.2641527951,
0.5432682633,
-0.011030389,
-0.2413648218,
-0.1339321136,
0.028569553,
0.3009069264,
-0.3985234797,
0.4980200827,
0.0919118747,
-0.0759883821,
-0.2152978033,
-0.1684218496,
-0.037853688,
-0.2864681184,
0.2601539493,
0.4639980197,
-0.1729166806,
0.0640201792,
0.3443184793,
0.2865634859,
-0.1134781688,
-0.5530335307,
-0.3458952606,
-0.1848470122,
-0.2467050701,
-0.1002607942,
0.0053226524,
0.3299515545,
0.0885129496,
-0.1757301688,
0.2267508656,
-0.0815899596,
0.2870307565,
0.0228996407,
0.2305250168,
0.1188267544,
0.2738532126,
-0.0875529349,
0.0445303507,
0.1940035671,
0.6567079425,
0.0008017239,
-0.2895980775,
-0.0030075805,
-0.1070653349,
0.1876065731,
0.0959666148,
0.1396373212,
0.0923736989,
0.3014726639,
0.0622662976,
-0.0609063953,
-0.2242571861,
0.1264535189,
0.080329515,
-0.4194384813,
0.1032550111,
-0.0697650462,
-0.1487040371,
0.0821864307,
-0.006252063,
0.0771871582,
0.0082551241,
0.3140621185,
0.1771517396,
0.6645985246,
0.1075542569,
0.0618636608,
0.1116903946,
-0.3412672281,
0.1107879356,
0.3367467523,
-0.1549400687,
-0.4984494746,
-0.4148842096,
-0.0716845989,
-0.3204640746,
-0.0469787121,
-0.0513008907,
0.1438841075,
0.3013832271,
-0.2022552788,
0.0806189403,
0.1035888568,
-0.0187679213,
-0.0892049223,
0.0523888282,
-0.0068019326,
0.0828846917,
0.0018919207,
0.2321918607,
-0.0885060057,
-0.010067123,
-0.057262823,
-0.1391709596,
-0.3488494158,
0.2183166593,
0.1255861968,
-0.0699168667,
0.3373054266,
-0.135759607,
0.0447446108,
0.3705087602,
0.3949791193,
-0.0767470747,
-0.2293839455,
0.022054201,
0.4280365109,
0.2002566159,
0.2127334028,
-0.271787405,
0.4802936912,
-0.1120920479,
-0.3026745617,
-0.0218671542,
0.0027177164,
-0.4494340122,
0.2286895365,
-0.1112469435,
-0.2776589096,
-0.2815742493,
-0.000689331,
-0.2853696048,
0.3093068302,
-0.1628799438,
0.1192394048,
0.2695657015,
-0.1660758555,
0.1663566232,
0.1937329471,
-0.3561128974,
0.0369356126,
0.4300002158,
0.0621576272,
-0.0665237904,
0.32554245,
0.2994059026,
-0.0252968874,
-0.0613020249,
-0.0540257469,
0.049581144,
-0.3041827679,
-0.064334631,
-0.071846351,
0.2373684049,
0.0797828138,
0.5024497509,
0.604532361,
-0.1628624499,
0.1055811718,
-0.4955860078,
-0.0087077189,
0.0961675197,
0.0625836477,
0.2294334024,
-0.2789458036,
-0.087914668,
0.0987436324,
-0.0656986907,
-0.2721961439,
0.042683661,
-0.2391284853,
-0.0667469427,
-0.2155959308,
-0.0453204289,
0.0566009767,
0.0205401331,
0.132705465,
-0.2174191922,
-0.2873234451,
-0.1718062162,
-0.2542829216,
0.1209493726,
0.2168710828,
-0.1989627331,
0.2374541163,
-0.1378069222,
0.0008286472,
-0.0710931048,
-0.05639733,
0.2181562781,
0.0353598483,
0.2487179637,
0.0158183165,
-0.0587181114,
-0.1368213445,
0.0055483156,
-0.3249946237,
-0.0936677605,
0.0583289787,
-0.1657412052,
-0.0256226081,
-0.0354548618,
0.592599988,
0.0344322398,
-0.187277481,
-0.1384031326,
0.4624236226,
-0.2961346805,
-0.045844581,
0.2838653624,
0.6900952458,
-0.0150722247,
-0.4808619916,
-0.0103893606,
0.1940529943,
0.2514733672,
-0.38913849,
-0.0457999445,
0.1631804556,
0.2474001795,
-0.0696942881,
0.144268766,
0.179754138,
-0.4447101355,
0.3277697265,
0.0914869532,
0.3664021492,
-0.1266361475,
0.3067700863,
0.2992956936,
-0.1503380388,
0.0794605985,
0.3732283711,
-0.233742699,
0.1621463597,
-0.1705026627,
0.2674779892,
0.3092872202,
-0.4292391837,
0.4110840261,
-0.0362880602,
-0.4532461762,
0.5778867006,
0.1788544655,
0.110761337,
0.0051989127,
-0.0026315814,
0.3363158405,
-0.1594759822,
0.3795616031,
-0.6557058692,
-0.0941908881,
0.0033916265,
0.0147036612,
-0.255335182,
-0.2090569735,
0.1365439892,
0.1648423076,
-0.0105675468,
0.0980356112,
0.1283201575,
0.1600541323,
-0.1460572034,
-0.3708360195,
-0.0362916216,
0.2408046871,
-0.0828849822,
-0.2378898114,
0.1600238234,
0.144040525,
-0.2519591153,
0.267591089,
0.4292096198,
0.3130860031,
0.271540612,
0.1928302497,
-0.022885954,
-0.036007423,
0.1205689088,
0.0276247095,
0.6033432484,
-0.0031601833,
0.0192762651,
0.3895102143,
0.1296759099,
-0.0818469673,
-0.1383769363,
-0.1389607489,
-0.1950146705,
-0.1763320267,
0.3944879472,
-0.0675203279,
0.2205213159,
-0.1023904905,
0.226842016,
-0.4556972682,
-0.1775958091,
0.3576365709,
0.0267522186,
0.1040142104,
0.026973052,
0.0766344294,
-0.1010162681,
0.3395237029,
0.235596925,
-0.3532711565,
-0.1554395407,
-0.2474290878,
-0.7105349302,
0.4345143735,
-0.0141751319,
0.130918473,
0.2559303939,
0.0087800566,
-0.0325409248,
0.0439074747,
0.3001854718,
0.0405485667,
-0.3438164294,
-0.0022334328,
-0.1407423764,
-0.2997107506,
-0.2220989168,
-0.2371893078,
-0.1319985092,
-0.052582141,
0.098831974,
-0.0614331216,
0.0519012846,
-0.0229689404,
-0.0847413242,
0.1421305835,
0.0700454116,
0.0495941788,
0.1203892529,
0.738163054,
0.2343019843,
0.078921698,
-0.0274276547,
0.0048828721,
-0.2355143875,
0.2605465055,
-0.2729995549,
0.2373894602,
0.1096838117,
0.2450432628,
-0.2091693282,
0.1344645321,
0.1008648872,
-0.4154049754,
-0.2196983099,
0.2354517132,
0.0411844775,
-0.0725964755,
0.1165928468,
0.0115483506,
0.0608141534,
0.2826828361,
-0.0585888587,
-0.3508753777,
0.4362244308,
-0.2953244746,
-0.0248366017,
-0.1422315985,
0.2463859618,
-0.4564369619,
-0.1546541601,
-0.6119277477,
0.084007062,
0.3477485478,
0.1153377891,
0.0466729142,
0.2649785876,
-0.3448962569,
0.1412266046,
0.0591906048,
0.3437691629,
-0.0568566509,
-0.21605362,
0.0112859737,
-0.0247337129
] |
https://github.com/huggingface/datasets/issues/3051 | Non-Matching Checksum Error with crd3 dataset | I'm seeing the same issue as @RylanSchaeffer:
Python 3.7.11, macOs 11.4
datasets==1.14.0
fails on:
```python
dataset = datasets.load_dataset("multi_woz_v22")
``` | ## Describe the bug
When I try loading the crd3 dataset (https://huggingface.co/datasets/crd3), an error is thrown.
## Steps to reproduce the bug
```python
dataset = load_dataset('crd3', split='train')
```
## Expected results
I expect no error to be thrown.
## Actual results
A non-matching checksum error is thrown.
```
datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/RevanthRameshkumar/CRD3/archive/master.zip']
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-4.4.0-173-generic-x86_64-with-Ubuntu-16.04-xenial
- Python version: 3.6.10
- PyArrow version: 5.0.0
| 19 | Non-Matching Checksum Error with crd3 dataset
## Describe the bug
When I try loading the crd3 dataset (https://huggingface.co/datasets/crd3), an error is thrown.
## Steps to reproduce the bug
```python
dataset = load_dataset('crd3', split='train')
```
## Expected results
I expect no error to be thrown.
## Actual results
A non-matching checksum error is thrown.
```
datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/RevanthRameshkumar/CRD3/archive/master.zip']
```
## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-4.4.0-173-generic-x86_64-with-Ubuntu-16.04-xenial
- Python version: 3.6.10
- PyArrow version: 5.0.0
I'm seeing the same issue as @RylanSchaeffer:
Python 3.7.11, macOs 11.4
datasets==1.14.0
fails on:
```python
dataset = datasets.load_dataset("multi_woz_v22")
``` | [
-0.0050890408,
-0.0740979537,
0.0115769226,
0.2142196149,
0.0446547531,
-0.0815154389,
0.2199154198,
0.2908580601,
-0.020732725,
-0.0038823609,
0.0393177643,
0.2184229642,
-0.0073493998,
0.1165500805,
-0.1907240599,
-0.0479840301,
0.3433543444,
0.0568099096,
0.0270323008,
-0.0146722095,
-0.1217479035,
0.1897558421,
-0.2262431234,
-0.0176004879,
-0.0114537003,
0.3141431808,
-0.1265328676,
0.3303379416,
-0.0143033685,
-0.0601224042,
0.6190880537,
0.1798834205,
0.1300385594,
0.6831795573,
-0.0001163469,
-0.0475459956,
0.2488116175,
-0.1716600209,
-0.116065301,
-0.3782933354,
-0.3892389238,
-0.3070963919,
-0.0062212972,
-0.1876086444,
-0.0163910631,
0.2598289251,
-0.2455653548,
0.0698737726,
0.1047334746,
-0.0001950547,
0.2071569562,
0.6591678858,
0.1159946173,
0.0595752485,
0.0807692632,
0.1534063816,
0.0017088143,
0.544696331,
0.3403490186,
-0.218300581,
0.0440146513,
0.1729723066,
-0.2633568347,
0.1657974571,
0.1468816847,
-0.0543476976,
-0.2399259806,
0.0805295408,
-0.0212840829,
0.5182216167,
0.0591435619,
-0.2346522808,
-0.4316554368,
-0.1021456048,
-0.066419296,
-0.556238234,
0.3821806908,
0.2015210241,
-0.1566860974,
-0.0776730031,
-0.4879796207,
0.2152164876,
0.0006518801,
0.21968095,
-0.1058546379,
0.086276114,
0.0302639604,
-0.0457013771,
0.2073963583,
-0.1850508898,
0.2528307736,
-0.277870059,
-0.1077199057,
0.00070315,
-0.6318205595,
-0.2522800267,
-0.2542659044,
0.5570598841,
0.3400396407,
0.312152952,
-0.1901736408,
0.1766636819,
-0.0098922187,
0.0094957082,
0.0896565542,
0.0675854236,
-0.2068270296,
0.291038245,
0.2482632697,
0.3254955411,
-0.1401992142,
0.1437117755,
-0.0361442678,
-0.1321340203,
0.52104038,
0.002048234,
0.1366416961,
-0.3246910572,
-0.1277595013,
0.2106402218,
0.1474872828,
-0.0480394289,
-0.052245032,
0.3029047251,
-0.2518992126,
0.1874469519,
-0.0902151912,
0.3765103519,
-0.3248195052,
0.1031466052,
-0.1350085586,
-0.1989863962,
-0.1647199988,
-0.0518908985,
0.1542473733,
-0.1894795001,
0.3332675099,
-0.1281973422,
0.2518436313,
0.0167210158,
-0.0220430717,
0.0870462433,
0.0131779583,
0.3861889243,
-0.0182064697,
0.1935082227,
0.1541046351,
0.2382919341,
-0.0286406111,
0.1050755978,
-0.3319675326,
-0.2624970078,
-0.3806237876,
0.1772109419,
-0.7136676311,
-0.1537100971,
-0.1200047135,
-0.3985886276,
0.2354293168,
-0.0649565682,
-0.056760896,
-0.4134113193,
-0.3182620704,
-0.2599987686,
0.1167359948,
0.0206810422,
0.0420251377,
0.2987656593,
-0.3632178009,
-0.1163752526,
0.2428524643,
0.2150579691,
-0.0810533762,
-0.3425637484,
-0.2393650562,
-0.0893205032,
0.215823099,
-0.5109862685,
-0.4660959244,
0.011856108,
0.0660681427,
0.348647505,
-0.0430673212,
0.080835104,
-0.2013576776,
-0.1414822042,
0.1494968832,
0.0776483342,
-0.0261584241,
0.2240620106,
-0.0761471987,
-0.224159956,
0.2241107821,
0.3258957863,
0.0461160354,
-0.1371054798,
0.0084663816,
-0.2884567678,
0.4022704661,
-0.1850488484,
-0.2157302946,
-0.0031188503,
0.6294673085,
-0.0259842426,
0.1472247839,
-0.1330264211,
-0.3578473926,
0.4545341432,
0.1552173942,
-0.0783923939,
-0.0471027792,
0.1216532737,
-0.1741366535,
-0.099975884,
-0.4120607972,
0.190459609,
0.0489371791,
0.0591337495,
0.0370274074,
-0.1525631696,
-0.3469000459,
0.0350570641,
-0.3284326792,
0.1572928876,
-0.252211839,
0.2887920737,
-0.1682869643,
-0.119346045,
0.0962612331,
0.2829836607,
-0.0479973219,
-0.0246670786,
-0.1631452292,
0.3613803387,
0.2994858623,
0.0781226903,
-0.2115114331,
0.2738592327,
-0.06127204,
-0.5040169954,
-0.1860647649,
0.1962275654,
0.0509089194,
-0.0120964665,
0.1028109416,
0.3587208092,
0.1528951973,
0.1631419212,
-0.0800278783,
-0.0455878116,
0.09362901,
-0.3036859035,
-0.076133281,
-0.2706749141,
0.3285453916,
-0.1124864221,
-0.046095673,
0.2538234293,
-0.1733799428,
-0.1929416656,
0.2653234005,
-0.1394602656,
-0.0033860132,
0.0253238752,
0.0985907614,
0.0749488696,
-0.1329105645,
0.5222575665,
0.4665668309,
0.030896727,
-0.0477247164,
0.3658855259,
-0.2190227807,
-0.0082349787,
-0.1465048641,
0.0391665176,
0.3142392635,
0.4739097357,
0.1697555929,
-0.1059728041,
-0.1650493145,
-0.1430265307,
0.0060737766,
0.12900576,
-0.4080836177,
0.022175679,
-0.3125739992,
-0.0695162714,
-0.310310185,
-0.3648863733,
-0.4391924441,
-0.2065060139,
-0.1677445024,
0.3744704723,
-0.0996106416,
0.0897781253,
-0.4655691385,
-0.2300640196,
0.0181820933,
-0.1904296577,
0.0938805118,
-0.1477374285,
-0.0599843487,
0.017727837,
0.318030715,
-0.2250942886,
0.3155871928,
-0.4139695466,
-0.1411273926,
-0.2258405238,
-0.2934675217,
0.0246612411,
-0.0640822425,
0.1182566285,
0.4367734492,
-0.0116509814,
0.1331200004,
-0.2618658245,
0.2756682336,
-0.0951335579,
-0.401012063,
0.3309476078,
-0.0003835014,
-0.0188509747,
0.1426870376,
0.0919118896,
-0.0133985467,
-0.1658942848,
-0.2025045455,
-0.1406134069,
0.1450519115,
0.2710607946,
0.0166773144,
0.0633986667,
-0.1788412929,
0.141593039,
-0.1459106356,
-0.3692005873,
0.4389449358,
0.1344796866,
-0.4036253095,
0.0226768013,
-0.1081013381,
0.2670502961,
0.1023028567,
-0.3367686272,
-0.3280655742,
-0.3281980157,
-0.1448686868,
0.2304749936,
-0.018454954,
0.0375308543,
-0.1474924684,
0.0226098001,
-0.3131791949,
-0.2207554132,
0.0349095389,
0.2063776702,
0.5681164265,
0.0156539381,
0.197270304,
-0.0391962193,
0.6299890876,
0.488600105,
-0.3487399817,
0.209476456,
0.1457840353,
0.5094366074,
0.0609497614,
-0.2720981538,
-0.2481443286,
0.0218586829,
0.0893117636,
0.0372507088,
-0.0557748936,
-0.2252591997,
-0.1812804192,
0.0004066126,
-0.1724130362,
-0.1006337404,
-0.1995443404,
-0.0986386463,
0.1369963139,
0.1844788939,
-0.0193749107,
0.0109745879,
-0.4018787742,
0.1335436404,
0.4339219332,
-0.0712096468,
-0.1301511675,
-0.4567348957,
-0.3759181201,
-0.1315051019,
0.05288928,
0.1974340826,
0.6308583617,
-0.0121594043,
-0.2610694468,
-0.0991747901,
0.0369585454,
0.3243798614,
-0.4423566759,
0.3921317458,
0.1173066199,
-0.1471764147,
-0.2535180151,
-0.2380859256,
-0.0303064585,
-0.2587377429,
0.1487261802,
0.5297454596,
-0.0450413823,
0.0882152319,
0.2290939689,
0.3448107541,
-0.0894472823,
-0.5922756195,
-0.4038444459,
-0.1890961528,
-0.2256617695,
-0.0669856742,
0.0288409814,
0.2913808823,
-0.033483278,
-0.1372953802,
0.1631760895,
-0.0645899847,
0.274931401,
0.0964238495,
0.1633999795,
-0.0174026135,
0.2675378621,
-0.103036046,
-0.0043292069,
0.2197832614,
0.7649174333,
-0.1357837319,
-0.3895752132,
0.0272830762,
-0.0781892613,
0.179867208,
0.1057473794,
0.1161323264,
0.0056388276,
0.2700762451,
0.0366507433,
-0.1323525161,
-0.1129710302,
0.0930815339,
0.1309561729,
-0.4538726807,
0.094120495,
-0.0539404564,
-0.0338673778,
0.0993494168,
0.0994055942,
0.1546849459,
0.0354980342,
0.4003452361,
0.1083580106,
0.6197342873,
-0.0042304713,
0.1421217769,
0.0316259302,
-0.3229610026,
0.1883244067,
0.2728232145,
-0.0891134366,
-0.5766127706,
-0.5150695443,
-0.0913866311,
-0.3665332198,
-0.0718402788,
-0.0413153246,
0.2059552819,
0.3735154867,
-0.1509818435,
0.2289032787,
0.0567318723,
-0.0483844541,
-0.0871891677,
0.0869804919,
-0.1610417515,
0.0924542546,
0.0889857635,
0.2732979655,
-0.0709673762,
0.0902474299,
-0.1023261622,
-0.0886309743,
-0.3531259894,
0.1743795276,
0.0680967793,
-0.1038094759,
0.4274699688,
-0.1014069468,
0.0150122717,
0.3385595381,
0.5392107964,
-0.0463822596,
-0.2269172817,
0.0950914472,
0.3424874544,
0.2069690377,
0.2391391546,
-0.2178249955,
0.451510936,
-0.0799757764,
-0.2311553061,
0.0031421876,
0.0094605815,
-0.4535364509,
0.2614047527,
-0.1647846401,
-0.2772745788,
-0.2220754027,
-0.0357766747,
-0.3452486396,
0.3667431176,
-0.1267291754,
0.0949152261,
0.2225148678,
-0.1006744504,
0.2913961112,
0.1614343375,
-0.3517862558,
0.0328878202,
0.5012181997,
0.0204743184,
-0.0669184551,
0.2044453174,
0.2938011289,
0.0133247273,
-0.0391740836,
-0.1022363454,
0.1402960867,
-0.2479219884,
-0.0733872876,
-0.1116015241,
0.2227648348,
0.1770520657,
0.5714090466,
0.546640873,
-0.2009759843,
0.151011318,
-0.4941913486,
0.0113654509,
0.0391113907,
0.0129210949,
0.2161866426,
-0.2087992728,
-0.1354693025,
0.0447959788,
-0.1803199053,
-0.2434879392,
0.0332532711,
-0.1735014617,
-0.0972919613,
-0.064587824,
0.0019815522,
0.0891813263,
0.0191121474,
0.1092840731,
-0.209389329,
-0.324223429,
-0.1420913786,
-0.1877508759,
0.1464882344,
0.2640666366,
-0.1971189082,
0.2341844738,
-0.209673211,
-0.0901669338,
-0.0343358852,
0.0295274723,
0.1710760593,
-0.0723404139,
0.2367125452,
-0.0635732785,
-0.0185797885,
-0.0797675997,
0.0257937592,
-0.3193652034,
-0.0724273697,
0.0941195786,
-0.1404609233,
-0.0426850654,
-0.0092355357,
0.5155067444,
0.0300853606,
-0.2727082074,
-0.0845984817,
0.3930178881,
-0.2791413963,
-0.0833926126,
0.2924351692,
0.7446177602,
0.0864470601,
-0.4518328011,
-0.0380764678,
0.3307167292,
0.2185327709,
-0.3938032091,
-0.0639699474,
0.1688311547,
0.3476952612,
-0.1060869172,
0.2107231766,
0.2704901695,
-0.5005079508,
0.3173149824,
0.0877909511,
0.4177156389,
-0.1288600862,
0.3273768425,
0.3125293255,
-0.1440645605,
0.1018771455,
0.3625718653,
-0.229580909,
0.1254703999,
-0.0308940932,
0.1989249438,
0.3572755456,
-0.260525614,
0.3417602181,
0.0543198436,
-0.4488569796,
0.5528392792,
0.0886145607,
0.204613924,
-0.0404183641,
-0.0058352225,
0.2183893174,
-0.1914185435,
0.2399982959,
-0.6124360561,
-0.0512101538,
0.0490762554,
-0.0075870277,
-0.0724600852,
-0.1392894387,
0.1247358695,
0.2301292717,
-0.0670118108,
0.0716505721,
0.2772603929,
0.1751769632,
-0.0769159347,
-0.3846429884,
-0.1365342289,
0.1530206054,
-0.0377226099,
-0.1859422028,
0.213771984,
0.0859105438,
-0.2355925739,
0.2641103566,
0.2420448214,
0.335044086,
0.2289812863,
0.1919418424,
-0.0405604653,
-0.0841040686,
0.1645617187,
0.0555451214,
0.6004428267,
-0.0217098799,
0.1201520711,
0.3976921737,
0.1060658991,
-0.0258579496,
-0.1454781741,
-0.1532961726,
-0.2136093378,
-0.208714664,
0.2829121053,
0.0106197959,
0.2311675102,
-0.1134921014,
0.2748208344,
-0.3864483833,
-0.1719774157,
0.3426524103,
0.05980644,
0.0937601998,
-0.0136133255,
0.062680468,
-0.1267921776,
0.3126633167,
0.3529116213,
-0.2808774412,
-0.1258008033,
-0.3141863346,
-0.6973443031,
0.3980839849,
-0.1236526743,
0.0664281026,
0.227218762,
-0.055351913,
-0.0335701928,
0.0502390265,
0.3030643165,
0.1018909663,
-0.2491126955,
0.0284010582,
-0.1911114603,
-0.3219306767,
-0.268140018,
-0.3316431046,
-0.1323241293,
-0.0255498569,
0.1016237289,
-0.1635759175,
0.017164262,
-0.035958454,
-0.1142892838,
0.0799744129,
0.1884174645,
0.0871729031,
0.0416928269,
0.7041477561,
0.3352548778,
0.0020082579,
-0.0456609353,
0.0041085505,
-0.259129107,
0.2525124252,
-0.2784061432,
0.2592074871,
0.0587366223,
0.306648165,
-0.2131343782,
0.2294659317,
0.168559894,
-0.3966718316,
-0.1521303356,
0.254561305,
0.0578664541,
-0.0784703717,
0.2230753452,
0.0455673262,
0.1049247533,
0.3387111127,
-0.0808767453,
-0.34444049,
0.3501532674,
-0.3103812039,
-0.0627085194,
-0.1365374178,
0.1218035966,
-0.3270258009,
-0.1262346208,
-0.7784166336,
0.0699858069,
0.2974469066,
0.0249254536,
0.0517635718,
0.2934887111,
-0.2498114258,
0.2248251289,
0.05580201,
0.3233668804,
-0.1017765775,
-0.2640031576,
-0.0039816685,
-0.0142622301
] |
https://github.com/huggingface/datasets/issues/3048 | Identify which shard data belongs to | Independently of this I think it raises the need to allow multiprocessing during streaming so that we get samples from multiple shards in one batch. | **Is your feature request related to a problem? Please describe.**
I'm training on a large dataset made of multiple sub-datasets.
During training I can observe some jumps in loss which may correspond to different shards.
![image](https://user-images.githubusercontent.com/715491/136668758-521263aa-a9b2-4ad2-8d22-060b6bf86a1c.png)
My suspicion is that either:
* some of the sub-datasets are harder for the model than others
* some of the sub-datasets are not formatted properly
I'd like to identify which shards correspond to those jumps.
**Describe the solution you'd like**
It would be nice to have a key associated to each data sample or data batch containing details on where the data comes from (shard idx + item idx within the shard).
This should be supported both in local and streaming mode.
**Describe alternatives you've considered**
AΒ fix would be for me to add myself details (shard id, sample id) as part of each data sample.
The inconvenient is that it requires users to process/reupload every dataset when they need this feature. | 25 | Identify which shard data belongs to
**Is your feature request related to a problem? Please describe.**
I'm training on a large dataset made of multiple sub-datasets.
During training I can observe some jumps in loss which may correspond to different shards.
![image](https://user-images.githubusercontent.com/715491/136668758-521263aa-a9b2-4ad2-8d22-060b6bf86a1c.png)
My suspicion is that either:
* some of the sub-datasets are harder for the model than others
* some of the sub-datasets are not formatted properly
I'd like to identify which shards correspond to those jumps.
**Describe the solution you'd like**
It would be nice to have a key associated to each data sample or data batch containing details on where the data comes from (shard idx + item idx within the shard).
This should be supported both in local and streaming mode.
**Describe alternatives you've considered**
AΒ fix would be for me to add myself details (shard id, sample id) as part of each data sample.
The inconvenient is that it requires users to process/reupload every dataset when they need this feature.
Independently of this I think it raises the need to allow multiprocessing during streaming so that we get samples from multiple shards in one batch. | [
-0.5709902644,
-0.269620657,
-0.0461121276,
0.3155331016,
-0.2868869007,
-0.2091677189,
0.3178083003,
0.1625363678,
-0.1746657342,
0.1725877821,
-0.0845634788,
-0.0563050136,
-0.1931997538,
0.3816587925,
0.2079123557,
-0.1998602301,
0.0493255593,
-0.0795502886,
0.1737654209,
-0.2677971721,
0.1007162631,
-0.0156254917,
0.192980811,
-0.1184960157,
-0.2689401209,
0.1326908767,
-0.1220508739,
-0.0179281682,
0.0469081812,
-0.2242328972,
0.2826405168,
0.1475596577,
0.2918370068,
-0.0138960071,
-0.0001092341,
-0.0732625574,
0.22638008,
-0.0900220275,
-0.3096089065,
0.0119990204,
-0.8691810369,
0.0032537694,
-0.0575849004,
-0.3002432287,
-0.1204274446,
0.2608660161,
0.118526563,
0.0329475217,
0.0694157183,
0.0252297781,
0.1884849072,
0.1801662594,
-0.0429715849,
0.0438886546,
0.4896543026,
0.4038178921,
-0.0066058794,
-0.0340819843,
0.2584827542,
0.1488655359,
-0.140178293,
0.4460334182,
0.0370762385,
-0.0463607013,
0.1250326633,
0.0327454358,
-0.1728487164,
-0.1596882492,
-0.0829676092,
0.4981725216,
0.0808282197,
-0.1908136308,
-0.2543670535,
-0.2508689463,
0.1018676832,
-0.2345203757,
-0.0288371146,
0.1048880741,
-0.1443795562,
0.1257147938,
-0.25404495,
-0.0069291759,
-0.1915410757,
-0.0093552181,
-0.0878728107,
0.0050909845,
0.0395426601,
0.0493333712,
-0.0164441038,
-0.0469882637,
-0.2272804528,
0.0239642784,
0.0019555131,
-0.0861114487,
-0.5485090017,
-0.3809558749,
-0.0030993815,
0.1173756272,
-0.0590863824,
0.1542109102,
0.2136575133,
0.1981614232,
0.0814372003,
0.2998208404,
0.0607885644,
0.0385005437,
0.3691857159,
-0.1279413551,
-0.1163833067,
-0.1969384253,
-0.2451207936,
-0.0549967252,
0.049750451,
0.1683235019,
-0.040501684,
0.1245941967,
0.0775971115,
0.0302684605,
-0.1466994882,
0.1345968992,
-0.0929488391,
-0.3084987402,
0.4297226369,
0.1652706265,
0.4270986915,
-0.2202011049,
-0.4966799021,
0.019345561,
-0.0134649463,
-0.4856939614,
-0.1782247722,
0.0875017866,
-0.1560876966,
0.1891102791,
-0.0451835096,
-0.1182165444,
-0.2167027146,
-0.0512673147,
0.1708139479,
0.0237274598,
-0.2127480358,
-0.0437666923,
0.3513397276,
0.1852001101,
-0.297346741,
-0.0719530284,
0.0395709351,
-0.1169120744,
-0.3072591424,
-0.0212840997,
-0.1907702982,
-0.3584462702,
0.1154861525,
0.1365479231,
-0.2593171299,
0.0086188875,
-0.3699960709,
0.4144398868,
-0.1433675289,
-0.0585845448,
0.0655909032,
0.0048980792,
-0.2187438756,
-0.2537174225,
0.0688016415,
0.0364816487,
-0.3367957175,
-0.2591068447,
-0.3486136496,
-0.3160948753,
0.1899276972,
0.0004182566,
-0.2406379133,
-0.1886381507,
0.0932205766,
0.7706632018,
0.3409433067,
0.0027930462,
-0.4715896547,
0.2323601097,
-0.27726686,
-0.1423169225,
0.4000461996,
0.3716960847,
0.5799992681,
-0.1628337502,
0.0218060035,
0.3921267688,
-0.1520331651,
-0.0574041009,
-0.2810751796,
-0.254021585,
-0.5342464447,
0.2569098473,
0.0350379571,
-0.1558597237,
0.5246924162,
-0.1178575456,
0.1159577668,
0.0381566323,
0.0497309417,
-0.0474541634,
0.7537322044,
0.0548378788,
-0.1998084188,
-0.4527465701,
0.0020756873,
0.2215432525,
0.1477129459,
-0.0891171768,
0.0106478995,
-0.1777782887,
-0.0012480497,
0.1311789453,
0.0224371869,
0.1310061067,
0.1884075552,
0.2130464613,
-0.1453602612,
-0.3276981115,
-0.2419622838,
-0.0508453287,
-0.4028649628,
-0.0672676787,
-0.309409678,
0.3224686682,
0.2072734833,
0.0151808048,
-0.0901379585,
0.1501726359,
0.2638182938,
-0.0662730113,
0.0661470443,
0.1760367155,
0.0774162337,
0.3352478743,
0.2951075137,
0.4660003483,
0.0877359658,
-0.2359366566,
0.0612382777,
-0.1255002022,
-0.1598580182,
-0.0155547131,
-0.1181285605,
0.4157896936,
0.0041959151,
0.111522831,
-0.0253947508,
0.1543067545,
0.0687086582,
-0.1903567016,
0.0677891821,
-0.4307662249,
-0.0305564329,
-0.2374739796,
-0.3773956299,
0.197653994,
-0.2500165403,
0.4033869803,
0.2813196778,
-0.1678203791,
0.1705039591,
0.2647624314,
-0.2081881613,
-0.0473204777,
0.2916648388,
1.0890603065,
0.3623702228,
0.2931346595,
0.2414595187,
-0.2788496912,
-0.0343658291,
-0.0997083932,
0.1302984506,
-0.0440129414,
-0.3383912742,
-0.0427166894,
0.0310582276,
0.0291774832,
-0.1062826589,
0.0969519094,
-0.0133815287,
-0.0834643096,
-0.2195938826,
0.017699806,
-0.2781893909,
-0.068241328,
-0.3582416773,
-0.141541779,
-0.0356757045,
-0.3407168388,
0.2814797759,
0.0546865016,
-0.1540179104,
0.0119063947,
0.2449376732,
0.3509864509,
-0.3554844856,
0.1644362956,
0.0175710078,
-0.4776805639,
0.1714637876,
0.1502479315,
0.3307826817,
0.4914043546,
0.455099225,
-0.0402206071,
0.2229997367,
-0.2494085431,
-0.2849801183,
-0.1306206733,
-0.129459694,
0.3039527237,
-0.0480897091,
0.2825904787,
-0.3412029147,
-0.4481681585,
0.0902032703,
-0.0687746927,
-0.404014945,
0.1928906292,
-0.0292491429,
0.0132226357,
0.2052279711,
0.0548715368,
-0.3481010795,
-0.0955847874,
0.1017732918,
-0.1833999306,
0.4312798679,
-0.1468971223,
-0.2735159397,
-0.1961425692,
-0.1716306955,
-0.0070546689,
-0.1397175491,
-0.310264498,
-0.0768587738,
-0.2146066874,
0.0327056088,
0.066909194,
0.0724084675,
-0.0446241274,
0.615041554,
0.0086350739,
0.0784668103,
-0.0671599358,
0.0811799467,
0.2925291955,
-0.2237596065,
0.1966491789,
0.1818594486,
-0.0821953341,
0.0150329173,
0.2159876227,
-0.0804597586,
0.2648129463,
0.2655797005,
-0.1124483868,
0.1327178031,
0.3001618683,
1.1926680803,
-0.0522531308,
-0.535984695,
-0.012908197,
0.2003909051,
-0.302719295,
0.0968873873,
-0.2958999276,
0.3622182608,
-0.1440249085,
-0.0476204902,
0.2829730511,
-0.1386946589,
-0.2510674894,
0.080921106,
-0.0562854223,
-0.3182066083,
-0.2693098783,
0.3127209246,
-0.0978824794,
0.2486612201,
-0.1306888014,
-0.2331790179,
-0.0068162205,
-0.2041979581,
-0.280092746,
0.3266395926,
0.2555094957,
-0.022588959,
-0.3671958148,
-0.2081371993,
0.1079141647,
0.2176613659,
0.1558046788,
-0.0793927088,
-0.3947515488,
-0.310949266,
0.2562362254,
0.3267870843,
0.0437521115,
-0.3564215899,
-0.062320251,
-0.2534064949,
-0.1642589569,
0.123160705,
0.1041058376,
0.1131130159,
0.1052009612,
-0.0825787112,
0.1012830213,
-0.2535046637,
0.1348221898,
0.390676558,
0.0692801699,
-0.1894949079,
-0.0727502927,
0.1761248857,
0.2575609386,
-0.2078189999,
0.0612941459,
0.107859537,
-0.0851373374,
-0.233807534,
0.0378878079,
-0.1853996366,
0.2874976993,
0.3012482524,
0.1099550575,
0.2435501367,
-0.0333699621,
0.0181550179,
0.0941086188,
0.3145990968,
0.3058875799,
0.1370468289,
0.2219803184,
0.0492159016,
-0.2540921867,
0.2433619499,
0.2962691784,
0.4304676652,
0.0821654275,
0.3441931605,
-0.0651789457,
-0.0953305066,
-0.439198494,
-0.1568249911,
-0.2865941226,
-0.0350872651,
-0.0670888275,
-0.2501772046,
0.6676236391,
-0.3682761788,
-0.3420492411,
0.0479571372,
0.2484946549,
-0.2802650332,
0.5633925796,
0.3566220403,
1.2156774998,
-0.034208633,
0.006443826,
-0.232811898,
0.1431453973,
0.1015210971,
-0.1311446279,
0.1303287894,
-0.3080966175,
-0.4437173605,
-0.2342972308,
-0.127135843,
-0.0539158508,
0.4743916392,
-0.033254616,
-0.1749464422,
0.0163316727,
0.1710678637,
-0.0260780826,
-0.1259610057,
0.2732931376,
-0.0257281289,
0.0211607255,
0.1282265782,
-0.2054847777,
0.0787940398,
0.1017278284,
-0.3399683833,
-0.1511460394,
0.2311624587,
-0.4925213754,
-0.2370763868,
0.0180153344,
0.3728245795,
-0.2081662416,
-0.5107170343,
-0.1842048019,
0.2754853964,
0.1682449579,
-0.1996487379,
0.0940853953,
0.4841704071,
0.2410675883,
0.2137852758,
0.1861945838,
-0.3460142314,
0.0849454701,
-0.0150115723,
-0.2847607136,
0.062813364,
0.2443240732,
-0.3633029759,
-0.3963220417,
0.1695950478,
-0.0533504412,
0.1803385764,
-0.1802870631,
-0.0107163815,
-0.1571554691,
-0.0713576749,
0.1232190654,
0.1571391821,
-0.2343008965,
0.2029825747,
-0.1622319371,
0.0355313644,
-0.184207052,
0.2442755997,
0.0596629903,
0.2191430628,
-0.0678102896,
-0.3527804613,
-0.2368836105,
-0.2163372189,
0.1327892542,
0.0938912705,
-0.1654287726,
-0.4598329961,
-0.1509594917,
0.1259668916,
0.0453079902,
-0.1215986162,
0.1610913873,
0.1574648768,
-0.3595278263,
-0.1862756014,
-0.0228166822,
0.1026151776,
-0.2779833674,
0.3608487844,
-0.4303349257,
-0.0658087879,
-0.1665652096,
0.6232999563,
-0.3766641915,
-0.1056694314,
-0.1857670397,
0.1232392862,
0.3630717099,
0.2067496032,
0.0371050686,
-0.2000854015,
-0.0048039448,
-0.071381785,
0.0886191428,
-0.1369462758,
0.0316305496,
0.1137843058,
-0.0232124701,
0.392560482,
-0.5049387813,
0.2339236587,
0.1211816147,
-0.0749917552,
0.2017067969,
0.1940460205,
0.088369675,
0.3000150323,
0.5180622339,
-0.0450154804,
-0.3184451759,
0.0404296219,
0.3025375903,
0.2575623989,
-0.0805023015,
-0.0087944074,
-0.2771296203,
0.0372561328,
0.0930482745,
0.2465500534,
0.0414012782,
-0.0314424671,
0.3178779483,
0.3396036923,
-0.1250461936,
0.2114395499,
0.1814726591,
-0.1139668748,
-0.1528054774,
-0.0646497533,
-0.0606004372,
0.2603961527,
-0.0606246181,
-0.2394610792,
0.2477018535,
0.051496435,
-0.031350866,
0.0257186424,
0.2670254409,
0.2366941273,
-0.0283101127,
0.0435846895,
0.0336845554,
-0.3919066489,
0.2259771079,
0.3122778237,
0.2044269145,
0.1297069639,
0.2779091895,
0.0980276316,
0.3557623923,
0.3909912705,
-0.1445905864,
0.6853265762,
-0.0354917422,
-0.3209092319,
0.303250879,
-0.0871802494,
0.0118215755,
0.2804870903,
-0.0445113629,
0.1808967739,
0.1272527277,
0.2724511921,
-0.0172806978,
-0.2350519001,
-0.2619417012,
0.1362139434,
-0.0338226445,
-0.0774974972,
-0.3323738873,
-0.0443560407,
-0.1944968402,
-0.1617763489,
0.0766593888,
0.0673704445,
0.3505882919,
0.1639967114,
0.2070734501,
0.1760602891,
-0.3513689637,
0.3581105769,
0.3849551082,
-0.334679842,
-0.1753073335,
0.0995460227,
0.0393933058,
0.4883692861,
-0.247684136,
0.0139126834,
-0.0924040601,
0.1076279506,
0.3041842282,
0.0243128594,
-0.1506033838,
-0.1123416126,
0.09905269,
-0.1926626265,
0.0129412962,
0.322290957,
0.1506923437,
-0.05156238,
0.2509831786,
0.2268036306,
0.3264252841,
-0.2374684066,
0.1188092977,
-0.1950797141,
-0.2150633633,
-0.0273178592,
-0.0343795605,
-0.244809553,
-0.1535156071,
0.4103480577,
-0.1414179057,
0.1615204364,
-0.1386827677,
0.0952114239,
0.0625575557,
0.3045374155,
0.0658667237,
-0.2408636659,
-0.4003492296,
-0.2054095417,
-0.5951738358,
-0.1613879651,
0.0131109348,
0.0874225199,
0.2243978232,
0.1802294552,
0.2688316405,
0.3682180047,
-0.1241127476,
-0.5848946571,
-0.1923229694,
0.4475025237,
-0.394328177,
-0.0587663576,
-0.0432802737,
-0.2504641414,
-0.1108117327,
0.0240507238,
0.3742257357,
0.2000835389,
0.1004843041,
-0.0911025181,
0.0067814919,
0.4188724458,
-0.0803904086,
-0.024097966,
-0.1850466877,
0.3794965744,
-0.12374378,
0.2619230151,
0.0957106501,
-0.0899472982,
-0.2043489963,
0.2028913647,
-0.3063113689,
0.613056004,
0.2655435801,
0.2328994721,
-0.0752908513,
-0.0136713404,
0.0077719535,
-0.2919134498,
0.0382879451,
-0.3126579225,
-0.1462194473,
0.1301332712,
0.4513894916,
0.3025360107,
0.1174124628,
0.1525274664,
0.1185765564,
-0.3834379017,
0.1215927526,
-0.1858022362,
0.0667901859,
0.2771560252,
0.2006121576,
-0.0743893161,
0.4234478176,
-0.2256703824,
-0.1729393005,
0.3042416573,
-0.1371247023,
0.2769836783,
0.0419772267,
0.5683112741,
-0.0422512069,
-0.1461542249,
-0.2953828275,
0.1035177782,
0.1554981023,
0.087872833,
-0.175258413
] |
https://github.com/huggingface/datasets/issues/3044 | Inconsistent caching behaviour when using `Dataset.map()` with a `new_fingerprint` and `num_proc>1` | Following the discussion in #3045 if would be nice to have a way to let users have a nice experience with caching even if the function is not hashable.
Currently a workaround is to make the function picklable. This can be done by implementing a callable class instead, that can be pickled using by implementing a custom `__getstate__` method for example.
However it sounds pretty complicated for a simple thing. Maybe one idea would be to have something similar to streamlit: they allow users to register the hashing of their own objects.
See the documentation about their `hash_funcs` here: https://docs.streamlit.io/library/advanced-features/caching#the-hash_funcs-parameter
Here is the example they give:
```python
class FileReference:
def __init__(self, filename):
self.filename = filename
def hash_file_reference(file_reference):
filename = file_reference.filename
return (filename, os.path.getmtime(filename))
@st.cache(hash_funcs={FileReference: hash_file_reference})
def func(file_reference):
...
``` | ## Describe the bug
Caching does not work when using `Dataset.map()` with:
1. a function that cannot be deterministically fingerprinted
2. `num_proc>1`
3. using a custom fingerprint set with the argument `new_fingerprint`.
This means that the dataset will be mapped with the function for each and every call, which does not happen if `num_proc==1`. In that case (`num_proc==1`) subsequent calls will load the transformed dataset from the cache, which is the expected behaviour. The example can easily be translated into a unit test.
I have a fix and will submit a pull request asap.
## Steps to reproduce the bug
```python
import hashlib
import json
import os
from typing import Dict, Any
import numpy as np
from datasets import load_dataset, Dataset
Batch = Dict[str, Any]
filename = 'example.json'
class Transformation():
"""A transformation with a random state that cannot be fingerprinted"""
def __init__(self):
self.state = np.random.random()
def __call__(self, batch: Batch) -> Batch:
batch['x'] = [np.random.random() for _ in batch['x']]
return batch
def generate_dataset():
"""generate a simple dataset"""
rgn = np.random.RandomState(24)
data = {
'data': [{'x': float(y), 'y': -float(y)} for y in
rgn.random(size=(1000,))]}
if not os.path.exists(filename):
with open(filename, 'w') as f:
f.write(json.dumps(data))
return filename
def process_dataset_with_cache(num_proc=1, remove_cache=False,
cache_expected_to_exist=False):
# load the generated dataset
dset: Dataset = next(
iter(load_dataset('json', data_files=filename, field='data').values()))
new_fingerprint = hashlib.md5("static-id".encode("utf8")).hexdigest()
# get the expected cached path
cache_path = dset._get_cache_file_path(new_fingerprint)
if remove_cache and os.path.exists(cache_path):
os.remove(cache_path)
# check that the cache exists, and print a statement
# if was actually expected to exist
cache_exist = os.path.exists(cache_path)
print(f"> cache file exists={cache_exist}")
if cache_expected_to_exist and not cache_exist:
print("=== Cache does not exist! ====")
# apply the transformation with the new fingerprint
dset = dset.map(
Transformation(),
batched=True,
num_proc=num_proc,
new_fingerprint=new_fingerprint,
desc="mapping dataset with transformation")
generate_dataset()
for num_proc in [1, 2]:
print(f"# num_proc={num_proc}, first pass")
# first pass to generate the cache (always create a new cache here)
process_dataset_with_cache(remove_cache=True,
num_proc=num_proc,
cache_expected_to_exist=False)
print(f"# num_proc={num_proc}, second pass")
# second pass, expects the cache to exist
process_dataset_with_cache(remove_cache=False,
num_proc=num_proc,
cache_expected_to_exist=True)
os.remove(filename)
```
## Expected results
In the above python example, with `num_proc=2`, the **cache file should exist in the second call** of `process_dataset_with_cache` ("=== Cache does not exist! ====" should not be printed).
When the cache is successfully created, `map()` is called only one time.
## Actual results
In the above python example, with `num_proc=2`, the **cache does not exist in the second call** of `process_dataset_with_cache` (this results in printing "=== Cache does not exist! ====").
Because the cache doesn't exist, the `map()` method is executed a second time and the dataset is not loaded from the cache.
## Environment info
- `datasets` version: 1.12.1
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 5.0.0
| 129 | Inconsistent caching behaviour when using `Dataset.map()` with a `new_fingerprint` and `num_proc>1`
## Describe the bug
Caching does not work when using `Dataset.map()` with:
1. a function that cannot be deterministically fingerprinted
2. `num_proc>1`
3. using a custom fingerprint set with the argument `new_fingerprint`.
This means that the dataset will be mapped with the function for each and every call, which does not happen if `num_proc==1`. In that case (`num_proc==1`) subsequent calls will load the transformed dataset from the cache, which is the expected behaviour. The example can easily be translated into a unit test.
I have a fix and will submit a pull request asap.
## Steps to reproduce the bug
```python
import hashlib
import json
import os
from typing import Dict, Any
import numpy as np
from datasets import load_dataset, Dataset
Batch = Dict[str, Any]
filename = 'example.json'
class Transformation():
"""A transformation with a random state that cannot be fingerprinted"""
def __init__(self):
self.state = np.random.random()
def __call__(self, batch: Batch) -> Batch:
batch['x'] = [np.random.random() for _ in batch['x']]
return batch
def generate_dataset():
"""generate a simple dataset"""
rgn = np.random.RandomState(24)
data = {
'data': [{'x': float(y), 'y': -float(y)} for y in
rgn.random(size=(1000,))]}
if not os.path.exists(filename):
with open(filename, 'w') as f:
f.write(json.dumps(data))
return filename
def process_dataset_with_cache(num_proc=1, remove_cache=False,
cache_expected_to_exist=False):
# load the generated dataset
dset: Dataset = next(
iter(load_dataset('json', data_files=filename, field='data').values()))
new_fingerprint = hashlib.md5("static-id".encode("utf8")).hexdigest()
# get the expected cached path
cache_path = dset._get_cache_file_path(new_fingerprint)
if remove_cache and os.path.exists(cache_path):
os.remove(cache_path)
# check that the cache exists, and print a statement
# if was actually expected to exist
cache_exist = os.path.exists(cache_path)
print(f"> cache file exists={cache_exist}")
if cache_expected_to_exist and not cache_exist:
print("=== Cache does not exist! ====")
# apply the transformation with the new fingerprint
dset = dset.map(
Transformation(),
batched=True,
num_proc=num_proc,
new_fingerprint=new_fingerprint,
desc="mapping dataset with transformation")
generate_dataset()
for num_proc in [1, 2]:
print(f"# num_proc={num_proc}, first pass")
# first pass to generate the cache (always create a new cache here)
process_dataset_with_cache(remove_cache=True,
num_proc=num_proc,
cache_expected_to_exist=False)
print(f"# num_proc={num_proc}, second pass")
# second pass, expects the cache to exist
process_dataset_with_cache(remove_cache=False,
num_proc=num_proc,
cache_expected_to_exist=True)
os.remove(filename)
```
## Expected results
In the above python example, with `num_proc=2`, the **cache file should exist in the second call** of `process_dataset_with_cache` ("=== Cache does not exist! ====" should not be printed).
When the cache is successfully created, `map()` is called only one time.
## Actual results
In the above python example, with `num_proc=2`, the **cache does not exist in the second call** of `process_dataset_with_cache` (this results in printing "=== Cache does not exist! ====").
Because the cache doesn't exist, the `map()` method is executed a second time and the dataset is not loaded from the cache.
## Environment info
- `datasets` version: 1.12.1
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 5.0.0
Following the discussion in #3045 if would be nice to have a way to let users have a nice experience with caching even if the function is not hashable.
Currently a workaround is to make the function picklable. This can be done by implementing a callable class instead, that can be pickled using by implementing a custom `__getstate__` method for example.
However it sounds pretty complicated for a simple thing. Maybe one idea would be to have something similar to streamlit: they allow users to register the hashing of their own objects.
See the documentation about their `hash_funcs` here: https://docs.streamlit.io/library/advanced-features/caching#the-hash_funcs-parameter
Here is the example they give:
```python
class FileReference:
def __init__(self, filename):
self.filename = filename
def hash_file_reference(file_reference):
filename = file_reference.filename
return (filename, os.path.getmtime(filename))
@st.cache(hash_funcs={FileReference: hash_file_reference})
def func(file_reference):
...
``` | [
-0.1125867143,
0.1165608466,
-0.0157670174,
0.0611556247,
-0.118484512,
-0.124060981,
0.3861939013,
0.351592958,
0.3012607396,
-0.0997984707,
0.2086912692,
0.3295020461,
0.0391608924,
-0.143107295,
-0.0197527502,
0.3910205364,
0.3168309033,
-0.0682448819,
-0.0389394686,
-0.0995175838,
-0.4793723822,
0.0277489237,
-0.3548876643,
-0.2784350216,
-0.3435045481,
0.0711035728,
-0.1592223793,
0.1362332553,
0.1219887435,
-0.3866126537,
0.2304466367,
0.0593738668,
-0.0752181634,
0.4310932755,
-0.000114172,
-0.0567237474,
0.2517125905,
0.0079105739,
0.0590457059,
-0.0195845682,
-0.373924017,
-0.2685647905,
-0.2234233022,
-0.1998500973,
-0.1342514306,
-0.0989066735,
0.0821544603,
-0.4035899043,
0.1880827546,
0.2669549584,
0.202910766,
0.0146498717,
-0.1780852973,
0.1081884652,
0.0760927051,
0.1785470694,
-0.1503016502,
-0.0250822939,
0.2232384086,
-0.1936353892,
-0.3218947351,
0.173055619,
-0.0006533896,
0.0736259818,
0.4684593081,
0.2219026089,
0.2286395878,
-0.2857302427,
0.1566767395,
-0.0031065329,
0.0585947447,
-0.2211930752,
-0.4096221626,
-0.3232636154,
-0.4060796201,
-0.0082025351,
0.3329614103,
-0.0361970924,
-0.0168457702,
0.0615800843,
-0.5032265186,
0.3311183751,
0.2923626602,
0.1471602023,
0.0637913048,
0.0509289801,
0.0886194333,
0.1207855493,
-0.0620212182,
-0.2344516367,
0.0843853503,
-0.2585550249,
-0.1525859833,
0.2692227066,
-0.025290966,
0.0286145359,
0.2956113219,
0.1723502278,
0.1807042658,
-0.0028717525,
0.155374527,
0.1463024467,
-0.038060993,
0.2179179341,
0.1920388639,
0.1609911621,
0.0323727876,
0.3685819209,
0.0826498345,
-0.233525604,
-0.4429799616,
0.1069175154,
0.3875384927,
-0.1421608478,
0.6534634233,
0.0437276028,
-0.0715641379,
-0.1008544117,
0.0942281485,
0.004200791,
-0.1544423848,
-0.1449454725,
0.2402852774,
0.2114504874,
-0.0122846095,
0.0895245001,
-0.1645042598,
0.1004159525,
-0.243595317,
0.2616870105,
-0.2362701595,
-0.0627566352,
-0.379340291,
0.2962084413,
0.2557350695,
0.0279155057,
0.2042227834,
0.2528309226,
0.0236646999,
-0.1804891974,
0.2260394394,
-0.2698524594,
0.5383321047,
-0.0242639389,
-0.3987636566,
0.1220851392,
-0.0585364886,
0.1297603548,
-0.2044865042,
0.2739320695,
-0.1989355385,
0.0436988175,
0.3474622667,
0.1077480242,
-0.3829646409,
0.1285943687,
-0.0849244595,
0.1277649105,
0.325925529,
-0.3512019515,
0.0299427491,
-0.2341233194,
-0.5851397514,
-0.3770019114,
-0.1053824648,
0.4714268148,
0.1104358509,
-0.1469233185,
0.1996142566,
0.3393435776,
0.1269705445,
0.1585379541,
-0.1798789799,
-0.0122614233,
-0.354834199,
0.3470662832,
0.0527058206,
-0.4631511271,
-0.8054308891,
0.1940665841,
0.0198367983,
0.2849619687,
-0.2524032295,
0.2596903741,
0.0837856233,
-0.3804090023,
-0.1488817632,
0.2633271515,
0.0669287518,
0.2377875,
-0.3906365931,
-0.1816050261,
0.2042835951,
-0.1243237555,
0.0286706612,
0.3220614791,
0.1909098625,
-0.1716929227,
0.1565609723,
-0.0259959642,
0.1394070983,
0.232599169,
0.133554548,
-0.3540168107,
0.0975813717,
0.1032649726,
-0.3816805482,
0.4530991614,
-0.1013764665,
-0.2259744853,
-0.0974101573,
0.1298207194,
0.1011131331,
-0.1546225846,
-0.1785897315,
-0.2162838727,
0.0639763623,
0.2628130615,
0.3670862615,
-0.2023705244,
0.0809103549,
0.3404195309,
0.2199297994,
-0.1081746444,
-0.3324357569,
-0.0261590648,
0.2252343148,
-0.1553072333,
-0.2981742322,
-0.024564065,
0.4082882702,
-0.1921357661,
-0.2038393319,
0.2058957666,
0.1627077311,
0.1013165638,
-0.2682018578,
0.2445405871,
0.0725818276,
-0.0229114275,
0.2189583629,
0.1548794955,
0.1265120953,
-0.2247429788,
-0.1205232069,
0.6013138294,
0.0204221867,
0.1298078895,
-0.1672375351,
-0.2604887486,
0.0164147131,
-0.0084770191,
0.1057501063,
-0.1996716857,
-0.1569325626,
0.1319084913,
0.5416611433,
0.1203986928,
0.0175663978,
0.3351604342,
0.3188401461,
0.0951515809,
0.0220058728,
0.0444788001,
-0.0942571238,
-0.3260903656,
0.0667860806,
0.2325779349,
0.5157184005,
0.0600492023,
0.0977213979,
-0.0077188578,
0.0021701318,
-0.0910497457,
-0.0255523156,
-0.196142748,
-0.0521436632,
-0.0367580391,
0.4138730168,
-0.1103312895,
-0.002925683,
-0.0147616882,
0.2290461212,
0.042155683,
-0.1423853636,
0.1586479545,
-0.1542544663,
0.4265766442,
0.0226103291,
-0.196833685,
0.0263902415,
-0.3279196024,
-0.1847744435,
0.3959238827,
0.0174628384,
0.0593910366,
-0.2548632324,
-0.2206835747,
-0.0935521796,
-0.3701072931,
-0.2463575006,
-0.1462762505,
-0.1450056881,
-0.0577528067,
0.1283845156,
0.0363080874,
0.0114307655,
-0.1244663671,
-0.1121078506,
-0.2261990011,
-0.1451640129,
-0.0095192669,
-0.0953242257,
0.1750873029,
-0.1545365751,
-0.1427366585,
-0.2333956361,
0.0803033561,
0.2684291005,
-0.4073775113,
-0.1769206524,
0.0594679266,
0.066197224,
-0.0847534388,
-0.0148557825,
-0.0339588635,
-0.12698479,
-0.0625396073,
0.1935478598,
0.114077121,
0.1619167328,
0.2994752526,
0.1833603829,
-0.1050817519,
0.055390209,
-0.0250175428,
-0.2818130851,
-0.5573965311,
0.4793078005,
-0.1213013828,
-0.13592875,
-0.1377430558,
-0.1052191034,
-0.1139262766,
0.4554575682,
-0.4010348916,
-0.3724503219,
-0.1838819832,
0.7493661642,
0.1569764912,
-0.2589913011,
0.3056099713,
-0.0359725654,
-0.0486656316,
-0.3839780092,
-0.4920692444,
0.0787428245,
0.0907914937,
0.1645448059,
0.3155911267,
0.1497923881,
0.0306624882,
0.6485081911,
0.3672060668,
-0.5198047757,
0.1849377602,
0.114414826,
0.0605882257,
-0.2385768741,
-0.2028325349,
0.0684990659,
-0.0570873059,
0.0549392588,
0.0277934987,
0.1705169082,
-0.1979387403,
-0.0563585982,
0.0082003083,
-0.4241655767,
-0.2546488941,
0.0549190193,
-0.1802774668,
0.1450088173,
0.1576443166,
0.540212214,
-0.5638545156,
-0.2608461976,
-0.0840079561,
-0.1469847262,
0.4131499827,
-0.003047036,
-0.1599493474,
0.1042480394,
-0.5813407898,
0.2441464067,
0.2578114867,
0.4286162257,
0.0103086252,
-0.250634104,
-0.0666310117,
-0.1764101535,
0.6912647486,
-0.3723667264,
0.3657489717,
0.1586534381,
-0.286098063,
-0.1351652145,
0.0938553438,
0.1436182559,
0.4348353744,
0.2767707407,
0.4428014457,
0.0248645525,
0.0345344283,
-0.4122461081,
0.1908982396,
0.1467838138,
-0.3810135126,
0.039904207,
-0.0570166558,
0.0375573784,
-0.0139249638,
-0.0007095552,
-0.0355663523,
0.116412878,
-0.0657848045,
-0.2098458409,
-0.0593208559,
-0.0356935412,
0.1662431955,
0.3373843133,
-0.1243241951,
0.4503377974,
0.2648328841,
0.0393720269,
0.1747861356,
0.3328949809,
-0.2801234126,
-0.071472913,
0.0364913717,
-0.0183323324,
-0.4278532267,
0.2911985517,
-0.0283841938,
-0.1242712289,
0.1225307733,
-0.1620350927,
-0.2004362941,
-0.0610877313,
-0.0016107991,
0.1703390032,
-0.2793622613,
-0.398588568,
0.3386237919,
0.2086580396,
-0.2586712539,
0.4416550994,
-0.4692288339,
-0.2223709673,
0.2586467862,
0.0358687788,
0.731888175,
-0.005674067,
0.041048225,
-0.1770727634,
0.1144517586,
0.0789119005,
0.2711602151,
0.1049432531,
-0.2402561158,
-0.1876769811,
-0.0092201382,
-0.2877558172,
-0.1540105194,
0.2329740077,
-0.1195450872,
0.1933394521,
-0.0417329408,
0.2885504961,
-0.1315220147,
0.0426812544,
0.311843276,
-0.1785062104,
0.0495073721,
0.2562744915,
0.1575479358,
0.1241149455,
0.1757339984,
-0.1128953248,
-0.2318653762,
-0.0293924753,
-0.0495290495,
0.2238518298,
-0.2507466972,
0.1634992212,
0.3992064893,
-0.1099405661,
-0.0457474403,
0.1972942948,
0.1955132633,
-0.1601490527,
-0.1594214737,
0.0701934025,
0.5374313593,
0.5143432617,
0.1620692015,
-0.2692705691,
0.1341718733,
0.1177023351,
-0.1141172796,
-0.0029684582,
-0.2186569721,
-0.4194806814,
-0.4274717569,
0.4585963786,
-0.178695336,
-0.091056861,
0.0561780035,
0.0380991697,
-0.1602011621,
-0.2128255665,
0.1468646824,
0.4549054503,
-0.0084844064,
0.4117092192,
-0.3164346516,
-0.4244235456,
-0.0558572933,
0.6185295582,
0.0067499359,
-0.0059222616,
0.274557054,
-0.151873067,
-0.1935258359,
-0.1522215903,
-0.0812070966,
-0.0981323868,
-0.183826834,
0.1221012175,
-0.2068579048,
0.0334937759,
0.1912763119,
0.0764886662,
-0.107012935,
0.0514529757,
0.0940713063,
-0.314578712,
-0.3586001694,
-0.2865385711,
-0.1192838997,
0.0751465857,
0.0204633102,
0.0201292802,
-0.1731525511,
0.1843705773,
-0.307595253,
0.1953533441,
0.0486659445,
0.1511594057,
-0.067631416,
0.024493577,
0.2342052907,
-0.1014935225,
0.0653534234,
0.296626538,
-0.4868950248,
-0.1978290081,
-0.0859410837,
0.0984236076,
0.1603195667,
-0.3084258139,
-0.2210444361,
0.0730676204,
0.0260120053,
-0.3968370259,
0.1147621199,
0.3971935809,
-0.0930371657,
0.0394122712,
0.2210759223,
0.0330359712,
0.2822136879,
0.0811035857,
-0.1412059814,
-0.0174496081,
-0.2394854575,
0.4071968496,
0.0115409475,
0.0936814994,
0.1150144041,
-0.0725815147,
0.0130646024,
0.1561981738,
0.3188044429,
-0.2088094801,
0.1460628211,
0.2720404565,
-0.0210022014,
0.099156253,
-0.1421117932,
-0.2073836625,
0.0905691311,
0.2281892896,
-0.1084202453,
-0.3000616133,
0.2749612331,
0.3501658738,
0.1976898462,
0.2313383669,
0.148308143,
-0.3277176321,
0.0152882459,
0.0505021475,
0.2985062003,
-0.4591920972,
0.076479286,
0.3280449212,
0.0891294926,
0.052409295,
0.4079289138,
0.1885535717,
-0.1231070384,
0.5156190395,
0.1662664413,
0.3609535694,
0.1295761615,
0.0065987566,
-0.3069340289,
-0.3739161491,
0.2956989408,
0.4503545463,
-0.1907431632,
0.4241831601,
0.0941930115,
0.4521612227,
-0.1431518644,
0.0689197853,
-0.15111278,
0.0292264856,
-0.1320527941,
-0.3104881644,
-0.0372123532,
-0.2018022239,
-0.0473300107,
-0.022768829,
-0.1573489755,
-0.1471767426,
0.5516812801,
0.1396968216,
-0.0499926992,
-0.2155193686,
-0.211092785,
-0.1398016065,
0.256757319,
-0.2433971763,
0.2725438178,
-0.1611988991,
-0.2117677629,
0.331050545,
-0.0004945045,
0.498917222,
0.4054945111,
-0.110027954,
0.2431411296,
0.0602776706,
-0.0311460644,
-0.193577677,
0.3610596061,
-0.20139727,
-0.364464432,
0.165001139,
0.0926772207,
-0.1243261471,
0.1485502571,
-0.0291018169,
0.4075522423,
-0.0851995051,
0.4404505789,
-0.219704926,
-0.0276351515,
0.0327810869,
0.1033012271,
0.0732940286,
-0.2911803722,
0.2661933303,
-0.2161591798,
0.3363656998,
0.0062044021,
0.0738164783,
-0.2708986998,
0.2704452872,
0.1943824291,
-0.2012421191,
-0.2543031275,
0.1683092713,
-0.3071584105,
0.2279296368,
-0.3463424742,
0.1618326902,
-0.2017130107,
0.2006844133,
-0.1722094715,
-0.101690948,
0.1518747061,
0.066699259,
0.0349066556,
0.5869482756,
-0.3466870785,
0.0923065096,
-0.1860401332,
0.0260116756,
0.2473445088,
-0.5080568194,
0.1658553481,
-0.002565895,
0.233171314,
-0.1004931405,
-0.1682336181,
0.0455016382,
0.3093849123,
0.7304588556,
0.4056194425,
0.1935493499,
-0.088354826,
-0.0779429227,
-0.3839722276,
0.0255016349,
-0.0938609391,
0.0507300757,
-0.1061783731,
0.2416702658,
-0.3015610278,
-0.0677379072,
-0.1308731437,
-0.0311057307,
-0.025161881,
-0.2683727145,
-0.0927089155,
0.0900271013,
-0.348929882,
0.0666240901,
-0.0877955407,
0.4083448648,
-0.0043659322,
0.2360657603,
-0.2845377922,
-0.143473357,
0.3450119793,
-0.6891121268,
-0.2317653894,
-0.0496695973,
0.0711978152,
-0.2536229789,
-0.289178431,
-0.3151980937,
-0.0735289827,
0.287966013,
0.0570951141,
-0.1766725332,
-0.1481706351,
-0.2677886486,
-0.0275817364,
-0.0750875846,
0.0656818822,
0.1789172292,
-0.2208768278,
0.260250926,
-0.0672305971
] |
https://github.com/huggingface/datasets/issues/3044 | Inconsistent caching behaviour when using `Dataset.map()` with a `new_fingerprint` and `num_proc>1` | My solution was to generate a custom hash, and use the hash as a `new_fingerprint` argument to the `map()` method to enable caching. This works, but is quite hacky.
@lhoestq, this approach is very neat, this would make the whole caching mechanic more explicit. I don't have so much time to look into this right now, but I might give it a try in the future. | ## Describe the bug
Caching does not work when using `Dataset.map()` with:
1. a function that cannot be deterministically fingerprinted
2. `num_proc>1`
3. using a custom fingerprint set with the argument `new_fingerprint`.
This means that the dataset will be mapped with the function for each and every call, which does not happen if `num_proc==1`. In that case (`num_proc==1`) subsequent calls will load the transformed dataset from the cache, which is the expected behaviour. The example can easily be translated into a unit test.
I have a fix and will submit a pull request asap.
## Steps to reproduce the bug
```python
import hashlib
import json
import os
from typing import Dict, Any
import numpy as np
from datasets import load_dataset, Dataset
Batch = Dict[str, Any]
filename = 'example.json'
class Transformation():
"""A transformation with a random state that cannot be fingerprinted"""
def __init__(self):
self.state = np.random.random()
def __call__(self, batch: Batch) -> Batch:
batch['x'] = [np.random.random() for _ in batch['x']]
return batch
def generate_dataset():
"""generate a simple dataset"""
rgn = np.random.RandomState(24)
data = {
'data': [{'x': float(y), 'y': -float(y)} for y in
rgn.random(size=(1000,))]}
if not os.path.exists(filename):
with open(filename, 'w') as f:
f.write(json.dumps(data))
return filename
def process_dataset_with_cache(num_proc=1, remove_cache=False,
cache_expected_to_exist=False):
# load the generated dataset
dset: Dataset = next(
iter(load_dataset('json', data_files=filename, field='data').values()))
new_fingerprint = hashlib.md5("static-id".encode("utf8")).hexdigest()
# get the expected cached path
cache_path = dset._get_cache_file_path(new_fingerprint)
if remove_cache and os.path.exists(cache_path):
os.remove(cache_path)
# check that the cache exists, and print a statement
# if was actually expected to exist
cache_exist = os.path.exists(cache_path)
print(f"> cache file exists={cache_exist}")
if cache_expected_to_exist and not cache_exist:
print("=== Cache does not exist! ====")
# apply the transformation with the new fingerprint
dset = dset.map(
Transformation(),
batched=True,
num_proc=num_proc,
new_fingerprint=new_fingerprint,
desc="mapping dataset with transformation")
generate_dataset()
for num_proc in [1, 2]:
print(f"# num_proc={num_proc}, first pass")
# first pass to generate the cache (always create a new cache here)
process_dataset_with_cache(remove_cache=True,
num_proc=num_proc,
cache_expected_to_exist=False)
print(f"# num_proc={num_proc}, second pass")
# second pass, expects the cache to exist
process_dataset_with_cache(remove_cache=False,
num_proc=num_proc,
cache_expected_to_exist=True)
os.remove(filename)
```
## Expected results
In the above python example, with `num_proc=2`, the **cache file should exist in the second call** of `process_dataset_with_cache` ("=== Cache does not exist! ====" should not be printed).
When the cache is successfully created, `map()` is called only one time.
## Actual results
In the above python example, with `num_proc=2`, the **cache does not exist in the second call** of `process_dataset_with_cache` (this results in printing "=== Cache does not exist! ====").
Because the cache doesn't exist, the `map()` method is executed a second time and the dataset is not loaded from the cache.
## Environment info
- `datasets` version: 1.12.1
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 5.0.0
| 66 | Inconsistent caching behaviour when using `Dataset.map()` with a `new_fingerprint` and `num_proc>1`
## Describe the bug
Caching does not work when using `Dataset.map()` with:
1. a function that cannot be deterministically fingerprinted
2. `num_proc>1`
3. using a custom fingerprint set with the argument `new_fingerprint`.
This means that the dataset will be mapped with the function for each and every call, which does not happen if `num_proc==1`. In that case (`num_proc==1`) subsequent calls will load the transformed dataset from the cache, which is the expected behaviour. The example can easily be translated into a unit test.
I have a fix and will submit a pull request asap.
## Steps to reproduce the bug
```python
import hashlib
import json
import os
from typing import Dict, Any
import numpy as np
from datasets import load_dataset, Dataset
Batch = Dict[str, Any]
filename = 'example.json'
class Transformation():
"""A transformation with a random state that cannot be fingerprinted"""
def __init__(self):
self.state = np.random.random()
def __call__(self, batch: Batch) -> Batch:
batch['x'] = [np.random.random() for _ in batch['x']]
return batch
def generate_dataset():
"""generate a simple dataset"""
rgn = np.random.RandomState(24)
data = {
'data': [{'x': float(y), 'y': -float(y)} for y in
rgn.random(size=(1000,))]}
if not os.path.exists(filename):
with open(filename, 'w') as f:
f.write(json.dumps(data))
return filename
def process_dataset_with_cache(num_proc=1, remove_cache=False,
cache_expected_to_exist=False):
# load the generated dataset
dset: Dataset = next(
iter(load_dataset('json', data_files=filename, field='data').values()))
new_fingerprint = hashlib.md5("static-id".encode("utf8")).hexdigest()
# get the expected cached path
cache_path = dset._get_cache_file_path(new_fingerprint)
if remove_cache and os.path.exists(cache_path):
os.remove(cache_path)
# check that the cache exists, and print a statement
# if was actually expected to exist
cache_exist = os.path.exists(cache_path)
print(f"> cache file exists={cache_exist}")
if cache_expected_to_exist and not cache_exist:
print("=== Cache does not exist! ====")
# apply the transformation with the new fingerprint
dset = dset.map(
Transformation(),
batched=True,
num_proc=num_proc,
new_fingerprint=new_fingerprint,
desc="mapping dataset with transformation")
generate_dataset()
for num_proc in [1, 2]:
print(f"# num_proc={num_proc}, first pass")
# first pass to generate the cache (always create a new cache here)
process_dataset_with_cache(remove_cache=True,
num_proc=num_proc,
cache_expected_to_exist=False)
print(f"# num_proc={num_proc}, second pass")
# second pass, expects the cache to exist
process_dataset_with_cache(remove_cache=False,
num_proc=num_proc,
cache_expected_to_exist=True)
os.remove(filename)
```
## Expected results
In the above python example, with `num_proc=2`, the **cache file should exist in the second call** of `process_dataset_with_cache` ("=== Cache does not exist! ====" should not be printed).
When the cache is successfully created, `map()` is called only one time.
## Actual results
In the above python example, with `num_proc=2`, the **cache does not exist in the second call** of `process_dataset_with_cache` (this results in printing "=== Cache does not exist! ====").
Because the cache doesn't exist, the `map()` method is executed a second time and the dataset is not loaded from the cache.
## Environment info
- `datasets` version: 1.12.1
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 5.0.0
My solution was to generate a custom hash, and use the hash as a `new_fingerprint` argument to the `map()` method to enable caching. This works, but is quite hacky.
@lhoestq, this approach is very neat, this would make the whole caching mechanic more explicit. I don't have so much time to look into this right now, but I might give it a try in the future. | [
-0.1125867143,
0.1165608466,
-0.0157670174,
0.0611556247,
-0.118484512,
-0.124060981,
0.3861939013,
0.351592958,
0.3012607396,
-0.0997984707,
0.2086912692,
0.3295020461,
0.0391608924,
-0.143107295,
-0.0197527502,
0.3910205364,
0.3168309033,
-0.0682448819,
-0.0389394686,
-0.0995175838,
-0.4793723822,
0.0277489237,
-0.3548876643,
-0.2784350216,
-0.3435045481,
0.0711035728,
-0.1592223793,
0.1362332553,
0.1219887435,
-0.3866126537,
0.2304466367,
0.0593738668,
-0.0752181634,
0.4310932755,
-0.000114172,
-0.0567237474,
0.2517125905,
0.0079105739,
0.0590457059,
-0.0195845682,
-0.373924017,
-0.2685647905,
-0.2234233022,
-0.1998500973,
-0.1342514306,
-0.0989066735,
0.0821544603,
-0.4035899043,
0.1880827546,
0.2669549584,
0.202910766,
0.0146498717,
-0.1780852973,
0.1081884652,
0.0760927051,
0.1785470694,
-0.1503016502,
-0.0250822939,
0.2232384086,
-0.1936353892,
-0.3218947351,
0.173055619,
-0.0006533896,
0.0736259818,
0.4684593081,
0.2219026089,
0.2286395878,
-0.2857302427,
0.1566767395,
-0.0031065329,
0.0585947447,
-0.2211930752,
-0.4096221626,
-0.3232636154,
-0.4060796201,
-0.0082025351,
0.3329614103,
-0.0361970924,
-0.0168457702,
0.0615800843,
-0.5032265186,
0.3311183751,
0.2923626602,
0.1471602023,
0.0637913048,
0.0509289801,
0.0886194333,
0.1207855493,
-0.0620212182,
-0.2344516367,
0.0843853503,
-0.2585550249,
-0.1525859833,
0.2692227066,
-0.025290966,
0.0286145359,
0.2956113219,
0.1723502278,
0.1807042658,
-0.0028717525,
0.155374527,
0.1463024467,
-0.038060993,
0.2179179341,
0.1920388639,
0.1609911621,
0.0323727876,
0.3685819209,
0.0826498345,
-0.233525604,
-0.4429799616,
0.1069175154,
0.3875384927,
-0.1421608478,
0.6534634233,
0.0437276028,
-0.0715641379,
-0.1008544117,
0.0942281485,
0.004200791,
-0.1544423848,
-0.1449454725,
0.2402852774,
0.2114504874,
-0.0122846095,
0.0895245001,
-0.1645042598,
0.1004159525,
-0.243595317,
0.2616870105,
-0.2362701595,
-0.0627566352,
-0.379340291,
0.2962084413,
0.2557350695,
0.0279155057,
0.2042227834,
0.2528309226,
0.0236646999,
-0.1804891974,
0.2260394394,
-0.2698524594,
0.5383321047,
-0.0242639389,
-0.3987636566,
0.1220851392,
-0.0585364886,
0.1297603548,
-0.2044865042,
0.2739320695,
-0.1989355385,
0.0436988175,
0.3474622667,
0.1077480242,
-0.3829646409,
0.1285943687,
-0.0849244595,
0.1277649105,
0.325925529,
-0.3512019515,
0.0299427491,
-0.2341233194,
-0.5851397514,
-0.3770019114,
-0.1053824648,
0.4714268148,
0.1104358509,
-0.1469233185,
0.1996142566,
0.3393435776,
0.1269705445,
0.1585379541,
-0.1798789799,
-0.0122614233,
-0.354834199,
0.3470662832,
0.0527058206,
-0.4631511271,
-0.8054308891,
0.1940665841,
0.0198367983,
0.2849619687,
-0.2524032295,
0.2596903741,
0.0837856233,
-0.3804090023,
-0.1488817632,
0.2633271515,
0.0669287518,
0.2377875,
-0.3906365931,
-0.1816050261,
0.2042835951,
-0.1243237555,
0.0286706612,
0.3220614791,
0.1909098625,
-0.1716929227,
0.1565609723,
-0.0259959642,
0.1394070983,
0.232599169,
0.133554548,
-0.3540168107,
0.0975813717,
0.1032649726,
-0.3816805482,
0.4530991614,
-0.1013764665,
-0.2259744853,
-0.0974101573,
0.1298207194,
0.1011131331,
-0.1546225846,
-0.1785897315,
-0.2162838727,
0.0639763623,
0.2628130615,
0.3670862615,
-0.2023705244,
0.0809103549,
0.3404195309,
0.2199297994,
-0.1081746444,
-0.3324357569,
-0.0261590648,
0.2252343148,
-0.1553072333,
-0.2981742322,
-0.024564065,
0.4082882702,
-0.1921357661,
-0.2038393319,
0.2058957666,
0.1627077311,
0.1013165638,
-0.2682018578,
0.2445405871,
0.0725818276,
-0.0229114275,
0.2189583629,
0.1548794955,
0.1265120953,
-0.2247429788,
-0.1205232069,
0.6013138294,
0.0204221867,
0.1298078895,
-0.1672375351,
-0.2604887486,
0.0164147131,
-0.0084770191,
0.1057501063,
-0.1996716857,
-0.1569325626,
0.1319084913,
0.5416611433,
0.1203986928,
0.0175663978,
0.3351604342,
0.3188401461,
0.0951515809,
0.0220058728,
0.0444788001,
-0.0942571238,
-0.3260903656,
0.0667860806,
0.2325779349,
0.5157184005,
0.0600492023,
0.0977213979,
-0.0077188578,
0.0021701318,
-0.0910497457,
-0.0255523156,
-0.196142748,
-0.0521436632,
-0.0367580391,
0.4138730168,
-0.1103312895,
-0.002925683,
-0.0147616882,
0.2290461212,
0.042155683,
-0.1423853636,
0.1586479545,
-0.1542544663,
0.4265766442,
0.0226103291,
-0.196833685,
0.0263902415,
-0.3279196024,
-0.1847744435,
0.3959238827,
0.0174628384,
0.0593910366,
-0.2548632324,
-0.2206835747,
-0.0935521796,
-0.3701072931,
-0.2463575006,
-0.1462762505,
-0.1450056881,
-0.0577528067,
0.1283845156,
0.0363080874,
0.0114307655,
-0.1244663671,
-0.1121078506,
-0.2261990011,
-0.1451640129,
-0.0095192669,
-0.0953242257,
0.1750873029,
-0.1545365751,
-0.1427366585,
-0.2333956361,
0.0803033561,
0.2684291005,
-0.4073775113,
-0.1769206524,
0.0594679266,
0.066197224,
-0.0847534388,
-0.0148557825,
-0.0339588635,
-0.12698479,
-0.0625396073,
0.1935478598,
0.114077121,
0.1619167328,
0.2994752526,
0.1833603829,
-0.1050817519,
0.055390209,
-0.0250175428,
-0.2818130851,
-0.5573965311,
0.4793078005,
-0.1213013828,
-0.13592875,
-0.1377430558,
-0.1052191034,
-0.1139262766,
0.4554575682,
-0.4010348916,
-0.3724503219,
-0.1838819832,
0.7493661642,
0.1569764912,
-0.2589913011,
0.3056099713,
-0.0359725654,
-0.0486656316,
-0.3839780092,
-0.4920692444,
0.0787428245,
0.0907914937,
0.1645448059,
0.3155911267,
0.1497923881,
0.0306624882,
0.6485081911,
0.3672060668,
-0.5198047757,
0.1849377602,
0.114414826,
0.0605882257,
-0.2385768741,
-0.2028325349,
0.0684990659,
-0.0570873059,
0.0549392588,
0.0277934987,
0.1705169082,
-0.1979387403,
-0.0563585982,
0.0082003083,
-0.4241655767,
-0.2546488941,
0.0549190193,
-0.1802774668,
0.1450088173,
0.1576443166,
0.540212214,
-0.5638545156,
-0.2608461976,
-0.0840079561,
-0.1469847262,
0.4131499827,
-0.003047036,
-0.1599493474,
0.1042480394,
-0.5813407898,
0.2441464067,
0.2578114867,
0.4286162257,
0.0103086252,
-0.250634104,
-0.0666310117,
-0.1764101535,
0.6912647486,
-0.3723667264,
0.3657489717,
0.1586534381,
-0.286098063,
-0.1351652145,
0.0938553438,
0.1436182559,
0.4348353744,
0.2767707407,
0.4428014457,
0.0248645525,
0.0345344283,
-0.4122461081,
0.1908982396,
0.1467838138,
-0.3810135126,
0.039904207,
-0.0570166558,
0.0375573784,
-0.0139249638,
-0.0007095552,
-0.0355663523,
0.116412878,
-0.0657848045,
-0.2098458409,
-0.0593208559,
-0.0356935412,
0.1662431955,
0.3373843133,
-0.1243241951,
0.4503377974,
0.2648328841,
0.0393720269,
0.1747861356,
0.3328949809,
-0.2801234126,
-0.071472913,
0.0364913717,
-0.0183323324,
-0.4278532267,
0.2911985517,
-0.0283841938,
-0.1242712289,
0.1225307733,
-0.1620350927,
-0.2004362941,
-0.0610877313,
-0.0016107991,
0.1703390032,
-0.2793622613,
-0.398588568,
0.3386237919,
0.2086580396,
-0.2586712539,
0.4416550994,
-0.4692288339,
-0.2223709673,
0.2586467862,
0.0358687788,
0.731888175,
-0.005674067,
0.041048225,
-0.1770727634,
0.1144517586,
0.0789119005,
0.2711602151,
0.1049432531,
-0.2402561158,
-0.1876769811,
-0.0092201382,
-0.2877558172,
-0.1540105194,
0.2329740077,
-0.1195450872,
0.1933394521,
-0.0417329408,
0.2885504961,
-0.1315220147,
0.0426812544,
0.311843276,
-0.1785062104,
0.0495073721,
0.2562744915,
0.1575479358,
0.1241149455,
0.1757339984,
-0.1128953248,
-0.2318653762,
-0.0293924753,
-0.0495290495,
0.2238518298,
-0.2507466972,
0.1634992212,
0.3992064893,
-0.1099405661,
-0.0457474403,
0.1972942948,
0.1955132633,
-0.1601490527,
-0.1594214737,
0.0701934025,
0.5374313593,
0.5143432617,
0.1620692015,
-0.2692705691,
0.1341718733,
0.1177023351,
-0.1141172796,
-0.0029684582,
-0.2186569721,
-0.4194806814,
-0.4274717569,
0.4585963786,
-0.178695336,
-0.091056861,
0.0561780035,
0.0380991697,
-0.1602011621,
-0.2128255665,
0.1468646824,
0.4549054503,
-0.0084844064,
0.4117092192,
-0.3164346516,
-0.4244235456,
-0.0558572933,
0.6185295582,
0.0067499359,
-0.0059222616,
0.274557054,
-0.151873067,
-0.1935258359,
-0.1522215903,
-0.0812070966,
-0.0981323868,
-0.183826834,
0.1221012175,
-0.2068579048,
0.0334937759,
0.1912763119,
0.0764886662,
-0.107012935,
0.0514529757,
0.0940713063,
-0.314578712,
-0.3586001694,
-0.2865385711,
-0.1192838997,
0.0751465857,
0.0204633102,
0.0201292802,
-0.1731525511,
0.1843705773,
-0.307595253,
0.1953533441,
0.0486659445,
0.1511594057,
-0.067631416,
0.024493577,
0.2342052907,
-0.1014935225,
0.0653534234,
0.296626538,
-0.4868950248,
-0.1978290081,
-0.0859410837,
0.0984236076,
0.1603195667,
-0.3084258139,
-0.2210444361,
0.0730676204,
0.0260120053,
-0.3968370259,
0.1147621199,
0.3971935809,
-0.0930371657,
0.0394122712,
0.2210759223,
0.0330359712,
0.2822136879,
0.0811035857,
-0.1412059814,
-0.0174496081,
-0.2394854575,
0.4071968496,
0.0115409475,
0.0936814994,
0.1150144041,
-0.0725815147,
0.0130646024,
0.1561981738,
0.3188044429,
-0.2088094801,
0.1460628211,
0.2720404565,
-0.0210022014,
0.099156253,
-0.1421117932,
-0.2073836625,
0.0905691311,
0.2281892896,
-0.1084202453,
-0.3000616133,
0.2749612331,
0.3501658738,
0.1976898462,
0.2313383669,
0.148308143,
-0.3277176321,
0.0152882459,
0.0505021475,
0.2985062003,
-0.4591920972,
0.076479286,
0.3280449212,
0.0891294926,
0.052409295,
0.4079289138,
0.1885535717,
-0.1231070384,
0.5156190395,
0.1662664413,
0.3609535694,
0.1295761615,
0.0065987566,
-0.3069340289,
-0.3739161491,
0.2956989408,
0.4503545463,
-0.1907431632,
0.4241831601,
0.0941930115,
0.4521612227,
-0.1431518644,
0.0689197853,
-0.15111278,
0.0292264856,
-0.1320527941,
-0.3104881644,
-0.0372123532,
-0.2018022239,
-0.0473300107,
-0.022768829,
-0.1573489755,
-0.1471767426,
0.5516812801,
0.1396968216,
-0.0499926992,
-0.2155193686,
-0.211092785,
-0.1398016065,
0.256757319,
-0.2433971763,
0.2725438178,
-0.1611988991,
-0.2117677629,
0.331050545,
-0.0004945045,
0.498917222,
0.4054945111,
-0.110027954,
0.2431411296,
0.0602776706,
-0.0311460644,
-0.193577677,
0.3610596061,
-0.20139727,
-0.364464432,
0.165001139,
0.0926772207,
-0.1243261471,
0.1485502571,
-0.0291018169,
0.4075522423,
-0.0851995051,
0.4404505789,
-0.219704926,
-0.0276351515,
0.0327810869,
0.1033012271,
0.0732940286,
-0.2911803722,
0.2661933303,
-0.2161591798,
0.3363656998,
0.0062044021,
0.0738164783,
-0.2708986998,
0.2704452872,
0.1943824291,
-0.2012421191,
-0.2543031275,
0.1683092713,
-0.3071584105,
0.2279296368,
-0.3463424742,
0.1618326902,
-0.2017130107,
0.2006844133,
-0.1722094715,
-0.101690948,
0.1518747061,
0.066699259,
0.0349066556,
0.5869482756,
-0.3466870785,
0.0923065096,
-0.1860401332,
0.0260116756,
0.2473445088,
-0.5080568194,
0.1658553481,
-0.002565895,
0.233171314,
-0.1004931405,
-0.1682336181,
0.0455016382,
0.3093849123,
0.7304588556,
0.4056194425,
0.1935493499,
-0.088354826,
-0.0779429227,
-0.3839722276,
0.0255016349,
-0.0938609391,
0.0507300757,
-0.1061783731,
0.2416702658,
-0.3015610278,
-0.0677379072,
-0.1308731437,
-0.0311057307,
-0.025161881,
-0.2683727145,
-0.0927089155,
0.0900271013,
-0.348929882,
0.0666240901,
-0.0877955407,
0.4083448648,
-0.0043659322,
0.2360657603,
-0.2845377922,
-0.143473357,
0.3450119793,
-0.6891121268,
-0.2317653894,
-0.0496695973,
0.0711978152,
-0.2536229789,
-0.289178431,
-0.3151980937,
-0.0735289827,
0.287966013,
0.0570951141,
-0.1766725332,
-0.1481706351,
-0.2677886486,
-0.0275817364,
-0.0750875846,
0.0656818822,
0.1789172292,
-0.2208768278,
0.260250926,
-0.0672305971
] |
https://github.com/huggingface/datasets/issues/3040 | [save_to_disk] Using `select()` followed by `save_to_disk` saves complete dataset making it hard to create dummy dataset | Hi,
the `save_to_disk` docstring explains that `flatten_indices` has to be called on a dataset before saving it to save only the shard/slice of the dataset. | ## Describe the bug
When only keeping a dummy size of a dataset (say the first 100 samples), and then saving it to disk to upload it in the following to the hub for easy demo/use - not just the small dataset is saved but the whole dataset with an indices file. The problem with this is that the dataset is still very big.
## Steps to reproduce the bug
E.g. run the following:
```python
from datasets import load_dataset, save_to_disk
nlp = load_dataset("glue", "mnli", split="train")
nlp.save_to_disk("full")
nlp = nlp.select(range(100))
nlp.save_to_disk("dummy")
```
Now one can see that both `"dummy"` and `"full"` have the same size. This shouldn't be the case IMO.
## Expected results
IMO `"dummy"` should be much smaller so that one can easily play around with the dataset on the hub.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.2.dev0
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 5.0.0
| 25 | [save_to_disk] Using `select()` followed by `save_to_disk` saves complete dataset making it hard to create dummy dataset
## Describe the bug
When only keeping a dummy size of a dataset (say the first 100 samples), and then saving it to disk to upload it in the following to the hub for easy demo/use - not just the small dataset is saved but the whole dataset with an indices file. The problem with this is that the dataset is still very big.
## Steps to reproduce the bug
E.g. run the following:
```python
from datasets import load_dataset, save_to_disk
nlp = load_dataset("glue", "mnli", split="train")
nlp.save_to_disk("full")
nlp = nlp.select(range(100))
nlp.save_to_disk("dummy")
```
Now one can see that both `"dummy"` and `"full"` have the same size. This shouldn't be the case IMO.
## Expected results
IMO `"dummy"` should be much smaller so that one can easily play around with the dataset on the hub.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.2.dev0
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 5.0.0
Hi,
the `save_to_disk` docstring explains that `flatten_indices` has to be called on a dataset before saving it to save only the shard/slice of the dataset. | [
-0.1809477359,
-0.1576081365,
0.0806470141,
0.2456984222,
0.1063633189,
0.1908272207,
0.2535611093,
0.4150107503,
0.0799368545,
0.4557602108,
0.1509388089,
0.3872535527,
-0.1541717201,
0.0044502676,
0.099456884,
0.0693321601,
0.1867137104,
0.1767671108,
0.0718551874,
-0.2415307164,
-0.3384588957,
-0.0049716197,
-0.2006051987,
-0.2561906874,
-0.5940173864,
-0.1241070852,
-0.2723130584,
0.3448467255,
-0.2400342822,
-0.0883388668,
0.2154427469,
-0.2062247694,
-0.0196471568,
0.3707506061,
-0.0001124717,
-0.0168187059,
0.3227281868,
-0.1523151845,
-0.5344424248,
-0.0364096649,
-0.1071836576,
-0.297100246,
-0.0003249286,
-0.3562373221,
0.1194448993,
0.260040462,
0.0269446541,
-0.0901064426,
0.0172027517,
0.0128553323,
0.2195396423,
0.378795743,
-0.2591152191,
-0.2375460863,
0.145840168,
0.2124075145,
-0.290045172,
0.3401021063,
-0.0082982406,
0.0553626344,
0.0736974403,
0.0374354236,
-0.1037890911,
-0.2042679489,
-0.0221333653,
0.2229928523,
0.083785221,
-0.4117186368,
0.1977330446,
0.1641881466,
0.2704135478,
-0.3860104978,
-0.291524142,
-0.3839524984,
0.0568630062,
-0.1729198247,
0.0673256442,
0.3428151906,
0.0564065203,
0.0414406694,
-0.0169605818,
0.0706528798,
-0.0531343743,
0.0719646439,
0.1494863629,
0.0740208551,
0.0289726686,
0.142262876,
0.2648313642,
0.0623219199,
0.0208592359,
-0.4156862199,
-0.0609488077,
-0.0203199107,
-0.3361837566,
-0.273612231,
-0.028788507,
-0.1164758503,
0.2221482545,
0.1423022747,
0.0341675207,
-0.0448519364,
0.1295351237,
0.0894864276,
0.1833872348,
0.3511478305,
-0.0091151381,
0.2439830154,
0.2207397521,
-0.0590821095,
0.2513431907,
0.1189330593,
-0.036438331,
-0.0207999777,
0.2362941056,
-0.1164126545,
0.1002892107,
-0.0884995237,
-0.4727648199,
0.1567941457,
-0.0143858017,
0.180195272,
-0.1108019873,
0.2001824975,
-0.0485559404,
-0.1313426048,
-0.1518022865,
0.3641741276,
-0.3945654333,
0.1070973203,
-0.2818075716,
0.0034416106,
0.0790929198,
-0.0707913041,
0.139357388,
-0.1525520682,
0.1456284076,
0.1426641047,
0.0012436038,
0.2042501867,
0.2205500454,
-0.3194164932,
0.1457874775,
0.3391512334,
0.2245104164,
0.1646437645,
-0.0240246691,
-0.5527132154,
-0.1925446093,
0.3616392016,
-0.0139212003,
-0.2650311589,
-0.2030188143,
0.1908951551,
-0.0774476677,
0.0934448317,
-0.2279698849,
0.224233523,
0.1070293263,
0.0205885973,
0.0771217123,
-0.049975995,
-0.1576579958,
-0.4104118347,
0.2029601634,
0.2047046423,
-0.3116408288,
0.1689976603,
-0.009134708,
0.090145871,
0.2009030581,
0.2160712183,
-0.0251561496,
0.124770157,
-0.1635745019,
0.4801804423,
0.2066600919,
-0.0120372288,
-0.6134501696,
-0.0278498754,
-0.1356237531,
0.0737615004,
-0.0404503345,
0.2520148456,
0.1007738337,
0.0652426258,
0.1290012002,
0.3021898866,
0.0169160012,
-0.0766482055,
-0.5265501738,
-0.1743296832,
0.0576393045,
0.1135145426,
-0.0811973587,
0.0534859896,
0.0205380209,
0.1681552529,
0.3211289048,
0.0329173431,
0.1902282834,
0.2687306702,
0.2511720657,
-0.5698817968,
-0.004440926,
-0.1871610135,
-0.3816386163,
0.2123249322,
-0.099760212,
0.0296601802,
0.1844378412,
-0.369911015,
-0.4125837982,
-0.0485575646,
-0.0925687477,
0.027584631,
0.0951023623,
-0.0448909961,
0.2003565133,
0.0263498984,
-0.0641914457,
0.0739021972,
-0.2241148949,
-0.1007085219,
-0.5723360181,
0.3845408261,
-0.1050580293,
-0.3537459075,
-0.0058924388,
0.1754181832,
0.1860028952,
-0.1179626957,
-0.1333576739,
0.3074070811,
-0.0640339181,
0.0244822428,
-0.0390251614,
-0.0326380059,
0.118722491,
0.0773052499,
0.136489138,
0.2566509843,
0.2901671827,
-0.0358008333,
-0.4762174189,
0.225645259,
-0.2718871236,
-0.0681957677,
-0.1276808977,
-0.0561305769,
0.0809246153,
-0.0691311806,
-0.0378524475,
-0.2077890635,
0.0562361218,
0.2686212957,
0.0495256074,
-0.0954030529,
-0.2391554415,
0.1801362932,
0.3591175675,
-0.2072416097,
0.3417237103,
0.2792400122,
-0.192831859,
-0.145322293,
0.0338281915,
-0.0260972362,
0.5663651824,
0.1432141066,
0.1267021894,
-0.1102958247,
-0.2060813606,
-0.1857476085,
0.2950299084,
0.1248135194,
-0.1738294512,
0.3017814755,
0.094179213,
-0.0765596181,
-0.3963547647,
0.4122895002,
0.063392505,
0.1480906308,
-0.043510545,
-0.0700093657,
-0.2579235733,
0.0369155593,
0.0873149559,
-0.0427788831,
-0.1553039402,
-0.2956055999,
0.0584961697,
0.5243615508,
-0.1894661784,
-0.0053955005,
0.0184224918,
0.4486207068,
0.149834007,
0.0209982451,
-0.0243955329,
0.1089819893,
-0.3649989963,
0.0884361416,
0.0903602764,
0.3224535584,
0.3313817084,
-0.0400640331,
-0.017203046,
-0.1452058405,
-0.1694862545,
-0.0037443356,
-0.1928979158,
0.5611335039,
0.0071932119,
0.1484982669,
-0.2511812449,
0.115736343,
0.069509238,
0.1207406595,
-0.1740408689,
0.2399409115,
0.0645513386,
-0.1891048253,
-0.2574209273,
-0.3324153721,
-0.3096140623,
-0.2162970304,
0.1370681971,
-0.0024602534,
0.1374368817,
0.1419250965,
0.2257584482,
0.0039064209,
0.1730032265,
-0.3041784763,
-0.4262358546,
-0.2583121955,
0.3981925547,
-0.167457059,
-0.4312323332,
-0.1307578683,
-0.4120433927,
-0.2913596332,
-0.2491650134,
-0.5085939169,
-0.2731797099,
-0.2647987008,
0.0767692477,
-0.1012892351,
0.187630266,
0.4329631925,
-0.1366916597,
0.0072904271,
-0.1077184677,
-0.3787582219,
0.1094162837,
0.6233229041,
0.3391465247,
-0.1750592142,
0.0740102679,
0.1227031052,
0.2648211718,
0.5041716099,
0.1349873394,
0.3246049583,
-0.0258421097,
0.3386651576,
-0.4063772261,
-0.3055651784,
0.0249320436,
-0.041892264,
-0.2154118419,
0.1660751849,
-0.0301102959,
-0.069169946,
0.2206512541,
-0.1432864219,
0.081459105,
-0.2529397607,
0.3132169545,
0.1326018274,
-0.1145996973,
0.2171046138,
0.1298073083,
-0.1466991305,
-0.092449151,
-0.0596535914,
-0.0149531122,
0.2518317997,
-0.1223998293,
-0.3494617641,
-0.0305579677,
-0.5364785194,
0.1057079136,
0.0913764611,
0.254711926,
0.0619191192,
-0.1321659088,
0.1232501641,
0.1737635583,
0.7487337589,
-0.3830306232,
-0.1494967937,
0.4169184566,
0.1381317675,
-0.7982854247,
0.0575979687,
-0.1115962863,
0.2796198726,
-0.0188443027,
0.5624132156,
-0.3875040114,
0.02867366,
0.2027666122,
0.6242922544,
-0.3589978814,
-0.0400696285,
-0.4204894602,
-0.1594789773,
-0.2356950194,
0.1196844205,
-0.0885521099,
0.2565667927,
-0.023867175,
-0.045039732,
-0.2402860224,
-0.3563105464,
0.0010795648,
0.062560074,
0.5620771646,
-0.0567642637,
0.4440244436,
-0.0562132224,
0.0430622548,
-0.1025872678,
0.6471171379,
-0.1021838412,
0.432754457,
0.4237677157,
0.0417120196,
0.1847351342,
0.5298868418,
0.045030944,
-0.0304078255,
-0.3260043263,
0.1231076419,
-0.5695061684,
-0.0585682206,
-0.099351719,
-0.1511336714,
-0.1814299524,
0.0456904061,
0.6157162189,
-0.1315005422,
0.0154292267,
0.1288128644,
0.1516505927,
-0.0286627896,
0.5707926154,
0.0881616622,
1.1782710552,
0.3131985366,
0.3699628115,
0.1177923158,
0.0507808439,
0.0212138668,
-0.0068733618,
0.2866964936,
-0.4577910602,
-0.3875792623,
0.0947744325,
-0.1678438634,
-0.1779950112,
-0.05195871,
-0.3754061162,
0.1628260016,
-0.3178019226,
0.1625179797,
-0.1886519045,
0.1858725101,
-0.4348307848,
-0.2814212143,
0.2553522885,
0.1592427492,
0.3182494342,
0.0128465211,
0.1656563878,
-0.0924282745,
-0.3148302436,
-0.0511696674,
0.022616107,
0.0638061017,
-0.1000802666,
0.2999179959,
-0.1963308454,
-0.3779586554,
-0.157782346,
-0.0385746472,
0.2812704146,
0.3799581528,
-0.1203442737,
0.0121730631,
-0.047869321,
0.2907901108,
0.0342937708,
-0.0870368853,
0.1427010298,
0.0566704273,
-0.146966666,
-0.2320015132,
-0.10314513,
-0.0228882506,
-0.2370212674,
0.1162387505,
0.1313957274,
-0.380351454,
-0.5229945183,
-0.101129733,
-0.0589086562,
-0.4026411772,
0.1399395466,
0.1338288635,
0.0267897118,
0.4578517675,
-0.0486168936,
-0.2966030836,
-0.1447482556,
0.4509500563,
0.2740955949,
0.1987801194,
0.3091101348,
-0.4451044798,
-0.0925830975,
-0.2365521193,
0.4965575039,
-0.0805006474,
-0.2603075504,
0.3644474447,
-0.313167125,
-0.108623527,
-0.3194173276,
0.0120782899,
0.208535552,
-0.0112861805,
-0.3115013838,
-0.1851550937,
-0.1335434914,
0.0975210443,
0.4229350388,
0.5104904771,
-0.0483297594,
-0.2013483047,
-0.1808378398,
0.1785979718,
-0.3403319716,
0.0763822719,
-0.2580952048,
0.3104305267,
-0.137606293,
-0.0335191414,
0.1994761527,
-0.3177558184,
0.0867850035,
0.3904882967,
-0.0539994463,
-0.2859568596,
-0.2714771926,
0.1172495559,
0.0988239497,
-0.1296178252,
0.0511491373,
-0.0415945984,
-0.1027731597,
-0.1664251983,
0.151311785,
0.0963199735,
-0.0583715215,
-0.1134267673,
0.3103182018,
0.0150184436,
-0.0042591998,
0.023488557,
-0.0143243028,
0.0759175941,
-0.0831727609,
0.1803320944,
-0.0766086504,
-0.0453168452,
-0.2456580848,
-0.1442174017,
0.0304531436,
-0.0682623386,
0.0702976286,
-0.0220587663,
-0.0885244459,
-0.0584609397,
0.2393392473,
0.2604291737,
-0.2250256091,
-0.2046168596,
0.2988016903,
0.2291154116,
-0.1005343273,
-0.380171597,
0.1059649214,
-0.0016033163,
0.0258462746,
0.1255934834,
0.3103978038,
0.2229637057,
-0.3913895786,
-0.0024974067,
0.1341860592,
0.0258832164,
-0.0575405844,
0.4859195352,
-0.1678514779,
-0.0102594113,
0.2023154497,
-0.1704941541,
0.2492600828,
0.4352078438,
0.0031863907,
0.6322430968,
0.2608596981,
-0.2142752856,
0.0206693579,
-0.2657681108,
0.1107869297,
0.0230849981,
-0.1611044407,
0.3072736561,
0.1522924304,
0.1689440012,
-0.4930610061,
-0.153300941,
-0.247542575,
0.072549656,
-0.3863578141,
-0.0514459945,
-0.0118378885,
-0.160731703,
-0.0872623622,
-0.010184817,
-0.1773579121,
-0.2896556854,
0.1582285911,
0.0966655165,
-0.0999082625,
0.1507339776,
0.0207896139,
0.2822015882,
0.0694750473,
-0.2553137541,
-0.0089147165,
0.2264514267,
-0.0189556703,
-0.3264178634,
0.4958035946,
0.4173718691,
0.1717552096,
-0.3538122177,
0.0078305081,
0.3738970757,
-0.0193417184,
0.0071273907,
0.2081496865,
-0.0421569198,
-0.018652387,
0.3376021981,
0.1107174382,
-0.2440148145,
-0.1172347888,
0.2153044641,
0.0772762597,
-0.420864284,
0.1925816536,
-0.009911906,
-0.1690267175,
-0.0580359772,
-0.0772352964,
-0.15349482,
0.0126072783,
0.5117273927,
-0.0804462656,
0.2956420183,
-0.2919514775,
0.0998161286,
-0.2134508044,
0.5274794698,
0.0591415651,
-0.4227952063,
-0.3538607359,
0.1241680905,
-0.384100467,
0.057320606,
-0.1013676301,
0.111302942,
0.1745750308,
0.306127727,
-0.1675700545,
0.2242739499,
-0.1469130516,
0.2012253106,
0.1111476645,
0.4832468331,
-0.2242997736,
0.0126091167,
-0.0583072826,
-0.1336647123,
0.0774925351,
-0.7374879718,
0.2606674433,
0.0105388826,
0.0876937285,
0.0246487856,
-0.0173897464,
0.1334175766,
0.5097459555,
0.4941402078,
0.1809927225,
0.1563747823,
-0.2964326441,
-0.061643336,
0.0185774788,
0.0613658503,
-0.1375252753,
-0.0363749899,
0.15546529,
0.4584282339,
-0.1845623404,
0.0241630189,
-0.0279045068,
-0.042900756,
0.0302222129,
0.1493430436,
-0.1393085271,
0.1515066773,
-0.157907635,
0.2534411252,
0.2148882449,
0.3549883962,
-0.0858425051,
0.2823911905,
-0.0821098238,
-0.458619833,
0.4106899202,
-0.0069834557,
-0.208160609,
-0.110854663,
0.2499195635,
0.1845492423,
0.0271281675,
-0.2440758198,
-0.1402784884,
0.2432591766,
-0.133751303,
0.0152329421,
0.3717365563,
-0.0097359838,
-0.0666853935,
-0.0250496306,
0.5816613436,
0.1238984838,
-0.2844816744,
0.4945061207,
-0.5318924785
] |
https://github.com/huggingface/datasets/issues/3040 | [save_to_disk] Using `select()` followed by `save_to_disk` saves complete dataset making it hard to create dummy dataset | That works! Thansk!
Might be worth doing that automatically actually in case the `save_to_disk` is called on a dataset that has an indices mapping :-) | ## Describe the bug
When only keeping a dummy size of a dataset (say the first 100 samples), and then saving it to disk to upload it in the following to the hub for easy demo/use - not just the small dataset is saved but the whole dataset with an indices file. The problem with this is that the dataset is still very big.
## Steps to reproduce the bug
E.g. run the following:
```python
from datasets import load_dataset, save_to_disk
nlp = load_dataset("glue", "mnli", split="train")
nlp.save_to_disk("full")
nlp = nlp.select(range(100))
nlp.save_to_disk("dummy")
```
Now one can see that both `"dummy"` and `"full"` have the same size. This shouldn't be the case IMO.
## Expected results
IMO `"dummy"` should be much smaller so that one can easily play around with the dataset on the hub.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.2.dev0
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 5.0.0
| 25 | [save_to_disk] Using `select()` followed by `save_to_disk` saves complete dataset making it hard to create dummy dataset
## Describe the bug
When only keeping a dummy size of a dataset (say the first 100 samples), and then saving it to disk to upload it in the following to the hub for easy demo/use - not just the small dataset is saved but the whole dataset with an indices file. The problem with this is that the dataset is still very big.
## Steps to reproduce the bug
E.g. run the following:
```python
from datasets import load_dataset, save_to_disk
nlp = load_dataset("glue", "mnli", split="train")
nlp.save_to_disk("full")
nlp = nlp.select(range(100))
nlp.save_to_disk("dummy")
```
Now one can see that both `"dummy"` and `"full"` have the same size. This shouldn't be the case IMO.
## Expected results
IMO `"dummy"` should be much smaller so that one can easily play around with the dataset on the hub.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.2.dev0
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 5.0.0
That works! Thansk!
Might be worth doing that automatically actually in case the `save_to_disk` is called on a dataset that has an indices mapping :-) | [
-0.197787419,
-0.1849525869,
0.0728686303,
0.2110226601,
0.1640472859,
0.1720052212,
0.2364407331,
0.4040087163,
0.1711795777,
0.4311820567,
0.1333653331,
0.4044635594,
-0.1757007092,
-0.0216431208,
0.1236590296,
0.0688508749,
0.1950651854,
0.1609197855,
0.0407716408,
-0.2092080414,
-0.3665637374,
-0.0393784642,
-0.2007808387,
-0.2394997329,
-0.567910552,
-0.1390290409,
-0.2600001991,
0.3170098662,
-0.2239507586,
-0.1409919858,
0.2029299736,
-0.1835679263,
-0.0130423792,
0.3703455329,
-0.0001100582,
-0.0377630293,
0.3083373904,
-0.147282064,
-0.5062394738,
-0.0701982751,
-0.0457463339,
-0.3110977709,
-0.0088480162,
-0.3288084269,
0.0949151218,
0.2151667923,
0.0791757181,
-0.0913619772,
0.0012332051,
0.0505698845,
0.2513640523,
0.4108481407,
-0.2465483695,
-0.2575870156,
0.1223163828,
0.1864283234,
-0.3110146523,
0.3966169655,
0.0498436503,
0.0242473334,
0.0749576092,
0.0207487512,
-0.0738475248,
-0.2160372585,
0.0505219623,
0.1869022995,
0.0945415199,
-0.397811383,
0.1829333454,
0.1901505291,
0.269526422,
-0.390919596,
-0.2869185805,
-0.3718159795,
0.0727201253,
-0.1521386057,
0.0992844924,
0.3473536074,
0.0420130454,
0.0252482537,
0.0034334797,
0.0928488448,
-0.0706308186,
0.0694203153,
0.1227565259,
0.1449011564,
0.0458700471,
0.1241286695,
0.2717333436,
0.0736975968,
-0.0033491114,
-0.3851346374,
-0.089863874,
-0.0056836121,
-0.3101034164,
-0.2732905149,
-0.0305431094,
-0.106717512,
0.1926317811,
0.1444735825,
0.0142678311,
-0.0591374673,
0.1108087152,
0.0905302241,
0.1713720262,
0.3588756323,
-0.0566960759,
0.2353722602,
0.2473843247,
-0.0384708829,
0.2235187292,
0.1161128059,
-0.0470465347,
-0.0591055267,
0.2131264806,
-0.1278301477,
0.0539077558,
-0.0707074776,
-0.4778516293,
0.1104314104,
-0.0428477786,
0.232013166,
-0.049619671,
0.2169023156,
-0.1059911698,
-0.1307789981,
-0.127258122,
0.3900386989,
-0.3908437788,
0.1520229429,
-0.274540633,
0.0693814829,
-0.0031490312,
-0.1155259088,
0.1257149726,
-0.1084946543,
0.1539539099,
0.136745289,
-0.0360459983,
0.1717464775,
0.2328799218,
-0.3360840976,
0.1397534758,
0.3224728107,
0.2309789062,
0.1605301052,
-0.0720769316,
-0.5434201956,
-0.19703798,
0.3449594378,
0.0451547652,
-0.2426752895,
-0.1659767032,
0.2179298997,
-0.0989997014,
0.0573850423,
-0.1879914105,
0.2307100445,
0.0449054539,
0.0413298458,
0.1090961844,
-0.008723259,
-0.1554274559,
-0.3899650872,
0.1429954767,
0.2101000845,
-0.2669970989,
0.1345272362,
0.0578437895,
0.0673972219,
0.1484010816,
0.1618484557,
-0.0336383134,
0.1785665005,
-0.1696214378,
0.4384044707,
0.2284028083,
-0.0879613683,
-0.6092963219,
-0.0444819219,
-0.1391688138,
0.038529072,
-0.021806119,
0.3064078391,
0.0780757368,
0.050004784,
0.1382080168,
0.339406848,
0.0300909504,
-0.0311815087,
-0.4885335863,
-0.1677112132,
0.0653205961,
0.111018531,
-0.0843688026,
0.0216206275,
0.0252538584,
0.1852715164,
0.323373884,
-0.0269018207,
0.1599856615,
0.2770003676,
0.2414499819,
-0.5311186314,
-0.0465841033,
-0.1805999726,
-0.2971188426,
0.2276286334,
-0.0435406379,
0.0396553241,
0.2141442299,
-0.3296994865,
-0.4157265127,
-0.0731681138,
-0.0965766758,
0.0023365573,
0.1209072694,
-0.0278385263,
0.1901721358,
0.0195099097,
-0.0420806184,
0.1634545773,
-0.1658806652,
-0.0654123574,
-0.5854560733,
0.3622557223,
-0.0986354351,
-0.3251304328,
-0.0199058317,
0.2262207568,
0.185797587,
-0.0878900588,
-0.1168788224,
0.3178602159,
-0.0640410259,
0.0493840724,
-0.040799655,
-0.0390559584,
0.1458156556,
0.096077621,
0.1351743937,
0.24772726,
0.2851670384,
-0.0157454461,
-0.4594494998,
0.2119686902,
-0.2450080216,
-0.0865966529,
-0.1098814681,
-0.0511473455,
0.0795152336,
-0.0634499192,
-0.0242460333,
-0.1720591635,
0.0626820326,
0.3055987656,
0.1486764997,
-0.1058016419,
-0.239376843,
0.1272460669,
0.3296096921,
-0.1535169035,
0.3674603701,
0.2159529477,
-0.2434617877,
-0.1331488788,
0.0090647181,
0.0136438096,
0.5998479128,
0.1551800966,
0.0968210772,
-0.0777541921,
-0.2424420863,
-0.1839167029,
0.3035931587,
0.1049740389,
-0.1753927916,
0.279951036,
0.1332294345,
-0.0944039822,
-0.4330568612,
0.4002636373,
0.044456318,
0.1431970894,
-0.0320621841,
-0.0706117749,
-0.2251724303,
-0.0026554731,
0.0920100063,
-0.0347136334,
-0.1509563029,
-0.2977168858,
0.0549134761,
0.522366643,
-0.1731410325,
-0.0183338374,
0.0556409359,
0.424443841,
0.102465421,
0.0142149366,
0.0103435973,
0.11490006,
-0.376762867,
0.1110296175,
0.076408729,
0.2917807102,
0.4058228135,
-0.0029618568,
-0.0199716482,
-0.1476205736,
-0.1871914864,
-0.0304836147,
-0.1638305038,
0.539326489,
0.0278336573,
0.1262162626,
-0.1849326044,
0.141816631,
0.0625832975,
0.0791317374,
-0.1860048026,
0.2147680968,
0.0651811212,
-0.1725203991,
-0.2546777725,
-0.368653506,
-0.3149777949,
-0.2519777119,
0.1370451152,
0.0119560156,
0.11559093,
0.1756900102,
0.2255752981,
-0.0037888812,
0.2176190615,
-0.3331573606,
-0.4415975809,
-0.1903953999,
0.4190736711,
-0.2170313001,
-0.400356859,
-0.1111466363,
-0.4238251746,
-0.2446253449,
-0.2530267537,
-0.4782190323,
-0.3155087233,
-0.2766215801,
0.0851030126,
-0.1338306814,
0.1919115931,
0.43824929,
-0.1354263723,
-0.017596826,
-0.1220153868,
-0.3827523291,
0.0951116085,
0.6282551885,
0.350309968,
-0.1803290248,
0.0918852612,
0.1060122102,
0.1967718899,
0.4577824771,
0.1304448992,
0.3684524596,
-0.0855634585,
0.364356041,
-0.3971607983,
-0.2799606323,
0.0358189978,
-0.0419344231,
-0.1887224615,
0.1802529097,
0.0031998705,
-0.0961712077,
0.1562669128,
-0.1331105977,
0.0779603645,
-0.2264650911,
0.2782635391,
0.1463255882,
-0.1143361628,
0.2008071095,
0.1628315151,
-0.1916525811,
-0.0938442126,
-0.0413894914,
-0.0575703979,
0.1768811047,
-0.1282535493,
-0.3387624919,
-0.0174709149,
-0.5606279969,
0.0837528631,
0.0804558024,
0.2417681813,
0.0882856846,
-0.13386859,
0.107024692,
0.1541535109,
0.7228222489,
-0.4280397296,
-0.1478986144,
0.340498209,
0.1404435486,
-0.8127299547,
0.0442418866,
-0.1428529918,
0.2323116809,
0.0003928962,
0.5321724415,
-0.3729771674,
0.028595658,
0.1928725243,
0.5991675258,
-0.3339712024,
-0.0656811595,
-0.430362612,
-0.1756810993,
-0.2338773161,
0.1413045377,
-0.062781252,
0.2492394298,
0.0060526137,
-0.0623682775,
-0.2258177549,
-0.3498131037,
0.0382123925,
0.0609667711,
0.55157125,
-0.0633666366,
0.4256393313,
-0.0044271601,
0.0506949984,
-0.1012776569,
0.6451172829,
-0.0841756091,
0.40022403,
0.4024506211,
0.0143358745,
0.1915265322,
0.5243133903,
0.0416322723,
-0.0332528017,
-0.3735452592,
0.101941824,
-0.5634267926,
-0.0317429677,
-0.0432038456,
-0.1184215695,
-0.1595212519,
0.0474320203,
0.5589548349,
-0.1124963462,
0.0024968747,
0.1030810252,
0.0531939417,
-0.0923439637,
0.5225502253,
0.0709767714,
1.1548535824,
0.3087606132,
0.3722149432,
0.1405142248,
-0.0622696355,
0.0504613928,
-0.0114925057,
0.2785365582,
-0.4947852194,
-0.3721263409,
0.0932486057,
-0.1839610636,
-0.1846587211,
-0.0677687004,
-0.3726744652,
0.173751846,
-0.2960302532,
0.211984694,
-0.2042616308,
0.2162675858,
-0.4491692185,
-0.3010609448,
0.2105345726,
0.1896460652,
0.3072574735,
0.0273586251,
0.1459836513,
-0.1114543155,
-0.3036415577,
-0.0495394245,
0.0120309554,
0.0713012293,
-0.1306993365,
0.2538403571,
-0.1173932403,
-0.2654804587,
-0.1459044963,
0.0016226737,
0.3161194324,
0.4339924455,
-0.1295477897,
0.0505621918,
-0.0668365732,
0.3089133203,
0.056049414,
-0.0853100717,
0.1553390473,
0.0235212427,
-0.1304703057,
-0.2282552123,
-0.0949424282,
-0.0242409986,
-0.2433816493,
0.1189980656,
0.1585041732,
-0.376311183,
-0.4891942739,
-0.0734878927,
-0.0889070407,
-0.431909889,
0.1638014466,
0.0815358758,
0.0060107871,
0.4442102611,
-0.0502342321,
-0.3155353069,
-0.1545609534,
0.4635730088,
0.2439421564,
0.1516659856,
0.3063125312,
-0.4356896579,
-0.0899197161,
-0.2524777949,
0.5002033114,
-0.0479575843,
-0.307516247,
0.3464568853,
-0.2554531693,
-0.1594548374,
-0.271119833,
-0.0002376924,
0.2131695002,
-0.018430477,
-0.2652197778,
-0.1532483995,
-0.1614032835,
0.0983365253,
0.4643231928,
0.5141518712,
-0.1002373099,
-0.1800705045,
-0.1349266618,
0.1427492499,
-0.3694089949,
0.0561009496,
-0.2634811401,
0.2924920619,
-0.1930889487,
-0.0502482355,
0.1512786895,
-0.2871064544,
0.1238167211,
0.3887313604,
-0.0965285152,
-0.307207495,
-0.3118621409,
0.1091342047,
0.0875534564,
-0.139414683,
0.0802826509,
-0.0622634552,
-0.0947835371,
-0.1579847485,
0.1464648098,
0.1382684708,
-0.0886497125,
-0.1514694542,
0.334426254,
0.0406655148,
0.0014050904,
0.0290056858,
-0.0235266089,
0.0879178867,
-0.0561256707,
0.1207423806,
-0.0578136705,
-0.0506516434,
-0.2691153288,
-0.1308318973,
0.0603603721,
-0.0540591627,
0.0183842741,
0.0008675787,
-0.0946127325,
-0.0050968137,
0.2313622087,
0.2396615893,
-0.2201703489,
-0.20442155,
0.2731559575,
0.2640781999,
-0.1519223452,
-0.3821157813,
0.0271324608,
-0.0308025628,
0.0515457541,
0.1498183161,
0.3501367867,
0.2249655575,
-0.3444123864,
-0.0203999989,
0.0928899273,
0.0275614951,
-0.0859340206,
0.4808825254,
-0.1741733998,
-0.0250654295,
0.2029050291,
-0.1887079179,
0.2496870607,
0.4609404206,
0.0498565137,
0.5769592524,
0.3226022422,
-0.2096167058,
0.05181114,
-0.2173087597,
0.0714884177,
-0.0073368852,
-0.1882151514,
0.2788742483,
0.1452234685,
0.0970742181,
-0.5059453845,
-0.1578287333,
-0.2514891326,
0.0374030061,
-0.3890112042,
-0.0531579182,
-0.0133961234,
-0.1491643637,
-0.1776825637,
-0.0075393617,
-0.1759331822,
-0.3092544675,
0.0914037675,
0.0980002806,
-0.0601085052,
0.1318146139,
0.0221553501,
0.2740766108,
0.0931374952,
-0.2581168413,
0.0037713118,
0.204396829,
0.022789048,
-0.2904120088,
0.5170531273,
0.3962339163,
0.2130931467,
-0.3750289381,
0.0354312062,
0.3497942388,
0.0011052566,
0.0075412076,
0.1794517785,
-0.0100478595,
-0.0095331185,
0.3281480074,
0.1384392977,
-0.2661153376,
-0.0958694965,
0.169016242,
0.0417824723,
-0.4100736976,
0.2695994675,
0.0105424402,
-0.1675239205,
-0.1020683199,
-0.0544868149,
-0.185988009,
0.0306991264,
0.4977633655,
-0.0787632838,
0.30733639,
-0.3177348971,
0.11112082,
-0.1994870901,
0.5584349036,
0.0630297735,
-0.4028874636,
-0.3535842001,
0.1026218161,
-0.4144052267,
0.0523057804,
-0.1159278974,
0.0832906738,
0.1104107574,
0.2545323968,
-0.1922992617,
0.1907888055,
-0.1041580141,
0.2478057742,
0.1412973404,
0.4671542943,
-0.2515751421,
0.0284208674,
0.0008189307,
-0.0901524276,
0.0927394703,
-0.7554389238,
0.2302324921,
-0.0303729456,
0.10877233,
0.0340437666,
-0.0393409915,
0.0952222794,
0.5482965708,
0.5185004473,
0.1430144459,
0.1661333442,
-0.3044712245,
-0.053745281,
0.0101104975,
0.0525626503,
-0.1466846466,
-0.0370348729,
0.1525244862,
0.4427344501,
-0.136552453,
0.058002267,
-0.0036162238,
-0.064569287,
0.0783879682,
0.1560792476,
-0.1534878463,
0.1369893104,
-0.1419417858,
0.2594924867,
0.1812538356,
0.3957883716,
-0.0946054831,
0.2552423179,
-0.096176222,
-0.4792792499,
0.4116424322,
0.0308905728,
-0.245532915,
-0.1410211772,
0.2734681368,
0.2157456428,
0.0459428392,
-0.2321823239,
-0.1173624471,
0.2394469231,
-0.138857007,
-0.0153342383,
0.3777383864,
-0.0570620634,
-0.039327465,
-0.0236274004,
0.5280666351,
0.1247821152,
-0.2450129092,
0.4972432256,
-0.517300427
] |
https://github.com/huggingface/datasets/issues/3040 | [save_to_disk] Using `select()` followed by `save_to_disk` saves complete dataset making it hard to create dummy dataset | I agree with @patrickvonplaten: this issue is reported recurrently, so better if we implement the `.flatten_indices()` automatically? | ## Describe the bug
When only keeping a dummy size of a dataset (say the first 100 samples), and then saving it to disk to upload it in the following to the hub for easy demo/use - not just the small dataset is saved but the whole dataset with an indices file. The problem with this is that the dataset is still very big.
## Steps to reproduce the bug
E.g. run the following:
```python
from datasets import load_dataset, save_to_disk
nlp = load_dataset("glue", "mnli", split="train")
nlp.save_to_disk("full")
nlp = nlp.select(range(100))
nlp.save_to_disk("dummy")
```
Now one can see that both `"dummy"` and `"full"` have the same size. This shouldn't be the case IMO.
## Expected results
IMO `"dummy"` should be much smaller so that one can easily play around with the dataset on the hub.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.2.dev0
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 5.0.0
| 17 | [save_to_disk] Using `select()` followed by `save_to_disk` saves complete dataset making it hard to create dummy dataset
## Describe the bug
When only keeping a dummy size of a dataset (say the first 100 samples), and then saving it to disk to upload it in the following to the hub for easy demo/use - not just the small dataset is saved but the whole dataset with an indices file. The problem with this is that the dataset is still very big.
## Steps to reproduce the bug
E.g. run the following:
```python
from datasets import load_dataset, save_to_disk
nlp = load_dataset("glue", "mnli", split="train")
nlp.save_to_disk("full")
nlp = nlp.select(range(100))
nlp.save_to_disk("dummy")
```
Now one can see that both `"dummy"` and `"full"` have the same size. This shouldn't be the case IMO.
## Expected results
IMO `"dummy"` should be much smaller so that one can easily play around with the dataset on the hub.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.2.dev0
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 5.0.0
I agree with @patrickvonplaten: this issue is reported recurrently, so better if we implement the `.flatten_indices()` automatically? | [
-0.1824212819,
-0.1138091013,
0.0977014303,
0.3485226929,
0.1396681368,
0.2466376871,
0.2202671617,
0.4321454465,
0.0931755453,
0.4231398702,
0.2067134529,
0.4109373391,
-0.1631097049,
0.0241229497,
0.025754679,
0.0898382515,
0.1856224388,
0.1863040477,
0.1133499369,
-0.1867262721,
-0.3679890335,
-0.0346975327,
-0.2251637429,
-0.2867275774,
-0.5878717303,
-0.1352667958,
-0.2150023431,
0.24004893,
-0.2191438675,
-0.1255781651,
0.2466323078,
-0.1921942532,
0.0108561926,
0.394223392,
-0.0001180514,
-0.0306322705,
0.2950564027,
-0.1383219659,
-0.5959521532,
-0.0872454867,
-0.1021328717,
-0.3036231995,
0.0431588143,
-0.3366667926,
0.1549147367,
0.1752590537,
-0.0215227753,
-0.1752215773,
-0.0500186458,
-0.1098158807,
0.1773790866,
0.3541217744,
-0.2485179305,
-0.1996884942,
0.0963099375,
0.2606737316,
-0.291702956,
0.4178822041,
-0.0252496433,
0.0127563635,
0.0795758814,
0.0772190094,
-0.1269275099,
-0.2274493426,
0.0135579845,
0.1542256325,
0.2082128674,
-0.4271070063,
0.0888288915,
0.1758709848,
0.3514676094,
-0.4096344709,
-0.3287009299,
-0.4679723382,
0.1070840806,
-0.1454010159,
0.0790991485,
0.316313535,
0.1117238998,
0.028449066,
-0.0080435537,
0.0165638383,
-0.0406810716,
0.0566660725,
0.1716333032,
0.0803280696,
0.0659951866,
0.1112480536,
0.3244346678,
0.0607175976,
0.1576552689,
-0.4257391989,
-0.0498692319,
-0.0513874814,
-0.3459393978,
-0.3144321442,
-0.0646127164,
-0.2331476957,
0.2141070664,
0.1466631591,
0.0828900188,
-0.0512657538,
0.1039324924,
0.0972089469,
0.2802476585,
0.4042066634,
-0.0045048567,
0.2779262662,
0.2386251241,
0.0031676909,
0.3111637831,
0.1591967642,
-0.0543332137,
-0.0277817231,
0.2901398838,
-0.1067793593,
0.1079017073,
-0.0390053168,
-0.5261318684,
0.2403637171,
-0.0785611272,
0.1253744364,
-0.0990726054,
0.045020476,
0.0012915005,
0.046056848,
-0.129569605,
0.3285556436,
-0.3600682318,
0.1768579036,
-0.2048031986,
-0.0818336755,
0.1339151263,
-0.0262589846,
0.1351951063,
-0.1808651835,
0.0544020571,
0.1963544637,
0.0110337865,
0.1525796354,
0.2140339613,
-0.3012072742,
0.1547640115,
0.3042811155,
0.1646331847,
0.1646241546,
-0.0107295075,
-0.5549111962,
-0.2624775767,
0.4457952082,
-0.0471829474,
-0.2813358903,
-0.1600621641,
0.1427328587,
-0.0473379493,
0.1045618355,
-0.2495887578,
0.2826408446,
0.1285541058,
0.0049475715,
0.0937048644,
-0.0598871596,
-0.2070246786,
-0.3390339613,
0.118729189,
0.2781874239,
-0.3131507635,
0.1823759675,
0.0934567824,
0.1286164522,
0.1621203125,
0.2420837283,
-0.0059808972,
0.1465025097,
-0.1775265336,
0.346658349,
0.1117447689,
0.0016740438,
-0.6249180436,
0.0209836997,
-0.1478675902,
0.1297533661,
-0.0276125558,
0.2382245362,
0.103051424,
0.0496229455,
0.2067221254,
0.2870346308,
-0.0057134451,
-0.0930915326,
-0.5067903399,
-0.2917129695,
0.1325449347,
0.099612236,
-0.113261342,
0.1168390363,
-0.0541850813,
0.1527921408,
0.2984366715,
0.011578273,
0.1294955611,
0.2538181245,
0.2744989693,
-0.5812746286,
0.0073867911,
-0.1941846609,
-0.4004684985,
0.2022341937,
-0.0575534962,
-0.0334877521,
0.2077960819,
-0.4359387457,
-0.3548317552,
-0.0341036916,
-0.1060037687,
0.195334211,
0.0236696638,
-0.1109821871,
0.1759209037,
0.0710312948,
-0.0550089329,
0.0924752951,
-0.2118325382,
-0.0880595744,
-0.548093617,
0.3700672984,
-0.0334889702,
-0.2699526846,
-0.047756508,
0.2148385048,
0.2061793357,
-0.1658432931,
-0.121396102,
0.2399321198,
-0.0687813535,
-0.0206423365,
-0.0287741479,
0.0087206746,
0.2264527828,
0.136242196,
0.0890879482,
0.3028978705,
0.2653177977,
-0.0386851802,
-0.3866867125,
0.2356377542,
-0.332349807,
-0.0228698049,
-0.1523446888,
-0.0745194033,
0.0411554538,
-0.0315320715,
-0.0460962467,
-0.2976566851,
-0.005545157,
0.2622752786,
0.0386885256,
-0.088822104,
-0.2418412864,
0.1259612888,
0.2611568868,
-0.172554493,
0.3259114921,
0.322848171,
-0.1374327391,
-0.0832929686,
0.0070284107,
-0.0631353557,
0.5287132859,
0.0956826806,
0.0931684822,
-0.1179795265,
-0.1051545143,
-0.1470580846,
0.3237072527,
0.1603640318,
-0.125593096,
0.4035588503,
0.0890247151,
-0.0175056029,
-0.3983683288,
0.4373588562,
0.0874039382,
0.1574199945,
-0.0741251856,
-0.0384848341,
-0.2540960312,
0.0013751523,
0.0856673643,
-0.078027688,
-0.1355514675,
-0.2828028798,
0.0547018684,
0.5230622888,
-0.2340429425,
0.0045057512,
-0.0343559124,
0.5282374024,
0.192574963,
-0.0800620541,
0.0141673172,
0.1471464187,
-0.3374714851,
0.0165416729,
0.1492860764,
0.1304278672,
0.3169645667,
-0.0181376319,
-0.0124611426,
-0.1789823771,
-0.2209404558,
0.0149251716,
-0.1337040216,
0.4910605252,
-0.0371619016,
0.0739384443,
-0.25810197,
0.0902983025,
0.00658749,
0.1845213622,
-0.1270188838,
0.1990921795,
0.0488375276,
-0.1689407974,
-0.2667787969,
-0.3044625521,
-0.2898529172,
-0.1931368113,
0.1496865749,
-0.0794425085,
0.1808065027,
0.1349321306,
0.2245855331,
-0.1167481318,
0.1796951592,
-0.3212719262,
-0.4062311649,
-0.1991113871,
0.4217102826,
-0.1044513658,
-0.3260516524,
-0.2064414024,
-0.4594884515,
-0.3912558556,
-0.2283606976,
-0.559218049,
-0.2990947664,
-0.2514790297,
0.0949835777,
-0.1802689582,
0.2258628011,
0.3877162337,
-0.1121090129,
0.0381692499,
-0.034117505,
-0.3819510639,
0.117142655,
0.6907035708,
0.3149603903,
-0.1198199615,
0.0892531797,
0.1076899171,
0.1742886603,
0.5434102416,
0.1835005581,
0.3248948455,
0.0176826119,
0.3773003519,
-0.3554061353,
-0.2926698625,
-0.080960609,
-0.0957105607,
-0.2214937955,
0.1066003442,
-0.0360464565,
-0.0808964223,
0.2050727606,
-0.1333219111,
0.160214439,
-0.2450004667,
0.3051326275,
0.0476559587,
-0.0534453355,
0.1941942275,
0.1635786593,
-0.132560119,
-0.0716404319,
-0.0208082721,
-0.0727605,
0.3171847761,
-0.1577430665,
-0.2714570463,
-0.0345379226,
-0.5426715612,
0.0702623501,
0.1241419464,
0.3208674192,
0.1092439145,
-0.1156344712,
0.043919839,
0.2139386088,
0.7828252316,
-0.3001749516,
-0.1838086098,
0.3971944451,
0.1227712035,
-0.8086738586,
0.024592381,
-0.043934565,
0.2834563553,
-0.0196240712,
0.5932031274,
-0.4172537625,
0.0553240776,
0.2252284288,
0.636851728,
-0.3829863071,
-0.0947968438,
-0.3832218945,
-0.1333465576,
-0.1618804336,
0.1526978463,
-0.0431112945,
0.2766054571,
0.0114451228,
-0.0546575598,
-0.21883367,
-0.3485226333,
0.0150315426,
0.0159390103,
0.6031660438,
-0.0187091045,
0.4844659865,
0.0575881489,
0.0045239879,
-0.0450054184,
0.7048276067,
-0.2017773986,
0.3683921993,
0.4170515835,
0.0505178943,
0.1694313884,
0.6118105054,
0.0760289431,
-0.0298228972,
-0.3598350286,
0.1303037703,
-0.6441344619,
-0.2002433985,
-0.100205116,
-0.1447058916,
-0.2080736905,
-0.0280441549,
0.5999286771,
-0.0909953192,
0.0525142737,
0.1893043667,
0.1315829754,
-0.0119081,
0.5307200551,
0.0722279698,
1.1901855469,
0.3051144779,
0.3613094687,
0.0662945956,
0.0276924185,
-0.067888163,
-0.0441878326,
0.3134865165,
-0.4914529622,
-0.3777745068,
0.0865241289,
-0.2067348361,
-0.2523455918,
-0.0473744795,
-0.3430517018,
0.1909089088,
-0.3928705156,
0.1051851586,
-0.2111896574,
0.2170983553,
-0.5343676209,
-0.2500877976,
0.2916607559,
0.0778348222,
0.305941999,
0.0249234159,
0.13245897,
-0.1346537769,
-0.2430556267,
-0.0672191232,
0.0082265073,
0.014081724,
-0.1125350296,
0.372938633,
-0.2114052773,
-0.3990444541,
-0.0852202922,
-0.0908802897,
0.2647323608,
0.3548280001,
-0.1035377607,
-0.0971238092,
0.0130447159,
0.3168497086,
0.0239329394,
-0.086096622,
0.1526732147,
0.1343275309,
-0.0647122264,
-0.3459247351,
-0.1017660424,
-0.0387256891,
-0.3059707582,
0.1108811945,
0.1611165404,
-0.394695133,
-0.5389981866,
-0.095215261,
-0.0003200232,
-0.3787020445,
0.090893805,
0.1095980033,
0.0460834093,
0.4876995683,
-0.0965350941,
-0.2979004681,
-0.1291011274,
0.4790355265,
0.2514464557,
0.181172654,
0.2603762746,
-0.4870703816,
-0.1212575883,
-0.196514383,
0.5596075058,
-0.1007260308,
-0.2437118739,
0.4372682273,
-0.3269923627,
-0.1062722504,
-0.3694576919,
-0.0038123855,
0.2068475634,
0.0157108195,
-0.3250980377,
-0.1504526883,
-0.1082129478,
0.1018446237,
0.4662798345,
0.5012090206,
0.0024045762,
-0.3389849961,
-0.2228361368,
0.0928725228,
-0.2680395544,
0.0774505511,
-0.1197750419,
0.2378155738,
-0.1468684822,
-0.0026870773,
0.1724568605,
-0.3307194114,
0.0317073688,
0.3723020554,
0.0007378721,
-0.223363623,
-0.2800042331,
0.1426003724,
0.0670843348,
-0.1048429906,
0.0841963664,
-0.105828397,
-0.1268993616,
-0.2072521001,
0.1254569888,
0.1785875112,
-0.0267942734,
-0.1461609453,
0.2403798997,
-0.0210074466,
-0.0004079275,
0.1180744916,
0.0440197326,
0.1360802054,
-0.0191594046,
0.2348667979,
-0.1007848531,
0.0124352202,
-0.3176442385,
-0.1220105886,
0.0272604506,
-0.0873420611,
0.0942487717,
-0.1003265157,
-0.0683452338,
0.080240421,
0.2070461959,
0.34709692,
-0.2519915998,
-0.239630416,
0.244100377,
0.1763114631,
-0.1180809587,
-0.4534836113,
0.0429786332,
0.0389279909,
-0.0762653947,
0.1507990658,
0.3921940923,
0.1426624209,
-0.3935959041,
-0.0270335041,
0.0994193777,
0.1221141145,
0.0069666235,
0.5440514684,
-0.079845272,
-0.0383638255,
0.1996602863,
-0.1842249334,
0.2504190803,
0.352657944,
0.0398911014,
0.5691944361,
0.3046250343,
-0.1725182831,
-0.0131677007,
-0.2546971738,
0.1627843231,
0.0027355608,
-0.0982440263,
0.3227438033,
0.2246338278,
0.1532147527,
-0.5348469019,
-0.1555463672,
-0.2479175031,
-0.0078889802,
-0.4145127535,
-0.0148219662,
0.1355816424,
-0.1549014598,
-0.0088539021,
0.0379823782,
-0.2295501083,
-0.2473134845,
0.0702171996,
0.1296305507,
-0.118282102,
0.1331664473,
0.0395352058,
0.3368713856,
0.174715355,
-0.2867819965,
-0.0316906609,
0.2559712231,
-0.0655455664,
-0.3696062565,
0.547950983,
0.4310314357,
0.1872072518,
-0.3636638224,
-0.0574642234,
0.3479794264,
0.0489327349,
0.0908942446,
0.1920242161,
-0.0243473183,
-0.0633007586,
0.3049142063,
0.0294669438,
-0.2058056593,
-0.0669632703,
0.2481805235,
0.0916930661,
-0.4245634973,
0.1807992011,
0.0985773355,
-0.1307144612,
-0.0206832737,
-0.0752422214,
-0.0740345344,
0.0332865566,
0.5529130101,
-0.0424500927,
0.2321450561,
-0.2277159691,
0.0672270581,
-0.1680141091,
0.4661302567,
0.0868239626,
-0.5075997114,
-0.364181459,
0.1744335294,
-0.3953260779,
0.0685132444,
-0.0495316647,
0.1724013984,
0.2872260213,
0.2640040219,
-0.191050306,
0.2392141968,
-0.1471672207,
0.1481323391,
0.0972822756,
0.4667930901,
-0.2431749851,
-0.0090492638,
-0.0285560545,
-0.1410465389,
0.0603608266,
-0.7755925059,
0.2385080755,
0.0268652812,
0.0079113329,
-0.0079981517,
0.0175390337,
0.0392696708,
0.5732818842,
0.5139352679,
0.1808021963,
0.1125515774,
-0.2321794182,
-0.0380854309,
0.0530432425,
0.0384268686,
-0.137361303,
0.0244069155,
0.1742170006,
0.3960405886,
-0.2701422572,
-0.0388415568,
-0.0914328545,
-0.0639660805,
0.0255623497,
0.0902001262,
-0.2058330774,
0.109740071,
-0.1660428196,
0.2577118278,
0.199834764,
0.3812979162,
-0.0485204868,
0.321238786,
0.0048994683,
-0.4181925952,
0.3533160686,
0.0543128252,
-0.1976242959,
-0.1276914924,
0.2419109344,
0.2161218971,
0.0356891826,
-0.1928706914,
-0.1253122985,
0.2673859596,
-0.1713892817,
0.0206879526,
0.3755925894,
-0.0426771194,
-0.0584355146,
-0.0379877053,
0.6188091636,
0.1048003584,
-0.2734294534,
0.4862565994,
-0.5388700962
] |
https://github.com/huggingface/datasets/issues/3040 | [save_to_disk] Using `select()` followed by `save_to_disk` saves complete dataset making it hard to create dummy dataset | That would be great indeed - I don't really see a use case where one would not like to call `.flatten_indices()` before calling `save_to_disk` | ## Describe the bug
When only keeping a dummy size of a dataset (say the first 100 samples), and then saving it to disk to upload it in the following to the hub for easy demo/use - not just the small dataset is saved but the whole dataset with an indices file. The problem with this is that the dataset is still very big.
## Steps to reproduce the bug
E.g. run the following:
```python
from datasets import load_dataset, save_to_disk
nlp = load_dataset("glue", "mnli", split="train")
nlp.save_to_disk("full")
nlp = nlp.select(range(100))
nlp.save_to_disk("dummy")
```
Now one can see that both `"dummy"` and `"full"` have the same size. This shouldn't be the case IMO.
## Expected results
IMO `"dummy"` should be much smaller so that one can easily play around with the dataset on the hub.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.2.dev0
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 5.0.0
| 24 | [save_to_disk] Using `select()` followed by `save_to_disk` saves complete dataset making it hard to create dummy dataset
## Describe the bug
When only keeping a dummy size of a dataset (say the first 100 samples), and then saving it to disk to upload it in the following to the hub for easy demo/use - not just the small dataset is saved but the whole dataset with an indices file. The problem with this is that the dataset is still very big.
## Steps to reproduce the bug
E.g. run the following:
```python
from datasets import load_dataset, save_to_disk
nlp = load_dataset("glue", "mnli", split="train")
nlp.save_to_disk("full")
nlp = nlp.select(range(100))
nlp.save_to_disk("dummy")
```
Now one can see that both `"dummy"` and `"full"` have the same size. This shouldn't be the case IMO.
## Expected results
IMO `"dummy"` should be much smaller so that one can easily play around with the dataset on the hub.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.2.dev0
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 5.0.0
That would be great indeed - I don't really see a use case where one would not like to call `.flatten_indices()` before calling `save_to_disk` | [
-0.1977925748,
-0.1417638808,
0.0666226596,
0.2484792322,
0.1402246207,
0.2132204026,
0.230078578,
0.409286499,
0.1048449352,
0.4188419282,
0.1798494756,
0.4132268429,
-0.1830236167,
-0.0113674682,
0.0974143818,
0.0815899968,
0.2100721449,
0.1471536309,
0.0857833847,
-0.1938104928,
-0.3538570404,
-0.0429381616,
-0.2031716257,
-0.2402988225,
-0.5825725794,
-0.1538553834,
-0.2552957237,
0.3503507376,
-0.1936279535,
-0.1488088667,
0.1829912663,
-0.1521493495,
-0.0034609823,
0.3732103109,
-0.0001118755,
-0.0325940214,
0.2789494693,
-0.1452433467,
-0.551574707,
-0.0471204072,
-0.0590480343,
-0.3082057834,
-0.0078999242,
-0.350458473,
0.1207967624,
0.1892547011,
0.021036705,
-0.1303113401,
0.0142751168,
-0.0035850266,
0.2384082973,
0.3948936462,
-0.2610615194,
-0.246367082,
0.1168632582,
0.2067168057,
-0.2616850734,
0.3971017301,
0.0437284335,
0.0232738201,
0.0879832879,
0.0416663252,
-0.0989568084,
-0.2398887873,
0.0274798013,
0.1991412342,
0.1252733916,
-0.3865591884,
0.1519448161,
0.152022779,
0.3265635371,
-0.4074038863,
-0.3049966097,
-0.4118419886,
0.0830996335,
-0.1462810338,
0.0741889551,
0.3014725745,
0.0592082143,
0.0424719565,
-0.0021616893,
0.0335387476,
-0.0522372201,
0.0580203086,
0.1535102874,
0.1139578074,
0.0477702841,
0.1177478731,
0.2698825896,
0.0782436952,
0.0575564168,
-0.4144046903,
-0.0511411726,
-0.0261354242,
-0.2801520228,
-0.3041949868,
-0.0125459572,
-0.1516769975,
0.1897176653,
0.1437530071,
0.0515998341,
-0.0759512261,
0.1328124255,
0.0882508904,
0.2017661035,
0.3657116592,
-0.0611899905,
0.2186086774,
0.2735136747,
-0.0123811718,
0.2792711258,
0.1109459177,
-0.0763511732,
-0.0421504863,
0.2625473142,
-0.1083035022,
0.1004317924,
-0.0761469081,
-0.5143131614,
0.1527712196,
-0.049000673,
0.1797044277,
-0.0629051253,
0.1861972511,
-0.0773149356,
-0.0685769469,
-0.128066361,
0.3488470912,
-0.3783807755,
0.1637242138,
-0.2652187943,
0.027206758,
0.0539233908,
-0.0693393946,
0.1273183376,
-0.1293835193,
0.1086361781,
0.144805789,
-0.0045949332,
0.2118901908,
0.2069546431,
-0.3078587949,
0.142448619,
0.3278593123,
0.1940362453,
0.1614959389,
-0.0664175674,
-0.5430274606,
-0.259483546,
0.3924201429,
0.0038941703,
-0.2803142071,
-0.1710092425,
0.2075323313,
-0.1143183559,
0.0635974929,
-0.1667932719,
0.2285081744,
0.0753564835,
0.0062485891,
0.1177988872,
-0.0211896226,
-0.1414747089,
-0.4120806754,
0.1449580342,
0.2291031778,
-0.3432751,
0.1477127075,
0.0558117889,
0.0793074444,
0.1419504434,
0.1744057983,
-0.0441941358,
0.1885420978,
-0.1577698886,
0.4118065536,
0.2100581825,
-0.0976460651,
-0.6079845428,
-0.0466697477,
-0.1598026603,
0.1248297915,
-0.0274635907,
0.2837905586,
0.0746335685,
0.0379478261,
0.1873244792,
0.34155339,
0.0179855712,
-0.0658534169,
-0.519066155,
-0.2099472582,
0.0655269623,
0.136282295,
-0.1064372361,
0.0395038687,
0.0087475553,
0.1809937805,
0.3446834683,
-0.0202120896,
0.1579243988,
0.2567418516,
0.270408541,
-0.5342034698,
-0.0411682352,
-0.1754535884,
-0.3514359295,
0.240070954,
-0.0526099876,
-0.0125048142,
0.1998317689,
-0.3944236934,
-0.4044263959,
-0.0553547405,
-0.0877608359,
0.0728787631,
0.0979474336,
-0.0615156032,
0.182580784,
0.0425922871,
-0.0759798959,
0.1585500985,
-0.1935741007,
-0.0618260913,
-0.5536087751,
0.3859691918,
-0.0915119052,
-0.3280571103,
-0.0350288041,
0.2126306742,
0.1772057861,
-0.1135064289,
-0.0940911695,
0.3162441254,
-0.0951052681,
0.0406976342,
-0.0201185867,
0.0025902034,
0.1608349979,
0.124440521,
0.1571008265,
0.2498224825,
0.273566097,
-0.0235077627,
-0.4771659076,
0.2311618626,
-0.2927587628,
-0.0810447559,
-0.1208498552,
-0.0608973727,
0.0319917053,
-0.0428189188,
-0.0425483622,
-0.1763473898,
0.070334129,
0.290935725,
0.0909603313,
-0.1151612103,
-0.2419191003,
0.1735586524,
0.33964625,
-0.1919735819,
0.3474774361,
0.2817617357,
-0.2003468126,
-0.1335475743,
0.0373679288,
-0.0377684049,
0.6007299423,
0.1558988094,
0.0883579478,
-0.100833334,
-0.2186992019,
-0.1595449299,
0.2964481413,
0.1223162562,
-0.1436362267,
0.295820713,
0.1177832186,
-0.0496106111,
-0.3815623224,
0.3660566509,
0.0397347622,
0.1403038949,
-0.0746125281,
-0.0468751416,
-0.2220271975,
0.009147739,
0.0975689813,
-0.0845478624,
-0.151861921,
-0.2975796759,
0.0770292059,
0.5313763022,
-0.1911173761,
-0.031100167,
0.0232340377,
0.5041888952,
0.1211437881,
-0.0425538756,
-0.0122354515,
0.1154702529,
-0.343415916,
0.1002828777,
0.0953972936,
0.2601559162,
0.4003160596,
0.0021411043,
-0.0197244305,
-0.1349076927,
-0.1973681003,
-0.0259970035,
-0.1635119766,
0.5417500138,
0.0183582418,
0.0991627499,
-0.1966388524,
0.0967615321,
0.0561497808,
0.1406344324,
-0.136608839,
0.1727807373,
0.0687409267,
-0.1653538197,
-0.2481952012,
-0.3254330754,
-0.3048190176,
-0.2542738318,
0.1537663639,
-0.0122884,
0.131315425,
0.1448342502,
0.2448847741,
0.0041392515,
0.2224032134,
-0.3101123273,
-0.4191606343,
-0.2238926888,
0.3832209408,
-0.1818078756,
-0.3602205813,
-0.1531227678,
-0.4102197289,
-0.3148637116,
-0.2500454187,
-0.5173293948,
-0.3352141678,
-0.265504092,
0.1003340706,
-0.1530314386,
0.1927639097,
0.4105790555,
-0.1144198328,
-0.0117200725,
-0.0861051008,
-0.3866618574,
0.0798537806,
0.6662323475,
0.33162117,
-0.1858381927,
0.0459344871,
0.1075593308,
0.2206331193,
0.4430144727,
0.1405554265,
0.3218774498,
-0.0192039032,
0.3616741598,
-0.3665599227,
-0.2806675732,
-0.0129964016,
-0.0670070201,
-0.2410376519,
0.1282023787,
-0.012903627,
-0.087168552,
0.1797237694,
-0.1236906648,
0.0949188471,
-0.2364210337,
0.2984073162,
0.1224230528,
-0.1001606211,
0.17954804,
0.1414388567,
-0.1783008128,
-0.0539452061,
-0.0321540833,
-0.0263300408,
0.2557872832,
-0.1466292143,
-0.3243378401,
-0.0351240411,
-0.5802319646,
0.084382154,
0.0936883539,
0.2044395059,
0.056190867,
-0.1582512259,
0.0851985663,
0.1368569881,
0.7432153225,
-0.3842596412,
-0.1780285984,
0.4033296406,
0.1342341453,
-0.8143325448,
0.0213827658,
-0.1293771714,
0.2648553252,
-0.033090584,
0.5621824861,
-0.376098305,
0.0110056736,
0.2296082228,
0.6112474203,
-0.350443989,
-0.0582573153,
-0.4324480891,
-0.188559249,
-0.2546667755,
0.1503724605,
-0.0716478303,
0.2397181243,
-0.0405279137,
-0.0444226637,
-0.2121428549,
-0.3270792067,
0.0113803474,
0.0677205995,
0.5561854243,
-0.0825224519,
0.418017,
0.0242459886,
0.0401821323,
-0.0594477579,
0.6598939896,
-0.1036292911,
0.391808629,
0.4049884677,
0.0475430712,
0.2063343227,
0.5773269534,
0.0501181968,
-0.0228427779,
-0.3488177657,
0.1112992316,
-0.6011794806,
-0.0745334625,
-0.0572170913,
-0.1423175335,
-0.1975497454,
0.0433580093,
0.597833097,
-0.0787630603,
-0.0072231484,
0.1438950449,
0.117844224,
-0.0587209836,
0.5333471894,
0.1005477607,
1.2180790901,
0.3039316535,
0.3937906325,
0.1301134378,
-0.0481122211,
0.0086004473,
-0.0455871038,
0.2714833617,
-0.4810364842,
-0.3676053584,
0.0962490737,
-0.1921495795,
-0.1967854649,
-0.0778083801,
-0.3975015581,
0.1604493856,
-0.3495580256,
0.1591287702,
-0.2114864737,
0.1839334667,
-0.4848152399,
-0.2814481854,
0.2246268988,
0.157803461,
0.3233882189,
0.0159784816,
0.0917319581,
-0.1006536409,
-0.2925365567,
-0.0296851881,
0.0459272116,
0.0400319174,
-0.0995301977,
0.2750196755,
-0.2005724758,
-0.3464384079,
-0.1245660409,
-0.0255725086,
0.2890239954,
0.3744852543,
-0.1033796221,
-0.0262936261,
-0.0417540483,
0.3092027307,
0.0594252199,
-0.0895774588,
0.1709261835,
0.0615579262,
-0.1399833411,
-0.2190691829,
-0.0852850825,
-0.0266709644,
-0.2427762747,
0.1260932386,
0.1615696549,
-0.3827994466,
-0.489369601,
-0.0446670055,
-0.0615583844,
-0.4063912928,
0.1454347819,
0.1053978056,
0.0259733666,
0.4555743039,
-0.0790812224,
-0.2972027361,
-0.1542999744,
0.4494310319,
0.2478713095,
0.1480789185,
0.271042645,
-0.4469684958,
-0.1038837433,
-0.2387588918,
0.5026153326,
-0.0709165111,
-0.2859805822,
0.3701176345,
-0.2878804505,
-0.1450564265,
-0.3442718089,
-0.0107628433,
0.2299571037,
-0.0205296651,
-0.3077241778,
-0.1414950937,
-0.1431508362,
0.1431450248,
0.4900166988,
0.5240740776,
-0.0780519918,
-0.2398318797,
-0.1831591725,
0.1084408835,
-0.359990567,
0.0811141804,
-0.2394699901,
0.268632412,
-0.172474727,
-0.0359061509,
0.1664491892,
-0.3004930913,
0.106555663,
0.3756779432,
-0.0541150011,
-0.2969504893,
-0.2696128488,
0.1165943146,
0.0545142256,
-0.1464617103,
0.0956504494,
-0.0738448575,
-0.0577264689,
-0.1512088031,
0.1707743704,
0.1564993262,
-0.0472590886,
-0.1470353901,
0.3203546107,
0.0425526723,
-0.0024797239,
0.0754608959,
0.0261709746,
0.0917834938,
-0.0481477939,
0.1887071729,
-0.1166765913,
-0.0448439568,
-0.2422873527,
-0.1195159107,
0.0979740992,
-0.0474726595,
0.0604023561,
0.0006509015,
-0.1051988453,
0.0040235477,
0.2393454611,
0.2737483978,
-0.248489216,
-0.2356603593,
0.26258865,
0.248647511,
-0.1057375818,
-0.4118328094,
0.0189124849,
-0.0392783172,
0.005163162,
0.1641272604,
0.3545639217,
0.2427816987,
-0.3621490896,
-0.0169973448,
0.1232233569,
0.0962349698,
-0.0654349327,
0.5216039419,
-0.1665496379,
-0.0150667774,
0.2121861577,
-0.1681818217,
0.2664479911,
0.4092088044,
0.0531914346,
0.5925388932,
0.3080637455,
-0.1914371252,
0.0408591069,
-0.2369116247,
0.1170413643,
-0.0093939267,
-0.1397485435,
0.2941705287,
0.1654155552,
0.1148482338,
-0.5094161034,
-0.1562332958,
-0.2477003783,
0.0427000895,
-0.3979019523,
-0.0255794022,
0.0529009737,
-0.1695225686,
-0.1116253734,
-0.0098322583,
-0.2114029378,
-0.3123297691,
0.1078480631,
0.0962631106,
-0.0519529991,
0.150181368,
0.057824906,
0.2662907839,
0.1165572405,
-0.2532815933,
-0.041265592,
0.2512804866,
-0.0114270914,
-0.3073459566,
0.5325506926,
0.4416760504,
0.1797323227,
-0.3842205405,
0.0215361025,
0.3273890913,
0.029428253,
0.0312077999,
0.1778076291,
-0.0226708036,
-0.0309379175,
0.3151065409,
0.1251995564,
-0.262246877,
-0.0732743815,
0.1854042113,
0.0445626155,
-0.4210135341,
0.2265489548,
0.043454662,
-0.1790271252,
-0.0386458039,
-0.0581597947,
-0.14116247,
0.0267647225,
0.5199747086,
-0.0728502795,
0.2796632349,
-0.2618967891,
0.103545934,
-0.17783764,
0.5215607882,
0.0792090893,
-0.4038261175,
-0.3757124543,
0.1196340248,
-0.4081853032,
0.0473801605,
-0.0857475102,
0.1117965207,
0.1773892343,
0.2658411562,
-0.1880432814,
0.2302028686,
-0.1026124358,
0.1999199539,
0.1051216051,
0.4548660219,
-0.2384542227,
0.0179177541,
-0.0063910368,
-0.1386221945,
0.0679014176,
-0.7550702095,
0.2475124747,
-0.0061861705,
0.0844961181,
0.0188093167,
-0.0434285328,
0.1093248725,
0.554525733,
0.5381196141,
0.1462779939,
0.1516859233,
-0.2922506034,
-0.0799765065,
0.0291212108,
0.0564694814,
-0.1612019837,
-0.0550400056,
0.1266661882,
0.4073197246,
-0.2024590671,
0.0103128375,
-0.0293015204,
-0.0690174848,
0.0656811669,
0.1479185969,
-0.1694449037,
0.1052703112,
-0.1405383795,
0.2752905488,
0.1997675896,
0.3810147345,
-0.0680860877,
0.2993740141,
-0.1108062193,
-0.4180841446,
0.4177259207,
0.0666836202,
-0.2176525146,
-0.1274573356,
0.2855778337,
0.1705627739,
0.0461877547,
-0.2137611508,
-0.1334479004,
0.2530683875,
-0.1423836499,
-0.0212288126,
0.3946366906,
-0.0475618169,
-0.0734925568,
-0.0220044963,
0.5571449399,
0.0664405599,
-0.2563573718,
0.4690863788,
-0.5414259434
] |
https://github.com/huggingface/datasets/issues/3036 | Protect master branch to force contributions via Pull Requests | It would be nice to protect the master from direct commits, but still having a way to merge our own PRs when no review is required (for example when updating a dataset_infos.json file, or minor bug fixes - things that happen quite often actually).
Do you know if there's a way ? | In order to have a clearer Git history in the master branch, I propose to protect it so that all contributions must be done through a Pull Request and no direct commits to master are allowed.
- The Pull Request allows to give context, discuss any potential issues and improve the quality of the contribution
- The Pull Request will eventually be squashed and merged into master with a single commit that links to the Pull Request page (with all the context/discussions)
Note that we already implemented a protection in the master branch to avoid *merge* commits and ensure a linear history. This proposal goes one step further by avoiding all kind of direct commits and forcing contributions **only** through Pull Requests.
Please note that we can temporarily deactivate this protection if we need to make a direct commit, e.g. at each new version release.
The only way GitHub allows this kind or protection is by requiring a minimal number (at least one) of approvals of the Pull Request. The inconvenient is that the PR creator cannot approve their own PR: another person must approve it before it can be merged into master. To circumvent this, we could eventually disable this protection in the master branch when an urgent commit is needed (e.g. for a hotfix) and there is no other person available at that time to approve the PR.
| 52 | Protect master branch to force contributions via Pull Requests
In order to have a clearer Git history in the master branch, I propose to protect it so that all contributions must be done through a Pull Request and no direct commits to master are allowed.
- The Pull Request allows to give context, discuss any potential issues and improve the quality of the contribution
- The Pull Request will eventually be squashed and merged into master with a single commit that links to the Pull Request page (with all the context/discussions)
Note that we already implemented a protection in the master branch to avoid *merge* commits and ensure a linear history. This proposal goes one step further by avoiding all kind of direct commits and forcing contributions **only** through Pull Requests.
Please note that we can temporarily deactivate this protection if we need to make a direct commit, e.g. at each new version release.
The only way GitHub allows this kind or protection is by requiring a minimal number (at least one) of approvals of the Pull Request. The inconvenient is that the PR creator cannot approve their own PR: another person must approve it before it can be merged into master. To circumvent this, we could eventually disable this protection in the master branch when an urgent commit is needed (e.g. for a hotfix) and there is no other person available at that time to approve the PR.
It would be nice to protect the master from direct commits, but still having a way to merge our own PRs when no review is required (for example when updating a dataset_infos.json file, or minor bug fixes - things that happen quite often actually).
Do you know if there's a way ? | [
-0.0392103828,
0.0052621169,
0.0302887913,
-0.0834547877,
-0.273763597,
-0.1612029821,
-0.0911575779,
0.375121057,
-0.2183747739,
0.2085062861,
0.4694797993,
-0.1339307725,
0.0275087617,
-0.0358083546,
0.026731519,
0.2096523941,
0.1608106494,
0.1743799597,
0.2682784498,
0.2084312439,
0.0579005145,
-0.1785156429,
0.1868506968,
-0.0017589661,
0.095111087,
0.1634181887,
0.0077417856,
-0.0364756286,
-0.4017794728,
-0.1743262112,
-0.001909593,
0.3984903395,
-0.143651396,
0.6452502012,
-0.0001133923,
-0.022314094,
0.2096761316,
-0.0676111281,
-0.034029834,
-0.4536473453,
-0.5846635103,
-0.2676281929,
-0.0493043214,
0.0636173859,
-0.0557105578,
0.0729705617,
-0.073237583,
0.3697607815,
0.4558584988,
-0.0234799385,
0.1169714853,
-0.0922164172,
0.0767284334,
-0.0295450948,
0.193782568,
0.5988354683,
-0.1655077487,
0.1780665815,
0.0341168828,
-0.0601183325,
0.1821265519,
-0.0157970991,
-0.0799400955,
-0.2091017216,
0.2245460153,
-0.2560283542,
0.526178956,
-0.3168747127,
-0.3029907048,
0.0409935415,
-0.0890520588,
-0.201477617,
-0.4003642201,
-0.3374319971,
-0.0076908823,
0.2873123884,
-0.0412710682,
0.3878722191,
-0.2278485596,
0.0271875672,
-0.2630948424,
-0.2275313586,
0.0158347879,
0.1710182875,
0.5028077364,
-0.4301556051,
0.1649841666,
-0.0957475677,
0.5486339927,
0.1789180189,
-0.1014847606,
-0.2161685675,
-0.2733170688,
0.1584169865,
-0.00273011,
-0.272187531,
-0.2254759818,
-0.253785789,
0.3094601333,
0.2149469554,
-0.3098843992,
-0.0180033538,
0.020944722,
-0.061019484,
0.3112660348,
-0.0584762543,
-0.1146202758,
0.0229649357,
0.3326802552,
0.0623840727,
0.178517133,
0.349439621,
0.2525050342,
-0.1642992944,
-0.203028813,
0.3855735958,
0.2055938244,
-0.2088888437,
0.3428000808,
-0.0122685265,
-0.4945057333,
-0.2900829017,
-0.117105186,
0.025325669,
0.1301984936,
0.2015807033,
-0.0859767944,
0.0004681247,
0.1724989414,
0.205940783,
-0.1982532889,
-0.0658476576,
-0.3138450086,
-0.0417898931,
-0.0277796797,
-0.4428147078,
0.0186629221,
0.4233162403,
-0.066295743,
-0.3024795055,
0.1660294682,
0.2152925581,
0.0497057773,
0.4026299417,
-0.0065921107,
-0.496152401,
0.3568657637,
-0.0570677556,
-0.1037100703,
0.0398581475,
0.0292220321,
-0.1980358809,
-0.0101027712,
0.1162918806,
-0.1196946651,
0.6120961308,
-0.5425119996,
-0.1407793462,
0.0179733206,
0.282412678,
0.3898386061,
0.1948901415,
0.4329701662,
0.162247017,
-0.0733589604,
0.115076296,
0.3443805575,
-0.1151590347,
0.0313649364,
-0.2975067198,
-0.0393516608,
0.2056733221,
-0.0992178991,
-0.0289715882,
0.1462287456,
-0.1318166852,
-0.0761958659,
-0.2383788526,
-0.0659742504,
0.0858425051,
-0.390019089,
0.0263893101,
0.2227003127,
-0.0111286528,
0.0514069498,
-0.4380871654,
-0.0546742007,
0.0318775773,
-0.2141443193,
0.1192893535,
-0.2857348621,
-0.5958311558,
-0.4089704454,
-0.1059381887,
0.0184152108,
0.3025842607,
0.3793970644,
-0.0546872355,
0.0713976547,
-0.2730156481,
0.0154474825,
-0.0230350122,
0.3894475102,
-0.1047572121,
-0.1802071482,
0.1194421798,
0.1101894528,
-0.0170568787,
-0.1046458036,
0.3519249856,
0.2470925599,
-0.3897033036,
0.37824893,
-0.1205758452,
0.1158693433,
0.0447269902,
0.0831923336,
-0.0820395201,
-0.3310744166,
-0.3657376766,
-0.1504601687,
0.0980053246,
-0.3836088181,
0.2198895067,
0.2598739266,
-0.2121110708,
-0.1218524948,
-0.0757934451,
0.0366205014,
0.3938516974,
-0.0064488584,
0.0641894117,
-0.0260839574,
0.073010914,
-0.1646284759,
0.037319839,
-0.0525832959,
0.5259108543,
0.0761819556,
0.0123883169,
-0.4151850343,
0.1357994527,
-0.12711218,
-0.0625555962,
-0.3943085968,
0.2311584502,
0.0749641806,
0.1177768856,
-0.1957347095,
-0.0653789714,
-0.1910145879,
-0.3806606829,
-0.1781343967,
-0.0440881997,
-0.0688622445,
0.2823320031,
0.0771655366,
0.0858778805,
0.0147809489,
0.0336034596,
-0.247275725,
-0.1052991971,
0.0110503742,
0.1918054372,
0.0509713627,
-0.0316204764,
0.0738331079,
0.4111638367,
-0.1407797784,
0.2674921155,
-0.1470270604,
0.0359053649,
0.3376452923,
-0.0350431204,
0.2228682637,
0.0544020198,
-0.3133307397,
-0.1801368892,
0.1455767453,
0.3328593373,
0.2928330302,
0.5328118205,
-0.2069605291,
0.203237474,
-0.2630005479,
-0.0272512939,
-0.0848527178,
-0.2763054669,
0.392524302,
-0.0120530101,
-0.2765248418,
0.2296936661,
0.007154875,
0.1550299823,
-0.3339750767,
0.0654760525,
0.5088152289,
0.3635985255,
-0.2051372975,
-0.2295762897,
0.2180314511,
-0.1957035959,
0.0260494202,
0.0989231765,
0.4613981545,
-0.2916274965,
0.3260729909,
0.3867622614,
-0.2079504281,
-0.2282973528,
-0.1650323421,
0.1054012254,
-0.40900895,
-0.1873523146,
-0.0424156412,
0.0649159476,
0.4501015544,
-0.10423363,
-0.4096885026,
-0.0323108993,
-0.4350755215,
-0.1864557862,
0.0139027974,
0.0550449863,
-0.4359558225,
0.4609280229,
-0.1166625619,
-0.1648647785,
0.7095142007,
0.0767155439,
0.2302682251,
0.0194054544,
0.0865749344,
-0.1598649919,
0.0626040176,
0.1068683118,
0.1434099227,
-0.3210088313,
-0.1677197814,
0.1595329046,
0.1012823507,
0.2945511937,
0.1268043965,
-0.4788977504,
0.0440487824,
-0.2363422811,
-0.3687497377,
0.1799379885,
0.390188098,
0.3310514987,
-0.033926487,
0.3394644558,
-0.0359287336,
-0.1189727485,
0.1226229966,
-0.2239786983,
0.0964702144,
0.2854649425,
0.2865076363,
-0.018443184,
0.0598771572,
0.0820178315,
0.7869044542,
0.149718374,
0.0959726945,
-0.1852705479,
0.2066739947,
0.1392295212,
0.0852995664,
-0.1458648443,
-0.2054568529,
0.0478033647,
0.0379259251,
0.133202076,
0.0815913975,
-0.1743311286,
0.000722488,
-0.411985606,
0.1388904005,
-0.2865207493,
-0.2539998591,
-0.1534401476,
0.0957827345,
-0.054886613,
-0.160725981,
0.0633844361,
-0.0699237585,
0.1010291576,
0.2230679393,
0.2097579241,
0.0920229927,
0.2612350881,
0.1175592691,
-0.1309865266,
-0.0684237406,
0.0865243897,
-0.1355672628,
-0.0395981632,
0.0090043982,
0.1978370249,
-0.0307267178,
0.3099440336,
0.0072685177,
0.1309662014,
-0.0631066784,
-0.3789933026,
0.6964175701,
-0.156344682,
0.3529144824,
0.2622954249,
0.8374145031,
0.1197294742,
-0.3968332708,
-0.1496315002,
-0.003813064,
-0.036036849,
0.0686592832,
-0.04808373,
-0.1156834215,
0.3487927616,
-0.3357850313,
0.4311834574,
0.2559792399,
-0.3038217127,
0.0104677416,
0.2378188819,
-0.0928262547,
0.0112657622,
0.0735119656,
-0.2247351706,
-0.20451276,
0.0594353601,
-0.1326772571,
0.0122662662,
-0.1394402087,
0.1041481122,
0.3106578588,
0.355799228,
-0.325658083,
0.0537185967,
-0.222889632,
-0.1304136664,
0.3345258236,
0.4204177558,
0.3821142018,
0.2719575167,
0.2728893459,
-0.0123534407,
-0.1415896565,
-0.4363841116,
-0.2990597486,
-0.1105988622,
-0.2523155808,
0.1107603833,
-0.0903298408,
-0.0343365185,
0.1089031622,
0.2895846963,
-0.3099628687,
0.1345057636,
0.5430853367,
1.0368247032,
0.177943781,
0.1662522703,
-0.2907527685,
-0.2622405291,
0.3283101618,
-0.2952843308,
-0.1216272041,
-0.2103438526,
0.1531086713,
-0.2013844997,
-0.2962916791,
-0.2506058514,
-0.4135071635,
-0.2420944124,
0.1088124439,
-0.0076898313,
0.5291513205,
0.4842734635,
0.2429799289,
0.3178888559,
-0.2366131693,
0.260365665,
0.1140008122,
0.21102117,
-0.0830600262,
0.1443410516,
-0.4476208389,
-0.0790553391,
-0.0070645055,
-0.5527561903,
-0.0381701179,
-0.1699921191,
-0.3813926876,
-0.159968704,
-0.525541842,
0.2626717091,
-0.0750048757,
0.542101264,
0.3031882048,
-0.2709930241,
0.0555895641,
0.2812994421,
0.2881535292,
-0.2797305286,
-0.1128362194,
0.2739645541,
-0.1524412632,
0.0631713346,
0.0644486696,
-0.1034428775,
-0.7558957934,
-0.3922569156,
0.2973228693,
-0.4339496195,
0.2270324379,
0.0668071434,
0.2351885289,
0.0078049824,
-0.0562140867,
0.1005597115,
0.0705623701,
-0.0493520387,
-0.1525384188,
-0.2649346292,
-0.0771218687,
0.1016552523,
0.140624702,
0.1869636923,
-0.1826457679,
-0.002421014,
0.0230558906,
0.0258561168,
-0.1859492362,
-0.4277113378,
-0.023398282,
-0.0945851132,
-0.046058245,
-0.3063795567,
-0.4524269998,
-0.0026127286,
0.0635998324,
0.1909753829,
0.3833424747,
0.0798613951,
-0.0147766694,
-0.1989193559,
-0.1842207462,
-0.3212841749,
-0.0018127211,
0.0891321972,
0.3997997642,
-0.1379896998,
0.2607038915,
-0.2689198554,
-0.0083961478,
-0.1453465819,
0.005489463,
-0.1110874042,
-0.0549151935,
0.0222974289,
-0.3725228012,
-0.1067287996,
0.0245371349,
-0.1104437038,
-0.2620766759,
0.0336227342,
0.0858065039,
0.0278926287,
0.0526568256,
-0.0116764558,
0.1427189708,
0.0134295058,
0.2820656598,
0.1241433099,
-0.2655140162,
0.0578920655,
-0.357160449,
0.1006408781,
0.360003531,
-0.2323385477,
-0.0616336577,
-0.0959164351,
-0.0939113572,
-0.0291514024,
0.2310013324,
-0.1673916727,
-0.0282564852,
-0.2811632454,
0.2162105441,
0.3449963927,
0.5151646733,
0.1311512589,
0.2805847824,
-0.3886398971,
-0.0246067327,
0.0349646434,
-0.1173418611,
-0.1738965213,
-0.009820235,
0.0976182073,
0.1307990849,
0.0723518506,
-0.1029960737,
0.1990422755,
0.1450785697,
-0.0049648071,
0.1745263934,
0.32209149,
0.0017521604,
-0.0724787116,
0.2245958298,
0.354717344,
0.0724321976,
0.2669233084,
0.2632670403,
0.0565340407,
-0.0478706099,
-0.1106525287,
-0.1112062037,
0.1273144335,
-0.7792363167,
0.0968965217,
0.1167932227,
0.2976202369,
-0.4201007783,
0.0942266881,
0.223128289,
0.2982454896,
0.1216695383,
0.231266275,
-0.3060259223,
0.3545930386,
0.2923968732,
0.2906554341,
-0.2864473164,
0.1301787943,
0.3716274798,
0.3795809448,
0.3017282784,
-0.6312105656,
0.1246697158,
0.2036642879,
-0.0710440278,
0.1040950045,
0.0892988816,
-0.2888858914,
0.3707246482,
0.0434455164,
0.156989485,
-0.2291547805,
0.3480502069,
0.2323833853,
-0.1604854763,
-0.3837149441,
0.1163841635,
-0.1723572463,
0.07476677,
0.1708648056,
0.0743233562,
-0.1817612052,
-0.1439028084,
-0.0839762092,
0.2547419965,
-0.0700662807,
0.0292392429,
-0.0646725819,
-0.2148431689,
0.2540945113,
-0.1660955697,
0.1381045431,
-0.0622428283,
0.0079696784,
-0.1787483245,
-0.4086114764,
-0.0775056407,
0.4224799573,
0.5896529555,
-0.3156468272,
0.3878402412,
0.1756168008,
0.3943760991,
0.3066678941,
0.141361028,
-0.107799761,
-0.0748680755,
-0.0554819889,
0.0894001573,
0.0792264938,
0.2478416711,
0.1138328686,
0.0133620715,
-0.1167402938,
0.143637225,
0.0163585357,
0.0900803879,
-0.2483268529,
0.1829483956,
0.1215242147,
-0.3599319756,
0.2942222953,
0.3047970533,
-0.3274173737,
-0.3536810577,
-0.070732668,
0.1262384802,
-0.2885068357,
0.282705307,
0.2440245301,
-0.0033900815,
0.11432188,
0.0547705404,
0.250112623,
0.0467050038,
0.0658771768,
0.2231947631,
-0.0363901667,
0.3184185326,
-0.0875200555,
0.0546984412,
-0.0077577005,
-0.2224346548,
0.0180044528,
-0.0963305905,
0.0244452171,
0.3535772264,
-0.5698159933,
-0.3038264215,
-0.1529223323,
0.2806718051,
-0.2256746292,
-0.0123028625,
-0.3624458611,
0.168194145,
-0.1626234502,
0.2708547115,
-0.1577613503,
0.1048240066,
-0.012714494,
0.190986082,
-0.1016081572,
-0.0405999757,
-0.100257352,
0.2273367792,
-0.378616482,
0.115581803,
0.0941479355,
-0.4468302727,
0.0299288351,
-0.0926574618,
0.3993573189,
0.2331874818,
-0.2621024847,
-0.0566732287,
-0.2221916765,
-0.1184866205,
-0.1022519767,
-0.4577757716,
0.2126338035,
-0.0652855784,
0.2534566224,
-0.1020116732,
-0.2025324851,
0.0380462334,
-0.0741735026,
-0.0149471126,
-0.2644024491
] |
https://github.com/huggingface/datasets/issues/3036 | Protect master branch to force contributions via Pull Requests | This is done. Now the master branch is protected:
- [x] Require a pull request before merging: all commits must be made to a non-protected branch and submitted via a pull request
- Required number of approvals before merging: 1
- [x] Require linear history: prevent merge commits from being pushed
- [x] These requirements are not enforced for administrators
- [x] Additionally, the master branch is also protected against deletion and force pushes
CC: @lhoestq @julien-c @thomwolf | In order to have a clearer Git history in the master branch, I propose to protect it so that all contributions must be done through a Pull Request and no direct commits to master are allowed.
- The Pull Request allows to give context, discuss any potential issues and improve the quality of the contribution
- The Pull Request will eventually be squashed and merged into master with a single commit that links to the Pull Request page (with all the context/discussions)
Note that we already implemented a protection in the master branch to avoid *merge* commits and ensure a linear history. This proposal goes one step further by avoiding all kind of direct commits and forcing contributions **only** through Pull Requests.
Please note that we can temporarily deactivate this protection if we need to make a direct commit, e.g. at each new version release.
The only way GitHub allows this kind or protection is by requiring a minimal number (at least one) of approvals of the Pull Request. The inconvenient is that the PR creator cannot approve their own PR: another person must approve it before it can be merged into master. To circumvent this, we could eventually disable this protection in the master branch when an urgent commit is needed (e.g. for a hotfix) and there is no other person available at that time to approve the PR.
| 78 | Protect master branch to force contributions via Pull Requests
In order to have a clearer Git history in the master branch, I propose to protect it so that all contributions must be done through a Pull Request and no direct commits to master are allowed.
- The Pull Request allows to give context, discuss any potential issues and improve the quality of the contribution
- The Pull Request will eventually be squashed and merged into master with a single commit that links to the Pull Request page (with all the context/discussions)
Note that we already implemented a protection in the master branch to avoid *merge* commits and ensure a linear history. This proposal goes one step further by avoiding all kind of direct commits and forcing contributions **only** through Pull Requests.
Please note that we can temporarily deactivate this protection if we need to make a direct commit, e.g. at each new version release.
The only way GitHub allows this kind or protection is by requiring a minimal number (at least one) of approvals of the Pull Request. The inconvenient is that the PR creator cannot approve their own PR: another person must approve it before it can be merged into master. To circumvent this, we could eventually disable this protection in the master branch when an urgent commit is needed (e.g. for a hotfix) and there is no other person available at that time to approve the PR.
This is done. Now the master branch is protected:
- [x] Require a pull request before merging: all commits must be made to a non-protected branch and submitted via a pull request
- Required number of approvals before merging: 1
- [x] Require linear history: prevent merge commits from being pushed
- [x] These requirements are not enforced for administrators
- [x] Additionally, the master branch is also protected against deletion and force pushes
CC: @lhoestq @julien-c @thomwolf | [
-0.0546304137,
0.0769248307,
-0.0444107726,
-0.0714356154,
-0.2691425979,
-0.1964896917,
0.0576879419,
0.364843905,
-0.2206805944,
0.1525520384,
0.3992947638,
-0.0609557368,
0.0369373262,
-0.0986791924,
-0.0556436889,
0.1957637221,
0.0636075437,
0.1572287232,
0.1213736609,
0.1543415934,
0.0243425556,
-0.1789919287,
0.1172419339,
0.0277912673,
0.0378979966,
0.0524477735,
0.0053125913,
0.1491575539,
-0.3218845129,
-0.2311365008,
-0.0611753576,
0.3277314901,
-0.2157948166,
0.6871521473,
-0.0000982097,
-0.0000771101,
0.1542964876,
-0.0800613314,
-0.1725236923,
-0.3730685413,
-0.5741582513,
-0.2418325096,
-0.0754045993,
-0.0555118024,
-0.1761810631,
0.1148057953,
-0.0804950148,
0.2728286684,
0.5183387399,
0.010515051,
0.2633621097,
-0.1083516032,
0.0710876882,
-0.0683365464,
0.2550575137,
0.5172877908,
-0.1573018879,
0.1469678134,
-0.0018509034,
0.0981510058,
0.0340635963,
0.0749676153,
0.0004150058,
-0.1394252181,
0.1787841022,
-0.2518003881,
0.4981859922,
-0.2298786044,
-0.2496278882,
-0.0086630983,
-0.047614295,
-0.1921361685,
-0.3419497311,
-0.3052254617,
-0.129110679,
0.1263786554,
0.0336262286,
0.2996910512,
-0.1646392047,
0.0714576617,
-0.1908500344,
-0.1444272548,
-0.013539603,
0.159072578,
0.4159228504,
-0.3272844255,
0.0507694408,
-0.0918157175,
0.3410234153,
0.0733628497,
-0.2139707059,
-0.2517674267,
-0.0979781747,
0.0851470083,
0.032652203,
-0.218679741,
-0.1202165633,
-0.1822324097,
0.3111260533,
0.1592379659,
-0.3786867261,
0.0336064696,
-0.0066782385,
-0.0299597681,
0.2217688262,
0.083009541,
-0.1214099675,
0.0253640879,
0.3396565914,
0.0400025398,
0.0859397724,
0.3491753042,
0.2145823836,
-0.1333056241,
-0.1731318086,
0.3905530572,
0.2210239321,
-0.1622815728,
0.2360556871,
-0.0179412868,
-0.3859711289,
-0.2942586243,
-0.044238884,
0.1227177083,
0.0632456988,
0.1156462654,
-0.1730341464,
-0.0558706112,
0.1687659025,
0.2198661566,
-0.280082196,
-0.1536924988,
-0.4088294208,
-0.0208561216,
0.029481288,
-0.3727647364,
0.059808556,
0.4221438169,
-0.1788815558,
-0.2172992229,
0.1418458074,
0.1837371737,
0.180907011,
0.3417932093,
-0.0424991548,
-0.4180143476,
0.3252082169,
-0.0398275293,
-0.0875741839,
0.0432217605,
-0.0249217469,
-0.1701913476,
0.036916595,
0.2457206994,
-0.1123229638,
0.59378016,
-0.4279767871,
-0.0860783607,
0.0181486495,
0.2983733118,
0.3747134805,
0.1771742702,
0.3874098659,
0.0095293177,
-0.0411166176,
0.0989392921,
0.3484211862,
-0.1197242737,
-0.0231732987,
-0.2468143255,
-0.0070907301,
0.2081788778,
-0.1916865557,
-0.0639457405,
0.0683135241,
-0.0624835566,
-0.0350720659,
-0.2641080618,
-0.1078359038,
-0.0166004039,
-0.3689723313,
0.1137964725,
0.1431080699,
-0.1643721163,
0.1553986967,
-0.5000048876,
-0.0407749675,
0.0915041938,
-0.2658817172,
0.2019303143,
-0.3796205521,
-0.5285713673,
-0.3106910884,
-0.1091785431,
-0.0058220606,
0.2283459604,
0.3668491542,
0.0172445066,
0.1326517016,
-0.2156085521,
0.009041274,
-0.0374354981,
0.4387500882,
-0.0640441701,
-0.1507111341,
0.1498173326,
0.0064831288,
-0.0297206454,
-0.0220367331,
0.3783267438,
0.1642404795,
-0.2938960791,
0.3065726161,
-0.1411016136,
0.025092449,
-0.0011003007,
0.2693794072,
0.0456377193,
-0.3084657788,
-0.33138147,
-0.0941767693,
0.0818049312,
-0.3662632108,
0.2148546576,
0.1792468876,
-0.2639020979,
-0.1778479517,
-0.1228334308,
0.0072775809,
0.385651201,
-0.0098590907,
0.0210646521,
-0.1028502882,
0.095091626,
-0.1343249828,
0.0502206981,
-0.0464187972,
0.5333323479,
0.0985554308,
-0.0290788487,
-0.3126525581,
0.1436279863,
-0.1272805482,
0.0284886584,
-0.354952842,
0.2260953486,
0.0914424583,
0.0222656205,
-0.1129089072,
-0.1449516416,
-0.105796352,
-0.377746135,
-0.1303082407,
-0.0647923201,
-0.1164512336,
0.2615470588,
0.04680565,
0.1408678889,
0.0153284986,
0.183649689,
-0.0888251513,
-0.0798201784,
0.0560156591,
0.1659263372,
0.030904673,
-0.1562289745,
0.0995922759,
0.3499718904,
-0.2149251848,
0.3305163383,
-0.0282806307,
0.004311041,
0.2621330917,
-0.0654079467,
0.2236412466,
-0.0046036975,
-0.169635877,
-0.170052141,
0.1573259532,
0.3195594549,
0.2790392339,
0.4257174134,
-0.1835498512,
0.2620309293,
-0.2240250856,
-0.0194210317,
-0.0320296399,
-0.2041933388,
0.397356391,
-0.0402052775,
-0.2122870386,
0.1489670575,
0.0500454232,
0.0972130895,
-0.380528152,
0.0917961374,
0.534676075,
0.3667449653,
-0.1153623685,
-0.0519740246,
0.1393238455,
-0.2012266815,
-0.0465842485,
0.2378787547,
0.4073153436,
-0.2428213507,
0.3220580816,
0.3114140332,
-0.1779222488,
-0.1545044184,
-0.2444867492,
0.1342820078,
-0.414935112,
-0.1385660022,
-0.073989436,
0.0918325186,
0.3514863253,
-0.1177845299,
-0.349391222,
-0.0393289514,
-0.3893738091,
-0.2609694004,
0.0392019525,
0.0554524809,
-0.412981838,
0.2758528292,
-0.1572724581,
-0.260173142,
0.6843771935,
0.1336858869,
0.2077941,
0.0586447865,
-0.0143997744,
-0.1639037281,
0.0906633511,
0.3026433885,
0.007920919,
-0.3472725749,
-0.1967206597,
0.0243561585,
0.0968456119,
0.2546086907,
0.0832843855,
-0.3948380351,
0.0056925365,
-0.1763914227,
-0.3079241812,
0.1376844496,
0.398531884,
0.3520648479,
-0.0390950739,
0.3587333262,
0.0543933064,
-0.246172756,
0.0639034882,
-0.1973074228,
0.0988060459,
0.214909032,
0.2828917503,
-0.0869075507,
-0.0103257289,
0.1060942486,
0.7117595673,
0.1243424341,
0.1005881205,
-0.2020204216,
0.1810496449,
0.0370498784,
-0.0275916271,
-0.0837439448,
-0.0909047946,
0.0096269762,
0.0042432481,
0.2147709429,
0.0828163177,
-0.1902159601,
0.0145151038,
-0.4335152805,
0.0739331394,
-0.4075348377,
-0.1859937906,
-0.1842155457,
0.0807261765,
-0.0781265944,
-0.2187796533,
0.0463930033,
-0.047010757,
0.1130550057,
0.2056182325,
0.1442306191,
0.0345122218,
0.1961041987,
0.1685278267,
-0.1468209475,
-0.0649719909,
0.0567880496,
-0.1748387367,
-0.0950680673,
-0.1413590014,
0.1277732998,
-0.0532867238,
0.1251451224,
0.0307708848,
0.1357844472,
-0.1344011873,
-0.3740146756,
0.5705131888,
-0.1178020164,
0.2398728281,
0.1874299347,
0.7420173287,
0.2367303222,
-0.4430398941,
-0.2225353718,
0.0031146582,
-0.0831588283,
0.0805339366,
0.0103644496,
-0.0924401209,
0.3075006604,
-0.3651405871,
0.3522943258,
0.2523471415,
-0.3267401159,
-0.0136668533,
0.238766551,
-0.0429711081,
0.0609125979,
0.0810818076,
-0.124484174,
-0.1813777089,
0.0225280691,
-0.1755090803,
0.0509800091,
-0.0232458897,
0.0967113972,
0.3447776437,
0.2877471447,
-0.1788850278,
0.1250116676,
-0.2563883662,
-0.2498847395,
0.3440088034,
0.3288626075,
0.2863620818,
0.0982401669,
0.2984204292,
-0.0808834508,
-0.1404107958,
-0.3924526572,
-0.2211462706,
-0.0583141111,
-0.2038705349,
0.0735813826,
-0.1195953339,
-0.1138125584,
0.1394191235,
0.2306334674,
-0.3381366432,
0.2312400341,
0.4818418026,
1.0101215839,
0.204186365,
0.165259406,
-0.0697908178,
-0.1442314386,
0.2439835966,
-0.2229329348,
-0.1360519528,
-0.1637485027,
0.2304183692,
-0.0759374201,
-0.1989164501,
-0.2775564492,
-0.3822060525,
-0.3142222464,
0.0119445445,
-0.0743409321,
0.4888973534,
0.4017028809,
0.2653290629,
0.2999497056,
-0.2178623974,
0.1632163078,
0.2704981267,
0.2467820346,
-0.1049783155,
0.189106375,
-0.4390889704,
-0.0882021636,
0.0604083613,
-0.4058876336,
-0.0162967406,
-0.2223311216,
-0.233203724,
-0.1445060968,
-0.4406577051,
0.1670088321,
-0.1291555315,
0.5059282184,
0.2440743744,
-0.209354192,
0.102772817,
0.2649609447,
0.2916143835,
-0.1853434443,
-0.0819916055,
0.3827394545,
-0.1766078621,
0.0044975993,
0.0444610901,
-0.146746397,
-0.6825783849,
-0.3300893605,
0.2243581563,
-0.4181086123,
0.1528825313,
0.1149986163,
0.2295549065,
-0.1621683389,
-0.0313654467,
0.2354750484,
0.0127257081,
-0.0504766442,
-0.1562615782,
-0.1764850765,
-0.0949632451,
-0.011537984,
0.0572725311,
0.177635923,
-0.1221825331,
-0.0043485244,
0.0462484211,
-0.0637203529,
-0.2676211894,
-0.3622904122,
0.0269839112,
-0.0703399107,
-0.0682083145,
-0.3336560726,
-0.4414449334,
0.0415688828,
0.1549949497,
0.1935797483,
0.3658004403,
0.011619946,
0.1178833768,
-0.2154310346,
-0.1136132702,
-0.2377062291,
0.0211869702,
0.0573231913,
0.3169178665,
-0.1334808916,
0.2033970058,
-0.4532181919,
-0.0035068819,
-0.1455863565,
0.0455384851,
-0.0964062139,
-0.1757647842,
0.0725232437,
-0.2697321475,
0.0596674345,
-0.0058454727,
-0.1340558529,
-0.3921160102,
0.0841302723,
0.0267019793,
0.0206165276,
-0.0549505539,
-0.1069831923,
0.1314640045,
0.0660915822,
0.2539783418,
0.2302121818,
-0.2561480701,
0.04478525,
-0.2317013592,
-0.0291187577,
0.2404360324,
-0.1536145508,
-0.0962266475,
-0.0893952101,
-0.0734615847,
-0.0699386001,
0.2590690553,
-0.2949039042,
-0.0956853107,
-0.3009991944,
0.3255120218,
0.1904642433,
0.6116005778,
0.1494930536,
0.2824513316,
-0.3490387201,
0.008494514,
0.0490785092,
-0.2194645703,
-0.1845227033,
-0.1054211706,
0.0491943061,
0.3083282113,
0.0818329379,
-0.0254663341,
0.0828009248,
0.0707867816,
0.1614301801,
0.194750607,
0.3072244823,
0.0032273945,
-0.0959273651,
0.1920976043,
0.4509055614,
0.0354574956,
0.2687070668,
0.2249557078,
-0.0360305645,
-0.0229792874,
-0.0078602498,
-0.0772271156,
0.2085628361,
-0.5608742833,
0.0735955164,
0.1851677448,
0.2538558841,
-0.3577559292,
0.151540041,
0.2550839782,
0.4018427134,
0.2072623968,
0.0781140998,
-0.2731211782,
0.3473391831,
0.1850319058,
0.2469533682,
-0.3630999625,
0.0973586515,
0.3581003547,
0.2608880401,
0.264149785,
-0.5512396693,
0.0599378683,
0.1280628592,
-0.1140131503,
0.007069164,
0.1483374238,
-0.1726664305,
0.3484256268,
0.0701750293,
0.117317155,
-0.1576863676,
0.2537462711,
0.2547808886,
-0.1003007144,
-0.2567450702,
0.1413747966,
-0.1786608249,
-0.0449964106,
0.1989768445,
0.1322673261,
-0.1586604565,
-0.09726841,
-0.0086877095,
0.2100084722,
-0.1239222586,
-0.0246137958,
-0.0783381313,
-0.1761468947,
0.1998941004,
-0.0950509757,
0.2761696875,
-0.1862761825,
0.000820675,
-0.127041772,
-0.4025526643,
0.0845995694,
0.2641232908,
0.4948489666,
-0.3315715194,
0.3264035285,
0.1819824427,
0.2723065913,
0.3279452622,
0.1780243963,
-0.188112244,
0.0124260215,
-0.1509708464,
0.1788862646,
0.131488651,
0.2729463875,
0.1157794967,
0.0234927442,
-0.1006554812,
0.0409958363,
-0.0147230197,
0.154278174,
-0.2427703887,
0.1167725623,
0.0859433636,
-0.2183196396,
0.2752507031,
0.3080465496,
-0.267742157,
-0.38939026,
-0.1479623169,
0.0270616096,
-0.2963762581,
0.3225809932,
0.3261469901,
0.0010134629,
0.1081581935,
-0.0064661503,
0.2519922853,
-0.0191129278,
0.2488677949,
0.1714691967,
-0.0196568798,
0.328276217,
-0.0788059682,
0.0099037932,
-0.0141860088,
-0.2689396143,
-0.0474270545,
-0.2118380368,
0.0241255965,
0.3048335314,
-0.5105571747,
-0.3030875027,
-0.1635099649,
0.2892413735,
-0.0589549653,
-0.0350435786,
-0.3714102209,
0.1745922714,
-0.0592110269,
0.2475356013,
-0.1885933876,
0.1453858614,
0.1247234717,
0.1852006912,
-0.1509154737,
-0.0149134379,
-0.0826162696,
0.1859999448,
-0.3763684332,
-0.0188313667,
0.0819666237,
-0.3698541224,
-0.0416714177,
-0.123229377,
0.3975320756,
0.2553046942,
-0.1048209146,
-0.1164654568,
-0.1795661896,
-0.0557431541,
-0.07542824,
-0.5268595815,
0.144515872,
0.0062458785,
0.1717689037,
-0.0963824391,
-0.1835618764,
0.0035457064,
-0.0870831013,
-0.0532364957,
-0.2481441647
] |
https://github.com/huggingface/datasets/issues/3035 | `load_dataset` does not work with uploaded arrow file | Hi ! This is not a bug, this is simply not implemented.
`save_to_disk` is for on-disk serialization and was not made compatible for the Hub.
That being said, I agree we actually should make it work with the Hub x) | ## Describe the bug
I've preprocessed and uploaded a dataset here: https://huggingface.co/datasets/ami-wav2vec2/ami_headset_single_preprocessed . The dataset is in `.arrow` format.
The dataset can correctly be loaded when doing:
```bash
git lfs install
git clone https://huggingface.co/datasets/ami-wav2vec2/ami_headset_single_preprocessed
```
followed by
```python
from datasets import load_from_disk
ds = load_from_disk("./ami_headset_single_preprocessed")
```
However when I try to directly download the dataset as follows:
```python
from datasets import load_dataset
ds = load_dataset("ami-wav2vec2/ami_headset_single_preprocessed")
```
the following error occurs:
```bash
/usr/local/lib/python3.7/dist-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs)
1115 ignore_verifications=ignore_verifications,
1116 try_from_hf_gcs=try_from_hf_gcs,
-> 1117 use_auth_token=use_auth_token,
1118 )
1119
/usr/local/lib/python3.7/dist-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
635 if not downloaded_from_gcs:
636 self._download_and_prepare(
--> 637 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
638 )
639 # Sync info
/usr/local/lib/python3.7/dist-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
724 try:
725 # Prepare split will record examples associated to the split
--> 726 self._prepare_split(split_generator, **prepare_split_kwargs)
727 except OSError as e:
728 raise OSError(
/usr/local/lib/python3.7/dist-packages/datasets/builder.py in _prepare_split(self, split_generator)
1186 generator, unit=" tables", leave=False, disable=bool(logging.get_verbosity() == logging.NOTSET)
1187 ):
-> 1188 writer.write_table(table)
1189 num_examples, num_bytes = writer.finalize()
1190
/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in write_table(self, pa_table, writer_batch_size)
424 # reorder the arrays if necessary + cast to self._schema
425 # we can't simply use .cast here because we may need to change the order of the columns
--> 426 pa_table = pa.Table.from_arrays([pa_table[name] for name in self._schema.names], schema=self._schema)
427 batches: List[pa.RecordBatch] = pa_table.to_batches(max_chunksize=writer_batch_size)
428 self._num_bytes += sum(batch.nbytes for batch in batches)
/usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_arrays()
/usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib._sanitize_arrays()
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.asarray()
/usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib.ChunkedArray.cast()
/usr/local/lib/python3.7/dist-packages/pyarrow/compute.py in cast(arr, target_type, safe)
279 else:
280 options = CastOptions.unsafe(target_type)
--> 281 return call_function("cast", [arr], options)
282
283
/usr/local/lib/python3.7/dist-packages/pyarrow/_compute.pyx in pyarrow._compute.call_function()
/usr/local/lib/python3.7/dist-packages/pyarrow/_compute.pyx in pyarrow._compute.Function.call()
/usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
/usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
ArrowNotImplementedError: Unsupported cast from struct<train: struct<name: string, num_bytes: int64, num_examples: int64, dataset_name: string>, validation: struct<name: string, num_bytes: int64, num_examples: int64, dataset_name: string>, test: struct<name: string, num_bytes: int64, num_examples: int64, dataset_name: string>> to list using function cast_list
```
## Expected results
The dataset should be correctly loaded with `load_dataset` IMO.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.2.dev0
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 5.0.0
| 40 | `load_dataset` does not work with uploaded arrow file
## Describe the bug
I've preprocessed and uploaded a dataset here: https://huggingface.co/datasets/ami-wav2vec2/ami_headset_single_preprocessed . The dataset is in `.arrow` format.
The dataset can correctly be loaded when doing:
```bash
git lfs install
git clone https://huggingface.co/datasets/ami-wav2vec2/ami_headset_single_preprocessed
```
followed by
```python
from datasets import load_from_disk
ds = load_from_disk("./ami_headset_single_preprocessed")
```
However when I try to directly download the dataset as follows:
```python
from datasets import load_dataset
ds = load_dataset("ami-wav2vec2/ami_headset_single_preprocessed")
```
the following error occurs:
```bash
/usr/local/lib/python3.7/dist-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs)
1115 ignore_verifications=ignore_verifications,
1116 try_from_hf_gcs=try_from_hf_gcs,
-> 1117 use_auth_token=use_auth_token,
1118 )
1119
/usr/local/lib/python3.7/dist-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
635 if not downloaded_from_gcs:
636 self._download_and_prepare(
--> 637 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
638 )
639 # Sync info
/usr/local/lib/python3.7/dist-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
724 try:
725 # Prepare split will record examples associated to the split
--> 726 self._prepare_split(split_generator, **prepare_split_kwargs)
727 except OSError as e:
728 raise OSError(
/usr/local/lib/python3.7/dist-packages/datasets/builder.py in _prepare_split(self, split_generator)
1186 generator, unit=" tables", leave=False, disable=bool(logging.get_verbosity() == logging.NOTSET)
1187 ):
-> 1188 writer.write_table(table)
1189 num_examples, num_bytes = writer.finalize()
1190
/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in write_table(self, pa_table, writer_batch_size)
424 # reorder the arrays if necessary + cast to self._schema
425 # we can't simply use .cast here because we may need to change the order of the columns
--> 426 pa_table = pa.Table.from_arrays([pa_table[name] for name in self._schema.names], schema=self._schema)
427 batches: List[pa.RecordBatch] = pa_table.to_batches(max_chunksize=writer_batch_size)
428 self._num_bytes += sum(batch.nbytes for batch in batches)
/usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib.Table.from_arrays()
/usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib._sanitize_arrays()
/usr/local/lib/python3.7/dist-packages/pyarrow/array.pxi in pyarrow.lib.asarray()
/usr/local/lib/python3.7/dist-packages/pyarrow/table.pxi in pyarrow.lib.ChunkedArray.cast()
/usr/local/lib/python3.7/dist-packages/pyarrow/compute.py in cast(arr, target_type, safe)
279 else:
280 options = CastOptions.unsafe(target_type)
--> 281 return call_function("cast", [arr], options)
282
283
/usr/local/lib/python3.7/dist-packages/pyarrow/_compute.pyx in pyarrow._compute.call_function()
/usr/local/lib/python3.7/dist-packages/pyarrow/_compute.pyx in pyarrow._compute.Function.call()
/usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
/usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
ArrowNotImplementedError: Unsupported cast from struct<train: struct<name: string, num_bytes: int64, num_examples: int64, dataset_name: string>, validation: struct<name: string, num_bytes: int64, num_examples: int64, dataset_name: string>, test: struct<name: string, num_bytes: int64, num_examples: int64, dataset_name: string>> to list using function cast_list
```
## Expected results
The dataset should be correctly loaded with `load_dataset` IMO.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.2.dev0
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 5.0.0
Hi ! This is not a bug, this is simply not implemented.
`save_to_disk` is for on-disk serialization and was not made compatible for the Hub.
That being said, I agree we actually should make it work with the Hub x) | [
-0.392804116,
-0.0385757759,
0.0167483445,
0.2226260602,
0.1754208654,
-0.0094852252,
0.5628120899,
0.085138008,
0.2055555284,
-0.0173035618,
0.0880222917,
0.4524753094,
-0.0171562377,
0.0238931589,
-0.0179101508,
0.0333889201,
0.0853120387,
0.102919139,
-0.3803859055,
0.0196573958,
-0.1442723721,
0.2501570582,
-0.2272598594,
0.1319895387,
-0.2122672945,
0.1587938219,
0.2464159727,
0.4314402342,
-0.1021872982,
-0.4040692747,
0.4824697673,
0.0766625628,
0.1761623323,
0.5237113237,
-0.0001266862,
0.2380870432,
0.4700064063,
-0.1962801516,
-0.4834667146,
-0.3951969743,
-0.3488003314,
-0.1319031715,
0.3145773113,
-0.0640483946,
0.1231688783,
-0.4004473388,
-0.2247779518,
-0.4206042588,
0.4897972941,
0.1957880706,
0.1233585179,
0.1910227984,
0.2313358486,
-0.0189751238,
0.074591741,
0.3110903502,
-0.175247699,
0.3732424676,
-0.013807008,
0.1329819262,
0.2628332376,
0.1539949477,
0.051564917,
0.1624950916,
0.3405148089,
-0.044847507,
-0.157779634,
-0.0908572674,
0.0367794037,
0.2183104753,
0.604282856,
-0.3275974095,
-0.5339690447,
-0.2552390695,
0.0452342816,
-0.2088919431,
0.2747495472,
0.1828292459,
-0.0922197998,
0.1072446331,
0.0007660193,
-0.1723812073,
-0.2028945684,
0.1726579964,
0.1561827511,
-0.0302464645,
-0.1611976922,
0.2643854916,
0.0948305801,
-0.0824206844,
0.0147350216,
-0.1557416469,
-0.242860049,
0.3321093321,
-0.2456999123,
0.31468454,
-0.2571252584,
-0.3491092622,
0.1799942255,
0.4133504927,
0.345842272,
0.0946352929,
-0.1347862333,
0.1890298873,
0.3255596459,
0.1741336584,
0.0474793203,
0.132038027,
0.2025799453,
0.2669733465,
-0.0124064898,
-0.0857022703,
-0.3571212292,
-0.3845461309,
0.3005621731,
-0.1831318289,
0.2558127642,
-0.0825493932,
-0.21890001,
-0.0353712924,
-0.0499065816,
-0.0716864094,
-0.0803834498,
0.1496352106,
0.2561118007,
0.2459232807,
0.2073506862,
0.528603673,
-0.0260195564,
-0.0935108736,
0.0167674292,
-0.2516643405,
-0.0489032865,
-0.0488451682,
0.2139728069,
-0.2573981583,
0.4595925212,
-0.0499899089,
0.0545421541,
-0.3271281719,
0.0426556468,
-0.0441379063,
0.1464913785,
0.3049202561,
0.1913828105,
0.1889034063,
0.0683100596,
0.0127458991,
-0.0452579036,
0.3910393417,
-0.4058476686,
-0.2261779755,
-0.1780997366,
0.0657502562,
-0.1617325395,
-0.0106898444,
-0.6739573479,
-0.0922311768,
-0.0615394115,
-0.1851827949,
-0.0032765886,
-0.2532430887,
-0.2216694653,
-0.1961096227,
0.3805975914,
0.3868358731,
-0.4505638778,
-0.1303246766,
-0.367046833,
-0.0786690637,
0.0814645067,
0.2125310153,
-0.2620463371,
0.2521260679,
-0.4439152777,
0.211265862,
0.6082787514,
-0.4810083807,
-0.3692698181,
0.3420461118,
0.0852799714,
0.3052784801,
-0.0568237342,
-0.1006573588,
-0.2048590928,
-0.0342243575,
0.0161905382,
0.3535472155,
0.2185234427,
-0.0379902236,
-0.1238766909,
-0.3244943619,
-0.1962778866,
0.021968767,
-0.2239889354,
0.0114568109,
0.2258776426,
-0.2454329431,
0.2816852331,
0.0187819656,
0.0667982027,
0.1274471581,
0.1235371456,
-0.1271112114,
0.0371443145,
-0.0091039669,
-0.8017454147,
0.2910638452,
-0.0601298101,
-0.3009422719,
-0.4226389527,
0.0678755865,
-0.3960786164,
0.2581457198,
-0.4720346928,
0.1035211906,
-0.1119293496,
0.0592127889,
0.0588047095,
-0.0274451263,
-0.242696017,
0.2591318488,
-0.0610547103,
0.1389799118,
-0.1125166044,
0.130720526,
0.2221419215,
-0.1746872663,
0.0325517543,
-0.0048123756,
0.0524021573,
-0.0885365233,
-0.2877314985,
0.4403914213,
-0.0073629562,
0.2840349078,
-0.0813916773,
-0.1785125583,
0.0485590808,
-0.3220832348,
-0.1697807908,
0.1743818074,
0.3360584378,
-0.000553753,
-0.1871083528,
0.2288465649,
-0.1562402248,
0.3641757965,
0.1003366634,
-0.0662212968,
0.2525089681,
0.2296379656,
-0.1318341941,
-0.1903589368,
0.0053255311,
0.0672822744,
0.4375485778,
-0.0502095409,
0.0184771791,
-0.1339349896,
0.2760749161,
0.0936547369,
0.0431069955,
0.1131165847,
-0.3350436389,
-0.0052080099,
-0.0236540418,
0.239619121,
0.4954309165,
0.0771511793,
-0.0373494029,
-0.0615653917,
0.0860911682,
-0.1167545542,
0.2973297536,
0.0092098061,
0.5016462207,
0.5203512907,
-0.0380836613,
-0.0429962277,
-0.1453181803,
0.0857744962,
0.0123477513,
0.124986887,
-0.4560659826,
0.1069254875,
-0.2204197794,
0.1423385888,
-0.1825630218,
-0.2159540951,
-0.2390971929,
-0.0587082207,
-0.2701593935,
0.1804374307,
-0.0484638065,
0.0130076483,
-0.3017247021,
0.0297413711,
0.1759512126,
-0.6335484982,
-0.2036148161,
0.1180639118,
-0.1505987644,
-0.145036757,
0.2618305981,
0.0294443257,
0.1087061465,
0.1060067564,
0.1152714267,
-0.2883918881,
0.1273945123,
0.0943464562,
0.032535769,
0.3252061009,
0.0032012002,
0.0128995981,
0.1955062747,
0.0235364679,
0.2107588798,
-0.060944818,
-0.1564697772,
0.1369182765,
0.0409024321,
-0.0140007464,
-0.208501175,
-0.08711043,
-0.0875755101,
-0.4136025906,
0.1480882019,
0.2105261534,
0.0891034752,
0.2594254315,
0.3279232681,
0.045998957,
0.2531624734,
-0.0681631193,
-0.0998169035,
-0.2595495284,
0.4124751091,
-0.1651925445,
-0.295486629,
0.1200207025,
0.0689313337,
0.2598124146,
0.3976530135,
-0.2447840422,
0.3146598339,
-0.0863741562,
0.1802364439,
-0.1535915583,
0.1298539191,
0.0940977931,
0.0569921546,
0.0842631832,
-0.2452425808,
-0.1371390373,
0.4301893115,
-0.0857708156,
-0.0394984148,
0.1920608133,
0.2589604855,
-0.1920582056,
0.9589236975,
0.1657007933,
-0.1899136007,
0.4515730441,
-0.0626033321,
0.2651636302,
-0.2975692749,
-0.1488749832,
-0.3305052221,
-0.0949047059,
0.3834433258,
0.1691970378,
0.1534480453,
-0.0464304201,
-0.2906721532,
0.1497850567,
-0.3273988664,
-0.1533510387,
0.024529038,
-0.2167937458,
0.1556582451,
0.0804334357,
0.0414080955,
0.045213338,
-0.0620453432,
0.154437393,
0.1561474949,
0.3488094509,
0.0958568826,
-0.0648325011,
0.1152488142,
-0.1978681982,
0.3099136651,
-0.0990282521,
0.4291457236,
0.063654691,
-0.2493882328,
0.0766881257,
-0.0876041427,
0.1605838686,
-0.048891671,
0.1311449111,
0.0588441715,
0.2714076638,
-0.5301750898,
-0.1054793447,
0.0336596705,
0.2696273029,
-0.0778770372,
0.3258432746,
-0.2757653892,
-0.2210530192,
-0.1089578941,
0.1899876595,
-0.1685873568,
-0.2320854366,
-0.499545902,
-0.0937873349,
-0.4460035264,
-0.2615472376,
0.0692779645,
0.0557036735,
-0.0375477634,
0.0440716594,
-0.3059915602,
-0.0477649346,
-0.1559599042,
-0.0461532623,
0.5293851495,
-0.0346859433,
0.2297749668,
0.2533617616,
0.2043486089,
0.3923655152,
0.9946926832,
0.1170086563,
-0.3605108857,
-0.0189946461,
-0.1954948455,
0.0134469382,
0.1995457709,
-0.1793258786,
-0.0370314308,
0.0659674779,
-0.0958579704,
-0.2378636748,
-0.0579886921,
0.371974349,
-0.1346074194,
-0.1779796183,
-0.3902960718,
0.4403552711,
-0.0463348329,
0.022623105,
0.6479896307,
0.2945664227,
-0.2893549204,
0.3713155389,
-0.1857061684,
0.6410072446,
-0.0072917859,
0.1665140539,
0.3613030612,
-0.2030655444,
0.0581230223,
0.2107587606,
-0.1179317385,
-0.1833381206,
0.2211197764,
0.051821541,
-0.1708903015,
0.1448738873,
0.3337959349,
0.0868998766,
0.1629762053,
-0.2469784319,
-0.4546182454,
0.0715655535,
0.2556043565,
0.0192358624,
-0.2982586622,
-0.1839310974,
-0.0088169258,
0.0212731604,
0.2781358361,
-0.0108428327,
-0.266890496,
-0.2611705065,
-0.2581223845,
-0.2708306909,
0.3368835747,
-0.2788785398,
0.0753164738,
-0.0241831895,
-0.2503834665,
0.4295492172,
0.116810225,
-0.0822466761,
-0.0674661621,
-0.1181983054,
0.2264469564,
0.0750830472,
0.191188395,
-0.1344940066,
0.0470433235,
0.2539543509,
-0.0824158266,
-0.0829532444,
-0.0371766128,
-0.2738029361,
-0.4156754613,
0.2229029387,
0.150718987,
0.1507604718,
-0.0965514928,
-0.5121366978,
0.005867939,
0.0601473153,
-0.1327403039,
0.0135403611,
0.2098994255,
-0.0614821836,
-0.0399887227,
0.076748319,
-0.3444850445,
0.139949277,
0.3128023148,
-0.2815853953,
-0.1254167557,
0.7536578178,
0.0179867204,
-0.0245298855,
-0.1133966371,
0.1397449821,
0.296864748,
-0.7724611163,
0.154485479,
0.0928613693,
0.2531689405,
-0.1257006079,
0.1648360789,
-0.0060045398,
-0.0596879087,
0.0369216949,
-0.392324537,
-0.2604143918,
-0.1187117025,
-0.1481981874,
0.0749985576,
-0.0529897027,
-0.4901479483,
0.0359701291,
-0.0121284323,
-0.1122841612,
0.1884348243,
0.2668173313,
-0.1087612361,
0.0547934808,
0.1638568491,
0.3520552218,
-0.1077106893,
0.0714961812,
-0.1255728155,
-0.1731893271,
-0.0795468166,
-0.3316272795,
0.2414635569,
-0.0462802164,
-0.2366833091,
-0.0542963035,
-0.3598948717,
-0.267395854,
-0.0978857279,
0.1496717334,
0.110804081,
-0.1059017554,
-0.0554238856,
0.273422122,
0.1384600848,
-0.5284574032,
0.1403842568,
-0.0863629282,
0.2718794942,
0.0367351659,
0.1091124862,
0.0232671145,
-0.0157553386,
-0.2853732407,
-0.1098775491,
0.1521998048,
0.182557404,
0.434696883,
-0.5272272825,
0.1216713488,
-0.2600218058,
0.4482315481,
0.4712630808,
-0.2966116071,
-0.0969647095,
0.050544586,
0.0731728598,
-0.3087880313,
0.0147943888,
-0.0140916314,
-0.0205528922,
-0.027233867,
0.0606547855,
0.1167034656,
-0.0568947233,
-0.1829493642,
0.0467578433,
0.0847916827,
0.13466236,
0.03340967,
0.2393918931,
0.1285165846,
0.3423343897,
0.0011633524,
0.0445132814,
0.2231580168,
0.3552337885,
-0.4064997137,
0.0329584591,
0.2613239884,
-0.0802793503,
-0.1125840396,
-0.576657176,
-0.1168256849,
0.0341823287,
-0.0248097405,
0.3383744061,
0.2350029796,
0.4345441759,
0.0151353478,
-0.3263428509,
-0.0173830166,
-0.0809733272,
0.1055659726,
-0.1739930063,
-0.2680948079,
-0.2243257314,
-0.4313217103,
0.0411838964,
-0.1140127853,
-0.0563381538,
0.0501934886,
0.4221435487,
0.0347735137,
-0.3985873163,
-0.0143739423,
0.1931207627,
0.0958736315,
-0.2088320255,
0.3759171665,
0.1985501647,
-0.1322647929,
0.3545093834,
0.1256339848,
0.5038227439,
0.3345340192,
0.1414294392,
0.1233941168,
0.0310894456,
0.028940957,
-0.0510109141,
0.1950749457,
0.1536600441,
0.1345945448,
0.3932489157,
0.0479424223,
-0.033444304,
-0.1213955805,
0.1529320478,
0.2026506364,
-0.2858663201,
0.3751784861,
-0.4824719131,
-0.1187904403,
-0.2758620977,
0.2221388221,
-0.1145483106,
0.1208853647,
0.4489732683,
0.0757257417,
0.0557187907,
-0.1820958406,
-0.0023132372,
-0.0283036157,
0.5782277584,
0.4788326621,
0.28984043,
-0.0948031768,
-0.1231632531,
-0.7397432327,
0.1035155952,
-0.0945944116,
0.1611815393,
0.1131937429,
0.2436010689,
0.1380714923,
0.1662858427,
0.4788475335,
-0.1208256632,
0.3649381697,
0.339094758,
-0.2787333727,
-0.0758581161,
-0.0599626675,
0.1715663671,
-0.1399907768,
-0.7324589491,
-0.093725197,
-0.2076999694,
-0.1209665611,
0.1690392047,
-0.2040300816,
0.1034212187,
0.2372512072,
0.6178171635,
-0.0212991964,
0.2736257911,
-0.103754878,
-0.2025933862,
-0.4133882523,
-0.1363096535,
-0.1696697325,
0.3023107052,
0.0300983023,
0.3296406865,
-0.2358538359,
-0.0351930484,
-0.3775765896,
-0.1358861625,
-0.1019800752,
-0.2145255059,
-0.3684646189,
-0.0404107086,
-0.2793080509,
0.0877420232,
0.0811528787,
0.0050385292,
-0.1258525103,
0.1431511939,
-0.3643755615,
-0.1473313868,
0.5720825791,
-0.3036630154,
-0.198509559,
0.1654935479,
0.3097408712,
0.1713482589,
0.0038208845,
-0.4751103222,
0.2150405943,
0.4010901451,
-0.1070168391,
-0.0849661157,
0.0674709156,
-0.2961491048,
0.0849304125,
-0.0155882416,
0.6250622272,
-0.0113141621,
-0.3383396566,
-0.1204133332,
-0.3342067003
] |
https://github.com/huggingface/datasets/issues/3032 | Error when loading private dataset with "data_files" arg | We'll do a release tomorrow or on wednesday to make the fix available :)
Thanks for reproting ! | ## Describe the bug
A clear and concise description of what the bug is.
Private datasets with no loading script can't be loaded using `data_files` parameter.
## Steps to reproduce the bug
```python
from datasets import load_dataset
data_files = {"train": "**/train/*/*.jsonl", "valid": "**/valid/*/*.jsonl"}
dataset = load_dataset('dalle-mini/encoded', data_files=data_files, use_auth_token=True, streaming=True)
```
Same error happens in non-streaming mode.
## Expected results
Files should be loaded (whether in streaming or not).
## Actual results
Error:
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, return_associated_base_path, data_files, **download_kwargs)
539 try:
--> 540 local_path = cached_path(file_path, download_config=download_config)
541 except FileNotFoundError:
8 frames
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/dalle-mini/encoded/resolve/main/encoded.py
During handling of the above exception, another exception occurred:
HTTPError Traceback (most recent call last)
HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/datasets/dalle-mini/encoded?full=true
During handling of the above exception, another exception occurred:
FileNotFoundError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, return_associated_base_path, data_files, **download_kwargs)
547 except Exception:
548 raise FileNotFoundError(
--> 549 f"Couldn't find a directory or a {resource_type} named '{path}'. "
550 f"It doesn't exist locally at {expected_dir_for_combined_path_abs} or remotely on {hf_api.endpoint}/datasets"
551 )
FileNotFoundError: Couldn't find a directory or a dataset named 'dalle-mini/encoded'. It doesn't exist locally at /content/dalle-mini/encoded or remotely on https://huggingface.co/datasets
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.12
- PyArrow version: 3.0.0
@lhoestq | 18 | Error when loading private dataset with "data_files" arg
## Describe the bug
A clear and concise description of what the bug is.
Private datasets with no loading script can't be loaded using `data_files` parameter.
## Steps to reproduce the bug
```python
from datasets import load_dataset
data_files = {"train": "**/train/*/*.jsonl", "valid": "**/valid/*/*.jsonl"}
dataset = load_dataset('dalle-mini/encoded', data_files=data_files, use_auth_token=True, streaming=True)
```
Same error happens in non-streaming mode.
## Expected results
Files should be loaded (whether in streaming or not).
## Actual results
Error:
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, return_associated_base_path, data_files, **download_kwargs)
539 try:
--> 540 local_path = cached_path(file_path, download_config=download_config)
541 except FileNotFoundError:
8 frames
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/dalle-mini/encoded/resolve/main/encoded.py
During handling of the above exception, another exception occurred:
HTTPError Traceback (most recent call last)
HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/datasets/dalle-mini/encoded?full=true
During handling of the above exception, another exception occurred:
FileNotFoundError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, return_associated_base_path, data_files, **download_kwargs)
547 except Exception:
548 raise FileNotFoundError(
--> 549 f"Couldn't find a directory or a {resource_type} named '{path}'. "
550 f"It doesn't exist locally at {expected_dir_for_combined_path_abs} or remotely on {hf_api.endpoint}/datasets"
551 )
FileNotFoundError: Couldn't find a directory or a dataset named 'dalle-mini/encoded'. It doesn't exist locally at /content/dalle-mini/encoded or remotely on https://huggingface.co/datasets
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.12
- PyArrow version: 3.0.0
@lhoestq
We'll do a release tomorrow or on wednesday to make the fix available :)
Thanks for reproting ! | [
-0.2903700173,
0.1561492085,
0.030724667,
0.430328846,
0.1911777556,
0.0257792454,
0.4299963117,
0.4009223878,
0.1551964581,
0.0551268384,
-0.1564759314,
0.2306967527,
-0.1625583321,
-0.0824603289,
0.0650249943,
0.066634275,
-0.0849666372,
0.108527936,
0.0225837827,
0.0579894707,
-0.2959386706,
0.1074580997,
-0.2376062125,
-0.1826735884,
0.1591900736,
-0.0057858578,
0.1428615302,
0.4598131776,
-0.1129725948,
-0.3364358544,
0.1604580432,
-0.2739301622,
0.3451862335,
0.5930117369,
-0.0001165896,
0.3240573406,
0.5787171721,
-0.1371544302,
-0.5110732913,
-0.3130850494,
-0.4098592401,
-0.00290496,
0.1808118969,
-0.1826782376,
-0.1313367486,
-0.3966869712,
-0.0281596109,
-0.4218596518,
0.5495310426,
0.3786802888,
0.1711919457,
0.3091495931,
-0.1985797435,
-0.1525229216,
0.1244912371,
0.1165711582,
-0.0178763457,
0.2135332525,
-0.0137813538,
0.1712696403,
-0.1668858677,
0.2870502174,
-0.3148835301,
-0.0619247854,
0.3347289264,
0.1140481532,
-0.092449531,
-0.2097165436,
0.1381495297,
0.1114529148,
0.7266334295,
-0.2186491191,
-0.3816863298,
-0.2797212303,
0.1342335343,
-0.2664972246,
0.1291688979,
0.2379083931,
-0.1455364674,
0.082292974,
-0.1256529391,
-0.025685193,
-0.2556143105,
0.2286866009,
0.3236034214,
-0.1296073347,
-0.0598885007,
0.0780797079,
-0.1961851269,
-0.129545927,
0.0115273586,
-0.1408374906,
-0.0918882489,
0.2059095502,
-0.0049394127,
0.16669254,
0.1341943592,
0.0815422088,
0.1596105695,
0.3349063694,
0.2448386848,
-0.0739028528,
-0.1038275287,
0.0755731985,
0.0272546355,
0.1585675478,
0.0338098332,
0.1374544948,
0.404643327,
0.4681553841,
-0.0009267713,
0.0102075003,
-0.1450332254,
-0.0577475876,
-0.1240946427,
-0.1071584672,
0.5488463044,
-0.2591854036,
-0.4094162583,
-0.0085610664,
-0.0853663608,
0.0556017198,
0.0278592855,
0.4063491821,
-0.0116297146,
-0.0949261338,
0.2150744945,
0.1685713679,
-0.0836135298,
-0.2357354313,
-0.1969791055,
-0.1580428928,
0.0442065224,
0.1360570192,
0.3235349655,
-0.1387714893,
0.3186036646,
0.1817253381,
0.0174633916,
0.0129203005,
0.1237944365,
0.0407028459,
-0.2395698279,
0.383333981,
0.1197660118,
0.0658137202,
0.2378251255,
-0.3579262495,
0.0498055182,
0.1413367689,
-0.3321942091,
-0.4053561985,
0.0861589611,
0.1552069038,
-0.3704572618,
0.1170346886,
-0.3429153562,
-0.0725016668,
0.0652612746,
-0.3319214284,
0.0167290382,
-0.1941316724,
-0.3359291553,
-0.2444748282,
0.3545157313,
0.8923538923,
-0.2905385792,
-0.1032235622,
-0.2116887718,
-0.3194522858,
0.2664174736,
0.1446484178,
-0.1367926002,
-0.0281719845,
-0.4125276506,
0.081656009,
0.5212766528,
-0.2712143958,
-0.4752932787,
0.6177854538,
-0.1550976932,
0.3110102713,
0.283518225,
0.096990265,
0.1750848144,
-0.028085148,
0.3497495055,
0.2068122923,
0.0469444022,
-0.0708377138,
-0.3066217899,
-0.1830465347,
0.2643435895,
0.2997498512,
0.0115303947,
0.1502280533,
0.1405099928,
-0.0236654449,
0.2652817965,
0.022309266,
-0.0503899157,
0.1050880775,
0.2761020064,
-0.0372774042,
0.1814168841,
0.0396461412,
-0.5989335775,
0.2171806991,
-0.0399851054,
-0.1016434208,
-0.2662974894,
-0.0913019404,
-0.1901822537,
-0.1478461772,
-0.2657320499,
-0.117549181,
0.0181948319,
0.1151560992,
-0.171077773,
0.1136910543,
-0.2751096487,
0.4989178777,
-0.3676988184,
0.1053172648,
-0.4798952043,
0.126162082,
0.1682882458,
-0.2656128407,
0.1940925866,
-0.0170593057,
0.2895063162,
-0.0321601927,
-0.1867903173,
0.3034258783,
0.3349790573,
0.1036499515,
0.1065273657,
-0.0694366693,
0.092259936,
-0.1398903131,
0.0556776375,
0.4280014336,
0.2295415401,
0.105836913,
0.0752291456,
0.2571931183,
-0.0469538718,
0.2572452128,
0.0489852764,
-0.1629818529,
0.0540581867,
-0.0314042568,
-0.3879782856,
-0.2681677043,
0.3927335441,
-0.2225755006,
0.3901296556,
0.0790241137,
-0.2781416774,
-0.022677552,
0.0105619244,
-0.0504218601,
0.0651866794,
0.2716169655,
-0.2775194943,
0.0846482515,
-0.0451971628,
0.4522235096,
0.6720923781,
0.138017416,
-0.1731873453,
0.1056025922,
0.0350395553,
-0.2162677646,
0.1507761627,
-0.0568151735,
0.1227647811,
0.3448737264,
-0.0328346118,
0.0852068961,
-0.1000747904,
-0.2531381249,
-0.0609646812,
0.1922789365,
-0.515395999,
-0.1262350827,
-0.4613441229,
-0.1893222332,
0.0668304935,
-0.0625127405,
-0.172918275,
0.0013632367,
-0.0467900373,
-0.0019259199,
-0.110106051,
0.0273678955,
-0.5067332983,
0.2731792927,
0.217657581,
-0.4486323297,
-0.3038979471,
0.0813089535,
-0.080477342,
-0.0293690749,
0.3875236213,
-0.0793240592,
0.2327370793,
-0.1770061255,
-0.3405686021,
-0.2145321369,
-0.1017045006,
-0.0872661099,
0.0106230676,
0.5590316653,
0.0862337127,
0.2060581148,
0.348082751,
0.0271177553,
0.2462600172,
-0.0568849668,
-0.1871891022,
0.1424198151,
-0.0919246078,
0.082061328,
-0.4319983721,
-0.3623184562,
-0.2072740495,
-0.488799125,
0.1106831804,
0.1485089511,
0.1030099913,
0.155155614,
0.3054748178,
0.2557854354,
0.0543627627,
0.1256955862,
-0.1281337142,
-0.2277318835,
0.6152670979,
-0.2603023648,
-0.3239286542,
0.2170601636,
0.0550895631,
0.0961844102,
0.0684607774,
-0.5978398323,
-0.2890004218,
0.0116828373,
-0.0207068361,
-0.1982983947,
-0.222313419,
0.021602679,
-0.1161589175,
0.0259667318,
-0.2537697852,
-0.2282102853,
0.0158920959,
-0.1488075107,
0.1596874446,
0.0837073624,
0.5658364892,
-0.0231266003,
0.6997220516,
0.2779697478,
0.0421082489,
0.1989479214,
-0.0802289471,
0.4185763299,
-0.1145562083,
-0.1348786652,
-0.0882571414,
0.0967891291,
-0.2061602473,
0.1728047282,
0.0015978395,
0.0235512853,
-0.2556641102,
-0.1521886736,
-0.3454093933,
-0.0506314933,
-0.0293646194,
0.0712780505,
0.0594598912,
0.0594134741,
0.1768147945,
-0.0088010356,
-0.0807464123,
-0.1292516291,
0.4418216944,
0.3338132799,
0.230005607,
0.278888911,
0.0688921809,
-0.0649355724,
0.4047959745,
0.0028076696,
0.3561450243,
-0.1812062263,
-0.1176761016,
0.0441604182,
-0.0387757495,
0.5842126608,
0.0536395721,
0.2430353314,
0.1288135946,
0.0388409942,
-0.4891288579,
-0.117963098,
-0.0048482898,
-0.04558843,
-0.0968148559,
0.7392321229,
-0.1303178966,
-0.0429041237,
-0.0709331036,
0.0788527131,
-0.0446855351,
-0.2304730117,
-0.4771336615,
-0.3460102975,
-0.1665340662,
-0.0502428822,
-0.2072112858,
0.0862210542,
-0.2813724279,
0.0401022434,
0.1425596029,
-0.0274819098,
0.0585139096,
-0.0441840254,
0.3863023818,
-0.1200780496,
0.2472986281,
0.2623214424,
0.2557331324,
0.4818256795,
0.6506271362,
0.1559686959,
-0.4094147682,
0.1054611355,
0.0065894239,
-0.0211690385,
0.3709867895,
-0.2136012465,
-0.0021400258,
0.4129960835,
0.1739242375,
-0.1692188084,
0.0755754113,
0.2809076011,
-0.4007247984,
-0.2119972408,
-0.5948710442,
0.4586244226,
0.0132939769,
0.1036611944,
0.2204691768,
-0.1038114205,
-0.2536270022,
0.2151255608,
-0.2346422076,
0.5241373181,
0.2097295076,
0.1713027805,
0.3409686089,
-0.079879418,
0.1852026135,
-0.1235082671,
0.1091077402,
-0.1365062743,
-0.3133644462,
-0.017066041,
-0.2032269686,
0.3189791441,
-0.1778071076,
-0.0404734537,
0.2283976227,
-0.1653811187,
0.2396101654,
0.1376620531,
-0.0787311494,
-0.2531458437,
-0.0396283083,
-0.4062955976,
0.0741586685,
-0.2126244903,
0.0578596443,
0.0818726122,
-0.2441769093,
-0.2912788093,
-0.2526930869,
-0.1078740507,
0.3557736874,
-0.306032002,
-0.0562973097,
-0.0218710639,
-0.4766620398,
0.2733477354,
0.4324861169,
-0.2818886042,
-0.0328046642,
-0.2971817255,
0.1951252967,
-0.2432139367,
0.1413836628,
-0.115031071,
0.068811141,
0.3103325963,
-0.0221825,
0.0023681582,
0.0208622906,
-0.202179566,
-0.1808783859,
0.0413908884,
0.1831336617,
0.1676871181,
-0.2042564452,
-0.3555710316,
-0.226622954,
0.1902954131,
-0.102780059,
0.0966759473,
0.1061806381,
-0.1589423716,
-0.0326234587,
-0.0920278654,
-0.2998107672,
-0.0356751531,
0.6921849847,
-0.0597365499,
0.0674773231,
0.5617212057,
-0.0027466023,
-0.0109154843,
-0.1821068674,
0.2193333358,
0.0294296071,
-0.1410903931,
0.2667446733,
0.3428710699,
0.4275909364,
-0.0795627832,
-0.2419788241,
-0.1123522893,
-0.2318852395,
-0.0856736675,
-0.5077098608,
-0.265408814,
0.3517469764,
-0.2827734351,
-0.0931450725,
0.0084174471,
-0.1119984016,
-0.0093983049,
-0.3472170532,
-0.2792290151,
0.2394754738,
-0.0013099618,
-0.0064820019,
0.2517041862,
0.1945962608,
0.3213789165,
0.0795431882,
0.134516865,
0.117069304,
-0.2473031282,
-0.1882492751,
-0.2004791498,
0.1615993977,
0.0879508257,
-0.0865852162,
-0.0127760991,
-0.2766493857,
-0.1810650975,
0.0100254379,
0.2324418575,
0.2003154606,
-0.002361363,
-0.1232326329,
-0.1742853373,
0.1943895817,
-0.1016326398,
0.2255807817,
-0.2772808373,
0.2832356691,
0.0879512429,
0.0567351505,
-0.2629295588,
0.0944426283,
-0.0254896898,
-0.0937116966,
0.056923233,
0.2719113231,
0.4807800353,
-0.4850414097,
0.0438472591,
-0.1083147153,
0.1858946681,
0.1689240783,
-0.3730700016,
0.0174185857,
0.1520066261,
0.1007343531,
-0.2348518372,
0.0529350974,
0.36018911,
0.1179460809,
-0.0155763226,
0.1094080582,
0.0556191243,
-0.0122009618,
-0.1492240131,
-0.0252376944,
0.5479940176,
-0.0511600636,
0.1291130632,
0.3964273036,
-0.0580187403,
0.2297507375,
-0.1388074458,
0.1604856998,
0.10226053,
0.6611014605,
-0.2359688282,
0.2480233759,
-0.0758764297,
-0.017477354,
-0.3604584336,
-0.7424247265,
-0.2168717682,
0.2046141177,
-0.1185058728,
0.3531684577,
-0.2821066976,
0.3417935073,
-0.2850813568,
0.241404593,
-0.0553729758,
-0.2045729458,
0.0383045152,
0.0893812031,
-0.3146717846,
-0.1722474992,
-0.1830027997,
0.0824825019,
-0.0788825899,
-0.0885545164,
-0.2940860987,
0.1826675683,
-0.292040199,
-0.0852495953,
-0.2926924825,
0.2863386571,
-0.018453477,
-0.2841996253,
0.2948943079,
0.2159209549,
0.0910378695,
0.3171203136,
0.0124231288,
0.4503679276,
0.4069977999,
0.0671451315,
-0.0711590499,
0.3148637414,
-0.0754121542,
-0.0290165525,
0.3210366368,
0.2293772101,
0.0101496978,
0.2039669007,
0.1219136268,
-0.1549087167,
0.2455507815,
0.0796007141,
0.2309854478,
-0.1740248948,
0.2963153124,
-0.437800765,
0.0741397813,
-0.2007827908,
-0.0548485592,
-0.4127606153,
0.0008654219,
0.4227392673,
0.3449232578,
0.0740989074,
0.0471119657,
0.0446414053,
-0.3646558523,
0.267308563,
0.4039834738,
0.1103567407,
-0.1950600743,
-0.0045828405,
-0.581887126,
0.2494298071,
0.0077265589,
-0.049725946,
-0.0656110048,
0.127186954,
0.0528250709,
-0.0664779395,
0.3057740033,
-0.140534997,
0.2272215337,
0.1210920215,
-0.0736402869,
-0.2520379424,
-0.2729721963,
0.1281056702,
-0.1326623559,
-0.3422064483,
-0.0580480881,
-0.4723307192,
0.049865365,
0.2051139921,
-0.1646539271,
0.0481179655,
0.0350955203,
0.6480146646,
-0.0751967132,
0.3939248621,
-0.0980957448,
-0.2716978788,
-0.358071357,
-0.054971762,
-0.1285022944,
-0.0711774826,
0.0469701141,
0.429620266,
-0.2008486986,
-0.0150695648,
-0.3725060821,
0.4767967761,
-0.213395372,
-0.1159268767,
-0.0772019699,
0.2353645265,
-0.3474001586,
-0.0049589369,
-0.0554633625,
-0.0385692306,
-0.140832454,
0.0430251993,
-0.2469017208,
-0.1702255011,
0.7519186735,
-0.559915781,
-0.0575708523,
0.079348579,
0.2475954443,
0.0832731575,
0.0337961353,
-0.1147651821,
0.1833258122,
0.3009928763,
-0.0945877209,
-0.184447065,
0.1227090731,
-0.1910119355,
0.0633852407,
-0.0552679263,
-0.0653046295,
0.0765735656,
-0.103775017,
0.2832109034,
-0.2753108442
] |
https://github.com/huggingface/datasets/issues/3027 | Resolve data_files by split name | Awesome @lhoestq I like the proposal and it works great on my JSON community dataset. Here is the [log](https://gist.github.com/vblagoje/714babc325bcbdd5de579fd8e1648892). | This issue is about discussing the default behavior when someone loads a dataset that consists in data files. For example:
```python
load_dataset("lhoestq/demo1")
```
should return two splits "train" and "test" since the dataset repostiory is like
```
data/
βββ train.csv
βββ test.csv
```
Currently it returns only one split "train" which contains the data of both files
I started playing with this idea on this branch btw: `resolve-data_files-by-split-name`
Basically the idea is that if you named you data files after split names then the default pattern is
```python
{
"train": ["*train*"],
"test": ["*test*"],
"validation": ["*dev*", "valid"],
}
```
otherwise it's
```python
{
"train": ["*"]
}
```
Let me know what you think !
cc @albertvillanova @LysandreJik @vblagoje | 19 | Resolve data_files by split name
This issue is about discussing the default behavior when someone loads a dataset that consists in data files. For example:
```python
load_dataset("lhoestq/demo1")
```
should return two splits "train" and "test" since the dataset repostiory is like
```
data/
βββ train.csv
βββ test.csv
```
Currently it returns only one split "train" which contains the data of both files
I started playing with this idea on this branch btw: `resolve-data_files-by-split-name`
Basically the idea is that if you named you data files after split names then the default pattern is
```python
{
"train": ["*train*"],
"test": ["*test*"],
"validation": ["*dev*", "valid"],
}
```
otherwise it's
```python
{
"train": ["*"]
}
```
Let me know what you think !
cc @albertvillanova @LysandreJik @vblagoje
Awesome @lhoestq I like the proposal and it works great on my JSON community dataset. Here is the [log](https://gist.github.com/vblagoje/714babc325bcbdd5de579fd8e1648892). | [
0.0484914854,
0.0916158333,
-0.0840783715,
0.1035428643,
0.1421851218,
-0.0512200519,
0.3762041032,
0.6377544999,
0.1425939798,
0.0023931437,
0.2522251606,
0.3661669493,
-0.1567634493,
0.247655049,
-0.3365218639,
-0.2140483707,
-0.0455784127,
0.0632640347,
0.1257698238,
0.100782834,
-0.229347229,
0.1288428903,
-0.0636407733,
0.1343985498,
-0.277220279,
0.1337825656,
0.093102783,
0.2215470821,
-0.0848301351,
-0.4323831201,
0.3156615794,
0.2500079274,
-0.0116305919,
0.2212948203,
-0.0001169832,
-0.0055296933,
0.5372307897,
-0.079536885,
0.1203426644,
-0.2980857491,
-0.3311026394,
-0.2023193389,
0.3802292943,
-0.4092597365,
-0.1996558607,
-0.3569057882,
0.028547816,
-0.4087566435,
0.4969002008,
-0.1903089881,
0.1064983532,
-0.3341925144,
-0.1490573883,
0.1212786958,
0.028792182,
0.5580281019,
0.0829611942,
0.3046056032,
0.1328900903,
-0.1883375496,
0.0007315541,
0.0284775738,
-0.0533926487,
0.135961622,
0.0554642454,
0.0565608367,
-0.2560227811,
-0.2581554651,
-0.1451620907,
0.3335560262,
0.317694515,
-0.0703985393,
-0.0604890808,
-0.4967845976,
-0.0780037045,
0.0155096697,
0.2751680315,
0.2997463048,
-0.0749151781,
0.1399319321,
0.0938737914,
-0.0669939891,
-0.0216600429,
0.0743844435,
-0.352819711,
0.3124584258,
-0.1810270101,
0.3609609902,
0.0582049489,
-0.0942546427,
0.0945124775,
-0.1457025558,
0.1116316989,
0.095539093,
-0.3842647672,
-0.1702163815,
0.1030921936,
0.0160991084,
0.4097506106,
0.1238876656,
-0.0354953706,
-0.0444071479,
-0.1236651316,
0.0310032479,
0.4373089671,
0.0915281922,
0.385650456,
-0.0563330241,
0.3770617843,
0.100231804,
-0.1539411098,
0.0827746913,
-0.0926697254,
-0.1620343029,
-0.4499311447,
0.0598418377,
0.4620563388,
0.0673629493,
-0.1157334223,
-0.0519505441,
-0.1281438321,
-0.4269700944,
0.1172607914,
0.3065796196,
0.0831881762,
0.7180424929,
-0.2317253202,
0.1247985587,
0.0857581571,
-0.1926371306,
-0.0399870835,
-0.212734431,
-0.4407871962,
-0.06544213,
0.2783694565,
-0.0298984051,
0.115266189,
0.1760888547,
0.0195246134,
-0.3024833798,
0.3420533538,
-0.0028259845,
-0.0216232128,
0.1022132486,
-0.0754211545,
0.1790903509,
0.1704100072,
-0.2637566924,
-0.3545886576,
0.2716409266,
-0.6915875673,
-0.3307422996,
0.0340079926,
0.1316252351,
-0.1335485578,
0.4891761243,
-0.1078281552,
0.1886515915,
0.1335796416,
-0.0598983653,
-0.0030857055,
-0.1096145734,
0.1938953549,
-0.3293866217,
0.1277632117,
0.2236623764,
-0.4119492173,
0.0959770158,
-0.3117308617,
-0.229269281,
0.0101427138,
0.3284604549,
-0.316545248,
0.1213748008,
-0.4301156998,
0.4693818688,
0.2669004798,
-0.3092691302,
-0.391226083,
0.4877555072,
0.0367703252,
0.0501935855,
0.3408441544,
-0.0637880564,
0.195783481,
-0.072933048,
0.2529017031,
0.2760291398,
-0.0891666487,
0.0795972943,
-0.0861893147,
-0.3231751621,
0.0591381192,
0.060696099,
-0.2485835552,
0.0478159189,
0.0718529746,
-0.0717725605,
0.4694217145,
-0.0062852185,
0.0036115013,
-0.1257493198,
0.0644965395,
-0.0131145883,
0.2328038365,
0.1169758067,
-0.4437191784,
0.1197082922,
-0.0020406055,
-0.4397473037,
-0.3041683733,
-0.3698073924,
-0.3315549195,
-0.0935451239,
-0.3471480608,
0.4295672476,
0.0754838809,
0.1173451394,
-0.2267549634,
-0.0875684544,
-0.3454883695,
0.3926454186,
-0.3170726597,
-0.0018362382,
-0.5235583782,
0.4450723231,
0.2322917432,
0.1051729172,
-0.3146346509,
-0.0871201903,
0.0367157049,
-0.1903732717,
0.1603194773,
0.4464712143,
0.3951684833,
0.1484096795,
0.1015635654,
0.1335924864,
0.1295888126,
-0.2608751953,
0.1093614623,
0.1722865254,
-0.0140119167,
-0.0815716609,
-0.4232835472,
0.4477927089,
-0.5527252555,
0.3365653753,
-0.1063771546,
-0.2623164654,
0.375967294,
-0.1732298285,
-0.4907525778,
-0.3021470606,
-0.0766047388,
0.264769733,
0.4004595876,
0.0758961961,
-0.184360981,
-0.1648482829,
0.5294551253,
-0.1916442066,
0.0164798666,
0.2196840346,
0.0794803351,
-0.0882284939,
0.0101175364,
0.5111579895,
0.677302897,
0.1302638203,
-0.0745919645,
0.0425202884,
0.2695326805,
-0.2276212871,
0.0709010139,
-0.1163094938,
-0.1708786935,
0.5061206222,
0.0093114814,
-0.1584080905,
-0.2546401322,
-0.1289419979,
0.1608852297,
-0.1205628291,
-0.2696041167,
-0.0408880487,
-0.183771342,
0.0448230356,
-0.1489156783,
-0.0331497416,
-0.1817951202,
-0.1344725937,
0.0186479483,
-0.2170340866,
-0.300482899,
0.0372896232,
0.0555728488,
0.4527308643,
0.0101596732,
-0.460962683,
-0.0666795,
-0.1680178195,
0.1394443065,
0.0151686389,
-0.0012348494,
0.0236817747,
0.2326028049,
-0.3672756851,
-0.1663760841,
0.0191582646,
-0.4854016304,
0.236981988,
0.007000071,
0.1670873463,
0.397226423,
0.2264917791,
0.4059485197,
-0.5073138475,
0.0826792568,
0.157931298,
-0.0612326674,
-0.0970572457,
0.3183922768,
0.3806665838,
-0.2537415326,
-0.4357579052,
-0.2211750597,
-0.4491400421,
0.5271546245,
-0.0499438904,
0.0059866812,
-0.3048819602,
-0.2839456797,
-0.1055679098,
-0.1623345315,
-0.1549111158,
-0.226487577,
-0.1620880216,
0.1453205794,
0.0188999586,
0.1265245825,
-0.0153345345,
-0.301279664,
0.1762456745,
-0.0220544096,
-0.1848026961,
-0.1673264056,
-0.0195259657,
0.2870692015,
-0.0491851158,
-0.0387617871,
0.129553169,
0.2256193161,
0.0159455165,
-0.1366850585,
0.1209062263,
0.0537895374,
0.0361717567,
0.1013935655,
0.5023616552,
0.2553307712,
-0.0146039389,
0.7181844115,
0.2735150456,
0.0677790269,
0.0763781294,
0.1326725185,
0.0794974118,
-0.0032314011,
-0.0855955705,
0.0220179465,
0.0087891473,
-0.1246847659,
0.349693656,
0.1748278588,
-0.166112408,
-0.1274193823,
0.1778683215,
-0.3480490744,
-0.3591395617,
0.1279172152,
-0.2824629843,
0.1060994714,
-0.1360625774,
-0.2206065208,
0.2020244896,
-0.0156714488,
-0.1206285059,
0.497448653,
0.0474768206,
-0.2021833211,
-0.3181729913,
-0.1532771438,
-0.0531200431,
0.2360265851,
0.1101315916,
0.0607343987,
0.0993665159,
-0.1694804132,
0.0541723408,
0.0205742735,
0.964356184,
0.1571693271,
0.0260110125,
-0.0361122899,
0.2082916945,
0.1140152067,
-0.128386572,
-0.0565678775,
0.1895164847,
-0.0568641126,
0.4413540363,
-0.4780913591,
-0.1680973619,
-0.1137037352,
0.1282055676,
-0.0589715615,
-0.2093214244,
-0.1453800946,
-0.0511644967,
-0.1522209793,
0.0223598853,
0.1410261691,
-0.2559518516,
-0.3986915946,
-0.1595278382,
-0.1164798588,
-0.2722405791,
0.0867258012,
0.1354358345,
0.3775534928,
-0.1100308225,
0.0914491042,
0.2685757577,
0.3362176716,
0.0269215237,
0.3498311043,
-0.1561346948,
-0.3365441561,
0.1913515478,
-0.1877254248,
0.23735632,
0.3444044888,
-0.293402493,
-0.0730784163,
0.0014330002,
0.1724516898,
-0.3921561539,
0.3477831185,
0.4107090831,
-0.2236186117,
-0.5386248231,
-0.5756873488,
0.5857538581,
0.1300138086,
-0.3407085538,
0.3351636231,
0.1421175897,
-0.3038366139,
0.281560272,
-0.2795051932,
1.0091342926,
-0.0234338939,
0.0999766812,
-0.0473838747,
-0.0642886832,
0.6039747,
-0.500808537,
0.1308079809,
-0.3162198365,
0.0577129424,
-0.0548973717,
-0.1628806144,
0.2598095834,
0.6810415387,
-0.3250266612,
0.1456507444,
-0.2127438039,
0.0087267114,
-0.0891413614,
0.3744412363,
-0.0237429347,
0.0684844777,
-0.3803237677,
-0.0080836741,
-0.3366809487,
-0.0992051437,
-0.0696252733,
-0.0369179063,
0.2366743237,
-0.2520403564,
0.1323502809,
-0.0922341421,
0.3256054819,
-0.0566005222,
0.0552785061,
-0.2505065203,
0.2433926165,
0.1074784622,
-0.1559709758,
0.2784284651,
-0.1434618086,
0.2394801825,
0.04581213,
0.2258761227,
0.0788675696,
-0.0467132404,
0.1552397013,
0.3240544498,
-0.133378163,
-0.2240712494,
-0.1740561128,
-0.1199270412,
-0.3732620776,
0.4157900512,
0.2376701981,
-0.5886799693,
-0.1996459067,
0.0222000889,
0.0013538711,
0.0634932742,
0.0906104669,
0.0417563394,
-0.1805074364,
0.3117634356,
-0.1659196615,
-0.2459612042,
0.0499374233,
0.1156101078,
0.3197980225,
-0.2365073413,
0.0666227415,
-0.2165910304,
-0.1146280691,
-0.1236658841,
0.2733877897,
0.1701247245,
-0.2765022814,
0.2318167537,
-0.0098864743,
-0.09109772,
0.2195823938,
-0.1060029119,
0.1884770393,
0.0628357902,
0.0093240645,
-0.2751417458,
-0.0700802431,
0.4887525737,
-0.0145342909,
0.2858189046,
0.3450110555,
-0.0058425055,
-0.2475340366,
-0.1120375544,
-0.2081973553,
0.2097012699,
-0.0629030913,
0.219632715,
0.0980077535,
0.1334666014,
-0.0618892945,
0.0846168697,
0.166991055,
-0.0236088019,
-0.0690864921,
-0.1963667423,
-0.1121722832,
0.2221819013,
0.0145485299,
0.1711806059,
0.1342012286,
-0.4678767025,
-0.0869828761,
-0.164490819,
0.3166227639,
-0.0944062322,
0.0954917669,
0.0061271712,
0.284620434,
-0.1088159084,
-0.2425226867,
0.2945615649,
-0.036583934,
0.2692625821,
0.1878362,
0.3084035218,
-0.3690811396,
0.1359048784,
-0.3501488864,
0.0911466703,
0.2797412276,
0.2738078535,
0.1179446653,
-0.1324663311,
-0.0216555484,
-0.3217122257,
0.6874307394,
0.5198118687,
-0.4284147918,
-0.0701647177,
0.1843208373,
0.1460973322,
-0.1674447656,
-0.1303462684,
0.2792674601,
0.2267269641,
0.1458123326,
0.1218910813,
0.2214926332,
0.2751304805,
-0.0213875677,
-0.085844852,
0.6800705791,
0.0383539461,
0.4794355631,
0.7950752974,
-0.112044856,
0.0230850838,
0.2986955047,
-0.1627401412,
0.1509478837,
0.5919938087,
-0.0077753677,
0.2872369587,
0.0940973014,
0.2803065181,
0.1375280172,
-0.1612990052,
0.1436460167,
0.1224925891,
-0.426732868,
0.1079501063,
0.0637752861,
0.3952517807,
-0.2858507633,
-0.0416028649,
0.0027759722,
-0.0098990835,
-0.0080082882,
-0.2608320713,
-0.012700309,
-0.3922563791,
-0.2163770348,
-0.1640466303,
-0.2101768702,
0.1315471977,
0.277944833,
0.2793097198,
0.2122009844,
-0.3695016205,
0.3579019308,
-0.050891526,
0.3659487069,
-0.2371369749,
0.2876750827,
0.1746818721,
-0.0254032351,
0.3640134633,
-0.140689522,
0.1056818962,
0.3371888101,
0.0092181191,
-0.3600663841,
-0.1826880723,
-0.0037230896,
-0.264557153,
0.1356014311,
0.1910119206,
-0.0224428847,
0.1040901691,
0.1891041845,
-0.1026991382,
0.0083934618,
0.1176497042,
-0.1194941029,
-0.5660682321,
0.3744086623,
-0.0109500615,
-0.0382443517,
0.078269884,
-0.09348315,
-0.7509056926,
-0.2504291236,
0.2566382587,
0.1783888191,
0.0846967772,
0.008860074,
0.0573387295,
-0.1395452917,
0.1689975709,
-0.2574000061,
0.1281244308,
-0.0233545508,
-0.2853639424,
-0.4736921489,
0.0724521875,
0.1342649907,
-0.0941783264,
0.1182550564,
0.0960206613,
0.1163400188,
0.1866632253,
-0.2767646015,
-0.1450674534,
-0.0625752807,
-0.0734749585,
-0.123186253,
-0.1332642287,
-0.1428448558,
0.1099701002,
-0.026975099,
-0.3344845176,
-0.0692254826,
0.4547462761,
-0.2119650841,
-0.0981978998,
-0.0953664258,
0.4374454916,
0.0641434193,
0.0896618739,
0.3730220497,
0.3601669073,
-0.0661004707,
0.0196243338,
-0.1400779337,
-0.2388821691,
-0.153545022,
0.20921579,
0.019116275,
0.1449100077,
-0.2400785834,
0.0849136934,
-0.3337801993,
-0.1841946393,
-0.0048643486,
0.0035095543,
-0.4720475078,
-0.2330951691,
-0.2154548764,
0.0004307056,
-0.1617125124,
0.4621013701,
-0.0702921376,
0.018698059,
0.059143953,
0.0339597687,
0.2212326527,
-0.1691067666,
-0.3571640551,
0.0788935944,
0.2526709437,
-0.3451994061,
0.155963853,
-0.0939472467,
-0.0125754913,
0.5273630619,
-0.1326483786,
-0.0765691698,
-0.0026071512,
0.0081852023,
-0.2700786591,
-0.1602722257,
-0.183094427,
0.4533030689,
-0.2098136544,
0.1090917364,
-0.1992196441
] |
https://github.com/huggingface/datasets/issues/3027 | Resolve data_files by split name | From my discussion with @borisdayma it would be more general the files match if their paths contains the split name - not only if the filename contains the split name. For example for a dataset like this:
```
train/
βββ data.csv
test/
βββ data.csv
```
But IMO the default should be
```
data/
βββ train.csv
βββ test.csv
```
because it allows people to have other directories if they have different subsets of their data (different configurations, not splits) | This issue is about discussing the default behavior when someone loads a dataset that consists in data files. For example:
```python
load_dataset("lhoestq/demo1")
```
should return two splits "train" and "test" since the dataset repostiory is like
```
data/
βββ train.csv
βββ test.csv
```
Currently it returns only one split "train" which contains the data of both files
I started playing with this idea on this branch btw: `resolve-data_files-by-split-name`
Basically the idea is that if you named you data files after split names then the default pattern is
```python
{
"train": ["*train*"],
"test": ["*test*"],
"validation": ["*dev*", "valid"],
}
```
otherwise it's
```python
{
"train": ["*"]
}
```
Let me know what you think !
cc @albertvillanova @LysandreJik @vblagoje | 78 | Resolve data_files by split name
This issue is about discussing the default behavior when someone loads a dataset that consists in data files. For example:
```python
load_dataset("lhoestq/demo1")
```
should return two splits "train" and "test" since the dataset repostiory is like
```
data/
βββ train.csv
βββ test.csv
```
Currently it returns only one split "train" which contains the data of both files
I started playing with this idea on this branch btw: `resolve-data_files-by-split-name`
Basically the idea is that if you named you data files after split names then the default pattern is
```python
{
"train": ["*train*"],
"test": ["*test*"],
"validation": ["*dev*", "valid"],
}
```
otherwise it's
```python
{
"train": ["*"]
}
```
Let me know what you think !
cc @albertvillanova @LysandreJik @vblagoje
From my discussion with @borisdayma it would be more general the files match if their paths contains the split name - not only if the filename contains the split name. For example for a dataset like this:
```
train/
βββ data.csv
test/
βββ data.csv
```
But IMO the default should be
```
data/
βββ train.csv
βββ test.csv
```
because it allows people to have other directories if they have different subsets of their data (different configurations, not splits) | [
0.0270637404,
-0.089249678,
-0.1097629964,
0.135138616,
0.0538497344,
-0.1521060318,
0.3358279169,
0.5063108802,
0.1621054113,
-0.0166821554,
0.2228462696,
0.1351218373,
-0.113688089,
0.2894289196,
-0.1998567432,
-0.2272009104,
-0.0563692376,
0.0884641558,
0.0838888437,
0.0457753129,
-0.3167465925,
0.0998689607,
-0.1170415655,
0.1179772839,
-0.3923655748,
0.2584537864,
0.011559533,
0.3856999278,
-0.0377642736,
-0.3534213006,
0.2145459354,
0.1814071685,
0.1407519877,
0.1639412045,
-0.0001185402,
-0.0721095651,
0.4363928735,
-0.1522341371,
0.2201815099,
-0.3678041399,
-0.4510226846,
-0.2540359795,
0.308478713,
-0.4188292921,
-0.0676248893,
-0.139395684,
0.0806283206,
-0.2843282521,
0.3402705491,
-0.0552422479,
0.0952067599,
-0.2253262401,
-0.0863788351,
0.1467776,
0.1762958765,
0.3417210877,
0.1126109734,
0.2838572562,
0.0524288826,
-0.2838116884,
0.1041061059,
-0.1028223634,
-0.0584664978,
0.1761573702,
0.1245811284,
0.1175100133,
-0.154590115,
-0.3509626091,
-0.165611431,
0.3802148402,
0.2660921216,
-0.0478128418,
-0.1946501881,
-0.5157231092,
-0.1008810103,
-0.0895040929,
0.3168190122,
0.2614824176,
-0.0516100526,
0.1412388086,
0.1236385927,
-0.002307683,
0.0237720329,
0.079726167,
-0.4112013578,
0.2440207154,
-0.1261057854,
0.2495099157,
0.1241007149,
0.0006033072,
0.0852399915,
-0.3216853738,
0.1844166815,
0.167865321,
-0.3733213842,
-0.1084710807,
-0.0317978151,
0.1747059971,
0.2793076932,
0.0383363739,
-0.0225676987,
-0.0568161532,
-0.1061783358,
0.0022388853,
0.3379701078,
0.2131719738,
0.2825787961,
-0.0370281786,
0.2807854712,
0.036797937,
-0.2636925876,
0.1309576333,
-0.0679046437,
-0.3493287861,
-0.38272205,
0.119339034,
0.442809701,
0.0174136274,
-0.1657598019,
-0.0423220098,
-0.1241671667,
-0.4989937246,
0.149768129,
0.2121200711,
0.0484748185,
0.5931284428,
-0.3226960599,
0.094615005,
0.0753769428,
-0.1129219308,
-0.0209341925,
-0.3209089339,
-0.4212557673,
-0.0491281636,
0.1755790263,
-0.0049980977,
0.1248719692,
0.1342568398,
0.058883477,
-0.1949618906,
0.3118008375,
-0.1139667407,
0.0684163496,
0.1643892825,
-0.1177610829,
0.1898180991,
0.0866970122,
-0.2004950047,
-0.3348343372,
0.329831481,
-0.7846766114,
-0.4369292259,
0.1633817106,
0.1231910139,
-0.1893166453,
0.4690492451,
-0.0051640836,
0.0348339416,
0.0976279303,
-0.1030715704,
-0.0631070882,
-0.3695324361,
0.1701551527,
-0.375572145,
0.2521469295,
0.141246587,
-0.3451226652,
0.1652316302,
-0.3239671588,
-0.2678648829,
-0.0005795309,
0.4028597474,
-0.3052544892,
0.1310661733,
-0.4376268387,
0.4604644775,
0.3293553889,
-0.1856958121,
-0.375587374,
0.3393336833,
0.0338666514,
0.1399631947,
0.2919975221,
0.0367677025,
0.1881824285,
-0.0722579136,
0.1695461422,
0.2610364258,
-0.0801317096,
0.0455742367,
-0.0977777913,
-0.2554687262,
-0.0259622708,
-0.0219878387,
-0.2103602141,
-0.0115203476,
0.0805359334,
-0.1600058824,
0.5113763809,
0.0065153209,
-0.1614563763,
-0.0932046324,
0.1350595653,
0.1334780455,
0.2491544932,
0.1807253808,
-0.4748722911,
0.2074028552,
-0.1224533916,
-0.5045096278,
-0.2311445475,
-0.3620303273,
-0.1528387368,
-0.1678919941,
-0.3231678605,
0.4038160443,
0.0623146743,
0.1333550811,
-0.2513745725,
-0.112992093,
-0.3945625424,
0.29689309,
-0.3069310784,
0.0122593828,
-0.4265836477,
0.4831367135,
0.1446908414,
0.2009454221,
-0.3460205197,
0.0433637537,
0.0414187126,
-0.1183135957,
0.210097149,
0.4449147582,
0.4787169099,
0.1327357441,
0.1388512552,
0.266366452,
0.0823093206,
-0.2328071296,
0.0662160814,
0.0787865445,
-0.0238830969,
-0.0550847277,
-0.2458167374,
0.321051836,
-0.5423385501,
0.3390038908,
0.0063309539,
-0.3598769307,
0.2438612431,
-0.2079183012,
-0.3672238588,
-0.2697354555,
0.055081699,
0.2147870064,
0.4444978535,
0.3003087342,
-0.2010460943,
-0.198232919,
0.4653475583,
-0.2203814685,
0.0030791494,
0.178604275,
0.0384298526,
-0.0726509839,
-0.0788453072,
0.4924039543,
0.6452202797,
0.1851118803,
0.0622965321,
-0.0040568281,
0.0917087346,
-0.2873215973,
0.1623193473,
-0.0126948589,
-0.2111666054,
0.482607156,
-0.1999593824,
-0.0064448179,
-0.240877673,
-0.1191613004,
0.0133677218,
-0.1565804929,
-0.3247489929,
-0.1735368073,
-0.1142806187,
0.0186560787,
-0.2934768796,
-0.0460512266,
-0.3018507659,
-0.098409079,
0.0589905307,
-0.2609003484,
-0.2200452834,
0.0481566451,
0.0537725799,
0.4499255717,
-0.1041512638,
-0.4823903441,
0.0109307198,
-0.1258495599,
0.0902596638,
0.0256825201,
0.0116396844,
0.0233024862,
0.176838398,
-0.4497425854,
-0.1201987788,
-0.0309920348,
-0.509462595,
0.06068822,
0.0879435986,
0.1646255404,
0.3704206645,
0.2070946842,
0.509442687,
-0.4992416203,
0.0513429269,
0.3034725189,
-0.0733081475,
-0.1588933915,
0.3971946537,
0.1793319434,
-0.139133364,
-0.3126039803,
-0.260497123,
-0.4406668544,
0.4037436843,
-0.0275973752,
0.0368140191,
-0.2688924074,
-0.2415432036,
-0.1569710672,
-0.4251081347,
-0.0523576438,
-0.1164752468,
-0.0321597941,
0.1537633985,
0.1665874571,
0.0599493161,
-0.0274721775,
-0.2557913363,
0.0776541904,
0.1224519759,
-0.1252754778,
-0.2022869885,
-0.1485560089,
0.226999402,
0.081757538,
0.0948816985,
0.0927125141,
0.2069805115,
0.0487041809,
-0.0922682285,
0.1175593957,
0.0906670243,
0.0926111266,
0.1174343377,
0.5096940994,
0.0975981653,
-0.0931823179,
0.7195665836,
0.2749608159,
0.0252629239,
0.0763145685,
0.1344478875,
0.16962111,
-0.01212727,
-0.1334045082,
0.0079032369,
-0.0090098688,
-0.2168185413,
0.4865509272,
0.1187350154,
-0.0117642665,
-0.160615027,
0.1408304572,
-0.3070541918,
-0.3387437463,
0.1925229877,
-0.2153665423,
0.2105851322,
-0.1750328094,
-0.3312677741,
0.2745010555,
-0.0583939068,
-0.1575608402,
0.6674463749,
0.0801237002,
-0.1261489689,
-0.2087229788,
-0.2027724981,
0.1169426367,
0.2361695468,
0.2469219267,
0.1048265621,
0.0399171226,
-0.29194507,
0.0185140483,
0.1481609941,
1.015001893,
0.1439531744,
-0.0556720905,
-0.1629006416,
0.1275370121,
0.2201903611,
-0.1264249831,
-0.0774158761,
0.098289907,
-0.1026135162,
0.4668505788,
-0.3454951048,
-0.1453467906,
-0.1577137858,
0.3126109838,
-0.019588815,
-0.2065530121,
-0.1962550133,
0.1626074761,
-0.0522996932,
-0.0731809437,
0.0829445645,
-0.3739391267,
-0.3486349285,
-0.1988135576,
-0.1696578115,
-0.3105760217,
0.1925287843,
0.1232297421,
0.4097322822,
-0.1911720634,
0.111988537,
0.3239098489,
0.3557859659,
0.0145311439,
0.3123928607,
-0.482565999,
-0.2523560524,
0.0803772807,
-0.16929169,
0.2833830714,
0.3894645274,
-0.2395612299,
-0.1740939617,
-0.0271057282,
0.1543043703,
-0.359734565,
0.2845927477,
0.5503157973,
-0.040508803,
-0.6324179173,
-0.6308746934,
0.5467303991,
0.0751890242,
-0.3690571487,
0.2875179052,
0.2575164735,
-0.3384928703,
0.18605946,
-0.3243256509,
1.0977983475,
0.041213993,
0.203547731,
-0.102314122,
-0.0121767931,
0.3997181952,
-0.2346336395,
0.0562611967,
-0.282658726,
-0.114395529,
-0.1112751365,
-0.2262131125,
0.3153940141,
0.6895778775,
-0.2106652707,
0.2151011378,
-0.0347859673,
-0.0801326558,
-0.0189008731,
0.2752843499,
0.0513637736,
0.2311644852,
-0.2840525806,
-0.0459635742,
-0.1776252687,
0.0153806191,
-0.000235462,
0.0009071802,
0.1983616054,
-0.2670039237,
0.2530164421,
-0.185587272,
0.0736230314,
-0.0810949877,
-0.1613314301,
-0.3193375766,
0.0226093289,
0.1999102384,
-0.181467846,
0.1393312961,
-0.0291126724,
0.2257121205,
0.1723949015,
0.1957194507,
0.0982260928,
-0.1010377854,
0.0580356568,
0.3187805712,
-0.0041051898,
-0.2137278318,
-0.1855743229,
-0.0200280417,
-0.4499002099,
0.4071586728,
0.1464776397,
-0.4879534245,
-0.433968991,
-0.017575087,
-0.0142614162,
0.1585765034,
0.079995513,
0.0423172265,
-0.11306943,
0.4294995368,
-0.1591261029,
-0.3519013524,
0.0053598029,
0.0501639284,
0.2158059627,
-0.073294796,
0.0127793867,
-0.3339125514,
-0.1682747304,
-0.0548180901,
0.280716151,
-0.0070155994,
-0.3519241214,
0.1992882341,
0.029318003,
-0.0481318124,
0.1577070355,
-0.115657188,
0.3893249929,
-0.0824017972,
-0.0514243431,
-0.2353306413,
0.0908469632,
0.5664876699,
0.0325555243,
0.4302212894,
0.2713494003,
-0.0832089111,
-0.1626938432,
-0.1496830136,
-0.2046877146,
0.2403106987,
0.1128876209,
0.2078968734,
0.1173367351,
0.1699091792,
-0.0290811416,
-0.033749409,
0.1557015181,
-0.2497209311,
-0.058408469,
-0.1733265966,
-0.0400669836,
0.196888268,
-0.0016830127,
0.1613594741,
0.1340457052,
-0.5623928905,
0.0106312092,
-0.194874838,
0.1963077039,
0.0073822495,
0.0960048512,
-0.0154178068,
0.3122358322,
-0.2555110157,
-0.3811219335,
0.4588363767,
-0.1688669771,
0.1482897252,
0.2380098701,
0.2972118855,
-0.530862391,
0.1368332952,
-0.2215406448,
-0.0117229018,
0.142735064,
0.1848525852,
0.0562283993,
0.0728473887,
0.025282301,
-0.3118253946,
0.7487245798,
0.4285579324,
-0.345567733,
-0.0986287668,
0.2428824306,
0.1395316124,
-0.2547546327,
-0.1125148833,
0.1653764248,
0.1514100134,
0.1507903039,
0.201053679,
0.2006374747,
0.3282265663,
-0.0830747411,
-0.0952552184,
0.6378183961,
0.1652492732,
0.4714893401,
0.8784751892,
0.1179398224,
0.0955971479,
0.186281085,
-0.0481819361,
0.1515057385,
0.566708982,
-0.1361645609,
0.3498618305,
0.1069407612,
0.1592098624,
0.275175035,
-0.2490896583,
0.0757665038,
0.1100130603,
-0.3986513913,
0.0006064911,
0.0536569431,
0.3497402072,
-0.2991382778,
-0.0833993703,
0.016566867,
-0.0664029196,
0.0225706343,
-0.2106880248,
0.1594796032,
-0.3991620839,
-0.2160880864,
-0.2331871539,
-0.2604496479,
0.0949221253,
0.3322550952,
0.2872389555,
0.332254827,
-0.2148912847,
0.2997367084,
0.0056247185,
0.2486665845,
-0.1427787393,
0.288985014,
0.095501557,
-0.0119789904,
0.4035440385,
-0.0930897072,
0.1726277471,
0.368316561,
0.0661370903,
-0.3672627509,
-0.1009713784,
0.0143864183,
-0.2498624474,
0.0846371129,
0.0754427314,
0.0150826462,
0.1223609224,
0.2309138924,
-0.0639378354,
0.0934914872,
0.0339868702,
-0.1635961682,
-0.5364470482,
0.4950590134,
0.06010608,
0.0003154153,
0.1398149133,
-0.0396599174,
-0.7992085218,
-0.1981609464,
0.2695062459,
0.1146683171,
0.0345857851,
0.1720142812,
0.0526573919,
-0.0247839242,
0.096664682,
-0.0974294022,
0.2692847252,
-0.0994082987,
-0.1278328747,
-0.6860987544,
0.0676157475,
0.1661301106,
-0.1011234969,
0.1270202696,
-0.0120337205,
0.035325598,
0.1610565484,
-0.0419628918,
-0.0709635615,
-0.053786777,
-0.0410996601,
-0.0005478365,
-0.1550918967,
-0.2604179382,
0.0731347874,
-0.0780763179,
-0.3723447323,
0.0361567251,
0.4565957189,
-0.1876714826,
-0.0181806684,
-0.0374346934,
0.5529682636,
0.1216549426,
-0.0204178598,
0.241466403,
0.4928230047,
-0.0818627551,
0.1661690176,
-0.0486246757,
-0.2487564385,
-0.118060343,
0.1815360188,
-0.0494542457,
-0.0117107136,
-0.2486358881,
0.0075878883,
-0.2733668685,
-0.0926348567,
0.026020918,
0.0251433477,
-0.4572563767,
-0.2705695033,
-0.1131946519,
-0.0446534939,
-0.0002092565,
0.5400714278,
-0.1124401987,
-0.0159171186,
0.0865079686,
0.0094409594,
0.2637592554,
-0.045149561,
-0.1135361716,
-0.0106251054,
0.280231297,
-0.1711098701,
0.2984362841,
-0.1651562005,
-0.1319041699,
0.6074885726,
-0.1313550919,
-0.0418988839,
-0.0072440994,
0.0225925744,
-0.2361932546,
-0.1853104979,
-0.1862190217,
0.3374260962,
-0.2880720198,
0.12629278,
-0.1404846162
] |
https://github.com/huggingface/datasets/issues/3027 | Resolve data_files by split name | I just created a PR for this at https://github.com/huggingface/datasets/pull/3221, let me know what you think :) | This issue is about discussing the default behavior when someone loads a dataset that consists in data files. For example:
```python
load_dataset("lhoestq/demo1")
```
should return two splits "train" and "test" since the dataset repostiory is like
```
data/
βββ train.csv
βββ test.csv
```
Currently it returns only one split "train" which contains the data of both files
I started playing with this idea on this branch btw: `resolve-data_files-by-split-name`
Basically the idea is that if you named you data files after split names then the default pattern is
```python
{
"train": ["*train*"],
"test": ["*test*"],
"validation": ["*dev*", "valid"],
}
```
otherwise it's
```python
{
"train": ["*"]
}
```
Let me know what you think !
cc @albertvillanova @LysandreJik @vblagoje | 16 | Resolve data_files by split name
This issue is about discussing the default behavior when someone loads a dataset that consists in data files. For example:
```python
load_dataset("lhoestq/demo1")
```
should return two splits "train" and "test" since the dataset repostiory is like
```
data/
βββ train.csv
βββ test.csv
```
Currently it returns only one split "train" which contains the data of both files
I started playing with this idea on this branch btw: `resolve-data_files-by-split-name`
Basically the idea is that if you named you data files after split names then the default pattern is
```python
{
"train": ["*train*"],
"test": ["*test*"],
"validation": ["*dev*", "valid"],
}
```
otherwise it's
```python
{
"train": ["*"]
}
```
Let me know what you think !
cc @albertvillanova @LysandreJik @vblagoje
I just created a PR for this at https://github.com/huggingface/datasets/pull/3221, let me know what you think :) | [
0.0649660304,
-0.1720188856,
-0.0812089145,
0.1602075845,
0.2143258005,
-0.0422248095,
0.3630499542,
0.4919017851,
0.1566627175,
0.0642593503,
0.1475191414,
0.1404820979,
-0.1865478456,
0.3594828844,
-0.091802679,
-0.3215191662,
-0.0239059534,
0.062793985,
0.1788839996,
0.14500314,
-0.2276562899,
0.1044165641,
-0.1096143872,
0.1137426496,
-0.3765650094,
0.1197941452,
0.0324358158,
0.2874344885,
-0.1039881855,
-0.4631793499,
0.267252177,
0.2680546641,
0.1316000819,
0.1434152424,
-0.0001155478,
-0.0453199223,
0.4095001221,
-0.0989264101,
0.218860805,
-0.2203659415,
-0.2925216556,
-0.2103890777,
0.3251115084,
-0.3898577392,
-0.2154360414,
-0.2910704017,
-0.0040325932,
-0.2205410898,
0.413983196,
-0.0339574963,
0.12878865,
-0.1326345652,
-0.0828549191,
0.0216765516,
0.122577019,
0.3465763032,
0.0467992388,
0.2457823306,
0.0885422751,
-0.1826735586,
0.0505912192,
0.0507141687,
0.0237470232,
0.2122095078,
0.0907402858,
0.1079633981,
-0.1833356023,
-0.32709831,
-0.1866413802,
0.3506262898,
0.2230350524,
-0.1372078955,
-0.2289819568,
-0.5322200656,
0.0247567948,
-0.1835189313,
0.3046514094,
0.2867852151,
-0.0576017275,
0.2137494534,
0.0861561671,
-0.0549739785,
0.042764999,
0.0106288809,
-0.3746061623,
0.1275966763,
-0.2199276984,
0.2264778912,
0.2297348529,
-0.0344663151,
0.0281293709,
-0.1904241592,
0.125932157,
0.0810257345,
-0.4435294867,
-0.1023914963,
0.0726872683,
0.1850102544,
0.3863464892,
0.0577325262,
-0.1091082096,
-0.0842996091,
-0.1964666545,
0.0110397292,
0.3263119161,
0.2436028868,
0.3030404449,
-0.0931602418,
0.3483364582,
0.1637198627,
-0.0923586637,
0.0256371126,
-0.0603621863,
-0.2348637134,
-0.3682774901,
0.0300140679,
0.4863565564,
0.0036147784,
-0.227721557,
-0.0269951262,
-0.1133495122,
-0.4427517056,
0.1513030529,
0.2686525285,
-0.0038664991,
0.658521235,
-0.2308191806,
0.0941861942,
0.00961811,
-0.2555783093,
-0.1025522947,
-0.2201965302,
-0.5276187658,
0.0222495049,
0.1477234662,
-0.081013754,
0.0943572074,
0.2315374315,
0.0785126612,
-0.2548885047,
0.2924023569,
-0.0848224387,
-0.0071778605,
0.102435492,
-0.1210777536,
0.0948376805,
0.120660454,
-0.2308952957,
-0.2997901142,
0.2124728411,
-0.6993407011,
-0.4020503163,
0.0393144228,
0.1390896887,
-0.1968967766,
0.4799928069,
-0.0799287483,
0.1978954822,
0.1175249219,
-0.075273715,
0.0219045728,
-0.2068871111,
0.1220424846,
-0.3108257949,
0.2169435024,
0.1160010993,
-0.3441185653,
0.0383828357,
-0.1853009313,
-0.414319396,
0.0041381544,
0.4357429445,
-0.3004796207,
0.1542764753,
-0.4925013185,
0.4093626738,
0.3056258559,
-0.1945422739,
-0.3887574971,
0.3244223297,
0.038682051,
0.1164015234,
0.3471746743,
-0.0611614212,
0.1868298501,
-0.0992231593,
0.2147674114,
0.1983537674,
-0.1363745928,
0.0314810127,
-0.0563808717,
-0.2625824213,
-0.0333311297,
0.0507320799,
-0.215291068,
0.0885573328,
0.0533214435,
-0.137189731,
0.487275064,
-0.0638841465,
-0.0440693423,
-0.0410533994,
0.1441480666,
0.1745726913,
0.1638552397,
0.0124926446,
-0.4599094689,
0.1703524888,
-0.0947709531,
-0.4231166244,
-0.2457495183,
-0.4675446451,
-0.2203183919,
-0.132544443,
-0.3175481856,
0.3143552542,
0.0589517541,
0.1363340765,
-0.1539938897,
-0.0215024147,
-0.3564299047,
0.3532889187,
-0.3079816997,
-0.0022188155,
-0.5760569572,
0.4602970779,
0.225351423,
0.1146567911,
-0.3499866724,
0.081661582,
-0.018087497,
-0.1610580385,
0.2363678366,
0.4460686743,
0.4146799445,
0.1097493619,
0.1686043292,
0.2710582614,
0.1670387685,
-0.2693634331,
0.0627517551,
-0.0016401885,
-0.0410065204,
-0.0433320291,
-0.3934131861,
0.422116071,
-0.4550406039,
0.2155924588,
-0.0498141535,
-0.2381016612,
0.3719780743,
-0.2404191047,
-0.3715459704,
-0.3221813738,
0.0555100143,
0.201331377,
0.3979918063,
0.1380228549,
-0.3230941594,
-0.2223696858,
0.55681777,
-0.2677236199,
-0.044083938,
0.2187602967,
0.0767736137,
-0.0927000046,
-0.0063629476,
0.4271460176,
0.5686032772,
0.1891499758,
-0.0050976607,
0.0726152137,
0.1620378792,
-0.2171123624,
0.0931700319,
-0.0569994189,
-0.2845198214,
0.4713275433,
-0.1306784749,
-0.0947833359,
-0.1979998648,
-0.099468112,
0.1194209307,
-0.0797040761,
-0.2946248949,
-0.1620978713,
-0.1482625455,
-0.0003962888,
-0.2877539992,
-0.0308163036,
-0.2367897928,
-0.0827491805,
0.018034203,
-0.2179911584,
-0.2284267843,
0.1162504181,
0.0323142745,
0.5113555789,
-0.0659379587,
-0.320917666,
-0.0074015753,
-0.0986248553,
0.1329326183,
0.0375226289,
0.0140520558,
0.0293449499,
0.3444524407,
-0.453989327,
-0.1573837101,
-0.1354925781,
-0.4523467124,
0.2571454942,
0.025269758,
0.2022721618,
0.4698035419,
0.1496610343,
0.4038850069,
-0.4223379791,
0.1172407493,
0.1950116158,
-0.0584863722,
-0.1571609378,
0.3128278553,
0.3103935421,
-0.1627748013,
-0.3867168725,
-0.2580544055,
-0.4590799212,
0.5031455755,
-0.1358194798,
-0.022437796,
-0.1487897336,
-0.2745601833,
-0.0523805134,
-0.2959288061,
-0.125653252,
-0.1996819079,
-0.1766324788,
0.0354969427,
0.0609538108,
0.0536816791,
-0.0477328934,
-0.2104067355,
0.0341538675,
0.0744491443,
-0.2040314078,
-0.3255484998,
-0.1363039166,
0.3390487134,
0.0112054376,
0.0815867707,
0.1067786515,
0.1758702546,
0.0000052401,
-0.080132775,
0.068153128,
0.0303222016,
-0.0149523718,
0.05729682,
0.5393959284,
0.2327963561,
-0.057665918,
0.7472346425,
0.377546072,
0.0626542941,
0.1162507832,
0.0669218376,
0.170931533,
-0.0005934256,
-0.1607790887,
-0.0000298768,
-0.0566839278,
-0.0926366001,
0.4750580788,
0.1403419673,
0.0117111038,
-0.1015024781,
0.1976106912,
-0.2708395123,
-0.3659680784,
0.159187004,
-0.2005234957,
0.1968027502,
-0.2361410558,
-0.3024656773,
0.2158326656,
0.0228232536,
-0.1030855998,
0.5496346951,
0.0370486677,
-0.1838748902,
-0.2712216079,
-0.0312437508,
-0.0837328807,
0.2494404018,
0.1737219393,
0.0149891507,
0.0675290897,
-0.1672512591,
0.0981733426,
0.1079643741,
1.0811163187,
0.1788978875,
-0.0524602011,
-0.0761789978,
0.0330712311,
0.1955446154,
-0.1275975108,
-0.2039338052,
0.1303955168,
-0.0190606862,
0.4882530868,
-0.507016778,
-0.2785490155,
-0.027771147,
0.207384035,
-0.0545730777,
-0.2268557101,
-0.1397345662,
0.0658669993,
-0.1295552403,
0.0430160761,
0.1374305636,
-0.2451908439,
-0.392706573,
-0.1616642624,
-0.1458764076,
-0.2174461484,
0.1976643503,
0.1010435447,
0.430131793,
-0.1160454005,
0.091193378,
0.3577504158,
0.322615236,
0.0202853549,
0.4102913439,
-0.4718901813,
-0.4126179218,
0.107316047,
-0.0742651448,
0.2844459116,
0.3385422528,
-0.2720153034,
-0.0701581091,
0.0271229018,
0.2678049207,
-0.4775443077,
0.3809912205,
0.5574835539,
-0.1023027524,
-0.5943633914,
-0.6634486318,
0.5417013764,
0.1793458462,
-0.3210794628,
0.2962114513,
0.313868165,
-0.3164084554,
0.1125385463,
-0.3175486922,
1.0416969061,
-0.0108996341,
0.1675450504,
0.0013367775,
0.0664188266,
0.4987932742,
-0.3602879047,
0.0707582682,
-0.3156728148,
-0.1463380605,
-0.0828581825,
-0.1140375882,
0.2824696004,
0.4712097645,
-0.3149432838,
0.2415654659,
-0.0905341581,
-0.0423522145,
-0.0676927567,
0.3007896543,
-0.0262636635,
0.0562025011,
-0.4096762836,
-0.0034017514,
-0.2125967592,
-0.0650001541,
-0.0838232785,
-0.0384672396,
0.2984065413,
-0.1713413447,
0.1633997113,
-0.1722602099,
0.1477296352,
-0.0686481968,
-0.0109895524,
-0.2912520468,
0.1269803941,
0.2733586729,
-0.1132133529,
0.1404917687,
-0.1376131028,
0.1584897339,
0.0323965885,
0.1681774855,
0.0302721523,
-0.0632784516,
0.1965843588,
0.3251466453,
-0.1255854666,
-0.2150095254,
-0.0996277407,
0.0492470935,
-0.3875613511,
0.3375188708,
0.1376928985,
-0.6305493116,
-0.3615398407,
-0.0457141139,
0.0648339987,
0.0358010307,
0.0949791372,
0.1275798678,
-0.2739123106,
0.297007978,
-0.0874330625,
-0.2532705665,
-0.0208820552,
0.0908028036,
0.184600234,
-0.13151519,
0.0224901345,
-0.1798814535,
-0.1690970659,
-0.1197787151,
0.2326882929,
0.1593333483,
-0.4164411128,
0.3130958974,
0.0893967226,
-0.0617850013,
0.1244586185,
-0.046506945,
0.3036098778,
-0.1137446985,
-0.0160963349,
-0.2034008354,
-0.062117096,
0.5099206567,
0.0531053804,
0.4543669224,
0.2594955862,
0.0225864202,
-0.249257952,
-0.1279300451,
-0.2458259612,
0.2120691836,
-0.0203291383,
0.1775473207,
0.1529134661,
0.0882578045,
0.0382131524,
0.027430445,
0.1609685123,
-0.0983837619,
-0.1049029753,
-0.1971645057,
-0.183312133,
0.1996545792,
-0.1116481125,
0.1351350695,
0.2450855672,
-0.3828124106,
-0.0372624174,
-0.2319634706,
0.36338678,
0.0583661534,
0.1710223705,
0.0471734852,
0.3491786122,
-0.111082077,
-0.2921586037,
0.3731571436,
-0.0143020023,
0.1362321824,
0.190996021,
0.2159164697,
-0.5582267046,
0.1160538197,
-0.2300285697,
0.0706749558,
0.3777455091,
0.1689163148,
0.0498494655,
-0.0070533212,
-0.0103834616,
-0.1577832252,
0.7432069182,
0.4274043441,
-0.4165802896,
-0.0176986717,
0.2642482221,
0.1808013916,
-0.238605842,
-0.1077914461,
0.2323859334,
0.1851421744,
0.1552685499,
0.2174814194,
0.2301474214,
0.397056818,
-0.0464850292,
-0.1416873634,
0.6079689264,
0.0807812288,
0.4475246072,
0.8007004857,
0.0074409135,
0.0718505383,
0.30579561,
-0.0191926491,
0.1481178254,
0.5727341175,
-0.1499138772,
0.3303239942,
0.0121951466,
0.271084398,
0.2183010876,
-0.3172479868,
0.0953788087,
0.1328609288,
-0.4525334835,
-0.011918867,
-0.1101045758,
0.505771935,
-0.3230488896,
-0.089860864,
-0.0381044671,
0.16234079,
-0.0493354872,
-0.2530217469,
0.1796303988,
-0.3319830298,
-0.2227906883,
-0.1665986776,
-0.1747682989,
0.0826724544,
0.3398841023,
0.2150868028,
0.2756182849,
-0.3264671564,
0.2206339687,
0.0137897125,
0.3658663034,
-0.1821214557,
0.3199584186,
0.1813359261,
-0.0029463982,
0.3390268385,
0.0048186127,
0.1966870576,
0.2849861085,
0.1196420193,
-0.3461158276,
-0.1810968071,
0.0413491763,
-0.2030730993,
0.1303834319,
0.1280458421,
0.1152074784,
0.0839920416,
0.1886098683,
-0.1382757723,
0.0205598865,
-0.026300516,
-0.1373492777,
-0.6669573188,
0.5236170888,
0.0253670942,
-0.0652031824,
0.0032563056,
-0.0458212309,
-0.8148396611,
-0.118477501,
0.3094720542,
0.0844640136,
0.0729202107,
0.1381715834,
0.0796411783,
-0.0512739532,
0.0948890299,
-0.1658791006,
0.2505735755,
-0.0949707851,
-0.144157812,
-0.6418515444,
0.0907761902,
0.2215408832,
-0.1252621561,
0.1317852437,
-0.0288136881,
-0.0447266586,
0.1646793932,
-0.2409202456,
-0.1709313989,
0.0619655363,
-0.096036166,
-0.1118346155,
-0.1384825259,
-0.2101253569,
0.0968595073,
0.0169222672,
-0.3128101528,
-0.0199589338,
0.4649628997,
-0.2170727104,
-0.0893991292,
0.0298745763,
0.4015928507,
0.0050027133,
0.0625669807,
0.3240337968,
0.4233108461,
-0.0819480419,
0.0855389833,
-0.0699010491,
-0.2420570254,
-0.1434115618,
0.132082358,
-0.0299845226,
0.0947777554,
-0.2783899307,
-0.0714749172,
-0.3300521374,
-0.0423179679,
0.1216552034,
0.0811610818,
-0.5107961893,
-0.1405005306,
-0.1606341898,
-0.1128660291,
0.0719982162,
0.5833615065,
-0.0941119269,
0.0209733285,
0.0773391575,
-0.0403744429,
0.3142377436,
-0.1618736982,
-0.1829288602,
0.0317695476,
0.2825925052,
-0.1698936224,
0.0228879843,
-0.3034388423,
-0.0156914834,
0.5484156609,
-0.1112730578,
-0.0839528665,
0.1212776303,
0.0387472548,
-0.2106091976,
-0.1320751011,
-0.026436124,
0.3835372031,
-0.2983136177,
0.2151959091,
-0.203115657
] |
https://github.com/huggingface/datasets/issues/3018 | Support multiple zipped CSV data files | @lhoestq I would like to draw your attention to the proposed API by @lewtun, using `data_dir` to pass the ZIP URL.
I'm not totally convinced with this... What do you think?
Maybe we could discuss other approaches...
One brainstorming idea: what about using URL chaining with the hop operator in `data_files`? | As requested by @lewtun, support loading multiple zipped CSV data files.
```python
from datasets import load_dataset
url = "https://domain.org/filename.zip"
data_files = {"train": "train_filename.csv", "test": "test_filename.csv"}
dataset = load_dataset("csv", data_dir=url, data_files=data_files)
```
| 51 | Support multiple zipped CSV data files
As requested by @lewtun, support loading multiple zipped CSV data files.
```python
from datasets import load_dataset
url = "https://domain.org/filename.zip"
data_files = {"train": "train_filename.csv", "test": "test_filename.csv"}
dataset = load_dataset("csv", data_dir=url, data_files=data_files)
```
@lhoestq I would like to draw your attention to the proposed API by @lewtun, using `data_dir` to pass the ZIP URL.
I'm not totally convinced with this... What do you think?
Maybe we could discuss other approaches...
One brainstorming idea: what about using URL chaining with the hop operator in `data_files`? | [
-0.04363662,
0.0263967384,
-0.2615993917,
-0.0185473356,
0.0255619343,
-0.0422075503,
0.3967736363,
0.2515758872,
0.300516367,
0.1386565119,
0.0246002208,
0.3511759639,
-0.0738245323,
0.4689002633,
-0.0553035401,
-0.031526234,
0.1049562395,
0.0371839143,
-0.254355669,
0.1798335016,
-0.4606361389,
0.1624905914,
-0.2674737573,
-0.2959585786,
0.1731169075,
0.1512974948,
-0.4463755488,
0.1381656975,
-0.1852311939,
-0.2603346705,
0.3103383482,
0.4319653809,
0.0832273588,
0.3215487301,
-0.000100246,
-0.0111013381,
0.1156262234,
-0.0382663272,
-0.2498729527,
-0.4966262877,
-0.061884474,
-0.5920063257,
0.1507883668,
-0.3615576029,
-0.0270743947,
-0.2116898,
0.0227411631,
-0.3560549021,
0.5224735737,
0.0643955171,
0.2478263229,
-0.1120515242,
-0.202586785,
-0.092037119,
0.0234451164,
0.1429212391,
-0.0554823987,
0.2300869972,
0.3940663338,
-0.3152675927,
-0.1596294194,
0.0186501816,
-0.0154168289,
0.1507205665,
0.2266866267,
0.0292694271,
-0.2085196376,
-0.2015845329,
-0.2037311941,
-0.0787251741,
0.5302680135,
-0.1150342524,
-0.4657897055,
-0.2253692597,
-0.1263516098,
-0.2694243193,
0.0023909048,
0.2622335255,
-0.0907645747,
0.2015091926,
-0.1180957481,
-0.1633692235,
-0.2983177304,
0.1397202015,
0.0166543275,
0.4006107748,
-0.0975459218,
0.175203681,
0.1303571314,
0.0758952275,
0.3332105279,
-0.2281384915,
0.4936175346,
0.1271246225,
-0.279976964,
-0.1529814303,
-0.0303083714,
-0.1952121407,
0.2260190398,
0.4028478563,
0.2682903707,
-0.0182480756,
-0.1999374032,
0.1068643332,
0.3378008008,
0.0317782983,
-0.1353936791,
-0.046031069,
0.2748931646,
0.1731686145,
0.1857204735,
-0.1363656521,
-0.0758871138,
-0.1692972779,
-0.2145165801,
0.2636391222,
0.1367028356,
0.2679504156,
-0.1150045916,
-0.1711583883,
-0.1239367276,
-0.3324912488,
0.0483509563,
0.1693088859,
-0.2614636123,
0.4086422026,
-0.091106154,
0.2081849128,
0.1356900036,
-0.0016189517,
-0.0810258016,
0.0636239201,
-0.2558552623,
0.1231588125,
0.2967296541,
0.0194938313,
0.0508868173,
0.2665133476,
0.2375354767,
-0.0483856685,
0.2765946388,
0.0274853855,
0.1173678637,
-0.0025270442,
0.1346362829,
0.1125479266,
0.2061370462,
-0.1383029222,
-0.1542519927,
0.2669120729,
-0.683811307,
-0.2387518585,
0.0750438944,
0.2425269634,
-0.1118312255,
0.0122405579,
-0.221193403,
0.2078766227,
-0.2809886038,
-0.0636906028,
-0.0652965456,
0.1397291124,
-0.2120666653,
-0.42751652,
0.0195957832,
0.4219415486,
-0.1644597501,
0.0397631973,
-0.1026981845,
0.0638882816,
-0.0415249281,
0.1556165516,
-0.4455312788,
-0.0630902871,
-0.2526977956,
0.1106394827,
0.4125576019,
-0.5059449077,
-0.1921288818,
0.5535314679,
0.0032553931,
0.1533460766,
0.3123894334,
-0.0982756019,
0.1020752117,
-0.1097080633,
0.2193707228,
0.4260470569,
-0.0111640748,
0.076310955,
-0.1428826004,
-0.4190196991,
0.278504312,
0.2693857253,
-0.1089914218,
-0.1277963817,
-0.0768966228,
-0.7075765133,
0.5397416353,
-0.1505293101,
0.0171481986,
-0.2035269439,
0.0456457958,
0.1132193953,
-0.0430055521,
0.1150095686,
-0.4236183167,
0.1653789729,
-0.071754165,
-0.1156513616,
-0.1464954913,
-0.2864288092,
-0.1096561104,
-0.0159442406,
-0.1837444454,
-0.0471786521,
0.2330159992,
0.0539152585,
-0.2111236304,
-0.0962470099,
-0.2758669257,
0.2824771702,
0.2066916972,
0.1845916957,
-0.1800290048,
0.311285466,
0.0513940863,
0.3126387596,
0.0851907507,
0.0641659647,
0.1782819182,
-0.32194224,
0.1481123865,
0.2800829709,
0.1103475541,
0.0278671328,
0.2154513896,
-0.024692826,
0.2957790196,
0.0191363655,
0.1111767069,
0.2755141556,
0.0702280477,
-0.1409218758,
-0.3595099151,
0.5948728323,
-0.3154378235,
0.1355624795,
0.0929267853,
0.0885935351,
0.2146630734,
-0.1898742318,
-0.2741461694,
-0.0101431971,
-0.0003116922,
0.2729882598,
0.2020614743,
-0.1027798727,
-0.0831916109,
0.0039278171,
-0.0492043532,
-0.1705230772,
-0.2223514169,
0.1758680195,
0.061268203,
-0.1614273638,
0.1547979563,
0.578302145,
0.5669013858,
0.3175037801,
-0.0222533979,
-0.147672087,
0.1143327877,
-0.2679821253,
0.2796593308,
-0.0565996692,
-0.0011973898,
0.1733516157,
0.0234102439,
0.0007522024,
-0.1147570759,
-0.3495036066,
0.2905477285,
-0.0434748568,
-0.0525840782,
0.0775063112,
-0.1852654666,
-0.4047700465,
-0.1697558016,
-0.2295651287,
0.1156112552,
-0.2231193036,
0.0008892973,
0.0627502054,
-0.1485074759,
0.061569903,
-0.0149181057,
0.4625589848,
-0.1160436869,
-0.2457058728,
0.0740202069,
0.1203110293,
0.1111494824,
0.2595193386,
0.3215945959,
-0.173007831,
0.3103784025,
0.3767893016,
0.1228501648,
-0.2942711413,
-0.0264550038,
-0.019800419,
0.0405319706,
0.2414722443,
0.1998557299,
0.0220446922,
0.2829364836,
-0.1915224195,
0.0830708966,
0.2160795033,
0.193479836,
-0.2949891984,
0.2222929448,
0.0107381698,
-0.1970663369,
-0.2688372731,
-0.4581341445,
-0.2301177084,
0.4133519232,
-0.0224769097,
0.1804952174,
0.1178751886,
0.0956542417,
-0.1148525551,
0.3196908236,
-0.3219423592,
-0.1252059042,
-0.5076757073,
0.2632466853,
-0.2517264485,
-0.1867694557,
-0.1030993536,
-0.0184347145,
0.2382459641,
0.0730054006,
-0.1397067457,
-0.2729609013,
-0.0326202288,
0.2985882461,
-0.1966241598,
0.0010503244,
0.2337561101,
0.1340591758,
-0.170600459,
0.0104452753,
-0.1902240664,
-0.0386976041,
0.0194458235,
-0.0252132658,
0.2876063287,
0.0379484184,
0.1765842438,
0.5748739839,
0.2305501252,
0.342761904,
0.4909664094,
0.0696867034,
0.1371340156,
0.2529774308,
-0.4236738384,
-0.154765293,
-0.2582745254,
-0.0993017033,
0.238971144,
0.1620044112,
-0.2119171917,
-0.3041334152,
-0.0874246284,
-0.2466591001,
-0.2997457087,
0.2722125649,
-0.1214604154,
0.0819778517,
-0.1065679714,
-0.2922975719,
-0.2137353867,
0.1334165186,
-0.1446245313,
0.1436084062,
0.4005553126,
-0.2904071808,
0.0339707881,
-0.0150436973,
-0.4335340858,
0.2562675178,
0.1954324692,
-0.1144478619,
0.254501611,
-0.0042758859,
-0.0248507876,
-0.1719619632,
0.8443654776,
-0.2399284095,
-0.1058282927,
0.056048993,
-0.0557082146,
-0.0517946668,
0.0075754905,
-0.0749864876,
0.1725841463,
-0.0599122643,
0.6023207307,
-0.069044143,
-0.2372643501,
-0.0364344195,
0.0461738631,
-0.0764633343,
-0.4154781401,
0.0308857411,
-0.1420424432,
-0.1854307801,
-0.2316779345,
0.1894392818,
0.002945859,
-0.1819388866,
-0.3256593645,
0.1630178988,
-0.2703571022,
0.1906868368,
-0.188956961,
-0.1525901258,
0.0267387331,
0.0579700731,
-0.0238332339,
0.1284905374,
-0.0268280096,
0.5123254657,
-0.3112597764,
-0.4419207871,
-0.159632951,
0.0088830004,
0.3466593921,
0.2170005441,
-0.117718339,
0.3077770174,
-0.1870564222,
0.1240669563,
-0.2073683441,
-0.1435564607,
0.2779673636,
-0.2211281508,
-0.3391640484,
-0.6646487713,
0.4754726887,
0.0418842286,
-0.1440210789,
0.5803974271,
-0.2641398013,
-0.178400591,
0.224215135,
-0.1004262641,
0.6979022026,
-0.0560440794,
0.2304198295,
0.0730275959,
-0.1001854837,
0.4026812017,
-0.3819880188,
0.0737324283,
-0.1766742468,
-0.1108650565,
-0.2109683901,
0.081145443,
0.2823175192,
0.2697831392,
-0.384018749,
0.1904999167,
0.1522935778,
0.0648824275,
-0.0584733896,
0.3587835431,
-0.2687627971,
-0.2687599063,
-0.1971746981,
0.2404780388,
0.1327706575,
-0.1958126575,
-0.0833187401,
-0.4029222429,
0.0952171981,
-0.1876113415,
-0.1005133241,
-0.024993889,
-0.1980588734,
0.2668449283,
-0.0769538358,
-0.1249017566,
0.1240606606,
0.2417644709,
-0.1614204049,
-0.2171381414,
-0.2727911174,
-0.0507462695,
-0.329675585,
0.041443795,
-0.3553840816,
-0.3095292151,
0.2235206962,
0.0028108011,
-0.1435903609,
0.1008725092,
0.0024976935,
-0.4741648138,
0.0037840577,
0.3981919289,
0.2765811086,
-0.4856670797,
-0.1146222576,
-0.0462278612,
-0.1743899733,
-0.1404399723,
0.1834312528,
0.1470626146,
0.075615786,
0.1183099672,
-0.0364450403,
-0.0028429546,
-0.0364377797,
0.2152429968,
-0.0357677154,
-0.176699698,
0.0484141707,
-0.0401738249,
-0.0893105716,
-0.1768966764,
0.2340343595,
-0.1126086116,
-0.0242690872,
0.1455601454,
0.1334692538,
0.2155466676,
0.0207253788,
0.2382821143,
0.1814884245,
0.2159806341,
0.1049412265,
-0.4827748239,
0.1086331457,
0.2172346562,
-0.1722261459,
0.159155637,
-0.0529885218,
0.0073597305,
0.2837333977,
-0.1090141162,
-0.4119296074,
0.3396407068,
0.2113259137,
-0.2107934356,
0.2316865772,
-0.0187075902,
-0.0291058701,
0.1412700266,
0.237216264,
-0.0493061133,
-0.1017475128,
-0.3119332492,
-0.1629477739,
0.0969300866,
0.0984941497,
0.0571151637,
0.1411767602,
-0.2081140876,
-0.2090253979,
-0.1677100658,
-0.1252980232,
0.0106837507,
-0.0788029954,
-0.0352213942,
0.0241592713,
0.0611208193,
-0.3474845588,
0.2156696767,
0.093567498,
0.252723217,
0.0941168293,
0.0334320478,
-0.1712851077,
-0.0702113211,
-0.2274680734,
0.0989599004,
0.1823252141,
0.1334060878,
0.2230606973,
-0.0427492559,
-0.026774276,
0.1925477684,
0.4988727272,
0.4128421545,
-0.2467796952,
0.3378993571,
0.1444440633,
0.2865644991,
-0.1895365715,
-0.04402164,
-0.0668147951,
0.0493471771,
0.1692689657,
0.2410730422,
0.1566034555,
-0.0464911759,
0.3298496604,
-0.0759826526,
0.429284811,
0.0360220075,
0.3089877367,
0.3690696657,
0.0117740519,
0.0571665876,
0.0394063331,
-0.0650232434,
0.242874518,
0.1622299552,
-0.2445269972,
0.1119500473,
0.2162940502,
0.0669857636,
-0.0734781623,
-0.3386808932,
0.1718766838,
0.0205384325,
-0.1934072971,
0.2071423978,
0.1775280684,
0.8204313517,
-0.4228863716,
0.0273288153,
-0.1850316226,
0.2683815062,
0.0838447139,
-0.192038998,
0.1427431107,
-0.1216469333,
-0.3409242332,
0.1107121482,
-0.0827143714,
-0.1041625664,
0.363432318,
-0.0618611425,
0.1341859549,
-0.2129481733,
-0.0011269414,
0.0980164483,
0.3138020337,
-0.3279120624,
-0.017215807,
0.3213943839,
-0.1736562401,
-0.0050592236,
-0.0739193186,
0.3337908983,
0.1971403807,
0.166271925,
-0.0079773348,
-0.3583987057,
0.0712139234,
-0.0211341754,
-0.0043745325,
0.198383078,
-0.0182648823,
0.3485850096,
0.2559657693,
-0.2135657668,
0.4057285488,
0.2306503505,
0.0528898574,
-0.5972956419,
0.0646359399,
0.225114882,
0.0000943688,
-0.063506335,
-0.0965301245,
-0.520917356,
-0.2015880942,
0.0693013668,
-0.0323285535,
0.1574905962,
0.0511841066,
0.156927824,
0.0792672336,
0.2147050351,
-0.0491754897,
0.1600675136,
-0.3750809133,
-0.3442467153,
-0.6343667507,
-0.1843774766,
0.0610598922,
0.0583270155,
-0.3501133621,
0.0256940033,
0.1481095701,
0.2071827501,
-0.2560755908,
-0.2106045336,
0.519184351,
0.1917538047,
-0.2794000804,
-0.0563507676,
0.3478946388,
0.1479899585,
0.1169092804,
-0.1997031122,
0.0499068089,
0.0090963775,
0.0676865429,
-0.2504602671,
-0.0781901404,
0.0520675927,
-0.1795135289,
0.5305588245,
-0.1028097719,
0.2437043339,
-0.2753948569,
0.1318181306,
-0.1009477228,
0.1580091417,
0.0018561111,
-0.0375951082,
0.2376191765,
0.0357046723,
-0.2538923025,
0.1135588065,
-0.1296252608,
-0.0534116812,
-0.0602825247,
-0.0136978542,
-0.1225164235,
0.0344448388,
0.0185682569,
-0.1133440509,
-0.1704265922,
0.3096364141,
-0.211735189,
0.0472269766,
0.0446805693,
-0.2332462221,
0.2912090421,
-0.2441502213,
-0.1188101545,
-0.0046938579,
0.1982916445,
-0.2200138718,
0.3554752767,
-0.2046429217,
0.0170532726,
0.416043669,
0.2202560455,
-0.1939709336,
0.5686308742,
0.0027934439,
-0.1773197502,
-0.1613823324,
0.3592564762,
0.2022491246,
-0.2161222845,
-0.025156958,
-0.3636342883
] |