html_url
stringlengths 48
51
| title
stringlengths 5
280
| comments
stringlengths 63
51.8k
| body
stringlengths 0
36.2k
⌀ | comment_length
int64 16
1.52k
| text
stringlengths 159
54.1k
| embeddings
listlengths 768
768
|
|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/6392
|
`push_to_hub` is not robust to hub closing connection
|
Opened a PR to retry in case S3 raises HTTP 500. Will also retry on any `ConnectionError` (connection reset by peer, connection lost,...). Hopefully this should make the upload process more robust to transient errors.
|
### Describe the bug
Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error:
```
Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it]
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload
lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload
_upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part
else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively
part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff
response = session.request(method=method, url=url, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send
return super().send(request, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "convert_to_hf.py", line 116, in <module>
main()
File "convert_to_hf.py", line 108, in main
audio_dataset.push_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub
repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub
_retry(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry
return func(*func_args, **func_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file
commit_info = self.create_commit(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit
upload_lfs_files(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files
_wrapped_lfs_upload(filtered_actions[0])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload
raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc
RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub.
```
The function should retry if the operations fails, or at least offer a way to recover after such a failure.
Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed.
Previously, it would crash with an error 400 #4677 .
### Steps to reproduce the bug
Any large dataset pushed the hub:
```py
audio_dataset.push_to_hub(
repo_id="org/dataset",
)
```
### Expected behavior
`push_to_hub` should have an option for max retries or resume.
### Environment info
- `datasets` version: 2.14.6
- Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
| 35
|
`push_to_hub` is not robust to hub closing connection
### Describe the bug
Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error:
```
Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it]
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload
lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload
_upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part
else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively
part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff
response = session.request(method=method, url=url, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send
return super().send(request, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "convert_to_hf.py", line 116, in <module>
main()
File "convert_to_hf.py", line 108, in main
audio_dataset.push_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub
repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub
_retry(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry
return func(*func_args, **func_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file
commit_info = self.create_commit(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit
upload_lfs_files(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files
_wrapped_lfs_upload(filtered_actions[0])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload
raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc
RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub.
```
The function should retry if the operations fails, or at least offer a way to recover after such a failure.
Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed.
Previously, it would crash with an error 400 #4677 .
### Steps to reproduce the bug
Any large dataset pushed the hub:
```py
audio_dataset.push_to_hub(
repo_id="org/dataset",
)
```
### Expected behavior
`push_to_hub` should have an option for max retries or resume.
### Environment info
- `datasets` version: 2.14.6
- Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
Opened a PR to retry in case S3 raises HTTP 500. Will also retry on any `ConnectionError` (connection reset by peer, connection lost,...). Hopefully this should make the upload process more robust to transient errors.
|
[
-0.528481662273407,
-0.36381134390830994,
-0.0648718848824501,
0.1819303035736084,
0.3242589235305786,
-0.20704445242881775,
0.17081214487552643,
0.30811524391174316,
-0.03854181617498398,
-0.02296958863735199,
-0.19621892273426056,
0.1802101880311966,
0.17350462079048157,
0.04469935595989227,
0.06687537580728531,
0.036477230489254,
0.14159126579761505,
0.05757877603173256,
-0.00749070942401886,
-0.15354984998703003,
-0.22179248929023743,
0.037004753947257996,
-0.13432244956493378,
0.13027779757976532,
-0.16990914940834045,
-0.25265270471572876,
0.2624889314174652,
0.3343152701854706,
-0.055671319365501404,
-0.44492533802986145,
0.22087830305099487,
0.20424436032772064,
-0.1798638254404068,
0.26940491795539856,
-0.00011312132119201124,
0.09079407155513763,
0.25773170590400696,
0.06974117457866669,
-0.2290952354669571,
0.0028390735387802124,
-0.5200387835502625,
-0.36414480209350586,
-0.0908079594373703,
-0.16243918240070343,
0.14515182375907898,
0.20871038734912872,
-0.3388904929161072,
0.1936165690422058,
0.4470994472503662,
0.012405726127326488,
0.2051922231912613,
0.41037875413894653,
0.5811352133750916,
-0.1925916075706482,
0.21170362830162048,
-0.1271490901708603,
-0.2800542712211609,
0.1825995296239853,
0.33075451850891113,
0.060192644596099854,
-0.2460556924343109,
-0.028496839106082916,
0.004077276214957237,
-0.19606150686740875,
-0.1110646203160286,
-0.20254619419574738,
-0.1438719928264618,
-0.11469091475009918,
-0.04216846823692322,
0.1616497039794922,
-0.060242362320423126,
-0.26355963945388794,
-0.17657150328159332,
-0.0916089341044426,
-0.4114370346069336,
-0.03760862350463867,
0.14648157358169556,
-0.005322698503732681,
-0.1069917380809784,
0.019071249291300774,
-0.21786752343177795,
-0.35013556480407715,
-0.4473637640476227,
0.07534051686525345,
0.05242575705051422,
0.3607250452041626,
0.15071895718574524,
0.21767288446426392,
-0.057595301419496536,
-0.13654932379722595,
0.40549716353416443,
-0.0013173073530197144,
-0.12222498655319214,
-0.31562796235084534,
-0.27014651894569397,
-0.31794390082359314,
-0.08876942843198776,
0.27679023146629333,
0.26309460401535034,
-0.010884378105401993,
-0.24020947515964508,
0.23557427525520325,
-0.14977721869945526,
0.0474599152803421,
0.3204139173030853,
-0.03722286596894264,
0.13277581334114075,
0.21899013221263885,
0.3336617946624756,
0.40625375509262085,
0.04586036875844002,
0.16240113973617554,
0.31295377016067505,
-0.24722754955291748,
0.28344807028770447,
0.23525464534759521,
0.41178470849990845,
-0.05655178800225258,
-0.25112608075141907,
0.2026958167552948,
-0.14244559407234192,
0.28136056661605835,
0.16697503626346588,
0.2531502842903137,
-0.10851798206567764,
0.278268426656723,
-0.17488330602645874,
-0.08216137439012527,
-0.23290570080280304,
0.12418671697378159,
-0.23586459457874298,
0.07622732222080231,
0.0844557136297226,
-0.14305290579795837,
0.04444554075598717,
-0.3138037919998169,
0.11527132987976074,
0.06759390980005264,
-0.14542289078235626,
-0.06632885336875916,
-0.17613999545574188,
-0.19454166293144226,
0.1692880541086197,
0.19967447221279144,
0.061756815761327744,
0.11178576201200485,
-0.09917716681957245,
-0.11202999949455261,
0.01052941381931305,
-0.07000987976789474,
-0.2471415102481842,
-0.23404116928577423,
-0.09466990828514099,
0.2755448818206787,
-0.2959650158882141,
-0.04244021326303482,
-0.06385176628828049,
-0.3337416350841522,
-0.09965463727712631,
0.038190808147192,
0.22300225496292114,
0.09287574887275696,
-0.2883155941963196,
-0.19083935022354126,
0.1732926070690155,
0.4544134736061096,
-0.06635837256908417,
0.25210121273994446,
0.5756645202636719,
-0.10052068531513214,
-0.18640181422233582,
0.21700458228588104,
-0.0670560896396637,
0.08815820515155792,
-0.14609017968177795,
0.09459938108921051,
0.06768618524074554,
-0.5594079494476318,
-0.6116234660148621,
0.07956309616565704,
-0.09101570397615433,
-0.0723377987742424,
-0.2778012454509735,
0.04108129069209099,
0.33538299798965454,
-0.20139272511005402,
0.16270285844802856,
0.14689956605434418,
-0.12249958515167236,
0.09595467895269394,
-0.42961618304252625,
-0.2177642583847046,
-0.062301166355609894,
0.06456564366817474,
0.2512776553630829,
-0.23762977123260498,
0.3139607608318329,
0.3702259957790375,
0.3068266808986664,
0.3327186107635498,
0.24157458543777466,
-0.029794879257678986,
0.761249840259552,
-0.49083787202835083,
0.12300829589366913,
-0.1720123291015625,
-0.31675586104393005,
0.3562568426132202,
0.09405477344989777,
0.020950809121131897,
-0.2331302911043167,
-0.03730902820825577,
-0.44377464056015015,
0.21274611353874207,
-0.29106849431991577,
0.2547070384025574,
0.1914948970079422,
-0.3782634139060974,
-0.23941299319267273,
0.12919291853904724,
0.03755232319235802,
0.25974923372268677,
-0.28753072023391724,
0.11948676407337189,
-0.11245359480381012,
0.37269702553749084,
-0.014083212241530418,
-0.05159195140004158,
-0.11481894552707672,
0.17815524339675903,
0.4325456917285919,
-0.2639259994029999,
-0.17749080061912537,
0.35142192244529724,
0.2647264301776886,
0.5595268607139587,
0.02797827497124672,
-0.048180848360061646,
0.4132259488105774,
0.13488809764385223,
0.05590536445379257,
0.1453557312488556,
0.17661802470684052,
-0.10312290489673615,
0.028874248266220093,
0.1891428828239441,
0.010528363287448883,
0.09417847543954849,
0.14678870141506195,
0.23189759254455566,
0.051684580743312836,
-0.003278084099292755,
0.15436530113220215,
-0.018236886709928513,
-0.026811350136995316,
0.13306838274002075,
-0.030921246856451035,
-0.25578024983406067,
0.07531984150409698,
0.22665375471115112,
0.4046325981616974,
-0.04230833798646927,
0.18770259618759155,
0.09728534519672394,
0.005704276263713837,
-0.16288623213768005,
0.5374510288238525,
0.34231022000312805,
0.18167448043823242,
-0.12198769301176071,
-0.06255696713924408,
0.2495613396167755,
-0.0352727435529232,
-0.26275956630706787,
0.22255095839500427,
0.17581427097320557,
0.16026736795902252,
0.2398604154586792,
0.1359379142522812,
-0.05890696123242378,
-0.16813598573207855,
-0.09647345542907715,
-0.015119935385882854,
0.2090543657541275,
-0.24365922808647156,
-0.19879589974880219,
-0.11176479607820511,
0.24134492874145508,
0.07122473418712616,
-0.30600714683532715,
-0.15859061479568481,
-0.4963490962982178,
0.03930781036615372,
0.3852550983428955,
-0.04042323678731918,
0.23162685334682465,
0.15346920490264893,
-0.07658930122852325,
0.23951561748981476,
-0.01838248409330845,
-0.12387415766716003,
-0.10206593573093414,
-0.03221824765205383,
0.061258409172296524,
0.1528642624616623,
-0.012858923524618149,
0.3206233084201813,
0.08374092727899551,
-0.1501460075378418,
-0.37667813897132874,
-0.04614663124084473,
0.10696303844451904,
-0.0015542656183242798,
0.08456103503704071,
0.3149935007095337,
0.15179100632667542,
0.07912784069776535,
-0.08228433132171631,
0.2515711486339569,
-0.20877428352832794,
-0.20279183983802795,
0.043150048702955246,
-0.24940113723278046,
-0.052509140223264694,
0.1533847153186798,
-0.2042156457901001,
-0.3127768933773041,
-0.4688297510147095,
0.1986444741487503,
-0.017671646550297737,
0.16634678840637207,
0.27965298295021057,
0.018320363014936447,
-0.09549175202846527,
0.11568006128072739,
-0.4859437644481659,
-0.04564892500638962,
-0.22048813104629517,
0.08353297412395477,
-0.039118047803640366,
-0.15864618122577667,
0.143246591091156,
0.09026230126619339,
0.389743834733963,
0.15323080122470856,
-0.2842993140220642,
-0.3886454999446869,
0.05775009095668793,
0.4125409722328186,
-0.22374039888381958,
-0.06655274331569672,
0.2963465452194214,
0.09480009227991104,
-0.0234859436750412,
0.10128317028284073,
0.0752914696931839,
0.1893720179796219,
0.33697423338890076,
-0.059863217175006866,
-0.17415902018547058,
0.4545764923095703,
0.18910349905490875,
0.468547523021698,
0.09559781849384308,
-0.03640080615878105,
0.373690664768219,
0.14594289660453796,
0.03774309903383255,
-0.12048453837633133,
-0.23412398993968964,
0.08729150146245956,
0.03683429956436157,
-0.04916427284479141,
-0.11511670053005219,
-0.008907010778784752,
0.0681428462266922,
-0.17651444673538208,
-0.8343185186386108,
-0.0162621159106493,
-0.40259450674057007,
-0.060729533433914185,
-0.1268899142742157,
-0.03597359359264374,
-0.260073721408844,
0.1556001901626587,
-0.03518437594175339,
-0.25066304206848145,
0.1890832483768463,
0.11861702054738998,
0.1493770331144333,
-0.18214762210845947,
-0.108685202896595,
0.01064850203692913,
-0.475269615650177,
0.15006643533706665,
-0.09874320030212402,
0.6153148412704468,
0.10602058470249176,
0.15799206495285034,
-0.10538090765476227,
-0.08348145335912704,
0.5064742565155029,
-0.39414212107658386,
0.41831469535827637,
-0.02448776550590992,
-0.017408525571227074,
-0.3797093629837036,
-0.08534511923789978,
0.023724842816591263,
0.4133560061454773,
0.059525758028030396,
0.5642826557159424,
-0.018063314259052277,
-0.16323783993721008,
0.13608063757419586,
-0.13477440178394318,
-0.15753977000713348,
-0.09861224889755249,
0.1278344690799713,
-0.2673530876636505,
-0.2064170390367508,
0.19261698424816132,
0.16030213236808777,
-0.04623071104288101,
-0.19220396876335144,
-0.5829970836639404,
0.13898704946041107,
-0.2578135132789612,
-0.1253766417503357,
0.08267220854759216,
-0.105892114341259,
-0.3119417130947113,
0.3866189122200012,
-0.16871795058250427,
0.18906846642494202,
0.21113409101963043,
0.048285868018865585,
0.015875980257987976,
-0.14785116910934448,
-0.13283106684684753,
0.11689835786819458,
-0.010582096874713898,
0.44198325276374817,
-0.17486843466758728,
0.5048894882202148,
-0.29268065094947815,
0.29795026779174805,
-0.19335535168647766,
-0.269911527633667,
0.1175379827618599,
0.008113867603242397,
-0.2920054793357849,
0.22871990501880646,
0.2640911936759949,
-0.5037325024604797,
-0.1823035180568695,
0.09574046730995178,
0.10928214341402054,
-0.33483293652534485,
0.364967405796051,
0.1396094411611557,
0.809049665927887,
0.19690170884132385,
-0.008485455065965652,
0.17121464014053345,
-0.228065624833107,
0.27341228723526,
-0.40121668577194214,
-0.06029342859983444,
-0.27821922302246094,
0.08096231520175934,
-0.1274983286857605,
0.14412321150302887,
-0.042506180703639984,
-0.21513225138187408,
-0.26546022295951843,
0.3971923887729645,
-0.24349838495254517,
0.41456377506256104,
-0.17483170330524445,
0.19973808526992798,
-0.4170941710472107,
-0.14634092152118683,
-0.226215660572052,
0.19976337254047394,
-0.07041946053504944,
-0.06633056700229645,
-0.15916267037391663,
-0.21744705736637115,
0.049788739532232285,
-0.060299716889858246,
-0.20651882886886597,
0.1477663815021515,
-0.12236778438091278,
0.2865954041481018,
-0.07671213150024414,
-0.23023468255996704,
0.12250836193561554,
-0.1738305389881134,
0.504365086555481,
0.23136593401432037,
-0.22027577459812164,
0.36879783868789673,
-0.277092844247818,
0.04096419736742973,
0.1669892519712448,
0.0369514562189579,
0.15650150179862976,
-0.06062780320644379,
-0.4886523485183716,
0.016318514943122864,
-0.0004289187490940094,
-0.34163612127304077,
-0.000696137547492981,
-0.00010641664266586304,
0.22191859781742096,
-0.3160945773124695,
-0.01385844312608242,
-0.21945780515670776,
-0.4164386987686157,
-0.31517094373703003,
0.1106070876121521,
0.027898292988538742,
-0.10051248222589493,
0.44923874735832214,
-0.07020449638366699,
0.04701392352581024,
0.04768437147140503,
0.5157437324523926,
-0.03002048283815384,
0.03009941428899765,
-0.0170612670481205,
-0.06086637079715729,
-0.22152894735336304,
-0.30964961647987366,
0.1815682053565979,
-0.005323980934917927,
-0.22804194688796997,
-0.033951081335544586,
-0.23435990512371063,
0.07724043726921082,
-0.032346438616514206,
0.19815553724765778,
0.18437786400318146,
0.29302799701690674,
-0.10042635351419449,
-0.39953306317329407,
-0.17611728608608246,
0.014145821332931519,
0.2809900641441345,
0.1706993281841278,
-0.17915499210357666,
0.09123019874095917,
-0.013999403454363346,
0.16560180485248566,
-0.32662999629974365,
0.2864396572113037,
-0.2944996953010559,
0.006939122453331947,
-0.738964319229126,
-0.4197002351284027,
0.022332899272441864,
-0.35489726066589355,
0.09718344360589981,
0.19590546190738678,
-0.31896719336509705,
-0.16169977188110352,
-0.06185026094317436,
0.1339893341064453,
0.11479543149471283,
-0.1937260925769806,
-0.27456456422805786,
-0.18928949534893036,
0.0020797327160835266,
-0.015331612899899483,
0.3019901216030121,
0.2801002264022827,
-0.08755002915859222,
-0.16328153014183044,
0.5567863583564758,
0.15236303210258484,
-0.20119784772396088,
0.22735528647899628,
0.04309842735528946,
0.3020722270011902,
-0.11723267287015915,
0.09708785265684128,
-0.03426612913608551,
-0.16776275634765625,
-0.02300201542675495,
0.31916362047195435,
0.27894437313079834,
-0.007005669176578522,
0.6108006238937378,
0.037985678762197495,
-0.44613683223724365,
-0.03129874914884567,
0.35780030488967896,
0.2883886694908142,
-0.21655906736850739,
-0.14225009083747864,
0.02527627721428871,
0.2909022569656372,
-0.00682801753282547,
-0.30229100584983826,
0.3986339569091797,
0.05758403614163399,
0.16194404661655426,
0.06980748474597931,
0.4158879816532135,
-0.43422046303749084,
0.1051742285490036,
0.20882487297058105,
0.7384705543518066,
-0.3527730703353882,
-0.04287531226873398,
0.049936484545469284,
-0.06676021963357925,
-0.022935371845960617,
0.014790952205657959,
-0.1916702389717102,
0.422384649515152,
0.37998872995376587,
-0.06635963171720505,
0.5152060389518738,
0.19689702987670898,
0.1681148111820221,
0.4001193344593048,
-0.01824016124010086,
-0.16329357028007507,
-0.08139532804489136,
-0.3458486497402191,
-0.13393333554267883,
0.01605553925037384,
0.417539119720459,
-0.2661278545856476,
-0.09887217730283737,
-0.2663508653640747,
-0.039603110402822495,
-0.20911741256713867,
0.1116117388010025,
-0.23773233592510223,
-0.24354234337806702,
-0.24763482809066772,
-0.06988638639450073,
-0.07576984167098999,
-0.2271924763917923,
0.11744564026594162,
0.09998559206724167,
0.02889387309551239,
0.4099730849266052,
-0.10292660444974899,
0.1622997224330902,
0.35798484086990356,
-0.22485697269439697,
0.2395046353340149,
0.3694722056388855,
-0.005227804183959961,
-0.5162065029144287,
0.2525750696659088,
0.3281417489051819,
0.1936667114496231,
-0.23428508639335632,
0.4357721209526062,
0.7115525007247925,
-0.02634718269109726,
0.07589754462242126,
-0.07572899013757706,
-0.08072967827320099,
0.20500798523426056,
0.21212710440158844,
0.19453734159469604,
-0.09019706398248672,
0.09739178419113159,
0.13536284863948822,
0.010042045265436172,
0.1470256745815277,
0.1455032229423523,
0.055215779691934586,
-0.4638769328594208,
-0.18221403658390045,
-0.05680830031633377,
-0.03730921447277069,
-0.011216838844120502,
0.2888385057449341,
-0.2553592920303345,
0.4174145460128784,
-0.09481142461299896,
0.09247022867202759,
-0.2598995566368103,
0.3601951003074646,
-0.011398281902074814,
-0.1180419996380806,
-0.40066519379615784,
-0.2909895181655884,
0.07606187462806702,
0.2639942765235901,
-0.13341067731380463,
0.08313880115747452,
0.0836578831076622,
-0.083927683532238,
-0.08996834605932236,
0.04305839166045189,
-0.241982564330101,
0.1719885617494583,
-0.2481640875339508,
0.1728663444519043,
-0.40557044744491577,
0.07584849745035172,
0.41699135303497314,
-0.20052626729011536,
0.007819581776857376,
-0.32532861828804016,
0.4434134066104889,
0.13980992138385773,
0.03636839985847473,
-0.07615652680397034,
0.18045346438884735,
0.31853535771369934,
-0.29711949825286865,
0.2554425001144409,
0.044510237872600555,
0.11713014543056488,
-0.20331242680549622,
0.06904184073209763,
-0.1291133165359497,
-0.4549543559551239,
-0.022085141390562057,
-0.3199598491191864,
0.04219859093427658,
0.13994619250297546,
0.33565253019332886,
-0.2544044852256775,
0.0170560535043478,
0.2946918308734894,
-0.23121964931488037,
0.3753139078617096,
-0.048730961978435516,
0.10418156534433365,
0.021081998944282532,
0.1646931916475296,
-0.09379348158836365,
-0.022845156490802765,
0.014334302395582199,
0.14707805216312408,
-0.3922528624534607,
-0.46796801686286926,
0.45300257205963135,
0.19951403141021729,
-0.06198843941092491,
-0.2109808623790741,
0.4232173264026642,
-0.2113935649394989,
0.15125854313373566,
-0.3278174102306366,
-0.21623660624027252,
0.3737124800682068,
-0.08245849609375,
-0.2542964518070221,
0.3176953196525574,
0.14912836253643036,
-0.03891485184431076,
0.010235294699668884,
0.12204530090093613,
0.051973868161439896,
-0.1723736971616745,
0.19821041822433472,
-0.2277938574552536
] |
https://github.com/huggingface/datasets/issues/6392
|
`push_to_hub` is not robust to hub closing connection
|
I still get the same error, using `push_to_hub`. Using `git lfs` and pushing the files solved it for me.
|
### Describe the bug
Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error:
```
Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it]
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload
lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload
_upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part
else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively
part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff
response = session.request(method=method, url=url, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send
return super().send(request, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "convert_to_hf.py", line 116, in <module>
main()
File "convert_to_hf.py", line 108, in main
audio_dataset.push_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub
repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub
_retry(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry
return func(*func_args, **func_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file
commit_info = self.create_commit(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit
upload_lfs_files(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files
_wrapped_lfs_upload(filtered_actions[0])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload
raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc
RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub.
```
The function should retry if the operations fails, or at least offer a way to recover after such a failure.
Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed.
Previously, it would crash with an error 400 #4677 .
### Steps to reproduce the bug
Any large dataset pushed the hub:
```py
audio_dataset.push_to_hub(
repo_id="org/dataset",
)
```
### Expected behavior
`push_to_hub` should have an option for max retries or resume.
### Environment info
- `datasets` version: 2.14.6
- Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
| 19
|
`push_to_hub` is not robust to hub closing connection
### Describe the bug
Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error:
```
Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it]
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload
lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload
_upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part
else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively
part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff
response = session.request(method=method, url=url, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send
return super().send(request, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "convert_to_hf.py", line 116, in <module>
main()
File "convert_to_hf.py", line 108, in main
audio_dataset.push_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub
repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub
_retry(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry
return func(*func_args, **func_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file
commit_info = self.create_commit(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit
upload_lfs_files(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files
_wrapped_lfs_upload(filtered_actions[0])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload
raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc
RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub.
```
The function should retry if the operations fails, or at least offer a way to recover after such a failure.
Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed.
Previously, it would crash with an error 400 #4677 .
### Steps to reproduce the bug
Any large dataset pushed the hub:
```py
audio_dataset.push_to_hub(
repo_id="org/dataset",
)
```
### Expected behavior
`push_to_hub` should have an option for max retries or resume.
### Environment info
- `datasets` version: 2.14.6
- Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
I still get the same error, using `push_to_hub`. Using `git lfs` and pushing the files solved it for me.
|
[
-0.528481662273407,
-0.36381134390830994,
-0.0648718848824501,
0.1819303035736084,
0.3242589235305786,
-0.20704445242881775,
0.17081214487552643,
0.30811524391174316,
-0.03854181617498398,
-0.02296958863735199,
-0.19621892273426056,
0.1802101880311966,
0.17350462079048157,
0.04469935595989227,
0.06687537580728531,
0.036477230489254,
0.14159126579761505,
0.05757877603173256,
-0.00749070942401886,
-0.15354984998703003,
-0.22179248929023743,
0.037004753947257996,
-0.13432244956493378,
0.13027779757976532,
-0.16990914940834045,
-0.25265270471572876,
0.2624889314174652,
0.3343152701854706,
-0.055671319365501404,
-0.44492533802986145,
0.22087830305099487,
0.20424436032772064,
-0.1798638254404068,
0.26940491795539856,
-0.00011312132119201124,
0.09079407155513763,
0.25773170590400696,
0.06974117457866669,
-0.2290952354669571,
0.0028390735387802124,
-0.5200387835502625,
-0.36414480209350586,
-0.0908079594373703,
-0.16243918240070343,
0.14515182375907898,
0.20871038734912872,
-0.3388904929161072,
0.1936165690422058,
0.4470994472503662,
0.012405726127326488,
0.2051922231912613,
0.41037875413894653,
0.5811352133750916,
-0.1925916075706482,
0.21170362830162048,
-0.1271490901708603,
-0.2800542712211609,
0.1825995296239853,
0.33075451850891113,
0.060192644596099854,
-0.2460556924343109,
-0.028496839106082916,
0.004077276214957237,
-0.19606150686740875,
-0.1110646203160286,
-0.20254619419574738,
-0.1438719928264618,
-0.11469091475009918,
-0.04216846823692322,
0.1616497039794922,
-0.060242362320423126,
-0.26355963945388794,
-0.17657150328159332,
-0.0916089341044426,
-0.4114370346069336,
-0.03760862350463867,
0.14648157358169556,
-0.005322698503732681,
-0.1069917380809784,
0.019071249291300774,
-0.21786752343177795,
-0.35013556480407715,
-0.4473637640476227,
0.07534051686525345,
0.05242575705051422,
0.3607250452041626,
0.15071895718574524,
0.21767288446426392,
-0.057595301419496536,
-0.13654932379722595,
0.40549716353416443,
-0.0013173073530197144,
-0.12222498655319214,
-0.31562796235084534,
-0.27014651894569397,
-0.31794390082359314,
-0.08876942843198776,
0.27679023146629333,
0.26309460401535034,
-0.010884378105401993,
-0.24020947515964508,
0.23557427525520325,
-0.14977721869945526,
0.0474599152803421,
0.3204139173030853,
-0.03722286596894264,
0.13277581334114075,
0.21899013221263885,
0.3336617946624756,
0.40625375509262085,
0.04586036875844002,
0.16240113973617554,
0.31295377016067505,
-0.24722754955291748,
0.28344807028770447,
0.23525464534759521,
0.41178470849990845,
-0.05655178800225258,
-0.25112608075141907,
0.2026958167552948,
-0.14244559407234192,
0.28136056661605835,
0.16697503626346588,
0.2531502842903137,
-0.10851798206567764,
0.278268426656723,
-0.17488330602645874,
-0.08216137439012527,
-0.23290570080280304,
0.12418671697378159,
-0.23586459457874298,
0.07622732222080231,
0.0844557136297226,
-0.14305290579795837,
0.04444554075598717,
-0.3138037919998169,
0.11527132987976074,
0.06759390980005264,
-0.14542289078235626,
-0.06632885336875916,
-0.17613999545574188,
-0.19454166293144226,
0.1692880541086197,
0.19967447221279144,
0.061756815761327744,
0.11178576201200485,
-0.09917716681957245,
-0.11202999949455261,
0.01052941381931305,
-0.07000987976789474,
-0.2471415102481842,
-0.23404116928577423,
-0.09466990828514099,
0.2755448818206787,
-0.2959650158882141,
-0.04244021326303482,
-0.06385176628828049,
-0.3337416350841522,
-0.09965463727712631,
0.038190808147192,
0.22300225496292114,
0.09287574887275696,
-0.2883155941963196,
-0.19083935022354126,
0.1732926070690155,
0.4544134736061096,
-0.06635837256908417,
0.25210121273994446,
0.5756645202636719,
-0.10052068531513214,
-0.18640181422233582,
0.21700458228588104,
-0.0670560896396637,
0.08815820515155792,
-0.14609017968177795,
0.09459938108921051,
0.06768618524074554,
-0.5594079494476318,
-0.6116234660148621,
0.07956309616565704,
-0.09101570397615433,
-0.0723377987742424,
-0.2778012454509735,
0.04108129069209099,
0.33538299798965454,
-0.20139272511005402,
0.16270285844802856,
0.14689956605434418,
-0.12249958515167236,
0.09595467895269394,
-0.42961618304252625,
-0.2177642583847046,
-0.062301166355609894,
0.06456564366817474,
0.2512776553630829,
-0.23762977123260498,
0.3139607608318329,
0.3702259957790375,
0.3068266808986664,
0.3327186107635498,
0.24157458543777466,
-0.029794879257678986,
0.761249840259552,
-0.49083787202835083,
0.12300829589366913,
-0.1720123291015625,
-0.31675586104393005,
0.3562568426132202,
0.09405477344989777,
0.020950809121131897,
-0.2331302911043167,
-0.03730902820825577,
-0.44377464056015015,
0.21274611353874207,
-0.29106849431991577,
0.2547070384025574,
0.1914948970079422,
-0.3782634139060974,
-0.23941299319267273,
0.12919291853904724,
0.03755232319235802,
0.25974923372268677,
-0.28753072023391724,
0.11948676407337189,
-0.11245359480381012,
0.37269702553749084,
-0.014083212241530418,
-0.05159195140004158,
-0.11481894552707672,
0.17815524339675903,
0.4325456917285919,
-0.2639259994029999,
-0.17749080061912537,
0.35142192244529724,
0.2647264301776886,
0.5595268607139587,
0.02797827497124672,
-0.048180848360061646,
0.4132259488105774,
0.13488809764385223,
0.05590536445379257,
0.1453557312488556,
0.17661802470684052,
-0.10312290489673615,
0.028874248266220093,
0.1891428828239441,
0.010528363287448883,
0.09417847543954849,
0.14678870141506195,
0.23189759254455566,
0.051684580743312836,
-0.003278084099292755,
0.15436530113220215,
-0.018236886709928513,
-0.026811350136995316,
0.13306838274002075,
-0.030921246856451035,
-0.25578024983406067,
0.07531984150409698,
0.22665375471115112,
0.4046325981616974,
-0.04230833798646927,
0.18770259618759155,
0.09728534519672394,
0.005704276263713837,
-0.16288623213768005,
0.5374510288238525,
0.34231022000312805,
0.18167448043823242,
-0.12198769301176071,
-0.06255696713924408,
0.2495613396167755,
-0.0352727435529232,
-0.26275956630706787,
0.22255095839500427,
0.17581427097320557,
0.16026736795902252,
0.2398604154586792,
0.1359379142522812,
-0.05890696123242378,
-0.16813598573207855,
-0.09647345542907715,
-0.015119935385882854,
0.2090543657541275,
-0.24365922808647156,
-0.19879589974880219,
-0.11176479607820511,
0.24134492874145508,
0.07122473418712616,
-0.30600714683532715,
-0.15859061479568481,
-0.4963490962982178,
0.03930781036615372,
0.3852550983428955,
-0.04042323678731918,
0.23162685334682465,
0.15346920490264893,
-0.07658930122852325,
0.23951561748981476,
-0.01838248409330845,
-0.12387415766716003,
-0.10206593573093414,
-0.03221824765205383,
0.061258409172296524,
0.1528642624616623,
-0.012858923524618149,
0.3206233084201813,
0.08374092727899551,
-0.1501460075378418,
-0.37667813897132874,
-0.04614663124084473,
0.10696303844451904,
-0.0015542656183242798,
0.08456103503704071,
0.3149935007095337,
0.15179100632667542,
0.07912784069776535,
-0.08228433132171631,
0.2515711486339569,
-0.20877428352832794,
-0.20279183983802795,
0.043150048702955246,
-0.24940113723278046,
-0.052509140223264694,
0.1533847153186798,
-0.2042156457901001,
-0.3127768933773041,
-0.4688297510147095,
0.1986444741487503,
-0.017671646550297737,
0.16634678840637207,
0.27965298295021057,
0.018320363014936447,
-0.09549175202846527,
0.11568006128072739,
-0.4859437644481659,
-0.04564892500638962,
-0.22048813104629517,
0.08353297412395477,
-0.039118047803640366,
-0.15864618122577667,
0.143246591091156,
0.09026230126619339,
0.389743834733963,
0.15323080122470856,
-0.2842993140220642,
-0.3886454999446869,
0.05775009095668793,
0.4125409722328186,
-0.22374039888381958,
-0.06655274331569672,
0.2963465452194214,
0.09480009227991104,
-0.0234859436750412,
0.10128317028284073,
0.0752914696931839,
0.1893720179796219,
0.33697423338890076,
-0.059863217175006866,
-0.17415902018547058,
0.4545764923095703,
0.18910349905490875,
0.468547523021698,
0.09559781849384308,
-0.03640080615878105,
0.373690664768219,
0.14594289660453796,
0.03774309903383255,
-0.12048453837633133,
-0.23412398993968964,
0.08729150146245956,
0.03683429956436157,
-0.04916427284479141,
-0.11511670053005219,
-0.008907010778784752,
0.0681428462266922,
-0.17651444673538208,
-0.8343185186386108,
-0.0162621159106493,
-0.40259450674057007,
-0.060729533433914185,
-0.1268899142742157,
-0.03597359359264374,
-0.260073721408844,
0.1556001901626587,
-0.03518437594175339,
-0.25066304206848145,
0.1890832483768463,
0.11861702054738998,
0.1493770331144333,
-0.18214762210845947,
-0.108685202896595,
0.01064850203692913,
-0.475269615650177,
0.15006643533706665,
-0.09874320030212402,
0.6153148412704468,
0.10602058470249176,
0.15799206495285034,
-0.10538090765476227,
-0.08348145335912704,
0.5064742565155029,
-0.39414212107658386,
0.41831469535827637,
-0.02448776550590992,
-0.017408525571227074,
-0.3797093629837036,
-0.08534511923789978,
0.023724842816591263,
0.4133560061454773,
0.059525758028030396,
0.5642826557159424,
-0.018063314259052277,
-0.16323783993721008,
0.13608063757419586,
-0.13477440178394318,
-0.15753977000713348,
-0.09861224889755249,
0.1278344690799713,
-0.2673530876636505,
-0.2064170390367508,
0.19261698424816132,
0.16030213236808777,
-0.04623071104288101,
-0.19220396876335144,
-0.5829970836639404,
0.13898704946041107,
-0.2578135132789612,
-0.1253766417503357,
0.08267220854759216,
-0.105892114341259,
-0.3119417130947113,
0.3866189122200012,
-0.16871795058250427,
0.18906846642494202,
0.21113409101963043,
0.048285868018865585,
0.015875980257987976,
-0.14785116910934448,
-0.13283106684684753,
0.11689835786819458,
-0.010582096874713898,
0.44198325276374817,
-0.17486843466758728,
0.5048894882202148,
-0.29268065094947815,
0.29795026779174805,
-0.19335535168647766,
-0.269911527633667,
0.1175379827618599,
0.008113867603242397,
-0.2920054793357849,
0.22871990501880646,
0.2640911936759949,
-0.5037325024604797,
-0.1823035180568695,
0.09574046730995178,
0.10928214341402054,
-0.33483293652534485,
0.364967405796051,
0.1396094411611557,
0.809049665927887,
0.19690170884132385,
-0.008485455065965652,
0.17121464014053345,
-0.228065624833107,
0.27341228723526,
-0.40121668577194214,
-0.06029342859983444,
-0.27821922302246094,
0.08096231520175934,
-0.1274983286857605,
0.14412321150302887,
-0.042506180703639984,
-0.21513225138187408,
-0.26546022295951843,
0.3971923887729645,
-0.24349838495254517,
0.41456377506256104,
-0.17483170330524445,
0.19973808526992798,
-0.4170941710472107,
-0.14634092152118683,
-0.226215660572052,
0.19976337254047394,
-0.07041946053504944,
-0.06633056700229645,
-0.15916267037391663,
-0.21744705736637115,
0.049788739532232285,
-0.060299716889858246,
-0.20651882886886597,
0.1477663815021515,
-0.12236778438091278,
0.2865954041481018,
-0.07671213150024414,
-0.23023468255996704,
0.12250836193561554,
-0.1738305389881134,
0.504365086555481,
0.23136593401432037,
-0.22027577459812164,
0.36879783868789673,
-0.277092844247818,
0.04096419736742973,
0.1669892519712448,
0.0369514562189579,
0.15650150179862976,
-0.06062780320644379,
-0.4886523485183716,
0.016318514943122864,
-0.0004289187490940094,
-0.34163612127304077,
-0.000696137547492981,
-0.00010641664266586304,
0.22191859781742096,
-0.3160945773124695,
-0.01385844312608242,
-0.21945780515670776,
-0.4164386987686157,
-0.31517094373703003,
0.1106070876121521,
0.027898292988538742,
-0.10051248222589493,
0.44923874735832214,
-0.07020449638366699,
0.04701392352581024,
0.04768437147140503,
0.5157437324523926,
-0.03002048283815384,
0.03009941428899765,
-0.0170612670481205,
-0.06086637079715729,
-0.22152894735336304,
-0.30964961647987366,
0.1815682053565979,
-0.005323980934917927,
-0.22804194688796997,
-0.033951081335544586,
-0.23435990512371063,
0.07724043726921082,
-0.032346438616514206,
0.19815553724765778,
0.18437786400318146,
0.29302799701690674,
-0.10042635351419449,
-0.39953306317329407,
-0.17611728608608246,
0.014145821332931519,
0.2809900641441345,
0.1706993281841278,
-0.17915499210357666,
0.09123019874095917,
-0.013999403454363346,
0.16560180485248566,
-0.32662999629974365,
0.2864396572113037,
-0.2944996953010559,
0.006939122453331947,
-0.738964319229126,
-0.4197002351284027,
0.022332899272441864,
-0.35489726066589355,
0.09718344360589981,
0.19590546190738678,
-0.31896719336509705,
-0.16169977188110352,
-0.06185026094317436,
0.1339893341064453,
0.11479543149471283,
-0.1937260925769806,
-0.27456456422805786,
-0.18928949534893036,
0.0020797327160835266,
-0.015331612899899483,
0.3019901216030121,
0.2801002264022827,
-0.08755002915859222,
-0.16328153014183044,
0.5567863583564758,
0.15236303210258484,
-0.20119784772396088,
0.22735528647899628,
0.04309842735528946,
0.3020722270011902,
-0.11723267287015915,
0.09708785265684128,
-0.03426612913608551,
-0.16776275634765625,
-0.02300201542675495,
0.31916362047195435,
0.27894437313079834,
-0.007005669176578522,
0.6108006238937378,
0.037985678762197495,
-0.44613683223724365,
-0.03129874914884567,
0.35780030488967896,
0.2883886694908142,
-0.21655906736850739,
-0.14225009083747864,
0.02527627721428871,
0.2909022569656372,
-0.00682801753282547,
-0.30229100584983826,
0.3986339569091797,
0.05758403614163399,
0.16194404661655426,
0.06980748474597931,
0.4158879816532135,
-0.43422046303749084,
0.1051742285490036,
0.20882487297058105,
0.7384705543518066,
-0.3527730703353882,
-0.04287531226873398,
0.049936484545469284,
-0.06676021963357925,
-0.022935371845960617,
0.014790952205657959,
-0.1916702389717102,
0.422384649515152,
0.37998872995376587,
-0.06635963171720505,
0.5152060389518738,
0.19689702987670898,
0.1681148111820221,
0.4001193344593048,
-0.01824016124010086,
-0.16329357028007507,
-0.08139532804489136,
-0.3458486497402191,
-0.13393333554267883,
0.01605553925037384,
0.417539119720459,
-0.2661278545856476,
-0.09887217730283737,
-0.2663508653640747,
-0.039603110402822495,
-0.20911741256713867,
0.1116117388010025,
-0.23773233592510223,
-0.24354234337806702,
-0.24763482809066772,
-0.06988638639450073,
-0.07576984167098999,
-0.2271924763917923,
0.11744564026594162,
0.09998559206724167,
0.02889387309551239,
0.4099730849266052,
-0.10292660444974899,
0.1622997224330902,
0.35798484086990356,
-0.22485697269439697,
0.2395046353340149,
0.3694722056388855,
-0.005227804183959961,
-0.5162065029144287,
0.2525750696659088,
0.3281417489051819,
0.1936667114496231,
-0.23428508639335632,
0.4357721209526062,
0.7115525007247925,
-0.02634718269109726,
0.07589754462242126,
-0.07572899013757706,
-0.08072967827320099,
0.20500798523426056,
0.21212710440158844,
0.19453734159469604,
-0.09019706398248672,
0.09739178419113159,
0.13536284863948822,
0.010042045265436172,
0.1470256745815277,
0.1455032229423523,
0.055215779691934586,
-0.4638769328594208,
-0.18221403658390045,
-0.05680830031633377,
-0.03730921447277069,
-0.011216838844120502,
0.2888385057449341,
-0.2553592920303345,
0.4174145460128784,
-0.09481142461299896,
0.09247022867202759,
-0.2598995566368103,
0.3601951003074646,
-0.011398281902074814,
-0.1180419996380806,
-0.40066519379615784,
-0.2909895181655884,
0.07606187462806702,
0.2639942765235901,
-0.13341067731380463,
0.08313880115747452,
0.0836578831076622,
-0.083927683532238,
-0.08996834605932236,
0.04305839166045189,
-0.241982564330101,
0.1719885617494583,
-0.2481640875339508,
0.1728663444519043,
-0.40557044744491577,
0.07584849745035172,
0.41699135303497314,
-0.20052626729011536,
0.007819581776857376,
-0.32532861828804016,
0.4434134066104889,
0.13980992138385773,
0.03636839985847473,
-0.07615652680397034,
0.18045346438884735,
0.31853535771369934,
-0.29711949825286865,
0.2554425001144409,
0.044510237872600555,
0.11713014543056488,
-0.20331242680549622,
0.06904184073209763,
-0.1291133165359497,
-0.4549543559551239,
-0.022085141390562057,
-0.3199598491191864,
0.04219859093427658,
0.13994619250297546,
0.33565253019332886,
-0.2544044852256775,
0.0170560535043478,
0.2946918308734894,
-0.23121964931488037,
0.3753139078617096,
-0.048730961978435516,
0.10418156534433365,
0.021081998944282532,
0.1646931916475296,
-0.09379348158836365,
-0.022845156490802765,
0.014334302395582199,
0.14707805216312408,
-0.3922528624534607,
-0.46796801686286926,
0.45300257205963135,
0.19951403141021729,
-0.06198843941092491,
-0.2109808623790741,
0.4232173264026642,
-0.2113935649394989,
0.15125854313373566,
-0.3278174102306366,
-0.21623660624027252,
0.3737124800682068,
-0.08245849609375,
-0.2542964518070221,
0.3176953196525574,
0.14912836253643036,
-0.03891485184431076,
0.010235294699668884,
0.12204530090093613,
0.051973868161439896,
-0.1723736971616745,
0.19821041822433472,
-0.2277938574552536
] |
https://github.com/huggingface/datasets/issues/6392
|
`push_to_hub` is not robust to hub closing connection
|
@BEpresent the fix has not been released yet. You can expect a release of `huggingface_hub` (with this fix) today or tomorrow :)
|
### Describe the bug
Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error:
```
Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it]
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload
lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload
_upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part
else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively
part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff
response = session.request(method=method, url=url, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send
return super().send(request, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "convert_to_hf.py", line 116, in <module>
main()
File "convert_to_hf.py", line 108, in main
audio_dataset.push_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub
repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub
_retry(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry
return func(*func_args, **func_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file
commit_info = self.create_commit(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit
upload_lfs_files(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files
_wrapped_lfs_upload(filtered_actions[0])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload
raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc
RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub.
```
The function should retry if the operations fails, or at least offer a way to recover after such a failure.
Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed.
Previously, it would crash with an error 400 #4677 .
### Steps to reproduce the bug
Any large dataset pushed the hub:
```py
audio_dataset.push_to_hub(
repo_id="org/dataset",
)
```
### Expected behavior
`push_to_hub` should have an option for max retries or resume.
### Environment info
- `datasets` version: 2.14.6
- Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
| 22
|
`push_to_hub` is not robust to hub closing connection
### Describe the bug
Like to #6172, `push_to_hub` will crash if Hub resets the connection and raise the following error:
```
Pushing dataset shards to the dataset hub: 32%|███▏ | 54/171 [06:38<14:23, 7.38s/it]
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 467, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/urllib3/connectionpool.py", line 462, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 383, in _wrapped_lfs_upload
lfs_upload(operation=operation, lfs_batch_action=batch_action, token=token)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 223, in lfs_upload
_upload_multi_part(operation=operation, header=header, chunk_size=chunk_size, upload_url=upload_action["href"])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 319, in _upload_multi_part
else _upload_parts_iteratively(operation=operation, sorted_parts_urls=sorted_parts_urls, chunk_size=chunk_size)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/lfs.py", line 375, in _upload_parts_iteratively
part_upload_res = http_backoff("PUT", part_upload_url, data=fileobj_slice)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff
response = session.request(method=method, url=url, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 63, in send
return super().send(request, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')), '(Request ID: 2bab8c06-b701-4266-aead-fe2e0dc0e3ed)')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "convert_to_hf.py", line 116, in <module>
main()
File "convert_to_hf.py", line 108, in main
audio_dataset.push_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1641, in push_to_hub
repo_id, split, uploaded_size, dataset_nbytes, _, _ = self[split]._push_parquet_shards_to_hub(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 5308, in _push_parquet_shards_to_hub
_retry(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/datasets/utils/file_utils.py", line 290, in _retry
return func(*func_args, **func_kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 3221, in upload_file
commit_info = self.create_commit(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 828, in _inner
return fn(self, *args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2695, in create_commit
upload_lfs_files(
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 393, in upload_lfs_files
_wrapped_lfs_upload(filtered_actions[0])
File "/admin/home-piraka9011/.virtualenvs/w2v2/lib/python3.8/site-packages/huggingface_hub/_commit_api.py", line 385, in _wrapped_lfs_upload
raise RuntimeError(f"Error while uploading '{operation.path_in_repo}' to the Hub.") from exc
RuntimeError: Error while uploading 'batch_19/train-00054-of-00171-932beb4082c034bf.parquet' to the Hub.
```
The function should retry if the operations fails, or at least offer a way to recover after such a failure.
Right now, calling the function again will start sending all the parquets files leading to duplicates in the repository, with no guarantee that it will actually be pushed.
Previously, it would crash with an error 400 #4677 .
### Steps to reproduce the bug
Any large dataset pushed the hub:
```py
audio_dataset.push_to_hub(
repo_id="org/dataset",
)
```
### Expected behavior
`push_to_hub` should have an option for max retries or resume.
### Environment info
- `datasets` version: 2.14.6
- Platform: Linux-5.15.0-1044-aws-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
@BEpresent the fix has not been released yet. You can expect a release of `huggingface_hub` (with this fix) today or tomorrow :)
|
[
-0.528481662273407,
-0.36381134390830994,
-0.0648718848824501,
0.1819303035736084,
0.3242589235305786,
-0.20704445242881775,
0.17081214487552643,
0.30811524391174316,
-0.03854181617498398,
-0.02296958863735199,
-0.19621892273426056,
0.1802101880311966,
0.17350462079048157,
0.04469935595989227,
0.06687537580728531,
0.036477230489254,
0.14159126579761505,
0.05757877603173256,
-0.00749070942401886,
-0.15354984998703003,
-0.22179248929023743,
0.037004753947257996,
-0.13432244956493378,
0.13027779757976532,
-0.16990914940834045,
-0.25265270471572876,
0.2624889314174652,
0.3343152701854706,
-0.055671319365501404,
-0.44492533802986145,
0.22087830305099487,
0.20424436032772064,
-0.1798638254404068,
0.26940491795539856,
-0.00011312132119201124,
0.09079407155513763,
0.25773170590400696,
0.06974117457866669,
-0.2290952354669571,
0.0028390735387802124,
-0.5200387835502625,
-0.36414480209350586,
-0.0908079594373703,
-0.16243918240070343,
0.14515182375907898,
0.20871038734912872,
-0.3388904929161072,
0.1936165690422058,
0.4470994472503662,
0.012405726127326488,
0.2051922231912613,
0.41037875413894653,
0.5811352133750916,
-0.1925916075706482,
0.21170362830162048,
-0.1271490901708603,
-0.2800542712211609,
0.1825995296239853,
0.33075451850891113,
0.060192644596099854,
-0.2460556924343109,
-0.028496839106082916,
0.004077276214957237,
-0.19606150686740875,
-0.1110646203160286,
-0.20254619419574738,
-0.1438719928264618,
-0.11469091475009918,
-0.04216846823692322,
0.1616497039794922,
-0.060242362320423126,
-0.26355963945388794,
-0.17657150328159332,
-0.0916089341044426,
-0.4114370346069336,
-0.03760862350463867,
0.14648157358169556,
-0.005322698503732681,
-0.1069917380809784,
0.019071249291300774,
-0.21786752343177795,
-0.35013556480407715,
-0.4473637640476227,
0.07534051686525345,
0.05242575705051422,
0.3607250452041626,
0.15071895718574524,
0.21767288446426392,
-0.057595301419496536,
-0.13654932379722595,
0.40549716353416443,
-0.0013173073530197144,
-0.12222498655319214,
-0.31562796235084534,
-0.27014651894569397,
-0.31794390082359314,
-0.08876942843198776,
0.27679023146629333,
0.26309460401535034,
-0.010884378105401993,
-0.24020947515964508,
0.23557427525520325,
-0.14977721869945526,
0.0474599152803421,
0.3204139173030853,
-0.03722286596894264,
0.13277581334114075,
0.21899013221263885,
0.3336617946624756,
0.40625375509262085,
0.04586036875844002,
0.16240113973617554,
0.31295377016067505,
-0.24722754955291748,
0.28344807028770447,
0.23525464534759521,
0.41178470849990845,
-0.05655178800225258,
-0.25112608075141907,
0.2026958167552948,
-0.14244559407234192,
0.28136056661605835,
0.16697503626346588,
0.2531502842903137,
-0.10851798206567764,
0.278268426656723,
-0.17488330602645874,
-0.08216137439012527,
-0.23290570080280304,
0.12418671697378159,
-0.23586459457874298,
0.07622732222080231,
0.0844557136297226,
-0.14305290579795837,
0.04444554075598717,
-0.3138037919998169,
0.11527132987976074,
0.06759390980005264,
-0.14542289078235626,
-0.06632885336875916,
-0.17613999545574188,
-0.19454166293144226,
0.1692880541086197,
0.19967447221279144,
0.061756815761327744,
0.11178576201200485,
-0.09917716681957245,
-0.11202999949455261,
0.01052941381931305,
-0.07000987976789474,
-0.2471415102481842,
-0.23404116928577423,
-0.09466990828514099,
0.2755448818206787,
-0.2959650158882141,
-0.04244021326303482,
-0.06385176628828049,
-0.3337416350841522,
-0.09965463727712631,
0.038190808147192,
0.22300225496292114,
0.09287574887275696,
-0.2883155941963196,
-0.19083935022354126,
0.1732926070690155,
0.4544134736061096,
-0.06635837256908417,
0.25210121273994446,
0.5756645202636719,
-0.10052068531513214,
-0.18640181422233582,
0.21700458228588104,
-0.0670560896396637,
0.08815820515155792,
-0.14609017968177795,
0.09459938108921051,
0.06768618524074554,
-0.5594079494476318,
-0.6116234660148621,
0.07956309616565704,
-0.09101570397615433,
-0.0723377987742424,
-0.2778012454509735,
0.04108129069209099,
0.33538299798965454,
-0.20139272511005402,
0.16270285844802856,
0.14689956605434418,
-0.12249958515167236,
0.09595467895269394,
-0.42961618304252625,
-0.2177642583847046,
-0.062301166355609894,
0.06456564366817474,
0.2512776553630829,
-0.23762977123260498,
0.3139607608318329,
0.3702259957790375,
0.3068266808986664,
0.3327186107635498,
0.24157458543777466,
-0.029794879257678986,
0.761249840259552,
-0.49083787202835083,
0.12300829589366913,
-0.1720123291015625,
-0.31675586104393005,
0.3562568426132202,
0.09405477344989777,
0.020950809121131897,
-0.2331302911043167,
-0.03730902820825577,
-0.44377464056015015,
0.21274611353874207,
-0.29106849431991577,
0.2547070384025574,
0.1914948970079422,
-0.3782634139060974,
-0.23941299319267273,
0.12919291853904724,
0.03755232319235802,
0.25974923372268677,
-0.28753072023391724,
0.11948676407337189,
-0.11245359480381012,
0.37269702553749084,
-0.014083212241530418,
-0.05159195140004158,
-0.11481894552707672,
0.17815524339675903,
0.4325456917285919,
-0.2639259994029999,
-0.17749080061912537,
0.35142192244529724,
0.2647264301776886,
0.5595268607139587,
0.02797827497124672,
-0.048180848360061646,
0.4132259488105774,
0.13488809764385223,
0.05590536445379257,
0.1453557312488556,
0.17661802470684052,
-0.10312290489673615,
0.028874248266220093,
0.1891428828239441,
0.010528363287448883,
0.09417847543954849,
0.14678870141506195,
0.23189759254455566,
0.051684580743312836,
-0.003278084099292755,
0.15436530113220215,
-0.018236886709928513,
-0.026811350136995316,
0.13306838274002075,
-0.030921246856451035,
-0.25578024983406067,
0.07531984150409698,
0.22665375471115112,
0.4046325981616974,
-0.04230833798646927,
0.18770259618759155,
0.09728534519672394,
0.005704276263713837,
-0.16288623213768005,
0.5374510288238525,
0.34231022000312805,
0.18167448043823242,
-0.12198769301176071,
-0.06255696713924408,
0.2495613396167755,
-0.0352727435529232,
-0.26275956630706787,
0.22255095839500427,
0.17581427097320557,
0.16026736795902252,
0.2398604154586792,
0.1359379142522812,
-0.05890696123242378,
-0.16813598573207855,
-0.09647345542907715,
-0.015119935385882854,
0.2090543657541275,
-0.24365922808647156,
-0.19879589974880219,
-0.11176479607820511,
0.24134492874145508,
0.07122473418712616,
-0.30600714683532715,
-0.15859061479568481,
-0.4963490962982178,
0.03930781036615372,
0.3852550983428955,
-0.04042323678731918,
0.23162685334682465,
0.15346920490264893,
-0.07658930122852325,
0.23951561748981476,
-0.01838248409330845,
-0.12387415766716003,
-0.10206593573093414,
-0.03221824765205383,
0.061258409172296524,
0.1528642624616623,
-0.012858923524618149,
0.3206233084201813,
0.08374092727899551,
-0.1501460075378418,
-0.37667813897132874,
-0.04614663124084473,
0.10696303844451904,
-0.0015542656183242798,
0.08456103503704071,
0.3149935007095337,
0.15179100632667542,
0.07912784069776535,
-0.08228433132171631,
0.2515711486339569,
-0.20877428352832794,
-0.20279183983802795,
0.043150048702955246,
-0.24940113723278046,
-0.052509140223264694,
0.1533847153186798,
-0.2042156457901001,
-0.3127768933773041,
-0.4688297510147095,
0.1986444741487503,
-0.017671646550297737,
0.16634678840637207,
0.27965298295021057,
0.018320363014936447,
-0.09549175202846527,
0.11568006128072739,
-0.4859437644481659,
-0.04564892500638962,
-0.22048813104629517,
0.08353297412395477,
-0.039118047803640366,
-0.15864618122577667,
0.143246591091156,
0.09026230126619339,
0.389743834733963,
0.15323080122470856,
-0.2842993140220642,
-0.3886454999446869,
0.05775009095668793,
0.4125409722328186,
-0.22374039888381958,
-0.06655274331569672,
0.2963465452194214,
0.09480009227991104,
-0.0234859436750412,
0.10128317028284073,
0.0752914696931839,
0.1893720179796219,
0.33697423338890076,
-0.059863217175006866,
-0.17415902018547058,
0.4545764923095703,
0.18910349905490875,
0.468547523021698,
0.09559781849384308,
-0.03640080615878105,
0.373690664768219,
0.14594289660453796,
0.03774309903383255,
-0.12048453837633133,
-0.23412398993968964,
0.08729150146245956,
0.03683429956436157,
-0.04916427284479141,
-0.11511670053005219,
-0.008907010778784752,
0.0681428462266922,
-0.17651444673538208,
-0.8343185186386108,
-0.0162621159106493,
-0.40259450674057007,
-0.060729533433914185,
-0.1268899142742157,
-0.03597359359264374,
-0.260073721408844,
0.1556001901626587,
-0.03518437594175339,
-0.25066304206848145,
0.1890832483768463,
0.11861702054738998,
0.1493770331144333,
-0.18214762210845947,
-0.108685202896595,
0.01064850203692913,
-0.475269615650177,
0.15006643533706665,
-0.09874320030212402,
0.6153148412704468,
0.10602058470249176,
0.15799206495285034,
-0.10538090765476227,
-0.08348145335912704,
0.5064742565155029,
-0.39414212107658386,
0.41831469535827637,
-0.02448776550590992,
-0.017408525571227074,
-0.3797093629837036,
-0.08534511923789978,
0.023724842816591263,
0.4133560061454773,
0.059525758028030396,
0.5642826557159424,
-0.018063314259052277,
-0.16323783993721008,
0.13608063757419586,
-0.13477440178394318,
-0.15753977000713348,
-0.09861224889755249,
0.1278344690799713,
-0.2673530876636505,
-0.2064170390367508,
0.19261698424816132,
0.16030213236808777,
-0.04623071104288101,
-0.19220396876335144,
-0.5829970836639404,
0.13898704946041107,
-0.2578135132789612,
-0.1253766417503357,
0.08267220854759216,
-0.105892114341259,
-0.3119417130947113,
0.3866189122200012,
-0.16871795058250427,
0.18906846642494202,
0.21113409101963043,
0.048285868018865585,
0.015875980257987976,
-0.14785116910934448,
-0.13283106684684753,
0.11689835786819458,
-0.010582096874713898,
0.44198325276374817,
-0.17486843466758728,
0.5048894882202148,
-0.29268065094947815,
0.29795026779174805,
-0.19335535168647766,
-0.269911527633667,
0.1175379827618599,
0.008113867603242397,
-0.2920054793357849,
0.22871990501880646,
0.2640911936759949,
-0.5037325024604797,
-0.1823035180568695,
0.09574046730995178,
0.10928214341402054,
-0.33483293652534485,
0.364967405796051,
0.1396094411611557,
0.809049665927887,
0.19690170884132385,
-0.008485455065965652,
0.17121464014053345,
-0.228065624833107,
0.27341228723526,
-0.40121668577194214,
-0.06029342859983444,
-0.27821922302246094,
0.08096231520175934,
-0.1274983286857605,
0.14412321150302887,
-0.042506180703639984,
-0.21513225138187408,
-0.26546022295951843,
0.3971923887729645,
-0.24349838495254517,
0.41456377506256104,
-0.17483170330524445,
0.19973808526992798,
-0.4170941710472107,
-0.14634092152118683,
-0.226215660572052,
0.19976337254047394,
-0.07041946053504944,
-0.06633056700229645,
-0.15916267037391663,
-0.21744705736637115,
0.049788739532232285,
-0.060299716889858246,
-0.20651882886886597,
0.1477663815021515,
-0.12236778438091278,
0.2865954041481018,
-0.07671213150024414,
-0.23023468255996704,
0.12250836193561554,
-0.1738305389881134,
0.504365086555481,
0.23136593401432037,
-0.22027577459812164,
0.36879783868789673,
-0.277092844247818,
0.04096419736742973,
0.1669892519712448,
0.0369514562189579,
0.15650150179862976,
-0.06062780320644379,
-0.4886523485183716,
0.016318514943122864,
-0.0004289187490940094,
-0.34163612127304077,
-0.000696137547492981,
-0.00010641664266586304,
0.22191859781742096,
-0.3160945773124695,
-0.01385844312608242,
-0.21945780515670776,
-0.4164386987686157,
-0.31517094373703003,
0.1106070876121521,
0.027898292988538742,
-0.10051248222589493,
0.44923874735832214,
-0.07020449638366699,
0.04701392352581024,
0.04768437147140503,
0.5157437324523926,
-0.03002048283815384,
0.03009941428899765,
-0.0170612670481205,
-0.06086637079715729,
-0.22152894735336304,
-0.30964961647987366,
0.1815682053565979,
-0.005323980934917927,
-0.22804194688796997,
-0.033951081335544586,
-0.23435990512371063,
0.07724043726921082,
-0.032346438616514206,
0.19815553724765778,
0.18437786400318146,
0.29302799701690674,
-0.10042635351419449,
-0.39953306317329407,
-0.17611728608608246,
0.014145821332931519,
0.2809900641441345,
0.1706993281841278,
-0.17915499210357666,
0.09123019874095917,
-0.013999403454363346,
0.16560180485248566,
-0.32662999629974365,
0.2864396572113037,
-0.2944996953010559,
0.006939122453331947,
-0.738964319229126,
-0.4197002351284027,
0.022332899272441864,
-0.35489726066589355,
0.09718344360589981,
0.19590546190738678,
-0.31896719336509705,
-0.16169977188110352,
-0.06185026094317436,
0.1339893341064453,
0.11479543149471283,
-0.1937260925769806,
-0.27456456422805786,
-0.18928949534893036,
0.0020797327160835266,
-0.015331612899899483,
0.3019901216030121,
0.2801002264022827,
-0.08755002915859222,
-0.16328153014183044,
0.5567863583564758,
0.15236303210258484,
-0.20119784772396088,
0.22735528647899628,
0.04309842735528946,
0.3020722270011902,
-0.11723267287015915,
0.09708785265684128,
-0.03426612913608551,
-0.16776275634765625,
-0.02300201542675495,
0.31916362047195435,
0.27894437313079834,
-0.007005669176578522,
0.6108006238937378,
0.037985678762197495,
-0.44613683223724365,
-0.03129874914884567,
0.35780030488967896,
0.2883886694908142,
-0.21655906736850739,
-0.14225009083747864,
0.02527627721428871,
0.2909022569656372,
-0.00682801753282547,
-0.30229100584983826,
0.3986339569091797,
0.05758403614163399,
0.16194404661655426,
0.06980748474597931,
0.4158879816532135,
-0.43422046303749084,
0.1051742285490036,
0.20882487297058105,
0.7384705543518066,
-0.3527730703353882,
-0.04287531226873398,
0.049936484545469284,
-0.06676021963357925,
-0.022935371845960617,
0.014790952205657959,
-0.1916702389717102,
0.422384649515152,
0.37998872995376587,
-0.06635963171720505,
0.5152060389518738,
0.19689702987670898,
0.1681148111820221,
0.4001193344593048,
-0.01824016124010086,
-0.16329357028007507,
-0.08139532804489136,
-0.3458486497402191,
-0.13393333554267883,
0.01605553925037384,
0.417539119720459,
-0.2661278545856476,
-0.09887217730283737,
-0.2663508653640747,
-0.039603110402822495,
-0.20911741256713867,
0.1116117388010025,
-0.23773233592510223,
-0.24354234337806702,
-0.24763482809066772,
-0.06988638639450073,
-0.07576984167098999,
-0.2271924763917923,
0.11744564026594162,
0.09998559206724167,
0.02889387309551239,
0.4099730849266052,
-0.10292660444974899,
0.1622997224330902,
0.35798484086990356,
-0.22485697269439697,
0.2395046353340149,
0.3694722056388855,
-0.005227804183959961,
-0.5162065029144287,
0.2525750696659088,
0.3281417489051819,
0.1936667114496231,
-0.23428508639335632,
0.4357721209526062,
0.7115525007247925,
-0.02634718269109726,
0.07589754462242126,
-0.07572899013757706,
-0.08072967827320099,
0.20500798523426056,
0.21212710440158844,
0.19453734159469604,
-0.09019706398248672,
0.09739178419113159,
0.13536284863948822,
0.010042045265436172,
0.1470256745815277,
0.1455032229423523,
0.055215779691934586,
-0.4638769328594208,
-0.18221403658390045,
-0.05680830031633377,
-0.03730921447277069,
-0.011216838844120502,
0.2888385057449341,
-0.2553592920303345,
0.4174145460128784,
-0.09481142461299896,
0.09247022867202759,
-0.2598995566368103,
0.3601951003074646,
-0.011398281902074814,
-0.1180419996380806,
-0.40066519379615784,
-0.2909895181655884,
0.07606187462806702,
0.2639942765235901,
-0.13341067731380463,
0.08313880115747452,
0.0836578831076622,
-0.083927683532238,
-0.08996834605932236,
0.04305839166045189,
-0.241982564330101,
0.1719885617494583,
-0.2481640875339508,
0.1728663444519043,
-0.40557044744491577,
0.07584849745035172,
0.41699135303497314,
-0.20052626729011536,
0.007819581776857376,
-0.32532861828804016,
0.4434134066104889,
0.13980992138385773,
0.03636839985847473,
-0.07615652680397034,
0.18045346438884735,
0.31853535771369934,
-0.29711949825286865,
0.2554425001144409,
0.044510237872600555,
0.11713014543056488,
-0.20331242680549622,
0.06904184073209763,
-0.1291133165359497,
-0.4549543559551239,
-0.022085141390562057,
-0.3199598491191864,
0.04219859093427658,
0.13994619250297546,
0.33565253019332886,
-0.2544044852256775,
0.0170560535043478,
0.2946918308734894,
-0.23121964931488037,
0.3753139078617096,
-0.048730961978435516,
0.10418156534433365,
0.021081998944282532,
0.1646931916475296,
-0.09379348158836365,
-0.022845156490802765,
0.014334302395582199,
0.14707805216312408,
-0.3922528624534607,
-0.46796801686286926,
0.45300257205963135,
0.19951403141021729,
-0.06198843941092491,
-0.2109808623790741,
0.4232173264026642,
-0.2113935649394989,
0.15125854313373566,
-0.3278174102306366,
-0.21623660624027252,
0.3737124800682068,
-0.08245849609375,
-0.2542964518070221,
0.3176953196525574,
0.14912836253643036,
-0.03891485184431076,
0.010235294699668884,
0.12204530090093613,
0.051973868161439896,
-0.1723736971616745,
0.19821041822433472,
-0.2277938574552536
] |
https://github.com/huggingface/datasets/issues/6389
|
Index 339 out of range for dataset of size 339 <-- save_to_file()
|
I managed a workaround eventually but I don't know what it was (I made a lot of changes to seq2seq). I'll try to include generating code in the future. (If I close, I don't know if you see it. Feel free to close; I'll re-open if I encounter it again (if I can)).
|
### Describe the bug
When saving out some Audio() data.
The data is audio recordings with associated 'sentences'.
(They use the audio 'bytes' approach because they're clips within audio files).
Code is below the traceback (I can't upload the voice audio/text (it's not even me)).
```
Traceback (most recent call last):
File "/mnt/ddrive/prj/voice/voice-training-dataset-create/./dataset.py", line 156, in <module>
create_dataset(args)
File "/mnt/ddrive/prj/voice/voice-training-dataset-create/./dataset.py", line 138, in create_dataset
hf_dataset.save_to_disk(args.outds, max_shard_size='50MB')
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 1531, in save_to_disk
for kwargs in kwargs_per_job:
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 1508, in <genexpr>
"shard": self.shard(num_shards=num_shards, index=shard_idx, contiguous=True),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 4609, in shard
return self.select(
^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 556, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/fingerprint.py", line 511, in wrapper
out = func(dataset, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 3797, in select
return self._select_contiguous(start, length, new_fingerprint=new_fingerprint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 556, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/fingerprint.py", line 511, in wrapper
out = func(dataset, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 3857, in _select_contiguous
_check_valid_indices_value(start, len(self))
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 648, in _check_valid_indices_value
raise IndexError(f"Index {index} out of range for dataset of size {size}.")
IndexError: Index 339 out of range for dataset of size 339.
```
### Steps to reproduce the bug
(I had to set the default max batch size down due to a different bug... or maybe it's related: https://github.com/huggingface/datasets/issues/5717)
```python3
#!/usr/bin/env python3
import argparse
import os
from pathlib import Path
import soundfile as sf
import datasets
datasets.config.DEFAULT_MAX_BATCH_SIZE=35
from datasets import Features, Array2D, Value, Dataset, Sequence, Audio
import numpy as np
import librosa
import sys
import soundfile as sf
import io
import logging
logging.basicConfig(level=logging.DEBUG, filename='debug.log', filemode='w',
format='%(name)s - %(levelname)s - %(message)s')
# Define the arguments for the command-line interface
def parse_args():
parser = argparse.ArgumentParser(description="Create a Huggingface dataset from labeled audio files.")
parser.add_argument("--indir_labeled", action="append", help="Directory containing labeled audio files.", required=True)
parser.add_argument("--outds", help="Path to save the dataset file.", required=True)
parser.add_argument("--max_clips", type=int, help="Max count of audio samples to add to the dataset.", default=None)
parser.add_argument("-r", "--sr", type=int, help="Sample rate for the audio files.", default=16000)
parser.add_argument("--no-resample", action="store_true", help="Disable resampling of the audio files.")
parser.add_argument("--max_clip_secs", type=float, help="Max length of audio clips in seconds.", default=3.0)
parser.add_argument("-v", "--verbose", action='count', default=1, help="Increase verbosity")
return parser.parse_args()
# Convert the NumPy arrays to audio bytes in WAV format
def numpy_to_bytes(audio_array, sampling_rate=16000):
with io.BytesIO() as bytes_io:
sf.write(bytes_io, audio_array, samplerate=sampling_rate,
format='wav', subtype='FLOAT') # float32
return bytes_io.getvalue()
# Function to find audio and label files in a directory
def find_audio_label_pairs(indir_labeled):
audio_label_pairs = []
for root, _, files in os.walk(indir_labeled):
for file in files:
if file.endswith(('.mp3', '.wav', '.aac', '.flac')):
audio_path = Path(root) / file
if args.verbose>1:
print(f'File: {audio_path}')
label_path = audio_path.with_suffix('.labels.txt')
if label_path.exists():
if args.verbose>0:
print(f' Pair: {audio_path}')
audio_label_pairs.append((audio_path, label_path))
return audio_label_pairs
def process_audio_label_pair(audio_path, label_path, sampling_rate, no_resample, max_clip_secs):
# Read the label file
with open(label_path, 'r') as label_file:
labels = label_file.readlines()
# Load the full audio file
full_audio, current_sr = sf.read(audio_path)
if not no_resample and current_sr != sampling_rate:
# You can use librosa.resample here if librosa is available
full_audio = librosa.resample(full_audio, orig_sr=current_sr, target_sr=sampling_rate)
audio_segments = []
sentences = []
# Process each label
for label in labels:
start_secs, end_secs, label_text = label.strip().split('\t')
start_sample = int(float(start_secs) * sampling_rate)
end_sample = int(float(end_secs) * sampling_rate)
# Extract segment and truncate or pad to max_clip_secs
audio_segment = full_audio[start_sample:end_sample]
max_samples = int(max_clip_secs * sampling_rate)
if len(audio_segment) > max_samples: # Truncate
audio_segment = audio_segment[:max_samples]
elif len(audio_segment) < max_samples: # Pad
padding = np.zeros(max_samples - len(audio_segment), dtype=audio_segment.dtype)
audio_segment = np.concatenate((audio_segment, padding))
audio_segment = numpy_to_bytes(audio_segment)
audio_data = {
'path': str(audio_path),
'bytes': audio_segment,
}
audio_segments.append(audio_data)
sentences.append(label_text)
return audio_segments, sentences
# Main function to create the dataset
def create_dataset(args):
audio_label_pairs = []
for indir in args.indir_labeled:
audio_label_pairs.extend(find_audio_label_pairs(indir))
# Initialize our dataset data
dataset_data = {
'path': [], # This will be a list of strings
'audio': [], # This will be a list of dictionaries
'sentence': [], # This will be a list of strings
}
# Process each audio-label pair and add the data to the dataset
for audio_path, label_path in audio_label_pairs[:args.max_clips]:
audio_segments, sentences = process_audio_label_pair(audio_path, label_path, args.sr, args.no_resample, args.max_clip_secs)
if audio_segments and sentences:
for audio_data, sentence in zip(audio_segments, sentences):
if args.verbose>1:
print(f'Appending {audio_data["path"]}')
dataset_data['path'].append(audio_data['path'])
dataset_data['audio'].append({
'path': audio_data['path'],
'bytes': audio_data['bytes'],
})
dataset_data['sentence'].append(sentence)
features = Features({
'path': Value('string'), # Path is redundant in common voice set also
'audio': Audio(sampling_rate=16000),
'sentence': Value('string'),
})
hf_dataset = Dataset.from_dict(dataset_data, features=features)
for key in dataset_data:
for i, item in enumerate(dataset_data[key]):
if item is None or (isinstance(item, bytes) and len(item) == 0):
logging.error(f"Invalid {key} at index {i}: {item}")
import ipdb; ipdb.set_trace(context=16); pass
hf_dataset.save_to_disk(args.outds, max_shard_size='50MB')
# try:
# hf_dataset.save_to_disk(args.outds)
# except TypeError as e:
# # If there's a TypeError, log the exception and the dataset data that might have caused it
# logging.exception("An error occurred while saving the dataset.")
# import ipdb; ipdb.set_trace(context=16); pass
# for key in dataset_data:
# logging.debug(f"{key} length: {len(dataset_data[key])}")
# if key == 'audio':
# # Log the first 100 bytes of the audio data to avoid huge log files
# for i, audio in enumerate(dataset_data[key]):
# logging.debug(f"Audio {i}: {audio['bytes'][:100]}")
# raise
# Run the script
if __name__ == "__main__":
args = parse_args()
create_dataset(args)
```
### Expected behavior
It shouldn't fail.
### Environment info
- `datasets` version: 2.14.7.dev0
- Platform: Linux-6.1.0-13-amd64-x86_64-with-glibc2.36
- Python version: 3.11.2
- `huggingface_hub` version: 0.17.3
- PyArrow version: 13.0.0
- Pandas version: 2.1.2
- `fsspec` version: 2023.9.2
| 53
|
Index 339 out of range for dataset of size 339 <-- save_to_file()
### Describe the bug
When saving out some Audio() data.
The data is audio recordings with associated 'sentences'.
(They use the audio 'bytes' approach because they're clips within audio files).
Code is below the traceback (I can't upload the voice audio/text (it's not even me)).
```
Traceback (most recent call last):
File "/mnt/ddrive/prj/voice/voice-training-dataset-create/./dataset.py", line 156, in <module>
create_dataset(args)
File "/mnt/ddrive/prj/voice/voice-training-dataset-create/./dataset.py", line 138, in create_dataset
hf_dataset.save_to_disk(args.outds, max_shard_size='50MB')
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 1531, in save_to_disk
for kwargs in kwargs_per_job:
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 1508, in <genexpr>
"shard": self.shard(num_shards=num_shards, index=shard_idx, contiguous=True),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 4609, in shard
return self.select(
^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 556, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/fingerprint.py", line 511, in wrapper
out = func(dataset, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 3797, in select
return self._select_contiguous(start, length, new_fingerprint=new_fingerprint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 556, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/fingerprint.py", line 511, in wrapper
out = func(dataset, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 3857, in _select_contiguous
_check_valid_indices_value(start, len(self))
File "/home/j/src/py/datasets/src/datasets/arrow_dataset.py", line 648, in _check_valid_indices_value
raise IndexError(f"Index {index} out of range for dataset of size {size}.")
IndexError: Index 339 out of range for dataset of size 339.
```
### Steps to reproduce the bug
(I had to set the default max batch size down due to a different bug... or maybe it's related: https://github.com/huggingface/datasets/issues/5717)
```python3
#!/usr/bin/env python3
import argparse
import os
from pathlib import Path
import soundfile as sf
import datasets
datasets.config.DEFAULT_MAX_BATCH_SIZE=35
from datasets import Features, Array2D, Value, Dataset, Sequence, Audio
import numpy as np
import librosa
import sys
import soundfile as sf
import io
import logging
logging.basicConfig(level=logging.DEBUG, filename='debug.log', filemode='w',
format='%(name)s - %(levelname)s - %(message)s')
# Define the arguments for the command-line interface
def parse_args():
parser = argparse.ArgumentParser(description="Create a Huggingface dataset from labeled audio files.")
parser.add_argument("--indir_labeled", action="append", help="Directory containing labeled audio files.", required=True)
parser.add_argument("--outds", help="Path to save the dataset file.", required=True)
parser.add_argument("--max_clips", type=int, help="Max count of audio samples to add to the dataset.", default=None)
parser.add_argument("-r", "--sr", type=int, help="Sample rate for the audio files.", default=16000)
parser.add_argument("--no-resample", action="store_true", help="Disable resampling of the audio files.")
parser.add_argument("--max_clip_secs", type=float, help="Max length of audio clips in seconds.", default=3.0)
parser.add_argument("-v", "--verbose", action='count', default=1, help="Increase verbosity")
return parser.parse_args()
# Convert the NumPy arrays to audio bytes in WAV format
def numpy_to_bytes(audio_array, sampling_rate=16000):
with io.BytesIO() as bytes_io:
sf.write(bytes_io, audio_array, samplerate=sampling_rate,
format='wav', subtype='FLOAT') # float32
return bytes_io.getvalue()
# Function to find audio and label files in a directory
def find_audio_label_pairs(indir_labeled):
audio_label_pairs = []
for root, _, files in os.walk(indir_labeled):
for file in files:
if file.endswith(('.mp3', '.wav', '.aac', '.flac')):
audio_path = Path(root) / file
if args.verbose>1:
print(f'File: {audio_path}')
label_path = audio_path.with_suffix('.labels.txt')
if label_path.exists():
if args.verbose>0:
print(f' Pair: {audio_path}')
audio_label_pairs.append((audio_path, label_path))
return audio_label_pairs
def process_audio_label_pair(audio_path, label_path, sampling_rate, no_resample, max_clip_secs):
# Read the label file
with open(label_path, 'r') as label_file:
labels = label_file.readlines()
# Load the full audio file
full_audio, current_sr = sf.read(audio_path)
if not no_resample and current_sr != sampling_rate:
# You can use librosa.resample here if librosa is available
full_audio = librosa.resample(full_audio, orig_sr=current_sr, target_sr=sampling_rate)
audio_segments = []
sentences = []
# Process each label
for label in labels:
start_secs, end_secs, label_text = label.strip().split('\t')
start_sample = int(float(start_secs) * sampling_rate)
end_sample = int(float(end_secs) * sampling_rate)
# Extract segment and truncate or pad to max_clip_secs
audio_segment = full_audio[start_sample:end_sample]
max_samples = int(max_clip_secs * sampling_rate)
if len(audio_segment) > max_samples: # Truncate
audio_segment = audio_segment[:max_samples]
elif len(audio_segment) < max_samples: # Pad
padding = np.zeros(max_samples - len(audio_segment), dtype=audio_segment.dtype)
audio_segment = np.concatenate((audio_segment, padding))
audio_segment = numpy_to_bytes(audio_segment)
audio_data = {
'path': str(audio_path),
'bytes': audio_segment,
}
audio_segments.append(audio_data)
sentences.append(label_text)
return audio_segments, sentences
# Main function to create the dataset
def create_dataset(args):
audio_label_pairs = []
for indir in args.indir_labeled:
audio_label_pairs.extend(find_audio_label_pairs(indir))
# Initialize our dataset data
dataset_data = {
'path': [], # This will be a list of strings
'audio': [], # This will be a list of dictionaries
'sentence': [], # This will be a list of strings
}
# Process each audio-label pair and add the data to the dataset
for audio_path, label_path in audio_label_pairs[:args.max_clips]:
audio_segments, sentences = process_audio_label_pair(audio_path, label_path, args.sr, args.no_resample, args.max_clip_secs)
if audio_segments and sentences:
for audio_data, sentence in zip(audio_segments, sentences):
if args.verbose>1:
print(f'Appending {audio_data["path"]}')
dataset_data['path'].append(audio_data['path'])
dataset_data['audio'].append({
'path': audio_data['path'],
'bytes': audio_data['bytes'],
})
dataset_data['sentence'].append(sentence)
features = Features({
'path': Value('string'), # Path is redundant in common voice set also
'audio': Audio(sampling_rate=16000),
'sentence': Value('string'),
})
hf_dataset = Dataset.from_dict(dataset_data, features=features)
for key in dataset_data:
for i, item in enumerate(dataset_data[key]):
if item is None or (isinstance(item, bytes) and len(item) == 0):
logging.error(f"Invalid {key} at index {i}: {item}")
import ipdb; ipdb.set_trace(context=16); pass
hf_dataset.save_to_disk(args.outds, max_shard_size='50MB')
# try:
# hf_dataset.save_to_disk(args.outds)
# except TypeError as e:
# # If there's a TypeError, log the exception and the dataset data that might have caused it
# logging.exception("An error occurred while saving the dataset.")
# import ipdb; ipdb.set_trace(context=16); pass
# for key in dataset_data:
# logging.debug(f"{key} length: {len(dataset_data[key])}")
# if key == 'audio':
# # Log the first 100 bytes of the audio data to avoid huge log files
# for i, audio in enumerate(dataset_data[key]):
# logging.debug(f"Audio {i}: {audio['bytes'][:100]}")
# raise
# Run the script
if __name__ == "__main__":
args = parse_args()
create_dataset(args)
```
### Expected behavior
It shouldn't fail.
### Environment info
- `datasets` version: 2.14.7.dev0
- Platform: Linux-6.1.0-13-amd64-x86_64-with-glibc2.36
- Python version: 3.11.2
- `huggingface_hub` version: 0.17.3
- PyArrow version: 13.0.0
- Pandas version: 2.1.2
- `fsspec` version: 2023.9.2
I managed a workaround eventually but I don't know what it was (I made a lot of changes to seq2seq). I'll try to include generating code in the future. (If I close, I don't know if you see it. Feel free to close; I'll re-open if I encounter it again (if I can)).
|
[
-0.20405082404613495,
-0.13199618458747864,
0.0418323390185833,
0.3329991102218628,
0.1603625863790512,
0.040948398411273956,
0.18478554487228394,
0.6422512531280518,
-0.32589685916900635,
0.2800062894821167,
-0.2070019245147705,
-0.11669192463159561,
-0.0634903535246849,
-0.2004728764295578,
0.006428000517189503,
-0.1558893471956253,
0.006924577057361603,
0.06703975796699524,
0.1635313332080841,
-0.23662512004375458,
-0.2263830453157425,
-0.026101766154170036,
-0.2231655865907669,
0.22054845094680786,
-0.2936539649963379,
-0.27512145042419434,
0.11088787019252777,
0.4172631800174713,
-0.07213094830513,
-0.2066701054573059,
-0.12710687518119812,
-0.3909023404121399,
0.0793338418006897,
0.3386906683444977,
-0.00011663306941045448,
-0.1363416612148285,
0.30589228868484497,
-0.20825815200805664,
-0.2820786237716675,
0.20896829664707184,
-0.37832969427108765,
0.08353585004806519,
-0.6660594344139099,
-0.15334969758987427,
0.1870679259300232,
-0.006375494413077831,
0.13899672031402588,
-0.1614164412021637,
0.2738456130027771,
0.6548341512680054,
0.1370624154806137,
0.10227546840906143,
0.21235035359859467,
0.07251192629337311,
0.500072717666626,
0.11712926626205444,
0.038947999477386475,
0.04309481754899025,
0.09522539377212524,
0.13960441946983337,
-0.07486037164926529,
0.2954631745815277,
-0.05920279771089554,
-0.2697708308696747,
-0.02634667605161667,
-0.015902597457170486,
-0.19508019089698792,
-0.41482383012771606,
0.08531858026981354,
0.37718451023101807,
0.235118567943573,
-0.3509104549884796,
-0.4173729121685028,
-0.17590194940567017,
-0.1887640655040741,
-0.5754063725471497,
0.10019583255052567,
0.15417107939720154,
-0.27149498462677,
0.13462872803211212,
-0.21434490382671356,
0.14290454983711243,
-0.06891494989395142,
0.1347297877073288,
0.20939204096794128,
0.07363399118185043,
0.13336965441703796,
0.13492488861083984,
0.4034123718738556,
-0.3961752653121948,
-0.2749055027961731,
0.030177010223269463,
-0.3976525366306305,
0.22516566514968872,
-0.6537343263626099,
-0.06801055371761322,
0.08863106369972229,
-0.0983097031712532,
0.29217058420181274,
-0.11829300224781036,
-0.02512643113732338,
-0.030671540647745132,
0.29560473561286926,
0.19234821200370789,
0.2628190517425537,
0.15195518732070923,
0.20782798528671265,
-0.06248882785439491,
0.2897675931453705,
0.03831988945603371,
-0.019269151613116264,
-0.11842546612024307,
0.20425763726234436,
-0.376615434885025,
0.40207818150520325,
0.02335752546787262,
0.004135137423872948,
-0.2564486265182495,
-0.2865404486656189,
0.4011029005050659,
-0.11272763460874557,
0.14960826933383942,
-0.028092417865991592,
0.2707900404930115,
0.3134000301361084,
-0.23059400916099548,
-0.16634516417980194,
0.3973669409751892,
-0.22111910581588745,
-0.22883948683738708,
-0.17946118116378784,
0.19610416889190674,
0.25844258069992065,
0.08529037982225418,
-0.14466848969459534,
0.07462441921234131,
-0.06680579483509064,
0.0027533182874321938,
0.5418863296508789,
-0.2374776005744934,
-0.08000386506319046,
-0.3755365312099457,
0.24985530972480774,
0.3710988163948059,
-0.0959024578332901,
0.20974090695381165,
-0.0626438707113266,
-0.1727360337972641,
0.016240842640399933,
0.1960960328578949,
-0.2020547091960907,
-0.4124726951122284,
0.01453506387770176,
0.18734268844127655,
0.029801398515701294,
0.32892927527427673,
-0.4029218852519989,
0.043227456510066986,
0.3178469240665436,
-0.5098095536231995,
0.14073458313941956,
-0.31135350465774536,
-0.17666210234165192,
-0.07220444083213806,
0.08238065987825394,
0.24311870336532593,
-0.34129661321640015,
0.37343791127204895,
-0.29160308837890625,
0.27585601806640625,
0.07308156788349152,
0.3006542921066284,
0.021516259759664536,
0.29493340849876404,
-0.2571803331375122,
0.7624262571334839,
0.557881772518158,
-0.36350443959236145,
-0.6805633306503296,
0.031507331877946854,
0.010615646839141846,
-0.3045558035373688,
0.0784907191991806,
-0.003654642729088664,
0.36542269587516785,
-0.12776349484920502,
0.09557012468576431,
0.19924837350845337,
0.01771405152976513,
-0.03348560258746147,
-0.3659665584564209,
0.10492977499961853,
-0.22251062095165253,
-0.026773953810334206,
-0.08092950284481049,
-0.17689403891563416,
0.3686317205429077,
-0.17945650219917297,
0.2570979595184326,
-0.1485835462808609,
0.16187410056591034,
0.5142321586608887,
0.14437709748744965,
-0.2624782919883728,
-0.027804454788565636,
-0.2584521770477295,
0.10075584053993225,
0.17544087767601013,
-0.1918700784444809,
-0.07915671169757843,
-0.17644037306308746,
-0.11468051373958588,
-0.10251019150018692,
-0.0547475665807724,
-0.22908659279346466,
0.0247137900441885,
0.030530422925949097,
-0.005189031362533569,
-0.19806326925754547,
0.0900796502828598,
-0.03959650918841362,
-0.18715067207813263,
-0.05983304977416992,
-0.06629329919815063,
-0.33513909578323364,
0.11150522530078888,
-0.19554738700389862,
-0.35311177372932434,
0.17951317131519318,
0.19781222939491272,
0.19347259402275085,
0.038436178117990494,
-0.2249019742012024,
0.4901086091995239,
0.08676367253065109,
0.21979665756225586,
-0.36878374218940735,
0.03744232654571533,
0.0477411150932312,
-0.33232825994491577,
0.16988226771354675,
0.01956738717854023,
0.29822054505348206,
-0.09227781742811203,
0.09476597607135773,
0.08189748227596283,
0.32047078013420105,
0.05524319410324097,
0.09370093047618866,
-0.20603443682193756,
0.1763397753238678,
0.0990447998046875,
0.28128859400749207,
-0.08495167642831802,
-0.0026423148810863495,
-0.02916673570871353,
0.07336477935314178,
-0.07959961891174316,
-0.2700285315513611,
0.12026388943195343,
0.5283365249633789,
-0.08441918343305588,
0.3586934208869934,
0.3131848871707916,
-0.028957590460777283,
-0.24843204021453857,
0.06048508733510971,
0.11208382248878479,
0.2916916310787201,
0.15764254331588745,
-0.021281246095895767,
-0.21401181817054749,
0.07769250869750977,
-0.13185285031795502,
0.042964622378349304,
0.12682589888572693,
-0.1410030722618103,
0.5804529190063477,
0.1917492002248764,
0.006592517718672752,
-0.36706578731536865,
-0.12070620059967041,
-0.05854414403438568,
0.22582340240478516,
-0.449997216463089,
0.15275228023529053,
-0.060701966285705566,
-0.14322715997695923,
-0.08942358195781708,
-0.02444992959499359,
-0.3881506323814392,
-0.28863775730133057,
0.1215968132019043,
0.1416275054216385,
-0.3435611128807068,
0.046550996601581573,
0.11622646450996399,
-0.06557704508304596,
0.27802813053131104,
-0.11131330579519272,
0.2270554006099701,
0.1555618941783905,
-0.1861323118209839,
-0.011540975421667099,
0.10993233323097229,
0.24289003014564514,
0.06461215764284134,
0.2520701587200165,
0.09736186265945435,
-0.3381637632846832,
-0.14505431056022644,
-0.017171762883663177,
-0.09655725955963135,
0.6061303615570068,
-0.07971081137657166,
0.09999601542949677,
-0.26741811633110046,
-0.2834145724773407,
0.10169600695371628,
0.22443988919258118,
-0.2828594744205475,
0.2891155779361725,
0.039110440760850906,
0.1762569695711136,
0.1088065505027771,
-0.08676093071699142,
-0.18330395221710205,
-0.4982450008392334,
0.2213655710220337,
-0.12747567892074585,
0.25081127882003784,
0.1599852740764618,
0.02056846022605896,
0.025026343762874603,
-0.16319601237773895,
0.0926271378993988,
-0.1197582483291626,
-0.026206687092781067,
0.4527672529220581,
-0.0459853820502758,
-0.43153080344200134,
-0.29110172390937805,
-0.04011473059654236,
0.08364799618721008,
0.15952828526496887,
-0.4231460690498352,
0.16328251361846924,
-0.07444087415933609,
-0.03490410000085831,
-0.08571887016296387,
-0.13871492445468903,
0.3541659116744995,
-0.1311173141002655,
-0.0418778732419014,
-0.10337843000888824,
-0.13603663444519043,
0.04903378337621689,
0.41119635105133057,
0.23716047406196594,
-0.016770754009485245,
0.41476333141326904,
-0.021589532494544983,
0.3713495135307312,
0.21790066361427307,
0.2405150830745697,
0.42373424768447876,
-0.035996973514556885,
0.04531024023890495,
-0.2900315523147583,
-0.22395633161067963,
0.4193193316459656,
0.132499098777771,
-0.47683632373809814,
0.2112150341272354,
0.059103984385728836,
-0.03248288482427597,
-0.028322720900177956,
-0.26737311482429504,
-0.038043998181819916,
-0.2762719690799713,
0.3428363800048828,
0.22262011468410492,
0.09029167890548706,
0.08283038437366486,
0.22225502133369446,
0.029292959719896317,
-0.23166105151176453,
0.0645764172077179,
-0.17268435657024384,
0.1327662169933319,
0.05902627110481262,
-0.29635095596313477,
-0.3369620442390442,
-0.18239149451255798,
0.31746959686279297,
0.6285718083381653,
0.5351266860961914,
-0.18144965171813965,
-0.20576629042625427,
-0.04025337100028992,
-0.01565774530172348,
0.21002545952796936,
-0.1590668261051178,
0.2829494774341583,
0.22512699663639069,
0.3755984306335449,
-0.2081056535243988,
0.06871688365936279,
0.08035002648830414,
-0.11359390616416931,
0.12841063737869263,
0.14429742097854614,
-0.21434974670410156,
0.1782829314470291,
0.053499381989240646,
0.4781087338924408,
-0.28621014952659607,
0.1362476795911789,
-0.09939560294151306,
-0.14802999794483185,
-0.2777208685874939,
0.03584548085927963,
0.12368351966142654,
0.10027372092008591,
-0.07812602818012238,
0.017955046147108078,
0.21341118216514587,
-0.13965944945812225,
0.16839244961738586,
-0.16314929723739624,
0.5817112326622009,
-0.38500139117240906,
0.08991166949272156,
-0.025600433349609375,
-0.19319546222686768,
0.4150165915489197,
0.3159266412258148,
0.12825052440166473,
0.37437909841537476,
-0.09211418032646179,
-0.1829676330089569,
0.3403538167476654,
0.3426651954650879,
0.006460534408688545,
0.10671737045049667,
-0.010004468262195587,
0.33287954330444336,
-0.3428094983100891,
-0.24385641515254974,
0.4988263249397278,
-0.10892993956804276,
-0.15646807849407196,
0.030645979568362236,
0.47102972865104675,
-0.24726447463035583,
-0.12111839652061462,
0.306587278842926,
0.33217737078666687,
-0.04717043787240982,
0.3980367183685303,
0.12450076639652252,
1.1697003841400146,
0.2490166872739792,
0.2757556438446045,
0.0641980767250061,
0.07727561891078949,
-0.03235643357038498,
-0.07417871803045273,
0.2760844826698303,
-0.3067775368690491,
-0.2875936031341553,
-0.06138079613447189,
-0.023894676938652992,
-0.2015717327594757,
0.04167439416050911,
-0.1491708755493164,
0.19804996252059937,
-0.19150316715240479,
0.005627356469631195,
-0.02458524890244007,
-0.037431057542562485,
-0.22027787566184998,
-0.03461255878210068,
-0.15916220843791962,
0.01022724062204361,
0.07395987212657928,
-0.27716681361198425,
0.020979098975658417,
-0.33992934226989746,
-0.22611738741397858,
-0.3072021007537842,
-0.22342120110988617,
0.03393625468015671,
-0.043884098529815674,
0.30087167024612427,
-0.30033257603645325,
-0.286155641078949,
0.018669623881578445,
0.3650267422199249,
-0.1490345448255539,
0.18518748879432678,
-0.15658220648765564,
0.017733385786414146,
0.18620245158672333,
0.3283037841320038,
0.04406839236617088,
0.0096232695505023,
0.4542590081691742,
-0.14245912432670593,
-0.2915806472301483,
0.07174784690141678,
-0.05013265460729599,
-0.28194957971572876,
-0.28641796112060547,
0.16422128677368164,
-0.078211709856987,
-0.34141334891319275,
-0.2118394672870636,
-0.18997293710708618,
-0.250932514667511,
-0.32627108693122864,
0.09911786019802094,
0.13096486032009125,
-0.16494648158550262,
0.2489096224308014,
0.04597962275147438,
-0.16293209791183472,
-0.06351339817047119,
0.47281011939048767,
-0.23349237442016602,
0.29741334915161133,
0.5383048057556152,
0.07237489521503448,
-0.25122714042663574,
-0.24723100662231445,
0.1734943985939026,
0.04958966001868248,
-0.38279980421066284,
0.14180393517017365,
-0.42659512162208557,
0.12433935701847076,
-0.28821295499801636,
-0.08772231638431549,
0.11668886244297028,
-0.36533957719802856,
-0.3565632104873657,
-0.4186971187591553,
-0.3333965241909027,
0.31589487195014954,
-0.09357999265193939,
0.026181170716881752,
-0.3591183125972748,
-0.21358200907707214,
0.033805616199970245,
0.09871304780244827,
-0.2592008709907532,
0.042529188096523285,
-0.22739121317863464,
0.3315056264400482,
0.27216774225234985,
0.006096098572015762,
0.16643637418746948,
-0.2470267415046692,
0.0888785794377327,
0.3076925277709961,
-0.22925138473510742,
-0.14640402793884277,
-0.059334419667720795,
0.1805373877286911,
-0.032690275460481644,
-0.2512276768684387,
0.012205113656818867,
-0.20011724531650543,
-0.06638507544994354,
-0.0986214131116867,
-0.04078011214733124,
0.030778668820858,
-0.07281149923801422,
-0.02752557396888733,
0.2896510660648346,
-0.14817926287651062,
0.21931646764278412,
0.04409677907824516,
0.11136949807405472,
0.22932378947734833,
-0.14221961796283722,
0.23575499653816223,
-0.06248505413532257,
-0.22594432532787323,
-0.1322954148054123,
0.15380440652370453,
-0.11300680041313171,
-0.13013899326324463,
0.28011462092399597,
-0.391216516494751,
-0.21982143819332123,
0.14311042428016663,
0.5778795480728149,
0.37470680475234985,
-0.3256990313529968,
0.01797364465892315,
-0.1352280080318451,
0.17859959602355957,
-0.0413811057806015,
-0.3424687087535858,
-0.08934682607650757,
-0.3213807940483093,
-0.13627246022224426,
0.0982493981719017,
0.17847369611263275,
-0.38164690136909485,
-0.3403281569480896,
0.055669836699962616,
-0.06791815161705017,
-0.16967150568962097,
-0.33301815390586853,
0.46518605947494507,
-0.14047980308532715,
-0.13559092581272125,
0.32731473445892334,
0.08680160343647003,
0.5174266695976257,
0.42156505584716797,
-0.2406691014766693,
0.2857433259487152,
0.3045244812965393,
-0.2101864516735077,
0.07381824404001236,
-0.5240408182144165,
-0.022592995315790176,
0.21453577280044556,
0.013404667377471924,
0.1482277810573578,
0.12945300340652466,
0.46778130531311035,
0.1442898064851761,
-0.06976369023323059,
0.10233316570520401,
-0.027463216334581375,
-0.24588662385940552,
0.1157006323337555,
0.18608121573925018,
-0.06552521139383316,
-0.2754383981227875,
-0.1155107170343399,
-0.0004690326750278473,
0.047186072915792465,
0.16405120491981506,
0.13072648644447327,
0.006820589303970337,
0.24738793075084686,
0.06626679003238678,
0.0408661924302578,
0.019911788403987885,
-0.5099823474884033,
0.24223901331424713,
0.5840396881103516,
-0.15074162185192108,
0.3790935277938843,
0.2546539306640625,
0.6969226002693176,
0.12951555848121643,
-0.11792604625225067,
0.334531307220459,
0.010211063548922539,
-0.19040469825267792,
-0.036733925342559814,
0.16399572789669037,
-0.08720017969608307,
0.42204728722572327,
0.45850634574890137,
0.09663008898496628,
-0.10358771681785583,
0.00010530278086662292,
0.23322516679763794,
0.40613535046577454,
-0.22154125571250916,
0.22515806555747986,
-0.1993204802274704,
-0.5760595202445984,
-0.17920155823230743,
-0.2924180328845978,
-0.10456323623657227,
0.06381367146968842,
0.48033276200294495,
-0.18384604156017303,
0.33082181215286255,
-0.06454025208950043,
0.0773521363735199,
-0.1843736618757248,
0.38678815960884094,
0.28543856739997864,
-0.1192995086312294,
-0.13460348546504974,
0.02527068555355072,
-0.49241670966148376,
0.15562182664871216,
-0.12676706910133362,
0.14887972176074982,
0.24864809215068817,
0.17472735047340393,
0.035726793110370636,
0.08127179741859436,
0.45535796880722046,
-0.20112723112106323,
-0.2595131993293762,
0.3205234706401825,
-0.3063603341579437,
-0.2744206488132477,
0.022302407771348953,
0.10820722579956055,
-0.12566882371902466,
-0.5648708343505859,
0.4522302746772766,
-0.2653542459011078,
0.11207715421915054,
-0.030822545289993286,
-0.020098835229873657,
-0.11740539968013763,
-0.013319194316864014,
0.31189167499542236,
0.14758530259132385,
0.4499947428703308,
-0.324535071849823,
-0.13384726643562317,
0.13536712527275085,
0.17429521679878235,
-0.06880015879869461,
-0.13746199011802673,
0.08692522346973419,
0.9999932050704956,
0.08813803642988205,
-0.12497618794441223,
-0.1278441846370697,
0.3236657977104187,
-0.13600419461727142,
-0.22396087646484375,
-0.2594800591468811,
0.12140581756830215,
-0.25717347860336304,
-0.01368978712707758,
0.32157859206199646,
0.030044518411159515,
0.01662353053689003,
0.12067103385925293,
-0.12579083442687988,
-0.7247492671012878,
0.5904073715209961,
-0.11052107065916061,
-0.12686125934123993,
-0.1791485846042633,
0.46073898673057556,
0.4931899607181549,
0.02336595021188259,
-0.555336594581604,
-0.08796218782663345,
0.3088613450527191,
0.19019058346748352,
-0.33789464831352234,
0.19393819570541382,
-0.22961875796318054,
-0.18664732575416565,
0.19330169260501862,
0.22669126093387604,
0.2207387089729309,
-0.10550327599048615,
0.12362392246723175,
-0.2914090156555176
] |
https://github.com/huggingface/datasets/issues/6387
|
How to load existing downloaded dataset ?
|
Feel free to use `dataset.save_to_disk(...)`, then scp the directory containing the saved dataset and reload it on your other machine using `dataset = load_from_disk(...)`
|
Hi @mariosasko @lhoestq @katielink
Thanks for your contribution and hard work.
### Feature request
First, I download a dataset as normal by:
```
from datasets import load_dataset
dataset = load_dataset('username/data_name', cache_dir='data')
```
The dataset format in `data` directory will be:
```
-data
|-data_name
|-test-00000-of-00001-bf4c733542e35fcb.parquet
|-train-00000-of-00001-2a1df75c6bce91ab.parquet
```
Then I use SCP to clone this dataset into another machine, and then try:
```
from datasets import load_dataset
dataset = load_dataset('data/data_name') # load from local path
```
This leads to re-generating training and validation split for each time, and the disk quota will be duplicated occupation.
How can I just load the dataset without generating and saving these splits again?
### Motivation
I do not want to download the same dataset in two machines, scp is much faster and better than HuggingFace API. I hope we can directly load the downloaded datasets (.parquest)
### Your contribution
Please refer to the feature
| 24
|
How to load existing downloaded dataset ?
Hi @mariosasko @lhoestq @katielink
Thanks for your contribution and hard work.
### Feature request
First, I download a dataset as normal by:
```
from datasets import load_dataset
dataset = load_dataset('username/data_name', cache_dir='data')
```
The dataset format in `data` directory will be:
```
-data
|-data_name
|-test-00000-of-00001-bf4c733542e35fcb.parquet
|-train-00000-of-00001-2a1df75c6bce91ab.parquet
```
Then I use SCP to clone this dataset into another machine, and then try:
```
from datasets import load_dataset
dataset = load_dataset('data/data_name') # load from local path
```
This leads to re-generating training and validation split for each time, and the disk quota will be duplicated occupation.
How can I just load the dataset without generating and saving these splits again?
### Motivation
I do not want to download the same dataset in two machines, scp is much faster and better than HuggingFace API. I hope we can directly load the downloaded datasets (.parquest)
### Your contribution
Please refer to the feature
Feel free to use `dataset.save_to_disk(...)`, then scp the directory containing the saved dataset and reload it on your other machine using `dataset = load_from_disk(...)`
|
[
-0.38434189558029175,
-0.18714743852615356,
0.028252407908439636,
0.29588982462882996,
0.0300181582570076,
-0.0012776851654052734,
0.0376729816198349,
0.051743220537900925,
0.2660690248012543,
0.2200259566307068,
-0.39227333664894104,
0.226503387093544,
-0.003428894095122814,
0.7020692229270935,
0.2809177339076996,
-0.060358740389347076,
-0.04058817774057388,
0.16333818435668945,
-0.1575545072555542,
-0.17678716778755188,
-0.05182667821645737,
-0.06613937765359879,
0.08757701516151428,
-0.1649744212627411,
0.008683482185006142,
0.002522386610507965,
-0.32028576731681824,
0.3649970591068268,
-0.34868916869163513,
-0.3085111975669861,
0.5049329996109009,
0.094196617603302,
0.5106841325759888,
0.27214086055755615,
-0.00011702028859872371,
0.04938299208879471,
-0.07411037385463715,
-0.1893465220928192,
-0.24002975225448608,
-0.1935928612947464,
-0.006164293736219406,
-0.1503724753856659,
0.17754003405570984,
-0.37089478969573975,
-0.19024968147277832,
0.07116401940584183,
0.004389200359582901,
-0.05917418748140335,
0.6803774833679199,
0.06468996405601501,
0.09135355055332184,
0.01762780174612999,
-0.2471701204776764,
-0.1641227900981903,
-0.23253992199897766,
0.061667345464229584,
0.2358652949333191,
0.23795093595981598,
0.2446921318769455,
0.24593585729599,
0.21918702125549316,
0.06383191049098969,
0.08892164379358292,
0.007257541641592979,
0.29664748907089233,
-0.13182538747787476,
0.008900515735149384,
-0.1979503035545349,
-0.0912419930100441,
0.37249693274497986,
0.7606678009033203,
-0.14443591237068176,
-0.29293587803840637,
-0.22912302613258362,
0.1153390184044838,
-0.25544482469558716,
-0.05151290446519852,
0.4150845408439636,
0.06409689784049988,
0.30691590905189514,
-0.4062168002128601,
-0.467187762260437,
-0.2725986838340759,
-0.000948198139667511,
-0.02734695002436638,
-0.017696961760520935,
-0.04771870747208595,
0.0764138251543045,
0.28071102499961853,
0.07822158932685852,
0.09434632956981659,
-0.08625180274248123,
0.020547252148389816,
0.2537844479084015,
-0.4024113714694977,
-0.20734114944934845,
-0.23946735262870789,
-0.07377804070711136,
0.21757742762565613,
0.4862546920776367,
0.10457264631986618,
0.08552543818950653,
-0.08347895741462708,
0.10038764774799347,
0.45585039258003235,
0.11413678526878357,
-0.07223846763372421,
0.05744485557079315,
-0.2294778674840927,
0.24983365833759308,
-0.14551019668579102,
-0.11422548443078995,
-0.3497464954853058,
0.11368158459663391,
0.0020856373012065887,
-0.15521866083145142,
0.1281096190214157,
-0.29906144738197327,
-0.11824218928813934,
-0.1438170224428177,
-0.03632299602031708,
-0.19422701001167297,
-0.1332450658082962,
0.4844687879085541,
-0.3113878667354584,
0.1747521162033081,
-0.06791547685861588,
0.13745912909507751,
-0.30401939153671265,
-0.53326016664505,
-0.15392576158046722,
0.015503967180848122,
-0.07790666073560715,
0.16493894159793854,
0.22936083376407623,
-0.28447282314300537,
0.3114073872566223,
0.07324853539466858,
0.0468367263674736,
-0.13554039597511292,
0.08455802500247955,
0.10679763555526733,
0.027601391077041626,
0.18293148279190063,
0.2564619481563568,
-0.16463632881641388,
-0.14137710630893707,
-0.03476305678486824,
-0.1615772843360901,
0.26283884048461914,
-0.36158227920532227,
-0.32826313376426697,
-0.08948829025030136,
0.14170382916927338,
-0.4297388792037964,
-0.19831813871860504,
-0.764082670211792,
0.1436050683259964,
-0.2705892026424408,
-0.13378937542438507,
-0.371299684047699,
0.015928441658616066,
-0.27706488966941833,
-0.22687123715877533,
0.4564976990222931,
0.45901769399642944,
-0.3339480757713318,
-0.3184453845024109,
-0.013430925086140633,
-0.47762390971183777,
-0.0125662162899971,
0.33612892031669617,
-0.3372769355773926,
0.30490297079086304,
-0.16394880414009094,
0.04526461660861969,
0.41467058658599854,
-0.02555924281477928,
-0.254511296749115,
-0.03428994119167328,
-0.005639456212520599,
0.08992661535739899,
0.02410217374563217,
-0.04535377025604248,
0.4222416877746582,
0.18547707796096802,
-0.2502230703830719,
0.5700135231018066,
-0.05343853682279587,
-0.14840880036354065,
-0.15150867402553558,
-0.3193424344062805,
0.15495565533638,
0.17214737832546234,
0.04443568363785744,
0.14157339930534363,
0.36046770215034485,
0.13096949458122253,
0.35724937915802,
-0.2184721827507019,
-0.09847627580165863,
0.17482948303222656,
0.1387459933757782,
0.2819456458091736,
-0.052768051624298096,
-0.1566983461380005,
-0.6412506699562073,
0.2830716669559479,
-0.08789199590682983,
-0.27927377820014954,
0.28894662857055664,
-0.13825082778930664,
-0.33247286081314087,
-0.07546746730804443,
-0.11923006176948547,
-0.0913529098033905,
-0.06509794294834137,
0.06027893349528313,
0.3729243874549866,
-0.27312496304512024,
-0.32618990540504456,
0.36764979362487793,
-0.1665809154510498,
0.2485923022031784,
-0.3689155578613281,
0.35891494154930115,
0.038778118789196014,
-0.0005585514008998871,
0.14703959226608276,
0.059068337082862854,
0.253728985786438,
-0.2577283978462219,
0.14619261026382446,
0.3426578640937805,
0.0772138386964798,
0.3175699710845947,
0.022776439785957336,
-0.10106439888477325,
0.2138083428144455,
-0.20813651382923126,
0.04335416480898857,
-0.22954149544239044,
0.10982322692871094,
-0.04366240277886391,
-0.4570676386356354,
0.2211388349533081,
0.02073522098362446,
-0.006656937301158905,
0.2762333154678345,
-0.16933326423168182,
0.15733301639556885,
-0.2931064963340759,
0.04142400622367859,
0.03885645419359207,
0.1959490180015564,
0.17418435215950012,
0.05273536965250969,
0.1577620804309845,
-0.17633619904518127,
-0.08875865489244461,
0.22288991510868073,
-0.33431923389434814,
-0.3059198558330536,
-0.08473636955022812,
-0.06651607900857925,
-0.10804786533117294,
0.1442413628101349,
0.3839198350906372,
0.1585652381181717,
0.23072972893714905,
0.18220888078212738,
0.30386242270469666,
0.16286833584308624,
0.2029249668121338,
-0.058287762105464935,
-0.11729785799980164,
0.15047687292099,
0.18941178917884827,
0.012230206280946732,
-0.05960739776492119,
-0.3114931285381317,
0.314807265996933,
0.32469913363456726,
0.1625850796699524,
-0.2239864617586136,
-0.07885260879993439,
-0.1354176253080368,
-0.01184859499335289,
-0.48393160104751587,
0.45892176032066345,
-0.22462719678878784,
0.2342253476381302,
-0.2502240538597107,
0.3565523326396942,
0.2709433138370514,
-0.03940567374229431,
-0.07446180284023285,
0.17467477917671204,
-0.4395827651023865,
-0.26805227994918823,
0.05209687352180481,
0.03752356395125389,
-0.13398122787475586,
0.0579039566218853,
0.08701187372207642,
0.2404407411813736,
0.4441525936126709,
-0.06788381189107895,
0.10434206575155258,
-0.282163143157959,
-0.08031541109085083,
0.028964409604668617,
0.2044198364019394,
-0.04932275414466858,
-0.09108221530914307,
0.28417396545410156,
0.011339493095874786,
-0.1432078629732132,
-0.0247192345559597,
-0.27156874537467957,
-0.2840733230113983,
-0.1846761703491211,
-0.03698601573705673,
0.1483803242444992,
-0.06312504410743713,
-0.5339992046356201,
-0.501118540763855,
0.0035183392465114594,
0.2898547351360321,
0.20735377073287964,
0.04790952056646347,
-0.0839870423078537,
-0.11296772956848145,
-0.10525857657194138,
-0.1503138542175293,
0.035230934619903564,
-0.2905862331390381,
-0.5948622226715088,
0.06873049587011337,
-0.007343596778810024,
-0.23126395046710968,
0.08548399806022644,
-0.18967825174331665,
0.09612950682640076,
0.1828058511018753,
-0.4443010091781616,
-0.021705342456698418,
-0.0046808235347270966,
0.04003254696726799,
-0.25351253151893616,
0.2326325625181198,
0.4940471649169922,
-0.2103337198495865,
0.0710715502500534,
0.04828006774187088,
-0.2371027171611786,
-0.035423703491687775,
0.33902719616889954,
0.1448630541563034,
-0.03708658367395401,
0.2004561424255371,
0.056500133126974106,
0.8570428490638733,
0.009429339319467545,
0.0298545490950346,
0.3113633394241333,
-0.14609819650650024,
0.30727219581604004,
0.032897818833589554,
-0.11470658332109451,
0.0811968669295311,
-0.1976591944694519,
-0.12865571677684784,
0.25063031911849976,
0.07389194518327713,
-0.019415991380810738,
-0.23558998107910156,
-0.21181504428386688,
-0.23700863122940063,
-0.05466105788946152,
-0.02702089585363865,
0.13871675729751587,
0.32180875539779663,
0.1836964339017868,
0.02229965478181839,
-0.12692713737487793,
-0.04457879811525345,
0.07355321943759918,
0.18836182355880737,
0.2190011739730835,
0.10465637594461441,
-0.5459838509559631,
0.2467314898967743,
-0.21347174048423767,
0.1328006088733673,
0.011756938882172108,
-0.15696512162685394,
0.20630227029323578,
0.02727125585079193,
0.27522608637809753,
-0.1798207312822342,
0.5496954917907715,
-0.07532257586717606,
0.263393759727478,
-0.03703285753726959,
-0.10027557611465454,
-0.22494973242282867,
-0.02160983718931675,
0.02497899904847145,
-0.3503662943840027,
0.21314629912376404,
0.349917471408844,
-0.2475285530090332,
-0.24475465714931488,
0.22888289391994476,
0.454429030418396,
-0.5354945063591003,
-0.08962738513946533,
-0.2429960072040558,
-0.32202327251434326,
-0.28757572174072266,
-0.054771699011325836,
-0.2793978750705719,
0.18611569702625275,
0.16310036182403564,
0.34702104330062866,
-0.3686386048793793,
0.18871501088142395,
0.04033970832824707,
0.10442669689655304,
0.37573736906051636,
0.24872519075870514,
0.1845221072435379,
0.27202171087265015,
0.07449320703744888,
0.2609075605869293,
0.9900766015052795,
-0.4076671600341797,
-0.38578569889068604,
-0.2566193640232086,
0.19165895879268646,
0.37618327140808105,
-0.011602461338043213,
0.13567650318145752,
-0.25893911719322205,
0.18232257664203644,
-0.0817500650882721,
-0.49734437465667725,
0.19248151779174805,
-0.054829031229019165,
-0.05777198448777199,
-0.22617505490779877,
-0.775708019733429,
0.39128804206848145,
0.08025243878364563,
0.03785911202430725,
-0.20552977919578552,
0.05743374675512314,
0.0673111081123352,
0.19796080887317657,
-0.13787904381752014,
0.7684018611907959,
-0.4333609938621521,
0.20484167337417603,
0.21755802631378174,
-0.28616654872894287,
0.3845024108886719,
-0.42033112049102783,
-0.07251638919115067,
-0.3031803071498871,
-0.22522372007369995,
-0.10508722811937332,
-0.16776543855667114,
0.08306828141212463,
0.3740766644477844,
0.07765455543994904,
0.35201942920684814,
0.22360505163669586,
-0.0012603625655174255,
0.20559225976467133,
0.6307201385498047,
0.0824156105518341,
-0.15905515849590302,
-0.13749419152736664,
0.09212660044431686,
-0.21123264729976654,
0.1959068924188614,
-0.041882120072841644,
-0.09021804481744766,
0.30482035875320435,
-0.06757880747318268,
-0.006770990788936615,
0.37296968698501587,
-0.27352094650268555,
0.08070334792137146,
-0.1663481593132019,
-0.21588639914989471,
0.06662875413894653,
0.29681864380836487,
0.019547544419765472,
0.015632562339305878,
-0.0055662114173173904,
0.20304296910762787,
0.02123056724667549,
-0.03402562811970711,
-0.16680625081062317,
0.05535242706537247,
0.25360122323036194,
-0.05164957419037819,
-0.24519571661949158,
0.15923084318637848,
-0.014839204028248787,
-0.3916400074958801,
0.006141141057014465,
0.12581433355808258,
0.3378663659095764,
-0.42049098014831543,
-0.17177803814411163,
0.26117587089538574,
0.3154851496219635,
-0.03269830718636513,
0.01707528904080391,
0.1222752183675766,
-0.360761433839798,
0.1730654388666153,
0.09876015782356262,
-0.23858824372291565,
-0.03440317139029503,
0.5056531429290771,
0.13815957307815552,
-0.17824120819568634,
0.4469947814941406,
-0.08196637034416199,
0.10877539217472076,
-0.12864643335342407,
0.06695351749658585,
0.2207890897989273,
-0.32205167412757874,
-0.09086538851261139,
-0.05068949982523918,
0.3638463020324707,
0.06863704323768616,
0.15379582345485687,
0.20363296568393707,
-0.1869572401046753,
0.07986293733119965,
-0.16746309399604797,
-0.14423605799674988,
-0.0354277640581131,
0.11398567259311676,
0.3088318705558777,
0.6257323026657104,
-0.0014036353677511215,
-0.19766013324260712,
0.09376251697540283,
-0.25059419870376587,
0.3239580988883972,
0.06932772696018219,
0.1969115436077118,
0.34166160225868225,
-0.1502499282360077,
-0.005322183482348919,
-0.38333752751350403,
0.04977933317422867,
-0.13154496252536774,
-0.14813286066055298,
-0.15081316232681274,
-0.32165002822875977,
0.18715249001979828,
-0.07183049619197845,
0.28508859872817993,
-0.31753021478652954,
-0.20191866159439087,
0.1307389736175537,
0.006561527494341135,
0.24014145135879517,
0.03882607817649841,
0.12613749504089355,
0.06387533247470856,
0.454132080078125,
-0.030782565474510193,
-0.6237213611602783,
0.06541548669338226,
0.00014881789684295654,
0.2511884570121765,
-0.09378135204315186,
0.11943609267473221,
-0.08267775923013687,
0.002717532217502594,
-0.2507905066013336,
-0.043825969099998474,
0.5906496644020081,
-0.028430186212062836,
0.07993973791599274,
-0.21456791460514069,
0.03592996671795845,
-0.01750696636736393,
0.522476315498352,
0.35383522510528564,
-0.07303433120250702,
0.08658869564533234,
0.4365466833114624,
0.13517403602600098,
-0.20333486795425415,
0.09019773453474045,
0.34858471155166626,
-0.004495331086218357,
-0.13696938753128052,
0.2858189046382904,
0.072045236825943,
0.10408143699169159,
-0.0377621203660965,
-0.010465349070727825,
0.4124617874622345,
0.13729476928710938,
0.44827789068222046,
0.32616326212882996,
-0.07724766433238983,
-0.1793924868106842,
0.09992720931768417,
0.3747777044773102,
0.09599589556455612,
0.07049530744552612,
-0.20926949381828308,
0.29333576560020447,
0.009895965456962585,
0.1903298795223236,
0.006470322608947754,
-0.5770851373672485,
-0.15130789577960968,
0.031900323927402496,
0.1275126338005066,
0.20241102576255798,
-0.16707465052604675,
0.27879542112350464,
0.06580228358507156,
-0.539828360080719,
-0.25220879912376404,
0.4503845274448395,
-0.1142493411898613,
-0.06596428155899048,
-0.009106583893299103,
-0.189802885055542,
0.032724589109420776,
0.5078438520431519,
0.11736148595809937,
-0.3020915985107422,
0.09858238697052002,
0.1695500910282135,
-0.13772335648536682,
-0.12455779314041138,
-0.3465813994407654,
0.1267015039920807,
-0.056304626166820526,
-0.2494863122701645,
0.24009864032268524,
0.02904043346643448,
-0.22366014122962952,
0.10851810872554779,
0.2691359519958496,
0.15029512345790863,
-0.12358424067497253,
-0.03401616960763931,
0.2622282803058624,
0.23857635259628296,
0.18512077629566193,
0.0403951071202755,
-0.08429456502199173,
0.09757132083177567,
0.24425764381885529,
0.2717261016368866,
0.0707484558224678,
-0.04316400736570358,
-0.06070530042052269,
0.0481702983379364,
-0.04699474945664406,
-0.568519115447998,
0.2211487591266632,
0.3533855676651001,
0.08020702749490738,
-0.21209503710269928,
0.21824398636817932,
-0.33348166942596436,
-0.21257317066192627,
0.10792049765586853,
-0.1338987797498703,
0.1374015510082245,
-0.022410105913877487,
0.025862324982881546,
0.05271342769265175,
0.5221226215362549,
0.3464801609516144,
-0.13480165600776672,
-0.3216170072555542,
-0.05279765650629997,
-0.7384616136550903,
-0.127797931432724,
-0.30229660868644714,
-0.17473088204860687,
0.06487775593996048,
0.18842725455760956,
0.060043152421712875,
0.26357394456863403,
-0.11099375784397125,
0.12979348003864288,
0.09434081614017487,
0.22733034193515778,
-0.0431310310959816,
-0.05079565569758415,
0.1942128837108612,
0.06348790228366852,
-0.0528259202837944,
-0.36796537041664124,
0.049618687480688095,
-0.2372579574584961,
-0.16739581525325775,
0.24571771919727325,
-0.06223127990961075,
0.11501017212867737,
-0.26360273361206055,
0.3005993664264679,
-0.19063800573349,
0.43623989820480347,
0.003695055842399597,
-0.03744727373123169,
-0.028891298919916153,
-0.026742810383439064,
-0.1894669383764267,
0.26636260747909546,
0.040965668857097626,
0.1721421480178833,
-0.24152077734470367,
0.1787114143371582,
-0.2681748569011688,
-0.07615108788013458,
0.15953679382801056,
-0.13742804527282715,
-0.11821964383125305,
-0.1985807567834854,
0.016247481107711792,
0.16240638494491577,
0.33057165145874023,
0.39627066254615784,
-0.1402253955602646,
0.09051813185214996,
-0.08362802863121033,
-0.03720613569021225,
0.542726457118988,
-0.3173985779285431,
0.09370025992393494,
-0.25665009021759033,
0.14643439650535583,
0.030566956847906113,
-0.03580565005540848,
-0.48297134041786194,
0.33522698283195496,
0.3883306086063385,
-0.2941328287124634,
0.05630897358059883,
0.4123682379722595,
0.04144927114248276,
-0.26948463916778564,
-0.02239815518260002,
0.3489042818546295,
0.12327057123184204,
-0.4782356917858124,
-0.06098204106092453,
-0.30685287714004517
] |
https://github.com/huggingface/datasets/issues/6386
|
Formatting overhead
|
Ah I think the `line-profiler` log is off-by-one and it is in fact the `extract_batch` method that's taking forever. Will investigate further.
|
### Describe the bug
Hi! I very recently noticed that my training time is dominated by batch formatting. Using Lightning's profilers, I located the bottleneck within `datasets.formatting.formatting` and then narrowed it down with `line-profiler`. It turns out that almost all of the overhead is due to creating new instances of `self.python_arrow_extractor`. I admit I'm confused why that could be the case - as far as I can tell there's no complex `__init__` logic to execute.

### Steps to reproduce the bug
1. Set up a dataset `ds` with potentially several (4+) columns (not sure if this is necessary, but it did at one point of the investigation make overhead worse)
2. Process it using a custom transform, `ds = ds.with_transform(transform_func)`
3. Decorate this function https://github.com/huggingface/datasets/blob/main/src/datasets/formatting/formatting.py#L512 with `@profile` from https://pypi.org/project/line-profiler/
4. Profile with `$ kernprof -l script_to_profile.py`
### Expected behavior
Batch formatting should have acceptable overhead.
### Environment info
```
datasets=2.14.6
pyarrow=14.0.0
```
| 22
|
Formatting overhead
### Describe the bug
Hi! I very recently noticed that my training time is dominated by batch formatting. Using Lightning's profilers, I located the bottleneck within `datasets.formatting.formatting` and then narrowed it down with `line-profiler`. It turns out that almost all of the overhead is due to creating new instances of `self.python_arrow_extractor`. I admit I'm confused why that could be the case - as far as I can tell there's no complex `__init__` logic to execute.

### Steps to reproduce the bug
1. Set up a dataset `ds` with potentially several (4+) columns (not sure if this is necessary, but it did at one point of the investigation make overhead worse)
2. Process it using a custom transform, `ds = ds.with_transform(transform_func)`
3. Decorate this function https://github.com/huggingface/datasets/blob/main/src/datasets/formatting/formatting.py#L512 with `@profile` from https://pypi.org/project/line-profiler/
4. Profile with `$ kernprof -l script_to_profile.py`
### Expected behavior
Batch formatting should have acceptable overhead.
### Environment info
```
datasets=2.14.6
pyarrow=14.0.0
```
Ah I think the `line-profiler` log is off-by-one and it is in fact the `extract_batch` method that's taking forever. Will investigate further.
|
[
-0.1778520941734314,
-0.23078471422195435,
0.025065481662750244,
0.25016093254089355,
0.352225124835968,
-0.017558205872774124,
0.33603307604789734,
0.12893395125865936,
-0.38654667139053345,
-0.01701246201992035,
0.26500627398490906,
0.41242772340774536,
-0.407465398311615,
0.14873100817203522,
0.10780029743909836,
-0.20845678448677063,
-0.12319349497556686,
-0.05734418332576752,
-0.10073012113571167,
0.08667343854904175,
0.14289666712284088,
0.1666971743106842,
-0.19191911816596985,
0.0767713189125061,
-0.7236782908439636,
-0.15159980952739716,
-0.09823799878358841,
-0.13277631998062134,
-0.008663024753332138,
-0.4148048460483551,
0.37263646721839905,
-0.039298493415117264,
-0.09086408466100693,
0.6167423129081726,
-0.00011891656322404742,
-0.17551344633102417,
0.0742487758398056,
0.19598372280597687,
-0.38481372594833374,
0.2393035888671875,
-0.013973817229270935,
-0.3690854012966156,
0.3758649528026581,
-0.07660310715436935,
0.22302848100662231,
-0.11573627591133118,
-0.18553900718688965,
-0.29567259550094604,
0.2847844064235687,
0.08377288281917572,
0.16699160635471344,
0.40141984820365906,
-0.45485252141952515,
0.015066067688167095,
0.14084544777870178,
0.5154637098312378,
-0.14380750060081482,
0.05409137159585953,
-0.08117693662643433,
-0.09066317975521088,
-0.2087106704711914,
0.4161342978477478,
0.01716027967631817,
0.010325144976377487,
0.394087553024292,
-0.048414383083581924,
-0.051815442740917206,
0.0085398368537426,
-0.2189570963382721,
0.33262038230895996,
0.22939404845237732,
-0.18617567420005798,
-0.35818031430244446,
-0.7113812565803528,
0.13811756670475006,
-0.4348876476287842,
0.10926192998886108,
0.09503025561571121,
-0.3485603928565979,
0.13453958928585052,
-0.133816197514534,
0.1592770367860794,
-0.07441580295562744,
-0.4157826900482178,
0.09790781140327454,
0.017382293939590454,
0.00646437332034111,
-0.1503550112247467,
0.3239627182483673,
0.043978478759527206,
0.041730109602212906,
0.10945241898298264,
0.012785211205482483,
0.08685385435819626,
-0.3183686435222626,
0.0033307448029518127,
0.085966095328331,
-0.245265930891037,
-0.20800268650054932,
0.56685870885849,
0.28991106152534485,
0.05026192218065262,
0.34686079621315,
-0.149356871843338,
0.0025574397295713425,
0.4124106466770172,
0.24261391162872314,
0.07507321238517761,
0.12541602551937103,
-0.03702841326594353,
-0.0030486807227134705,
0.08427081257104874,
-0.07860036939382553,
-0.09317008405923843,
0.23777355253696442,
-0.030759606510400772,
-0.019767388701438904,
0.009738963097333908,
-0.15049776434898376,
0.12973622977733612,
-0.3035268485546112,
-0.179352805018425,
0.12893635034561157,
-0.024317562580108643,
0.13393515348434448,
0.2485373318195343,
0.06446871906518936,
-0.15975062549114227,
-0.3920377194881439,
0.1642141044139862,
-0.2147296816110611,
0.03161834180355072,
-0.4099746346473694,
0.10759750008583069,
-0.06785890460014343,
-0.007518172264099121,
0.03369056433439255,
-0.025091057643294334,
0.13880954682826996,
-0.23499703407287598,
-0.0923241525888443,
0.035899095237255096,
0.22862476110458374,
0.14780542254447937,
-0.432373583316803,
0.20611126720905304,
0.029966291040182114,
0.24870814383029938,
-0.0646919384598732,
-0.12974953651428223,
-0.08622155338525772,
-0.49833396077156067,
-0.07310772687196732,
0.15740792453289032,
-0.14477454125881195,
-0.03758037090301514,
-0.15945124626159668,
-0.10857096314430237,
0.20524460077285767,
0.0844227522611618,
0.058956731110811234,
-0.44558411836624146,
0.12903757393360138,
-0.0755295678973198,
0.10647308081388474,
0.40664881467819214,
-0.19723927974700928,
-0.15978246927261353,
0.05183321237564087,
-0.06495529413223267,
0.4664473235607147,
0.25160521268844604,
-0.20815707743167877,
0.47171229124069214,
-0.21235454082489014,
0.04297332465648651,
0.41371482610702515,
-0.08163100481033325,
-0.17455579340457916,
0.22072245180606842,
-0.37044668197631836,
0.3302713632583618,
0.4204729497432709,
-0.0070602805353701115,
0.08859486132860184,
-0.10442086309194565,
-0.005495831370353699,
0.2982689142227173,
0.10514545440673828,
0.0300575103610754,
-0.32718876004219055,
-0.19114866852760315,
-0.34769314527511597,
-0.05239635705947876,
-0.1502244919538498,
-0.2740773856639862,
-0.4489457607269287,
-0.1048571839928627,
0.43420225381851196,
-0.3085823357105255,
-0.2069387435913086,
-0.025748733431100845,
0.024957844987511635,
0.19544406235218048,
0.033733777701854706,
0.1530921459197998,
-0.22434183955192566,
0.1547812521457672,
-0.25332310795783997,
0.0583757720887661,
-0.2495741993188858,
-0.35828834772109985,
0.23652130365371704,
0.23318912088871002,
-0.3748489022254944,
-0.3248729705810547,
-0.031251341104507446,
0.07973620295524597,
0.2319827675819397,
-0.2762349843978882,
-0.12616446614265442,
-0.016917793080210686,
-0.14048907160758972,
0.1958300769329071,
-0.2783676087856293,
-0.3970035910606384,
0.26570963859558105,
0.06471209973096848,
-0.23492084443569183,
0.3476783335208893,
-0.11248204857110977,
-0.17329111695289612,
-0.0977117270231247,
0.1463608741760254,
0.3477308750152588,
0.10731212049722672,
-0.11415544897317886,
0.0464625209569931,
-0.11947799474000931,
0.0060111768543720245,
-0.001577356830239296,
0.052967146039009094,
-0.09373952448368073,
-0.022836506366729736,
-0.32106298208236694,
0.6204129457473755,
-0.09067000448703766,
0.5093902349472046,
-0.12662172317504883,
-0.11165362596511841,
-0.0216938778758049,
0.09799067676067352,
0.057593002915382385,
-0.17562806606292725,
0.4169650971889496,
-0.0804569274187088,
0.39425113797187805,
0.14905256032943726,
-0.26876744627952576,
0.24945738911628723,
-0.06020532175898552,
0.09493908286094666,
-0.22231829166412354,
0.2553233504295349,
-0.0847957655787468,
-0.030672011896967888,
-0.013542065396904945,
0.0947636067867279,
0.12586088478565216,
0.2367723286151886,
0.09461256861686707,
0.024333318695425987,
0.20357801020145416,
-0.3399055004119873,
0.47620224952697754,
0.39519137144088745,
0.0897226631641388,
0.07044811546802521,
0.20541143417358398,
0.3222877085208893,
-0.17035657167434692,
-0.23009739816188812,
-0.4009021818637848,
0.1264677345752716,
-0.38527581095695496,
0.43057364225387573,
-0.3966156840324402,
-0.12634378671646118,
-0.43981847167015076,
-0.12763871252536774,
0.11876478791236877,
-0.4089607298374176,
-0.03844044357538223,
-0.10449375212192535,
-0.19067247211933136,
0.035325415432453156,
0.10309663414955139,
0.288377046585083,
-0.010027559474110603,
-0.21608789265155792,
-0.09099322557449341,
0.017471125349402428,
-0.23026031255722046,
-0.03735555708408356,
0.36653631925582886,
-0.25965267419815063,
0.5325899124145508,
0.14381931722164154,
0.33446162939071655,
0.0134475938975811,
-0.2638980448246002,
0.20129375159740448,
0.05479799211025238,
-0.0809929296374321,
0.2589382231235504,
-0.1822761446237564,
-0.06244827061891556,
-0.1125807836651802,
0.013020657002925873,
-0.18072091042995453,
-0.06171037256717682,
0.11589309573173523,
-0.15677933394908905,
0.1911732405424118,
-0.10098588466644287,
0.09480695426464081,
-0.2972261607646942,
-0.08112043142318726,
0.34840500354766846,
0.007749512791633606,
0.16575488448143005,
0.375789076089859,
-0.19248224794864655,
0.09031606465578079,
-0.3648546040058136,
0.02585880272090435,
0.13612639904022217,
-0.2060772180557251,
0.1310005933046341,
-0.05522463098168373,
0.011611854657530785,
-0.4211238920688629,
-0.13536736369132996,
-0.08658905327320099,
0.2543255090713501,
-0.514181911945343,
-0.002207331359386444,
-0.36976656317710876,
0.24475780129432678,
-0.08403073251247406,
0.1453530490398407,
0.36377978324890137,
0.24840743839740753,
-0.12958396971225739,
0.17167365550994873,
0.20734015107154846,
0.12144077569246292,
-0.3498935103416443,
0.037345677614212036,
-0.36955520510673523,
0.3065846562385559,
0.04465102776885033,
0.634568452835083,
0.3576911687850952,
0.008273664861917496,
-0.2183457612991333,
-0.2412748634815216,
-0.0011694282293319702,
-0.26152440905570984,
-0.1375768631696701,
-0.15375760197639465,
-0.08626028895378113,
-0.21257132291793823,
0.305402547121048,
0.0868859812617302,
-0.048247478902339935,
0.13591454923152924,
0.16204245388507843,
0.023839876055717468,
-0.30667611956596375,
0.3920886218547821,
-0.25233227014541626,
0.1408860683441162,
-0.09029586613178253,
0.4972180426120758,
-0.1047632098197937,
0.0500061921775341,
0.14772313833236694,
-0.2695925235748291,
0.21694353222846985,
-0.23781581223011017,
-0.043062977492809296,
-0.4099508821964264,
-0.5646732449531555,
0.18687467277050018,
0.0888713002204895,
-0.026858817785978317,
0.18618249893188477,
-0.44085824489593506,
0.41305285692214966,
0.03704424574971199,
0.34706830978393555,
0.09632240980863571,
-0.28682583570480347,
0.19059863686561584,
-0.22687849402427673,
-0.48259955644607544,
-0.18811172246932983,
-0.18095998466014862,
0.31065651774406433,
0.14961035549640656,
0.1890431046485901,
-0.09422843158245087,
-0.3050205409526825,
0.6602029800415039,
0.28526291251182556,
-0.22340281307697296,
-0.02821894735097885,
-0.06895081698894501,
-0.24264180660247803,
0.11988972127437592,
0.33805063366889954,
-0.2920924127101898,
0.19819241762161255,
0.11240266263484955,
0.24405400454998016,
-0.07565739750862122,
0.22414112091064453,
0.31255584955215454,
0.14002268016338348,
0.28640487790107727,
-0.05544313043355942,
0.13203905522823334,
0.18767154216766357,
-0.00021735578775405884,
0.30990245938301086,
0.4352162182331085,
-0.13554956018924713,
-0.0631466656923294,
0.06542665511369705,
-0.2384096086025238,
0.5836597681045532,
0.6667170524597168,
-0.028164047747850418,
0.0498819537460804,
-0.5881356000900269,
0.4346355199813843,
-0.2195015698671341,
-0.07279462367296219,
0.27962976694107056,
0.041566152125597,
-0.2580028772354126,
-0.4233019948005676,
0.47295114398002625,
0.14256051182746887,
-0.013988770544528961,
0.33013367652893066,
-0.07007074356079102,
-0.0811910629272461,
0.5163117051124573,
0.2316685914993286,
1.0066767930984497,
0.33581221103668213,
0.36895936727523804,
0.5466170907020569,
-0.11254458874464035,
0.44598546624183655,
0.17056779563426971,
0.14689435064792633,
-0.47807085514068604,
0.11197846382856369,
0.10912945866584778,
-0.27785155177116394,
0.1447255164384842,
0.015549007803201675,
0.21275216341018677,
-0.05524013563990593,
-0.5883164405822754,
-0.2258542776107788,
-0.020136253908276558,
0.1612885594367981,
0.13970017433166504,
-0.4127279818058014,
-0.19537079334259033,
0.07968023419380188,
0.1511184275150299,
0.10723143815994263,
-0.03885494917631149,
-0.02480975165963173,
-0.19984029233455658,
-0.16225504875183105,
-0.04012805223464966,
0.03296098858118057,
-0.07394375652074814,
0.24403877556324005,
-0.10709525644779205,
-0.8171046376228333,
-0.06267982721328735,
-0.05263145640492439,
-0.18701834976673126,
0.040447503328323364,
0.18424487113952637,
0.1856156438589096,
0.17648856341838837,
0.3870140612125397,
0.14955703914165497,
-0.29694807529449463,
0.4086369574069977,
0.053741589188575745,
0.28774288296699524,
-0.279763400554657,
-0.10094146430492401,
-0.19494204223155975,
0.08053049445152283,
0.09429537504911423,
0.27653050422668457,
-0.20296405255794525,
-0.02104168012738228,
0.10923224687576294,
0.060664158314466476,
-0.22717198729515076,
0.05215589329600334,
0.06260419636964798,
-0.1560085564851761,
0.5917109847068787,
-0.029544387012720108,
-0.2995713949203491,
-0.045642007142305374,
0.05796605721116066,
0.19216501712799072,
0.07885755598545074,
0.650022029876709,
0.23571185767650604,
-0.3638795018196106,
-0.25361180305480957,
0.46112656593322754,
0.14887569844722748,
-0.7514377236366272,
0.303741455078125,
0.09338665008544922,
0.08415398001670837,
0.24045436084270477,
0.13515260815620422,
0.02808799222111702,
-0.09313883632421494,
-0.31445837020874023,
0.04620368033647537,
-0.2814488410949707,
-0.14885909855365753,
0.14907371997833252,
0.2101215422153473,
-0.10555735230445862,
0.3709580600261688,
-0.20932826399803162,
0.18247584998607635,
-0.26321589946746826,
-0.20778918266296387,
0.27899453043937683,
-0.061547257006168365,
-0.1057732105255127,
0.010161474347114563,
0.40969863533973694,
0.0057530635967850685,
0.016776205971837044,
0.18182587623596191,
-0.10815548151731491,
-0.17111805081367493,
-0.26612502336502075,
0.12556928396224976,
-0.3418160676956177,
0.0005531124770641327,
0.25489047169685364,
0.502727210521698,
-0.17651104927062988,
-0.3335403800010681,
0.1786552369594574,
0.1017785295844078,
0.018843114376068115,
-0.1920996457338333,
0.06994543969631195,
-0.12484817951917648,
-0.09545445442199707,
0.04504234343767166,
0.00489170104265213,
0.1555926352739334,
0.17244236171245575,
0.07752951979637146,
-0.17091673612594604,
-0.18627531826496124,
0.20137158036231995,
0.23841944336891174,
0.09570245444774628,
-0.10617092996835709,
-0.06940444558858871,
-0.3630145192146301,
-0.25766757130622864,
0.07291840016841888,
0.09824501723051071,
0.4015963077545166,
0.08236442506313324,
-0.14653021097183228,
-0.16603532433509827,
0.13755060732364655,
-0.04618426784873009,
-0.07179275155067444,
0.05445701628923416,
0.04199018329381943,
-0.23587578535079956,
0.305641233921051,
0.04265918210148811,
0.017198391258716583,
-0.2730538845062256,
0.05953725427389145,
0.04428919777274132,
-0.09636493772268295,
0.13255324959754944,
0.33641356229782104,
0.07948315143585205,
-0.12982125580310822,
0.7087671160697937,
0.01646273024380207,
0.4774739742279053,
-0.12287335097789764,
-0.03645569086074829,
0.37698304653167725,
0.233970046043396,
0.004631988704204559,
-0.32151055335998535,
-0.6601057052612305,
-0.20814190804958344,
0.0568867027759552,
0.08129595220088959,
0.13389433920383453,
0.08663423359394073,
0.658318042755127,
-0.28604698181152344,
-0.3058631420135498,
-0.12814626097679138,
0.25594231486320496,
-0.3176603317260742,
-0.07192260026931763,
-0.1450493335723877,
0.04760732501745224,
0.11127591133117676,
0.15320849418640137,
-0.12621097266674042,
0.017117682844400406,
0.2119058519601822,
0.049054063856601715,
0.054913103580474854,
-0.01405961811542511,
-0.2146308720111847,
-0.25897690653800964,
0.5886334776878357,
-0.3175587058067322,
-0.018748054280877113,
0.0983477309346199,
0.18942973017692566,
-0.2295372188091278,
0.3451509475708008,
0.4678434133529663,
0.15102168917655945,
0.11637724936008453,
-0.2940588593482971,
-0.4040919840335846,
0.12502528727054596,
-0.02054760418832302,
0.24524906277656555,
-0.0724315345287323,
0.007063603028655052,
0.21764037013053894,
0.01118532381951809,
-0.17246165871620178,
0.0561898797750473,
0.29315072298049927,
0.1307225525379181,
-0.23089319467544556,
0.23472145199775696,
0.03144720941781998,
-0.41510340571403503,
-0.0846848338842392,
0.142929807305336,
-0.23692071437835693,
-0.05533069372177124,
0.6073333621025085,
0.06725970655679703,
-0.20491784811019897,
0.007665257900953293,
0.057009920477867126,
0.03959258273243904,
0.6827640533447266,
0.2916710078716278,
0.019868504256010056,
0.04464526101946831,
0.08467192947864532,
-0.37457409501075745,
-0.07478751987218857,
-0.16544301807880402,
0.09132032096385956,
0.14491665363311768,
0.24406574666500092,
-0.039416514337062836,
0.1297735571861267,
0.2777840793132782,
-0.05495264753699303,
0.00715510081499815,
0.0850735604763031,
-0.41347724199295044,
0.31212151050567627,
-0.03770633786916733,
-0.20646393299102783,
-0.020719747990369797,
-0.24112284183502197,
0.09308172762393951,
-0.388503760099411,
0.035090819001197815,
0.17095880210399628,
-0.1851281225681305,
0.13323871791362762,
-0.023706376552581787,
0.5298484563827515,
0.0337911918759346,
-0.0026985332369804382,
0.22063547372817993,
-0.24719829857349396,
-0.22944369912147522,
-0.0014848546124994755,
-0.09777522087097168,
0.34998729825019836,
0.1164236068725586,
0.6043640375137329,
-0.004801758099347353,
0.013871679082512856,
-0.08315648138523102,
0.2001269906759262,
0.14050109684467316,
-0.3439449965953827,
-0.14351703226566315,
0.17906755208969116,
-0.2635110914707184,
0.2629832625389099,
0.09976958483457565,
0.4538431465625763,
0.10964789986610413,
-0.0019848253577947617,
-0.3904705047607422,
-0.3562453091144562,
0.6104679107666016,
-0.3792699873447418,
-0.04715985059738159,
-0.06701123714447021,
0.32172203063964844,
0.19558776915073395,
-0.11063898354768753,
-0.4261549115180969,
-0.16774919629096985,
0.02054261788725853,
-0.10643435269594193,
-0.05691260099411011,
0.44555285573005676,
-0.2429264783859253,
-0.054844021797180176,
-0.15563948452472687,
0.473926305770874,
-0.21490395069122314,
-0.06983717530965805,
-0.06058856099843979,
-0.07167847454547882
] |
https://github.com/huggingface/datasets/issues/6385
|
Get an error when i try to concatenate the squad dataset with my own dataset
|
The `answers.text` field in the JSON dataset needs to be a list of strings, not a string.
So, here is the fixed code:
```python
from huggingface_hub import notebook_login
from datasets import load_dataset
notebook_login("mymailadresse", "mypassword")
squad = load_dataset("squad", split="train[:5000]")
squad = squad.train_test_split(test_size=0.2)
dataset1 = squad["train"]
import json
mybase = [
{
"id": "1",
"context": "She lives in Nantes",
"question": "Where does she live?",
"answers": {
"text": ["Nantes"],
"answer_start": [13],
}
}
]
# Save the data to a JSON file
json_file_path = r"data"
with open(json_file_path, "w", encoding= "utf-8") as json_file:
json.dump(mybase, json_file, indent=4)
# Load the JSON file as a dataset
custom_dataset = load_dataset("json", data_files=json_file_path, features=dataset1.features)
# Access the train split
train_dataset = custom_dataset["train"]
from datasets import concatenate_datasets
# Concatenate the datasets
concatenated_dataset = concatenate_datasets([train_dataset, dataset1])
```
|
### Describe the bug
Hello,
I'm new here and I need to concatenate the squad dataset with my own dataset i created. I find the following error when i try to do it: Traceback (most recent call last):
Cell In[9], line 1
concatenated_dataset = concatenate_datasets([train_dataset, dataset1])
File ~\anaconda3\Lib\site-packages\datasets\combine.py:213 in concatenate_datasets
return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis)
File ~\anaconda3\Lib\site-packages\datasets\arrow_dataset.py:6002 in _concatenate_map_style_datasets
_check_if_features_can_be_aligned([dset.features for dset in dsets])
File ~\anaconda3\Lib\site-packages\datasets\features\features.py:2122 in _check_if_features_can_be_aligned
raise ValueError(
ValueError: The features can't be aligned because the key answers of features {'id': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'context': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None), 'answers': Sequence(feature={'text': Value(dtype='string', id=None), 'answer_start': Value(dtype='int32', id=None)}, length=-1, id=None)} has unexpected type - Sequence(feature={'text': Value(dtype='string', id=None), 'answer_start': Value(dtype='int32', id=None)}, length=-1, id=None) (expected either {'answer_start': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'text': Value(dtype='string', id=None)} or Value("null").
### Steps to reproduce the bug
```python
from huggingface_hub import notebook_login
from datasets import load_dataset
notebook_login("mymailadresse", "mypassword")
squad = load_dataset("squad", split="train[:5000]")
squad = squad.train_test_split(test_size=0.2)
dataset1 = squad["train"]
import json
mybase = [
{
"id": "1",
"context": "She lives in Nantes",
"question": "Where does she live?",
"answers": {
"text": "Nantes",
"answer_start": [13],
}
}
]
# Save the data to a JSON file
json_file_path = r"C:\Users\mypath\thefile.json"
with open(json_file_path, "w", encoding= "utf-8") as json_file:
json.dump(mybase, json_file, indent=4)
# Load the JSON file as a dataset
custom_dataset = load_dataset("json", data_files=json_file_path)
# Access the train split
train_dataset = custom_dataset["train"]
from datasets import concatenate_datasets
# Concatenate the datasets
concatenated_dataset = concatenate_datasets([train_dataset, dataset1])
```
### Expected behavior
I would expect the two datasets to be concatenated without error. The len(dataset1) is equal to 4000 and the len(train_dataset) is equal to 1 so I would exepect concatenated_dataset to be created and having lenght 4001.
### Environment info
Python 3.11.4 and using windows
Thank you for your help
| 126
|
Get an error when i try to concatenate the squad dataset with my own dataset
### Describe the bug
Hello,
I'm new here and I need to concatenate the squad dataset with my own dataset i created. I find the following error when i try to do it: Traceback (most recent call last):
Cell In[9], line 1
concatenated_dataset = concatenate_datasets([train_dataset, dataset1])
File ~\anaconda3\Lib\site-packages\datasets\combine.py:213 in concatenate_datasets
return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis)
File ~\anaconda3\Lib\site-packages\datasets\arrow_dataset.py:6002 in _concatenate_map_style_datasets
_check_if_features_can_be_aligned([dset.features for dset in dsets])
File ~\anaconda3\Lib\site-packages\datasets\features\features.py:2122 in _check_if_features_can_be_aligned
raise ValueError(
ValueError: The features can't be aligned because the key answers of features {'id': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'context': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None), 'answers': Sequence(feature={'text': Value(dtype='string', id=None), 'answer_start': Value(dtype='int32', id=None)}, length=-1, id=None)} has unexpected type - Sequence(feature={'text': Value(dtype='string', id=None), 'answer_start': Value(dtype='int32', id=None)}, length=-1, id=None) (expected either {'answer_start': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'text': Value(dtype='string', id=None)} or Value("null").
### Steps to reproduce the bug
```python
from huggingface_hub import notebook_login
from datasets import load_dataset
notebook_login("mymailadresse", "mypassword")
squad = load_dataset("squad", split="train[:5000]")
squad = squad.train_test_split(test_size=0.2)
dataset1 = squad["train"]
import json
mybase = [
{
"id": "1",
"context": "She lives in Nantes",
"question": "Where does she live?",
"answers": {
"text": "Nantes",
"answer_start": [13],
}
}
]
# Save the data to a JSON file
json_file_path = r"C:\Users\mypath\thefile.json"
with open(json_file_path, "w", encoding= "utf-8") as json_file:
json.dump(mybase, json_file, indent=4)
# Load the JSON file as a dataset
custom_dataset = load_dataset("json", data_files=json_file_path)
# Access the train split
train_dataset = custom_dataset["train"]
from datasets import concatenate_datasets
# Concatenate the datasets
concatenated_dataset = concatenate_datasets([train_dataset, dataset1])
```
### Expected behavior
I would expect the two datasets to be concatenated without error. The len(dataset1) is equal to 4000 and the len(train_dataset) is equal to 1 so I would exepect concatenated_dataset to be created and having lenght 4001.
### Environment info
Python 3.11.4 and using windows
Thank you for your help
The `answers.text` field in the JSON dataset needs to be a list of strings, not a string.
So, here is the fixed code:
```python
from huggingface_hub import notebook_login
from datasets import load_dataset
notebook_login("mymailadresse", "mypassword")
squad = load_dataset("squad", split="train[:5000]")
squad = squad.train_test_split(test_size=0.2)
dataset1 = squad["train"]
import json
mybase = [
{
"id": "1",
"context": "She lives in Nantes",
"question": "Where does she live?",
"answers": {
"text": ["Nantes"],
"answer_start": [13],
}
}
]
# Save the data to a JSON file
json_file_path = r"data"
with open(json_file_path, "w", encoding= "utf-8") as json_file:
json.dump(mybase, json_file, indent=4)
# Load the JSON file as a dataset
custom_dataset = load_dataset("json", data_files=json_file_path, features=dataset1.features)
# Access the train split
train_dataset = custom_dataset["train"]
from datasets import concatenate_datasets
# Concatenate the datasets
concatenated_dataset = concatenate_datasets([train_dataset, dataset1])
```
|
[
-0.2219334989786148,
-0.18991577625274658,
0.01059049740433693,
0.1274256855249405,
0.24476584792137146,
0.16857564449310303,
0.34185561537742615,
0.2883612811565399,
-0.36836960911750793,
-0.008571848273277283,
-0.1195424348115921,
0.4824564456939697,
0.2559688985347748,
0.11856669932603836,
-0.31501179933547974,
0.1845044642686844,
0.10287774354219437,
-0.011830322444438934,
-0.010556764900684357,
0.17447049915790558,
-0.4107809364795685,
0.22342407703399658,
-0.3399578332901001,
0.09923475980758667,
-0.3854687809944153,
0.14286905527114868,
-0.1597052812576294,
0.2005559802055359,
-0.18723994493484497,
-0.33172690868377686,
0.45341113209724426,
-0.011815998703241348,
0.1977086067199707,
0.4169390797615051,
-0.00010937771730823442,
-0.07267697900533676,
0.35995858907699585,
-0.18491075932979584,
-0.15451492369174957,
-0.018360108137130737,
-0.3183688223361969,
-0.18837453424930573,
0.02745215967297554,
-0.15611639618873596,
0.0017223097383975983,
-0.13582587242126465,
-0.18139925599098206,
-0.5604355335235596,
0.3818720579147339,
0.3335542678833008,
0.1952185034751892,
0.03736550733447075,
0.29332709312438965,
-0.4835745394229889,
-0.03658553212881088,
0.031000815331935883,
-0.0012228135019540787,
0.028214920312166214,
0.18223249912261963,
-0.10761240124702454,
0.42919856309890747,
0.17676112055778503,
0.03726028650999069,
-0.07673722505569458,
0.2076980173587799,
0.33929383754730225,
0.0927468091249466,
-0.47807982563972473,
-0.03815661370754242,
0.1669594645500183,
0.5602622032165527,
-0.21230390667915344,
-0.2899995446205139,
-0.1615729033946991,
0.251848042011261,
-0.05077928304672241,
0.13441453874111176,
0.0320342481136322,
0.08556677401065826,
0.11400824785232544,
0.1146506741642952,
0.3410565257072449,
-0.21916384994983673,
0.12508425116539001,
0.160841703414917,
0.07244302332401276,
0.02376154437661171,
0.10307653248310089,
0.05669254809617996,
-0.263486385345459,
0.2261299043893814,
-0.2012423574924469,
-0.1608269065618515,
0.2686481177806854,
-0.5788864493370056,
-0.22484204173088074,
-0.2904124855995178,
-0.47528502345085144,
0.3542083501815796,
-0.09127815812826157,
0.053091783076524734,
-0.10806096345186234,
0.23813024163246155,
0.10572654008865356,
0.36722826957702637,
0.15291595458984375,
0.16802279651165009,
0.05316145718097687,
-0.18056894838809967,
-0.014741476625204086,
-0.014322318136692047,
0.009362669661641121,
-0.06090714782476425,
-0.3513178527355194,
0.050643425434827805,
0.283890038728714,
0.4175971746444702,
-0.046640146523714066,
-0.09067808836698532,
-0.015409340150654316,
-0.013079147785902023,
0.1503642350435257,
-0.10813305526971817,
-0.00898364931344986,
-0.08946501463651657,
0.0936659574508667,
0.04039493948221207,
0.2961433529853821,
0.22754836082458496,
-0.004930234979838133,
-0.09619174897670746,
-0.22181831300258636,
0.13670648634433746,
-0.11962791532278061,
-0.06905864179134369,
-0.12948358058929443,
-0.10585018247365952,
0.196695476770401,
0.20575298368930817,
0.013921808451414108,
-0.20916980504989624,
-0.13920734822750092,
-0.11887264996767044,
-0.0887998640537262,
0.2086174190044403,
-0.1175571158528328,
0.18964432179927826,
-0.252651184797287,
-0.14206166565418243,
0.01594339683651924,
-0.5065678954124451,
-0.37940162420272827,
-0.7047993540763855,
0.24879075586795807,
0.003453310579061508,
-0.014412108808755875,
0.07316602766513824,
0.09378881752490997,
0.27847543358802795,
-0.04449104890227318,
-0.1528911590576172,
0.035433363169431686,
0.010189022868871689,
-0.21569029986858368,
0.04542621225118637,
0.17057763040065765,
-0.3968895375728607,
0.0545986145734787,
-0.023814020678400993,
0.09652629494667053,
0.07458508759737015,
0.13577516376972198,
-0.026719965040683746,
0.17597341537475586,
-0.21473433077335358,
0.16409021615982056,
0.6666756868362427,
-0.6294942498207092,
-0.3275212049484253,
-0.010300264693796635,
-0.19498887658119202,
-0.16739796102046967,
0.026889346539974213,
0.12116226553916931,
0.38344982266426086,
-0.011552139185369015,
0.45580628514289856,
0.5310059785842896,
-0.07614748179912567,
-0.14885319769382477,
-0.08924362063407898,
-0.17445985972881317,
0.10519099235534668,
0.05308791622519493,
-0.39648208022117615,
0.15540671348571777,
0.1668817400932312,
-0.159269317984581,
0.03183511272072792,
-0.19284656643867493,
-0.11718890815973282,
0.1501082181930542,
0.19046568870544434,
0.09298937767744064,
-0.07413464039564133,
0.05205909162759781,
-0.6289854645729065,
0.010409120470285416,
-0.2824941873550415,
0.0737415999174118,
-0.0118933767080307,
-0.21798628568649292,
-0.11429091542959213,
-0.1972816288471222,
-0.3801531195640564,
-0.018104184418916702,
0.1276439130306244,
-0.008235059678554535,
-0.059882912784814835,
-0.14450640976428986,
-0.13530781865119934,
0.440532386302948,
0.05704814940690994,
0.026352033019065857,
-0.30510491132736206,
0.20922772586345673,
-0.28402677178382874,
0.028833448886871338,
0.05133324861526489,
0.4478749930858612,
0.21865925192832947,
0.16608065366744995,
-0.08743990957736969,
0.42592471837997437,
-0.15782900154590607,
-0.1664533168077469,
-0.008664686232805252,
-0.5605783462524414,
0.07780268788337708,
-0.18847830593585968,
-0.23476958274841309,
-0.06305043399333954,
-0.02861706167459488,
-0.08029929548501968,
-0.23348724842071533,
0.33929920196533203,
-0.01580606773495674,
0.28632134199142456,
-0.2080622762441635,
0.19432979822158813,
0.25897666811943054,
-0.052679453045129776,
-0.0653659924864769,
-0.13021311163902283,
0.046779174357652664,
0.13466233015060425,
-0.07188506424427032,
0.120621457695961,
-0.2197730392217636,
0.23323315382003784,
0.45439669489860535,
0.07562482357025146,
0.09847058355808258,
0.04548026621341705,
-0.036241888999938965,
0.08264338970184326,
-0.13753394782543182,
0.12151551246643066,
0.5641021728515625,
0.24077603220939636,
-0.34243932366371155,
0.13414235413074493,
-0.053234852850437164,
0.08930857479572296,
0.015953809022903442,
0.015857629477977753,
0.3462456464767456,
0.30482417345046997,
0.3779280483722687,
0.268748015165329,
0.21913203597068787,
-0.17061306536197662,
-0.1766871213912964,
-0.03539054095745087,
-0.2353132665157318,
0.08257242292165756,
-0.30359190702438354,
-0.23385703563690186,
-0.17921341955661774,
-0.16145771741867065,
-0.22270885109901428,
-0.32318806648254395,
-0.04592256247997284,
-0.049211304634809494,
0.1349649280309677,
0.3129972815513611,
0.11491277813911438,
0.2721845209598541,
0.34994855523109436,
-0.25298750400543213,
0.13476969301700592,
-0.054198913276195526,
-0.05161884427070618,
0.08009013533592224,
0.07195355743169785,
-0.12365826219320297,
0.09695258736610413,
-0.012664305046200752,
0.18722163140773773,
-0.17866861820220947,
-0.18415579199790955,
0.12505760788917542,
-0.2086377888917923,
0.14114773273468018,
0.04203568026423454,
0.0709698274731636,
0.054889827966690063,
-0.5292648077011108,
0.31045013666152954,
0.41071707010269165,
-0.33746469020843506,
0.2857769727706909,
0.04892313852906227,
-0.20481082797050476,
-0.14076443016529083,
-0.3992201089859009,
-0.4372108578681946,
-0.28784453868865967,
0.08521571755409241,
0.11222073435783386,
0.05402678996324539,
0.36161550879478455,
0.24360224604606628,
-0.020067831501364708,
0.011419719085097313,
-0.13076426088809967,
-0.33603593707084656,
-0.12432703375816345,
0.5620508790016174,
-0.1980995237827301,
-0.32278186082839966,
-0.05956775322556496,
-0.14083421230316162,
0.11949940025806427,
-0.26608651876449585,
0.031468428671360016,
-0.0827949270606041,
0.05991734564304352,
0.22620722651481628,
-0.3889402747154236,
-0.023577695712447166,
0.5043958425521851,
0.04192713275551796,
-0.08081045001745224,
-0.10637466609477997,
-0.12402088940143585,
0.18132250010967255,
0.24119868874549866,
0.4420868456363678,
-0.16398605704307556,
0.316301167011261,
-0.27995219826698303,
0.49743425846099854,
0.5466130375862122,
-0.27570244669914246,
0.1342586725950241,
-0.08588907122612,
0.37306100130081177,
-0.21880975365638733,
-0.4139653444290161,
0.029000984504818916,
-0.04846911132335663,
0.31907951831817627,
0.0437808595597744,
-0.20985126495361328,
-0.1426791548728943,
-0.12255100905895233,
0.4206184446811676,
-0.1967417299747467,
-0.06310613453388214,
-0.021943381056189537,
-0.014004126191139221,
0.024629030376672745,
-0.03795752301812172,
-0.0644727498292923,
-0.1611328274011612,
-0.07758446037769318,
-0.16119910776615143,
0.1984095722436905,
-0.14567968249320984,
0.0078117880038917065,
-0.7980465292930603,
-0.15696336328983307,
-0.21439585089683533,
0.3940388560295105,
0.1517394632101059,
0.3447853922843933,
0.058343056589365005,
-0.08209416270256042,
-0.28693944215774536,
0.039596881717443466,
0.6167899966239929,
-0.26589733362197876,
-0.5252019762992859,
0.2644028961658478,
0.4919004440307617,
-0.40433770418167114,
-0.3509119749069214,
-0.0018264241516590118,
0.4679427444934845,
0.07445839047431946,
0.49882400035858154,
-0.02040274441242218,
0.09877953678369522,
0.211222305893898,
-0.014129357412457466,
-0.020874857902526855,
-0.10651995241641998,
-0.27905359864234924,
-0.11219413578510284,
-0.4138171970844269,
-0.22084450721740723,
0.12129466980695724,
0.3671509921550751,
0.02180383913218975,
-0.2034132480621338,
-0.08638440072536469,
-0.13669690489768982,
0.08582694828510284,
0.0977049320936203,
0.5103527903556824,
0.32518520951271057,
0.23492655158042908,
0.12435897439718246,
0.16275723278522491,
0.037992335855960846,
0.40485358238220215,
0.3162744641304016,
-0.5058683156967163,
0.07059599459171295,
-0.2891022264957428,
0.5316076874732971,
0.11612164229154587,
-0.09999095648527145,
0.13345828652381897,
-0.3530741035938263,
0.0771532878279686,
-0.003656689077615738,
0.011011695489287376,
0.4325230121612549,
0.10921604931354523,
-0.4769361913204193,
-0.2003067284822464,
0.2056027352809906,
0.034595876932144165,
0.045552968978881836,
0.1585923433303833,
-0.06264500319957733,
-0.14762930572032928,
0.2392720729112625,
0.16030627489089966,
0.9302937388420105,
0.22953848540782928,
0.08415035158395767,
0.1243254542350769,
0.08775794506072998,
0.6618689894676208,
0.046512067317962646,
0.29500848054885864,
-0.33988702297210693,
-0.19108568131923676,
-0.029914379119873047,
-0.2602030336856842,
0.1543981283903122,
-0.08084429800510406,
-0.6401799321174622,
0.17238083481788635,
-0.3979688286781311,
0.3355959355831146,
-0.028303327038884163,
0.10939781367778778,
0.14929057657718658,
-0.37425968050956726,
-0.18043796718120575,
0.16465455293655396,
-0.036128707230091095,
0.057236842811107635,
-0.07972699403762817,
-0.2020476758480072,
-0.35494759678840637,
-0.15308570861816406,
-0.2594948410987854,
0.33599352836608887,
-0.2087174952030182,
0.21818523108959198,
0.13393408060073853,
-0.2122027724981308,
0.15371212363243103,
0.4801764488220215,
0.4194788932800293,
-0.07732419669628143,
-0.022278467193245888,
-0.12843717634677887,
0.16886308789253235,
-0.04120009019970894,
-0.009396020323038101,
-0.2618916928768158,
0.0696343332529068,
-0.10829571634531021,
-0.26974058151245117,
0.21872147917747498,
0.3656481206417084,
-0.3669922947883606,
-0.1995207965373993,
0.11329551786184311,
0.05456291884183884,
-0.42284488677978516,
-0.34112462401390076,
0.05045051500201225,
0.06734120845794678,
-0.09714528918266296,
0.11463810503482819,
-0.06934984028339386,
-0.1718420535326004,
0.22291207313537598,
0.07731902599334717,
-0.3242221474647522,
0.07209512591362,
0.3859480917453766,
0.07032770663499832,
0.20336942374706268,
0.42438942193984985,
-0.0028238482773303986,
0.057153746485710144,
-0.0621686615049839,
0.18856266140937805,
-0.1493600606918335,
-0.23341256380081177,
-0.28914526104927063,
-0.28769418597221375,
-0.3025323450565338,
-0.10029207915067673,
0.19229725003242493,
0.2470274120569229,
0.19078361988067627,
0.0950712114572525,
-0.4210882782936096,
-0.4480152428150177,
0.1266266405582428,
-0.16323181986808777,
0.06937794387340546,
-0.11565446108579636,
0.31792598962783813,
-0.004527514800429344,
0.05046004056930542,
-0.3175249993801117,
0.0054057203233242035,
-0.2960176467895508,
0.19380325078964233,
-0.0750463604927063,
-0.2752402424812317,
0.06122731789946556,
-0.32333293557167053,
0.12965688109397888,
0.25820034742355347,
-0.03373059257864952,
-0.29829540848731995,
-0.04372989013791084,
0.1598874032497406,
0.20457178354263306,
-0.03206367790699005,
-0.18433049321174622,
-0.12674205005168915,
-0.1746160387992859,
-0.07862553000450134,
-0.3940446376800537,
-0.10355409979820251,
0.16018393635749817,
-0.07765745371580124,
-0.08955545723438263,
-0.1001892015337944,
0.11271750926971436,
0.11756909638643265,
0.1671127825975418,
0.03688804805278778,
-0.19277523458003998,
0.08305627107620239,
-0.31306418776512146,
-0.08806315809488297,
-0.30859315395355225,
0.22859486937522888,
0.2424822598695755,
0.2765718996524811,
0.010459650307893753,
-0.3620547652244568,
-0.022406376898288727,
0.11352576315402985,
-0.011935412883758545,
0.35930463671684265,
-0.3214511275291443,
0.1091654896736145,
-0.04704507067799568,
0.14360077679157257,
-0.4043724834918976,
-0.2741529047489166,
0.30123838782310486,
-0.07313024252653122,
-0.09294773638248444,
0.16376551985740662,
-0.03858000412583351,
0.19132617115974426,
0.014606170356273651,
0.13239336013793945,
0.2861708402633667,
0.3119521141052246,
0.3487129807472229,
0.204693004488945,
0.021725881844758987,
0.1927749365568161,
0.27502068877220154,
0.1597192883491516,
0.14988073706626892,
0.16353198885917664,
-0.09908225387334824,
-0.06522907316684723,
0.2004033625125885,
-0.4026729166507721,
0.38680508732795715,
-0.042709387838840485,
0.1179267168045044,
0.09830283373594284,
0.17618805170059204,
0.13665881752967834,
0.21478283405303955,
0.4851813316345215,
-0.3108622431755066,
-0.5661216974258423,
-0.068485327064991,
-0.12860502302646637,
-0.10048825293779373,
0.21711890399456024,
-0.01129450649023056,
0.02467545121908188,
-0.0498683825135231,
-0.28804025053977966,
0.07363022118806839,
-0.2634304165840149,
0.3523261845111847,
-0.1786719709634781,
-0.14128416776657104,
-0.016870709136128426,
0.33302032947540283,
0.3573492467403412,
0.16256564855575562,
-0.09345792233943939,
0.1409386843442917,
0.02797061949968338,
0.1543605923652649,
0.3305392265319824,
0.39172497391700745,
0.48031747341156006,
0.46452975273132324,
-0.2839396595954895,
0.06372257322072983,
0.04111379757523537,
-0.27158939838409424,
0.25345027446746826,
-0.17511163651943207,
0.09835916012525558,
-0.6567550301551819,
0.22288814187049866,
0.2077494114637375,
-0.028361357748508453,
0.17524810135364532,
0.12895779311656952,
0.11304908990859985,
-0.2011919915676117,
0.14564593136310577,
-0.1913909912109375,
-0.09250222146511078,
0.024253370240330696,
0.3010547459125519,
-0.28417980670928955,
-0.12884391844272614,
0.3663352429866791,
0.252185583114624,
0.13730648159980774,
0.0129094822332263,
0.09735472500324249,
0.0050154514610767365,
0.38477522134780884,
0.30445918440818787,
-0.021695315837860107,
-0.11033326387405396,
0.049089595675468445,
-0.5394861698150635,
0.1116437017917633,
-0.004706323146820068,
0.02229415811598301,
0.156155064702034,
0.3442813456058502,
0.1946633756160736,
0.3893347978591919,
0.5007597208023071,
-0.05888572335243225,
-0.1809616982936859,
-0.09104980528354645,
-0.6078178882598877,
-0.31178757548332214,
0.14409424364566803,
0.07190468162298203,
0.053844623267650604,
-0.2660471498966217,
0.35345616936683655,
0.13047707080841064,
0.04665523022413254,
0.09932363033294678,
-0.18575507402420044,
-0.03985419496893883,
-0.24092411994934082,
0.09262631833553314,
0.09601107984781265,
0.37287259101867676,
-0.04806959629058838,
-0.08862289041280746,
0.045868948101997375,
-0.3123452067375183,
-0.13613015413284302,
0.42013445496559143,
0.1174536645412445,
0.14459820091724396,
-0.2725025713443756,
0.16984792053699493,
-0.1370924860239029,
0.049698151648044586,
0.24184082448482513,
-0.11226525157690048,
-0.5351961851119995,
0.2598167359828949,
0.018368400633335114,
0.18421797454357147,
-0.061110250651836395,
0.30217933654785156,
-0.11446884274482727,
0.5663938522338867,
0.022350884974002838,
-0.3506658971309662,
0.5497061014175415,
-0.07116606086492538,
-0.35060247778892517,
0.0598389133810997,
-0.039067044854164124,
0.48898574709892273,
0.159449502825737,
-0.2622774839401245,
-0.16186432540416718,
0.333200603723526,
-0.23313987255096436,
-0.13858529925346375,
0.0696599930524826,
-0.29203739762306213,
-0.010300546884536743,
-0.0763518363237381,
0.25339677929878235,
-0.008129842579364777,
-0.16617751121520996,
0.07700638473033905,
-0.27997809648513794
] |
https://github.com/huggingface/datasets/issues/6382
|
Add CheXpert dataset for vision
|
Hey @SauravMaheshkar ! Just responded to your email.
_For transparency, copying part of my response here:_
I agree, it would be really great to have this and other BenchMD datasets easily accessible on the hub.
I think the main limiting factor is that the ChexPert dataset is currently hosted on the Stanford AIMI Shared Datasets website, with a license that does not permit redistribution IIRC. Thus, I believe we would need to create a [dataset loading script](https://huggingface.co/docs/datasets/image_dataset#loading-script) that would check authentication with the Stanford AIMI site before downloading and extracting the data.
I've started a HF dataset repo [here](https://huggingface.co/datasets/katielink/CheXpert), in case you want to collaborate on writing up this loading script! I'm also happy to take a stab when I have some more time next week.
|
### Feature request
### Name
**CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison**
### Paper
https://arxiv.org/abs/1901.07031
### Data
https://stanfordaimi.azurewebsites.net/datasets/8cbd9ed4-2eb9-4565-affc-111cf4f7ebe2
### Motivation
CheXpert is one of the fundamental models in medical image classification and can serve as a viable pre-training dataset for radiology classification or low-scale ablation / exploratory studies.
This could also serve as a good pre-training dataset for Kaggle competitions.
### Your contribution
Would love to make a PR and pre-process / get this into 🤗
| 126
|
Add CheXpert dataset for vision
### Feature request
### Name
**CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison**
### Paper
https://arxiv.org/abs/1901.07031
### Data
https://stanfordaimi.azurewebsites.net/datasets/8cbd9ed4-2eb9-4565-affc-111cf4f7ebe2
### Motivation
CheXpert is one of the fundamental models in medical image classification and can serve as a viable pre-training dataset for radiology classification or low-scale ablation / exploratory studies.
This could also serve as a good pre-training dataset for Kaggle competitions.
### Your contribution
Would love to make a PR and pre-process / get this into 🤗
Hey @SauravMaheshkar ! Just responded to your email.
_For transparency, copying part of my response here:_
I agree, it would be really great to have this and other BenchMD datasets easily accessible on the hub.
I think the main limiting factor is that the ChexPert dataset is currently hosted on the Stanford AIMI Shared Datasets website, with a license that does not permit redistribution IIRC. Thus, I believe we would need to create a [dataset loading script](https://huggingface.co/docs/datasets/image_dataset#loading-script) that would check authentication with the Stanford AIMI site before downloading and extracting the data.
I've started a HF dataset repo [here](https://huggingface.co/datasets/katielink/CheXpert), in case you want to collaborate on writing up this loading script! I'm also happy to take a stab when I have some more time next week.
|
[
-0.29031574726104736,
-0.3038105368614197,
-0.0994907021522522,
-0.07802537083625793,
-0.1168287992477417,
0.011799797415733337,
0.2542487680912018,
0.46563079953193665,
0.16077257692813873,
0.38705962896347046,
-0.07608377188444138,
0.09143740683794022,
-0.25393328070640564,
0.4428372085094452,
0.19529476761817932,
-0.21124505996704102,
-0.17873144149780273,
0.07030585408210754,
0.272133469581604,
-0.18567055463790894,
0.11618570983409882,
-0.42493492364883423,
0.063717782497406,
-0.2816551923751831,
-0.07414595782756805,
-0.13569743931293488,
0.15565094351768494,
0.003026634454727173,
-0.25735795497894287,
-0.40649616718292236,
-0.06452915817499161,
0.2588846683502197,
0.10655862092971802,
0.10803978890180588,
-0.000114284353912808,
-0.06541606783866882,
-0.15954160690307617,
-0.01577240601181984,
-0.1505015641450882,
-0.042265474796295166,
-0.09249208867549896,
-0.04426274448633194,
-0.16139066219329834,
-0.1562376171350479,
-0.6080239415168762,
-0.03259392827749252,
0.03794482722878456,
-0.29069286584854126,
0.10977905988693237,
0.3679141402244568,
0.14458557963371277,
0.45225197076797485,
-0.2346586287021637,
-0.11413687467575073,
0.30980053544044495,
-0.019168436527252197,
-0.34192824363708496,
-0.06662701070308685,
0.3656385838985443,
0.5113808512687683,
-0.23903268575668335,
0.5480040311813354,
0.1455656886100769,
-0.0010969806462526321,
0.46553272008895874,
-0.25239622592926025,
0.11088055372238159,
-0.4332694709300995,
-0.12127890437841415,
0.5324336886405945,
0.15512408316135406,
-0.21611976623535156,
-0.2048455774784088,
-0.21515989303588867,
-0.04069245979189873,
-0.23970681428909302,
-0.22697415947914124,
0.18912053108215332,
0.0026007089763879776,
0.026176199316978455,
-0.23373480141162872,
-0.26006296277046204,
-0.38211047649383545,
-0.05443070828914642,
0.13951276242733002,
0.0970413088798523,
0.10516366362571716,
0.06256657093763351,
0.31925565004348755,
0.09246070683002472,
0.31628936529159546,
-0.12615184485912323,
-0.2303985357284546,
-0.19071556627750397,
-0.6122135519981384,
-0.26585960388183594,
0.0429866649210453,
0.5675182342529297,
0.09501270204782486,
0.33464324474334717,
0.32838717103004456,
0.19907480478286743,
-0.08116093277931213,
0.07092112302780151,
0.05430305749177933,
0.26559290289878845,
-0.19213426113128662,
0.38613876700401306,
-0.06819959729909897,
0.0913219228386879,
0.11731339991092682,
0.23347580432891846,
-0.04323037713766098,
0.07807926088571548,
-0.0023420415818691254,
-0.03552458435297012,
-0.41385579109191895,
-0.23931220173835754,
-0.26440367102622986,
0.08459929376840591,
0.443680077791214,
0.13242092728614807,
0.017252802848815918,
0.2671622931957245,
-0.010298600420355797,
0.0991898626089096,
0.24761153757572174,
0.08631040900945663,
-0.03194340690970421,
-0.6375214457511902,
-0.04658515378832817,
0.25132685899734497,
-0.10399162769317627,
0.06008487194776535,
0.22669707238674164,
-0.046547215431928635,
-0.11587504297494888,
-0.45759499073028564,
0.6045339107513428,
0.14482910931110382,
0.017325634136795998,
0.031875740736722946,
0.6043177843093872,
0.12894360721111298,
0.03801412507891655,
-0.4736415445804596,
-0.04815666750073433,
-0.052714377641677856,
-0.13140562176704407,
0.003997441381216049,
0.07507064193487167,
0.0017808862030506134,
-0.2670423686504364,
0.08143205940723419,
-0.48066049814224243,
-0.011799540370702744,
-0.13613814115524292,
0.3508419394493103,
-0.2844158411026001,
-0.17356039583683014,
0.24845486879348755,
-0.09930716454982758,
-0.3966137170791626,
-0.13748100399971008,
0.11834671348333359,
0.12901850044727325,
-0.3156766891479492,
0.029517866671085358,
-0.19976367056369781,
0.32127267122268677,
-0.592498242855072,
-0.0950375348329544,
0.07102860510349274,
0.17837406694889069,
-0.06816991418600082,
-0.29577499628067017,
0.30835357308387756,
-0.8103620409965515,
-0.4573269784450531,
-0.07570343464612961,
-0.22793787717819214,
-0.021675245836377144,
0.05200914293527603,
0.42229557037353516,
0.529007077217102,
-0.19627974927425385,
-0.18647906184196472,
0.11235344409942627,
-0.3257550299167633,
-0.11674102395772934,
-0.07802864909172058,
-0.3143540620803833,
-0.4825507402420044,
0.5463877320289612,
0.2326042801141739,
-0.2460445761680603,
0.22898775339126587,
-0.3633832335472107,
0.09016402065753937,
-0.08278369903564453,
0.2753751873970032,
-0.12953510880470276,
-0.028628330677747726,
-0.2010764330625534,
0.004720596130937338,
-0.29977571964263916,
-0.1929844617843628,
0.17228379845619202,
0.03138240799307823,
0.3500385284423828,
0.10745862871408463,
-0.060741715133190155,
0.05417497456073761,
-0.2190289944410324,
-0.2208578735589981,
0.06911522150039673,
0.05312339961528778,
-0.1690288782119751,
0.1838129609823227,
0.23251010477542877,
-0.07435150444507599,
-0.13208261132240295,
0.04007981717586517,
-0.08395318686962128,
-0.0999358743429184,
0.1920851767063141,
0.12389516830444336,
0.1284320205450058,
-0.12682262063026428,
0.3080084025859833,
-0.27328819036483765,
0.030770080164074898,
-0.11366554349660873,
0.2088083028793335,
-0.29645296931266785,
0.1562357246875763,
0.17964336276054382,
0.6245521306991577,
0.18537457287311554,
-0.777863085269928,
0.26561233401298523,
-0.03320157155394554,
-0.1886807680130005,
0.03377184271812439,
-0.13603165745735168,
0.4103255271911621,
0.17463545501232147,
-0.02537943422794342,
-0.16167521476745605,
0.16286712884902954,
-0.13213668763637543,
-0.09312967956066132,
-0.24031539261341095,
-0.08670474588871002,
0.17246228456497192,
-0.17932738363742828,
-0.012037606909871101,
-0.3301315903663635,
-0.2222536951303482,
0.31608521938323975,
-0.020394567400217056,
-0.03152792155742645,
0.0975111722946167,
0.04794507846236229,
-0.24767595529556274,
0.1881038248538971,
0.4170357584953308,
0.25790083408355713,
0.12346328794956207,
0.26373517513275146,
-0.2867076098918915,
0.09288955479860306,
0.04930829629302025,
0.12114383280277252,
0.02725902944803238,
0.09352831542491913,
0.12481846660375595,
0.15804916620254517,
0.059707291424274445,
0.08648697286844254,
-0.1926122009754181,
-0.17304879426956177,
-0.08825056999921799,
-0.10146129131317139,
-0.14331233501434326,
-0.048845428973436356,
0.2682851552963257,
-0.3407731354236603,
0.17496927082538605,
0.37482330203056335,
0.27520376443862915,
-0.04631775617599487,
0.3200416564941406,
0.19526466727256775,
-0.011261137202382088,
-0.06835826486349106,
-0.7066960334777832,
0.8113874793052673,
0.011660786345601082,
-0.23771058022975922,
0.014042340219020844,
-0.1805696189403534,
0.09390786290168762,
0.14720681309700012,
0.07151861488819122,
-0.06362511962652206,
0.5840557813644409,
-0.08762297034263611,
0.5188265442848206,
-0.3175726532936096,
-0.4485536515712738,
0.1406341791152954,
-0.2350139170885086,
0.24896883964538574,
0.0036518871784210205,
0.0652170479297638,
-0.25369417667388916,
0.156280055642128,
0.06756024807691574,
-0.3437331020832062,
-0.029966723173856735,
-0.10688691586256027,
-0.057344187051057816,
-0.20714856684207916,
-0.001478102058172226,
-0.11536679416894913,
-0.22192798554897308,
-0.29541149735450745,
-0.006518200039863586,
0.03890007361769676,
0.11165560781955719,
0.11245910823345184,
0.10832598060369492,
-0.3082568645477295,
-0.09785813093185425,
-0.12768900394439697,
-0.09414384514093399,
-0.5513017177581787,
0.140309676527977,
-0.32460537552833557,
-0.4353489279747009,
-0.053469233214855194,
-0.17959237098693848,
0.27270668745040894,
-0.12681052088737488,
-0.4981844425201416,
0.18962252140045166,
0.04758846014738083,
0.1570996344089508,
0.07240533828735352,
-0.3319023549556732,
0.2102046012878418,
0.05587920919060707,
0.057131603360176086,
-0.3083137571811676,
-0.18315820395946503,
0.20171523094177246,
0.12169179320335388,
0.19154119491577148,
0.17599204182624817,
-0.09232278913259506,
0.36512207984924316,
0.2356584221124649,
0.035858869552612305,
-0.29794132709503174,
0.2150679975748062,
0.07202844321727753,
0.2919803559780121,
0.04113519936800003,
-0.2899295389652252,
0.2745284140110016,
-0.012559965252876282,
0.0020198561251163483,
0.19303631782531738,
0.10109244287014008,
0.1577104777097702,
-0.3429628908634186,
0.14518018066883087,
-0.04603061452507973,
-0.26347455382347107,
-0.05383625626564026,
-0.45403844118118286,
-0.028865188360214233,
-0.06701520830392838,
-0.12294115126132965,
-0.2999074161052704,
-0.3060338497161865,
0.12274302542209625,
0.2767147421836853,
0.19452521204948425,
-0.13281680643558502,
-0.4597020149230957,
0.06610257923603058,
-0.17104414105415344,
0.20405733585357666,
0.1928601711988449,
-0.1605689376592636,
-0.2553998827934265,
0.02132582664489746,
0.029188036918640137,
0.2185429185628891,
-0.007721021771430969,
-0.6880422830581665,
0.246553435921669,
-0.11844103038311005,
0.0061730556190013885,
-0.3239290416240692,
0.023236390203237534,
-0.001942995935678482,
-0.38857486844062805,
-0.21646648645401,
0.14236275851726532,
-0.10444285720586777,
0.07536741346120834,
0.3443843722343445,
-0.12010808289051056,
-0.32043957710266113,
-0.1364753097295761,
0.1623126119375229,
-0.033749617636203766,
-0.035109229385852814,
-0.07926330715417862,
0.09787485748529434,
0.032128628343343735,
-0.0950152650475502,
0.10833778977394104,
0.157165065407753,
0.18577486276626587,
0.2485651969909668,
-0.03483222424983978,
0.09602487087249756,
-0.05607963353395462,
0.17301137745380402,
0.5254864692687988,
0.10617278516292572,
0.04318353533744812,
0.5108460783958435,
-0.06186215206980705,
-0.07476939260959625,
0.06527051329612732,
0.10462204366922379,
-0.0614699050784111,
0.4478303790092468,
0.23585417866706848,
-0.015730321407318115,
0.04630454629659653,
0.307010293006897,
-0.42108094692230225,
0.3123427629470825,
0.06489823758602142,
-0.010241113603115082,
-0.4559439718723297,
-0.10989262908697128,
0.30840110778808594,
0.037092696875333786,
-0.08398371189832687,
0.2640917897224426,
0.37466269731521606,
-0.19956476986408234,
0.1595512181520462,
0.3127177655696869,
1.1415284872055054,
-0.24109749495983124,
0.32638418674468994,
-0.02970091626048088,
0.12524113059043884,
0.19158445298671722,
-0.08633558452129364,
0.16175639629364014,
-0.3858988881111145,
-0.6267503499984741,
-0.11817875504493713,
-0.13407517969608307,
-0.11118435114622116,
-0.2513580322265625,
-0.08262309432029724,
-0.14596523344516754,
0.22031883895397186,
0.4071516990661621,
0.09386233985424042,
0.37347447872161865,
0.018428366631269455,
-0.12637709081172943,
0.34987667202949524,
0.139518603682518,
-0.05277365446090698,
0.09923167526721954,
0.05756114423274994,
-0.24634848535060883,
-0.3402292728424072,
0.07224076241254807,
-0.2050483226776123,
0.06756257265806198,
-0.08397321403026581,
-0.0790766105055809,
-0.5375206470489502,
-0.057877786457538605,
0.3211044371128082,
0.12826351821422577,
0.17537707090377808,
0.05425822734832764,
-0.4408586025238037,
0.36773332953453064,
0.1499045193195343,
-0.08794025331735611,
0.22765915095806122,
-0.08604861050844193,
0.19119277596473694,
-0.14741525053977966,
-0.4107936918735504,
0.4100206792354584,
0.20487292110919952,
-0.37675023078918457,
-0.5283147096633911,
-0.0882871001958847,
0.22953040897846222,
-0.05712147057056427,
0.13621675968170166,
-0.10726262629032135,
-0.20217962563037872,
-0.05437435954809189,
0.1039418876171112,
0.005402222275733948,
0.06281723827123642,
0.4441787600517273,
0.39731088280677795,
-0.22920770943164825,
0.09606501460075378,
0.2647833228111267,
0.0642961636185646,
0.0035230182111263275,
-0.01420580968260765,
0.06760184466838837,
-0.03653310611844063,
-0.24079573154449463,
0.0007419884204864502,
0.3802160918712616,
-0.46830445528030396,
-0.0408615916967392,
-0.23620331287384033,
-0.18544894456863403,
0.06289028376340866,
0.6079214811325073,
0.4829292893409729,
-0.12517616152763367,
-0.04063817858695984,
0.07441145181655884,
-0.1261075735092163,
0.259432852268219,
-0.3574312627315521,
0.5657004714012146,
-0.09675562381744385,
0.022442512214183807,
-0.18890874087810516,
0.21733921766281128,
-0.34147530794143677,
0.047930046916007996,
0.17323604226112366,
-0.04809797555208206,
-0.023829981684684753,
0.1384868621826172,
0.26283949613571167,
-0.06254646927118301,
-0.04391719028353691,
0.018213629722595215,
-0.40946972370147705,
-0.10751020908355713,
0.08626501262187958,
0.14341112971305847,
0.11103688180446625,
-0.22538703680038452,
-0.19470448791980743,
-0.3178926110267639,
-0.10682028532028198,
0.029407765716314316,
0.11583840847015381,
-0.04462864622473717,
-0.09140002727508545,
-0.19123058021068573,
-0.21791617572307587,
-0.11322126537561417,
0.37012404203414917,
0.41639822721481323,
0.24379777908325195,
0.22019335627555847,
0.06763215363025665,
0.05675714462995529,
0.10242282599210739,
-0.15542951226234436,
0.06210506334900856,
0.44242432713508606,
0.3405745029449463,
0.053390003740787506,
0.3892049491405487,
0.02759147435426712,
0.2116532325744629,
0.08491666615009308,
0.40919560194015503,
-0.2667163610458374,
-0.3804086148738861,
0.02063635177910328,
-0.15512466430664062,
0.17383843660354614,
-0.2685387134552002,
-0.053019341081380844,
0.06025013327598572,
0.16750361025333405,
0.27679482102394104,
0.3022470474243164,
0.5067182183265686,
0.10209794342517853,
-0.03388167917728424,
0.10600847750902176,
0.28390395641326904,
0.05355815961956978,
0.2819690406322479,
0.4546307921409607,
0.05867018178105354,
-0.11906452476978302,
0.22451165318489075,
0.15597596764564514,
0.04109594225883484,
0.17269811034202576,
-0.07997544854879379,
0.6242809295654297,
0.16744360327720642,
-0.1656726449728012,
0.3983951508998871,
0.008992895483970642,
0.4159204661846161,
-0.17649716138839722,
-0.04764889180660248,
0.04196479171514511,
-0.007069729268550873,
0.09176802635192871,
0.08570247888565063,
-0.3918040990829468,
-0.3030838966369629,
0.0795249193906784,
0.12479935586452484,
0.28557518124580383,
-0.1699748933315277,
-0.3244709372520447,
0.04867126792669296,
-0.15438519418239594,
0.17016547918319702,
-0.21614502370357513,
0.335751473903656,
0.11153382062911987,
-0.09183377027511597,
0.268006294965744,
-0.24140265583992004,
0.3150697350502014,
0.28679969906806946,
0.02447456493973732,
0.12961307168006897,
0.39446836709976196,
-0.01016504317522049,
0.433909147977829,
0.09698425233364105,
0.08877673745155334,
-0.045180544257164,
-0.12159812450408936,
0.22963805496692657,
-0.007668677717447281,
-0.10506121814250946,
0.11587420105934143,
0.06656375527381897,
0.07026442885398865,
-0.43233516812324524,
0.435476690530777,
0.15187017619609833,
-0.08770379424095154,
0.17090393602848053,
-0.12842842936515808,
0.24467308819293976,
-0.16420350968837738,
-0.010112524032592773,
0.18151749670505524,
0.12763267755508423,
-0.2594655752182007,
-0.08614546805620193,
-0.290825217962265,
-0.01902921497821808,
0.15570399165153503,
-0.32019317150115967,
-0.019177395850419998,
-0.2734360992908478,
0.06504456698894501,
-0.07867003977298737,
0.29655253887176514,
0.3928128480911255,
-0.07147478312253952,
-0.2386496663093567,
-0.21134959161281586,
-0.09275779873132706,
0.244098961353302,
-0.1064387857913971,
-0.30422958731651306,
0.09182260930538177,
0.09361997246742249,
0.06407957524061203,
-0.005633752793073654,
0.4630749225616455,
-0.2474401593208313,
0.34514519572257996,
0.3025241494178772,
-0.303314745426178,
0.13137491047382355,
0.2088540494441986,
0.35129907727241516,
0.028611619025468826,
-0.20256677269935608,
0.0744636058807373,
0.37527555227279663,
0.06759075820446014,
-0.10563112795352936,
0.09613668918609619,
0.04047488793730736,
-0.5531309843063354,
0.5159741640090942,
-0.3302523195743561,
0.5411310195922852,
0.01660199463367462,
-0.26393571496009827,
-0.029246430844068527,
0.1967354267835617,
-0.37008240818977356,
-0.12314119189977646,
0.39503270387649536,
0.5098403692245483,
-0.11219315975904465,
-0.09010286629199982,
0.029002491384744644,
-0.005714333616197109,
-0.04710351675748825,
-0.06757830828428268,
-0.30709004402160645,
0.1387222558259964,
-0.23135262727737427,
0.27653563022613525,
0.08233647793531418,
-0.00966247171163559,
-0.04530914127826691,
0.233210489153862,
-0.004687361419200897,
-0.4197343587875366,
0.7181745171546936,
0.03999638557434082,
0.098799929022789,
0.011108252219855785,
0.11892887204885483,
0.06413882970809937,
-0.10462068766355515,
-0.4936333894729614,
0.012291140854358673,
0.044691022485494614,
0.1504126787185669,
0.25067606568336487,
0.36869361996650696,
-0.24746596813201904,
0.1016174703836441,
-0.05195770785212517,
0.15803994238376617,
-0.12527155876159668,
-0.019711237400770187,
-0.23169340193271637,
-0.16610080003738403
] |
https://github.com/huggingface/datasets/issues/6382
|
Add CheXpert dataset for vision
|
Hi @katielink , I would also love to be on board and contribute to this loading script/project if it is still being developed. I'm interested because I personally would like to gain access to the CheXpert dataset and am facing some weird issues, so I'd like to sort it out for me, and potentially others. Please keep me updated and guide me on this as well!!!
|
### Feature request
### Name
**CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison**
### Paper
https://arxiv.org/abs/1901.07031
### Data
https://stanfordaimi.azurewebsites.net/datasets/8cbd9ed4-2eb9-4565-affc-111cf4f7ebe2
### Motivation
CheXpert is one of the fundamental models in medical image classification and can serve as a viable pre-training dataset for radiology classification or low-scale ablation / exploratory studies.
This could also serve as a good pre-training dataset for Kaggle competitions.
### Your contribution
Would love to make a PR and pre-process / get this into 🤗
| 66
|
Add CheXpert dataset for vision
### Feature request
### Name
**CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison**
### Paper
https://arxiv.org/abs/1901.07031
### Data
https://stanfordaimi.azurewebsites.net/datasets/8cbd9ed4-2eb9-4565-affc-111cf4f7ebe2
### Motivation
CheXpert is one of the fundamental models in medical image classification and can serve as a viable pre-training dataset for radiology classification or low-scale ablation / exploratory studies.
This could also serve as a good pre-training dataset for Kaggle competitions.
### Your contribution
Would love to make a PR and pre-process / get this into 🤗
Hi @katielink , I would also love to be on board and contribute to this loading script/project if it is still being developed. I'm interested because I personally would like to gain access to the CheXpert dataset and am facing some weird issues, so I'd like to sort it out for me, and potentially others. Please keep me updated and guide me on this as well!!!
|
[
-0.18617236614227295,
-0.33047187328338623,
-0.0778864175081253,
-0.07536779344081879,
-0.021564718335866928,
-0.1062064915895462,
0.06507609039545059,
0.41927891969680786,
0.10648073256015778,
0.2968033254146576,
0.09117300808429718,
0.04682562127709389,
-0.3325173556804657,
0.5285457372665405,
0.206571564078331,
-0.3213544487953186,
-0.1954112946987152,
0.14699257910251617,
0.30856481194496155,
-0.15974771976470947,
-0.008606292307376862,
-0.4108443856239319,
0.03764673322439194,
-0.326765239238739,
0.03599867597222328,
-0.07957997918128967,
0.20994693040847778,
0.02242542803287506,
-0.321967214345932,
-0.4122701585292816,
-0.18140992522239685,
0.1904982477426529,
-0.025209888815879822,
0.3423170745372772,
-0.00011190339864697307,
-0.18257510662078857,
-0.1444203406572342,
-0.06585080176591873,
-0.1988118439912796,
-0.0028384029865264893,
-0.09296569973230362,
-0.16132384538650513,
-0.10241334140300751,
-0.1760535091161728,
-0.6087296605110168,
-0.19450326263904572,
0.056214094161987305,
-0.16336366534233093,
0.14673376083374023,
0.3386753797531128,
0.2026454508304596,
0.29762914776802063,
-0.09532162547111511,
-0.07345026731491089,
0.38561341166496277,
0.14584515988826752,
-0.3542407155036926,
-0.2100318968296051,
0.3665819764137268,
0.4333598017692566,
-0.17787230014801025,
0.6673904657363892,
0.16612347960472107,
-0.25562745332717896,
0.42123425006866455,
-0.24154330790042877,
-0.02855619788169861,
-0.48987719416618347,
-0.0814371109008789,
0.4644307494163513,
0.17558906972408295,
-0.15281188488006592,
-0.1348557025194168,
-0.11367427557706833,
-0.07583966106176376,
-0.5222005844116211,
-0.15416958928108215,
0.12431401014328003,
-0.011027882806956768,
-0.02531186118721962,
-0.27012816071510315,
-0.17844079434871674,
-0.3638978600502014,
-0.005371645092964172,
0.13656625151634216,
-0.04765568673610687,
-0.06609509885311127,
0.05691434442996979,
0.4063418209552765,
-0.00912240520119667,
0.06622294336557388,
-0.046121299266815186,
-0.3058469295501709,
-0.04440310597419739,
-0.7203395962715149,
-0.2464955896139145,
0.15908849239349365,
0.790343165397644,
0.031212881207466125,
0.32242369651794434,
0.2758331298828125,
0.14063796401023865,
-0.16947153210639954,
0.0034703053534030914,
-0.017849821597337723,
0.3137625455856323,
-0.1262768805027008,
0.38643890619277954,
-0.17912548780441284,
0.055698372423648834,
0.18164590001106262,
0.16400441527366638,
-0.03206261247396469,
-0.04979647696018219,
0.16276660561561584,
-0.049861736595630646,
-0.27542436122894287,
-0.34299635887145996,
-0.11221367865800858,
0.2349182516336441,
0.4728403687477112,
0.11024245619773865,
0.010576106607913971,
0.3407696783542633,
-0.030503619462251663,
0.12819981575012207,
0.40749257802963257,
0.0249868705868721,
0.010640857741236687,
-0.609795868396759,
-0.024073898792266846,
0.22528566420078278,
-0.17049115896224976,
-0.03301934152841568,
0.17618335783481598,
0.10619029402732849,
-0.14835858345031738,
-0.37075772881507874,
0.5374580025672913,
0.09313417971134186,
0.007648201659321785,
0.024986006319522858,
0.49331969022750854,
0.2735556662082672,
-0.1242423951625824,
-0.3547116816043854,
-0.06178891286253929,
0.003697190433740616,
-0.016073718667030334,
0.19607281684875488,
0.054285790771245956,
0.03397434577345848,
-0.34633633494377136,
0.1418754756450653,
-0.34365415573120117,
-0.004628807306289673,
0.011584199965000153,
0.38463908433914185,
-0.00205143541097641,
-0.2005491852760315,
0.26766446232795715,
-0.2819676995277405,
-0.38466379046440125,
-0.212397038936615,
0.14446043968200684,
0.09056952595710754,
-0.5154491662979126,
0.10311493277549744,
-0.2529430389404297,
0.18254943192005157,
-0.4218449592590332,
-0.15156054496765137,
0.14674794673919678,
0.08766338229179382,
-0.018915733322501183,
-0.4753129482269287,
0.38201168179512024,
-0.5690067410469055,
-0.34442800283432007,
0.01663038693368435,
-0.26736223697662354,
0.0490710511803627,
0.03198910504579544,
0.3650864362716675,
0.3100457787513733,
-0.24383479356765747,
-0.21458864212036133,
0.015636436641216278,
-0.4045203924179077,
-0.17882294952869415,
-0.15591105818748474,
-0.15805509686470032,
-0.3029051423072815,
0.47426432371139526,
0.1259310096502304,
-0.18469718098640442,
0.05859566107392311,
-0.552844226360321,
0.06145074963569641,
-0.056402187794446945,
0.2322601079940796,
-0.014809619635343552,
0.030765637755393982,
-0.1649646908044815,
0.15297731757164001,
-0.27339282631874084,
-0.2592936158180237,
0.08074130862951279,
0.05379874259233475,
0.1701129972934723,
0.13166671991348267,
-0.012717733159661293,
-0.052558500319719315,
-0.22507138550281525,
-0.24789343774318695,
0.12912720441818237,
0.079658143222332,
-0.09266214072704315,
-0.01046406663954258,
0.1320115029811859,
-0.0560198649764061,
-0.23670393228530884,
0.05220886319875717,
-0.09883695095777512,
-0.051545727998018265,
-0.01462516188621521,
0.018060892820358276,
0.05502884089946747,
-0.23229877650737762,
0.25694212317466736,
-0.18754065036773682,
0.05148571357131004,
-0.11030096560716629,
0.2194879651069641,
-0.2058844417333603,
-0.0012058094143867493,
0.08072257786989212,
0.5239785313606262,
0.15048065781593323,
-0.6647640466690063,
0.09310997277498245,
0.023692142218351364,
-0.09817452728748322,
-0.07526376843452454,
-0.06017784774303436,
0.2565958499908447,
0.1758321076631546,
-0.07498627156019211,
-0.16877210140228271,
0.15170954167842865,
-0.10483157634735107,
-0.14014896750450134,
-0.16685429215431213,
-0.005452219396829605,
0.3149997293949127,
-0.18110793828964233,
-0.0654086321592331,
-0.23634417355060577,
-0.3878573775291443,
0.31693604588508606,
-0.05390055105090141,
-0.11236943304538727,
0.03229335695505142,
0.12040840089321136,
-0.12116803973913193,
0.2846471965312958,
0.17211851477622986,
0.19728665053844452,
0.048116520047187805,
0.2420230209827423,
-0.421364963054657,
0.07698432356119156,
0.03908617049455643,
0.12099906802177429,
0.024790748953819275,
0.07811785489320755,
0.04490291699767113,
0.19290947914123535,
0.03751962631940842,
0.0973910391330719,
-0.09195415675640106,
-0.19841714203357697,
-0.11627927422523499,
-0.031623706221580505,
-0.20287799835205078,
0.012214882299304008,
0.25129061937332153,
-0.29336991906166077,
0.18581923842430115,
0.287818044424057,
0.30212897062301636,
-0.016191905364394188,
0.2311183661222458,
0.016137680038809776,
-0.08832453191280365,
-0.017780670896172523,
-0.6973240971565247,
0.6943299174308777,
0.1504771113395691,
-0.28315114974975586,
0.09119109809398651,
-0.24114501476287842,
0.010371632874011993,
0.1656186580657959,
-0.004924994893372059,
-0.18499042093753815,
0.6712527275085449,
-0.025556541979312897,
0.33503782749176025,
-0.14586682617664337,
-0.5266419053077698,
0.09473094344139099,
-0.3611220121383667,
0.27356985211372375,
0.03499618172645569,
0.1611415296792984,
-0.27724719047546387,
0.07049194723367691,
0.10272162407636642,
-0.19508019089698792,
-0.05879974365234375,
-0.06391657888889313,
0.015033584088087082,
-0.22889827191829681,
-0.22455459833145142,
-0.07703309506177902,
-0.09882769733667374,
-0.26374199986457825,
0.10873495042324066,
0.14293082058429718,
0.19097593426704407,
0.22147966921329498,
0.09825731813907623,
-0.30970796942710876,
-0.1725967526435852,
-0.01750708557665348,
-0.11245487630367279,
-0.4847090244293213,
0.10809272527694702,
-0.1975206881761551,
-0.46853575110435486,
-0.0236576609313488,
-0.1009499728679657,
0.08376994729042053,
-0.028469834476709366,
-0.4193919897079468,
0.23115777969360352,
-0.040461428463459015,
0.02627686783671379,
0.170896515250206,
-0.3565865159034729,
0.26504579186439514,
0.181639164686203,
0.010959403589367867,
-0.3793884217739105,
-0.22263085842132568,
0.21381385624408722,
0.014934973791241646,
0.2833476662635803,
0.14774265885353088,
-0.02322409301996231,
0.1893693059682846,
0.2371496856212616,
-0.11240285634994507,
-0.31868860125541687,
0.0920175164937973,
0.015848612412810326,
0.3699030578136444,
-0.03458341956138611,
-0.5097013711929321,
0.30282533168792725,
-0.01520240306854248,
0.05553087592124939,
0.16183821856975555,
0.07900155335664749,
0.10448570549488068,
-0.353616327047348,
0.2594975233078003,
-0.019341466948390007,
-0.16084949672222137,
0.030629416927695274,
-0.29307958483695984,
0.01030421257019043,
-0.1919070929288864,
-0.14683228731155396,
-0.24556556344032288,
-0.25675463676452637,
-0.0213466864079237,
0.3534407615661621,
0.2194277048110962,
-0.2328605353832245,
-0.49652230739593506,
0.055540479719638824,
-0.11892988532781601,
0.2754698395729065,
0.1868363320827484,
-0.12440177798271179,
-0.2886032164096832,
-0.02426391839981079,
-0.048469021916389465,
0.2617119550704956,
-0.010852083563804626,
-0.5115588307380676,
0.13668444752693176,
0.03118298575282097,
-0.006768088787794113,
-0.23315869271755219,
0.05659875646233559,
0.010285831987857819,
-0.36652204394340515,
-0.16982074081897736,
-0.12240646779537201,
-0.03212994337081909,
0.09556630253791809,
0.4761263132095337,
0.09349070489406586,
-0.3102477490901947,
-0.19428034126758575,
0.020811308175325394,
-0.03870255500078201,
0.008801760151982307,
-0.08751612156629562,
0.02408243902027607,
-0.01008574664592743,
-0.11959316581487656,
0.14141708612442017,
0.3282257914543152,
0.17926770448684692,
0.3148990571498871,
-0.17918677628040314,
0.09779807180166245,
-0.09624065458774567,
0.18105418980121613,
0.39624232053756714,
0.153122678399086,
0.04229185730218887,
0.41331806778907776,
-0.1585261970758438,
-0.08660398423671722,
0.051767997443675995,
0.16816700994968414,
0.09356701374053955,
0.35821276903152466,
0.16824515163898468,
0.017487548291683197,
0.03958280384540558,
0.41270017623901367,
-0.35689476132392883,
0.3227005898952484,
0.21325361728668213,
-0.10619281977415085,
-0.5786795616149902,
-0.19824393093585968,
0.24250730872154236,
-0.04203908145427704,
-0.11685459315776825,
0.342109739780426,
0.2715856432914734,
-0.17379674315452576,
0.10247807204723358,
0.15296673774719238,
1.2503612041473389,
-0.1752510666847229,
0.3015507757663727,
0.06394010782241821,
0.2007492333650589,
0.1478598266839981,
-0.010548833757638931,
0.12611150741577148,
-0.34895843267440796,
-0.7062415480613708,
-0.057474493980407715,
-0.1268453747034073,
0.01665547862648964,
-0.2096806913614273,
-0.1814391165971756,
-0.11634369939565659,
-0.04887301102280617,
0.360303670167923,
0.1749725490808487,
0.16268058121204376,
0.2541840374469757,
-0.10451139509677887,
0.38829636573791504,
0.14656731486320496,
-0.10337819159030914,
0.06619750708341599,
0.029971983283758163,
-0.276974618434906,
-0.25250244140625,
0.016581375151872635,
-0.2123994380235672,
0.10277891904115677,
-0.08205074816942215,
-0.22951340675354004,
-0.5333614945411682,
-0.0837455540895462,
0.33464545011520386,
0.16631507873535156,
0.0594019815325737,
0.2495991289615631,
-0.3536738157272339,
0.43499845266342163,
0.2736397981643677,
-0.028473062440752983,
0.19136592745780945,
-0.12804459035396576,
0.13415922224521637,
-0.09257097542285919,
-0.3646346926689148,
0.3982405662536621,
0.08054342120885849,
-0.21564126014709473,
-0.5608845949172974,
0.022426631301641464,
0.25880634784698486,
-0.16765083372592926,
-0.027521802112460136,
-0.10851582884788513,
-0.0910315215587616,
-0.012925274670124054,
0.15702398121356964,
0.06847921758890152,
0.05965874716639519,
0.41725683212280273,
0.3579130172729492,
-0.25580212473869324,
0.07270704209804535,
0.1851355880498886,
0.10790279507637024,
-0.06965439021587372,
0.15826210379600525,
0.05623800680041313,
-0.08319535851478577,
-0.28176242113113403,
-0.0498235858976841,
0.41788163781166077,
-0.42659613490104675,
-0.08463892340660095,
-0.0756201446056366,
-0.11576441675424576,
0.07736063748598099,
0.5848755240440369,
0.4036383628845215,
-0.09995020180940628,
0.0782165676355362,
0.05346411466598511,
-0.16836655139923096,
0.14043205976486206,
-0.4355227053165436,
0.5175537467002869,
-0.1479319930076599,
0.12732452154159546,
-0.06648457050323486,
0.3072206974029541,
-0.3886471390724182,
-0.04139164090156555,
0.23068341612815857,
0.10098706185817719,
0.3348681628704071,
0.1210080236196518,
0.21069006621837616,
-0.03981099650263786,
0.05420559644699097,
-0.011530090123414993,
-0.3729439973831177,
-0.15381035208702087,
0.1349257230758667,
0.12232313305139542,
0.09716103971004486,
-0.29680415987968445,
-0.1375666856765747,
-0.3067009449005127,
-0.09570358693599701,
0.0767131820321083,
0.044817063957452774,
-0.1589590162038803,
-0.06825906038284302,
-0.15558962523937225,
-0.4173808991909027,
-0.07436592131853104,
0.4391402006149292,
0.3828939199447632,
0.12290355563163757,
0.22194847464561462,
0.14153093099594116,
-0.0964415967464447,
0.11674448102712631,
-0.2141469568014145,
0.030980514362454414,
0.42518889904022217,
0.20703428983688354,
0.11612967401742935,
0.4415135681629181,
0.003620736300945282,
0.22414597868919373,
-0.019484911113977432,
0.4343320429325104,
-0.2206985354423523,
-0.40416717529296875,
0.039844684302806854,
0.027096420526504517,
0.2296791970729828,
-0.27656376361846924,
0.11793722957372665,
0.28285568952560425,
0.2040538787841797,
0.20808395743370056,
0.25559914112091064,
0.31394341588020325,
0.058315813541412354,
0.08446811139583588,
0.11001519113779068,
0.12361976504325867,
-0.00402447022497654,
0.2815401256084442,
0.493235319852829,
0.01486295834183693,
-0.1520930975675583,
0.26467013359069824,
0.17527079582214355,
0.0454687774181366,
0.20388871431350708,
-0.04928078502416611,
0.46826842427253723,
0.21333712339401245,
-0.09890276193618774,
0.3010704517364502,
-0.2678285539150238,
0.5396201014518738,
-0.060256749391555786,
-0.14721298217773438,
0.07871690392494202,
0.04281860589981079,
0.08573419600725174,
0.08907315135002136,
-0.3782336711883545,
-0.27208390831947327,
0.2646510899066925,
0.13221332430839539,
0.29050469398498535,
-0.1424538493156433,
-0.31032422184944153,
0.02501644939184189,
-0.2588151693344116,
0.2269069254398346,
-0.09180518984794617,
0.3470979332923889,
0.11093929409980774,
-0.07504706084728241,
0.1731693595647812,
-0.2731679677963257,
0.2615083158016205,
0.3147779703140259,
0.028625350445508957,
0.2568419575691223,
0.4698096513748169,
-0.005117394030094147,
0.49947553873062134,
0.005313688889145851,
0.05077909305691719,
0.14580053091049194,
-0.08396872878074646,
0.21853870153427124,
-0.0773659348487854,
-0.12880082428455353,
0.11324341595172882,
0.19314509630203247,
0.06458684802055359,
-0.2863712012767792,
0.45561498403549194,
0.1574985384941101,
-0.1271698772907257,
0.21003834903240204,
-0.03424225375056267,
0.30919352173805237,
-0.2067534476518631,
-0.11510325223207474,
0.25658470392227173,
0.027143552899360657,
-0.3525025546550751,
-0.11631695181131363,
-0.3232240676879883,
-0.03301296383142471,
0.1123405396938324,
-0.12325607240200043,
0.02237028256058693,
-0.22910942137241364,
0.08351513743400574,
0.07601279020309448,
0.32934701442718506,
0.43289715051651,
-0.07771644741296768,
-0.2239050269126892,
-0.20545849204063416,
-0.0741981640458107,
0.13840806484222412,
-0.09859129786491394,
-0.33052295446395874,
0.06960991770029068,
-0.003251289017498493,
0.10537319630384445,
-0.015287239104509354,
0.5430079698562622,
-0.4505096673965454,
0.5054436922073364,
0.19767196476459503,
-0.27627262473106384,
0.12862518429756165,
0.297078013420105,
0.3899998962879181,
-0.01137479767203331,
-0.2373310625553131,
0.027154933661222458,
0.2920733690261841,
0.17387840151786804,
-0.18189235031604767,
-0.003024902194738388,
-0.058876387774944305,
-0.377985417842865,
0.4810817241668701,
-0.28940528631210327,
0.6553608179092407,
-0.0011274293065071106,
-0.2535603642463684,
0.0440063551068306,
0.19522325694561005,
-0.2686958611011505,
-0.04015907645225525,
0.5144100785255432,
0.5290546417236328,
-0.11252078413963318,
-0.15881402790546417,
-0.061863210052251816,
0.12383918464183807,
-0.15975558757781982,
-0.07194769382476807,
-0.25487425923347473,
0.15846244990825653,
-0.13088420033454895,
0.20627692341804504,
0.06146366521716118,
-0.033420540392398834,
-0.04730597138404846,
0.36413782835006714,
-0.09594058245420456,
-0.47931167483329773,
0.722122073173523,
0.06750388443470001,
0.04271866753697395,
-0.0025331235956400633,
0.10453177988529205,
-0.02326314151287079,
0.0012415703386068344,
-0.43941164016723633,
0.014513455331325531,
0.08290889114141464,
0.18081843852996826,
0.16176050901412964,
0.3336162269115448,
-0.42685040831565857,
0.05922075733542442,
0.03900952264666557,
0.4514765441417694,
-0.11880629509687424,
0.04408687353134155,
-0.19014675915241241,
-0.11567597091197968
] |
https://github.com/huggingface/datasets/issues/6376
|
Caching problem when deleting a dataset
|
I did not store it at the time but I'll try to re-do a mwe next week to get it again
|
### Describe the bug
Pushing a dataset with n + m features to a repo which was deleted, but contained n features, will fail.
### Steps to reproduce the bug
1. Create a dataset with n features per row
2. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)`
3. Go on the hub, delete the repo at `YOUR_PATH`
4. Update your local dataset to have n + m features per row
5. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` will fail because of a mismatch in features number
### Expected behavior
Step 5 should work or display a message to indicate the cache has not been cleared
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-5.15.0-88-generic-x86_64-with-glibc2.31
- Python version: 3.10.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 11.0.0
- Pandas version: 2.0.0
| 21
|
Caching problem when deleting a dataset
### Describe the bug
Pushing a dataset with n + m features to a repo which was deleted, but contained n features, will fail.
### Steps to reproduce the bug
1. Create a dataset with n features per row
2. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)`
3. Go on the hub, delete the repo at `YOUR_PATH`
4. Update your local dataset to have n + m features per row
5. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` will fail because of a mismatch in features number
### Expected behavior
Step 5 should work or display a message to indicate the cache has not been cleared
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-5.15.0-88-generic-x86_64-with-glibc2.31
- Python version: 3.10.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 11.0.0
- Pandas version: 2.0.0
I did not store it at the time but I'll try to re-do a mwe next week to get it again
|
[
-0.1756400167942047,
-0.159572035074234,
-0.042584605515003204,
0.3126745820045471,
0.015762338414788246,
-0.061480168253183365,
0.2875652313232422,
0.29687827825546265,
0.1976938396692276,
-0.02228972315788269,
0.17500972747802734,
0.17467543482780457,
0.008161112666130066,
0.18102596700191498,
-0.06692974269390106,
-0.0261114239692688,
0.28738585114479065,
-0.08514022827148438,
0.22816185653209686,
-0.06398281455039978,
-0.2170572131872177,
0.03657224401831627,
-0.11420068144798279,
-0.14701475203037262,
-0.2908153235912323,
0.028036849573254585,
-0.10452436655759811,
0.2080196738243103,
0.23451709747314453,
-0.3258326053619385,
0.3477083742618561,
0.010058978572487831,
0.07182281464338303,
0.5099272727966309,
-0.00010960627696476877,
-0.11089415848255157,
0.30041396617889404,
0.098385751247406,
-0.44511842727661133,
0.08066990971565247,
-0.38685595989227295,
-0.25888562202453613,
-0.12232368439435959,
-0.19083908200263977,
0.17978769540786743,
0.2592216730117798,
-0.1912095993757248,
-0.11456717550754547,
0.2004336714744568,
0.3066597282886505,
0.26826512813568115,
0.17217892408370972,
0.21958185732364655,
-0.10660646855831146,
0.4844341576099396,
0.16524502635002136,
-0.27216029167175293,
0.020417090505361557,
0.3269718885421753,
-0.026163402944803238,
-0.08132977038621902,
0.2718908488750458,
-0.14020463824272156,
0.02734631672501564,
0.16654440760612488,
-0.04995371773838997,
0.055203597992658615,
-0.004170466214418411,
0.18411973118782043,
0.034254372119903564,
0.3976157307624817,
-0.3389514684677124,
-0.2543928921222687,
-0.24985256791114807,
-0.2674943506717682,
-0.6040804982185364,
0.3379203975200653,
0.041419144719839096,
0.01091737113893032,
0.13630099594593048,
-0.2906571626663208,
-0.3005884885787964,
-0.033456552773714066,
-0.0989963561296463,
0.07975015044212341,
-0.03660474717617035,
0.020808599889278412,
0.024120505899190903,
-0.19402824342250824,
-0.16208305954933167,
0.18880495429039001,
-0.11161130666732788,
-0.028932977467775345,
0.16899701952934265,
-0.42363834381103516,
-0.07263650745153427,
0.23113131523132324,
-0.028284557163715363,
0.4321136176586151,
0.23986613750457764,
-0.1500682532787323,
-0.07210995256900787,
-0.15762807428836823,
0.050196681171655655,
0.29140061140060425,
0.6563515663146973,
-0.07516670972108841,
0.18168866634368896,
0.11552338302135468,
0.08061010390520096,
-0.2514556646347046,
-0.07050573825836182,
0.10713057219982147,
0.014967207796871662,
0.6002335548400879,
0.24085107445716858,
0.44805294275283813,
-0.3668547570705414,
-0.3914014399051666,
0.3999987244606018,
-0.21375605463981628,
-0.09240509569644928,
-0.04753363877534866,
0.11881860345602036,
-0.07940395921468735,
0.143473282456398,
-0.34399092197418213,
0.12007758021354675,
-0.3944208025932312,
0.002727852202951908,
-0.3670313060283661,
-0.028549116104841232,
-0.1991790533065796,
-0.1460816115140915,
0.19163982570171356,
-0.18897035717964172,
0.22925004363059998,
0.034902412444353104,
0.21559137105941772,
-0.35065290331840515,
-0.14466819167137146,
-0.20070935785770416,
-0.0925116315484047,
0.15125130116939545,
-0.23038892447948456,
0.06734509766101837,
0.11493296921253204,
-0.008937101811170578,
-0.06501790136098862,
0.113547682762146,
-0.3196829557418823,
-0.4360716938972473,
-0.08363664150238037,
0.2566266357898712,
-0.16637112200260162,
-0.048462823033332825,
-0.36104896664619446,
-0.03411106392741203,
0.1067642793059349,
0.11723622679710388,
-0.007303126156330109,
0.18129666149616241,
-0.03609146922826767,
-0.2754746675491333,
0.031812310218811035,
0.4506447911262512,
-0.05743330717086792,
-0.052613262087106705,
0.20476527512073517,
0.3337065875530243,
0.2020307332277298,
0.29565590620040894,
-0.28512924909591675,
-0.03552311658859253,
-0.32827460765838623,
0.026503130793571472,
-0.006143130362033844,
-0.3777816593647003,
-0.6695235371589661,
0.08528397232294083,
-0.049543485045433044,
0.08444398641586304,
-0.2862742841243744,
0.08778148144483566,
0.12782451510429382,
-0.26991963386535645,
0.05937637388706207,
0.3026883602142334,
-0.1893341839313507,
-0.024798719212412834,
-0.40918833017349243,
-0.4434266984462738,
0.16558127105236053,
-0.02836829423904419,
0.3893025815486908,
0.13988514244556427,
0.3155362606048584,
0.12070738524198532,
0.06286073476076126,
0.12635187804698944,
0.2012787163257599,
0.3416452407836914,
0.5979397892951965,
-0.05523587763309479,
0.05430695787072182,
-0.3379395008087158,
-0.719580888748169,
0.42500391602516174,
-0.01575116068124771,
-0.08796490728855133,
0.004488043487071991,
-0.13298135995864868,
-0.44478753209114075,
-0.03078266605734825,
-0.27025288343429565,
-0.20489813387393951,
0.1337522566318512,
-0.20211151242256165,
0.05593569204211235,
-0.007328163832426071,
-0.26122233271598816,
0.5608721375465393,
0.038438163697719574,
0.09638695418834686,
-0.28323137760162354,
0.3517113924026489,
-0.23787306249141693,
-0.3813544809818268,
-0.08647730946540833,
0.14528439939022064,
0.45413509011268616,
-0.13425031304359436,
-0.2984263598918915,
0.40031108260154724,
-0.02400795742869377,
0.11186515539884567,
0.2073744833469391,
0.05569872260093689,
0.39821723103523254,
0.004250485450029373,
0.1501038372516632,
0.17253530025482178,
-0.036275655031204224,
-0.024358712136745453,
-0.2991260290145874,
0.2580137550830841,
-0.08037365972995758,
-0.09606156498193741,
-0.16258089244365692,
-0.19558891654014587,
0.2256092131137848,
-0.08455464243888855,
0.32893913984298706,
-0.13738498091697693,
0.26984739303588867,
0.09381160140037537,
-0.1880204826593399,
-0.004159795120358467,
-0.05279029160737991,
0.17135334014892578,
0.3499404191970825,
0.1268606185913086,
0.1287238597869873,
-0.008853007107973099,
-0.2459644079208374,
-0.35789117217063904,
0.3018759787082672,
0.09918968379497528,
0.3250690698623657,
-0.10520267486572266,
-0.15740008652210236,
-0.022975774481892586,
-0.1277572214603424,
0.030004192143678665,
-0.04287693649530411,
-0.15038776397705078,
0.09759290516376495,
0.14969494938850403,
0.37837716937065125,
0.07281339913606644,
-0.17977097630500793,
-0.17448759078979492,
0.4063984453678131,
0.49385881423950195,
-0.08938945829868317,
0.006598196923732758,
-0.2560773491859436,
-0.17158743739128113,
0.06929977238178253,
-0.2699139714241028,
-0.3929199278354645,
-0.3710171580314636,
0.0844561904668808,
0.30801844596862793,
-0.11445386707782745,
0.2080329805612564,
-0.17190253734588623,
0.009016215801239014,
0.09086175262928009,
0.03888993710279465,
-0.010740716010332108,
-0.06467749923467636,
-0.11663598567247391,
0.03578227385878563,
0.043913472443819046,
-0.0550699457526207,
0.2838587462902069,
-0.05459267646074295,
-0.14279083907604218,
-0.3794125020503998,
0.014959223568439484,
0.08866198360919952,
0.07354240119457245,
0.1298150271177292,
-0.10328987240791321,
0.019959494471549988,
0.05084892362356186,
0.002350018359720707,
0.40409037470817566,
-0.3739244043827057,
-0.20381349325180054,
0.06240963935852051,
0.23076771199703217,
0.11195789277553558,
-0.0034508854150772095,
-0.0665595605969429,
0.13769923150539398,
-0.40635520219802856,
0.0019291117787361145,
0.21570177376270294,
0.15163742005825043,
0.2376280575990677,
0.03232284262776375,
-0.10515373200178146,
0.2873796224594116,
-0.2722269594669342,
-0.4325392544269562,
-0.3523975610733032,
-0.07211606204509735,
0.078077532351017,
-0.0884842574596405,
0.13566969335079193,
0.2202838808298111,
-0.09642763435840607,
0.3482692837715149,
-0.4038357138633728,
-0.30471688508987427,
-0.2301328331232071,
0.5569338202476501,
-0.013704434037208557,
-0.12478882074356079,
0.3822305202484131,
-0.2066168338060379,
-0.10977760702371597,
0.013232741504907608,
-0.2678053081035614,
-0.028248801827430725,
0.5272274613380432,
0.2151505947113037,
-0.21831351518630981,
0.23681402206420898,
0.006621785461902618,
0.5746926069259644,
0.10427060723304749,
0.006707403808832169,
0.41585999727249146,
0.22611184418201447,
0.2306848168373108,
-0.27055680751800537,
-0.27057453989982605,
0.1650577187538147,
-0.2067113220691681,
-0.2385774850845337,
0.09762166440486908,
0.059525828808546066,
-0.3004146218299866,
0.0037616342306137085,
-0.4665940999984741,
0.06174227595329285,
-0.2343611717224121,
-0.06349349021911621,
-0.25834202766418457,
0.14725276827812195,
0.038145195692777634,
0.01949257403612137,
-0.3618548512458801,
-0.11686306446790695,
0.19070768356323242,
0.0070230960845947266,
0.2024405151605606,
0.09680069237947464,
-0.4553641080856323,
0.11873473227024078,
-0.502921998500824,
0.14027126133441925,
0.017691999673843384,
0.34305480122566223,
0.03275212273001671,
-0.03483891114592552,
-0.1265268176794052,
-0.04768722504377365,
0.3790474534034729,
-0.1774391084909439,
0.18485884368419647,
0.0814741998910904,
-0.058801036328077316,
0.08490319550037384,
-0.2892603874206543,
0.03723561391234398,
0.436837762594223,
0.08465652167797089,
0.6658522486686707,
-0.17118322849273682,
-0.13110759854316711,
0.1304594874382019,
0.1528322547674179,
-0.06968431174755096,
-0.27133771777153015,
-0.07039504498243332,
-0.0071059055626392365,
-0.4155575633049011,
0.0841820240020752,
0.3277968466281891,
0.0078049818985164165,
-0.04856385290622711,
-0.032028909772634506,
-0.17033980786800385,
-0.002963416278362274,
-0.035932451486587524,
-0.21259823441505432,
0.29609566926956177,
-0.10923350602388382,
0.2300223708152771,
-0.11128881573677063,
0.30607885122299194,
0.2900983691215515,
0.3950168192386627,
0.06401213258504868,
-0.19647923111915588,
-0.19760558009147644,
-0.04691381752490997,
-0.051179371774196625,
0.19944456219673157,
0.06681081652641296,
0.20920255780220032,
-0.12051524221897125,
0.0768454298377037,
-0.20403537154197693,
-0.2128511518239975,
-0.0043466463685035706,
0.060676805675029755,
-0.18602371215820312,
-0.0045148879289627075,
0.32685229182243347,
-0.041651755571365356,
0.04364381730556488,
0.22394445538520813,
0.01852300763130188,
-0.19419577717781067,
0.29296356439590454,
-0.01536625623703003,
0.9304012656211853,
-0.03294967859983444,
0.04244812950491905,
-0.1740947663784027,
0.11750242114067078,
0.5067224502563477,
-0.17039097845554352,
0.2691488265991211,
-0.20559290051460266,
-0.3376927077770233,
0.03820301592350006,
-0.019945286214351654,
-0.0947016105055809,
-0.2055288404226303,
-0.20766688883304596,
0.4890320301055908,
-0.3555358648300171,
0.7112212777137756,
-0.12004916369915009,
-0.10751321911811829,
-0.039103955030441284,
0.11125031113624573,
-0.058780305087566376,
0.22542232275009155,
-0.11508800089359283,
0.2668968737125397,
-0.26790159940719604,
0.05895647406578064,
-0.06430493295192719,
0.18723179399967194,
-0.3155428171157837,
0.05498974025249481,
0.09253997355699539,
0.2788305878639221,
0.029537012800574303,
-0.42552584409713745,
-0.22847285866737366,
-0.14956071972846985,
0.4388542175292969,
0.012469468638300896,
-0.15246501564979553,
-0.007443618029356003,
0.1865248680114746,
0.04604921489953995,
0.017853915691375732,
-0.07288219034671783,
0.1870216727256775,
-0.11950363963842392,
-0.3124549090862274,
0.052778590470552444,
-0.10500642657279968,
-0.43621891736984253,
-0.23787885904312134,
0.06745758652687073,
0.05190929025411606,
-0.28308188915252686,
-0.07723504304885864,
0.03350040316581726,
-0.10310141742229462,
-0.32429376244544983,
0.16393522918224335,
0.3593035936355591,
-0.11404526233673096,
0.0761183574795723,
-0.057533200830221176,
-0.13635972142219543,
-0.19145633280277252,
0.06311329454183578,
0.23662647604942322,
-0.2130584716796875,
0.24509193003177643,
0.096689373254776,
-0.16052314639091492,
-0.12106625735759735,
-0.360736608505249,
0.040692295879125595,
-0.6202524900436401,
0.16422095894813538,
-0.5601291656494141,
-0.1300727128982544,
0.09108825773000717,
0.1578751802444458,
0.04784547910094261,
0.10213896632194519,
0.04893055185675621,
-0.27836185693740845,
-0.3725813329219818,
-0.12142482399940491,
-0.06956155598163605,
0.18345394730567932,
-0.1664305031299591,
-0.19780978560447693,
-0.026482367888092995,
0.18105173110961914,
-0.34804728627204895,
0.11048782616853714,
-0.4033071994781494,
0.24558377265930176,
-0.2532798647880554,
-0.19388270378112793,
-0.07265403121709824,
-0.20240576565265656,
0.06536872684955597,
0.08121546357870102,
-0.001540226861834526,
-0.20223850011825562,
-0.05678603798151016,
0.09328624606132507,
0.04045919328927994,
-0.14777475595474243,
-0.2965778410434723,
-0.24093322455883026,
0.19980043172836304,
-0.18770460784435272,
0.3681755065917969,
0.4787919521331787,
0.13187691569328308,
0.11920323967933655,
0.6195166707038879,
-0.020548418164253235,
-0.028420891612768173,
0.30600669980049133,
0.1966574490070343,
0.13871052861213684,
-0.16452184319496155,
0.11780104041099548,
-0.006289632059633732,
-0.037220798432826996,
-0.18937917053699493,
0.03469880670309067,
-0.138734832406044,
0.37195074558258057,
0.23806282877922058,
-0.418601393699646,
-0.09286265075206757,
0.29311761260032654,
0.19649392366409302,
0.04498179256916046,
-0.017367534339427948,
-0.20849597454071045,
0.379740834236145,
0.36243441700935364,
-0.26781123876571655,
-0.34745198488235474,
0.6602831482887268,
0.0958656594157219,
0.01420171931385994,
0.08018641173839569,
0.3092179298400879,
-0.027835708111524582,
0.08178476989269257,
0.3088727593421936,
0.5972244143486023,
-0.1624562293291092,
-0.02055373229086399,
0.16060157120227814,
0.15412123501300812,
0.040684089064598083,
0.21551081538200378,
0.13159440457820892,
0.13020645081996918,
0.46188414096832275,
0.2286437749862671,
0.07205764949321747,
0.6366705298423767,
0.18975454568862915,
0.06371350586414337,
-0.17573463916778564,
-0.1664763242006302,
0.23017503321170807,
-0.19794785976409912,
0.15779760479927063,
0.011707291007041931,
0.10599859803915024,
-0.05792207643389702,
-0.03828274458646774,
-0.14555171132087708,
0.08584178239107132,
-0.45418310165405273,
0.09467871487140656,
0.11393596231937408,
-0.1165725514292717,
0.08741539716720581,
0.0354963056743145,
-0.30093660950660706,
0.02050754427909851,
0.3057684898376465,
-0.028445273637771606,
-0.13864906132221222,
-0.0850367397069931,
0.2861177325248718,
0.2761324346065521,
0.29826992750167847,
-0.1693340539932251,
0.12315724045038223,
0.08801325410604477,
-0.3289455473423004,
-0.12693634629249573,
0.19921278953552246,
0.2436145395040512,
0.05563309043645859,
-0.18970680236816406,
0.19013884663581848,
0.3602035641670227,
0.10506144165992737,
-0.05825335904955864,
0.06257805228233337,
-0.059543535113334656,
0.001863863319158554,
-0.14976713061332703,
0.08409905433654785,
-0.15780149400234222,
0.22132088243961334,
-0.07270713150501251,
0.009869500994682312,
-0.29550206661224365,
0.23262351751327515,
-0.22637566924095154,
-0.3460477292537689,
-0.14911527931690216,
0.25644636154174805,
0.008220329880714417,
0.043733593076467514,
0.4609363079071045,
-0.013876557350158691,
0.31874191761016846,
0.13138313591480255,
0.14513148367404938,
-0.44838210940361023,
0.24346092343330383,
0.6664620041847229,
-0.13628259301185608,
-0.24560564756393433,
-0.030520904809236526,
-0.34918537735939026,
0.601473331451416,
-0.38856300711631775,
0.057895198464393616,
0.3976775109767914,
0.2897806167602539,
-0.23745429515838623,
-0.06566569954156876,
0.0671447291970253,
0.19655238091945648,
0.0581938698887825,
0.17226161062717438,
-0.5798106789588928,
-0.12870125472545624,
-0.026993319392204285,
-0.19410675764083862,
0.192731112241745,
-0.3601105511188507,
0.321682870388031,
0.18371251225471497,
0.15082120895385742,
-0.14855098724365234,
-0.09524665027856827,
0.23330453038215637,
0.07993336766958237,
0.18363726139068604,
0.039225876331329346,
-0.14645308256149292,
0.32867100834846497,
-0.255208283662796,
-0.28483378887176514,
-0.04080856591463089,
-0.0774463340640068,
-0.3160022795200348,
-0.07573653757572174,
0.1544494330883026,
-0.1581646203994751,
0.21235477924346924,
-0.17156696319580078,
0.47496703267097473,
0.1506689339876175,
-0.1352960169315338,
-0.10411664843559265,
-0.09472866356372833,
-0.12217913568019867,
-0.13405390083789825,
0.19453661143779755,
0.33444058895111084,
-0.05090930312871933,
0.20980527997016907,
-0.28220701217651367,
-0.19431820511817932,
0.35331064462661743,
-0.10386854410171509,
-0.3994904160499573,
-0.26030662655830383,
0.19085362553596497,
0.35880088806152344,
-0.3035012185573578,
-0.28535324335098267,
0.09210877865552902,
0.2503550946712494,
0.12147966772317886,
-0.336620569229126,
0.05839921161532402,
-0.19068780541419983,
0.10306032001972198,
0.24271738529205322,
0.23950175940990448,
0.12051069736480713,
0.0302067082375288,
0.27637115120887756,
0.08966486155986786
] |
https://github.com/huggingface/datasets/issues/6376
|
Caching problem when deleting a dataset
|
I haven't managed to reproduce this issue using a [notebook](https://colab.research.google.com/drive/1m6eduYun7pFTkigrCJAFgw0BghlbvXIL?usp=sharing) that follows the steps to reproduce the bug. So, I'm closing it.
But feel free to re-open it if you have a better reproducer.
|
### Describe the bug
Pushing a dataset with n + m features to a repo which was deleted, but contained n features, will fail.
### Steps to reproduce the bug
1. Create a dataset with n features per row
2. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)`
3. Go on the hub, delete the repo at `YOUR_PATH`
4. Update your local dataset to have n + m features per row
5. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` will fail because of a mismatch in features number
### Expected behavior
Step 5 should work or display a message to indicate the cache has not been cleared
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-5.15.0-88-generic-x86_64-with-glibc2.31
- Python version: 3.10.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 11.0.0
- Pandas version: 2.0.0
| 34
|
Caching problem when deleting a dataset
### Describe the bug
Pushing a dataset with n + m features to a repo which was deleted, but contained n features, will fail.
### Steps to reproduce the bug
1. Create a dataset with n features per row
2. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)`
3. Go on the hub, delete the repo at `YOUR_PATH`
4. Update your local dataset to have n + m features per row
5. `dataset.push_to_hub(YOUR_PATH, SPLIT, token=TOKEN)` will fail because of a mismatch in features number
### Expected behavior
Step 5 should work or display a message to indicate the cache has not been cleared
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-5.15.0-88-generic-x86_64-with-glibc2.31
- Python version: 3.10.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 11.0.0
- Pandas version: 2.0.0
I haven't managed to reproduce this issue using a [notebook](https://colab.research.google.com/drive/1m6eduYun7pFTkigrCJAFgw0BghlbvXIL?usp=sharing) that follows the steps to reproduce the bug. So, I'm closing it.
But feel free to re-open it if you have a better reproducer.
|
[
-0.09146806597709656,
-0.13599276542663574,
-0.007731502875685692,
0.34520483016967773,
-0.07417577505111694,
-0.020083677023649216,
0.3198855519294739,
0.2709158957004547,
0.19415223598480225,
-0.04379042983055115,
0.20972491800785065,
0.16039232909679413,
-0.0297585129737854,
0.13909770548343658,
-0.10164622962474823,
-0.0017161406576633453,
0.33104076981544495,
-0.09687207639217377,
0.2520807087421417,
-0.060318756848573685,
-0.25858283042907715,
0.061880506575107574,
-0.16355526447296143,
-0.16108514368534088,
-0.2623395025730133,
0.06837442517280579,
-0.06606444716453552,
0.2350550889968872,
0.2744446396827698,
-0.32571205496788025,
0.34665733575820923,
-0.006621435284614563,
0.007988044992089272,
0.5829521417617798,
-0.0001123216497944668,
-0.15662577748298645,
0.3057814836502075,
0.10050840675830841,
-0.4529860317707062,
0.09280616790056229,
-0.35029229521751404,
-0.2505686581134796,
-0.11397956311702728,
-0.17071115970611572,
0.2256336808204651,
0.28089645504951477,
-0.18829095363616943,
-0.11770584434270859,
0.23916926980018616,
0.2736729681491852,
0.24010111391544342,
0.1252783238887787,
0.1975247710943222,
-0.09705493599176407,
0.43533560633659363,
0.1451740264892578,
-0.255359947681427,
0.023749008774757385,
0.33429133892059326,
-0.008763954043388367,
-0.08589638024568558,
0.3008916974067688,
-0.15603876113891602,
0.00349445641040802,
0.22999659180641174,
-0.11350096017122269,
-0.0021772831678390503,
-0.015063673257827759,
0.21184003353118896,
0.029667535796761513,
0.40569788217544556,
-0.38940244913101196,
-0.21945573389530182,
-0.26471617817878723,
-0.21761207282543182,
-0.5482582449913025,
0.35471466183662415,
0.037723854184150696,
-0.012385246343910694,
0.17039144039154053,
-0.28949519991874695,
-0.3099994659423828,
-0.04945564642548561,
-0.1136644035577774,
0.1062229722738266,
-0.11921416223049164,
0.003938071895390749,
0.0656169056892395,
-0.20771978795528412,
-0.14945100247859955,
0.22773338854312897,
-0.15927495062351227,
-0.0027333013713359833,
0.16249755024909973,
-0.48256802558898926,
-0.055208127945661545,
0.19165977835655212,
-0.05090927332639694,
0.45787978172302246,
0.17744696140289307,
-0.07675224542617798,
-0.1108623668551445,
-0.15932980179786682,
0.08367085456848145,
0.3444712460041046,
0.6761155128479004,
-0.10324639827013016,
0.16262929141521454,
0.09969955682754517,
0.0986524224281311,
-0.23684929311275482,
-0.019450556486845016,
0.10523524880409241,
-0.04632606729865074,
0.629951000213623,
0.19559887051582336,
0.38794541358947754,
-0.3887099325656891,
-0.4388744831085205,
0.47568485140800476,
-0.2682151198387146,
-0.05990786850452423,
-0.059234362095594406,
0.06313508003950119,
-0.11206948012113571,
0.1474352478981018,
-0.2899879217147827,
0.13385248184204102,
-0.4334293603897095,
-0.05174858123064041,
-0.33226561546325684,
-0.02570880576968193,
-0.25947651267051697,
-0.12829282879829407,
0.17067034542560577,
-0.15634743869304657,
0.1449895203113556,
0.1304127722978592,
0.18760079145431519,
-0.355434775352478,
-0.14753718674182892,
-0.15687969326972961,
-0.06256016343832016,
0.1544215977191925,
-0.22361688315868378,
0.07494482398033142,
0.11722727119922638,
-0.0036050118505954742,
-0.06450583040714264,
0.12543487548828125,
-0.27076345682144165,
-0.3894788920879364,
-0.12932932376861572,
0.20735453069210052,
-0.25983133912086487,
-0.028509818017482758,
-0.3495596647262573,
-0.043082345277071,
0.10797880589962006,
0.0569455586373806,
-0.015128366649150848,
0.17252016067504883,
-0.05005902796983719,
-0.298091322183609,
-0.021262379363179207,
0.4977691173553467,
-0.04189961031079292,
-0.012237302958965302,
0.23844657838344574,
0.41054606437683105,
0.2351524829864502,
0.26394420862197876,
-0.24424207210540771,
-0.1116136685013771,
-0.3302083909511566,
0.0539168119430542,
-0.09005887061357498,
-0.3037058115005493,
-0.6939463019371033,
0.12178131937980652,
-0.052280232310295105,
0.16500025987625122,
-0.30767789483070374,
0.09519895166158676,
0.08311130106449127,
-0.3226865231990814,
0.07251578569412231,
0.2767496705055237,
-0.17489077150821686,
-0.07237624377012253,
-0.4491134285926819,
-0.4542440176010132,
0.14108382165431976,
-0.02290455624461174,
0.3363882303237915,
0.15166877210140228,
0.30791884660720825,
0.1021055057644844,
0.04484863579273224,
0.14865614473819733,
0.1754990965127945,
0.3544163703918457,
0.599821150302887,
-0.052350446581840515,
0.048105813562870026,
-0.28114646673202515,
-0.6829700469970703,
0.44713011384010315,
0.02854645997285843,
-0.1419052928686142,
-0.02074870467185974,
-0.1205194890499115,
-0.4270971715450287,
-0.011547408066689968,
-0.2746756076812744,
-0.2295767068862915,
0.07500728964805603,
-0.22682705521583557,
0.017384346574544907,
0.042241115123033524,
-0.2503199577331543,
0.6059041619300842,
-0.007236864417791367,
0.0363469161093235,
-0.3439549505710602,
0.31656935811042786,
-0.2102993130683899,
-0.31752437353134155,
-0.10603077709674835,
0.13707415759563446,
0.39233529567718506,
-0.0824451819062233,
-0.30883532762527466,
0.39028099179267883,
-0.027063390240073204,
0.08351616561412811,
0.18937182426452637,
0.10353851318359375,
0.38044214248657227,
0.002405758947134018,
0.12080701440572739,
0.21815913915634155,
-0.057919032871723175,
0.014742128551006317,
-0.3167133927345276,
0.23368053138256073,
-0.07583394646644592,
-0.10798563808202744,
-0.19262893497943878,
-0.16140824556350708,
0.24820929765701294,
-0.08507352322340012,
0.29843926429748535,
-0.11085203289985657,
0.307955801486969,
0.08950819075107574,
-0.15238891541957855,
0.042521484196186066,
-0.07452838867902756,
0.17925116419792175,
0.32730379700660706,
0.10841178894042969,
0.13202440738677979,
0.054148681461811066,
-0.24981588125228882,
-0.3780515789985657,
0.2894626557826996,
0.14581595361232758,
0.33854031562805176,
-0.14212800562381744,
-0.18310554325580597,
0.016800574958324432,
-0.1370585560798645,
0.03825996443629265,
-0.052261002361774445,
-0.1176811158657074,
0.09414289146661758,
0.18834233283996582,
0.3645530045032501,
0.08289133757352829,
-0.13111647963523865,
-0.16305987536907196,
0.43344900012016296,
0.4396990239620209,
-0.10544033348560333,
0.060726843774318695,
-0.2167278379201889,
-0.16520023345947266,
0.04203582555055618,
-0.22743411362171173,
-0.3732790946960449,
-0.347903311252594,
0.0941997617483139,
0.32961493730545044,
-0.1244303435087204,
0.18018805980682373,
-0.19606396555900574,
0.0673607736825943,
0.053587935864925385,
-0.012409834191203117,
0.05949244648218155,
-0.0229894258081913,
-0.13531991839408875,
-0.0207374170422554,
0.08750556409358978,
-0.07064731419086456,
0.2564271092414856,
-0.11054729670286179,
-0.1637181043624878,
-0.40006402134895325,
-0.012907247990369797,
0.11122727394104004,
0.09650356322526932,
0.16649696230888367,
-0.09172463417053223,
-0.0013989359140396118,
0.020639393478631973,
0.004349902272224426,
0.3816703259944916,
-0.3885131776332855,
-0.19908972084522247,
0.1273483783006668,
0.25551846623420715,
0.10308078676462173,
0.007162880152463913,
-0.06195291131734848,
0.20786505937576294,
-0.4203040897846222,
-0.0013208910822868347,
0.10711167752742767,
0.11626048386096954,
0.3159458041191101,
0.03903096169233322,
-0.12733131647109985,
0.27933821082115173,
-0.2898585796356201,
-0.43347421288490295,
-0.33449921011924744,
-0.09675423800945282,
0.07986917346715927,
-0.08006592094898224,
0.12107722461223602,
0.21370108425617218,
-0.12467411160469055,
0.39561980962753296,
-0.44760656356811523,
-0.2596920430660248,
-0.1897864192724228,
0.5117453932762146,
-0.06954700499773026,
-0.15192851424217224,
0.33454811573028564,
-0.22137323021888733,
-0.07363839447498322,
-0.010608859360218048,
-0.28672513365745544,
-0.006510592997074127,
0.5078837871551514,
0.21877916157245636,
-0.1607615351676941,
0.24338692426681519,
0.03108232095837593,
0.5920208692550659,
0.1873243898153305,
-0.002261567860841751,
0.39147478342056274,
0.2501905560493469,
0.23597848415374756,
-0.24260571599006653,
-0.25410231947898865,
0.14538860321044922,
-0.24489238858222961,
-0.274855375289917,
0.16781029105186462,
0.04158319532871246,
-0.3360247313976288,
-0.005775287747383118,
-0.5066652297973633,
0.049509525299072266,
-0.23946847021579742,
-0.03327472507953644,
-0.22573056817054749,
0.20598658919334412,
0.06020648404955864,
-0.012390024960041046,
-0.3586518168449402,
-0.15203732252120972,
0.17464865744113922,
0.009874477982521057,
0.24244675040245056,
0.13562165200710297,
-0.3785756826400757,
0.12318627536296844,
-0.4891575574874878,
0.15860843658447266,
0.04915656894445419,
0.4056725800037384,
0.007095020264387131,
-0.05668071657419205,
-0.11497542262077332,
-0.019919607788324356,
0.3739089369773865,
-0.159970223903656,
0.22911396622657776,
0.09416571259498596,
-0.06288659572601318,
0.052233077585697174,
-0.3161454200744629,
0.07708057761192322,
0.44339433312416077,
0.096411794424057,
0.6581610441207886,
-0.141150563955307,
-0.08521277457475662,
0.097234345972538,
0.20576371252536774,
-0.030233686789870262,
-0.3161613941192627,
-0.07787368446588516,
0.029108352959156036,
-0.3727587163448334,
0.07393127679824829,
0.4100784659385681,
0.012369764968752861,
-0.04341695457696915,
0.014906954020261765,
-0.1256958693265915,
-0.0034759659320116043,
-0.035462647676467896,
-0.18227055668830872,
0.2936922013759613,
-0.10488631576299667,
0.26149484515190125,
-0.11375443637371063,
0.25623923540115356,
0.3059769868850708,
0.41878730058670044,
0.08416403830051422,
-0.21289071440696716,
-0.11367275565862656,
-0.03802453726530075,
-0.07845581322908401,
0.22691988945007324,
0.016258880496025085,
0.14591141045093536,
-0.11025634407997131,
0.020988155156373978,
-0.18065303564071655,
-0.26973262429237366,
-0.013324979692697525,
0.11012101918458939,
-0.20524996519088745,
-0.009784836322069168,
0.35384809970855713,
-0.03514588624238968,
0.03259178251028061,
0.2805439829826355,
0.009535014629364014,
-0.15664859116077423,
0.30633437633514404,
-0.029447533190250397,
0.9685134887695312,
-0.003127366304397583,
0.09292614459991455,
-0.23299545049667358,
0.08305557072162628,
0.4915783405303955,
-0.1597253978252411,
0.29509955644607544,
-0.2240569293498993,
-0.35645100474357605,
0.06004250794649124,
-0.045959487557411194,
-0.10148537904024124,
-0.18578201532363892,
-0.19741937518119812,
0.4617690443992615,
-0.4127393364906311,
0.70554518699646,
-0.05641978979110718,
-0.12641620635986328,
-0.05689159035682678,
0.14145897328853607,
-0.06870776414871216,
0.18768061697483063,
-0.0839126706123352,
0.2565939426422119,
-0.27322155237197876,
0.05322331190109253,
-0.10319720208644867,
0.24039997160434723,
-0.36028867959976196,
0.08725699782371521,
0.07287352532148361,
0.2519337832927704,
0.02859675884246826,
-0.4153459072113037,
-0.12032787501811981,
-0.1590224653482437,
0.4328778386116028,
-0.020357880741357803,
-0.15972575545310974,
-0.011267494410276413,
0.2170439064502716,
0.042510002851486206,
0.08004576712846756,
-0.07713032513856888,
0.22598670423030853,
-0.1180797815322876,
-0.22802004218101501,
0.017934929579496384,
-0.08375529199838638,
-0.41629558801651,
-0.27632206678390503,
0.08288929611444473,
0.023053646087646484,
-0.3006160855293274,
-0.11748254299163818,
0.006478816270828247,
-0.06429043412208557,
-0.32617077231407166,
0.13504943251609802,
0.32501840591430664,
-0.10091162472963333,
0.06200554221868515,
-0.1582847386598587,
-0.18408823013305664,
-0.1706279069185257,
0.03665150701999664,
0.22167128324508667,
-0.1830521821975708,
0.2294384241104126,
0.1340651959180832,
-0.13389132916927338,
-0.08142364025115967,
-0.3842446208000183,
0.05628131330013275,
-0.6646987199783325,
0.18152253329753876,
-0.6276937127113342,
-0.1317313313484192,
0.08183339238166809,
0.20563717186450958,
0.09466664493083954,
0.08450649678707123,
0.08049111068248749,
-0.28506672382354736,
-0.27304762601852417,
-0.16222475469112396,
-0.08552174270153046,
0.1663060337305069,
-0.17584487795829773,
-0.17311939597129822,
-0.005059804767370224,
0.13130240142345428,
-0.31395313143730164,
0.08933892101049423,
-0.3808589279651642,
0.17406970262527466,
-0.22575432062149048,
-0.17406311631202698,
-0.10731547325849533,
-0.2369346022605896,
0.022525543347001076,
0.09027691185474396,
-0.019008871167898178,
-0.1616063117980957,
-0.07499410212039948,
0.11167310178279877,
0.016193756833672523,
-0.12444981187582016,
-0.24582207202911377,
-0.27354246377944946,
0.17660054564476013,
-0.1543911099433899,
0.34648001194000244,
0.5136072039604187,
0.15604044497013092,
0.061108265072107315,
0.5404983162879944,
-0.006012804806232452,
-0.0654718205332756,
0.3340942859649658,
0.19120462238788605,
0.163035050034523,
-0.17701023817062378,
0.12075503915548325,
0.02603888139128685,
-0.021501075476408005,
-0.23448118567466736,
0.046126898378133774,
-0.2033063918352127,
0.3450925648212433,
0.21333330869674683,
-0.4685133695602417,
-0.012359920889139175,
0.3063739836215973,
0.194337397813797,
0.08085662871599197,
-0.050622496753931046,
-0.2507820427417755,
0.3994058072566986,
0.32361745834350586,
-0.2779040038585663,
-0.34739190340042114,
0.6426143646240234,
0.07532906532287598,
-0.032607778906822205,
0.06577665358781815,
0.3800615668296814,
-0.05573824793100357,
0.07150565832853317,
0.33494919538497925,
0.5909972190856934,
-0.16025567054748535,
-0.006107189692556858,
0.19052602350711823,
0.1775888055562973,
0.07212091982364655,
0.2175246775150299,
0.1602039784193039,
0.13996797800064087,
0.4446106553077698,
0.22201180458068848,
0.008169934153556824,
0.6735287308692932,
0.1960494965314865,
0.02314596250653267,
-0.17798075079917908,
-0.17270806431770325,
0.27121680974960327,
-0.19375434517860413,
0.2178749144077301,
-0.005998730659484863,
0.15982693433761597,
-0.09637805819511414,
-0.01370486244559288,
-0.1345156580209732,
0.08447881042957306,
-0.4461257755756378,
0.14895600080490112,
0.17065982520580292,
-0.11007393151521683,
0.05295675992965698,
0.028458815068006516,
-0.3311668634414673,
0.03283216059207916,
0.3794749975204468,
0.0004145205020904541,
-0.15209931135177612,
-0.10324160009622574,
0.2421124279499054,
0.2910899817943573,
0.3016250431537628,
-0.19657358527183533,
0.09656819701194763,
0.07090599834918976,
-0.3371845483779907,
-0.10462264716625214,
0.20187602937221527,
0.2850457429885864,
0.020949501544237137,
-0.18373152613639832,
0.16104504466056824,
0.33779793977737427,
0.18053853511810303,
-0.037217725068330765,
0.08182846009731293,
-0.02951870858669281,
-0.030823279172182083,
-0.16346421837806702,
0.020805036649107933,
-0.12404646724462509,
0.1985836923122406,
-0.06632204353809357,
0.03675320744514465,
-0.3396768867969513,
0.18712520599365234,
-0.2977654039859772,
-0.29637765884399414,
-0.1456221491098404,
0.28923362493515015,
-0.029116660356521606,
0.049294862896203995,
0.45650026202201843,
-0.014360195957124233,
0.3035030663013458,
0.17274338006973267,
0.13842423260211945,
-0.4895946681499481,
0.232242614030838,
0.6303326487541199,
-0.15740817785263062,
-0.255034863948822,
-0.05699215456843376,
-0.3975180387496948,
0.651332676410675,
-0.3953028619289398,
0.05572621524333954,
0.46733027696609497,
0.26446816325187683,
-0.25514763593673706,
-0.09370426833629608,
0.0046992674469947815,
0.21769201755523682,
-0.008189224638044834,
0.21649391949176788,
-0.5698689818382263,
-0.16284511983394623,
-0.03442615270614624,
-0.2192070186138153,
0.17287994921207428,
-0.3401222825050354,
0.3433336913585663,
0.18792472779750824,
0.13281986117362976,
-0.11005741357803345,
-0.13535672426223755,
0.2676074504852295,
0.09269523620605469,
0.19122019410133362,
0.06536442786455154,
-0.15144076943397522,
0.33169734477996826,
-0.3051835596561432,
-0.2544677257537842,
-0.03181109577417374,
-0.10928617417812347,
-0.29306477308273315,
-0.05893811210989952,
0.11459419131278992,
-0.1917957216501236,
0.24971336126327515,
-0.13223665952682495,
0.45043715834617615,
0.17068323493003845,
-0.1308441013097763,
-0.15283720195293427,
-0.09040273725986481,
-0.10519123077392578,
-0.04378530755639076,
0.20724214613437653,
0.39093783497810364,
-0.10553719103336334,
0.24748049676418304,
-0.30180835723876953,
-0.2256353497505188,
0.3824120759963989,
-0.18747834861278534,
-0.44198471307754517,
-0.2138485610485077,
0.2155032455921173,
0.3572586476802826,
-0.3098287880420685,
-0.28763043880462646,
0.061296217143535614,
0.20804084837436676,
0.15644171833992004,
-0.336433470249176,
0.07541343569755554,
-0.2539987564086914,
0.11169873178005219,
0.2942390739917755,
0.28434401750564575,
0.1426096260547638,
-0.00314544141292572,
0.3445822298526764,
0.11135075986385345
] |
https://github.com/huggingface/datasets/issues/6371
|
`Dataset.from_generator` should not try to download from HF GCS
|
Indeed, setting `try_from_gcs` to `False` makes sense for `from_generator`.
We plan to deprecate and remove `try_from_hf_gcs` soon, as we can use Hub for file hosting now, but this is a good temporary fix.
|
### Describe the bug
When using [`Dataset.from_generator`](https://github.com/huggingface/datasets/blob/c9c1166e1cf81d38534020f9c167b326585339e5/src/datasets/arrow_dataset.py#L1072) with `streaming=False`, the internal logic will call [`download_and_prepare`](https://github.com/huggingface/datasets/blob/main/src/datasets/io/generator.py#L47) which will attempt to download from HF GCS which is redundant, because user has already provided the generator from which the data should be drawn.
If someone attempts to call `Dataset.from_generator` from an environment that doesn't have external internet access (for example internal production machine) and doesn't set `HF_DATASETS_OFFLINE=1`, this will result in process being stuck at building connection.
### Steps to reproduce the bug
```python
import datasets
def gen():
for _ in range(100):
yield {"text": "dummy text"}
dataset = datasets.Dataset.from_generator(gen)
```
A minimum example executed on any environment that doesn't have access to HF GCS can result in the error
### Expected behavior
`try_from_hf_gcs` should be set to False here https://github.com/huggingface/datasets/blob/c9c1166e1cf81d38534020f9c167b326585339e5/src/datasets/io/generator.py#L51
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-3.10.0-1160.90.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.10.12
- Huggingface_hub version: 0.17.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.3
| 33
|
`Dataset.from_generator` should not try to download from HF GCS
### Describe the bug
When using [`Dataset.from_generator`](https://github.com/huggingface/datasets/blob/c9c1166e1cf81d38534020f9c167b326585339e5/src/datasets/arrow_dataset.py#L1072) with `streaming=False`, the internal logic will call [`download_and_prepare`](https://github.com/huggingface/datasets/blob/main/src/datasets/io/generator.py#L47) which will attempt to download from HF GCS which is redundant, because user has already provided the generator from which the data should be drawn.
If someone attempts to call `Dataset.from_generator` from an environment that doesn't have external internet access (for example internal production machine) and doesn't set `HF_DATASETS_OFFLINE=1`, this will result in process being stuck at building connection.
### Steps to reproduce the bug
```python
import datasets
def gen():
for _ in range(100):
yield {"text": "dummy text"}
dataset = datasets.Dataset.from_generator(gen)
```
A minimum example executed on any environment that doesn't have access to HF GCS can result in the error
### Expected behavior
`try_from_hf_gcs` should be set to False here https://github.com/huggingface/datasets/blob/c9c1166e1cf81d38534020f9c167b326585339e5/src/datasets/io/generator.py#L51
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-3.10.0-1160.90.1.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.10.12
- Huggingface_hub version: 0.17.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.3
Indeed, setting `try_from_gcs` to `False` makes sense for `from_generator`.
We plan to deprecate and remove `try_from_hf_gcs` soon, as we can use Hub for file hosting now, but this is a good temporary fix.
|
[
-0.2489262819290161,
-0.3623087704181671,
0.012908432632684708,
0.22330991923809052,
0.23133699595928192,
-0.1925211250782013,
0.11532324552536011,
0.0788823589682579,
0.08868762850761414,
0.2864634096622467,
0.08888959884643555,
0.050307635217905045,
0.14478154480457306,
-0.04127001762390137,
0.029160063713788986,
-0.116228386759758,
0.016507022082805634,
0.13109233975410461,
-0.38144156336784363,
-0.09796677529811859,
-0.1694243848323822,
0.21051818132400513,
-0.015294700860977173,
0.1751542091369629,
-0.1805078685283661,
-0.14485715329647064,
0.22941157221794128,
0.2884562015533447,
-0.15441179275512695,
-0.20642930269241333,
0.09873712807893753,
0.22029685974121094,
-0.10105261951684952,
0.37709659337997437,
-0.00010979679063893855,
-0.017867542803287506,
0.2701537609100342,
0.012226054444909096,
-0.3913932740688324,
-0.33023375272750854,
-0.01003565639257431,
0.016407441347837448,
0.027190783992409706,
-0.07714807987213135,
-0.1325741559267044,
-0.07473605126142502,
-0.0349273607134819,
-0.35859185457229614,
0.46818506717681885,
0.14771729707717896,
0.25600728392601013,
0.6069954633712769,
0.00881287083029747,
-0.2980215549468994,
0.1419675052165985,
0.02154211699962616,
-0.14350026845932007,
0.3053862750530243,
-0.017523430287837982,
0.09608126431703568,
0.07254389673471451,
0.47960129380226135,
-0.30628588795661926,
-0.06877036392688751,
0.5111348032951355,
-0.06145764887332916,
-0.30651816725730896,
-0.3042963743209839,
0.16116657853126526,
0.33731070160865784,
0.24005907773971558,
-0.29078444838523865,
-0.25018009543418884,
-0.2733742594718933,
0.00950564444065094,
-0.21811169385910034,
0.35871872305870056,
0.21180202066898346,
-0.510589063167572,
0.2355518937110901,
-0.14950288832187653,
-0.32554560899734497,
-0.1925969421863556,
-0.12350627779960632,
0.22328400611877441,
-0.06907308101654053,
-0.1500582993030548,
0.10820123553276062,
0.1453385353088379,
0.3481890559196472,
-0.026912052184343338,
-0.4789290428161621,
-0.19448751211166382,
0.08657404035329819,
-0.24385608732700348,
0.06415345519781113,
0.2801612615585327,
0.12465794384479523,
0.18451347947120667,
0.04190557450056076,
-0.12382407486438751,
0.014867633581161499,
0.03497864678502083,
0.1148345023393631,
0.005407541990280151,
0.07490324974060059,
-0.05098303407430649,
-0.08490575104951859,
0.3186088800430298,
0.5004299879074097,
-0.035044677555561066,
-0.1948389708995819,
0.1568659394979477,
-0.2809911072254181,
-0.05693766847252846,
-0.004230553284287453,
0.19127009809017181,
-0.026320617645978928,
-0.34083282947540283,
0.23478230834007263,
0.06339966505765915,
0.17048095166683197,
0.1821141093969345,
0.4702927768230438,
-0.06772080063819885,
0.1452791839838028,
0.10266248881816864,
0.14909407496452332,
-0.22723789513111115,
-0.38466307520866394,
-0.2964438796043396,
-0.24555568397045135,
-0.12101750075817108,
0.25726333260536194,
-0.07764717936515808,
-0.29159265756607056,
0.2558044195175171,
0.24878017604351044,
0.16547608375549316,
-0.0893857479095459,
-0.011829698458313942,
-0.12421736121177673,
0.13387304544448853,
0.336403489112854,
-0.07371959090232849,
0.11264432221651077,
0.4128514528274536,
-0.06223888322710991,
-0.03670397773385048,
-0.13517838716506958,
-0.05245852470397949,
-0.44697126746177673,
-0.09708680212497711,
0.22548362612724304,
0.04745134711265564,
0.1864534467458725,
-0.10476773232221603,
0.01226864941418171,
-0.026359044015407562,
0.0770738273859024,
0.27753201127052307,
0.09492424130439758,
-0.1814091056585312,
-0.1864989995956421,
0.20623497664928436,
0.6922982931137085,
-0.12394639849662781,
-0.07178514450788498,
-0.007442602887749672,
-0.07714815437793732,
0.2804732620716095,
0.18564997613430023,
-0.36048299074172974,
0.09806540608406067,
-0.2958899736404419,
-0.29865503311157227,
0.28842803835868835,
-0.1530108004808426,
-0.3482232987880707,
0.6089655160903931,
-0.32648414373397827,
0.1938779056072235,
0.3147026002407074,
0.0017550195334479213,
-0.015020811930298805,
-0.018642958253622055,
0.09386144578456879,
0.18079908192157745,
0.07219097763299942,
0.13812489807605743,
-0.3252987265586853,
-0.33601346611976624,
-0.25416791439056396,
-0.08939933776855469,
0.040162041783332825,
0.2934318780899048,
0.0008972883224487305,
-0.3192455470561981,
0.42438170313835144,
-0.20410773158073425,
0.018508898094296455,
0.20272420346736908,
0.3122889995574951,
0.09153816103935242,
-0.16500712931156158,
0.1228727176785469,
-0.5268763899803162,
0.20461836457252502,
-0.2624017596244812,
0.07391902059316635,
-0.39656251668930054,
-0.367600679397583,
-0.20842376351356506,
0.10136854648590088,
-0.20111243426799774,
-0.0990733802318573,
0.05444943904876709,
0.10745574533939362,
0.12193553149700165,
-0.02885279804468155,
-0.16402027010917664,
0.560065746307373,
-0.27325576543807983,
0.2516837418079376,
-0.2942117750644684,
0.32464736700057983,
-0.04585312306880951,
0.015182718634605408,
-0.04765871912240982,
-0.130275696516037,
0.12203993648290634,
0.009067588485777378,
-0.17712661623954773,
0.46290022134780884,
-0.2734439969062805,
0.459517240524292,
-0.3019578158855438,
-0.0698523074388504,
0.15436917543411255,
-0.21756455302238464,
0.047617025673389435,
-0.08889330923557281,
0.2006947100162506,
0.18539583683013916,
0.14527899026870728,
0.30053821206092834,
-0.05552820488810539,
0.15005207061767578,
0.09785179793834686,
-0.05909692496061325,
0.10457736253738403,
-0.004989806562662125,
0.0970803052186966,
-0.14562974870204926,
0.19269010424613953,
0.19477596879005432,
0.3367041051387787,
0.0006264355033636093,
-0.45068007707595825,
0.35615700483322144,
0.4138258695602417,
0.12065742909908295,
-0.20707103610038757,
0.026162544265389442,
-0.04684017598628998,
-0.09920664876699448,
0.22516916692256927,
0.17565147578716278,
0.24202322959899902,
0.2592669129371643,
0.02295229583978653,
0.2206764817237854,
-0.10656078904867172,
-0.39856722950935364,
0.2926388382911682,
-0.0915164053440094,
0.1301996409893036,
0.11524593830108643,
-0.07536430656909943,
-0.08157185465097427,
-0.47015053033828735,
-0.0520385280251503,
-0.07205936312675476,
0.11427271366119385,
-0.30434679985046387,
0.2695600390434265,
-0.11112789809703827,
-0.16358670592308044,
-0.1607658565044403,
-0.011293615214526653,
-0.27674001455307007,
-0.18187487125396729,
0.0291688684374094,
0.5054516792297363,
-0.27325689792633057,
-0.05901487171649933,
-0.05167481303215027,
-0.016789168119430542,
-0.10262562334537506,
-0.20613139867782593,
-0.36401453614234924,
-0.04049556702375412,
-0.14607766270637512,
0.042906519025564194,
0.2311764657497406,
-0.010269971564412117,
0.3883562982082367,
-0.040555648505687714,
-0.2642621099948883,
-0.24108082056045532,
-0.03219180181622505,
0.22415244579315186,
-0.10531081259250641,
0.2786417603492737,
0.17612424492835999,
0.1340746134519577,
-0.1446707397699356,
-0.030464038252830505,
0.20328453183174133,
-0.4337928295135498,
0.03398668020963669,
-0.041503727436065674,
-0.09644074738025665,
0.047308407723903656,
-0.2558578550815582,
-0.1342168152332306,
-0.15706607699394226,
-0.42847129702568054,
0.12153135240077972,
-0.10562223196029663,
0.25706416368484497,
0.5086647868156433,
0.21301975846290588,
0.054591551423072815,
-0.034499019384384155,
0.179179847240448,
-0.3030277490615845,
-0.6626794934272766,
0.07140613347291946,
-0.2161923199892044,
-0.38962867856025696,
-0.09018723666667938,
-0.153836190700531,
0.18582534790039062,
0.1561117321252823,
-0.5285137891769409,
-0.1433466672897339,
-0.25348836183547974,
0.2717568874359131,
0.020541906356811523,
0.1415262222290039,
0.25001397728919983,
-0.11788461357355118,
-0.21297360956668854,
-0.09484933316707611,
0.3777676224708557,
0.22947895526885986,
-0.18453794717788696,
-0.038093335926532745,
0.05426081269979477,
0.32365772128105164,
-0.1444852650165558,
0.6446973085403442,
0.3484320044517517,
0.04487191140651703,
0.5808858871459961,
0.057453639805316925,
0.6172465682029724,
-0.375783234834671,
-0.263871431350708,
-0.1273484230041504,
0.028571292757987976,
-0.28394508361816406,
0.20179250836372375,
-0.018513944000005722,
0.3519078195095062,
-0.22409950196743011,
-0.002644835039973259,
-0.15161225199699402,
-0.46518954634666443,
-0.10357508063316345,
0.04421111196279526,
0.1687653362751007,
0.1895671784877777,
0.20933711528778076,
-0.1312304437160492,
0.015119370073080063,
0.05928229168057442,
0.22470545768737793,
0.3709056079387665,
-0.0938594713807106,
-0.1706736534833908,
0.027195638045668602,
-0.672870934009552,
0.23821860551834106,
0.0662102997303009,
0.046656277030706406,
-0.15187855064868927,
0.00795992836356163,
0.12003134191036224,
-0.16322210431098938,
0.35815149545669556,
-0.0886329784989357,
0.025832992047071457,
0.053231772035360336,
0.1254076510667801,
-0.31970658898353577,
0.0800715833902359,
0.05880575254559517,
-0.1755346804857254,
0.002116722986102104,
0.2893224358558655,
-0.495502233505249,
-0.35090944170951843,
0.12069930136203766,
0.10491197556257248,
-0.027216613292694092,
-0.13430926203727722,
-0.5269123911857605,
-0.2831767201423645,
-0.30810976028442383,
-0.0030561164021492004,
0.004309020936489105,
0.23296363651752472,
-0.22141090035438538,
-0.005186360329389572,
0.20490990579128265,
0.2005448341369629,
0.13153286278247833,
0.06724512577056885,
0.0961470976471901,
-0.0882413312792778,
0.0227954238653183,
0.15828153491020203,
0.028887426480650902,
0.12903118133544922,
0.7973129153251648,
0.06649091839790344,
-0.07724826037883759,
-0.16034173965454102,
0.22985292971134186,
0.09202361851930618,
0.5895727872848511,
-0.13209794461727142,
0.3571760058403015,
0.09673193097114563,
0.5124635696411133,
-0.13802428543567657,
0.030942397192120552,
0.1522045135498047,
-0.06065034121274948,
-0.08167094737291336,
-0.3996601998806,
0.40144872665405273,
-0.05548658221960068,
-0.17140546441078186,
0.5806734561920166,
0.4871329069137573,
-0.1892237365245819,
0.1530171036720276,
-0.1166328564286232,
1.0799769163131714,
0.1463426649570465,
0.18233121931552887,
0.4381679594516754,
-0.2204083949327469,
0.581721842288971,
-0.2400899976491928,
0.1264478862285614,
-0.3635673224925995,
-0.2936082184314728,
-0.009700585156679153,
-0.12292756140232086,
0.4479411542415619,
0.03000732883810997,
-0.09737195074558258,
0.2909621596336365,
-0.11850375682115555,
0.45569461584091187,
-0.0979999378323555,
0.19534112513065338,
-0.5699271559715271,
-0.2886376976966858,
-0.4374946653842926,
0.17330694198608398,
0.13460324704647064,
0.2907659709453583,
-0.23975378274917603,
-0.2179243415594101,
0.043860021978616714,
-0.30764907598495483,
-0.10917995125055313,
0.3782200813293457,
-0.3229272961616516,
-0.1412651240825653,
0.10809259116649628,
-0.10603229701519012,
0.13000650703907013,
0.003277946263551712,
0.3671641945838928,
0.09496961534023285,
-0.15769124031066895,
0.10904796421527863,
-0.14092642068862915,
0.14221256971359253,
-0.030238280072808266,
0.015319556929171085,
0.21800822019577026,
-0.055500537157058716,
-0.3645552098751068,
0.3310641348361969,
-0.08858181536197662,
-0.11019504070281982,
0.15219950675964355,
-0.36372148990631104,
-0.05795662850141525,
-0.11843110620975494,
0.11854726076126099,
0.14937081933021545,
0.08378557860851288,
-0.26154741644859314,
0.1363443285226822,
-0.22421060502529144,
-0.23118886351585388,
-0.12082857638597488,
-0.09785032272338867,
-0.22117295861244202,
-0.3241790533065796,
0.36653804779052734,
-0.12848418951034546,
0.13663166761398315,
0.32746419310569763,
0.09150548279285431,
-0.24279187619686127,
-0.34432652592658997,
-0.13944703340530396,
0.12215424329042435,
-0.6132144331932068,
0.1731160432100296,
0.17284388840198517,
-0.06499358266592026,
-0.07975438982248306,
0.333644837141037,
0.06501562148332596,
-0.10609521716833115,
0.07138565182685852,
-0.15550675988197327,
-0.40864914655685425,
0.03885627165436745,
-0.03133087232708931,
0.125761479139328,
0.10607137531042099,
0.07826663553714752,
-0.06629231572151184,
0.17103496193885803,
-0.37680429220199585,
-0.1256723552942276,
-0.0917290523648262,
-0.0012166351079940796,
0.049852266907691956,
-0.14714893698692322,
0.38997918367385864,
-0.0745754987001419,
0.1787630170583725,
0.17024658620357513,
-0.39678728580474854,
-0.24173656105995178,
-0.1345893144607544,
0.1649649739265442,
0.026165824383497238,
-0.475482702255249,
0.10237859189510345,
-0.18222759664058685,
-0.2125900834798813,
-0.09906761348247528,
0.6382774710655212,
0.2065926492214203,
-0.017141230404376984,
-0.1316419392824173,
0.07210367172956467,
0.3184070885181427,
-0.395110547542572,
-0.018958810716867447,
-0.0851922333240509,
0.5627648234367371,
-0.10888116806745529,
-0.032558172941207886,
-0.19180245697498322,
-0.2435469627380371,
-0.30351561307907104,
0.31700992584228516,
0.2671736478805542,
0.0973605215549469,
0.4866621196269989,
-0.2758709192276001,
-0.21310147643089294,
-0.11362642794847488,
0.4838314950466156,
-0.006486326456069946,
0.09851542115211487,
-0.1927383989095688,
0.1727766990661621,
0.2558792531490326,
-0.23284727334976196,
-0.07494359463453293,
-0.12587086856365204,
-0.0693095475435257,
0.2209741771221161,
0.16140882670879364,
0.3570750951766968,
-0.12801571190357208,
0.05440705269575119,
0.06733935326337814,
0.20331871509552002,
0.206935316324234,
0.15552029013633728,
0.30583229660987854,
0.2267833799123764,
0.151512011885643,
0.34545454382896423,
0.1135871410369873,
0.28307726979255676,
0.04899217188358307,
-0.2481335997581482,
0.08241435885429382,
-0.24065709114074707,
0.25907832384109497,
0.028260767459869385,
-0.4621051847934723,
0.09467063844203949,
0.09815938770771027,
-0.22837769985198975,
0.07839134335517883,
-0.14375199377536774,
0.35856378078460693,
-0.16400736570358276,
-0.17920221388339996,
-0.2550138235092163,
0.5736637115478516,
-0.011167299002408981,
-0.050747137516736984,
-0.07474678754806519,
-0.16289886832237244,
-0.21923714876174927,
0.24270698428153992,
0.12144090235233307,
-0.09728623926639557,
0.2632670998573303,
0.11046449840068817,
0.03790641203522682,
-0.09547784179449081,
0.1394863724708557,
0.16121098399162292,
0.28260210156440735,
-0.19713304936885834,
0.18053972721099854,
0.3343973755836487,
0.022635292261838913,
0.07475385069847107,
0.2938380539417267,
0.3012385964393616,
0.06990921497344971,
0.07584472000598907,
-0.02477458119392395,
-0.009457822889089584,
-0.03353799879550934,
-0.07441478967666626,
0.10196632891893387,
-0.14542868733406067,
-0.0019900016486644745,
0.2905818223953247,
0.12896332144737244,
-0.2579229176044464,
-0.18656332790851593,
-0.06674562394618988,
0.2698758542537689,
-0.1689157485961914,
0.5694379210472107,
-0.10430137813091278,
-0.020455963909626007,
-0.13315272331237793,
-0.05725676566362381,
-0.4089588224887848,
0.27187493443489075,
0.34216219186782837,
-0.27785250544548035,
0.15766841173171997,
-0.29162997007369995,
0.10913051664829254,
-0.07825493812561035,
0.4313041567802429,
0.2137623131275177,
0.2310771644115448,
-0.33002716302871704,
-0.29345786571502686,
-0.49924468994140625,
0.06305189430713654,
-0.043990056961774826,
0.040179044008255005,
0.07540255784988403,
0.100956492125988,
0.05234469100832939,
0.08624924719333649,
-0.0085592120885849,
0.24057532846927643,
-0.051763180643320084,
0.17024312913417816,
0.10420961678028107,
0.09818249940872192,
-0.28902918100357056,
-0.24004149436950684,
-0.15589599311351776,
-0.5906982421875,
0.2970260977745056,
-0.3497453033924103,
0.08489980548620224,
0.021297477185726166,
0.25068971514701843,
0.08036358654499054,
-0.29304808378219604,
0.4291582405567169,
0.20775333046913147,
0.050240907818078995,
-0.1747949719429016,
-0.3411479592323303,
-0.008540485054254532,
-0.08252925425767899,
-0.2905961871147156,
-0.054946169257164,
-0.08660951256752014,
0.43416041135787964,
0.10530488938093185,
-0.231435164809227,
-0.5046061873435974,
0.3587709963321686,
0.3108791708946228,
0.05945812910795212,
-0.2346116602420807,
0.16652022302150726,
-0.41816750168800354,
0.13134758174419403,
0.11635757982730865,
0.16662409901618958,
0.1242523193359375,
0.244190976023674,
-0.34694236516952515,
-0.3899792730808258,
0.6866307258605957,
-0.24456968903541565,
-0.19239534437656403,
-0.04043039306998253,
0.5403170585632324,
0.4229317903518677,
-0.40699872374534607,
-0.3578893542289734,
0.264149934053421,
0.1851009577512741,
-0.005476050078868866,
0.059625815600156784,
0.2799818515777588,
-0.12420356273651123,
0.050549883395433426,
-0.0594562292098999,
0.27739089727401733,
0.013650268316268921,
-0.2691888213157654,
0.16410021483898163,
-0.203634575009346
] |
https://github.com/huggingface/datasets/issues/6370
|
TensorDataset format does not work with Trainer from transformers
|
I figured it out. I found that `Trainer` does not work with TensorDataset even though the document says it uses it. Instead, I ended up creating a dictionary and converting it to a dataset using `dataset.Dataset.from_dict()`.
I will leave this post open for a while. If someone knows a better approach, please leave a comment.
|
### Describe the bug
The model was built to do fine tunning on BERT model for relation extraction.
trainer.train() returns an error message ```TypeError: vars() argument must have __dict__ attribute``` when it has `train_dataset` generated from `torch.utils.data.TensorDataset`
However, in the document, the required data format is `torch.utils.data.TensorDataset`.

Transformers trainer is supposed to accept the train_dataset in the format of torch.utils.data.TensorDataset, but it returns error message *"TypeError: vars() argument must have __dict__ attribute"*
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-30-5df728c929a2> in <cell line: 1>()
----> 1 trainer.train()
2 trainer.evaluate(test_dataset)
9 frames
/usr/local/lib/python3.10/dist-packages/transformers/data/data_collator.py in <listcomp>(.0)
107
108 if not isinstance(features[0], Mapping):
--> 109 features = [vars(f) for f in features]
110 first = features[0]
111 batch = {}
TypeError: vars() argument must have __dict__ attribute
```
### Steps to reproduce the bug
Create train_dataset using `torch.utils.data.TensorDataset`, for instance,
```train_dataset = torch.utils.data.TensorDataset(train_input_ids, train_attention_masks, train_labels)```
Feed this `train_dataset` to your trainer and run trainer.train
```
trainer = Trainer(model,
training_args,
train_dataset=train_dataset,
eval_dataset=dev_dataset,
compute_metrics=compute_metrics,
)
```
### Expected behavior
Trainer should start training
### Environment info
It is running on Google Colab
- `datasets` version: 2.14.6
- Platform: Linux-5.15.120+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.17.3
- PyArrow version: 9.0.0
- Pandas version: 1.5.3
| 55
|
TensorDataset format does not work with Trainer from transformers
### Describe the bug
The model was built to do fine tunning on BERT model for relation extraction.
trainer.train() returns an error message ```TypeError: vars() argument must have __dict__ attribute``` when it has `train_dataset` generated from `torch.utils.data.TensorDataset`
However, in the document, the required data format is `torch.utils.data.TensorDataset`.

Transformers trainer is supposed to accept the train_dataset in the format of torch.utils.data.TensorDataset, but it returns error message *"TypeError: vars() argument must have __dict__ attribute"*
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-30-5df728c929a2> in <cell line: 1>()
----> 1 trainer.train()
2 trainer.evaluate(test_dataset)
9 frames
/usr/local/lib/python3.10/dist-packages/transformers/data/data_collator.py in <listcomp>(.0)
107
108 if not isinstance(features[0], Mapping):
--> 109 features = [vars(f) for f in features]
110 first = features[0]
111 batch = {}
TypeError: vars() argument must have __dict__ attribute
```
### Steps to reproduce the bug
Create train_dataset using `torch.utils.data.TensorDataset`, for instance,
```train_dataset = torch.utils.data.TensorDataset(train_input_ids, train_attention_masks, train_labels)```
Feed this `train_dataset` to your trainer and run trainer.train
```
trainer = Trainer(model,
training_args,
train_dataset=train_dataset,
eval_dataset=dev_dataset,
compute_metrics=compute_metrics,
)
```
### Expected behavior
Trainer should start training
### Environment info
It is running on Google Colab
- `datasets` version: 2.14.6
- Platform: Linux-5.15.120+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.17.3
- PyArrow version: 9.0.0
- Pandas version: 1.5.3
I figured it out. I found that `Trainer` does not work with TensorDataset even though the document says it uses it. Instead, I ended up creating a dictionary and converting it to a dataset using `dataset.Dataset.from_dict()`.
I will leave this post open for a while. If someone knows a better approach, please leave a comment.
|
[
-0.037874482572078705,
-0.35188788175582886,
0.05201185122132301,
0.4861847162246704,
0.4192972183227539,
-0.058090053498744965,
0.6545384526252747,
0.43648284673690796,
-0.1592070311307907,
-0.005944959819316864,
-0.25915589928627014,
0.32222017645835876,
-0.13267779350280762,
-0.2513677179813385,
-0.2036125361919403,
-0.4603041112422943,
-0.02727033942937851,
0.29837965965270996,
-0.17369344830513,
-0.004304639995098114,
0.17776811122894287,
0.2228449136018753,
-0.059433259069919586,
-0.013504408299922943,
-0.5627854466438293,
0.039704829454422,
0.08863577246665955,
-0.12246919423341751,
0.01563449390232563,
-0.063187375664711,
0.5986497402191162,
-0.09857012331485748,
0.44362300634384155,
0.6600081920623779,
-0.0001215887168655172,
0.22435544431209564,
0.1381002515554428,
-0.11296785622835159,
-0.06387344002723694,
-0.1099175363779068,
-0.08671516180038452,
-0.012597931548953056,
0.3420392870903015,
-0.3319573998451233,
-0.35599473118782043,
0.08210519701242447,
-0.165287584066391,
-0.11661811172962189,
0.613518238067627,
0.6352990865707397,
0.12283118069171906,
0.4792751967906952,
0.14653998613357544,
-0.08347070962190628,
0.02095940336585045,
0.5227451920509338,
-0.12286043167114258,
0.15958403050899506,
-0.15279607474803925,
0.02246120013296604,
0.14259423315525055,
0.027535181492567062,
-0.031917981803417206,
0.07168519496917725,
0.18322014808654785,
0.2496584951877594,
-0.04308761656284332,
-0.14856839179992676,
0.03348138928413391,
0.38304203748703003,
0.5417982935905457,
-0.16483581066131592,
-0.2970823049545288,
0.2328343689441681,
-0.20133009552955627,
0.18919026851654053,
0.20702072978019714,
-0.21750089526176453,
-0.07902887463569641,
0.3170369267463684,
0.046307679265737534,
0.053751345723867416,
-0.5300679802894592,
0.2579047977924347,
-0.41505464911460876,
0.08962180465459824,
-0.04376151040196419,
-0.010735645890235901,
-0.04735070839524269,
-0.053445927798748016,
0.23223206400871277,
-0.05906718969345093,
0.12591314315795898,
0.03729106858372688,
-0.07203201949596405,
-0.4481760859489441,
-0.14259043335914612,
-0.6522209644317627,
-0.02023712731897831,
-0.2943961024284363,
-0.138019859790802,
-0.08368561416864395,
-0.1265249252319336,
0.02490951493382454,
0.27381813526153564,
0.19266408681869507,
0.04564017802476883,
0.45908379554748535,
0.03481721878051758,
-0.07174243777990341,
-0.12640653550624847,
-0.08590195327997208,
-0.20323430001735687,
-0.10888495296239853,
0.0432366319000721,
-0.05160637944936752,
0.18248434364795685,
-0.10043129324913025,
-0.2199288010597229,
0.04891710728406906,
-0.27247291803359985,
0.08476540446281433,
0.04855736345052719,
0.23578229546546936,
-0.27929601073265076,
0.4690496027469635,
0.18467320501804352,
0.04911208897829056,
0.005337284877896309,
-0.04875890538096428,
-0.08543010801076889,
0.08285841345787048,
-0.22732236981391907,
-0.3846052587032318,
0.1890655755996704,
0.03689616546034813,
0.22206467390060425,
-0.014059627428650856,
0.12456133216619492,
0.0954323410987854,
-0.07910455763339996,
-0.4034881889820099,
0.5019282102584839,
0.19716908037662506,
-0.08215547353029251,
0.16377593576908112,
0.17620018124580383,
-0.0015030056238174438,
-0.08316551893949509,
0.1757144331932068,
-0.45008260011672974,
-0.2083311676979065,
-0.3632928729057312,
0.0925145149230957,
-0.099442258477211,
-0.04612080007791519,
-0.21726015210151672,
0.06249493360519409,
0.3990456461906433,
-0.2587807774543762,
-0.21567973494529724,
-0.43744921684265137,
0.09728573262691498,
-0.04882366582751274,
0.42173653841018677,
0.17389512062072754,
-0.29749932885169983,
0.05885910242795944,
0.08262600004673004,
0.01753745973110199,
0.2892625331878662,
0.4083606004714966,
-0.23638911545276642,
0.2640122175216675,
-0.0008475352078676224,
-0.0177529975771904,
0.3607710301876068,
-0.4188159704208374,
-0.38439100980758667,
0.29409998655319214,
0.10121913254261017,
0.2890544533729553,
0.09365615993738174,
-0.07019806653261185,
0.3163068890571594,
0.02808316797018051,
0.04038102924823761,
0.4498959183692932,
-0.10381729900836945,
0.030811795964837074,
-0.23443664610385895,
-0.08343632519245148,
0.3137349486351013,
0.05382551625370979,
0.13407549262046814,
0.2853665351867676,
-0.14893651008605957,
0.7845430970191956,
0.18884366750717163,
0.06216426566243172,
-0.030652271583676338,
0.04452511668205261,
0.18701763451099396,
0.04469989985227585,
0.08304876834154129,
-0.07090575993061066,
-0.30360645055770874,
-0.01692194491624832,
0.016319774091243744,
0.13198310136795044,
0.0019592493772506714,
-0.12682601809501648,
-0.08826307952404022,
-0.06563024967908859,
-0.2912069261074066,
-0.32012781500816345,
0.05997542291879654,
0.04051634296774864,
-0.12554027140140533,
-0.17273162305355072,
-0.17073304951190948,
-0.06482040882110596,
0.054980963468551636,
0.09340918809175491,
-0.002028079703450203,
0.21850068867206573,
-0.21461857855319977,
-0.15114909410476685,
-0.28188130259513855,
0.21562018990516663,
-0.06821324676275253,
-0.18582361936569214,
-0.12056737393140793,
0.15764638781547546,
0.2059520184993744,
-0.06422273814678192,
-0.24202409386634827,
0.027611136436462402,
0.293669730424881,
-0.47849103808403015,
-0.2221241593360901,
0.4070391356945038,
0.16610190272331238,
-0.06261270493268967,
-0.15708258748054504,
0.2626796066761017,
0.30564451217651367,
0.086015485227108,
-0.12606631219387054,
0.2855094075202942,
0.24327382445335388,
0.08518621325492859,
0.0408102422952652,
-0.1392354965209961,
-0.24834905564785004,
0.18076851963996887,
0.015360213816165924,
-0.030591068789362907,
-0.24272207915782928,
-0.2113974690437317,
0.27737197279930115,
0.1794709861278534,
0.02697812393307686,
0.1566174328327179,
-0.19288411736488342,
-0.05722880735993385,
-0.15366888046264648,
-0.48520028591156006,
0.34278273582458496,
-0.0025888411328196526,
-0.03021295741200447,
-0.1981286257505417,
0.0075479415245354176,
-0.19563540816307068,
0.2596350312232971,
0.14201176166534424,
-0.13342873752117157,
0.06209094077348709,
0.07825417071580887,
0.20502938330173492,
0.044632688164711,
-0.24896354973316193,
-0.005460452288389206,
0.24090023338794708,
-0.3303108811378479,
0.3991948962211609,
-0.23050807416439056,
0.12855538725852966,
-0.5074337720870972,
-0.3699197769165039,
-0.040948349982500076,
0.0471283495426178,
-0.01929837465286255,
0.1883392035961151,
0.07647600769996643,
0.32834967970848083,
0.4905284345149994,
0.03754743933677673,
0.3371836245059967,
-0.2740345597267151,
-0.17134076356887817,
-0.19373904168605804,
-0.31671270728111267,
0.06054437533020973,
0.06643492728471756,
-0.307761013507843,
-0.01727295108139515,
-0.2587939500808716,
-0.03330986201763153,
-0.26157692074775696,
-0.3647145926952362,
0.09527967870235443,
-0.038771212100982666,
0.22816723585128784,
0.3484087884426117,
0.15291528403759003,
-0.025652535259723663,
-0.18259809911251068,
0.12483827769756317,
-0.010255102068185806,
0.01536020077764988,
0.16795752942562103,
-0.1497218757867813,
0.08454320579767227,
-0.1343657374382019,
-0.4810856878757477,
-0.02066589705646038,
-0.06278163194656372,
-0.1587047576904297,
-0.04830913245677948,
0.03825300931930542,
0.2776562571525574,
0.3345387279987335,
0.23045866191387177,
-0.012850308790802956,
0.2643004059791565,
-0.03018946759402752,
-0.1679343581199646,
0.3866286873817444,
-0.21066366136074066,
-0.4642779529094696,
-0.24532826244831085,
-0.16758450865745544,
0.22758172452449799,
0.2610023617744446,
-0.09346375614404678,
-0.2074260413646698,
-0.015302827581763268,
0.0433611162006855,
-0.04622328281402588,
0.17901299893856049,
0.30337750911712646,
0.011658788658678532,
0.10725884139537811,
-0.03483664616942406,
0.1433587670326233,
0.2833932638168335,
-0.002553403377532959,
0.22112740576267242,
0.009381042793393135,
0.1251981109380722,
0.0995996743440628,
0.8731914758682251,
0.1017230898141861,
-0.6480160355567932,
0.04811963438987732,
-0.3322473168373108,
0.1395704597234726,
-0.08415537327528,
-0.38186612725257874,
-0.02432628720998764,
0.05414320528507233,
0.11948297917842865,
0.21217741072177887,
-0.27653154730796814,
-0.006718417629599571,
-0.21747441589832306,
0.09430032968521118,
-0.013598598539829254,
-0.34611713886260986,
0.3215680420398712,
-0.5181782841682434,
0.36778512597084045,
-0.07197783887386322,
0.36812397837638855,
0.004782872274518013,
-0.12775547802448273,
0.014247527346014977,
0.3073393702507019,
-0.08778560906648636,
0.056214604526758194,
0.2222685068845749,
-0.4816899001598358,
-0.2743165194988251,
0.16536177694797516,
0.1717274785041809,
0.5209487080574036,
0.029631320387125015,
-0.02151503786444664,
0.0705842673778534,
0.36731457710266113,
0.6872275471687317,
0.12684065103530884,
-0.220815971493721,
-0.043707575649023056,
-0.3197455406188965,
-0.18436504900455475,
-0.0683324784040451,
-0.3373817503452301,
-0.05378643050789833,
-0.0856858491897583,
0.3698982894420624,
-0.2858907878398895,
-0.4242016673088074,
0.09092134237289429,
0.019099412485957146,
-0.1549072414636612,
0.09180239588022232,
-0.11749464273452759,
0.005990810692310333,
-0.06042812019586563,
0.0036033540964126587,
0.33374881744384766,
0.29991021752357483,
0.1033114418387413,
0.018232468515634537,
-0.473434180021286,
-0.030488673597574234,
0.23585689067840576,
0.292166531085968,
0.2173641324043274,
-0.14081256091594696,
0.13464494049549103,
0.031775444746017456,
0.39332059025764465,
0.343979150056839,
-0.024796217679977417,
-0.06207183375954628,
-0.5286923050880432,
0.058045394718647,
-0.1037914976477623,
0.18269753456115723,
0.13708283007144928,
-0.020413141697645187,
-0.20513415336608887,
-0.09733249247074127,
-0.1712697446346283,
0.08394649624824524,
0.3750484883785248,
0.40634647011756897,
-0.21976599097251892,
-0.4186647832393646,
-0.341860294342041,
0.1792561560869217,
0.11299586296081543,
0.21438325941562653,
-0.05693267285823822,
0.03484339639544487,
-0.3367152810096741,
0.23841367661952972,
0.3113784193992615,
0.7732336521148682,
0.16004328429698944,
0.3732759356498718,
0.41005340218544006,
0.03160037845373154,
0.4551636278629303,
-0.24357309937477112,
0.10647039860486984,
-0.30155128240585327,
-0.08319946378469467,
-0.1787722408771515,
-0.060739390552043915,
0.09333915263414383,
0.1444777548313141,
-0.33197733759880066,
0.22209829092025757,
-0.26251357793807983,
0.5043293833732605,
0.3125210404396057,
0.10229207575321198,
0.5489411950111389,
-0.24050885438919067,
-0.05091492086648941,
0.01239856705069542,
-0.15021666884422302,
0.3189889192581177,
-0.015051301568746567,
-0.4408149719238281,
-0.08227576315402985,
-0.3035666346549988,
-0.10421547293663025,
0.05204130709171295,
-0.3217765688896179,
0.2775600552558899,
0.3132532238960266,
-0.46706467866897583,
0.32113316655158997,
0.3987422287464142,
0.33910614252090454,
0.1353251039981842,
-0.335765540599823,
0.1328020691871643,
-0.11816424876451492,
0.14612925052642822,
-0.07389900833368301,
-0.09688451141119003,
0.5543758869171143,
-0.04806641489267349,
0.12225554138422012,
0.31656280159950256,
-0.05070151761174202,
-0.008296143263578415,
0.01583300530910492,
-0.04206414520740509,
0.29283422231674194,
-0.536535382270813,
-0.18711096048355103,
-0.19983479380607605,
-0.29549363255500793,
-0.08881683647632599,
0.07583223283290863,
0.05958469212055206,
-0.17575599253177643,
0.2041683793067932,
-0.10527043044567108,
-0.05650619789958,
-0.029514610767364502,
0.48345649242401123,
0.21674585342407227,
-0.19212083518505096,
0.46450570225715637,
0.031843651086091995,
-0.12224158644676208,
-0.2443777620792389,
0.016398347914218903,
0.21160610020160675,
-0.7052992582321167,
0.18648073077201843,
-0.07512558996677399,
-0.24165160953998566,
-0.18653123080730438,
0.3506816327571869,
0.096342071890831,
0.08547636866569519,
-0.10805616527795792,
-0.09375802427530289,
-0.34517520666122437,
-0.031343795359134674,
-0.19645792245864868,
0.15895985066890717,
0.1584596037864685,
0.6223707795143127,
-0.030092772096395493,
-0.11380214989185333,
-0.21684390306472778,
0.08798200637102127,
0.16260962188243866,
0.31158486008644104,
-0.2638877332210541,
-0.14822643995285034,
0.27616652846336365,
-0.16708962619304657,
0.02154882438480854,
0.1142476350069046,
0.10298221558332443,
-0.12636792659759521,
-0.3475647568702698,
0.15650175511837006,
0.13478821516036987,
-0.06534194201231003,
-0.06687425076961517,
0.16770805418491364,
-0.3207867443561554,
-0.1610674411058426,
0.10441482067108154,
-0.00958620198071003,
-0.04879866540431976,
0.5547991394996643,
-0.015745896846055984,
0.22254878282546997,
-0.41374748945236206,
-0.23830345273017883,
0.031279001384973526,
0.09604794532060623,
-0.04747678339481354,
0.09306009858846664,
-0.17503006756305695,
-0.24345260858535767,
-0.4716792106628418,
0.25169697403907776,
0.0686694011092186,
-0.023943468928337097,
0.3019804358482361,
-0.11356756091117859,
0.0075589753687381744,
0.18933232128620148,
0.16976398229599,
0.11801350116729736,
-0.06446746736764908,
-0.09177766740322113,
0.1820688247680664,
0.08114229887723923,
-0.18199868500232697,
0.014268222264945507,
0.05911668762564659,
-0.10724832862615585,
-0.1862770915031433,
0.18280848860740662,
-0.17179378867149353,
0.346068412065506,
0.1998978853225708,
0.11786451190710068,
-0.09940171986818314,
-0.1887696087360382,
0.2343466430902481,
0.6368314623832703,
-0.08552125096321106,
0.3567546606063843,
0.14883214235305786,
0.06118832901120186,
0.1687890589237213,
0.436794638633728,
-0.22607511281967163,
0.3516668677330017,
-0.19740349054336548,
-0.25031739473342896,
0.43708521127700806,
0.028357122093439102,
-0.523038387298584,
-0.42154985666275024,
0.03974173218011856,
0.12825599312782288,
-0.07414253056049347,
0.5636430978775024,
-0.44283923506736755,
-0.2217208296060562,
-0.2230963408946991,
-0.17829273641109467,
-0.30713772773742676,
0.13448914885520935,
0.021015692502260208,
0.04554379731416702,
-0.14032171666622162,
-0.2922041118144989,
-0.30722418427467346,
0.17590630054473877,
0.2822950780391693,
0.25650840997695923,
-0.20549272000789642,
-0.12471316754817963,
0.11568056792020798,
0.16309940814971924,
0.02795691043138504,
-0.07785724848508835,
0.08727394044399261,
-0.14199203252792358,
-0.22460493445396423,
-0.057561468333005905,
0.33147284388542175,
0.1876397430896759,
0.23952966928482056,
-0.09462191164493561,
-0.29117727279663086,
-0.11664298176765442,
-0.3157767653465271,
0.10133927315473557,
0.21671061217784882,
0.1281469762325287,
-0.0386798195540905,
0.11885276436805725,
0.062128640711307526,
-0.08095625787973404,
0.10317760705947876,
-0.02022872492671013,
0.2560822069644928,
-0.23324887454509735,
0.676763117313385,
0.0036997105926275253,
-0.18765658140182495,
-0.02910969778895378,
-0.10695318132638931,
-0.2334842085838318,
0.0268673375248909,
0.11829361319541931,
0.40242713689804077,
0.025012414902448654,
-0.12710212171077728,
0.005316602066159248,
0.08738961815834045,
0.4586596190929413,
0.2942659556865692,
-0.03551045060157776,
-0.382824182510376,
0.2566049098968506,
-0.1317516714334488,
0.30372920632362366,
0.2938825786113739,
-0.06686729937791824,
-0.030761223286390305,
0.05055151879787445,
0.05667642876505852,
0.23520107567310333,
-0.09971460700035095,
-0.5457708835601807,
0.14324726164340973,
0.06453897058963776,
-0.15130682289600372,
-0.22577302157878876,
-0.396176278591156,
0.04726783558726311,
0.1590113639831543,
-0.34873321652412415,
0.13435135781764984,
0.0668800100684166,
0.03475380688905716,
-0.39560312032699585,
-0.21797119081020355,
0.16361936926841736,
0.34288281202316284,
0.13210801780223846,
0.07902771234512329,
0.38850465416908264,
0.09731479734182358,
0.10899796336889267,
-0.04391862824559212,
-0.029090413823723793,
-0.13905933499336243,
0.11932995915412903,
0.242848739027977,
0.43188315629959106,
-0.19984591007232666,
-0.0508875735104084,
-0.4426374137401581,
0.21258947253227234,
0.13635432720184326,
-0.18898597359657288,
-0.41378000378608704,
0.19398953020572662,
-0.2940530478954315,
-0.0949230045080185,
0.18074317276477814,
0.6175069212913513,
-0.1854996234178543,
0.06623358279466629,
-0.5495490431785583,
-0.3743923008441925,
0.278023362159729,
-0.4314042627811432,
-0.3708191514015198,
-0.1583140641450882,
0.06797964870929718,
0.16378149390220642,
0.16144894063472748,
-0.5803877711296082,
-0.004614822566509247,
0.2175128012895584,
-0.12236209958791733,
-0.37102317810058594,
0.09044577181339264,
0.44023042917251587,
0.2601349651813507,
-0.13622471690177917,
0.43452656269073486,
0.04904048517346382,
-0.09926622360944748,
-0.12028798460960388,
-0.27820804715156555
] |
https://github.com/huggingface/datasets/issues/6370
|
TensorDataset format does not work with Trainer from transformers
|
Only issues directly related to the HF datasets library should be reported here. ~So, I'm transferring this issue to the `transformers` repo.~ I'm not a `transformers` maintainer, so GitHub doesn't let me transfer it there :(. This means you need to do it manually.
|
### Describe the bug
The model was built to do fine tunning on BERT model for relation extraction.
trainer.train() returns an error message ```TypeError: vars() argument must have __dict__ attribute``` when it has `train_dataset` generated from `torch.utils.data.TensorDataset`
However, in the document, the required data format is `torch.utils.data.TensorDataset`.

Transformers trainer is supposed to accept the train_dataset in the format of torch.utils.data.TensorDataset, but it returns error message *"TypeError: vars() argument must have __dict__ attribute"*
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-30-5df728c929a2> in <cell line: 1>()
----> 1 trainer.train()
2 trainer.evaluate(test_dataset)
9 frames
/usr/local/lib/python3.10/dist-packages/transformers/data/data_collator.py in <listcomp>(.0)
107
108 if not isinstance(features[0], Mapping):
--> 109 features = [vars(f) for f in features]
110 first = features[0]
111 batch = {}
TypeError: vars() argument must have __dict__ attribute
```
### Steps to reproduce the bug
Create train_dataset using `torch.utils.data.TensorDataset`, for instance,
```train_dataset = torch.utils.data.TensorDataset(train_input_ids, train_attention_masks, train_labels)```
Feed this `train_dataset` to your trainer and run trainer.train
```
trainer = Trainer(model,
training_args,
train_dataset=train_dataset,
eval_dataset=dev_dataset,
compute_metrics=compute_metrics,
)
```
### Expected behavior
Trainer should start training
### Environment info
It is running on Google Colab
- `datasets` version: 2.14.6
- Platform: Linux-5.15.120+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.17.3
- PyArrow version: 9.0.0
- Pandas version: 1.5.3
| 44
|
TensorDataset format does not work with Trainer from transformers
### Describe the bug
The model was built to do fine tunning on BERT model for relation extraction.
trainer.train() returns an error message ```TypeError: vars() argument must have __dict__ attribute``` when it has `train_dataset` generated from `torch.utils.data.TensorDataset`
However, in the document, the required data format is `torch.utils.data.TensorDataset`.

Transformers trainer is supposed to accept the train_dataset in the format of torch.utils.data.TensorDataset, but it returns error message *"TypeError: vars() argument must have __dict__ attribute"*
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-30-5df728c929a2> in <cell line: 1>()
----> 1 trainer.train()
2 trainer.evaluate(test_dataset)
9 frames
/usr/local/lib/python3.10/dist-packages/transformers/data/data_collator.py in <listcomp>(.0)
107
108 if not isinstance(features[0], Mapping):
--> 109 features = [vars(f) for f in features]
110 first = features[0]
111 batch = {}
TypeError: vars() argument must have __dict__ attribute
```
### Steps to reproduce the bug
Create train_dataset using `torch.utils.data.TensorDataset`, for instance,
```train_dataset = torch.utils.data.TensorDataset(train_input_ids, train_attention_masks, train_labels)```
Feed this `train_dataset` to your trainer and run trainer.train
```
trainer = Trainer(model,
training_args,
train_dataset=train_dataset,
eval_dataset=dev_dataset,
compute_metrics=compute_metrics,
)
```
### Expected behavior
Trainer should start training
### Environment info
It is running on Google Colab
- `datasets` version: 2.14.6
- Platform: Linux-5.15.120+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.17.3
- PyArrow version: 9.0.0
- Pandas version: 1.5.3
Only issues directly related to the HF datasets library should be reported here. ~So, I'm transferring this issue to the `transformers` repo.~ I'm not a `transformers` maintainer, so GitHub doesn't let me transfer it there :(. This means you need to do it manually.
|
[
-0.037874482572078705,
-0.35188788175582886,
0.05201185122132301,
0.4861847162246704,
0.4192972183227539,
-0.058090053498744965,
0.6545384526252747,
0.43648284673690796,
-0.1592070311307907,
-0.005944959819316864,
-0.25915589928627014,
0.32222017645835876,
-0.13267779350280762,
-0.2513677179813385,
-0.2036125361919403,
-0.4603041112422943,
-0.02727033942937851,
0.29837965965270996,
-0.17369344830513,
-0.004304639995098114,
0.17776811122894287,
0.2228449136018753,
-0.059433259069919586,
-0.013504408299922943,
-0.5627854466438293,
0.039704829454422,
0.08863577246665955,
-0.12246919423341751,
0.01563449390232563,
-0.063187375664711,
0.5986497402191162,
-0.09857012331485748,
0.44362300634384155,
0.6600081920623779,
-0.0001215887168655172,
0.22435544431209564,
0.1381002515554428,
-0.11296785622835159,
-0.06387344002723694,
-0.1099175363779068,
-0.08671516180038452,
-0.012597931548953056,
0.3420392870903015,
-0.3319573998451233,
-0.35599473118782043,
0.08210519701242447,
-0.165287584066391,
-0.11661811172962189,
0.613518238067627,
0.6352990865707397,
0.12283118069171906,
0.4792751967906952,
0.14653998613357544,
-0.08347070962190628,
0.02095940336585045,
0.5227451920509338,
-0.12286043167114258,
0.15958403050899506,
-0.15279607474803925,
0.02246120013296604,
0.14259423315525055,
0.027535181492567062,
-0.031917981803417206,
0.07168519496917725,
0.18322014808654785,
0.2496584951877594,
-0.04308761656284332,
-0.14856839179992676,
0.03348138928413391,
0.38304203748703003,
0.5417982935905457,
-0.16483581066131592,
-0.2970823049545288,
0.2328343689441681,
-0.20133009552955627,
0.18919026851654053,
0.20702072978019714,
-0.21750089526176453,
-0.07902887463569641,
0.3170369267463684,
0.046307679265737534,
0.053751345723867416,
-0.5300679802894592,
0.2579047977924347,
-0.41505464911460876,
0.08962180465459824,
-0.04376151040196419,
-0.010735645890235901,
-0.04735070839524269,
-0.053445927798748016,
0.23223206400871277,
-0.05906718969345093,
0.12591314315795898,
0.03729106858372688,
-0.07203201949596405,
-0.4481760859489441,
-0.14259043335914612,
-0.6522209644317627,
-0.02023712731897831,
-0.2943961024284363,
-0.138019859790802,
-0.08368561416864395,
-0.1265249252319336,
0.02490951493382454,
0.27381813526153564,
0.19266408681869507,
0.04564017802476883,
0.45908379554748535,
0.03481721878051758,
-0.07174243777990341,
-0.12640653550624847,
-0.08590195327997208,
-0.20323430001735687,
-0.10888495296239853,
0.0432366319000721,
-0.05160637944936752,
0.18248434364795685,
-0.10043129324913025,
-0.2199288010597229,
0.04891710728406906,
-0.27247291803359985,
0.08476540446281433,
0.04855736345052719,
0.23578229546546936,
-0.27929601073265076,
0.4690496027469635,
0.18467320501804352,
0.04911208897829056,
0.005337284877896309,
-0.04875890538096428,
-0.08543010801076889,
0.08285841345787048,
-0.22732236981391907,
-0.3846052587032318,
0.1890655755996704,
0.03689616546034813,
0.22206467390060425,
-0.014059627428650856,
0.12456133216619492,
0.0954323410987854,
-0.07910455763339996,
-0.4034881889820099,
0.5019282102584839,
0.19716908037662506,
-0.08215547353029251,
0.16377593576908112,
0.17620018124580383,
-0.0015030056238174438,
-0.08316551893949509,
0.1757144331932068,
-0.45008260011672974,
-0.2083311676979065,
-0.3632928729057312,
0.0925145149230957,
-0.099442258477211,
-0.04612080007791519,
-0.21726015210151672,
0.06249493360519409,
0.3990456461906433,
-0.2587807774543762,
-0.21567973494529724,
-0.43744921684265137,
0.09728573262691498,
-0.04882366582751274,
0.42173653841018677,
0.17389512062072754,
-0.29749932885169983,
0.05885910242795944,
0.08262600004673004,
0.01753745973110199,
0.2892625331878662,
0.4083606004714966,
-0.23638911545276642,
0.2640122175216675,
-0.0008475352078676224,
-0.0177529975771904,
0.3607710301876068,
-0.4188159704208374,
-0.38439100980758667,
0.29409998655319214,
0.10121913254261017,
0.2890544533729553,
0.09365615993738174,
-0.07019806653261185,
0.3163068890571594,
0.02808316797018051,
0.04038102924823761,
0.4498959183692932,
-0.10381729900836945,
0.030811795964837074,
-0.23443664610385895,
-0.08343632519245148,
0.3137349486351013,
0.05382551625370979,
0.13407549262046814,
0.2853665351867676,
-0.14893651008605957,
0.7845430970191956,
0.18884366750717163,
0.06216426566243172,
-0.030652271583676338,
0.04452511668205261,
0.18701763451099396,
0.04469989985227585,
0.08304876834154129,
-0.07090575993061066,
-0.30360645055770874,
-0.01692194491624832,
0.016319774091243744,
0.13198310136795044,
0.0019592493772506714,
-0.12682601809501648,
-0.08826307952404022,
-0.06563024967908859,
-0.2912069261074066,
-0.32012781500816345,
0.05997542291879654,
0.04051634296774864,
-0.12554027140140533,
-0.17273162305355072,
-0.17073304951190948,
-0.06482040882110596,
0.054980963468551636,
0.09340918809175491,
-0.002028079703450203,
0.21850068867206573,
-0.21461857855319977,
-0.15114909410476685,
-0.28188130259513855,
0.21562018990516663,
-0.06821324676275253,
-0.18582361936569214,
-0.12056737393140793,
0.15764638781547546,
0.2059520184993744,
-0.06422273814678192,
-0.24202409386634827,
0.027611136436462402,
0.293669730424881,
-0.47849103808403015,
-0.2221241593360901,
0.4070391356945038,
0.16610190272331238,
-0.06261270493268967,
-0.15708258748054504,
0.2626796066761017,
0.30564451217651367,
0.086015485227108,
-0.12606631219387054,
0.2855094075202942,
0.24327382445335388,
0.08518621325492859,
0.0408102422952652,
-0.1392354965209961,
-0.24834905564785004,
0.18076851963996887,
0.015360213816165924,
-0.030591068789362907,
-0.24272207915782928,
-0.2113974690437317,
0.27737197279930115,
0.1794709861278534,
0.02697812393307686,
0.1566174328327179,
-0.19288411736488342,
-0.05722880735993385,
-0.15366888046264648,
-0.48520028591156006,
0.34278273582458496,
-0.0025888411328196526,
-0.03021295741200447,
-0.1981286257505417,
0.0075479415245354176,
-0.19563540816307068,
0.2596350312232971,
0.14201176166534424,
-0.13342873752117157,
0.06209094077348709,
0.07825417071580887,
0.20502938330173492,
0.044632688164711,
-0.24896354973316193,
-0.005460452288389206,
0.24090023338794708,
-0.3303108811378479,
0.3991948962211609,
-0.23050807416439056,
0.12855538725852966,
-0.5074337720870972,
-0.3699197769165039,
-0.040948349982500076,
0.0471283495426178,
-0.01929837465286255,
0.1883392035961151,
0.07647600769996643,
0.32834967970848083,
0.4905284345149994,
0.03754743933677673,
0.3371836245059967,
-0.2740345597267151,
-0.17134076356887817,
-0.19373904168605804,
-0.31671270728111267,
0.06054437533020973,
0.06643492728471756,
-0.307761013507843,
-0.01727295108139515,
-0.2587939500808716,
-0.03330986201763153,
-0.26157692074775696,
-0.3647145926952362,
0.09527967870235443,
-0.038771212100982666,
0.22816723585128784,
0.3484087884426117,
0.15291528403759003,
-0.025652535259723663,
-0.18259809911251068,
0.12483827769756317,
-0.010255102068185806,
0.01536020077764988,
0.16795752942562103,
-0.1497218757867813,
0.08454320579767227,
-0.1343657374382019,
-0.4810856878757477,
-0.02066589705646038,
-0.06278163194656372,
-0.1587047576904297,
-0.04830913245677948,
0.03825300931930542,
0.2776562571525574,
0.3345387279987335,
0.23045866191387177,
-0.012850308790802956,
0.2643004059791565,
-0.03018946759402752,
-0.1679343581199646,
0.3866286873817444,
-0.21066366136074066,
-0.4642779529094696,
-0.24532826244831085,
-0.16758450865745544,
0.22758172452449799,
0.2610023617744446,
-0.09346375614404678,
-0.2074260413646698,
-0.015302827581763268,
0.0433611162006855,
-0.04622328281402588,
0.17901299893856049,
0.30337750911712646,
0.011658788658678532,
0.10725884139537811,
-0.03483664616942406,
0.1433587670326233,
0.2833932638168335,
-0.002553403377532959,
0.22112740576267242,
0.009381042793393135,
0.1251981109380722,
0.0995996743440628,
0.8731914758682251,
0.1017230898141861,
-0.6480160355567932,
0.04811963438987732,
-0.3322473168373108,
0.1395704597234726,
-0.08415537327528,
-0.38186612725257874,
-0.02432628720998764,
0.05414320528507233,
0.11948297917842865,
0.21217741072177887,
-0.27653154730796814,
-0.006718417629599571,
-0.21747441589832306,
0.09430032968521118,
-0.013598598539829254,
-0.34611713886260986,
0.3215680420398712,
-0.5181782841682434,
0.36778512597084045,
-0.07197783887386322,
0.36812397837638855,
0.004782872274518013,
-0.12775547802448273,
0.014247527346014977,
0.3073393702507019,
-0.08778560906648636,
0.056214604526758194,
0.2222685068845749,
-0.4816899001598358,
-0.2743165194988251,
0.16536177694797516,
0.1717274785041809,
0.5209487080574036,
0.029631320387125015,
-0.02151503786444664,
0.0705842673778534,
0.36731457710266113,
0.6872275471687317,
0.12684065103530884,
-0.220815971493721,
-0.043707575649023056,
-0.3197455406188965,
-0.18436504900455475,
-0.0683324784040451,
-0.3373817503452301,
-0.05378643050789833,
-0.0856858491897583,
0.3698982894420624,
-0.2858907878398895,
-0.4242016673088074,
0.09092134237289429,
0.019099412485957146,
-0.1549072414636612,
0.09180239588022232,
-0.11749464273452759,
0.005990810692310333,
-0.06042812019586563,
0.0036033540964126587,
0.33374881744384766,
0.29991021752357483,
0.1033114418387413,
0.018232468515634537,
-0.473434180021286,
-0.030488673597574234,
0.23585689067840576,
0.292166531085968,
0.2173641324043274,
-0.14081256091594696,
0.13464494049549103,
0.031775444746017456,
0.39332059025764465,
0.343979150056839,
-0.024796217679977417,
-0.06207183375954628,
-0.5286923050880432,
0.058045394718647,
-0.1037914976477623,
0.18269753456115723,
0.13708283007144928,
-0.020413141697645187,
-0.20513415336608887,
-0.09733249247074127,
-0.1712697446346283,
0.08394649624824524,
0.3750484883785248,
0.40634647011756897,
-0.21976599097251892,
-0.4186647832393646,
-0.341860294342041,
0.1792561560869217,
0.11299586296081543,
0.21438325941562653,
-0.05693267285823822,
0.03484339639544487,
-0.3367152810096741,
0.23841367661952972,
0.3113784193992615,
0.7732336521148682,
0.16004328429698944,
0.3732759356498718,
0.41005340218544006,
0.03160037845373154,
0.4551636278629303,
-0.24357309937477112,
0.10647039860486984,
-0.30155128240585327,
-0.08319946378469467,
-0.1787722408771515,
-0.060739390552043915,
0.09333915263414383,
0.1444777548313141,
-0.33197733759880066,
0.22209829092025757,
-0.26251357793807983,
0.5043293833732605,
0.3125210404396057,
0.10229207575321198,
0.5489411950111389,
-0.24050885438919067,
-0.05091492086648941,
0.01239856705069542,
-0.15021666884422302,
0.3189889192581177,
-0.015051301568746567,
-0.4408149719238281,
-0.08227576315402985,
-0.3035666346549988,
-0.10421547293663025,
0.05204130709171295,
-0.3217765688896179,
0.2775600552558899,
0.3132532238960266,
-0.46706467866897583,
0.32113316655158997,
0.3987422287464142,
0.33910614252090454,
0.1353251039981842,
-0.335765540599823,
0.1328020691871643,
-0.11816424876451492,
0.14612925052642822,
-0.07389900833368301,
-0.09688451141119003,
0.5543758869171143,
-0.04806641489267349,
0.12225554138422012,
0.31656280159950256,
-0.05070151761174202,
-0.008296143263578415,
0.01583300530910492,
-0.04206414520740509,
0.29283422231674194,
-0.536535382270813,
-0.18711096048355103,
-0.19983479380607605,
-0.29549363255500793,
-0.08881683647632599,
0.07583223283290863,
0.05958469212055206,
-0.17575599253177643,
0.2041683793067932,
-0.10527043044567108,
-0.05650619789958,
-0.029514610767364502,
0.48345649242401123,
0.21674585342407227,
-0.19212083518505096,
0.46450570225715637,
0.031843651086091995,
-0.12224158644676208,
-0.2443777620792389,
0.016398347914218903,
0.21160610020160675,
-0.7052992582321167,
0.18648073077201843,
-0.07512558996677399,
-0.24165160953998566,
-0.18653123080730438,
0.3506816327571869,
0.096342071890831,
0.08547636866569519,
-0.10805616527795792,
-0.09375802427530289,
-0.34517520666122437,
-0.031343795359134674,
-0.19645792245864868,
0.15895985066890717,
0.1584596037864685,
0.6223707795143127,
-0.030092772096395493,
-0.11380214989185333,
-0.21684390306472778,
0.08798200637102127,
0.16260962188243866,
0.31158486008644104,
-0.2638877332210541,
-0.14822643995285034,
0.27616652846336365,
-0.16708962619304657,
0.02154882438480854,
0.1142476350069046,
0.10298221558332443,
-0.12636792659759521,
-0.3475647568702698,
0.15650175511837006,
0.13478821516036987,
-0.06534194201231003,
-0.06687425076961517,
0.16770805418491364,
-0.3207867443561554,
-0.1610674411058426,
0.10441482067108154,
-0.00958620198071003,
-0.04879866540431976,
0.5547991394996643,
-0.015745896846055984,
0.22254878282546997,
-0.41374748945236206,
-0.23830345273017883,
0.031279001384973526,
0.09604794532060623,
-0.04747678339481354,
0.09306009858846664,
-0.17503006756305695,
-0.24345260858535767,
-0.4716792106628418,
0.25169697403907776,
0.0686694011092186,
-0.023943468928337097,
0.3019804358482361,
-0.11356756091117859,
0.0075589753687381744,
0.18933232128620148,
0.16976398229599,
0.11801350116729736,
-0.06446746736764908,
-0.09177766740322113,
0.1820688247680664,
0.08114229887723923,
-0.18199868500232697,
0.014268222264945507,
0.05911668762564659,
-0.10724832862615585,
-0.1862770915031433,
0.18280848860740662,
-0.17179378867149353,
0.346068412065506,
0.1998978853225708,
0.11786451190710068,
-0.09940171986818314,
-0.1887696087360382,
0.2343466430902481,
0.6368314623832703,
-0.08552125096321106,
0.3567546606063843,
0.14883214235305786,
0.06118832901120186,
0.1687890589237213,
0.436794638633728,
-0.22607511281967163,
0.3516668677330017,
-0.19740349054336548,
-0.25031739473342896,
0.43708521127700806,
0.028357122093439102,
-0.523038387298584,
-0.42154985666275024,
0.03974173218011856,
0.12825599312782288,
-0.07414253056049347,
0.5636430978775024,
-0.44283923506736755,
-0.2217208296060562,
-0.2230963408946991,
-0.17829273641109467,
-0.30713772773742676,
0.13448914885520935,
0.021015692502260208,
0.04554379731416702,
-0.14032171666622162,
-0.2922041118144989,
-0.30722418427467346,
0.17590630054473877,
0.2822950780391693,
0.25650840997695923,
-0.20549272000789642,
-0.12471316754817963,
0.11568056792020798,
0.16309940814971924,
0.02795691043138504,
-0.07785724848508835,
0.08727394044399261,
-0.14199203252792358,
-0.22460493445396423,
-0.057561468333005905,
0.33147284388542175,
0.1876397430896759,
0.23952966928482056,
-0.09462191164493561,
-0.29117727279663086,
-0.11664298176765442,
-0.3157767653465271,
0.10133927315473557,
0.21671061217784882,
0.1281469762325287,
-0.0386798195540905,
0.11885276436805725,
0.062128640711307526,
-0.08095625787973404,
0.10317760705947876,
-0.02022872492671013,
0.2560822069644928,
-0.23324887454509735,
0.676763117313385,
0.0036997105926275253,
-0.18765658140182495,
-0.02910969778895378,
-0.10695318132638931,
-0.2334842085838318,
0.0268673375248909,
0.11829361319541931,
0.40242713689804077,
0.025012414902448654,
-0.12710212171077728,
0.005316602066159248,
0.08738961815834045,
0.4586596190929413,
0.2942659556865692,
-0.03551045060157776,
-0.382824182510376,
0.2566049098968506,
-0.1317516714334488,
0.30372920632362366,
0.2938825786113739,
-0.06686729937791824,
-0.030761223286390305,
0.05055151879787445,
0.05667642876505852,
0.23520107567310333,
-0.09971460700035095,
-0.5457708835601807,
0.14324726164340973,
0.06453897058963776,
-0.15130682289600372,
-0.22577302157878876,
-0.396176278591156,
0.04726783558726311,
0.1590113639831543,
-0.34873321652412415,
0.13435135781764984,
0.0668800100684166,
0.03475380688905716,
-0.39560312032699585,
-0.21797119081020355,
0.16361936926841736,
0.34288281202316284,
0.13210801780223846,
0.07902771234512329,
0.38850465416908264,
0.09731479734182358,
0.10899796336889267,
-0.04391862824559212,
-0.029090413823723793,
-0.13905933499336243,
0.11932995915412903,
0.242848739027977,
0.43188315629959106,
-0.19984591007232666,
-0.0508875735104084,
-0.4426374137401581,
0.21258947253227234,
0.13635432720184326,
-0.18898597359657288,
-0.41378000378608704,
0.19398953020572662,
-0.2940530478954315,
-0.0949230045080185,
0.18074317276477814,
0.6175069212913513,
-0.1854996234178543,
0.06623358279466629,
-0.5495490431785583,
-0.3743923008441925,
0.278023362159729,
-0.4314042627811432,
-0.3708191514015198,
-0.1583140641450882,
0.06797964870929718,
0.16378149390220642,
0.16144894063472748,
-0.5803877711296082,
-0.004614822566509247,
0.2175128012895584,
-0.12236209958791733,
-0.37102317810058594,
0.09044577181339264,
0.44023042917251587,
0.2601349651813507,
-0.13622471690177917,
0.43452656269073486,
0.04904048517346382,
-0.09926622360944748,
-0.12028798460960388,
-0.27820804715156555
] |
https://github.com/huggingface/datasets/issues/6369
|
Multi process map did not load cache file correctly
|
The inconsistency may be caused by the usage of "update_fingerprint" and setting "trust_remote_code" to "True."
When the tokenizer employs "trust_remote_code," the behavior of the map function varies with each code execution. Even if the remote code of the tokenizer remains the same, the result of "asher.hexdigest()" is found to be inconsistent each time.
This may result in different processes executing multiple maps


|
### Describe the bug
When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process.


Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484)
### Steps to reproduce the bug
```
block_size = data_args.block_size
IGNORE_INDEX = -100
Ignore_Input = False
def tokenize_function(examples):
sources = []
targets = []
for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']):
source = instruction + inputs
target = f"{output}{tokenizer.eos_token}"
sources.append(source)
targets.append(target)
tokenized_sources = tokenizer(sources, return_attention_mask=False)
tokenized_targets = tokenizer(targets, return_attention_mask=False,
add_special_tokens=False
)
all_input_ids = []
all_labels = []
for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']):
if len(s) > block_size and Ignore_Input == False:
# print(s)
continue
input_ids = torch.LongTensor(s + t)[:block_size]
if Ignore_Input:
labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size]
else:
labels = input_ids
assert len(input_ids) == len(labels)
all_input_ids.append(input_ids)
all_labels.append(labels)
results = {
'input_ids': all_input_ids,
'labels': all_labels,
}
return results
with training_args.main_process_first(desc="dataset map tokenization ", local=False):
# print('local_rank',training_args.local_rank)
if not data_args.streaming:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=data_args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not data_args.overwrite_cache,
desc="Running tokenizer on dataset ",
)
else:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
remove_columns=column_names,
desc="Running tokenizer on dataset "
)
```
### Expected behavior
This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting
### Environment info
transformers == 4.34.1
datasets == 2.14.5
| 64
|
Multi process map did not load cache file correctly
### Describe the bug
When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process.


Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484)
### Steps to reproduce the bug
```
block_size = data_args.block_size
IGNORE_INDEX = -100
Ignore_Input = False
def tokenize_function(examples):
sources = []
targets = []
for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']):
source = instruction + inputs
target = f"{output}{tokenizer.eos_token}"
sources.append(source)
targets.append(target)
tokenized_sources = tokenizer(sources, return_attention_mask=False)
tokenized_targets = tokenizer(targets, return_attention_mask=False,
add_special_tokens=False
)
all_input_ids = []
all_labels = []
for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']):
if len(s) > block_size and Ignore_Input == False:
# print(s)
continue
input_ids = torch.LongTensor(s + t)[:block_size]
if Ignore_Input:
labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size]
else:
labels = input_ids
assert len(input_ids) == len(labels)
all_input_ids.append(input_ids)
all_labels.append(labels)
results = {
'input_ids': all_input_ids,
'labels': all_labels,
}
return results
with training_args.main_process_first(desc="dataset map tokenization ", local=False):
# print('local_rank',training_args.local_rank)
if not data_args.streaming:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=data_args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not data_args.overwrite_cache,
desc="Running tokenizer on dataset ",
)
else:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
remove_columns=column_names,
desc="Running tokenizer on dataset "
)
```
### Expected behavior
This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting
### Environment info
transformers == 4.34.1
datasets == 2.14.5
The inconsistency may be caused by the usage of "update_fingerprint" and setting "trust_remote_code" to "True."
When the tokenizer employs "trust_remote_code," the behavior of the map function varies with each code execution. Even if the remote code of the tokenizer remains the same, the result of "asher.hexdigest()" is found to be inconsistent each time.
This may result in different processes executing multiple maps


|
[
-0.37588390707969666,
-0.5878850221633911,
0.0327877476811409,
0.44652533531188965,
0.30833303928375244,
-0.06708860397338867,
0.384670615196228,
-0.023024436086416245,
0.11546272039413452,
-0.1306910514831543,
0.03220495581626892,
0.18396373093128204,
0.011364773847162724,
-0.16018825769424438,
0.2206813395023346,
-0.046393610537052155,
0.23309680819511414,
-0.09889030456542969,
0.25964003801345825,
-0.04391871392726898,
-0.07259543985128403,
0.1684398055076599,
-0.02382824942469597,
0.11426962912082672,
-0.7611026167869568,
-0.24884247779846191,
-0.2706136107444763,
0.04479279741644859,
0.09483642131090164,
-0.38677334785461426,
-0.007349776104092598,
0.27033814787864685,
0.03034965693950653,
0.40496593713760376,
-0.00012022876035189256,
-0.06745294481515884,
-0.07974636554718018,
-0.06846103817224503,
0.11956532299518585,
0.05133283883333206,
0.2856762707233429,
-0.036716580390930176,
0.03238212317228317,
-0.3001784682273865,
-0.059303611516952515,
-0.12905514240264893,
0.01963169500231743,
-0.10994647443294525,
0.6139712929725647,
-0.018123874440789223,
0.1578734666109085,
0.23834949731826782,
-0.11117172241210938,
-0.011715015396475792,
-0.007914744317531586,
0.023497439920902252,
0.02816689945757389,
0.30590516328811646,
0.13348115980625153,
-0.23994536697864532,
-0.34937331080436707,
0.4579470455646515,
-0.3030816912651062,
0.1392766237258911,
0.01666869968175888,
-0.051628969609737396,
0.32180172204971313,
-0.24838316440582275,
0.20118966698646545,
-0.17308327555656433,
0.06411737203598022,
-0.34846460819244385,
-0.10883326083421707,
-0.24871209263801575,
-0.10952730476856232,
-0.4106726050376892,
0.06099051609635353,
0.09674844890832901,
0.10890798270702362,
0.026956239715218544,
-0.27398476004600525,
-0.06649918854236603,
0.14128470420837402,
-0.14327530562877655,
0.03828178346157074,
0.4747564494609833,
0.05626406520605087,
0.22025230526924133,
-0.057733047753572464,
0.24356576800346375,
-0.19938533008098602,
0.14177067577838898,
-0.1300395280122757,
0.1745370626449585,
-0.43984460830688477,
0.11566857993602753,
0.14330609142780304,
-0.209055095911026,
0.024339046329259872,
0.10905151814222336,
-0.12433233857154846,
0.23093116283416748,
0.22433876991271973,
0.10604588687419891,
0.060123030096292496,
0.3098628520965576,
-0.08669719845056534,
0.3744441270828247,
0.10358639061450958,
-0.1965591311454773,
-0.6160253882408142,
-0.08625657856464386,
-0.20179012417793274,
0.07781658321619034,
0.22058488428592682,
0.17024904489517212,
-0.10253164917230606,
0.012299779802560806,
0.044282421469688416,
-0.02845114842057228,
-0.17283770442008972,
-0.07353297621011734,
0.0968012809753418,
0.5739808082580566,
-0.07143517583608627,
0.25668764114379883,
-0.11808566004037857,
-0.006592448800802231,
-0.38013362884521484,
0.013272452168166637,
-0.3216530680656433,
-0.1732417643070221,
-0.2774774730205536,
0.20311453938484192,
0.01848561316728592,
0.07082499563694,
0.4116789400577545,
0.16054722666740417,
0.011805791407823563,
-0.45755454897880554,
0.3853898346424103,
-0.11114832758903503,
0.2431279420852661,
0.176128551363945,
-0.08562895655632019,
0.1351293921470642,
0.2466432899236679,
0.1281871497631073,
-0.08739759027957916,
0.0006479993462562561,
-0.5313716530799866,
-0.3649708330631256,
0.14562158286571503,
0.11860837787389755,
0.14024010300636292,
0.288313627243042,
-0.07901933044195175,
0.09309235215187073,
0.7046102285385132,
-0.09935217350721359,
0.041614484041929245,
-0.22417287528514862,
-0.45162996649742126,
-0.2274848222732544,
0.22911718487739563,
0.6116637587547302,
0.28460314869880676,
-0.33179622888565063,
0.5714660882949829,
-0.007613465189933777,
0.4277889132499695,
0.38438111543655396,
-0.2220253348350525,
0.3704083561897278,
-0.44830065965652466,
0.078309565782547,
-0.03411845117807388,
-0.3772510588169098,
-0.2667810320854187,
0.2036007046699524,
-0.3337287902832031,
0.0992531105875969,
0.2808816432952881,
-0.07778441905975342,
0.35361701250076294,
0.07282757759094238,
0.31960195302963257,
0.10974330455064774,
-0.07788179069757462,
0.4438730776309967,
-0.2902151942253113,
0.10684908926486969,
0.21163427829742432,
0.025167714804410934,
0.2223883867263794,
-0.03585437685251236,
-0.02597774565219879,
0.2967053949832916,
0.3804553747177124,
-0.04892706498503685,
-0.04421497881412506,
0.14151602983474731,
-0.011258792132139206,
-0.03928835690021515,
0.2919258773326874,
-0.09925562888383865,
-0.29913392663002014,
0.16674301028251648,
-0.3511194586753845,
-0.2544431686401367,
-0.10386112332344055,
-0.24412000179290771,
0.1594027876853943,
-0.05586506426334381,
-0.4145635962486267,
-0.46748611330986023,
0.07654792070388794,
0.22834432125091553,
0.08982972800731659,
-0.053298790007829666,
-0.0945993959903717,
0.4571542739868164,
0.012432338669896126,
0.035094503313302994,
-0.04455983266234398,
0.07420767098665237,
-0.15006963908672333,
-0.09674601256847382,
-0.162162184715271,
0.2368628978729248,
0.39320555329322815,
-0.3002193570137024,
-0.17959076166152954,
0.28425005078315735,
0.3580456078052521,
0.13826946914196014,
-0.16454336047172546,
0.11552415788173676,
0.3385787606239319,
0.12245406210422516,
-0.017214657738804817,
0.01606643572449684,
-0.06826356798410416,
-0.22528767585754395,
0.20385020971298218,
0.35277634859085083,
0.484920471906662,
-0.12337177246809006,
-0.034277014434337616,
-0.15239447355270386,
0.2829717695713043,
-0.05258532986044884,
0.13655191659927368,
-0.1247701644897461,
0.217421755194664,
0.18211017549037933,
0.42278817296028137,
0.06633453816175461,
-0.12069513648748398,
0.11235329508781433,
0.325259268283844,
0.22571143507957458,
0.0811915248632431,
-0.19530335068702698,
-0.24389144778251648,
-0.19590303301811218,
0.013420352712273598,
-0.018292058259248734,
0.31153106689453125,
0.09237472712993622,
0.07642772793769836,
0.015604528598487377,
-0.026351667940616608,
-0.08221028000116348,
0.036613427102565765,
-0.20151109993457794,
0.15320996940135956,
0.39694446325302124,
0.08528829365968704,
0.10185463726520538,
-0.3077107071876526,
0.006156090646982193,
0.43363648653030396,
0.18921098113059998,
-0.21351787447929382,
0.19208770990371704,
-0.28107360005378723,
-0.16501346230506897,
-0.20298297703266144,
0.20734520256519318,
-0.23630112409591675,
0.005958147346973419,
-0.03685441613197327,
0.2263294905424118,
0.08204196393489838,
0.3846437335014343,
0.1057349145412445,
0.11133522540330887,
0.00780126266181469,
0.022569939494132996,
-0.07259080559015274,
-0.22445859014987946,
-0.1435757875442505,
-0.09809231758117676,
0.3343484699726105,
-0.2502892315387726,
0.4477265477180481,
-0.02047966979444027,
-0.25345635414123535,
-0.33993831276893616,
-0.224345862865448,
0.18531471490859985,
0.25860124826431274,
-0.16358110308647156,
-0.09631936252117157,
-0.21542875468730927,
-0.26505810022354126,
-0.12395813316106796,
0.30233344435691833,
-0.5098353028297424,
-0.304658979177475,
0.0070334505289793015,
-0.25788530707359314,
-0.2725446820259094,
-0.1710672825574875,
-0.1330353021621704,
-0.13823741674423218,
-0.08716447651386261,
0.19291286170482635,
-0.2887360155582428,
0.21674269437789917,
-0.04700677469372749,
-0.30904826521873474,
-0.02892640233039856,
-0.28513479232788086,
0.017982210963964462,
-0.21558639407157898,
-0.23655584454536438,
-0.10500733554363251,
-0.26852717995643616,
-0.23564742505550385,
-0.12221486866474152,
0.0008557494729757309,
0.20128534734249115,
0.4119444489479065,
-0.4336654543876648,
-0.3104481101036072,
0.15589064359664917,
-0.1283714324235916,
-0.2194029688835144,
-0.037321098148822784,
0.37480467557907104,
-0.011696506291627884,
0.022275617346167564,
0.09588142484426498,
-0.0826701670885086,
0.19811038672924042,
-0.06445714086294174,
0.19077414274215698,
-0.14168283343315125,
0.34291335940361023,
0.08204792439937592,
0.841236412525177,
0.20124438405036926,
-0.10022042691707611,
0.22882649302482605,
-0.1375921368598938,
-0.025829974561929703,
-0.12443707138299942,
-0.40511682629585266,
0.0761771872639656,
-0.3777608573436737,
-0.12231571972370148,
0.25022268295288086,
-0.04885917901992798,
-0.29183658957481384,
0.053366728127002716,
-0.010636987164616585,
-0.14385804533958435,
-0.1018432229757309,
0.11740690469741821,
-0.24396640062332153,
0.3828038275241852,
0.030043113976716995,
-0.008126728236675262,
-0.33985650539398193,
0.04695712774991989,
0.19935403764247894,
0.14448904991149902,
0.12480844557285309,
-0.05243498831987381,
-0.30122268199920654,
0.09647369384765625,
-0.3376227617263794,
0.12851986289024353,
0.24279223382472992,
0.24294409155845642,
-0.11271829903125763,
0.19846460223197937,
0.17921248078346252,
-0.1724768728017807,
0.7401276230812073,
0.21027904748916626,
0.30957692861557007,
0.1862887740135193,
-0.46424397826194763,
-0.06042446941137314,
-0.18363957107067108,
-0.002783574163913727,
0.3928457796573639,
0.5032209753990173,
0.6813004612922668,
-0.2091369330883026,
-0.256239652633667,
-0.3648524880409241,
-0.037955258041620255,
-0.2327728569507599,
-0.0968843325972557,
-0.33611148595809937,
0.03080381453037262,
-0.4779038727283478,
0.48406174778938293,
0.06188760697841644,
0.12470290809869766,
-0.008903897367417812,
-0.18272288143634796,
-0.106925830245018,
0.023591727018356323,
-0.20271848142147064,
0.0462450347840786,
0.48278936743736267,
0.010333196260035038,
0.1607866734266281,
0.07761543989181519,
0.3013530373573303,
0.029810618609189987,
0.23789483308792114,
-0.15425027906894684,
-0.17290619015693665,
0.32635846734046936,
0.11323625594377518,
0.09533201158046722,
0.36496371030807495,
-0.003815061878412962,
0.2932938039302826,
-0.07065172493457794,
0.24692176282405853,
-0.09713833034038544,
0.2614270746707916,
0.09047085046768188,
0.1561492532491684,
-0.28974729776382446,
-0.3219496011734009,
-0.0017900243401527405,
0.15546612441539764,
-0.18543726205825806,
0.48697078227996826,
-0.5467326045036316,
-0.24589474499225616,
0.3748255968093872,
0.028168410062789917,
0.7292395830154419,
-0.27318310737609863,
0.22707568109035492,
-0.023911699652671814,
0.012094005942344666,
0.06532153487205505,
-0.46059292554855347,
0.2139020562171936,
-0.6263120174407959,
-0.16144435107707977,
0.11095421016216278,
-0.17721451818943024,
-0.12393488734960556,
0.20826828479766846,
-0.006675563752651215,
0.09716420620679855,
0.2141609638929367,
0.43509405851364136,
-0.01691732555627823,
0.3878847062587738,
0.3363249599933624,
-0.3557000756263733,
-0.11997044086456299,
0.011548534035682678,
-0.2056383341550827,
0.15439462661743164,
-0.26111912727355957,
0.03370009362697601,
0.32569620013237,
-0.23969176411628723,
-0.17253819108009338,
0.1418047845363617,
-0.7761969566345215,
0.46274179220199585,
-0.06683702766895294,
-0.06029793620109558,
-0.22626690566539764,
0.2843300402164459,
0.18346750736236572,
0.04546267166733742,
-0.08250682055950165,
0.08563929796218872,
0.06304508447647095,
0.03802204132080078,
-0.20108628273010254,
-0.32536423206329346,
0.25595423579216003,
-0.11559349298477173,
-0.13186891376972198,
-0.2528047263622284,
-0.07012693583965302,
-0.3225020170211792,
0.019188061356544495,
0.282076895236969,
0.24348793923854828,
0.2463524490594864,
0.11438222229480743,
-0.019210167229175568,
0.08671122789382935,
-0.22967836260795593,
0.05143926665186882,
0.20878003537654877,
-0.23998567461967468,
0.057322777807712555,
-0.15889297425746918,
-0.2739484906196594,
0.005907759070396423,
0.36906394362449646,
-0.047968849539756775,
-0.17943653464317322,
0.3894452452659607,
0.023575332015752792,
-0.1455717384815216,
-0.22797292470932007,
-0.21925386786460876,
0.018073752522468567,
-0.27380067110061646,
0.051685139536857605,
-0.1685423105955124,
-0.0860263854265213,
0.02959470823407173,
-0.08195032179355621,
0.13399942219257355,
0.05765344947576523,
0.04701399430632591,
-0.3299924433231354,
-0.5211125612258911,
-0.13529151678085327,
-0.33454394340515137,
-0.025219205766916275,
0.4540756940841675,
0.2397463619709015,
0.05641387403011322,
0.6061373949050903,
-0.25133293867111206,
0.11439138650894165,
-0.10839302092790604,
0.08362506330013275,
-0.10703356564044952,
-0.16602849960327148,
-0.02615215629339218,
0.06860806047916412,
0.009449752047657967,
0.3960006833076477,
-0.11843399703502655,
-0.18266427516937256,
-0.22366327047348022,
0.16793328523635864,
0.10260537266731262,
0.014143198728561401,
0.007179386913776398,
-0.01431187242269516,
0.05509825423359871,
-0.2617299556732178,
0.31867706775665283,
0.32030728459358215,
0.08465474843978882,
-0.11269460618495941,
0.5118354558944702,
0.1823062002658844,
-0.14583750069141388,
0.021384533494710922,
-0.1446274369955063,
-0.2824772000312805,
0.1701793670654297,
0.0950300395488739,
-0.21231314539909363,
0.005074687302112579,
-0.038573961704969406,
-0.027560152113437653,
0.3689699172973633,
-0.011591475456953049,
0.24971148371696472,
-0.1424720287322998,
-0.30029863119125366,
0.2718724012374878,
0.08164539188146591,
-0.012097857892513275,
-0.15798130631446838,
-0.07591915130615234,
0.2782089412212372,
0.13029834628105164,
-0.21431215107440948,
-0.13035249710083008,
0.4660523235797882,
-0.10634772479534149,
-0.13485637307167053,
0.3298299312591553,
0.6135550737380981,
-0.07116793096065521,
0.098451629281044,
0.18683698773384094,
0.4662506580352783,
-0.4576020836830139,
0.1631399542093277,
-0.43481072783470154,
0.07324163615703583,
0.26349472999572754,
0.40871483087539673,
0.15014201402664185,
0.08214005827903748,
0.05485580116510391,
0.24244672060012817,
0.3560941517353058,
0.02404046803712845,
0.19336290657520294,
0.12317851185798645,
-0.3687792122364044,
-0.14895065128803253,
0.05021548271179199,
-0.3482202887535095,
0.07378604263067245,
-0.35117223858833313,
0.38534078001976013,
-0.11286917328834534,
-0.5411105155944824,
-0.28075259923934937,
0.49619078636169434,
-0.4421316981315613,
-0.14366039633750916,
0.06101211905479431,
0.027998633682727814,
0.06696312129497528,
0.12866507470607758,
0.06855310499668121,
0.17922168970108032,
0.27044594287872314,
0.03389718756079674,
-0.1840486377477646,
0.10322447866201401,
-0.39150384068489075,
0.23166272044181824,
0.3441035747528076,
-0.42772385478019714,
0.27922323346138,
0.029076606035232544,
-0.1717248409986496,
-0.2646332085132599,
0.11710523813962936,
0.4471123218536377,
0.31605884432792664,
-0.019119281321763992,
-0.04952135682106018,
0.22745637595653534,
0.2581709921360016,
-0.25035560131073,
0.3680810332298279,
0.09269092231988907,
-0.22827906906604767,
0.017481718212366104,
-0.0073931291699409485,
-0.1691623032093048,
-0.20156553387641907,
0.3039216995239258,
0.10028478503227234,
0.22948098182678223,
0.3296394646167755,
-0.11683952808380127,
-0.15457302331924438,
0.0382242314517498,
0.3113919496536255,
-0.44804471731185913,
0.05044309422373772,
0.3963662385940552,
-0.06050049141049385,
0.2445765733718872,
-0.08968571573495865,
0.07809961587190628,
0.12276950478553772,
0.4048783779144287,
0.26773348450660706,
0.014105439186096191,
-0.6027412414550781,
-0.2123679518699646,
-0.6123625040054321,
0.47627103328704834,
0.060212522745132446,
0.1949922740459442,
-0.09128660708665848,
0.07728956639766693,
-0.09808412939310074,
-0.20548053085803986,
-0.1723083108663559,
-0.15723510086536407,
0.3336084485054016,
0.2122882753610611,
-0.5281357169151306,
0.22223004698753357,
-0.35339057445526123,
0.04240747541189194,
0.27778762578964233,
-0.30594807863235474,
0.28360092639923096,
0.1268029510974884,
0.015467420220375061,
-0.05762706696987152,
-0.09035207331180573,
0.0522414930164814,
0.007565926760435104,
0.2732497453689575,
0.1720665544271469,
0.46106404066085815,
-0.006820768117904663,
0.12447456270456314,
-0.0342303104698658,
0.05025354027748108,
-0.22705501317977905,
-0.06911665946245193,
0.035690195858478546,
0.2862485349178314,
-0.17400449514389038,
-0.3253370523452759,
-0.39855721592903137,
0.23422841727733612,
0.13533633947372437,
-0.3962313234806061,
-0.2066459059715271,
0.11177469044923782,
0.06067395210266113,
0.04118090122938156,
0.25915226340293884,
0.6599974632263184,
0.12293224036693573,
0.30500367283821106,
-0.22494186460971832,
-0.21156193315982819,
0.303025484085083,
-0.590372622013092,
-0.20627836883068085,
-0.2685422897338867,
0.46421340107917786,
-0.0499768927693367,
0.05002613365650177,
-0.38105395436286926,
-0.0484163761138916,
0.2248927503824234,
-0.04512999951839447,
-0.36923453211784363,
0.1602446734905243,
-0.03364870324730873,
-0.09397528320550919,
-0.13484475016593933,
0.2524985671043396,
0.03010571002960205,
-0.3380372226238251,
0.02727976068854332,
-0.1845487654209137
] |
https://github.com/huggingface/datasets/issues/6369
|
Multi process map did not load cache file correctly
|
The issue may be related to problems previously discussed in GitHub issues [#3847](https://github.com/huggingface/datasets/issues/3847) and [#6318](https://github.com/huggingface/datasets/pull/6318).
This arises from the fact that tokenizer.tokens_trie._tokens is an unordered set, leading to varying hash results:
`value = hash_bytes(dumps(tokenizer.tokens_trie._tokens))`
Consequently, this results in different outcomes each time for:
`new_fingerprint = update_fingerprint(datasets._fingerprint, transform, kwargs_for_fingerprint)`
To address this issue, it's essential to make `Trie._tokens` a deterministic set while ensuring a consistent order after the final update of `_tokens`.
|
### Describe the bug
When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process.


Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484)
### Steps to reproduce the bug
```
block_size = data_args.block_size
IGNORE_INDEX = -100
Ignore_Input = False
def tokenize_function(examples):
sources = []
targets = []
for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']):
source = instruction + inputs
target = f"{output}{tokenizer.eos_token}"
sources.append(source)
targets.append(target)
tokenized_sources = tokenizer(sources, return_attention_mask=False)
tokenized_targets = tokenizer(targets, return_attention_mask=False,
add_special_tokens=False
)
all_input_ids = []
all_labels = []
for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']):
if len(s) > block_size and Ignore_Input == False:
# print(s)
continue
input_ids = torch.LongTensor(s + t)[:block_size]
if Ignore_Input:
labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size]
else:
labels = input_ids
assert len(input_ids) == len(labels)
all_input_ids.append(input_ids)
all_labels.append(labels)
results = {
'input_ids': all_input_ids,
'labels': all_labels,
}
return results
with training_args.main_process_first(desc="dataset map tokenization ", local=False):
# print('local_rank',training_args.local_rank)
if not data_args.streaming:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=data_args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not data_args.overwrite_cache,
desc="Running tokenizer on dataset ",
)
else:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
remove_columns=column_names,
desc="Running tokenizer on dataset "
)
```
### Expected behavior
This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting
### Environment info
transformers == 4.34.1
datasets == 2.14.5
| 71
|
Multi process map did not load cache file correctly
### Describe the bug
When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process.


Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484)
### Steps to reproduce the bug
```
block_size = data_args.block_size
IGNORE_INDEX = -100
Ignore_Input = False
def tokenize_function(examples):
sources = []
targets = []
for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']):
source = instruction + inputs
target = f"{output}{tokenizer.eos_token}"
sources.append(source)
targets.append(target)
tokenized_sources = tokenizer(sources, return_attention_mask=False)
tokenized_targets = tokenizer(targets, return_attention_mask=False,
add_special_tokens=False
)
all_input_ids = []
all_labels = []
for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']):
if len(s) > block_size and Ignore_Input == False:
# print(s)
continue
input_ids = torch.LongTensor(s + t)[:block_size]
if Ignore_Input:
labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size]
else:
labels = input_ids
assert len(input_ids) == len(labels)
all_input_ids.append(input_ids)
all_labels.append(labels)
results = {
'input_ids': all_input_ids,
'labels': all_labels,
}
return results
with training_args.main_process_first(desc="dataset map tokenization ", local=False):
# print('local_rank',training_args.local_rank)
if not data_args.streaming:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=data_args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not data_args.overwrite_cache,
desc="Running tokenizer on dataset ",
)
else:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
remove_columns=column_names,
desc="Running tokenizer on dataset "
)
```
### Expected behavior
This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting
### Environment info
transformers == 4.34.1
datasets == 2.14.5
The issue may be related to problems previously discussed in GitHub issues [#3847](https://github.com/huggingface/datasets/issues/3847) and [#6318](https://github.com/huggingface/datasets/pull/6318).
This arises from the fact that tokenizer.tokens_trie._tokens is an unordered set, leading to varying hash results:
`value = hash_bytes(dumps(tokenizer.tokens_trie._tokens))`
Consequently, this results in different outcomes each time for:
`new_fingerprint = update_fingerprint(datasets._fingerprint, transform, kwargs_for_fingerprint)`
To address this issue, it's essential to make `Trie._tokens` a deterministic set while ensuring a consistent order after the final update of `_tokens`.
|
[
-0.37588390707969666,
-0.5878850221633911,
0.0327877476811409,
0.44652533531188965,
0.30833303928375244,
-0.06708860397338867,
0.384670615196228,
-0.023024436086416245,
0.11546272039413452,
-0.1306910514831543,
0.03220495581626892,
0.18396373093128204,
0.011364773847162724,
-0.16018825769424438,
0.2206813395023346,
-0.046393610537052155,
0.23309680819511414,
-0.09889030456542969,
0.25964003801345825,
-0.04391871392726898,
-0.07259543985128403,
0.1684398055076599,
-0.02382824942469597,
0.11426962912082672,
-0.7611026167869568,
-0.24884247779846191,
-0.2706136107444763,
0.04479279741644859,
0.09483642131090164,
-0.38677334785461426,
-0.007349776104092598,
0.27033814787864685,
0.03034965693950653,
0.40496593713760376,
-0.00012022876035189256,
-0.06745294481515884,
-0.07974636554718018,
-0.06846103817224503,
0.11956532299518585,
0.05133283883333206,
0.2856762707233429,
-0.036716580390930176,
0.03238212317228317,
-0.3001784682273865,
-0.059303611516952515,
-0.12905514240264893,
0.01963169500231743,
-0.10994647443294525,
0.6139712929725647,
-0.018123874440789223,
0.1578734666109085,
0.23834949731826782,
-0.11117172241210938,
-0.011715015396475792,
-0.007914744317531586,
0.023497439920902252,
0.02816689945757389,
0.30590516328811646,
0.13348115980625153,
-0.23994536697864532,
-0.34937331080436707,
0.4579470455646515,
-0.3030816912651062,
0.1392766237258911,
0.01666869968175888,
-0.051628969609737396,
0.32180172204971313,
-0.24838316440582275,
0.20118966698646545,
-0.17308327555656433,
0.06411737203598022,
-0.34846460819244385,
-0.10883326083421707,
-0.24871209263801575,
-0.10952730476856232,
-0.4106726050376892,
0.06099051609635353,
0.09674844890832901,
0.10890798270702362,
0.026956239715218544,
-0.27398476004600525,
-0.06649918854236603,
0.14128470420837402,
-0.14327530562877655,
0.03828178346157074,
0.4747564494609833,
0.05626406520605087,
0.22025230526924133,
-0.057733047753572464,
0.24356576800346375,
-0.19938533008098602,
0.14177067577838898,
-0.1300395280122757,
0.1745370626449585,
-0.43984460830688477,
0.11566857993602753,
0.14330609142780304,
-0.209055095911026,
0.024339046329259872,
0.10905151814222336,
-0.12433233857154846,
0.23093116283416748,
0.22433876991271973,
0.10604588687419891,
0.060123030096292496,
0.3098628520965576,
-0.08669719845056534,
0.3744441270828247,
0.10358639061450958,
-0.1965591311454773,
-0.6160253882408142,
-0.08625657856464386,
-0.20179012417793274,
0.07781658321619034,
0.22058488428592682,
0.17024904489517212,
-0.10253164917230606,
0.012299779802560806,
0.044282421469688416,
-0.02845114842057228,
-0.17283770442008972,
-0.07353297621011734,
0.0968012809753418,
0.5739808082580566,
-0.07143517583608627,
0.25668764114379883,
-0.11808566004037857,
-0.006592448800802231,
-0.38013362884521484,
0.013272452168166637,
-0.3216530680656433,
-0.1732417643070221,
-0.2774774730205536,
0.20311453938484192,
0.01848561316728592,
0.07082499563694,
0.4116789400577545,
0.16054722666740417,
0.011805791407823563,
-0.45755454897880554,
0.3853898346424103,
-0.11114832758903503,
0.2431279420852661,
0.176128551363945,
-0.08562895655632019,
0.1351293921470642,
0.2466432899236679,
0.1281871497631073,
-0.08739759027957916,
0.0006479993462562561,
-0.5313716530799866,
-0.3649708330631256,
0.14562158286571503,
0.11860837787389755,
0.14024010300636292,
0.288313627243042,
-0.07901933044195175,
0.09309235215187073,
0.7046102285385132,
-0.09935217350721359,
0.041614484041929245,
-0.22417287528514862,
-0.45162996649742126,
-0.2274848222732544,
0.22911718487739563,
0.6116637587547302,
0.28460314869880676,
-0.33179622888565063,
0.5714660882949829,
-0.007613465189933777,
0.4277889132499695,
0.38438111543655396,
-0.2220253348350525,
0.3704083561897278,
-0.44830065965652466,
0.078309565782547,
-0.03411845117807388,
-0.3772510588169098,
-0.2667810320854187,
0.2036007046699524,
-0.3337287902832031,
0.0992531105875969,
0.2808816432952881,
-0.07778441905975342,
0.35361701250076294,
0.07282757759094238,
0.31960195302963257,
0.10974330455064774,
-0.07788179069757462,
0.4438730776309967,
-0.2902151942253113,
0.10684908926486969,
0.21163427829742432,
0.025167714804410934,
0.2223883867263794,
-0.03585437685251236,
-0.02597774565219879,
0.2967053949832916,
0.3804553747177124,
-0.04892706498503685,
-0.04421497881412506,
0.14151602983474731,
-0.011258792132139206,
-0.03928835690021515,
0.2919258773326874,
-0.09925562888383865,
-0.29913392663002014,
0.16674301028251648,
-0.3511194586753845,
-0.2544431686401367,
-0.10386112332344055,
-0.24412000179290771,
0.1594027876853943,
-0.05586506426334381,
-0.4145635962486267,
-0.46748611330986023,
0.07654792070388794,
0.22834432125091553,
0.08982972800731659,
-0.053298790007829666,
-0.0945993959903717,
0.4571542739868164,
0.012432338669896126,
0.035094503313302994,
-0.04455983266234398,
0.07420767098665237,
-0.15006963908672333,
-0.09674601256847382,
-0.162162184715271,
0.2368628978729248,
0.39320555329322815,
-0.3002193570137024,
-0.17959076166152954,
0.28425005078315735,
0.3580456078052521,
0.13826946914196014,
-0.16454336047172546,
0.11552415788173676,
0.3385787606239319,
0.12245406210422516,
-0.017214657738804817,
0.01606643572449684,
-0.06826356798410416,
-0.22528767585754395,
0.20385020971298218,
0.35277634859085083,
0.484920471906662,
-0.12337177246809006,
-0.034277014434337616,
-0.15239447355270386,
0.2829717695713043,
-0.05258532986044884,
0.13655191659927368,
-0.1247701644897461,
0.217421755194664,
0.18211017549037933,
0.42278817296028137,
0.06633453816175461,
-0.12069513648748398,
0.11235329508781433,
0.325259268283844,
0.22571143507957458,
0.0811915248632431,
-0.19530335068702698,
-0.24389144778251648,
-0.19590303301811218,
0.013420352712273598,
-0.018292058259248734,
0.31153106689453125,
0.09237472712993622,
0.07642772793769836,
0.015604528598487377,
-0.026351667940616608,
-0.08221028000116348,
0.036613427102565765,
-0.20151109993457794,
0.15320996940135956,
0.39694446325302124,
0.08528829365968704,
0.10185463726520538,
-0.3077107071876526,
0.006156090646982193,
0.43363648653030396,
0.18921098113059998,
-0.21351787447929382,
0.19208770990371704,
-0.28107360005378723,
-0.16501346230506897,
-0.20298297703266144,
0.20734520256519318,
-0.23630112409591675,
0.005958147346973419,
-0.03685441613197327,
0.2263294905424118,
0.08204196393489838,
0.3846437335014343,
0.1057349145412445,
0.11133522540330887,
0.00780126266181469,
0.022569939494132996,
-0.07259080559015274,
-0.22445859014987946,
-0.1435757875442505,
-0.09809231758117676,
0.3343484699726105,
-0.2502892315387726,
0.4477265477180481,
-0.02047966979444027,
-0.25345635414123535,
-0.33993831276893616,
-0.224345862865448,
0.18531471490859985,
0.25860124826431274,
-0.16358110308647156,
-0.09631936252117157,
-0.21542875468730927,
-0.26505810022354126,
-0.12395813316106796,
0.30233344435691833,
-0.5098353028297424,
-0.304658979177475,
0.0070334505289793015,
-0.25788530707359314,
-0.2725446820259094,
-0.1710672825574875,
-0.1330353021621704,
-0.13823741674423218,
-0.08716447651386261,
0.19291286170482635,
-0.2887360155582428,
0.21674269437789917,
-0.04700677469372749,
-0.30904826521873474,
-0.02892640233039856,
-0.28513479232788086,
0.017982210963964462,
-0.21558639407157898,
-0.23655584454536438,
-0.10500733554363251,
-0.26852717995643616,
-0.23564742505550385,
-0.12221486866474152,
0.0008557494729757309,
0.20128534734249115,
0.4119444489479065,
-0.4336654543876648,
-0.3104481101036072,
0.15589064359664917,
-0.1283714324235916,
-0.2194029688835144,
-0.037321098148822784,
0.37480467557907104,
-0.011696506291627884,
0.022275617346167564,
0.09588142484426498,
-0.0826701670885086,
0.19811038672924042,
-0.06445714086294174,
0.19077414274215698,
-0.14168283343315125,
0.34291335940361023,
0.08204792439937592,
0.841236412525177,
0.20124438405036926,
-0.10022042691707611,
0.22882649302482605,
-0.1375921368598938,
-0.025829974561929703,
-0.12443707138299942,
-0.40511682629585266,
0.0761771872639656,
-0.3777608573436737,
-0.12231571972370148,
0.25022268295288086,
-0.04885917901992798,
-0.29183658957481384,
0.053366728127002716,
-0.010636987164616585,
-0.14385804533958435,
-0.1018432229757309,
0.11740690469741821,
-0.24396640062332153,
0.3828038275241852,
0.030043113976716995,
-0.008126728236675262,
-0.33985650539398193,
0.04695712774991989,
0.19935403764247894,
0.14448904991149902,
0.12480844557285309,
-0.05243498831987381,
-0.30122268199920654,
0.09647369384765625,
-0.3376227617263794,
0.12851986289024353,
0.24279223382472992,
0.24294409155845642,
-0.11271829903125763,
0.19846460223197937,
0.17921248078346252,
-0.1724768728017807,
0.7401276230812073,
0.21027904748916626,
0.30957692861557007,
0.1862887740135193,
-0.46424397826194763,
-0.06042446941137314,
-0.18363957107067108,
-0.002783574163913727,
0.3928457796573639,
0.5032209753990173,
0.6813004612922668,
-0.2091369330883026,
-0.256239652633667,
-0.3648524880409241,
-0.037955258041620255,
-0.2327728569507599,
-0.0968843325972557,
-0.33611148595809937,
0.03080381453037262,
-0.4779038727283478,
0.48406174778938293,
0.06188760697841644,
0.12470290809869766,
-0.008903897367417812,
-0.18272288143634796,
-0.106925830245018,
0.023591727018356323,
-0.20271848142147064,
0.0462450347840786,
0.48278936743736267,
0.010333196260035038,
0.1607866734266281,
0.07761543989181519,
0.3013530373573303,
0.029810618609189987,
0.23789483308792114,
-0.15425027906894684,
-0.17290619015693665,
0.32635846734046936,
0.11323625594377518,
0.09533201158046722,
0.36496371030807495,
-0.003815061878412962,
0.2932938039302826,
-0.07065172493457794,
0.24692176282405853,
-0.09713833034038544,
0.2614270746707916,
0.09047085046768188,
0.1561492532491684,
-0.28974729776382446,
-0.3219496011734009,
-0.0017900243401527405,
0.15546612441539764,
-0.18543726205825806,
0.48697078227996826,
-0.5467326045036316,
-0.24589474499225616,
0.3748255968093872,
0.028168410062789917,
0.7292395830154419,
-0.27318310737609863,
0.22707568109035492,
-0.023911699652671814,
0.012094005942344666,
0.06532153487205505,
-0.46059292554855347,
0.2139020562171936,
-0.6263120174407959,
-0.16144435107707977,
0.11095421016216278,
-0.17721451818943024,
-0.12393488734960556,
0.20826828479766846,
-0.006675563752651215,
0.09716420620679855,
0.2141609638929367,
0.43509405851364136,
-0.01691732555627823,
0.3878847062587738,
0.3363249599933624,
-0.3557000756263733,
-0.11997044086456299,
0.011548534035682678,
-0.2056383341550827,
0.15439462661743164,
-0.26111912727355957,
0.03370009362697601,
0.32569620013237,
-0.23969176411628723,
-0.17253819108009338,
0.1418047845363617,
-0.7761969566345215,
0.46274179220199585,
-0.06683702766895294,
-0.06029793620109558,
-0.22626690566539764,
0.2843300402164459,
0.18346750736236572,
0.04546267166733742,
-0.08250682055950165,
0.08563929796218872,
0.06304508447647095,
0.03802204132080078,
-0.20108628273010254,
-0.32536423206329346,
0.25595423579216003,
-0.11559349298477173,
-0.13186891376972198,
-0.2528047263622284,
-0.07012693583965302,
-0.3225020170211792,
0.019188061356544495,
0.282076895236969,
0.24348793923854828,
0.2463524490594864,
0.11438222229480743,
-0.019210167229175568,
0.08671122789382935,
-0.22967836260795593,
0.05143926665186882,
0.20878003537654877,
-0.23998567461967468,
0.057322777807712555,
-0.15889297425746918,
-0.2739484906196594,
0.005907759070396423,
0.36906394362449646,
-0.047968849539756775,
-0.17943653464317322,
0.3894452452659607,
0.023575332015752792,
-0.1455717384815216,
-0.22797292470932007,
-0.21925386786460876,
0.018073752522468567,
-0.27380067110061646,
0.051685139536857605,
-0.1685423105955124,
-0.0860263854265213,
0.02959470823407173,
-0.08195032179355621,
0.13399942219257355,
0.05765344947576523,
0.04701399430632591,
-0.3299924433231354,
-0.5211125612258911,
-0.13529151678085327,
-0.33454394340515137,
-0.025219205766916275,
0.4540756940841675,
0.2397463619709015,
0.05641387403011322,
0.6061373949050903,
-0.25133293867111206,
0.11439138650894165,
-0.10839302092790604,
0.08362506330013275,
-0.10703356564044952,
-0.16602849960327148,
-0.02615215629339218,
0.06860806047916412,
0.009449752047657967,
0.3960006833076477,
-0.11843399703502655,
-0.18266427516937256,
-0.22366327047348022,
0.16793328523635864,
0.10260537266731262,
0.014143198728561401,
0.007179386913776398,
-0.01431187242269516,
0.05509825423359871,
-0.2617299556732178,
0.31867706775665283,
0.32030728459358215,
0.08465474843978882,
-0.11269460618495941,
0.5118354558944702,
0.1823062002658844,
-0.14583750069141388,
0.021384533494710922,
-0.1446274369955063,
-0.2824772000312805,
0.1701793670654297,
0.0950300395488739,
-0.21231314539909363,
0.005074687302112579,
-0.038573961704969406,
-0.027560152113437653,
0.3689699172973633,
-0.011591475456953049,
0.24971148371696472,
-0.1424720287322998,
-0.30029863119125366,
0.2718724012374878,
0.08164539188146591,
-0.012097857892513275,
-0.15798130631446838,
-0.07591915130615234,
0.2782089412212372,
0.13029834628105164,
-0.21431215107440948,
-0.13035249710083008,
0.4660523235797882,
-0.10634772479534149,
-0.13485637307167053,
0.3298299312591553,
0.6135550737380981,
-0.07116793096065521,
0.098451629281044,
0.18683698773384094,
0.4662506580352783,
-0.4576020836830139,
0.1631399542093277,
-0.43481072783470154,
0.07324163615703583,
0.26349472999572754,
0.40871483087539673,
0.15014201402664185,
0.08214005827903748,
0.05485580116510391,
0.24244672060012817,
0.3560941517353058,
0.02404046803712845,
0.19336290657520294,
0.12317851185798645,
-0.3687792122364044,
-0.14895065128803253,
0.05021548271179199,
-0.3482202887535095,
0.07378604263067245,
-0.35117223858833313,
0.38534078001976013,
-0.11286917328834534,
-0.5411105155944824,
-0.28075259923934937,
0.49619078636169434,
-0.4421316981315613,
-0.14366039633750916,
0.06101211905479431,
0.027998633682727814,
0.06696312129497528,
0.12866507470607758,
0.06855310499668121,
0.17922168970108032,
0.27044594287872314,
0.03389718756079674,
-0.1840486377477646,
0.10322447866201401,
-0.39150384068489075,
0.23166272044181824,
0.3441035747528076,
-0.42772385478019714,
0.27922323346138,
0.029076606035232544,
-0.1717248409986496,
-0.2646332085132599,
0.11710523813962936,
0.4471123218536377,
0.31605884432792664,
-0.019119281321763992,
-0.04952135682106018,
0.22745637595653534,
0.2581709921360016,
-0.25035560131073,
0.3680810332298279,
0.09269092231988907,
-0.22827906906604767,
0.017481718212366104,
-0.0073931291699409485,
-0.1691623032093048,
-0.20156553387641907,
0.3039216995239258,
0.10028478503227234,
0.22948098182678223,
0.3296394646167755,
-0.11683952808380127,
-0.15457302331924438,
0.0382242314517498,
0.3113919496536255,
-0.44804471731185913,
0.05044309422373772,
0.3963662385940552,
-0.06050049141049385,
0.2445765733718872,
-0.08968571573495865,
0.07809961587190628,
0.12276950478553772,
0.4048783779144287,
0.26773348450660706,
0.014105439186096191,
-0.6027412414550781,
-0.2123679518699646,
-0.6123625040054321,
0.47627103328704834,
0.060212522745132446,
0.1949922740459442,
-0.09128660708665848,
0.07728956639766693,
-0.09808412939310074,
-0.20548053085803986,
-0.1723083108663559,
-0.15723510086536407,
0.3336084485054016,
0.2122882753610611,
-0.5281357169151306,
0.22223004698753357,
-0.35339057445526123,
0.04240747541189194,
0.27778762578964233,
-0.30594807863235474,
0.28360092639923096,
0.1268029510974884,
0.015467420220375061,
-0.05762706696987152,
-0.09035207331180573,
0.0522414930164814,
0.007565926760435104,
0.2732497453689575,
0.1720665544271469,
0.46106404066085815,
-0.006820768117904663,
0.12447456270456314,
-0.0342303104698658,
0.05025354027748108,
-0.22705501317977905,
-0.06911665946245193,
0.035690195858478546,
0.2862485349178314,
-0.17400449514389038,
-0.3253370523452759,
-0.39855721592903137,
0.23422841727733612,
0.13533633947372437,
-0.3962313234806061,
-0.2066459059715271,
0.11177469044923782,
0.06067395210266113,
0.04118090122938156,
0.25915226340293884,
0.6599974632263184,
0.12293224036693573,
0.30500367283821106,
-0.22494186460971832,
-0.21156193315982819,
0.303025484085083,
-0.590372622013092,
-0.20627836883068085,
-0.2685422897338867,
0.46421340107917786,
-0.0499768927693367,
0.05002613365650177,
-0.38105395436286926,
-0.0484163761138916,
0.2248927503824234,
-0.04512999951839447,
-0.36923453211784363,
0.1602446734905243,
-0.03364870324730873,
-0.09397528320550919,
-0.13484475016593933,
0.2524985671043396,
0.03010571002960205,
-0.3380372226238251,
0.02727976068854332,
-0.1845487654209137
] |
https://github.com/huggingface/datasets/issues/6369
|
Multi process map did not load cache file correctly
|
We now sort `set` and `dict` items to make their hashes deterministic (install from `main` with `pip install git+https://github.com/huggingface/datasets` to test this). Consequently, this should also make the `tokenizer.tokens_trie`'s hash deterministic. Feel free to re-open the issue if this is not the case.
|
### Describe the bug
When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process.


Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484)
### Steps to reproduce the bug
```
block_size = data_args.block_size
IGNORE_INDEX = -100
Ignore_Input = False
def tokenize_function(examples):
sources = []
targets = []
for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']):
source = instruction + inputs
target = f"{output}{tokenizer.eos_token}"
sources.append(source)
targets.append(target)
tokenized_sources = tokenizer(sources, return_attention_mask=False)
tokenized_targets = tokenizer(targets, return_attention_mask=False,
add_special_tokens=False
)
all_input_ids = []
all_labels = []
for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']):
if len(s) > block_size and Ignore_Input == False:
# print(s)
continue
input_ids = torch.LongTensor(s + t)[:block_size]
if Ignore_Input:
labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size]
else:
labels = input_ids
assert len(input_ids) == len(labels)
all_input_ids.append(input_ids)
all_labels.append(labels)
results = {
'input_ids': all_input_ids,
'labels': all_labels,
}
return results
with training_args.main_process_first(desc="dataset map tokenization ", local=False):
# print('local_rank',training_args.local_rank)
if not data_args.streaming:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=data_args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not data_args.overwrite_cache,
desc="Running tokenizer on dataset ",
)
else:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
remove_columns=column_names,
desc="Running tokenizer on dataset "
)
```
### Expected behavior
This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting
### Environment info
transformers == 4.34.1
datasets == 2.14.5
| 43
|
Multi process map did not load cache file correctly
### Describe the bug
When I was training model on Multiple GPUs by DDP, the dataset is tokenized multiple times after main process.


Code is modified from [run_clm.py](https://github.com/huggingface/transformers/blob/7d8ff3629b2725ec43ace99c1a6e87ac1978d433/examples/pytorch/language-modeling/run_clm.py#L484)
### Steps to reproduce the bug
```
block_size = data_args.block_size
IGNORE_INDEX = -100
Ignore_Input = False
def tokenize_function(examples):
sources = []
targets = []
for instruction, inputs, output in zip(examples['instruction'], examples['input'], examples['output']):
source = instruction + inputs
target = f"{output}{tokenizer.eos_token}"
sources.append(source)
targets.append(target)
tokenized_sources = tokenizer(sources, return_attention_mask=False)
tokenized_targets = tokenizer(targets, return_attention_mask=False,
add_special_tokens=False
)
all_input_ids = []
all_labels = []
for s, t in zip(tokenized_sources['input_ids'], tokenized_targets['input_ids']):
if len(s) > block_size and Ignore_Input == False:
# print(s)
continue
input_ids = torch.LongTensor(s + t)[:block_size]
if Ignore_Input:
labels = torch.LongTensor([IGNORE_INDEX] * len(s) + t)[:block_size]
else:
labels = input_ids
assert len(input_ids) == len(labels)
all_input_ids.append(input_ids)
all_labels.append(labels)
results = {
'input_ids': all_input_ids,
'labels': all_labels,
}
return results
with training_args.main_process_first(desc="dataset map tokenization ", local=False):
# print('local_rank',training_args.local_rank)
if not data_args.streaming:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=data_args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not data_args.overwrite_cache,
desc="Running tokenizer on dataset ",
)
else:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
remove_columns=column_names,
desc="Running tokenizer on dataset "
)
```
### Expected behavior
This code should only tokenize the dataset in the main process, and the other processes load the dataset after waiting
### Environment info
transformers == 4.34.1
datasets == 2.14.5
We now sort `set` and `dict` items to make their hashes deterministic (install from `main` with `pip install git+https://github.com/huggingface/datasets` to test this). Consequently, this should also make the `tokenizer.tokens_trie`'s hash deterministic. Feel free to re-open the issue if this is not the case.
|
[
-0.37588390707969666,
-0.5878850221633911,
0.0327877476811409,
0.44652533531188965,
0.30833303928375244,
-0.06708860397338867,
0.384670615196228,
-0.023024436086416245,
0.11546272039413452,
-0.1306910514831543,
0.03220495581626892,
0.18396373093128204,
0.011364773847162724,
-0.16018825769424438,
0.2206813395023346,
-0.046393610537052155,
0.23309680819511414,
-0.09889030456542969,
0.25964003801345825,
-0.04391871392726898,
-0.07259543985128403,
0.1684398055076599,
-0.02382824942469597,
0.11426962912082672,
-0.7611026167869568,
-0.24884247779846191,
-0.2706136107444763,
0.04479279741644859,
0.09483642131090164,
-0.38677334785461426,
-0.007349776104092598,
0.27033814787864685,
0.03034965693950653,
0.40496593713760376,
-0.00012022876035189256,
-0.06745294481515884,
-0.07974636554718018,
-0.06846103817224503,
0.11956532299518585,
0.05133283883333206,
0.2856762707233429,
-0.036716580390930176,
0.03238212317228317,
-0.3001784682273865,
-0.059303611516952515,
-0.12905514240264893,
0.01963169500231743,
-0.10994647443294525,
0.6139712929725647,
-0.018123874440789223,
0.1578734666109085,
0.23834949731826782,
-0.11117172241210938,
-0.011715015396475792,
-0.007914744317531586,
0.023497439920902252,
0.02816689945757389,
0.30590516328811646,
0.13348115980625153,
-0.23994536697864532,
-0.34937331080436707,
0.4579470455646515,
-0.3030816912651062,
0.1392766237258911,
0.01666869968175888,
-0.051628969609737396,
0.32180172204971313,
-0.24838316440582275,
0.20118966698646545,
-0.17308327555656433,
0.06411737203598022,
-0.34846460819244385,
-0.10883326083421707,
-0.24871209263801575,
-0.10952730476856232,
-0.4106726050376892,
0.06099051609635353,
0.09674844890832901,
0.10890798270702362,
0.026956239715218544,
-0.27398476004600525,
-0.06649918854236603,
0.14128470420837402,
-0.14327530562877655,
0.03828178346157074,
0.4747564494609833,
0.05626406520605087,
0.22025230526924133,
-0.057733047753572464,
0.24356576800346375,
-0.19938533008098602,
0.14177067577838898,
-0.1300395280122757,
0.1745370626449585,
-0.43984460830688477,
0.11566857993602753,
0.14330609142780304,
-0.209055095911026,
0.024339046329259872,
0.10905151814222336,
-0.12433233857154846,
0.23093116283416748,
0.22433876991271973,
0.10604588687419891,
0.060123030096292496,
0.3098628520965576,
-0.08669719845056534,
0.3744441270828247,
0.10358639061450958,
-0.1965591311454773,
-0.6160253882408142,
-0.08625657856464386,
-0.20179012417793274,
0.07781658321619034,
0.22058488428592682,
0.17024904489517212,
-0.10253164917230606,
0.012299779802560806,
0.044282421469688416,
-0.02845114842057228,
-0.17283770442008972,
-0.07353297621011734,
0.0968012809753418,
0.5739808082580566,
-0.07143517583608627,
0.25668764114379883,
-0.11808566004037857,
-0.006592448800802231,
-0.38013362884521484,
0.013272452168166637,
-0.3216530680656433,
-0.1732417643070221,
-0.2774774730205536,
0.20311453938484192,
0.01848561316728592,
0.07082499563694,
0.4116789400577545,
0.16054722666740417,
0.011805791407823563,
-0.45755454897880554,
0.3853898346424103,
-0.11114832758903503,
0.2431279420852661,
0.176128551363945,
-0.08562895655632019,
0.1351293921470642,
0.2466432899236679,
0.1281871497631073,
-0.08739759027957916,
0.0006479993462562561,
-0.5313716530799866,
-0.3649708330631256,
0.14562158286571503,
0.11860837787389755,
0.14024010300636292,
0.288313627243042,
-0.07901933044195175,
0.09309235215187073,
0.7046102285385132,
-0.09935217350721359,
0.041614484041929245,
-0.22417287528514862,
-0.45162996649742126,
-0.2274848222732544,
0.22911718487739563,
0.6116637587547302,
0.28460314869880676,
-0.33179622888565063,
0.5714660882949829,
-0.007613465189933777,
0.4277889132499695,
0.38438111543655396,
-0.2220253348350525,
0.3704083561897278,
-0.44830065965652466,
0.078309565782547,
-0.03411845117807388,
-0.3772510588169098,
-0.2667810320854187,
0.2036007046699524,
-0.3337287902832031,
0.0992531105875969,
0.2808816432952881,
-0.07778441905975342,
0.35361701250076294,
0.07282757759094238,
0.31960195302963257,
0.10974330455064774,
-0.07788179069757462,
0.4438730776309967,
-0.2902151942253113,
0.10684908926486969,
0.21163427829742432,
0.025167714804410934,
0.2223883867263794,
-0.03585437685251236,
-0.02597774565219879,
0.2967053949832916,
0.3804553747177124,
-0.04892706498503685,
-0.04421497881412506,
0.14151602983474731,
-0.011258792132139206,
-0.03928835690021515,
0.2919258773326874,
-0.09925562888383865,
-0.29913392663002014,
0.16674301028251648,
-0.3511194586753845,
-0.2544431686401367,
-0.10386112332344055,
-0.24412000179290771,
0.1594027876853943,
-0.05586506426334381,
-0.4145635962486267,
-0.46748611330986023,
0.07654792070388794,
0.22834432125091553,
0.08982972800731659,
-0.053298790007829666,
-0.0945993959903717,
0.4571542739868164,
0.012432338669896126,
0.035094503313302994,
-0.04455983266234398,
0.07420767098665237,
-0.15006963908672333,
-0.09674601256847382,
-0.162162184715271,
0.2368628978729248,
0.39320555329322815,
-0.3002193570137024,
-0.17959076166152954,
0.28425005078315735,
0.3580456078052521,
0.13826946914196014,
-0.16454336047172546,
0.11552415788173676,
0.3385787606239319,
0.12245406210422516,
-0.017214657738804817,
0.01606643572449684,
-0.06826356798410416,
-0.22528767585754395,
0.20385020971298218,
0.35277634859085083,
0.484920471906662,
-0.12337177246809006,
-0.034277014434337616,
-0.15239447355270386,
0.2829717695713043,
-0.05258532986044884,
0.13655191659927368,
-0.1247701644897461,
0.217421755194664,
0.18211017549037933,
0.42278817296028137,
0.06633453816175461,
-0.12069513648748398,
0.11235329508781433,
0.325259268283844,
0.22571143507957458,
0.0811915248632431,
-0.19530335068702698,
-0.24389144778251648,
-0.19590303301811218,
0.013420352712273598,
-0.018292058259248734,
0.31153106689453125,
0.09237472712993622,
0.07642772793769836,
0.015604528598487377,
-0.026351667940616608,
-0.08221028000116348,
0.036613427102565765,
-0.20151109993457794,
0.15320996940135956,
0.39694446325302124,
0.08528829365968704,
0.10185463726520538,
-0.3077107071876526,
0.006156090646982193,
0.43363648653030396,
0.18921098113059998,
-0.21351787447929382,
0.19208770990371704,
-0.28107360005378723,
-0.16501346230506897,
-0.20298297703266144,
0.20734520256519318,
-0.23630112409591675,
0.005958147346973419,
-0.03685441613197327,
0.2263294905424118,
0.08204196393489838,
0.3846437335014343,
0.1057349145412445,
0.11133522540330887,
0.00780126266181469,
0.022569939494132996,
-0.07259080559015274,
-0.22445859014987946,
-0.1435757875442505,
-0.09809231758117676,
0.3343484699726105,
-0.2502892315387726,
0.4477265477180481,
-0.02047966979444027,
-0.25345635414123535,
-0.33993831276893616,
-0.224345862865448,
0.18531471490859985,
0.25860124826431274,
-0.16358110308647156,
-0.09631936252117157,
-0.21542875468730927,
-0.26505810022354126,
-0.12395813316106796,
0.30233344435691833,
-0.5098353028297424,
-0.304658979177475,
0.0070334505289793015,
-0.25788530707359314,
-0.2725446820259094,
-0.1710672825574875,
-0.1330353021621704,
-0.13823741674423218,
-0.08716447651386261,
0.19291286170482635,
-0.2887360155582428,
0.21674269437789917,
-0.04700677469372749,
-0.30904826521873474,
-0.02892640233039856,
-0.28513479232788086,
0.017982210963964462,
-0.21558639407157898,
-0.23655584454536438,
-0.10500733554363251,
-0.26852717995643616,
-0.23564742505550385,
-0.12221486866474152,
0.0008557494729757309,
0.20128534734249115,
0.4119444489479065,
-0.4336654543876648,
-0.3104481101036072,
0.15589064359664917,
-0.1283714324235916,
-0.2194029688835144,
-0.037321098148822784,
0.37480467557907104,
-0.011696506291627884,
0.022275617346167564,
0.09588142484426498,
-0.0826701670885086,
0.19811038672924042,
-0.06445714086294174,
0.19077414274215698,
-0.14168283343315125,
0.34291335940361023,
0.08204792439937592,
0.841236412525177,
0.20124438405036926,
-0.10022042691707611,
0.22882649302482605,
-0.1375921368598938,
-0.025829974561929703,
-0.12443707138299942,
-0.40511682629585266,
0.0761771872639656,
-0.3777608573436737,
-0.12231571972370148,
0.25022268295288086,
-0.04885917901992798,
-0.29183658957481384,
0.053366728127002716,
-0.010636987164616585,
-0.14385804533958435,
-0.1018432229757309,
0.11740690469741821,
-0.24396640062332153,
0.3828038275241852,
0.030043113976716995,
-0.008126728236675262,
-0.33985650539398193,
0.04695712774991989,
0.19935403764247894,
0.14448904991149902,
0.12480844557285309,
-0.05243498831987381,
-0.30122268199920654,
0.09647369384765625,
-0.3376227617263794,
0.12851986289024353,
0.24279223382472992,
0.24294409155845642,
-0.11271829903125763,
0.19846460223197937,
0.17921248078346252,
-0.1724768728017807,
0.7401276230812073,
0.21027904748916626,
0.30957692861557007,
0.1862887740135193,
-0.46424397826194763,
-0.06042446941137314,
-0.18363957107067108,
-0.002783574163913727,
0.3928457796573639,
0.5032209753990173,
0.6813004612922668,
-0.2091369330883026,
-0.256239652633667,
-0.3648524880409241,
-0.037955258041620255,
-0.2327728569507599,
-0.0968843325972557,
-0.33611148595809937,
0.03080381453037262,
-0.4779038727283478,
0.48406174778938293,
0.06188760697841644,
0.12470290809869766,
-0.008903897367417812,
-0.18272288143634796,
-0.106925830245018,
0.023591727018356323,
-0.20271848142147064,
0.0462450347840786,
0.48278936743736267,
0.010333196260035038,
0.1607866734266281,
0.07761543989181519,
0.3013530373573303,
0.029810618609189987,
0.23789483308792114,
-0.15425027906894684,
-0.17290619015693665,
0.32635846734046936,
0.11323625594377518,
0.09533201158046722,
0.36496371030807495,
-0.003815061878412962,
0.2932938039302826,
-0.07065172493457794,
0.24692176282405853,
-0.09713833034038544,
0.2614270746707916,
0.09047085046768188,
0.1561492532491684,
-0.28974729776382446,
-0.3219496011734009,
-0.0017900243401527405,
0.15546612441539764,
-0.18543726205825806,
0.48697078227996826,
-0.5467326045036316,
-0.24589474499225616,
0.3748255968093872,
0.028168410062789917,
0.7292395830154419,
-0.27318310737609863,
0.22707568109035492,
-0.023911699652671814,
0.012094005942344666,
0.06532153487205505,
-0.46059292554855347,
0.2139020562171936,
-0.6263120174407959,
-0.16144435107707977,
0.11095421016216278,
-0.17721451818943024,
-0.12393488734960556,
0.20826828479766846,
-0.006675563752651215,
0.09716420620679855,
0.2141609638929367,
0.43509405851364136,
-0.01691732555627823,
0.3878847062587738,
0.3363249599933624,
-0.3557000756263733,
-0.11997044086456299,
0.011548534035682678,
-0.2056383341550827,
0.15439462661743164,
-0.26111912727355957,
0.03370009362697601,
0.32569620013237,
-0.23969176411628723,
-0.17253819108009338,
0.1418047845363617,
-0.7761969566345215,
0.46274179220199585,
-0.06683702766895294,
-0.06029793620109558,
-0.22626690566539764,
0.2843300402164459,
0.18346750736236572,
0.04546267166733742,
-0.08250682055950165,
0.08563929796218872,
0.06304508447647095,
0.03802204132080078,
-0.20108628273010254,
-0.32536423206329346,
0.25595423579216003,
-0.11559349298477173,
-0.13186891376972198,
-0.2528047263622284,
-0.07012693583965302,
-0.3225020170211792,
0.019188061356544495,
0.282076895236969,
0.24348793923854828,
0.2463524490594864,
0.11438222229480743,
-0.019210167229175568,
0.08671122789382935,
-0.22967836260795593,
0.05143926665186882,
0.20878003537654877,
-0.23998567461967468,
0.057322777807712555,
-0.15889297425746918,
-0.2739484906196594,
0.005907759070396423,
0.36906394362449646,
-0.047968849539756775,
-0.17943653464317322,
0.3894452452659607,
0.023575332015752792,
-0.1455717384815216,
-0.22797292470932007,
-0.21925386786460876,
0.018073752522468567,
-0.27380067110061646,
0.051685139536857605,
-0.1685423105955124,
-0.0860263854265213,
0.02959470823407173,
-0.08195032179355621,
0.13399942219257355,
0.05765344947576523,
0.04701399430632591,
-0.3299924433231354,
-0.5211125612258911,
-0.13529151678085327,
-0.33454394340515137,
-0.025219205766916275,
0.4540756940841675,
0.2397463619709015,
0.05641387403011322,
0.6061373949050903,
-0.25133293867111206,
0.11439138650894165,
-0.10839302092790604,
0.08362506330013275,
-0.10703356564044952,
-0.16602849960327148,
-0.02615215629339218,
0.06860806047916412,
0.009449752047657967,
0.3960006833076477,
-0.11843399703502655,
-0.18266427516937256,
-0.22366327047348022,
0.16793328523635864,
0.10260537266731262,
0.014143198728561401,
0.007179386913776398,
-0.01431187242269516,
0.05509825423359871,
-0.2617299556732178,
0.31867706775665283,
0.32030728459358215,
0.08465474843978882,
-0.11269460618495941,
0.5118354558944702,
0.1823062002658844,
-0.14583750069141388,
0.021384533494710922,
-0.1446274369955063,
-0.2824772000312805,
0.1701793670654297,
0.0950300395488739,
-0.21231314539909363,
0.005074687302112579,
-0.038573961704969406,
-0.027560152113437653,
0.3689699172973633,
-0.011591475456953049,
0.24971148371696472,
-0.1424720287322998,
-0.30029863119125366,
0.2718724012374878,
0.08164539188146591,
-0.012097857892513275,
-0.15798130631446838,
-0.07591915130615234,
0.2782089412212372,
0.13029834628105164,
-0.21431215107440948,
-0.13035249710083008,
0.4660523235797882,
-0.10634772479534149,
-0.13485637307167053,
0.3298299312591553,
0.6135550737380981,
-0.07116793096065521,
0.098451629281044,
0.18683698773384094,
0.4662506580352783,
-0.4576020836830139,
0.1631399542093277,
-0.43481072783470154,
0.07324163615703583,
0.26349472999572754,
0.40871483087539673,
0.15014201402664185,
0.08214005827903748,
0.05485580116510391,
0.24244672060012817,
0.3560941517353058,
0.02404046803712845,
0.19336290657520294,
0.12317851185798645,
-0.3687792122364044,
-0.14895065128803253,
0.05021548271179199,
-0.3482202887535095,
0.07378604263067245,
-0.35117223858833313,
0.38534078001976013,
-0.11286917328834534,
-0.5411105155944824,
-0.28075259923934937,
0.49619078636169434,
-0.4421316981315613,
-0.14366039633750916,
0.06101211905479431,
0.027998633682727814,
0.06696312129497528,
0.12866507470607758,
0.06855310499668121,
0.17922168970108032,
0.27044594287872314,
0.03389718756079674,
-0.1840486377477646,
0.10322447866201401,
-0.39150384068489075,
0.23166272044181824,
0.3441035747528076,
-0.42772385478019714,
0.27922323346138,
0.029076606035232544,
-0.1717248409986496,
-0.2646332085132599,
0.11710523813962936,
0.4471123218536377,
0.31605884432792664,
-0.019119281321763992,
-0.04952135682106018,
0.22745637595653534,
0.2581709921360016,
-0.25035560131073,
0.3680810332298279,
0.09269092231988907,
-0.22827906906604767,
0.017481718212366104,
-0.0073931291699409485,
-0.1691623032093048,
-0.20156553387641907,
0.3039216995239258,
0.10028478503227234,
0.22948098182678223,
0.3296394646167755,
-0.11683952808380127,
-0.15457302331924438,
0.0382242314517498,
0.3113919496536255,
-0.44804471731185913,
0.05044309422373772,
0.3963662385940552,
-0.06050049141049385,
0.2445765733718872,
-0.08968571573495865,
0.07809961587190628,
0.12276950478553772,
0.4048783779144287,
0.26773348450660706,
0.014105439186096191,
-0.6027412414550781,
-0.2123679518699646,
-0.6123625040054321,
0.47627103328704834,
0.060212522745132446,
0.1949922740459442,
-0.09128660708665848,
0.07728956639766693,
-0.09808412939310074,
-0.20548053085803986,
-0.1723083108663559,
-0.15723510086536407,
0.3336084485054016,
0.2122882753610611,
-0.5281357169151306,
0.22223004698753357,
-0.35339057445526123,
0.04240747541189194,
0.27778762578964233,
-0.30594807863235474,
0.28360092639923096,
0.1268029510974884,
0.015467420220375061,
-0.05762706696987152,
-0.09035207331180573,
0.0522414930164814,
0.007565926760435104,
0.2732497453689575,
0.1720665544271469,
0.46106404066085815,
-0.006820768117904663,
0.12447456270456314,
-0.0342303104698658,
0.05025354027748108,
-0.22705501317977905,
-0.06911665946245193,
0.035690195858478546,
0.2862485349178314,
-0.17400449514389038,
-0.3253370523452759,
-0.39855721592903137,
0.23422841727733612,
0.13533633947372437,
-0.3962313234806061,
-0.2066459059715271,
0.11177469044923782,
0.06067395210266113,
0.04118090122938156,
0.25915226340293884,
0.6599974632263184,
0.12293224036693573,
0.30500367283821106,
-0.22494186460971832,
-0.21156193315982819,
0.303025484085083,
-0.590372622013092,
-0.20627836883068085,
-0.2685422897338867,
0.46421340107917786,
-0.0499768927693367,
0.05002613365650177,
-0.38105395436286926,
-0.0484163761138916,
0.2248927503824234,
-0.04512999951839447,
-0.36923453211784363,
0.1602446734905243,
-0.03364870324730873,
-0.09397528320550919,
-0.13484475016593933,
0.2524985671043396,
0.03010571002960205,
-0.3380372226238251,
0.02727976068854332,
-0.1845487654209137
] |
https://github.com/huggingface/datasets/issues/6364
|
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
|
You can use the following code to load this CSV with the list values preserved:
```python
from datasets import load_dataset
import ast
converters = {
"contexts" : ast.literal_eval,
"ground_truths" : ast.literal_eval,
}
ds = load_dataset("csv", data_files="golden_dataset.csv", converters=converters)
```
|
Hi,
I am trying to load a local csv dataset(similar to explodinggradients_fiqa) using load_dataset. When I try to pass features, I am facing the mentioned issue.
CSV Data sample(golden_dataset.csv):
Question | Context | answer | groundtruth
"what is abc?" | "abc is this and that" | "abc is this " | "abc is this and that"
```
import csv
# built it based on https://huggingface.co/datasets/explodinggradients/fiqa/viewer/ragas_eval?row=0
mydict = [
{'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]},
{'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]},
{'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]}
]
fields = ['question', 'contexts', 'answer', 'ground_truths']
with open('golden_dataset.csv', 'w', newline='\n') as file:
writer = csv.DictWriter(file, fieldnames = fields)
writer.writeheader()
for row in mydict:
writer.writerow(row)
```
Retrieved dataset:
DatasetDict({
train: Dataset({
features: ['question', 'contexts', 'answer', 'ground_truths'],
num_rows: 1
})
})
Code to reproduce issue:
```
from datasets import load_dataset, Features, Sequence, Value
encode_features = Features(
{
"question": Value(dtype='string', id=0),
"contexts": Sequence(feature=Value(dtype='string', id=1)),
"answer": Value(dtype='string', id=2),
"ground_truths": Sequence(feature=Value(dtype='string',id=3)),
}
)
eval_dataset = load_dataset('csv', data_files='/golden_dataset.csv', features = encode_features )
```
Error trace:
```
---------------------------------------------------------------------------
ArrowNotImplementedError Traceback (most recent call last)
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1925, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)
1924 _time = time.time()
-> 1925 for _, table in generator:
1926 if max_shard_size is not None and writer._num_bytes > max_shard_size:
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/packaged_modules/csv/csv.py:192, in Csv._generate_tables(self, files)
189 # Uncomment for debugging (will print the Arrow table size and elements)
190 # logger.warning(f"pa_table: {pa_table} num rows: {pa_table.num_rows}")
191 # logger.warning('\n'.join(str(pa_table.slice(i, 1).to_pydict()) for i in range(pa_table.num_rows)))
--> 192 yield (file_idx, batch_idx), self._cast_table(pa_table)
193 except ValueError as e:
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/packaged_modules/csv/csv.py:167, in Csv._cast_table(self, pa_table)
165 if all(not require_storage_cast(feature) for feature in self.config.features.values()):
166 # cheaper cast
--> 167 pa_table = pa.Table.from_arrays([pa_table[field.name] for field in schema], schema=schema)
168 else:
169 # more expensive cast; allows str <-> int/float or str to Audio for example
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:3781, in pyarrow.lib.Table.from_arrays()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:1449, in pyarrow.lib._sanitize_arrays()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/array.pxi:354, in pyarrow.lib.asarray()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:551, in pyarrow.lib.ChunkedArray.cast()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/compute.py:400, in cast(arr, target_type, safe, options, memory_pool)
399 options = CastOptions.safe(target_type)
--> 400 return call_function("cast", [arr], options, memory_pool)
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/_compute.pyx:572, in pyarrow._compute.call_function()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/_compute.pyx:367, in pyarrow._compute.Function.call()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/error.pxi:121, in pyarrow.lib.check_status()
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
The above exception was the direct cause of the following exception:
DatasetGenerationError Traceback (most recent call last)
Cell In[57], line 1
----> 1 eval_dataset = load_dataset('csv', data_files='/golden_dataset.csv', features = encode_features )
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/load.py:2153, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
2150 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
2152 # Download and prepare data
-> 2153 builder_instance.download_and_prepare(
2154 download_config=download_config,
2155 download_mode=download_mode,
2156 verification_mode=verification_mode,
2157 try_from_hf_gcs=try_from_hf_gcs,
2158 num_proc=num_proc,
2159 storage_options=storage_options,
2160 )
2162 # Build dataset for splits
2163 keep_in_memory = (
2164 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
2165 )
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:954, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
952 if num_proc is not None:
953 prepare_split_kwargs["num_proc"] = num_proc
--> 954 self._download_and_prepare(
955 dl_manager=dl_manager,
956 verification_mode=verification_mode,
957 **prepare_split_kwargs,
958 **download_and_prepare_kwargs,
959 )
960 # Sync info
961 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1049, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
1045 split_dict.add(split_generator.split_info)
1047 try:
1048 # Prepare split will record examples associated to the split
-> 1049 self._prepare_split(split_generator, **prepare_split_kwargs)
1050 except OSError as e:
1051 raise OSError(
1052 "Cannot find data file. "
1053 + (self.manual_download_instructions or "")
1054 + "\nOriginal error:\n"
1055 + str(e)
1056 ) from None
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1813, in ArrowBasedBuilder._prepare_split(self, split_generator, file_format, num_proc, max_shard_size)
1811 job_id = 0
1812 with pbar:
-> 1813 for job_id, done, content in self._prepare_split_single(
1814 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
1815 ):
1816 if done:
1817 result = content
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1958, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)
1956 if isinstance(e, SchemaInferenceError) and e.__context__ is not None:
1957 e = e.__context__
-> 1958 raise DatasetGenerationError("An error occurred while generating the dataset") from e
1960 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths)
DatasetGenerationError: An error occurred while generating the dataset
```
Environment Info:
datasets version: 2.14.5
Python version: 3.10.8
PyArrow version: 12.0.1
Pandas version: 2.0.3
I have also tried to load dataset first and then use cast_column, or save_to_disk and load_from_disk.
| 38
|
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
Hi,
I am trying to load a local csv dataset(similar to explodinggradients_fiqa) using load_dataset. When I try to pass features, I am facing the mentioned issue.
CSV Data sample(golden_dataset.csv):
Question | Context | answer | groundtruth
"what is abc?" | "abc is this and that" | "abc is this " | "abc is this and that"
```
import csv
# built it based on https://huggingface.co/datasets/explodinggradients/fiqa/viewer/ragas_eval?row=0
mydict = [
{'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]},
{'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]},
{'question' : "what is abc?", 'contexts': ["abc is this and that"], 'answer': "abc is this " , 'groundtruth': ["abc is this and that"]}
]
fields = ['question', 'contexts', 'answer', 'ground_truths']
with open('golden_dataset.csv', 'w', newline='\n') as file:
writer = csv.DictWriter(file, fieldnames = fields)
writer.writeheader()
for row in mydict:
writer.writerow(row)
```
Retrieved dataset:
DatasetDict({
train: Dataset({
features: ['question', 'contexts', 'answer', 'ground_truths'],
num_rows: 1
})
})
Code to reproduce issue:
```
from datasets import load_dataset, Features, Sequence, Value
encode_features = Features(
{
"question": Value(dtype='string', id=0),
"contexts": Sequence(feature=Value(dtype='string', id=1)),
"answer": Value(dtype='string', id=2),
"ground_truths": Sequence(feature=Value(dtype='string',id=3)),
}
)
eval_dataset = load_dataset('csv', data_files='/golden_dataset.csv', features = encode_features )
```
Error trace:
```
---------------------------------------------------------------------------
ArrowNotImplementedError Traceback (most recent call last)
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1925, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)
1924 _time = time.time()
-> 1925 for _, table in generator:
1926 if max_shard_size is not None and writer._num_bytes > max_shard_size:
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/packaged_modules/csv/csv.py:192, in Csv._generate_tables(self, files)
189 # Uncomment for debugging (will print the Arrow table size and elements)
190 # logger.warning(f"pa_table: {pa_table} num rows: {pa_table.num_rows}")
191 # logger.warning('\n'.join(str(pa_table.slice(i, 1).to_pydict()) for i in range(pa_table.num_rows)))
--> 192 yield (file_idx, batch_idx), self._cast_table(pa_table)
193 except ValueError as e:
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/packaged_modules/csv/csv.py:167, in Csv._cast_table(self, pa_table)
165 if all(not require_storage_cast(feature) for feature in self.config.features.values()):
166 # cheaper cast
--> 167 pa_table = pa.Table.from_arrays([pa_table[field.name] for field in schema], schema=schema)
168 else:
169 # more expensive cast; allows str <-> int/float or str to Audio for example
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:3781, in pyarrow.lib.Table.from_arrays()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:1449, in pyarrow.lib._sanitize_arrays()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/array.pxi:354, in pyarrow.lib.asarray()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/table.pxi:551, in pyarrow.lib.ChunkedArray.cast()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/compute.py:400, in cast(arr, target_type, safe, options, memory_pool)
399 options = CastOptions.safe(target_type)
--> 400 return call_function("cast", [arr], options, memory_pool)
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/_compute.pyx:572, in pyarrow._compute.call_function()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/_compute.pyx:367, in pyarrow._compute.Function.call()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status()
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pyarrow/error.pxi:121, in pyarrow.lib.check_status()
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
The above exception was the direct cause of the following exception:
DatasetGenerationError Traceback (most recent call last)
Cell In[57], line 1
----> 1 eval_dataset = load_dataset('csv', data_files='/golden_dataset.csv', features = encode_features )
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/load.py:2153, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
2150 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
2152 # Download and prepare data
-> 2153 builder_instance.download_and_prepare(
2154 download_config=download_config,
2155 download_mode=download_mode,
2156 verification_mode=verification_mode,
2157 try_from_hf_gcs=try_from_hf_gcs,
2158 num_proc=num_proc,
2159 storage_options=storage_options,
2160 )
2162 # Build dataset for splits
2163 keep_in_memory = (
2164 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
2165 )
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:954, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
952 if num_proc is not None:
953 prepare_split_kwargs["num_proc"] = num_proc
--> 954 self._download_and_prepare(
955 dl_manager=dl_manager,
956 verification_mode=verification_mode,
957 **prepare_split_kwargs,
958 **download_and_prepare_kwargs,
959 )
960 # Sync info
961 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1049, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
1045 split_dict.add(split_generator.split_info)
1047 try:
1048 # Prepare split will record examples associated to the split
-> 1049 self._prepare_split(split_generator, **prepare_split_kwargs)
1050 except OSError as e:
1051 raise OSError(
1052 "Cannot find data file. "
1053 + (self.manual_download_instructions or "")
1054 + "\nOriginal error:\n"
1055 + str(e)
1056 ) from None
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1813, in ArrowBasedBuilder._prepare_split(self, split_generator, file_format, num_proc, max_shard_size)
1811 job_id = 0
1812 with pbar:
-> 1813 for job_id, done, content in self._prepare_split_single(
1814 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
1815 ):
1816 if done:
1817 result = content
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/datasets/builder.py:1958, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)
1956 if isinstance(e, SchemaInferenceError) and e.__context__ is not None:
1957 e = e.__context__
-> 1958 raise DatasetGenerationError("An error occurred while generating the dataset") from e
1960 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths)
DatasetGenerationError: An error occurred while generating the dataset
```
Environment Info:
datasets version: 2.14.5
Python version: 3.10.8
PyArrow version: 12.0.1
Pandas version: 2.0.3
I have also tried to load dataset first and then use cast_column, or save_to_disk and load_from_disk.
You can use the following code to load this CSV with the list values preserved:
```python
from datasets import load_dataset
import ast
converters = {
"contexts" : ast.literal_eval,
"ground_truths" : ast.literal_eval,
}
ds = load_dataset("csv", data_files="golden_dataset.csv", converters=converters)
```
|
[
-0.02789284475147724,
-0.23731251060962677,
-0.11266927421092987,
0.09196687489748001,
0.6726945638656616,
-0.07634042203426361,
0.19831758737564087,
0.24670052528381348,
0.289915531873703,
0.11488265544176102,
0.06941308081150055,
0.4706839621067047,
-0.1396898776292801,
0.041423946619033813,
-0.15971089899539948,
-0.12002693116664886,
0.12148123234510422,
0.11322735995054245,
-0.15736493468284607,
-0.16011542081832886,
-0.10580365359783173,
0.18633219599723816,
-0.33052223920822144,
0.1246761605143547,
0.21791189908981323,
0.1375953108072281,
0.06951716542243958,
0.15178999304771423,
0.021584371104836464,
-0.22471646964550018,
0.10401146113872528,
-0.27394771575927734,
0.0015653669834136963,
-0.010457299649715424,
-0.0001176892255898565,
0.1985510140657425,
0.2504996657371521,
0.018255485221743584,
-0.22362330555915833,
-0.3768567442893982,
-0.14454799890518188,
-0.24245217442512512,
0.3651365339756012,
-0.1355101317167282,
-0.0935860425233841,
-0.021212372928857803,
-0.06093767285346985,
-0.4571346640586853,
0.3167470693588257,
0.45389655232429504,
0.1304820328950882,
0.27622267603874207,
-0.18154147267341614,
0.06921253353357315,
0.4566851258277893,
0.2558750808238983,
-0.43706345558166504,
0.05886540189385414,
0.2524322271347046,
0.18570096790790558,
-0.338765412569046,
0.09943412244319916,
-0.2765064537525177,
0.05356704443693161,
0.1107039600610733,
-0.16762666404247284,
-0.12504863739013672,
-0.10113655030727386,
0.018076645210385323,
0.18989744782447815,
0.5187675952911377,
-0.3050704598426819,
-0.41127240657806396,
0.012835487723350525,
-0.024575356394052505,
-0.12342920154333115,
0.0705743208527565,
0.07104603201150894,
-0.1950381100177765,
0.2560913562774658,
-0.16747961938381195,
0.09256374090909958,
-0.056196801364421844,
0.1301870495080948,
0.09858852624893188,
0.02375365048646927,
-0.20408137142658234,
0.11913562566041946,
0.1266893446445465,
-0.2586384415626526,
-0.11184781044721603,
-0.14591103792190552,
0.2967681288719177,
0.0924452543258667,
-0.47556591033935547,
0.13671821355819702,
0.04012557491660118,
-0.07870732992887497,
0.01836210861802101,
0.41428279876708984,
0.2158132642507553,
0.1595444679260254,
0.13966329395771027,
0.04941573739051819,
0.20441319048404694,
0.221976637840271,
0.06852373480796814,
-0.044364772737026215,
-0.10530242323875427,
0.0785188302397728,
-0.14523498713970184,
0.0010643117129802704,
-0.1521456092596054,
-0.31145134568214417,
-0.09788987040519714,
0.3122316300868988,
0.41210120916366577,
-0.357509970664978,
-0.46745023131370544,
0.2524881362915039,
-0.2877689003944397,
0.091745525598526,
0.22248323261737823,
0.3385893404483795,
-0.2498278021812439,
0.29613062739372253,
0.1987423151731491,
0.3210384249687195,
0.0563567578792572,
-0.034170001745224,
-0.18414729833602905,
0.03084852546453476,
-0.25859007239341736,
-0.23667855560779572,
0.13492272794246674,
-0.3985811769962311,
0.16867075860500336,
-0.0176665261387825,
0.35204416513442993,
-0.054502587765455246,
-0.18191635608673096,
-0.19472981989383698,
0.24282735586166382,
0.29107925295829773,
-0.10534130036830902,
0.013902580365538597,
0.354413241147995,
0.25573432445526123,
0.05588611215353012,
0.3729282319545746,
-0.2330034375190735,
-0.3002760410308838,
-0.17808735370635986,
0.058232031762599945,
-0.20359492301940918,
0.15229731798171997,
0.09303157031536102,
-0.15407125651836395,
0.14991240203380585,
0.20809030532836914,
0.08116978406906128,
-0.12945504486560822,
-0.23304201662540436,
-0.38595011830329895,
0.19056583940982819,
0.2743963599205017,
-0.6182405948638916,
-0.004761312156915665,
-0.014037039130926132,
-0.1487695723772049,
0.047499530017375946,
0.38415995240211487,
-0.27536076307296753,
0.17000281810760498,
-0.19349607825279236,
0.46126848459243774,
0.5732482671737671,
-0.12782299518585205,
-0.2931617498397827,
0.5360971093177795,
0.05553862452507019,
0.09293952584266663,
0.07621388882398605,
-0.14221201837062836,
0.34581229090690613,
0.016207875683903694,
-0.14351500570774078,
0.43732190132141113,
-0.0145238246768713,
0.1140102967619896,
-0.19822034239768982,
-0.22355566918849945,
0.46068888902664185,
0.0916459858417511,
-0.07560595870018005,
0.4149671792984009,
0.1371069997549057,
-0.1125735193490982,
0.3430795669555664,
-0.29265251755714417,
0.2550618350505829,
0.219604030251503,
0.2745693027973175,
0.10033918917179108,
0.020591486245393753,
-0.04824180155992508,
-0.4271286725997925,
-0.033429890871047974,
0.2014123648405075,
0.012806501239538193,
-0.5145578384399414,
-0.09655417501926422,
-0.31898054480552673,
0.42786672711372375,
-0.13725130259990692,
0.4671052098274231,
0.011025268584489822,
0.1083802729845047,
0.005610469728708267,
-0.1579352617263794,
-0.08441342413425446,
0.019880222156643867,
-0.3583933413028717,
0.0010893777944147587,
-0.4234786927700043,
0.3183642625808716,
0.04278861731290817,
-0.3346894085407257,
-0.14432738721370697,
0.14937102794647217,
0.20658573508262634,
-0.10734745115041733,
-0.23303574323654175,
0.22427871823310852,
0.15471383929252625,
-0.3089796304702759,
-0.4156903326511383,
0.015328571200370789,
0.0969405546784401,
-0.44350892305374146,
0.15444353222846985,
0.4988967180252075,
0.3068596422672272,
-0.02212805300951004,
0.014480505138635635,
0.6065502166748047,
0.008273933082818985,
0.38663339614868164,
0.037855423986911774,
0.23245280981063843,
0.16730821132659912,
0.0857136994600296,
-0.12652437388896942,
-0.24882598221302032,
0.155744731426239,
-0.08622533082962036,
0.30325162410736084,
-0.04918191581964493,
-0.31900396943092346,
-0.030866988003253937,
0.22667062282562256,
-0.01785365119576454,
0.00979670137166977,
0.15922635793685913,
-0.011385053396224976,
0.0823243036866188,
0.14050395786762238,
-0.4368216395378113,
0.2618343234062195,
-0.021133091300725937,
-0.05947263166308403,
0.02938029170036316,
0.2082396149635315,
0.011194312945008278,
0.09857332706451416,
-0.009445153176784515,
0.12639451026916504,
0.265123188495636,
0.015077200718224049,
-0.230397567152977,
-0.21535512804985046,
-0.2217242270708084,
0.11010117828845978,
0.14082826673984528,
-0.46338143944740295,
0.05014722794294357,
-0.4266510605812073,
0.27224528789520264,
-0.06855588406324387,
-0.44083040952682495,
0.09934316575527191,
-0.16599929332733154,
-0.22035391628742218,
0.25031980872154236,
-0.2572292387485504,
0.32057705521583557,
-0.4280976355075836,
-0.2439146190881729,
0.265289843082428,
-0.4013496935367584,
-0.1134880781173706,
0.1123621016740799,
-0.020041275769472122,
0.016957566142082214,
0.29664838314056396,
0.09028513729572296,
-0.19916962087154388,
0.30347007513046265,
0.3284245729446411,
-0.3032079339027405,
-0.08784795552492142,
0.24022704362869263,
-0.21909044682979584,
0.10441170632839203,
0.3217675983905792,
0.017449676990509033,
-0.14050374925136566,
-0.5192822217941284,
0.26245784759521484,
-0.09437853842973709,
-0.38748520612716675,
0.2902957499027252,
-0.03280317038297653,
-0.30036044120788574,
-0.19272097945213318,
-0.41170912981033325,
-0.11816392093896866,
-0.33735522627830505,
0.18473446369171143,
0.001748453825712204,
-0.030474327504634857,
0.16569334268569946,
0.34998753666877747,
0.21125198900699615,
0.44155243039131165,
0.056025996804237366,
-0.020402690395712852,
0.23792719841003418,
0.30657854676246643,
-0.1022629365324974,
-0.2792108654975891,
-0.02607429400086403,
-0.17752742767333984,
-0.10672947764396667,
0.4506945013999939,
-0.38435471057891846,
-0.02007319964468479,
-0.2616133391857147,
0.3067692816257477,
0.06328289210796356,
-0.1999094933271408,
0.39183923602104187,
-0.07053882628679276,
0.006493197754025459,
-0.2069891095161438,
-0.4101981520652771,
0.12237340211868286,
0.10101978480815887,
-0.07926080375909805,
0.13498978316783905,
0.5442342758178711,
0.07075701653957367,
0.4649971127510071,
-0.09369394183158875,
-0.001484207808971405,
0.38751915097236633,
-0.0697399228811264,
-0.012147951871156693,
-0.08852622658014297,
-0.28155097365379333,
0.013545072637498379,
-0.08961610496044159,
-0.23757445812225342,
0.13268978893756866,
-0.1406981647014618,
-0.14320093393325806,
-0.0019528530538082123,
0.08197514712810516,
-0.20740863680839539,
-0.13298267126083374,
0.24588939547538757,
-0.37714236974716187,
0.021823987364768982,
-0.12360036373138428,
0.18267425894737244,
-0.14044608175754547,
0.02892785146832466,
0.16783621907234192,
0.055430375039577484,
0.18495875597000122,
-0.22663861513137817,
-0.06903135776519775,
-0.15147671103477478,
0.009764820337295532,
0.1811245232820511,
0.3382739722728729,
0.3947715759277344,
-0.08590584248304367,
-0.3864516019821167,
0.14037486910820007,
-0.03171833977103233,
0.7456303834915161,
-0.15083223581314087,
-0.07398437708616257,
0.13505998253822327,
0.06462664902210236,
-0.14959150552749634,
-0.09870468080043793,
-0.11197063326835632,
0.1190093383193016,
0.011804187670350075,
0.14037340879440308,
-0.21353626251220703,
-0.2798962891101837,
0.171432226896286,
0.17562834918498993,
-0.1379624456167221,
0.03455014526844025,
-0.19447451829910278,
-0.40032944083213806,
-0.428634911775589,
0.10754232853651047,
0.10672461241483688,
0.31182679533958435,
0.03517062962055206,
0.2657701373100281,
-0.30995988845825195,
-0.11191923171281815,
0.0825452208518982,
-0.015082399360835552,
0.2336975634098053,
-0.16042174398899078,
0.14383433759212494,
-0.418008029460907,
0.20993398129940033,
-0.2854931056499481,
0.6654322147369385,
0.17320194840431213,
-0.9459056258201599,
0.09670127183198929,
-0.16808508336544037,
0.3078939616680145,
0.15032607316970825,
-0.1852591335773468,
0.11051949858665466,
0.03201720863580704,
-0.1562063992023468,
0.2662453353404999,
-0.18625478446483612,
0.11671905219554901,
-0.1502678096294403,
0.07613185793161392,
-0.2483285516500473,
0.045766398310661316,
-0.03478348255157471,
-0.0026509538292884827,
-0.08587774634361267,
0.07956015318632126,
-0.11472131311893463,
0.5527666807174683,
0.17983511090278625,
0.9699656963348389,
0.023962516337633133,
-0.15612556040287018,
0.5019227862358093,
-0.02886938489973545,
0.004080364480614662,
0.23032601177692413,
-0.07525502145290375,
-0.4351538121700287,
-0.08571458607912064,
-0.09654439240694046,
-0.06437981128692627,
0.2697409391403198,
0.2387704849243164,
-0.2811874747276306,
0.15099237859249115,
-0.39459288120269775,
0.41178566217422485,
0.006987814791500568,
-0.1520403027534485,
0.20548872649669647,
-0.340765118598938,
-0.4749656021595001,
0.08679351210594177,
-0.055345386266708374,
-0.01854492723941803,
0.1889021396636963,
-0.3581835627555847,
-0.02835218608379364,
-0.19816984236240387,
-0.05100330337882042,
0.5164543390274048,
-0.19083452224731445,
0.039986468851566315,
0.37910518050193787,
-0.47036927938461304,
0.22392480075359344,
0.4398033618927002,
0.39987117052078247,
-0.14298495650291443,
-0.0017292052507400513,
-0.09427414834499359,
0.1393057405948639,
0.18122009932994843,
-0.09698676317930222,
-0.16196253895759583,
0.47799360752105713,
0.07228103280067444,
-0.282095342874527,
0.14762935042381287,
-0.10892361402511597,
-0.41724836826324463,
0.46057915687561035,
0.07212899625301361,
0.12730610370635986,
-0.7330767512321472,
-0.37244826555252075,
-0.13192757964134216,
0.12541693449020386,
-0.10197075456380844,
0.03335928916931152,
-0.04912722855806351,
-0.22182263433933258,
-0.09678243845701218,
0.12404508888721466,
-0.14220790565013885,
0.11123037338256836,
0.32488560676574707,
0.24181625247001648,
-0.02632695436477661,
0.4518197178840637,
0.30355626344680786,
-0.27040159702301025,
-0.19247201085090637,
-0.3551880419254303,
0.21841612458229065,
-0.6270482540130615,
0.14738035202026367,
-0.0647885799407959,
-0.19845984876155853,
0.0033995613921433687,
0.5333124995231628,
-0.14405009150505066,
0.28770485520362854,
-0.22813548147678375,
-0.41731807589530945,
-0.3727043569087982,
0.11848276853561401,
0.10699054598808289,
0.10938669741153717,
-0.2477300763130188,
0.1282760202884674,
0.031695567071437836,
-0.35450494289398193,
-0.23198187351226807,
-0.0780925303697586,
-0.2600438892841339,
0.170630544424057,
-0.008337557315826416,
-0.06741771847009659,
0.13407224416732788,
0.184050515294075,
0.07911648601293564,
0.22296088933944702,
-0.20401179790496826,
-0.12464166432619095,
-0.04173699766397476,
0.1625329703092575,
0.1953529715538025,
-0.1742124706506729,
-0.38961005210876465,
-0.050226807594299316,
0.009369542822241783,
-0.2538599669933319,
0.1325557678937912,
0.18848353624343872,
-0.054348625242710114,
0.13003650307655334,
-0.13636231422424316,
0.20995908975601196,
-0.0693945586681366,
0.10524347424507141,
-0.07899074256420135,
0.3028102517127991,
0.05806208774447441,
0.15575838088989258,
0.015193881466984749,
0.0730869472026825,
-0.13772067427635193,
0.05683610588312149,
0.25968489050865173,
0.18549096584320068,
0.21882477402687073,
-0.31592684984207153,
-0.29929718375205994,
-0.0702870637178421,
0.3971914052963257,
0.16563239693641663,
-0.15989762544631958,
0.011694328859448433,
0.16277924180030823,
0.15175621211528778,
-0.2428857386112213,
-0.15591682493686676,
0.3750447928905487,
-0.1077464297413826,
-0.06423210352659225,
0.19797125458717346,
0.18686603009700775,
-0.28223639726638794,
0.5388182401657104,
0.0004601944237947464,
0.2814112901687622,
-0.22981669008731842,
-0.1792009472846985,
0.5065958499908447,
0.1099860668182373,
0.09361334145069122,
0.11272561550140381,
-0.0069350749254226685,
0.267667680978775,
0.2894052267074585,
-0.32028841972351074,
0.08015543967485428,
0.21924728155136108,
0.20704840123653412,
0.07649389654397964,
-0.5283007621765137,
0.4002668857574463,
0.12547293305397034,
-0.24823525547981262,
0.005956642329692841,
0.05557328462600708,
0.2507829964160919,
0.21378067135810852,
-0.18438008427619934,
-0.21319322288036346,
0.20542046427726746,
-0.14589011669158936,
-0.21898023784160614,
-0.11706909537315369,
-0.006674855947494507,
-0.21077613532543182,
0.02029721811413765,
0.011649016290903091,
-0.047352179884910583,
0.5271093845367432,
-0.08609774708747864,
0.13151094317436218,
-0.06203031539916992,
-0.17990663647651672,
0.1654287874698639,
-0.006076358258724213,
-0.1683025062084198,
0.14243179559707642,
0.11524221301078796,
0.11243969202041626,
0.06626054644584656,
-0.09901200979948044,
0.4534348249435425,
0.38915538787841797,
-0.2621092200279236,
-0.06964734196662903,
0.10209892690181732,
-0.2342815101146698,
-0.19835789501667023,
0.49996429681777954,
-0.2213355004787445,
0.5917092561721802,
0.2603136897087097,
0.09660115838050842,
-0.0994538813829422,
0.4451372027397156,
-0.03324717655777931,
0.270676851272583,
0.045670878142118454,
-0.03487875312566757,
0.06398957222700119,
-0.18641819059848785,
-0.31866177916526794,
-0.24865376949310303,
-0.22039085626602173,
-0.19890263676643372,
0.3940918743610382,
-0.17498840391635895,
0.3561817407608032,
0.1681395173072815,
0.057832106947898865,
-0.040140632539987564,
0.14543966948986053,
0.33886173367500305,
0.22885102033615112,
-0.2688727080821991,
0.19404013454914093,
-0.24610067903995514,
0.22121381759643555,
0.22944603860378265,
-0.07162996381521225,
0.10943402349948883,
0.5028062462806702,
0.2157018780708313,
0.2571645975112915,
-0.524683952331543,
-0.17391473054885864,
0.260348379611969,
0.31889888644218445,
-0.0075427815318107605,
-0.15795433521270752,
0.24756796658039093,
0.13100284337997437,
0.013230197131633759,
-0.4874691367149353,
-0.030968863517045975,
0.06667980551719666,
0.05062258988618851,
-0.2200993150472641,
-0.44193512201309204,
-0.26923424005508423,
-0.2236965298652649,
0.1519012153148651,
0.04925249516963959,
0.33188068866729736,
-0.17620161175727844,
-0.06113741546869278,
-0.2308875024318695,
-0.15730160474777222,
-0.11901276558637619,
0.11318766325712204,
0.06011208891868591,
0.4260231852531433,
0.006330471485853195,
0.5876147150993347,
-0.2834354341030121,
0.15693224966526031,
0.36692023277282715,
0.06271179020404816,
-0.2237292379140854,
0.6057048439979553,
-0.46593669056892395,
0.18817715346813202,
-0.2008095532655716,
-0.0022241100668907166,
0.12182671576738358,
0.1845654994249344,
-0.1580345332622528,
-0.31964921951293945,
0.6224613189697266,
-0.41007199883461,
-0.24471238255500793,
0.00848468393087387,
0.037689000368118286,
-0.012278124690055847,
-0.3090008795261383,
-0.8747612237930298,
0.038347236812114716,
0.06056417152285576,
-0.11998956650495529,
-0.1459912359714508,
0.1654638797044754,
0.16351757943630219,
0.19346930086612701,
-0.15386225283145905,
0.21771317720413208,
0.07175096869468689,
-0.04668830335140228,
0.0036283545196056366,
-0.35725778341293335
] |
https://github.com/huggingface/datasets/issues/6363
|
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
|
I think the code hangs on the `accelerator.main_process_first()` context manager exit. To verify this, you can append a print statement to the end of the `accelerator.main_process_first()` block.
If the problem is in `with_transform`, it would help if you could share the error stack trace printed when you interrupt the process (while it hangs)
|
### Describe the bug
Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely.
### Steps to reproduce the bug
accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model"
### Expected behavior
It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset.
I added some debug prints
```
print("==========HERE3=============")
with accelerator.main_process_first():
print(accelerator.is_main_process)
print("===========Here3.1===========")
if args.max_train_samples is not None:
dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples))
print("===========Here3.2===========")
# Set the training transforms
train_dataset = dataset["train"].with_transform(preprocess_train)
print("==========HERE4=============")
Corresponding Output
Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 1
Local process index: 1
Device: cuda:1
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 2
Local process index: 2
Device: cuda:2
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 0
Local process index: 0
Device: cuda:0
Mixed precision type: fp16
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
{‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values.
{‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values.
==========HERE1=============
==========HERE1=============
==========HERE1=============
==========HERE2=============
==========HERE2=============
==========HERE2=============
==========HERE3=============
True
===========Here3.1===========
===========Here3.2===========
==========HERE3=============
==========HERE3=========
```
### Environment info
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_kmp_llvm conda-forge
absl-py 2.0.0 pypi_0 pypi
accelerate 0.24.0 pypi_0 pypi
aiohttp 3.8.6 pypi_0 pypi
aiosignal 1.3.1 pypi_0 pypi
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
async-timeout 4.0.3 pypi_0 pypi
attrs 23.1.0 pypi_0 pypi
bitsandbytes 0.41.1 pypi_0 pypi
blas 1.0 mkl
blessings 1.7 py39h06a4308_1002
brotli-python 1.0.9 py39h6a678d5_7
bzip2 1.0.8 h7b6447c_0
ca-certificates 2023.08.22 h06a4308_0
cachetools 5.3.2 pypi_0 pypi
certifi 2023.7.22 py39h06a4308_0
cffi 1.15.1 py39h5eee18b_3
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.1.7 unix_pyh707e725_0 conda-forge
cryptography 41.0.3 py39hdda0065_0
cuda-cudart 11.7.99 0 nvidia
cuda-cupti 11.7.101 0 nvidia
cuda-libraries 11.7.1 0 nvidia
cuda-nvrtc 11.7.99 0 nvidia
cuda-nvtx 11.7.91 0 nvidia
cuda-runtime 11.7.1 0 nvidia
datasets 2.14.6 pypi_0 pypi
diffusers 0.22.0.dev0 pypi_0 pypi
dill 0.3.7 pypi_0 pypi
docker-pycreds 0.4.0 py_0 conda-forge
ffmpeg 4.3 hf484d3e_0 pytorch
filelock 3.12.4 pypi_0 pypi
freetype 2.12.1 h4a9f257_0
frozenlist 1.4.0 pypi_0 pypi
fsspec 2023.10.0 pypi_0 pypi
ftfy 6.1.1 pypi_0 pypi
giflib 5.2.1 h5eee18b_3
gitdb 4.0.11 pyhd8ed1ab_0 conda-forge
gitpython 3.1.40 pyhd8ed1ab_0 conda-forge
gmp 6.2.1 h295c915_3
gnutls 3.6.15 he1e5248_0
google-auth 2.23.3 pypi_0 pypi
google-auth-oauthlib 1.1.0 pypi_0 pypi
gpustat 0.6.0 pyhd3eb1b0_1
grpcio 1.59.0 pypi_0 pypi
huggingface-hub 0.17.3 pypi_0 pypi
idna 3.4 py39h06a4308_0
importlib-metadata 6.8.0 pypi_0 pypi
intel-openmp 2023.1.0 hdb19cb5_46305
jinja2 3.1.2 pypi_0 pypi
jpeg 9e h5eee18b_1
lame 3.100 h7b6447c_0
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libcublas 11.10.3.66 0 nvidia
libcufft 10.7.2.124 h4fbf590_0 nvidia
libcufile 1.8.0.34 0 nvidia
libcurand 10.3.4.52 0 nvidia
libcusolver 11.4.0.1 0 nvidia
libcusparse 11.7.4.91 0 nvidia
libdeflate 1.17 h5eee18b_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 13.2.0 h807b86a_2 conda-forge
libgfortran-ng 13.2.0 h69a702a_2 conda-forge
libgfortran5 13.2.0 ha4646dd_2 conda-forge
libiconv 1.16 h7f8727e_2
libidn2 2.3.4 h5eee18b_0
libnpp 11.7.4.75 0 nvidia
libnvjpeg 11.8.0.2 0 nvidia
libpng 1.6.39 h5eee18b_0
libprotobuf 3.20.3 he621ea3_0
libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge
libtasn1 4.19.0 h5eee18b_0
libtiff 4.5.1 h6a678d5_0
libunistring 0.9.10 h27cfd23_0
libwebp 1.3.2 h11a3e52_0
libwebp-base 1.3.2 h5eee18b_0
llvm-openmp 14.0.6 h9e868ea_0
lz4-c 1.9.4 h6a678d5_0
markdown 3.5 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
mkl 2023.1.0 h213fc3f_46343
mkl-service 2.4.0 py39h5eee18b_1
mkl_fft 1.3.8 py39h5eee18b_0
mkl_random 1.2.4 py39hdb19cb5_0
multidict 6.0.4 pypi_0 pypi
multiprocess 0.70.15 pypi_0 pypi
ncurses 6.4 h6a678d5_0
nettle 3.7.3 hbbd107a_1
numpy 1.26.0 py39h5f9d8c6_0
numpy-base 1.26.0 py39hb5e798b_0
nvidia-ml 7.352.0 pyhd3eb1b0_0
oauthlib 3.2.2 pypi_0 pypi
openh264 2.1.1 h4ff587b_0
openjpeg 2.4.0 h3ad879b_0
openssl 3.0.11 h7f8727e_2
packaging 23.2 pypi_0 pypi
pandas 2.1.1 pypi_0 pypi
pathtools 0.1.2 py_1 conda-forge
pillow 10.0.1 py39ha6cbd5a_0
pip 23.3 py39h06a4308_0
protobuf 4.23.4 pypi_0 pypi
psutil 5.9.6 pypi_0 pypi
pyarrow 13.0.0 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pycparser 2.21 pyhd3eb1b0_0
pyopenssl 23.2.0 py39h06a4308_0
pysocks 1.7.1 py39h06a4308_0
python 3.9.18 h955ad1f_0
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.9 2_cp39 conda-forge
pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch
pytorch-cuda 11.7 h778d358_5 pytorch
pytorch-mutex 1.0 cuda pytorch
pytz 2023.3.post1 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
readline 8.2 h5eee18b_0
regex 2023.10.3 pypi_0 pypi
requests 2.31.0 py39h06a4308_0
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
safetensors 0.4.0 pypi_0 pypi
scipy 1.11.3 py39h5f9d8c6_0
sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge
setproctitle 1.1.10 py39h3811e60_1004 conda-forge
setuptools 68.0.0 py39h06a4308_0
six 1.16.0 pyh6c4a22f_0 conda-forge
smmap 5.0.0 pyhd8ed1ab_0 conda-forge
sqlite 3.41.2 h5eee18b_0
tbb 2021.8.0 hdb19cb5_0
tensorboard 2.15.0 pypi_0 pypi
tensorboard-data-server 0.7.2 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
tokenizers 0.14.1 pypi_0 pypi
torchaudio 0.13.1 py39_cu117 pytorch
torchtriton 2.1.0 py39 pytorch
torchvision 0.14.1 py39_cu117 pytorch
tqdm 4.66.1 pypi_0 pypi
transformers 4.34.1 pypi_0 pypi
typing_extensions 4.7.1 py39h06a4308_0
tzdata 2023.3 pypi_0 pypi
urllib3 1.26.18 py39h06a4308_0
wandb 0.15.12 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.8 pypi_0 pypi
werkzeug 3.0.1 pypi_0 pypi
wheel 0.41.2 py39h06a4308_0
xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers
xxhash 3.4.1 pypi_0 pypi
xz 5.4.2 h5eee18b_0
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.9.2 pypi_0 pypi
zipp 3.17.0 pypi_0 pypi
zlib 1.2.13 h5eee18b_0
zstd 1.5.5 hc292b87_0
| 53
|
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
### Describe the bug
Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely.
### Steps to reproduce the bug
accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model"
### Expected behavior
It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset.
I added some debug prints
```
print("==========HERE3=============")
with accelerator.main_process_first():
print(accelerator.is_main_process)
print("===========Here3.1===========")
if args.max_train_samples is not None:
dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples))
print("===========Here3.2===========")
# Set the training transforms
train_dataset = dataset["train"].with_transform(preprocess_train)
print("==========HERE4=============")
Corresponding Output
Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 1
Local process index: 1
Device: cuda:1
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 2
Local process index: 2
Device: cuda:2
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 0
Local process index: 0
Device: cuda:0
Mixed precision type: fp16
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
{‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values.
{‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values.
==========HERE1=============
==========HERE1=============
==========HERE1=============
==========HERE2=============
==========HERE2=============
==========HERE2=============
==========HERE3=============
True
===========Here3.1===========
===========Here3.2===========
==========HERE3=============
==========HERE3=========
```
### Environment info
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_kmp_llvm conda-forge
absl-py 2.0.0 pypi_0 pypi
accelerate 0.24.0 pypi_0 pypi
aiohttp 3.8.6 pypi_0 pypi
aiosignal 1.3.1 pypi_0 pypi
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
async-timeout 4.0.3 pypi_0 pypi
attrs 23.1.0 pypi_0 pypi
bitsandbytes 0.41.1 pypi_0 pypi
blas 1.0 mkl
blessings 1.7 py39h06a4308_1002
brotli-python 1.0.9 py39h6a678d5_7
bzip2 1.0.8 h7b6447c_0
ca-certificates 2023.08.22 h06a4308_0
cachetools 5.3.2 pypi_0 pypi
certifi 2023.7.22 py39h06a4308_0
cffi 1.15.1 py39h5eee18b_3
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.1.7 unix_pyh707e725_0 conda-forge
cryptography 41.0.3 py39hdda0065_0
cuda-cudart 11.7.99 0 nvidia
cuda-cupti 11.7.101 0 nvidia
cuda-libraries 11.7.1 0 nvidia
cuda-nvrtc 11.7.99 0 nvidia
cuda-nvtx 11.7.91 0 nvidia
cuda-runtime 11.7.1 0 nvidia
datasets 2.14.6 pypi_0 pypi
diffusers 0.22.0.dev0 pypi_0 pypi
dill 0.3.7 pypi_0 pypi
docker-pycreds 0.4.0 py_0 conda-forge
ffmpeg 4.3 hf484d3e_0 pytorch
filelock 3.12.4 pypi_0 pypi
freetype 2.12.1 h4a9f257_0
frozenlist 1.4.0 pypi_0 pypi
fsspec 2023.10.0 pypi_0 pypi
ftfy 6.1.1 pypi_0 pypi
giflib 5.2.1 h5eee18b_3
gitdb 4.0.11 pyhd8ed1ab_0 conda-forge
gitpython 3.1.40 pyhd8ed1ab_0 conda-forge
gmp 6.2.1 h295c915_3
gnutls 3.6.15 he1e5248_0
google-auth 2.23.3 pypi_0 pypi
google-auth-oauthlib 1.1.0 pypi_0 pypi
gpustat 0.6.0 pyhd3eb1b0_1
grpcio 1.59.0 pypi_0 pypi
huggingface-hub 0.17.3 pypi_0 pypi
idna 3.4 py39h06a4308_0
importlib-metadata 6.8.0 pypi_0 pypi
intel-openmp 2023.1.0 hdb19cb5_46305
jinja2 3.1.2 pypi_0 pypi
jpeg 9e h5eee18b_1
lame 3.100 h7b6447c_0
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libcublas 11.10.3.66 0 nvidia
libcufft 10.7.2.124 h4fbf590_0 nvidia
libcufile 1.8.0.34 0 nvidia
libcurand 10.3.4.52 0 nvidia
libcusolver 11.4.0.1 0 nvidia
libcusparse 11.7.4.91 0 nvidia
libdeflate 1.17 h5eee18b_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 13.2.0 h807b86a_2 conda-forge
libgfortran-ng 13.2.0 h69a702a_2 conda-forge
libgfortran5 13.2.0 ha4646dd_2 conda-forge
libiconv 1.16 h7f8727e_2
libidn2 2.3.4 h5eee18b_0
libnpp 11.7.4.75 0 nvidia
libnvjpeg 11.8.0.2 0 nvidia
libpng 1.6.39 h5eee18b_0
libprotobuf 3.20.3 he621ea3_0
libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge
libtasn1 4.19.0 h5eee18b_0
libtiff 4.5.1 h6a678d5_0
libunistring 0.9.10 h27cfd23_0
libwebp 1.3.2 h11a3e52_0
libwebp-base 1.3.2 h5eee18b_0
llvm-openmp 14.0.6 h9e868ea_0
lz4-c 1.9.4 h6a678d5_0
markdown 3.5 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
mkl 2023.1.0 h213fc3f_46343
mkl-service 2.4.0 py39h5eee18b_1
mkl_fft 1.3.8 py39h5eee18b_0
mkl_random 1.2.4 py39hdb19cb5_0
multidict 6.0.4 pypi_0 pypi
multiprocess 0.70.15 pypi_0 pypi
ncurses 6.4 h6a678d5_0
nettle 3.7.3 hbbd107a_1
numpy 1.26.0 py39h5f9d8c6_0
numpy-base 1.26.0 py39hb5e798b_0
nvidia-ml 7.352.0 pyhd3eb1b0_0
oauthlib 3.2.2 pypi_0 pypi
openh264 2.1.1 h4ff587b_0
openjpeg 2.4.0 h3ad879b_0
openssl 3.0.11 h7f8727e_2
packaging 23.2 pypi_0 pypi
pandas 2.1.1 pypi_0 pypi
pathtools 0.1.2 py_1 conda-forge
pillow 10.0.1 py39ha6cbd5a_0
pip 23.3 py39h06a4308_0
protobuf 4.23.4 pypi_0 pypi
psutil 5.9.6 pypi_0 pypi
pyarrow 13.0.0 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pycparser 2.21 pyhd3eb1b0_0
pyopenssl 23.2.0 py39h06a4308_0
pysocks 1.7.1 py39h06a4308_0
python 3.9.18 h955ad1f_0
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.9 2_cp39 conda-forge
pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch
pytorch-cuda 11.7 h778d358_5 pytorch
pytorch-mutex 1.0 cuda pytorch
pytz 2023.3.post1 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
readline 8.2 h5eee18b_0
regex 2023.10.3 pypi_0 pypi
requests 2.31.0 py39h06a4308_0
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
safetensors 0.4.0 pypi_0 pypi
scipy 1.11.3 py39h5f9d8c6_0
sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge
setproctitle 1.1.10 py39h3811e60_1004 conda-forge
setuptools 68.0.0 py39h06a4308_0
six 1.16.0 pyh6c4a22f_0 conda-forge
smmap 5.0.0 pyhd8ed1ab_0 conda-forge
sqlite 3.41.2 h5eee18b_0
tbb 2021.8.0 hdb19cb5_0
tensorboard 2.15.0 pypi_0 pypi
tensorboard-data-server 0.7.2 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
tokenizers 0.14.1 pypi_0 pypi
torchaudio 0.13.1 py39_cu117 pytorch
torchtriton 2.1.0 py39 pytorch
torchvision 0.14.1 py39_cu117 pytorch
tqdm 4.66.1 pypi_0 pypi
transformers 4.34.1 pypi_0 pypi
typing_extensions 4.7.1 py39h06a4308_0
tzdata 2023.3 pypi_0 pypi
urllib3 1.26.18 py39h06a4308_0
wandb 0.15.12 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.8 pypi_0 pypi
werkzeug 3.0.1 pypi_0 pypi
wheel 0.41.2 py39h06a4308_0
xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers
xxhash 3.4.1 pypi_0 pypi
xz 5.4.2 h5eee18b_0
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.9.2 pypi_0 pypi
zipp 3.17.0 pypi_0 pypi
zlib 1.2.13 h5eee18b_0
zstd 1.5.5 hc292b87_0
I think the code hangs on the `accelerator.main_process_first()` context manager exit. To verify this, you can append a print statement to the end of the `accelerator.main_process_first()` block.
If the problem is in `with_transform`, it would help if you could share the error stack trace printed when you interrupt the process (while it hangs)
|
[
-0.2909313142299652,
-0.4494292140007019,
0.03063831478357315,
0.10455915331840515,
0.7972440719604492,
-0.06378240138292313,
0.38594141602516174,
0.08792949467897415,
-0.1931465119123459,
0.4078894853591919,
0.08595011383295059,
0.1558985412120819,
0.01676599122583866,
-0.07265175879001617,
0.027911003679037094,
-0.12267427146434784,
0.16364240646362305,
-0.15872281789779663,
-0.010782182216644287,
-0.2772058844566345,
0.05453769117593765,
0.028257226571440697,
-0.19733786582946777,
0.05589411035180092,
-0.41591396927833557,
-0.17970792949199677,
0.07356647402048111,
-0.052424922585487366,
-0.07989758998155594,
0.049917370080947876,
0.06106260418891907,
0.29907146096229553,
-0.2509962320327759,
0.4152541160583496,
-0.00012525713827926666,
0.015866339206695557,
0.1796836256980896,
0.1232440322637558,
-0.06226165220141411,
-0.2744100093841553,
-0.0629986822605133,
0.13892412185668945,
-0.24097122251987457,
0.010507717728614807,
-0.15297085046768188,
0.09709914028644562,
-0.14965294301509857,
-0.3297664523124695,
0.4145652651786804,
0.1475335955619812,
0.06290807574987411,
-0.09227778017520905,
-0.10776286572217941,
-0.24873687326908112,
-0.05516479164361954,
-0.2281971126794815,
-0.22079509496688843,
0.09067060053348541,
0.29400521516799927,
0.02757553569972515,
-0.4739748239517212,
0.4821746349334717,
0.18431353569030762,
-0.2245834916830063,
-0.02243240922689438,
-0.22474639117717743,
0.30558106303215027,
-0.35450825095176697,
0.14583110809326172,
0.30093464255332947,
0.12916310131549835,
0.047329895198345184,
-0.34344545006752014,
-0.3459233045578003,
0.35185888409614563,
-0.05253325030207634,
0.2394193708896637,
-0.01879228837788105,
-0.2868102788925171,
0.01207176223397255,
-0.2741742432117462,
-0.1855694055557251,
-0.08772631734609604,
0.024806294590234756,
-0.2787264585494995,
0.5902503132820129,
0.04143891483545303,
0.21439191699028015,
0.38448113203048706,
0.08770143240690231,
0.06263413280248642,
0.21698600053787231,
0.30538588762283325,
-0.1278984248638153,
-0.6810311675071716,
0.2551581561565399,
0.012996014207601547,
-0.3107762038707733,
0.09026842564344406,
0.11214157193899155,
0.05166182294487953,
-0.1752391755580902,
0.18033534288406372,
-0.10411519557237625,
0.357540100812912,
0.2335810363292694,
-0.144460529088974,
0.09754444658756256,
0.28902775049209595,
0.08275619149208069,
-0.17459100484848022,
0.20930173993110657,
-0.18796367943286896,
-0.11595205217599869,
-0.3650616407394409,
-0.03389016166329384,
0.02104414999485016,
-0.10529637336730957,
-0.20619997382164001,
0.1473441869020462,
0.11149407178163528,
0.17682740092277527,
0.277732789516449,
0.4206738770008087,
0.07787610590457916,
0.7555185556411743,
0.257912278175354,
-0.15936248004436493,
-0.021704381331801414,
0.12056685239076614,
-0.13192851841449738,
0.027789870277047157,
-0.1524314433336258,
0.0048628998920321465,
-0.19922642409801483,
-0.4760673940181732,
-0.01766311749815941,
0.0025353282690048218,
0.2723659574985504,
-0.05497690662741661,
-0.18235507607460022,
-0.22081242501735687,
0.3747166693210602,
0.3783281743526459,
-0.21296723186969757,
0.27907422184944153,
-0.0012138374149799347,
0.0017619356513023376,
0.03826957195997238,
0.07553084194660187,
0.03614684194326401,
0.05429532751441002,
-0.10336780548095703,
0.12322819977998734,
0.01188783347606659,
0.1707298457622528,
0.011563584208488464,
0.07063840329647064,
0.1995268166065216,
-0.20098979771137238,
0.20380482077598572,
-0.41346997022628784,
0.11982405185699463,
-0.009271497838199139,
0.3818601965904236,
0.260712206363678,
0.056342657655477524,
-0.008020643144845963,
-0.17035649716854095,
0.040609341114759445,
0.07158017158508301,
0.09834849834442139,
0.036216069012880325,
0.04308474436402321,
-0.261851042509079,
-0.10603059083223343,
-0.12996649742126465,
-0.3587591350078583,
-0.3763449490070343,
0.3257404863834381,
-0.6488755941390991,
0.257179856300354,
0.019184783101081848,
0.26223865151405334,
0.2667233943939209,
0.023535553365945816,
-0.06492944061756134,
0.5186481475830078,
-0.3449784219264984,
0.13019080460071564,
-0.23221102356910706,
0.20998917520046234,
0.17275062203407288,
0.2422475963830948,
0.021468693390488625,
0.12182480096817017,
-0.25892117619514465,
0.6672348976135254,
0.2809159755706787,
0.03601785749197006,
0.056356966495513916,
0.16508258879184723,
0.151911661028862,
-0.1499212384223938,
0.09039834886789322,
0.0025763586163520813,
-0.24591588973999023,
0.17286092042922974,
0.357694149017334,
0.12002071738243103,
0.1579478532075882,
-0.03802584484219551,
-0.12708020210266113,
0.05208662152290344,
-0.3576095402240753,
-0.3875843286514282,
-0.09129577875137329,
0.06910276412963867,
0.03674650564789772,
0.19581332802772522,
-0.150717630982399,
0.447248250246048,
-0.027167949825525284,
0.2193111926317215,
-0.6124288439750671,
0.036619871854782104,
-0.0009292773902416229,
-0.030168935656547546,
-0.2348170429468155,
0.013935569673776627,
-0.1778128743171692,
-0.31566014885902405,
-0.41003119945526123,
0.5038653016090393,
-0.1705000251531601,
0.08790336549282074,
-0.07338646799325943,
0.00928989052772522,
0.22858093678951263,
-0.044565871357917786,
-0.07263553142547607,
0.05791258066892624,
-0.0787341296672821,
-0.20616716146469116,
-0.22220274806022644,
0.34187960624694824,
-0.08082795143127441,
0.27868029475212097,
-0.04384741559624672,
0.2329300343990326,
0.21554037928581238,
0.08909325301647186,
-0.29612964391708374,
0.14724145829677582,
0.41495653986930847,
-0.13992497324943542,
0.8125129342079163,
-0.2005472034215927,
-0.38266509771347046,
0.2616850733757019,
0.11219103634357452,
0.05131535604596138,
-0.17455503344535828,
0.15135785937309265,
0.06870908290147781,
0.0006396900862455368,
0.08073686063289642,
0.22402139008045197,
0.24204957485198975,
-0.04289424046874046,
0.022172339260578156,
0.0635918378829956,
-0.2823144793510437,
-0.21769167482852936,
-0.014195658266544342,
-0.28047752380371094,
0.3538026809692383,
0.18512821197509766,
0.023111607879400253,
0.08829193562269211,
-0.22599858045578003,
-0.18948931992053986,
0.10063637793064117,
0.22963441908359528,
-0.04913590848445892,
0.10131373256444931,
-0.2498294562101364,
-0.37356576323509216,
-0.23612120747566223,
-0.021930206567049026,
-0.33328497409820557,
-0.33781692385673523,
-0.2623460292816162,
0.16798603534698486,
-0.03258591890335083,
0.4826873540878296,
0.13254091143608093,
0.07212060689926147,
0.48610222339630127,
0.01502224151045084,
-0.48691681027412415,
-0.002072665374726057,
-0.04992719739675522,
-0.07366719096899033,
0.10482243448495865,
-0.18185727298259735,
0.06869793683290482,
0.3106411397457123,
-0.09867686033248901,
-0.22447477281093597,
-0.4791809320449829,
-0.08977998793125153,
-0.29762041568756104,
0.1205577477812767,
0.23006084561347961,
0.12817604839801788,
0.14892473816871643,
0.19109834730625153,
0.2674545645713806,
-0.48766300082206726,
-0.07869010418653488,
0.11802084743976593,
0.15102386474609375,
-0.21905310451984406,
-0.10704909265041351,
-0.3263396620750427,
-0.07102688401937485,
-0.2586098313331604,
0.07136141508817673,
-0.5934932231903076,
-0.16868844628334045,
0.1230410560965538,
0.2816597521305084,
0.04888850823044777,
-0.21608220040798187,
-0.24563071131706238,
-0.05555758625268936,
-0.1069805771112442,
0.2370842695236206,
0.008940368890762329,
-0.2885042428970337,
-0.22880391776561737,
-0.07171427458524704,
-0.009264107793569565,
0.4674828052520752,
-0.4094809889793396,
-0.03520368039608002,
-0.2461749166250229,
-0.10047348588705063,
-0.06544182449579239,
-0.1234767884016037,
0.24379247426986694,
-0.21410861611366272,
0.030196448788046837,
-0.050529107451438904,
-0.19405382871627808,
0.1511908918619156,
0.16746410727500916,
0.2063281536102295,
-0.2826564610004425,
0.23079505562782288,
0.11247844994068146,
0.20688728988170624,
0.0009272191673517227,
0.10379447042942047,
-0.14080379903316498,
-0.03888168931007385,
0.07296056300401688,
0.08758656680583954,
-0.26166611909866333,
0.5775623321533203,
0.011863023042678833,
-0.1623510867357254,
-0.09711039066314697,
0.017759831622242928,
0.16147345304489136,
-0.22313706576824188,
0.2664770185947418,
0.10300115495920181,
-0.08254055678844452,
0.04868558049201965,
-0.2374325692653656,
0.10538990795612335,
0.1205999106168747,
0.28714120388031006,
0.27017098665237427,
0.27155801653862,
-0.02739221416413784,
0.20987531542778015,
0.14358927309513092,
-0.1692335456609726,
0.04695175215601921,
-0.09968395531177521,
-0.26031655073165894,
0.014362804591655731,
-0.02391044981777668,
0.6091195940971375,
0.006027009338140488,
-0.013803869485855103,
0.10203304141759872,
-0.35482534766197205,
0.9719858765602112,
-0.22146891057491302,
-0.026669949293136597,
0.09222090244293213,
-0.5891109704971313,
-0.036201126873493195,
-0.06563286483287811,
-0.009041823446750641,
-0.3841770589351654,
0.2069769948720932,
0.4139442443847656,
-0.1048702597618103,
-0.23602111637592316,
0.3500778377056122,
-0.09194770455360413,
-0.14105303585529327,
-0.008301259018480778,
-0.07509315013885498,
-0.4364456534385681,
-0.13838261365890503,
0.43255025148391724,
-0.1384715884923935,
0.032212190330028534,
-0.4152679145336151,
-0.05839204788208008,
-0.10723406076431274,
-0.02535402961075306,
-0.09618085622787476,
0.18223531544208527,
0.06347599625587463,
-0.19367370009422302,
0.3128209710121155,
0.19289138913154602,
0.209426611661911,
0.021395046263933182,
0.26464560627937317,
-0.17532135546207428,
-0.3635667562484741,
0.05325290560722351,
-0.15946008265018463,
-0.005654327571392059,
0.6761318445205688,
-0.3135617673397064,
0.26909148693084717,
-0.04029731824994087,
0.4125898480415344,
-0.0502418614923954,
0.31664666533470154,
0.224014014005661,
0.2651069760322571,
-0.21922917664051056,
-0.476666122674942,
0.28769272565841675,
0.2983628809452057,
0.04188165068626404,
0.34689292311668396,
-0.31513458490371704,
-0.11680616438388824,
-0.15012584626674652,
0.15870410203933716,
0.8173946738243103,
-0.17136125266551971,
0.1826728880405426,
0.338352233171463,
0.22604139149188995,
0.06513624638319016,
0.22490675747394562,
0.23265604674816132,
-0.3383626639842987,
-0.7098580598831177,
-0.14239849150180817,
-0.10279437154531479,
0.30479851365089417,
-0.11201432347297668,
-0.11560866236686707,
0.3596273958683014,
-0.0016800612211227417,
0.06868381053209305,
0.018713735044002533,
0.2067711055278778,
0.05152280628681183,
-0.3911636173725128,
-0.13501936197280884,
0.04093477874994278,
-0.20171143114566803,
0.3496333360671997,
-0.028038229793310165,
-0.05542478710412979,
-0.27293673157691956,
-0.0966164767742157,
-0.20163097977638245,
0.3631892502307892,
-0.3456370234489441,
-0.07656154036521912,
-0.1540466696023941,
-0.40909379720687866,
0.24086695909500122,
0.32045766711235046,
-0.032180577516555786,
0.14836065471172333,
0.024087736383080482,
0.36679670214653015,
-0.022546134889125824,
-0.048226844519376755,
0.13627387583255768,
-0.2603508234024048,
0.4779268801212311,
0.0022416487336158752,
0.20125162601470947,
0.013138800859451294,
-0.01138076651841402,
0.16694651544094086,
-0.058686934411525726,
-0.009294450283050537,
0.09570208191871643,
0.13714097440242767,
0.026442427188158035,
0.17865398526191711,
-0.23142226040363312,
-0.5112199783325195,
0.01928648166358471,
0.1434318572282791,
-0.2184351086616516,
0.14479750394821167,
-0.14816860854625702,
-0.17964321374893188,
0.011207152158021927,
0.43189212679862976,
0.07744775712490082,
-0.13039210438728333,
0.15494340658187866,
0.1897956132888794,
0.005871675908565521,
-0.10631853342056274,
-0.002437237650156021,
0.10239073634147644,
-0.5212151408195496,
0.4950087368488312,
-0.2783111333847046,
-0.25704294443130493,
0.1102403998374939,
-0.22471708059310913,
0.043006300926208496,
-0.2163388729095459,
-0.14439043402671814,
-0.18616744875907898,
-0.19291947782039642,
-0.02306322753429413,
-0.0920305848121643,
-0.0026150159537792206,
-0.32395002245903015,
0.18614068627357483,
0.19449923932552338,
0.21860550343990326,
-0.1848040223121643,
-0.10701044648885727,
-0.45262545347213745,
0.07453195750713348,
0.019695976749062538,
-0.17327579855918884,
0.00314713129773736,
-0.22970975935459137,
0.05020694434642792,
0.24520517885684967,
-0.002795289270579815,
-0.10506158322095871,
-0.24379444122314453,
0.16888116300106049,
0.1230272650718689,
0.18950361013412476,
0.19521449506282806,
-0.11302787065505981,
-0.26053452491760254,
-0.1119370087981224,
0.31061163544654846,
0.04665236920118332,
-0.0031405240297317505,
-0.2647835910320282,
0.021670859307050705,
0.2501440942287445,
0.1690126210451126,
0.34759750962257385,
-0.0034813061356544495,
-0.3070365786552429,
0.2179809808731079,
0.2513970732688904,
-0.0049506500363349915,
-0.1919056475162506,
-0.6131374835968018,
-0.060071222484111786,
0.25315943360328674,
-0.023185934871435165,
0.4646250605583191,
-0.2349524050951004,
-0.08317502588033676,
0.1386394202709198,
0.5589498281478882,
0.5356136560440063,
-0.42532268166542053,
-0.02069808728992939,
0.28149035573005676,
0.08085137605667114,
-0.24977368116378784,
0.2214163988828659,
-0.2292531132698059,
-0.09324132651090622,
0.04120318964123726,
0.35616305470466614,
0.0705505907535553,
0.06011973321437836,
-0.4157065153121948,
0.2909100651741028,
0.25161269307136536,
-0.07609632611274719,
-0.020012762397527695,
0.34123364090919495,
0.10369378328323364,
0.278134822845459,
0.18926632404327393,
0.17580711841583252,
-0.07051258534193039,
0.3598213195800781,
0.3061894178390503,
0.572867751121521,
0.16298943758010864,
0.33639591932296753,
0.173575758934021,
-0.17035076022148132,
-0.08556930720806122,
0.5045970678329468,
-0.5123759508132935,
0.24821242690086365,
-0.315806120634079,
0.17096984386444092,
-0.4819340109825134,
-0.5417717099189758,
-0.06486179679632187,
0.4234418272972107,
-0.2529945373535156,
0.14326056838035583,
0.3605586886405945,
-0.060305725783109665,
-0.2993945777416229,
0.005423158407211304,
0.014906644821166992,
-0.0960320383310318,
0.36617735028266907,
0.14307017624378204,
0.10829155892133713,
-0.34942594170570374,
-0.4175249934196472,
-0.027774713933467865,
0.16122525930404663,
-0.3294582962989807,
0.36876431107521057,
0.23874181509017944,
-0.14335031807422638,
-0.16125862300395966,
0.3789471685886383,
0.4078805446624756,
0.5197629928588867,
-0.13192439079284668,
0.2619068920612335,
0.18739865720272064,
0.007940715178847313,
0.2997673451900482,
0.2879449725151062,
0.14206373691558838,
0.24858517944812775,
0.31710052490234375,
-0.0400233268737793,
-0.13484524190425873,
-0.0639454573392868,
-0.014475475996732712,
0.4534778594970703,
-0.055410049855709076,
0.458178848028183,
-0.22142767906188965,
0.028118029236793518,
-0.20692911744117737,
0.19624900817871094,
-0.3841957151889801,
0.023330705240368843,
0.14712661504745483,
-0.2653200626373291,
-0.05601793900132179,
0.06436119228601456,
-0.003508690744638443,
0.02647731825709343,
0.49053382873535156,
0.23142804205417633,
0.2814991772174835,
-0.352979451417923,
-0.4432322382926941,
-0.7061959505081177,
0.16672801971435547,
0.02313201315701008,
-0.3064349293708801,
-0.017993828281760216,
0.12486842274665833,
0.12715263664722443,
-0.1001904159784317,
0.07469296455383301,
-0.35190549492836,
0.3043104410171509,
0.6546194553375244,
-0.13863474130630493,
-0.016189109534025192,
-0.130776047706604,
0.11704979091882706,
-0.06711462885141373,
-0.21607869863510132,
0.305032879114151,
0.35159021615982056,
-0.055631883442401886,
0.20460301637649536,
0.37299761176109314,
-0.028206558898091316,
-0.31865572929382324,
-0.0951099544763565,
0.01259553711861372,
0.0027327314019203186,
0.03513164073228836,
0.004853283986449242,
-0.18408825993537903,
0.10576308518648148,
-0.11553094536066055,
-0.12297675758600235,
0.327055960893631,
0.41286545991897583,
0.17702864110469818,
-0.08075924217700958,
-0.35006582736968994,
-0.0628417506814003,
0.31897658109664917,
0.14865396916866302,
-0.3886556327342987,
0.22415313124656677,
0.12985637784004211,
0.2001485824584961,
0.3253851532936096,
0.4608398675918579,
0.022029466927051544,
-0.06451848894357681,
-0.3949521780014038,
-0.43277817964553833,
0.5375047326087952,
0.21196839213371277,
-0.322956383228302,
-0.12017635256052017,
-0.09331813454627991,
-0.12758272886276245,
0.04584735631942749,
-0.38178256154060364,
-0.10365535318851471,
-0.0975683405995369,
-0.03149747475981712,
-0.47011736035346985,
0.14581917226314545,
-0.17087595164775848,
-0.1203007698059082,
-0.06335670500993729,
-0.00034411996603012085,
0.2299572229385376,
-0.1367713361978531,
0.3738822340965271,
-0.011800915002822876
] |
https://github.com/huggingface/datasets/issues/6363
|
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
|
@mariosasko yes the problem seems to be to exit from accelerator.main_process_first(). Is there any known problem?
|
### Describe the bug
Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely.
### Steps to reproduce the bug
accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model"
### Expected behavior
It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset.
I added some debug prints
```
print("==========HERE3=============")
with accelerator.main_process_first():
print(accelerator.is_main_process)
print("===========Here3.1===========")
if args.max_train_samples is not None:
dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples))
print("===========Here3.2===========")
# Set the training transforms
train_dataset = dataset["train"].with_transform(preprocess_train)
print("==========HERE4=============")
Corresponding Output
Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 1
Local process index: 1
Device: cuda:1
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 2
Local process index: 2
Device: cuda:2
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 0
Local process index: 0
Device: cuda:0
Mixed precision type: fp16
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
{‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values.
{‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values.
==========HERE1=============
==========HERE1=============
==========HERE1=============
==========HERE2=============
==========HERE2=============
==========HERE2=============
==========HERE3=============
True
===========Here3.1===========
===========Here3.2===========
==========HERE3=============
==========HERE3=========
```
### Environment info
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_kmp_llvm conda-forge
absl-py 2.0.0 pypi_0 pypi
accelerate 0.24.0 pypi_0 pypi
aiohttp 3.8.6 pypi_0 pypi
aiosignal 1.3.1 pypi_0 pypi
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
async-timeout 4.0.3 pypi_0 pypi
attrs 23.1.0 pypi_0 pypi
bitsandbytes 0.41.1 pypi_0 pypi
blas 1.0 mkl
blessings 1.7 py39h06a4308_1002
brotli-python 1.0.9 py39h6a678d5_7
bzip2 1.0.8 h7b6447c_0
ca-certificates 2023.08.22 h06a4308_0
cachetools 5.3.2 pypi_0 pypi
certifi 2023.7.22 py39h06a4308_0
cffi 1.15.1 py39h5eee18b_3
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.1.7 unix_pyh707e725_0 conda-forge
cryptography 41.0.3 py39hdda0065_0
cuda-cudart 11.7.99 0 nvidia
cuda-cupti 11.7.101 0 nvidia
cuda-libraries 11.7.1 0 nvidia
cuda-nvrtc 11.7.99 0 nvidia
cuda-nvtx 11.7.91 0 nvidia
cuda-runtime 11.7.1 0 nvidia
datasets 2.14.6 pypi_0 pypi
diffusers 0.22.0.dev0 pypi_0 pypi
dill 0.3.7 pypi_0 pypi
docker-pycreds 0.4.0 py_0 conda-forge
ffmpeg 4.3 hf484d3e_0 pytorch
filelock 3.12.4 pypi_0 pypi
freetype 2.12.1 h4a9f257_0
frozenlist 1.4.0 pypi_0 pypi
fsspec 2023.10.0 pypi_0 pypi
ftfy 6.1.1 pypi_0 pypi
giflib 5.2.1 h5eee18b_3
gitdb 4.0.11 pyhd8ed1ab_0 conda-forge
gitpython 3.1.40 pyhd8ed1ab_0 conda-forge
gmp 6.2.1 h295c915_3
gnutls 3.6.15 he1e5248_0
google-auth 2.23.3 pypi_0 pypi
google-auth-oauthlib 1.1.0 pypi_0 pypi
gpustat 0.6.0 pyhd3eb1b0_1
grpcio 1.59.0 pypi_0 pypi
huggingface-hub 0.17.3 pypi_0 pypi
idna 3.4 py39h06a4308_0
importlib-metadata 6.8.0 pypi_0 pypi
intel-openmp 2023.1.0 hdb19cb5_46305
jinja2 3.1.2 pypi_0 pypi
jpeg 9e h5eee18b_1
lame 3.100 h7b6447c_0
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libcublas 11.10.3.66 0 nvidia
libcufft 10.7.2.124 h4fbf590_0 nvidia
libcufile 1.8.0.34 0 nvidia
libcurand 10.3.4.52 0 nvidia
libcusolver 11.4.0.1 0 nvidia
libcusparse 11.7.4.91 0 nvidia
libdeflate 1.17 h5eee18b_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 13.2.0 h807b86a_2 conda-forge
libgfortran-ng 13.2.0 h69a702a_2 conda-forge
libgfortran5 13.2.0 ha4646dd_2 conda-forge
libiconv 1.16 h7f8727e_2
libidn2 2.3.4 h5eee18b_0
libnpp 11.7.4.75 0 nvidia
libnvjpeg 11.8.0.2 0 nvidia
libpng 1.6.39 h5eee18b_0
libprotobuf 3.20.3 he621ea3_0
libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge
libtasn1 4.19.0 h5eee18b_0
libtiff 4.5.1 h6a678d5_0
libunistring 0.9.10 h27cfd23_0
libwebp 1.3.2 h11a3e52_0
libwebp-base 1.3.2 h5eee18b_0
llvm-openmp 14.0.6 h9e868ea_0
lz4-c 1.9.4 h6a678d5_0
markdown 3.5 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
mkl 2023.1.0 h213fc3f_46343
mkl-service 2.4.0 py39h5eee18b_1
mkl_fft 1.3.8 py39h5eee18b_0
mkl_random 1.2.4 py39hdb19cb5_0
multidict 6.0.4 pypi_0 pypi
multiprocess 0.70.15 pypi_0 pypi
ncurses 6.4 h6a678d5_0
nettle 3.7.3 hbbd107a_1
numpy 1.26.0 py39h5f9d8c6_0
numpy-base 1.26.0 py39hb5e798b_0
nvidia-ml 7.352.0 pyhd3eb1b0_0
oauthlib 3.2.2 pypi_0 pypi
openh264 2.1.1 h4ff587b_0
openjpeg 2.4.0 h3ad879b_0
openssl 3.0.11 h7f8727e_2
packaging 23.2 pypi_0 pypi
pandas 2.1.1 pypi_0 pypi
pathtools 0.1.2 py_1 conda-forge
pillow 10.0.1 py39ha6cbd5a_0
pip 23.3 py39h06a4308_0
protobuf 4.23.4 pypi_0 pypi
psutil 5.9.6 pypi_0 pypi
pyarrow 13.0.0 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pycparser 2.21 pyhd3eb1b0_0
pyopenssl 23.2.0 py39h06a4308_0
pysocks 1.7.1 py39h06a4308_0
python 3.9.18 h955ad1f_0
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.9 2_cp39 conda-forge
pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch
pytorch-cuda 11.7 h778d358_5 pytorch
pytorch-mutex 1.0 cuda pytorch
pytz 2023.3.post1 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
readline 8.2 h5eee18b_0
regex 2023.10.3 pypi_0 pypi
requests 2.31.0 py39h06a4308_0
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
safetensors 0.4.0 pypi_0 pypi
scipy 1.11.3 py39h5f9d8c6_0
sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge
setproctitle 1.1.10 py39h3811e60_1004 conda-forge
setuptools 68.0.0 py39h06a4308_0
six 1.16.0 pyh6c4a22f_0 conda-forge
smmap 5.0.0 pyhd8ed1ab_0 conda-forge
sqlite 3.41.2 h5eee18b_0
tbb 2021.8.0 hdb19cb5_0
tensorboard 2.15.0 pypi_0 pypi
tensorboard-data-server 0.7.2 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
tokenizers 0.14.1 pypi_0 pypi
torchaudio 0.13.1 py39_cu117 pytorch
torchtriton 2.1.0 py39 pytorch
torchvision 0.14.1 py39_cu117 pytorch
tqdm 4.66.1 pypi_0 pypi
transformers 4.34.1 pypi_0 pypi
typing_extensions 4.7.1 py39h06a4308_0
tzdata 2023.3 pypi_0 pypi
urllib3 1.26.18 py39h06a4308_0
wandb 0.15.12 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.8 pypi_0 pypi
werkzeug 3.0.1 pypi_0 pypi
wheel 0.41.2 py39h06a4308_0
xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers
xxhash 3.4.1 pypi_0 pypi
xz 5.4.2 h5eee18b_0
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.9.2 pypi_0 pypi
zipp 3.17.0 pypi_0 pypi
zlib 1.2.13 h5eee18b_0
zstd 1.5.5 hc292b87_0
| 16
|
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
### Describe the bug
Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely.
### Steps to reproduce the bug
accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model"
### Expected behavior
It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset.
I added some debug prints
```
print("==========HERE3=============")
with accelerator.main_process_first():
print(accelerator.is_main_process)
print("===========Here3.1===========")
if args.max_train_samples is not None:
dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples))
print("===========Here3.2===========")
# Set the training transforms
train_dataset = dataset["train"].with_transform(preprocess_train)
print("==========HERE4=============")
Corresponding Output
Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 1
Local process index: 1
Device: cuda:1
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 2
Local process index: 2
Device: cuda:2
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 0
Local process index: 0
Device: cuda:0
Mixed precision type: fp16
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
{‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values.
{‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values.
==========HERE1=============
==========HERE1=============
==========HERE1=============
==========HERE2=============
==========HERE2=============
==========HERE2=============
==========HERE3=============
True
===========Here3.1===========
===========Here3.2===========
==========HERE3=============
==========HERE3=========
```
### Environment info
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_kmp_llvm conda-forge
absl-py 2.0.0 pypi_0 pypi
accelerate 0.24.0 pypi_0 pypi
aiohttp 3.8.6 pypi_0 pypi
aiosignal 1.3.1 pypi_0 pypi
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
async-timeout 4.0.3 pypi_0 pypi
attrs 23.1.0 pypi_0 pypi
bitsandbytes 0.41.1 pypi_0 pypi
blas 1.0 mkl
blessings 1.7 py39h06a4308_1002
brotli-python 1.0.9 py39h6a678d5_7
bzip2 1.0.8 h7b6447c_0
ca-certificates 2023.08.22 h06a4308_0
cachetools 5.3.2 pypi_0 pypi
certifi 2023.7.22 py39h06a4308_0
cffi 1.15.1 py39h5eee18b_3
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.1.7 unix_pyh707e725_0 conda-forge
cryptography 41.0.3 py39hdda0065_0
cuda-cudart 11.7.99 0 nvidia
cuda-cupti 11.7.101 0 nvidia
cuda-libraries 11.7.1 0 nvidia
cuda-nvrtc 11.7.99 0 nvidia
cuda-nvtx 11.7.91 0 nvidia
cuda-runtime 11.7.1 0 nvidia
datasets 2.14.6 pypi_0 pypi
diffusers 0.22.0.dev0 pypi_0 pypi
dill 0.3.7 pypi_0 pypi
docker-pycreds 0.4.0 py_0 conda-forge
ffmpeg 4.3 hf484d3e_0 pytorch
filelock 3.12.4 pypi_0 pypi
freetype 2.12.1 h4a9f257_0
frozenlist 1.4.0 pypi_0 pypi
fsspec 2023.10.0 pypi_0 pypi
ftfy 6.1.1 pypi_0 pypi
giflib 5.2.1 h5eee18b_3
gitdb 4.0.11 pyhd8ed1ab_0 conda-forge
gitpython 3.1.40 pyhd8ed1ab_0 conda-forge
gmp 6.2.1 h295c915_3
gnutls 3.6.15 he1e5248_0
google-auth 2.23.3 pypi_0 pypi
google-auth-oauthlib 1.1.0 pypi_0 pypi
gpustat 0.6.0 pyhd3eb1b0_1
grpcio 1.59.0 pypi_0 pypi
huggingface-hub 0.17.3 pypi_0 pypi
idna 3.4 py39h06a4308_0
importlib-metadata 6.8.0 pypi_0 pypi
intel-openmp 2023.1.0 hdb19cb5_46305
jinja2 3.1.2 pypi_0 pypi
jpeg 9e h5eee18b_1
lame 3.100 h7b6447c_0
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libcublas 11.10.3.66 0 nvidia
libcufft 10.7.2.124 h4fbf590_0 nvidia
libcufile 1.8.0.34 0 nvidia
libcurand 10.3.4.52 0 nvidia
libcusolver 11.4.0.1 0 nvidia
libcusparse 11.7.4.91 0 nvidia
libdeflate 1.17 h5eee18b_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 13.2.0 h807b86a_2 conda-forge
libgfortran-ng 13.2.0 h69a702a_2 conda-forge
libgfortran5 13.2.0 ha4646dd_2 conda-forge
libiconv 1.16 h7f8727e_2
libidn2 2.3.4 h5eee18b_0
libnpp 11.7.4.75 0 nvidia
libnvjpeg 11.8.0.2 0 nvidia
libpng 1.6.39 h5eee18b_0
libprotobuf 3.20.3 he621ea3_0
libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge
libtasn1 4.19.0 h5eee18b_0
libtiff 4.5.1 h6a678d5_0
libunistring 0.9.10 h27cfd23_0
libwebp 1.3.2 h11a3e52_0
libwebp-base 1.3.2 h5eee18b_0
llvm-openmp 14.0.6 h9e868ea_0
lz4-c 1.9.4 h6a678d5_0
markdown 3.5 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
mkl 2023.1.0 h213fc3f_46343
mkl-service 2.4.0 py39h5eee18b_1
mkl_fft 1.3.8 py39h5eee18b_0
mkl_random 1.2.4 py39hdb19cb5_0
multidict 6.0.4 pypi_0 pypi
multiprocess 0.70.15 pypi_0 pypi
ncurses 6.4 h6a678d5_0
nettle 3.7.3 hbbd107a_1
numpy 1.26.0 py39h5f9d8c6_0
numpy-base 1.26.0 py39hb5e798b_0
nvidia-ml 7.352.0 pyhd3eb1b0_0
oauthlib 3.2.2 pypi_0 pypi
openh264 2.1.1 h4ff587b_0
openjpeg 2.4.0 h3ad879b_0
openssl 3.0.11 h7f8727e_2
packaging 23.2 pypi_0 pypi
pandas 2.1.1 pypi_0 pypi
pathtools 0.1.2 py_1 conda-forge
pillow 10.0.1 py39ha6cbd5a_0
pip 23.3 py39h06a4308_0
protobuf 4.23.4 pypi_0 pypi
psutil 5.9.6 pypi_0 pypi
pyarrow 13.0.0 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pycparser 2.21 pyhd3eb1b0_0
pyopenssl 23.2.0 py39h06a4308_0
pysocks 1.7.1 py39h06a4308_0
python 3.9.18 h955ad1f_0
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.9 2_cp39 conda-forge
pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch
pytorch-cuda 11.7 h778d358_5 pytorch
pytorch-mutex 1.0 cuda pytorch
pytz 2023.3.post1 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
readline 8.2 h5eee18b_0
regex 2023.10.3 pypi_0 pypi
requests 2.31.0 py39h06a4308_0
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
safetensors 0.4.0 pypi_0 pypi
scipy 1.11.3 py39h5f9d8c6_0
sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge
setproctitle 1.1.10 py39h3811e60_1004 conda-forge
setuptools 68.0.0 py39h06a4308_0
six 1.16.0 pyh6c4a22f_0 conda-forge
smmap 5.0.0 pyhd8ed1ab_0 conda-forge
sqlite 3.41.2 h5eee18b_0
tbb 2021.8.0 hdb19cb5_0
tensorboard 2.15.0 pypi_0 pypi
tensorboard-data-server 0.7.2 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
tokenizers 0.14.1 pypi_0 pypi
torchaudio 0.13.1 py39_cu117 pytorch
torchtriton 2.1.0 py39 pytorch
torchvision 0.14.1 py39_cu117 pytorch
tqdm 4.66.1 pypi_0 pypi
transformers 4.34.1 pypi_0 pypi
typing_extensions 4.7.1 py39h06a4308_0
tzdata 2023.3 pypi_0 pypi
urllib3 1.26.18 py39h06a4308_0
wandb 0.15.12 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.8 pypi_0 pypi
werkzeug 3.0.1 pypi_0 pypi
wheel 0.41.2 py39h06a4308_0
xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers
xxhash 3.4.1 pypi_0 pypi
xz 5.4.2 h5eee18b_0
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.9.2 pypi_0 pypi
zipp 3.17.0 pypi_0 pypi
zlib 1.2.13 h5eee18b_0
zstd 1.5.5 hc292b87_0
@mariosasko yes the problem seems to be to exit from accelerator.main_process_first(). Is there any known problem?
|
[
-0.2909313142299652,
-0.4494292140007019,
0.03063831478357315,
0.10455915331840515,
0.7972440719604492,
-0.06378240138292313,
0.38594141602516174,
0.08792949467897415,
-0.1931465119123459,
0.4078894853591919,
0.08595011383295059,
0.1558985412120819,
0.01676599122583866,
-0.07265175879001617,
0.027911003679037094,
-0.12267427146434784,
0.16364240646362305,
-0.15872281789779663,
-0.010782182216644287,
-0.2772058844566345,
0.05453769117593765,
0.028257226571440697,
-0.19733786582946777,
0.05589411035180092,
-0.41591396927833557,
-0.17970792949199677,
0.07356647402048111,
-0.052424922585487366,
-0.07989758998155594,
0.049917370080947876,
0.06106260418891907,
0.29907146096229553,
-0.2509962320327759,
0.4152541160583496,
-0.00012525713827926666,
0.015866339206695557,
0.1796836256980896,
0.1232440322637558,
-0.06226165220141411,
-0.2744100093841553,
-0.0629986822605133,
0.13892412185668945,
-0.24097122251987457,
0.010507717728614807,
-0.15297085046768188,
0.09709914028644562,
-0.14965294301509857,
-0.3297664523124695,
0.4145652651786804,
0.1475335955619812,
0.06290807574987411,
-0.09227778017520905,
-0.10776286572217941,
-0.24873687326908112,
-0.05516479164361954,
-0.2281971126794815,
-0.22079509496688843,
0.09067060053348541,
0.29400521516799927,
0.02757553569972515,
-0.4739748239517212,
0.4821746349334717,
0.18431353569030762,
-0.2245834916830063,
-0.02243240922689438,
-0.22474639117717743,
0.30558106303215027,
-0.35450825095176697,
0.14583110809326172,
0.30093464255332947,
0.12916310131549835,
0.047329895198345184,
-0.34344545006752014,
-0.3459233045578003,
0.35185888409614563,
-0.05253325030207634,
0.2394193708896637,
-0.01879228837788105,
-0.2868102788925171,
0.01207176223397255,
-0.2741742432117462,
-0.1855694055557251,
-0.08772631734609604,
0.024806294590234756,
-0.2787264585494995,
0.5902503132820129,
0.04143891483545303,
0.21439191699028015,
0.38448113203048706,
0.08770143240690231,
0.06263413280248642,
0.21698600053787231,
0.30538588762283325,
-0.1278984248638153,
-0.6810311675071716,
0.2551581561565399,
0.012996014207601547,
-0.3107762038707733,
0.09026842564344406,
0.11214157193899155,
0.05166182294487953,
-0.1752391755580902,
0.18033534288406372,
-0.10411519557237625,
0.357540100812912,
0.2335810363292694,
-0.144460529088974,
0.09754444658756256,
0.28902775049209595,
0.08275619149208069,
-0.17459100484848022,
0.20930173993110657,
-0.18796367943286896,
-0.11595205217599869,
-0.3650616407394409,
-0.03389016166329384,
0.02104414999485016,
-0.10529637336730957,
-0.20619997382164001,
0.1473441869020462,
0.11149407178163528,
0.17682740092277527,
0.277732789516449,
0.4206738770008087,
0.07787610590457916,
0.7555185556411743,
0.257912278175354,
-0.15936248004436493,
-0.021704381331801414,
0.12056685239076614,
-0.13192851841449738,
0.027789870277047157,
-0.1524314433336258,
0.0048628998920321465,
-0.19922642409801483,
-0.4760673940181732,
-0.01766311749815941,
0.0025353282690048218,
0.2723659574985504,
-0.05497690662741661,
-0.18235507607460022,
-0.22081242501735687,
0.3747166693210602,
0.3783281743526459,
-0.21296723186969757,
0.27907422184944153,
-0.0012138374149799347,
0.0017619356513023376,
0.03826957195997238,
0.07553084194660187,
0.03614684194326401,
0.05429532751441002,
-0.10336780548095703,
0.12322819977998734,
0.01188783347606659,
0.1707298457622528,
0.011563584208488464,
0.07063840329647064,
0.1995268166065216,
-0.20098979771137238,
0.20380482077598572,
-0.41346997022628784,
0.11982405185699463,
-0.009271497838199139,
0.3818601965904236,
0.260712206363678,
0.056342657655477524,
-0.008020643144845963,
-0.17035649716854095,
0.040609341114759445,
0.07158017158508301,
0.09834849834442139,
0.036216069012880325,
0.04308474436402321,
-0.261851042509079,
-0.10603059083223343,
-0.12996649742126465,
-0.3587591350078583,
-0.3763449490070343,
0.3257404863834381,
-0.6488755941390991,
0.257179856300354,
0.019184783101081848,
0.26223865151405334,
0.2667233943939209,
0.023535553365945816,
-0.06492944061756134,
0.5186481475830078,
-0.3449784219264984,
0.13019080460071564,
-0.23221102356910706,
0.20998917520046234,
0.17275062203407288,
0.2422475963830948,
0.021468693390488625,
0.12182480096817017,
-0.25892117619514465,
0.6672348976135254,
0.2809159755706787,
0.03601785749197006,
0.056356966495513916,
0.16508258879184723,
0.151911661028862,
-0.1499212384223938,
0.09039834886789322,
0.0025763586163520813,
-0.24591588973999023,
0.17286092042922974,
0.357694149017334,
0.12002071738243103,
0.1579478532075882,
-0.03802584484219551,
-0.12708020210266113,
0.05208662152290344,
-0.3576095402240753,
-0.3875843286514282,
-0.09129577875137329,
0.06910276412963867,
0.03674650564789772,
0.19581332802772522,
-0.150717630982399,
0.447248250246048,
-0.027167949825525284,
0.2193111926317215,
-0.6124288439750671,
0.036619871854782104,
-0.0009292773902416229,
-0.030168935656547546,
-0.2348170429468155,
0.013935569673776627,
-0.1778128743171692,
-0.31566014885902405,
-0.41003119945526123,
0.5038653016090393,
-0.1705000251531601,
0.08790336549282074,
-0.07338646799325943,
0.00928989052772522,
0.22858093678951263,
-0.044565871357917786,
-0.07263553142547607,
0.05791258066892624,
-0.0787341296672821,
-0.20616716146469116,
-0.22220274806022644,
0.34187960624694824,
-0.08082795143127441,
0.27868029475212097,
-0.04384741559624672,
0.2329300343990326,
0.21554037928581238,
0.08909325301647186,
-0.29612964391708374,
0.14724145829677582,
0.41495653986930847,
-0.13992497324943542,
0.8125129342079163,
-0.2005472034215927,
-0.38266509771347046,
0.2616850733757019,
0.11219103634357452,
0.05131535604596138,
-0.17455503344535828,
0.15135785937309265,
0.06870908290147781,
0.0006396900862455368,
0.08073686063289642,
0.22402139008045197,
0.24204957485198975,
-0.04289424046874046,
0.022172339260578156,
0.0635918378829956,
-0.2823144793510437,
-0.21769167482852936,
-0.014195658266544342,
-0.28047752380371094,
0.3538026809692383,
0.18512821197509766,
0.023111607879400253,
0.08829193562269211,
-0.22599858045578003,
-0.18948931992053986,
0.10063637793064117,
0.22963441908359528,
-0.04913590848445892,
0.10131373256444931,
-0.2498294562101364,
-0.37356576323509216,
-0.23612120747566223,
-0.021930206567049026,
-0.33328497409820557,
-0.33781692385673523,
-0.2623460292816162,
0.16798603534698486,
-0.03258591890335083,
0.4826873540878296,
0.13254091143608093,
0.07212060689926147,
0.48610222339630127,
0.01502224151045084,
-0.48691681027412415,
-0.002072665374726057,
-0.04992719739675522,
-0.07366719096899033,
0.10482243448495865,
-0.18185727298259735,
0.06869793683290482,
0.3106411397457123,
-0.09867686033248901,
-0.22447477281093597,
-0.4791809320449829,
-0.08977998793125153,
-0.29762041568756104,
0.1205577477812767,
0.23006084561347961,
0.12817604839801788,
0.14892473816871643,
0.19109834730625153,
0.2674545645713806,
-0.48766300082206726,
-0.07869010418653488,
0.11802084743976593,
0.15102386474609375,
-0.21905310451984406,
-0.10704909265041351,
-0.3263396620750427,
-0.07102688401937485,
-0.2586098313331604,
0.07136141508817673,
-0.5934932231903076,
-0.16868844628334045,
0.1230410560965538,
0.2816597521305084,
0.04888850823044777,
-0.21608220040798187,
-0.24563071131706238,
-0.05555758625268936,
-0.1069805771112442,
0.2370842695236206,
0.008940368890762329,
-0.2885042428970337,
-0.22880391776561737,
-0.07171427458524704,
-0.009264107793569565,
0.4674828052520752,
-0.4094809889793396,
-0.03520368039608002,
-0.2461749166250229,
-0.10047348588705063,
-0.06544182449579239,
-0.1234767884016037,
0.24379247426986694,
-0.21410861611366272,
0.030196448788046837,
-0.050529107451438904,
-0.19405382871627808,
0.1511908918619156,
0.16746410727500916,
0.2063281536102295,
-0.2826564610004425,
0.23079505562782288,
0.11247844994068146,
0.20688728988170624,
0.0009272191673517227,
0.10379447042942047,
-0.14080379903316498,
-0.03888168931007385,
0.07296056300401688,
0.08758656680583954,
-0.26166611909866333,
0.5775623321533203,
0.011863023042678833,
-0.1623510867357254,
-0.09711039066314697,
0.017759831622242928,
0.16147345304489136,
-0.22313706576824188,
0.2664770185947418,
0.10300115495920181,
-0.08254055678844452,
0.04868558049201965,
-0.2374325692653656,
0.10538990795612335,
0.1205999106168747,
0.28714120388031006,
0.27017098665237427,
0.27155801653862,
-0.02739221416413784,
0.20987531542778015,
0.14358927309513092,
-0.1692335456609726,
0.04695175215601921,
-0.09968395531177521,
-0.26031655073165894,
0.014362804591655731,
-0.02391044981777668,
0.6091195940971375,
0.006027009338140488,
-0.013803869485855103,
0.10203304141759872,
-0.35482534766197205,
0.9719858765602112,
-0.22146891057491302,
-0.026669949293136597,
0.09222090244293213,
-0.5891109704971313,
-0.036201126873493195,
-0.06563286483287811,
-0.009041823446750641,
-0.3841770589351654,
0.2069769948720932,
0.4139442443847656,
-0.1048702597618103,
-0.23602111637592316,
0.3500778377056122,
-0.09194770455360413,
-0.14105303585529327,
-0.008301259018480778,
-0.07509315013885498,
-0.4364456534385681,
-0.13838261365890503,
0.43255025148391724,
-0.1384715884923935,
0.032212190330028534,
-0.4152679145336151,
-0.05839204788208008,
-0.10723406076431274,
-0.02535402961075306,
-0.09618085622787476,
0.18223531544208527,
0.06347599625587463,
-0.19367370009422302,
0.3128209710121155,
0.19289138913154602,
0.209426611661911,
0.021395046263933182,
0.26464560627937317,
-0.17532135546207428,
-0.3635667562484741,
0.05325290560722351,
-0.15946008265018463,
-0.005654327571392059,
0.6761318445205688,
-0.3135617673397064,
0.26909148693084717,
-0.04029731824994087,
0.4125898480415344,
-0.0502418614923954,
0.31664666533470154,
0.224014014005661,
0.2651069760322571,
-0.21922917664051056,
-0.476666122674942,
0.28769272565841675,
0.2983628809452057,
0.04188165068626404,
0.34689292311668396,
-0.31513458490371704,
-0.11680616438388824,
-0.15012584626674652,
0.15870410203933716,
0.8173946738243103,
-0.17136125266551971,
0.1826728880405426,
0.338352233171463,
0.22604139149188995,
0.06513624638319016,
0.22490675747394562,
0.23265604674816132,
-0.3383626639842987,
-0.7098580598831177,
-0.14239849150180817,
-0.10279437154531479,
0.30479851365089417,
-0.11201432347297668,
-0.11560866236686707,
0.3596273958683014,
-0.0016800612211227417,
0.06868381053209305,
0.018713735044002533,
0.2067711055278778,
0.05152280628681183,
-0.3911636173725128,
-0.13501936197280884,
0.04093477874994278,
-0.20171143114566803,
0.3496333360671997,
-0.028038229793310165,
-0.05542478710412979,
-0.27293673157691956,
-0.0966164767742157,
-0.20163097977638245,
0.3631892502307892,
-0.3456370234489441,
-0.07656154036521912,
-0.1540466696023941,
-0.40909379720687866,
0.24086695909500122,
0.32045766711235046,
-0.032180577516555786,
0.14836065471172333,
0.024087736383080482,
0.36679670214653015,
-0.022546134889125824,
-0.048226844519376755,
0.13627387583255768,
-0.2603508234024048,
0.4779268801212311,
0.0022416487336158752,
0.20125162601470947,
0.013138800859451294,
-0.01138076651841402,
0.16694651544094086,
-0.058686934411525726,
-0.009294450283050537,
0.09570208191871643,
0.13714097440242767,
0.026442427188158035,
0.17865398526191711,
-0.23142226040363312,
-0.5112199783325195,
0.01928648166358471,
0.1434318572282791,
-0.2184351086616516,
0.14479750394821167,
-0.14816860854625702,
-0.17964321374893188,
0.011207152158021927,
0.43189212679862976,
0.07744775712490082,
-0.13039210438728333,
0.15494340658187866,
0.1897956132888794,
0.005871675908565521,
-0.10631853342056274,
-0.002437237650156021,
0.10239073634147644,
-0.5212151408195496,
0.4950087368488312,
-0.2783111333847046,
-0.25704294443130493,
0.1102403998374939,
-0.22471708059310913,
0.043006300926208496,
-0.2163388729095459,
-0.14439043402671814,
-0.18616744875907898,
-0.19291947782039642,
-0.02306322753429413,
-0.0920305848121643,
-0.0026150159537792206,
-0.32395002245903015,
0.18614068627357483,
0.19449923932552338,
0.21860550343990326,
-0.1848040223121643,
-0.10701044648885727,
-0.45262545347213745,
0.07453195750713348,
0.019695976749062538,
-0.17327579855918884,
0.00314713129773736,
-0.22970975935459137,
0.05020694434642792,
0.24520517885684967,
-0.002795289270579815,
-0.10506158322095871,
-0.24379444122314453,
0.16888116300106049,
0.1230272650718689,
0.18950361013412476,
0.19521449506282806,
-0.11302787065505981,
-0.26053452491760254,
-0.1119370087981224,
0.31061163544654846,
0.04665236920118332,
-0.0031405240297317505,
-0.2647835910320282,
0.021670859307050705,
0.2501440942287445,
0.1690126210451126,
0.34759750962257385,
-0.0034813061356544495,
-0.3070365786552429,
0.2179809808731079,
0.2513970732688904,
-0.0049506500363349915,
-0.1919056475162506,
-0.6131374835968018,
-0.060071222484111786,
0.25315943360328674,
-0.023185934871435165,
0.4646250605583191,
-0.2349524050951004,
-0.08317502588033676,
0.1386394202709198,
0.5589498281478882,
0.5356136560440063,
-0.42532268166542053,
-0.02069808728992939,
0.28149035573005676,
0.08085137605667114,
-0.24977368116378784,
0.2214163988828659,
-0.2292531132698059,
-0.09324132651090622,
0.04120318964123726,
0.35616305470466614,
0.0705505907535553,
0.06011973321437836,
-0.4157065153121948,
0.2909100651741028,
0.25161269307136536,
-0.07609632611274719,
-0.020012762397527695,
0.34123364090919495,
0.10369378328323364,
0.278134822845459,
0.18926632404327393,
0.17580711841583252,
-0.07051258534193039,
0.3598213195800781,
0.3061894178390503,
0.572867751121521,
0.16298943758010864,
0.33639591932296753,
0.173575758934021,
-0.17035076022148132,
-0.08556930720806122,
0.5045970678329468,
-0.5123759508132935,
0.24821242690086365,
-0.315806120634079,
0.17096984386444092,
-0.4819340109825134,
-0.5417717099189758,
-0.06486179679632187,
0.4234418272972107,
-0.2529945373535156,
0.14326056838035583,
0.3605586886405945,
-0.060305725783109665,
-0.2993945777416229,
0.005423158407211304,
0.014906644821166992,
-0.0960320383310318,
0.36617735028266907,
0.14307017624378204,
0.10829155892133713,
-0.34942594170570374,
-0.4175249934196472,
-0.027774713933467865,
0.16122525930404663,
-0.3294582962989807,
0.36876431107521057,
0.23874181509017944,
-0.14335031807422638,
-0.16125862300395966,
0.3789471685886383,
0.4078805446624756,
0.5197629928588867,
-0.13192439079284668,
0.2619068920612335,
0.18739865720272064,
0.007940715178847313,
0.2997673451900482,
0.2879449725151062,
0.14206373691558838,
0.24858517944812775,
0.31710052490234375,
-0.0400233268737793,
-0.13484524190425873,
-0.0639454573392868,
-0.014475475996732712,
0.4534778594970703,
-0.055410049855709076,
0.458178848028183,
-0.22142767906188965,
0.028118029236793518,
-0.20692911744117737,
0.19624900817871094,
-0.3841957151889801,
0.023330705240368843,
0.14712661504745483,
-0.2653200626373291,
-0.05601793900132179,
0.06436119228601456,
-0.003508690744638443,
0.02647731825709343,
0.49053382873535156,
0.23142804205417633,
0.2814991772174835,
-0.352979451417923,
-0.4432322382926941,
-0.7061959505081177,
0.16672801971435547,
0.02313201315701008,
-0.3064349293708801,
-0.017993828281760216,
0.12486842274665833,
0.12715263664722443,
-0.1001904159784317,
0.07469296455383301,
-0.35190549492836,
0.3043104410171509,
0.6546194553375244,
-0.13863474130630493,
-0.016189109534025192,
-0.130776047706604,
0.11704979091882706,
-0.06711462885141373,
-0.21607869863510132,
0.305032879114151,
0.35159021615982056,
-0.055631883442401886,
0.20460301637649536,
0.37299761176109314,
-0.028206558898091316,
-0.31865572929382324,
-0.0951099544763565,
0.01259553711861372,
0.0027327314019203186,
0.03513164073228836,
0.004853283986449242,
-0.18408825993537903,
0.10576308518648148,
-0.11553094536066055,
-0.12297675758600235,
0.327055960893631,
0.41286545991897583,
0.17702864110469818,
-0.08075924217700958,
-0.35006582736968994,
-0.0628417506814003,
0.31897658109664917,
0.14865396916866302,
-0.3886556327342987,
0.22415313124656677,
0.12985637784004211,
0.2001485824584961,
0.3253851532936096,
0.4608398675918579,
0.022029466927051544,
-0.06451848894357681,
-0.3949521780014038,
-0.43277817964553833,
0.5375047326087952,
0.21196839213371277,
-0.322956383228302,
-0.12017635256052017,
-0.09331813454627991,
-0.12758272886276245,
0.04584735631942749,
-0.38178256154060364,
-0.10365535318851471,
-0.0975683405995369,
-0.03149747475981712,
-0.47011736035346985,
0.14581917226314545,
-0.17087595164775848,
-0.1203007698059082,
-0.06335670500993729,
-0.00034411996603012085,
0.2299572229385376,
-0.1367713361978531,
0.3738822340965271,
-0.011800915002822876
] |
https://github.com/huggingface/datasets/issues/6363
|
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
|
NCCL debug info I get below output, if it helps.
```
11/09/2023 13:36:44 - INFO - __main__ - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 2
Process index: 1
Local process index: 1
Device: cuda:1
Mixed precision type: fp16
Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
11/09/2023 13:36:44 - INFO - __main__ - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 2
Process index: 0
Local process index: 0
Device: cuda:0
Mixed precision type: fp16
{'timestep_spacing', 'thresholding', 'variance_type', 'clip_sample_range', 'prediction_type', 'dynamic_thresholding_ratio', 'sample_max_value'} was not found in config. Values will be initialized to default values.
{'norm_num_groups', 'force_upcast'} was not found in config. Values will be initialized to default values.
{'num_attention_heads', 'projection_class_embeddings_input_dim', 'addition_embed_type_num_heads', 'mid_block_only_cross_attention', 'addition_embed_type', 'num_class_embeds', 'upcast_attention', 'cross_attention_norm', 'addition_time_embed_dim', 'time_embedding_dim', 'class_embeddings_concat', 'encoder_hid_dim', 'encoder_hid_dim_type', 'resnet_out_scale_factor', 'attention_type', 'conv_out_kernel', 'only_cross_attention', 'resnet_time_scale_shift', 'resnet_skip_time_act', 'reverse_transformer_layers_per_block', 'conv_in_kernel', 'time_cond_proj_dim', 'use_linear_projection', 'mid_block_type', 'time_embedding_act_fn', 'dropout', 'timestep_post_act', 'dual_cross_attention', 'class_embed_type', 'transformer_layers_per_block', 'time_embedding_type'} was not found in config. Values will be initialized to default values.
{'num_attention_heads', 'projection_class_embeddings_input_dim', 'addition_embed_type_num_heads', 'mid_block_only_cross_attention', 'addition_embed_type', 'num_class_embeds', 'upcast_attention', 'cross_attention_norm', 'addition_time_embed_dim', 'time_embedding_dim', 'class_embeddings_concat', 'encoder_hid_dim', 'encoder_hid_dim_type', 'resnet_out_scale_factor', 'attention_type', 'conv_out_kernel', 'only_cross_attention', 'resnet_time_scale_shift', 'resnet_skip_time_act', 'reverse_transformer_layers_per_block', 'conv_in_kernel', 'time_cond_proj_dim', 'use_linear_projection', 'mid_block_type', 'time_embedding_act_fn', 'dropout', 'timestep_post_act', 'dual_cross_attention', 'class_embed_type', 'transformer_layers_per_block', 'time_embedding_type'} was not found in config. Values will be initialized to default values.
deepbull5:1311249:1311249 [0] NCCL INFO Bootstrap : Using enp194s0f0:128.205.43.171<0>
deepbull5:1311249:1311249 [0] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation
deepbull5:1311249:1311249 [0] NCCL INFO cudaDriverVersion 11070
NCCL version 2.14.3+cuda11.7
deepbull5:1311250:1311250 [1] NCCL INFO cudaDriverVersion 11070
deepbull5:1311249:1311365 [0] NCCL INFO NET/IB : No device found.
deepbull5:1311249:1311365 [0] NCCL INFO NET/Socket : Using [0]enp194s0f0:128.205.43.171<0>
deepbull5:1311249:1311365 [0] NCCL INFO Using network Socket
deepbull5:1311250:1311250 [1] NCCL INFO Bootstrap : Using enp194s0f0:128.205.43.171<0>
deepbull5:1311250:1311250 [1] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation
deepbull5:1311250:1311366 [1] NCCL INFO NET/IB : No device found.
deepbull5:1311250:1311366 [1] NCCL INFO NET/Socket : Using [0]enp194s0f0:128.205.43.171<0>
deepbull5:1311250:1311366 [1] NCCL INFO Using network Socket
deepbull5:1311250:1311366 [1] NCCL INFO Setting affinity for GPU 1 to ff,ffff0000,00ffffff
deepbull5:1311249:1311365 [0] NCCL INFO Setting affinity for GPU 0 to ff,ffff0000,00ffffff
deepbull5:1311249:1311365 [0] NCCL INFO Channel 00/04 : 0 1
deepbull5:1311250:1311366 [1] NCCL INFO Trees [0] -1/-1/-1->1->0 [1] 0/-1/-1->1->-1 [2] -1/-1/-1->1->0 [3] 0/-1/-1->1->-1
deepbull5:1311249:1311365 [0] NCCL INFO Channel 01/04 : 0 1
deepbull5:1311249:1311365 [0] NCCL INFO Channel 02/04 : 0 1
deepbull5:1311249:1311365 [0] NCCL INFO Channel 03/04 : 0 1
deepbull5:1311249:1311365 [0] NCCL INFO Trees [0] 1/-1/-1->0->-1 [1] -1/-1/-1->0->1 [2] 1/-1/-1->0->-1 [3] -1/-1/-1->0->1
deepbull5:1311249:1311365 [0] NCCL INFO Channel 00/0 : 0[1000] -> 1[24000] via P2P/IPC
deepbull5:1311250:1311366 [1] NCCL INFO Channel 00/0 : 1[24000] -> 0[1000] via P2P/IPC
deepbull5:1311249:1311365 [0] NCCL INFO Channel 01/0 : 0[1000] -> 1[24000] via P2P/IPC
deepbull5:1311250:1311366 [1] NCCL INFO Channel 01/0 : 1[24000] -> 0[1000] via P2P/IPC
deepbull5:1311250:1311366 [1] NCCL INFO Channel 02/0 : 1[24000] -> 0[1000] via P2P/IPC
deepbull5:1311249:1311365 [0] NCCL INFO Channel 02/0 : 0[1000] -> 1[24000] via P2P/IPC
deepbull5:1311250:1311366 [1] NCCL INFO Channel 03/0 : 1[24000] -> 0[1000] via P2P/IPC
deepbull5:1311249:1311365 [0] NCCL INFO Channel 03/0 : 0[1000] -> 1[24000] via P2P/IPC
deepbull5:1311249:1311365 [0] NCCL INFO Connected all rings
deepbull5:1311249:1311365 [0] NCCL INFO Connected all trees
deepbull5:1311249:1311365 [0] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512
deepbull5:1311249:1311365 [0] NCCL INFO 4 coll channels, 4 p2p channels, 2 p2p channels per peer
deepbull5:1311250:1311366 [1] NCCL INFO Connected all rings
deepbull5:1311250:1311366 [1] NCCL INFO Connected all trees
deepbull5:1311250:1311366 [1] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512
deepbull5:1311250:1311366 [1] NCCL INFO 4 coll channels, 4 p2p channels, 2 p2p channels per peer
deepbull5:1311249:1311365 [0] NCCL INFO comm 0x88a84ee0 rank 0 nranks 2 cudaDev 0 busId 1000 - Init COMPLETE
deepbull5:1311250:1311366 [1] NCCL INFO comm 0x89a42f60 rank 1 nranks 2 cudaDev 1 busId 24000 - Init COMPLETE
```
|
### Describe the bug
Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely.
### Steps to reproduce the bug
accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model"
### Expected behavior
It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset.
I added some debug prints
```
print("==========HERE3=============")
with accelerator.main_process_first():
print(accelerator.is_main_process)
print("===========Here3.1===========")
if args.max_train_samples is not None:
dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples))
print("===========Here3.2===========")
# Set the training transforms
train_dataset = dataset["train"].with_transform(preprocess_train)
print("==========HERE4=============")
Corresponding Output
Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 1
Local process index: 1
Device: cuda:1
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 2
Local process index: 2
Device: cuda:2
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 0
Local process index: 0
Device: cuda:0
Mixed precision type: fp16
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
{‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values.
{‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values.
==========HERE1=============
==========HERE1=============
==========HERE1=============
==========HERE2=============
==========HERE2=============
==========HERE2=============
==========HERE3=============
True
===========Here3.1===========
===========Here3.2===========
==========HERE3=============
==========HERE3=========
```
### Environment info
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_kmp_llvm conda-forge
absl-py 2.0.0 pypi_0 pypi
accelerate 0.24.0 pypi_0 pypi
aiohttp 3.8.6 pypi_0 pypi
aiosignal 1.3.1 pypi_0 pypi
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
async-timeout 4.0.3 pypi_0 pypi
attrs 23.1.0 pypi_0 pypi
bitsandbytes 0.41.1 pypi_0 pypi
blas 1.0 mkl
blessings 1.7 py39h06a4308_1002
brotli-python 1.0.9 py39h6a678d5_7
bzip2 1.0.8 h7b6447c_0
ca-certificates 2023.08.22 h06a4308_0
cachetools 5.3.2 pypi_0 pypi
certifi 2023.7.22 py39h06a4308_0
cffi 1.15.1 py39h5eee18b_3
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.1.7 unix_pyh707e725_0 conda-forge
cryptography 41.0.3 py39hdda0065_0
cuda-cudart 11.7.99 0 nvidia
cuda-cupti 11.7.101 0 nvidia
cuda-libraries 11.7.1 0 nvidia
cuda-nvrtc 11.7.99 0 nvidia
cuda-nvtx 11.7.91 0 nvidia
cuda-runtime 11.7.1 0 nvidia
datasets 2.14.6 pypi_0 pypi
diffusers 0.22.0.dev0 pypi_0 pypi
dill 0.3.7 pypi_0 pypi
docker-pycreds 0.4.0 py_0 conda-forge
ffmpeg 4.3 hf484d3e_0 pytorch
filelock 3.12.4 pypi_0 pypi
freetype 2.12.1 h4a9f257_0
frozenlist 1.4.0 pypi_0 pypi
fsspec 2023.10.0 pypi_0 pypi
ftfy 6.1.1 pypi_0 pypi
giflib 5.2.1 h5eee18b_3
gitdb 4.0.11 pyhd8ed1ab_0 conda-forge
gitpython 3.1.40 pyhd8ed1ab_0 conda-forge
gmp 6.2.1 h295c915_3
gnutls 3.6.15 he1e5248_0
google-auth 2.23.3 pypi_0 pypi
google-auth-oauthlib 1.1.0 pypi_0 pypi
gpustat 0.6.0 pyhd3eb1b0_1
grpcio 1.59.0 pypi_0 pypi
huggingface-hub 0.17.3 pypi_0 pypi
idna 3.4 py39h06a4308_0
importlib-metadata 6.8.0 pypi_0 pypi
intel-openmp 2023.1.0 hdb19cb5_46305
jinja2 3.1.2 pypi_0 pypi
jpeg 9e h5eee18b_1
lame 3.100 h7b6447c_0
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libcublas 11.10.3.66 0 nvidia
libcufft 10.7.2.124 h4fbf590_0 nvidia
libcufile 1.8.0.34 0 nvidia
libcurand 10.3.4.52 0 nvidia
libcusolver 11.4.0.1 0 nvidia
libcusparse 11.7.4.91 0 nvidia
libdeflate 1.17 h5eee18b_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 13.2.0 h807b86a_2 conda-forge
libgfortran-ng 13.2.0 h69a702a_2 conda-forge
libgfortran5 13.2.0 ha4646dd_2 conda-forge
libiconv 1.16 h7f8727e_2
libidn2 2.3.4 h5eee18b_0
libnpp 11.7.4.75 0 nvidia
libnvjpeg 11.8.0.2 0 nvidia
libpng 1.6.39 h5eee18b_0
libprotobuf 3.20.3 he621ea3_0
libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge
libtasn1 4.19.0 h5eee18b_0
libtiff 4.5.1 h6a678d5_0
libunistring 0.9.10 h27cfd23_0
libwebp 1.3.2 h11a3e52_0
libwebp-base 1.3.2 h5eee18b_0
llvm-openmp 14.0.6 h9e868ea_0
lz4-c 1.9.4 h6a678d5_0
markdown 3.5 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
mkl 2023.1.0 h213fc3f_46343
mkl-service 2.4.0 py39h5eee18b_1
mkl_fft 1.3.8 py39h5eee18b_0
mkl_random 1.2.4 py39hdb19cb5_0
multidict 6.0.4 pypi_0 pypi
multiprocess 0.70.15 pypi_0 pypi
ncurses 6.4 h6a678d5_0
nettle 3.7.3 hbbd107a_1
numpy 1.26.0 py39h5f9d8c6_0
numpy-base 1.26.0 py39hb5e798b_0
nvidia-ml 7.352.0 pyhd3eb1b0_0
oauthlib 3.2.2 pypi_0 pypi
openh264 2.1.1 h4ff587b_0
openjpeg 2.4.0 h3ad879b_0
openssl 3.0.11 h7f8727e_2
packaging 23.2 pypi_0 pypi
pandas 2.1.1 pypi_0 pypi
pathtools 0.1.2 py_1 conda-forge
pillow 10.0.1 py39ha6cbd5a_0
pip 23.3 py39h06a4308_0
protobuf 4.23.4 pypi_0 pypi
psutil 5.9.6 pypi_0 pypi
pyarrow 13.0.0 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pycparser 2.21 pyhd3eb1b0_0
pyopenssl 23.2.0 py39h06a4308_0
pysocks 1.7.1 py39h06a4308_0
python 3.9.18 h955ad1f_0
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.9 2_cp39 conda-forge
pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch
pytorch-cuda 11.7 h778d358_5 pytorch
pytorch-mutex 1.0 cuda pytorch
pytz 2023.3.post1 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
readline 8.2 h5eee18b_0
regex 2023.10.3 pypi_0 pypi
requests 2.31.0 py39h06a4308_0
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
safetensors 0.4.0 pypi_0 pypi
scipy 1.11.3 py39h5f9d8c6_0
sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge
setproctitle 1.1.10 py39h3811e60_1004 conda-forge
setuptools 68.0.0 py39h06a4308_0
six 1.16.0 pyh6c4a22f_0 conda-forge
smmap 5.0.0 pyhd8ed1ab_0 conda-forge
sqlite 3.41.2 h5eee18b_0
tbb 2021.8.0 hdb19cb5_0
tensorboard 2.15.0 pypi_0 pypi
tensorboard-data-server 0.7.2 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
tokenizers 0.14.1 pypi_0 pypi
torchaudio 0.13.1 py39_cu117 pytorch
torchtriton 2.1.0 py39 pytorch
torchvision 0.14.1 py39_cu117 pytorch
tqdm 4.66.1 pypi_0 pypi
transformers 4.34.1 pypi_0 pypi
typing_extensions 4.7.1 py39h06a4308_0
tzdata 2023.3 pypi_0 pypi
urllib3 1.26.18 py39h06a4308_0
wandb 0.15.12 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.8 pypi_0 pypi
werkzeug 3.0.1 pypi_0 pypi
wheel 0.41.2 py39h06a4308_0
xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers
xxhash 3.4.1 pypi_0 pypi
xz 5.4.2 h5eee18b_0
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.9.2 pypi_0 pypi
zipp 3.17.0 pypi_0 pypi
zlib 1.2.13 h5eee18b_0
zstd 1.5.5 hc292b87_0
| 620
|
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
### Describe the bug
Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely.
### Steps to reproduce the bug
accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model"
### Expected behavior
It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset.
I added some debug prints
```
print("==========HERE3=============")
with accelerator.main_process_first():
print(accelerator.is_main_process)
print("===========Here3.1===========")
if args.max_train_samples is not None:
dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples))
print("===========Here3.2===========")
# Set the training transforms
train_dataset = dataset["train"].with_transform(preprocess_train)
print("==========HERE4=============")
Corresponding Output
Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 1
Local process index: 1
Device: cuda:1
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 2
Local process index: 2
Device: cuda:2
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 0
Local process index: 0
Device: cuda:0
Mixed precision type: fp16
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
{‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values.
{‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values.
==========HERE1=============
==========HERE1=============
==========HERE1=============
==========HERE2=============
==========HERE2=============
==========HERE2=============
==========HERE3=============
True
===========Here3.1===========
===========Here3.2===========
==========HERE3=============
==========HERE3=========
```
### Environment info
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_kmp_llvm conda-forge
absl-py 2.0.0 pypi_0 pypi
accelerate 0.24.0 pypi_0 pypi
aiohttp 3.8.6 pypi_0 pypi
aiosignal 1.3.1 pypi_0 pypi
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
async-timeout 4.0.3 pypi_0 pypi
attrs 23.1.0 pypi_0 pypi
bitsandbytes 0.41.1 pypi_0 pypi
blas 1.0 mkl
blessings 1.7 py39h06a4308_1002
brotli-python 1.0.9 py39h6a678d5_7
bzip2 1.0.8 h7b6447c_0
ca-certificates 2023.08.22 h06a4308_0
cachetools 5.3.2 pypi_0 pypi
certifi 2023.7.22 py39h06a4308_0
cffi 1.15.1 py39h5eee18b_3
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.1.7 unix_pyh707e725_0 conda-forge
cryptography 41.0.3 py39hdda0065_0
cuda-cudart 11.7.99 0 nvidia
cuda-cupti 11.7.101 0 nvidia
cuda-libraries 11.7.1 0 nvidia
cuda-nvrtc 11.7.99 0 nvidia
cuda-nvtx 11.7.91 0 nvidia
cuda-runtime 11.7.1 0 nvidia
datasets 2.14.6 pypi_0 pypi
diffusers 0.22.0.dev0 pypi_0 pypi
dill 0.3.7 pypi_0 pypi
docker-pycreds 0.4.0 py_0 conda-forge
ffmpeg 4.3 hf484d3e_0 pytorch
filelock 3.12.4 pypi_0 pypi
freetype 2.12.1 h4a9f257_0
frozenlist 1.4.0 pypi_0 pypi
fsspec 2023.10.0 pypi_0 pypi
ftfy 6.1.1 pypi_0 pypi
giflib 5.2.1 h5eee18b_3
gitdb 4.0.11 pyhd8ed1ab_0 conda-forge
gitpython 3.1.40 pyhd8ed1ab_0 conda-forge
gmp 6.2.1 h295c915_3
gnutls 3.6.15 he1e5248_0
google-auth 2.23.3 pypi_0 pypi
google-auth-oauthlib 1.1.0 pypi_0 pypi
gpustat 0.6.0 pyhd3eb1b0_1
grpcio 1.59.0 pypi_0 pypi
huggingface-hub 0.17.3 pypi_0 pypi
idna 3.4 py39h06a4308_0
importlib-metadata 6.8.0 pypi_0 pypi
intel-openmp 2023.1.0 hdb19cb5_46305
jinja2 3.1.2 pypi_0 pypi
jpeg 9e h5eee18b_1
lame 3.100 h7b6447c_0
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libcublas 11.10.3.66 0 nvidia
libcufft 10.7.2.124 h4fbf590_0 nvidia
libcufile 1.8.0.34 0 nvidia
libcurand 10.3.4.52 0 nvidia
libcusolver 11.4.0.1 0 nvidia
libcusparse 11.7.4.91 0 nvidia
libdeflate 1.17 h5eee18b_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 13.2.0 h807b86a_2 conda-forge
libgfortran-ng 13.2.0 h69a702a_2 conda-forge
libgfortran5 13.2.0 ha4646dd_2 conda-forge
libiconv 1.16 h7f8727e_2
libidn2 2.3.4 h5eee18b_0
libnpp 11.7.4.75 0 nvidia
libnvjpeg 11.8.0.2 0 nvidia
libpng 1.6.39 h5eee18b_0
libprotobuf 3.20.3 he621ea3_0
libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge
libtasn1 4.19.0 h5eee18b_0
libtiff 4.5.1 h6a678d5_0
libunistring 0.9.10 h27cfd23_0
libwebp 1.3.2 h11a3e52_0
libwebp-base 1.3.2 h5eee18b_0
llvm-openmp 14.0.6 h9e868ea_0
lz4-c 1.9.4 h6a678d5_0
markdown 3.5 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
mkl 2023.1.0 h213fc3f_46343
mkl-service 2.4.0 py39h5eee18b_1
mkl_fft 1.3.8 py39h5eee18b_0
mkl_random 1.2.4 py39hdb19cb5_0
multidict 6.0.4 pypi_0 pypi
multiprocess 0.70.15 pypi_0 pypi
ncurses 6.4 h6a678d5_0
nettle 3.7.3 hbbd107a_1
numpy 1.26.0 py39h5f9d8c6_0
numpy-base 1.26.0 py39hb5e798b_0
nvidia-ml 7.352.0 pyhd3eb1b0_0
oauthlib 3.2.2 pypi_0 pypi
openh264 2.1.1 h4ff587b_0
openjpeg 2.4.0 h3ad879b_0
openssl 3.0.11 h7f8727e_2
packaging 23.2 pypi_0 pypi
pandas 2.1.1 pypi_0 pypi
pathtools 0.1.2 py_1 conda-forge
pillow 10.0.1 py39ha6cbd5a_0
pip 23.3 py39h06a4308_0
protobuf 4.23.4 pypi_0 pypi
psutil 5.9.6 pypi_0 pypi
pyarrow 13.0.0 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pycparser 2.21 pyhd3eb1b0_0
pyopenssl 23.2.0 py39h06a4308_0
pysocks 1.7.1 py39h06a4308_0
python 3.9.18 h955ad1f_0
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.9 2_cp39 conda-forge
pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch
pytorch-cuda 11.7 h778d358_5 pytorch
pytorch-mutex 1.0 cuda pytorch
pytz 2023.3.post1 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
readline 8.2 h5eee18b_0
regex 2023.10.3 pypi_0 pypi
requests 2.31.0 py39h06a4308_0
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
safetensors 0.4.0 pypi_0 pypi
scipy 1.11.3 py39h5f9d8c6_0
sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge
setproctitle 1.1.10 py39h3811e60_1004 conda-forge
setuptools 68.0.0 py39h06a4308_0
six 1.16.0 pyh6c4a22f_0 conda-forge
smmap 5.0.0 pyhd8ed1ab_0 conda-forge
sqlite 3.41.2 h5eee18b_0
tbb 2021.8.0 hdb19cb5_0
tensorboard 2.15.0 pypi_0 pypi
tensorboard-data-server 0.7.2 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
tokenizers 0.14.1 pypi_0 pypi
torchaudio 0.13.1 py39_cu117 pytorch
torchtriton 2.1.0 py39 pytorch
torchvision 0.14.1 py39_cu117 pytorch
tqdm 4.66.1 pypi_0 pypi
transformers 4.34.1 pypi_0 pypi
typing_extensions 4.7.1 py39h06a4308_0
tzdata 2023.3 pypi_0 pypi
urllib3 1.26.18 py39h06a4308_0
wandb 0.15.12 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.8 pypi_0 pypi
werkzeug 3.0.1 pypi_0 pypi
wheel 0.41.2 py39h06a4308_0
xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers
xxhash 3.4.1 pypi_0 pypi
xz 5.4.2 h5eee18b_0
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.9.2 pypi_0 pypi
zipp 3.17.0 pypi_0 pypi
zlib 1.2.13 h5eee18b_0
zstd 1.5.5 hc292b87_0
NCCL debug info I get below output, if it helps.
```
11/09/2023 13:36:44 - INFO - __main__ - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 2
Process index: 1
Local process index: 1
Device: cuda:1
Mixed precision type: fp16
Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
11/09/2023 13:36:44 - INFO - __main__ - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 2
Process index: 0
Local process index: 0
Device: cuda:0
Mixed precision type: fp16
{'timestep_spacing', 'thresholding', 'variance_type', 'clip_sample_range', 'prediction_type', 'dynamic_thresholding_ratio', 'sample_max_value'} was not found in config. Values will be initialized to default values.
{'norm_num_groups', 'force_upcast'} was not found in config. Values will be initialized to default values.
{'num_attention_heads', 'projection_class_embeddings_input_dim', 'addition_embed_type_num_heads', 'mid_block_only_cross_attention', 'addition_embed_type', 'num_class_embeds', 'upcast_attention', 'cross_attention_norm', 'addition_time_embed_dim', 'time_embedding_dim', 'class_embeddings_concat', 'encoder_hid_dim', 'encoder_hid_dim_type', 'resnet_out_scale_factor', 'attention_type', 'conv_out_kernel', 'only_cross_attention', 'resnet_time_scale_shift', 'resnet_skip_time_act', 'reverse_transformer_layers_per_block', 'conv_in_kernel', 'time_cond_proj_dim', 'use_linear_projection', 'mid_block_type', 'time_embedding_act_fn', 'dropout', 'timestep_post_act', 'dual_cross_attention', 'class_embed_type', 'transformer_layers_per_block', 'time_embedding_type'} was not found in config. Values will be initialized to default values.
{'num_attention_heads', 'projection_class_embeddings_input_dim', 'addition_embed_type_num_heads', 'mid_block_only_cross_attention', 'addition_embed_type', 'num_class_embeds', 'upcast_attention', 'cross_attention_norm', 'addition_time_embed_dim', 'time_embedding_dim', 'class_embeddings_concat', 'encoder_hid_dim', 'encoder_hid_dim_type', 'resnet_out_scale_factor', 'attention_type', 'conv_out_kernel', 'only_cross_attention', 'resnet_time_scale_shift', 'resnet_skip_time_act', 'reverse_transformer_layers_per_block', 'conv_in_kernel', 'time_cond_proj_dim', 'use_linear_projection', 'mid_block_type', 'time_embedding_act_fn', 'dropout', 'timestep_post_act', 'dual_cross_attention', 'class_embed_type', 'transformer_layers_per_block', 'time_embedding_type'} was not found in config. Values will be initialized to default values.
deepbull5:1311249:1311249 [0] NCCL INFO Bootstrap : Using enp194s0f0:128.205.43.171<0>
deepbull5:1311249:1311249 [0] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation
deepbull5:1311249:1311249 [0] NCCL INFO cudaDriverVersion 11070
NCCL version 2.14.3+cuda11.7
deepbull5:1311250:1311250 [1] NCCL INFO cudaDriverVersion 11070
deepbull5:1311249:1311365 [0] NCCL INFO NET/IB : No device found.
deepbull5:1311249:1311365 [0] NCCL INFO NET/Socket : Using [0]enp194s0f0:128.205.43.171<0>
deepbull5:1311249:1311365 [0] NCCL INFO Using network Socket
deepbull5:1311250:1311250 [1] NCCL INFO Bootstrap : Using enp194s0f0:128.205.43.171<0>
deepbull5:1311250:1311250 [1] NCCL INFO NET/Plugin : No plugin found (libnccl-net.so), using internal implementation
deepbull5:1311250:1311366 [1] NCCL INFO NET/IB : No device found.
deepbull5:1311250:1311366 [1] NCCL INFO NET/Socket : Using [0]enp194s0f0:128.205.43.171<0>
deepbull5:1311250:1311366 [1] NCCL INFO Using network Socket
deepbull5:1311250:1311366 [1] NCCL INFO Setting affinity for GPU 1 to ff,ffff0000,00ffffff
deepbull5:1311249:1311365 [0] NCCL INFO Setting affinity for GPU 0 to ff,ffff0000,00ffffff
deepbull5:1311249:1311365 [0] NCCL INFO Channel 00/04 : 0 1
deepbull5:1311250:1311366 [1] NCCL INFO Trees [0] -1/-1/-1->1->0 [1] 0/-1/-1->1->-1 [2] -1/-1/-1->1->0 [3] 0/-1/-1->1->-1
deepbull5:1311249:1311365 [0] NCCL INFO Channel 01/04 : 0 1
deepbull5:1311249:1311365 [0] NCCL INFO Channel 02/04 : 0 1
deepbull5:1311249:1311365 [0] NCCL INFO Channel 03/04 : 0 1
deepbull5:1311249:1311365 [0] NCCL INFO Trees [0] 1/-1/-1->0->-1 [1] -1/-1/-1->0->1 [2] 1/-1/-1->0->-1 [3] -1/-1/-1->0->1
deepbull5:1311249:1311365 [0] NCCL INFO Channel 00/0 : 0[1000] -> 1[24000] via P2P/IPC
deepbull5:1311250:1311366 [1] NCCL INFO Channel 00/0 : 1[24000] -> 0[1000] via P2P/IPC
deepbull5:1311249:1311365 [0] NCCL INFO Channel 01/0 : 0[1000] -> 1[24000] via P2P/IPC
deepbull5:1311250:1311366 [1] NCCL INFO Channel 01/0 : 1[24000] -> 0[1000] via P2P/IPC
deepbull5:1311250:1311366 [1] NCCL INFO Channel 02/0 : 1[24000] -> 0[1000] via P2P/IPC
deepbull5:1311249:1311365 [0] NCCL INFO Channel 02/0 : 0[1000] -> 1[24000] via P2P/IPC
deepbull5:1311250:1311366 [1] NCCL INFO Channel 03/0 : 1[24000] -> 0[1000] via P2P/IPC
deepbull5:1311249:1311365 [0] NCCL INFO Channel 03/0 : 0[1000] -> 1[24000] via P2P/IPC
deepbull5:1311249:1311365 [0] NCCL INFO Connected all rings
deepbull5:1311249:1311365 [0] NCCL INFO Connected all trees
deepbull5:1311249:1311365 [0] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512
deepbull5:1311249:1311365 [0] NCCL INFO 4 coll channels, 4 p2p channels, 2 p2p channels per peer
deepbull5:1311250:1311366 [1] NCCL INFO Connected all rings
deepbull5:1311250:1311366 [1] NCCL INFO Connected all trees
deepbull5:1311250:1311366 [1] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512
deepbull5:1311250:1311366 [1] NCCL INFO 4 coll channels, 4 p2p channels, 2 p2p channels per peer
deepbull5:1311249:1311365 [0] NCCL INFO comm 0x88a84ee0 rank 0 nranks 2 cudaDev 0 busId 1000 - Init COMPLETE
deepbull5:1311250:1311366 [1] NCCL INFO comm 0x89a42f60 rank 1 nranks 2 cudaDev 1 busId 24000 - Init COMPLETE
```
|
[
-0.2909313142299652,
-0.4494292140007019,
0.03063831478357315,
0.10455915331840515,
0.7972440719604492,
-0.06378240138292313,
0.38594141602516174,
0.08792949467897415,
-0.1931465119123459,
0.4078894853591919,
0.08595011383295059,
0.1558985412120819,
0.01676599122583866,
-0.07265175879001617,
0.027911003679037094,
-0.12267427146434784,
0.16364240646362305,
-0.15872281789779663,
-0.010782182216644287,
-0.2772058844566345,
0.05453769117593765,
0.028257226571440697,
-0.19733786582946777,
0.05589411035180092,
-0.41591396927833557,
-0.17970792949199677,
0.07356647402048111,
-0.052424922585487366,
-0.07989758998155594,
0.049917370080947876,
0.06106260418891907,
0.29907146096229553,
-0.2509962320327759,
0.4152541160583496,
-0.00012525713827926666,
0.015866339206695557,
0.1796836256980896,
0.1232440322637558,
-0.06226165220141411,
-0.2744100093841553,
-0.0629986822605133,
0.13892412185668945,
-0.24097122251987457,
0.010507717728614807,
-0.15297085046768188,
0.09709914028644562,
-0.14965294301509857,
-0.3297664523124695,
0.4145652651786804,
0.1475335955619812,
0.06290807574987411,
-0.09227778017520905,
-0.10776286572217941,
-0.24873687326908112,
-0.05516479164361954,
-0.2281971126794815,
-0.22079509496688843,
0.09067060053348541,
0.29400521516799927,
0.02757553569972515,
-0.4739748239517212,
0.4821746349334717,
0.18431353569030762,
-0.2245834916830063,
-0.02243240922689438,
-0.22474639117717743,
0.30558106303215027,
-0.35450825095176697,
0.14583110809326172,
0.30093464255332947,
0.12916310131549835,
0.047329895198345184,
-0.34344545006752014,
-0.3459233045578003,
0.35185888409614563,
-0.05253325030207634,
0.2394193708896637,
-0.01879228837788105,
-0.2868102788925171,
0.01207176223397255,
-0.2741742432117462,
-0.1855694055557251,
-0.08772631734609604,
0.024806294590234756,
-0.2787264585494995,
0.5902503132820129,
0.04143891483545303,
0.21439191699028015,
0.38448113203048706,
0.08770143240690231,
0.06263413280248642,
0.21698600053787231,
0.30538588762283325,
-0.1278984248638153,
-0.6810311675071716,
0.2551581561565399,
0.012996014207601547,
-0.3107762038707733,
0.09026842564344406,
0.11214157193899155,
0.05166182294487953,
-0.1752391755580902,
0.18033534288406372,
-0.10411519557237625,
0.357540100812912,
0.2335810363292694,
-0.144460529088974,
0.09754444658756256,
0.28902775049209595,
0.08275619149208069,
-0.17459100484848022,
0.20930173993110657,
-0.18796367943286896,
-0.11595205217599869,
-0.3650616407394409,
-0.03389016166329384,
0.02104414999485016,
-0.10529637336730957,
-0.20619997382164001,
0.1473441869020462,
0.11149407178163528,
0.17682740092277527,
0.277732789516449,
0.4206738770008087,
0.07787610590457916,
0.7555185556411743,
0.257912278175354,
-0.15936248004436493,
-0.021704381331801414,
0.12056685239076614,
-0.13192851841449738,
0.027789870277047157,
-0.1524314433336258,
0.0048628998920321465,
-0.19922642409801483,
-0.4760673940181732,
-0.01766311749815941,
0.0025353282690048218,
0.2723659574985504,
-0.05497690662741661,
-0.18235507607460022,
-0.22081242501735687,
0.3747166693210602,
0.3783281743526459,
-0.21296723186969757,
0.27907422184944153,
-0.0012138374149799347,
0.0017619356513023376,
0.03826957195997238,
0.07553084194660187,
0.03614684194326401,
0.05429532751441002,
-0.10336780548095703,
0.12322819977998734,
0.01188783347606659,
0.1707298457622528,
0.011563584208488464,
0.07063840329647064,
0.1995268166065216,
-0.20098979771137238,
0.20380482077598572,
-0.41346997022628784,
0.11982405185699463,
-0.009271497838199139,
0.3818601965904236,
0.260712206363678,
0.056342657655477524,
-0.008020643144845963,
-0.17035649716854095,
0.040609341114759445,
0.07158017158508301,
0.09834849834442139,
0.036216069012880325,
0.04308474436402321,
-0.261851042509079,
-0.10603059083223343,
-0.12996649742126465,
-0.3587591350078583,
-0.3763449490070343,
0.3257404863834381,
-0.6488755941390991,
0.257179856300354,
0.019184783101081848,
0.26223865151405334,
0.2667233943939209,
0.023535553365945816,
-0.06492944061756134,
0.5186481475830078,
-0.3449784219264984,
0.13019080460071564,
-0.23221102356910706,
0.20998917520046234,
0.17275062203407288,
0.2422475963830948,
0.021468693390488625,
0.12182480096817017,
-0.25892117619514465,
0.6672348976135254,
0.2809159755706787,
0.03601785749197006,
0.056356966495513916,
0.16508258879184723,
0.151911661028862,
-0.1499212384223938,
0.09039834886789322,
0.0025763586163520813,
-0.24591588973999023,
0.17286092042922974,
0.357694149017334,
0.12002071738243103,
0.1579478532075882,
-0.03802584484219551,
-0.12708020210266113,
0.05208662152290344,
-0.3576095402240753,
-0.3875843286514282,
-0.09129577875137329,
0.06910276412963867,
0.03674650564789772,
0.19581332802772522,
-0.150717630982399,
0.447248250246048,
-0.027167949825525284,
0.2193111926317215,
-0.6124288439750671,
0.036619871854782104,
-0.0009292773902416229,
-0.030168935656547546,
-0.2348170429468155,
0.013935569673776627,
-0.1778128743171692,
-0.31566014885902405,
-0.41003119945526123,
0.5038653016090393,
-0.1705000251531601,
0.08790336549282074,
-0.07338646799325943,
0.00928989052772522,
0.22858093678951263,
-0.044565871357917786,
-0.07263553142547607,
0.05791258066892624,
-0.0787341296672821,
-0.20616716146469116,
-0.22220274806022644,
0.34187960624694824,
-0.08082795143127441,
0.27868029475212097,
-0.04384741559624672,
0.2329300343990326,
0.21554037928581238,
0.08909325301647186,
-0.29612964391708374,
0.14724145829677582,
0.41495653986930847,
-0.13992497324943542,
0.8125129342079163,
-0.2005472034215927,
-0.38266509771347046,
0.2616850733757019,
0.11219103634357452,
0.05131535604596138,
-0.17455503344535828,
0.15135785937309265,
0.06870908290147781,
0.0006396900862455368,
0.08073686063289642,
0.22402139008045197,
0.24204957485198975,
-0.04289424046874046,
0.022172339260578156,
0.0635918378829956,
-0.2823144793510437,
-0.21769167482852936,
-0.014195658266544342,
-0.28047752380371094,
0.3538026809692383,
0.18512821197509766,
0.023111607879400253,
0.08829193562269211,
-0.22599858045578003,
-0.18948931992053986,
0.10063637793064117,
0.22963441908359528,
-0.04913590848445892,
0.10131373256444931,
-0.2498294562101364,
-0.37356576323509216,
-0.23612120747566223,
-0.021930206567049026,
-0.33328497409820557,
-0.33781692385673523,
-0.2623460292816162,
0.16798603534698486,
-0.03258591890335083,
0.4826873540878296,
0.13254091143608093,
0.07212060689926147,
0.48610222339630127,
0.01502224151045084,
-0.48691681027412415,
-0.002072665374726057,
-0.04992719739675522,
-0.07366719096899033,
0.10482243448495865,
-0.18185727298259735,
0.06869793683290482,
0.3106411397457123,
-0.09867686033248901,
-0.22447477281093597,
-0.4791809320449829,
-0.08977998793125153,
-0.29762041568756104,
0.1205577477812767,
0.23006084561347961,
0.12817604839801788,
0.14892473816871643,
0.19109834730625153,
0.2674545645713806,
-0.48766300082206726,
-0.07869010418653488,
0.11802084743976593,
0.15102386474609375,
-0.21905310451984406,
-0.10704909265041351,
-0.3263396620750427,
-0.07102688401937485,
-0.2586098313331604,
0.07136141508817673,
-0.5934932231903076,
-0.16868844628334045,
0.1230410560965538,
0.2816597521305084,
0.04888850823044777,
-0.21608220040798187,
-0.24563071131706238,
-0.05555758625268936,
-0.1069805771112442,
0.2370842695236206,
0.008940368890762329,
-0.2885042428970337,
-0.22880391776561737,
-0.07171427458524704,
-0.009264107793569565,
0.4674828052520752,
-0.4094809889793396,
-0.03520368039608002,
-0.2461749166250229,
-0.10047348588705063,
-0.06544182449579239,
-0.1234767884016037,
0.24379247426986694,
-0.21410861611366272,
0.030196448788046837,
-0.050529107451438904,
-0.19405382871627808,
0.1511908918619156,
0.16746410727500916,
0.2063281536102295,
-0.2826564610004425,
0.23079505562782288,
0.11247844994068146,
0.20688728988170624,
0.0009272191673517227,
0.10379447042942047,
-0.14080379903316498,
-0.03888168931007385,
0.07296056300401688,
0.08758656680583954,
-0.26166611909866333,
0.5775623321533203,
0.011863023042678833,
-0.1623510867357254,
-0.09711039066314697,
0.017759831622242928,
0.16147345304489136,
-0.22313706576824188,
0.2664770185947418,
0.10300115495920181,
-0.08254055678844452,
0.04868558049201965,
-0.2374325692653656,
0.10538990795612335,
0.1205999106168747,
0.28714120388031006,
0.27017098665237427,
0.27155801653862,
-0.02739221416413784,
0.20987531542778015,
0.14358927309513092,
-0.1692335456609726,
0.04695175215601921,
-0.09968395531177521,
-0.26031655073165894,
0.014362804591655731,
-0.02391044981777668,
0.6091195940971375,
0.006027009338140488,
-0.013803869485855103,
0.10203304141759872,
-0.35482534766197205,
0.9719858765602112,
-0.22146891057491302,
-0.026669949293136597,
0.09222090244293213,
-0.5891109704971313,
-0.036201126873493195,
-0.06563286483287811,
-0.009041823446750641,
-0.3841770589351654,
0.2069769948720932,
0.4139442443847656,
-0.1048702597618103,
-0.23602111637592316,
0.3500778377056122,
-0.09194770455360413,
-0.14105303585529327,
-0.008301259018480778,
-0.07509315013885498,
-0.4364456534385681,
-0.13838261365890503,
0.43255025148391724,
-0.1384715884923935,
0.032212190330028534,
-0.4152679145336151,
-0.05839204788208008,
-0.10723406076431274,
-0.02535402961075306,
-0.09618085622787476,
0.18223531544208527,
0.06347599625587463,
-0.19367370009422302,
0.3128209710121155,
0.19289138913154602,
0.209426611661911,
0.021395046263933182,
0.26464560627937317,
-0.17532135546207428,
-0.3635667562484741,
0.05325290560722351,
-0.15946008265018463,
-0.005654327571392059,
0.6761318445205688,
-0.3135617673397064,
0.26909148693084717,
-0.04029731824994087,
0.4125898480415344,
-0.0502418614923954,
0.31664666533470154,
0.224014014005661,
0.2651069760322571,
-0.21922917664051056,
-0.476666122674942,
0.28769272565841675,
0.2983628809452057,
0.04188165068626404,
0.34689292311668396,
-0.31513458490371704,
-0.11680616438388824,
-0.15012584626674652,
0.15870410203933716,
0.8173946738243103,
-0.17136125266551971,
0.1826728880405426,
0.338352233171463,
0.22604139149188995,
0.06513624638319016,
0.22490675747394562,
0.23265604674816132,
-0.3383626639842987,
-0.7098580598831177,
-0.14239849150180817,
-0.10279437154531479,
0.30479851365089417,
-0.11201432347297668,
-0.11560866236686707,
0.3596273958683014,
-0.0016800612211227417,
0.06868381053209305,
0.018713735044002533,
0.2067711055278778,
0.05152280628681183,
-0.3911636173725128,
-0.13501936197280884,
0.04093477874994278,
-0.20171143114566803,
0.3496333360671997,
-0.028038229793310165,
-0.05542478710412979,
-0.27293673157691956,
-0.0966164767742157,
-0.20163097977638245,
0.3631892502307892,
-0.3456370234489441,
-0.07656154036521912,
-0.1540466696023941,
-0.40909379720687866,
0.24086695909500122,
0.32045766711235046,
-0.032180577516555786,
0.14836065471172333,
0.024087736383080482,
0.36679670214653015,
-0.022546134889125824,
-0.048226844519376755,
0.13627387583255768,
-0.2603508234024048,
0.4779268801212311,
0.0022416487336158752,
0.20125162601470947,
0.013138800859451294,
-0.01138076651841402,
0.16694651544094086,
-0.058686934411525726,
-0.009294450283050537,
0.09570208191871643,
0.13714097440242767,
0.026442427188158035,
0.17865398526191711,
-0.23142226040363312,
-0.5112199783325195,
0.01928648166358471,
0.1434318572282791,
-0.2184351086616516,
0.14479750394821167,
-0.14816860854625702,
-0.17964321374893188,
0.011207152158021927,
0.43189212679862976,
0.07744775712490082,
-0.13039210438728333,
0.15494340658187866,
0.1897956132888794,
0.005871675908565521,
-0.10631853342056274,
-0.002437237650156021,
0.10239073634147644,
-0.5212151408195496,
0.4950087368488312,
-0.2783111333847046,
-0.25704294443130493,
0.1102403998374939,
-0.22471708059310913,
0.043006300926208496,
-0.2163388729095459,
-0.14439043402671814,
-0.18616744875907898,
-0.19291947782039642,
-0.02306322753429413,
-0.0920305848121643,
-0.0026150159537792206,
-0.32395002245903015,
0.18614068627357483,
0.19449923932552338,
0.21860550343990326,
-0.1848040223121643,
-0.10701044648885727,
-0.45262545347213745,
0.07453195750713348,
0.019695976749062538,
-0.17327579855918884,
0.00314713129773736,
-0.22970975935459137,
0.05020694434642792,
0.24520517885684967,
-0.002795289270579815,
-0.10506158322095871,
-0.24379444122314453,
0.16888116300106049,
0.1230272650718689,
0.18950361013412476,
0.19521449506282806,
-0.11302787065505981,
-0.26053452491760254,
-0.1119370087981224,
0.31061163544654846,
0.04665236920118332,
-0.0031405240297317505,
-0.2647835910320282,
0.021670859307050705,
0.2501440942287445,
0.1690126210451126,
0.34759750962257385,
-0.0034813061356544495,
-0.3070365786552429,
0.2179809808731079,
0.2513970732688904,
-0.0049506500363349915,
-0.1919056475162506,
-0.6131374835968018,
-0.060071222484111786,
0.25315943360328674,
-0.023185934871435165,
0.4646250605583191,
-0.2349524050951004,
-0.08317502588033676,
0.1386394202709198,
0.5589498281478882,
0.5356136560440063,
-0.42532268166542053,
-0.02069808728992939,
0.28149035573005676,
0.08085137605667114,
-0.24977368116378784,
0.2214163988828659,
-0.2292531132698059,
-0.09324132651090622,
0.04120318964123726,
0.35616305470466614,
0.0705505907535553,
0.06011973321437836,
-0.4157065153121948,
0.2909100651741028,
0.25161269307136536,
-0.07609632611274719,
-0.020012762397527695,
0.34123364090919495,
0.10369378328323364,
0.278134822845459,
0.18926632404327393,
0.17580711841583252,
-0.07051258534193039,
0.3598213195800781,
0.3061894178390503,
0.572867751121521,
0.16298943758010864,
0.33639591932296753,
0.173575758934021,
-0.17035076022148132,
-0.08556930720806122,
0.5045970678329468,
-0.5123759508132935,
0.24821242690086365,
-0.315806120634079,
0.17096984386444092,
-0.4819340109825134,
-0.5417717099189758,
-0.06486179679632187,
0.4234418272972107,
-0.2529945373535156,
0.14326056838035583,
0.3605586886405945,
-0.060305725783109665,
-0.2993945777416229,
0.005423158407211304,
0.014906644821166992,
-0.0960320383310318,
0.36617735028266907,
0.14307017624378204,
0.10829155892133713,
-0.34942594170570374,
-0.4175249934196472,
-0.027774713933467865,
0.16122525930404663,
-0.3294582962989807,
0.36876431107521057,
0.23874181509017944,
-0.14335031807422638,
-0.16125862300395966,
0.3789471685886383,
0.4078805446624756,
0.5197629928588867,
-0.13192439079284668,
0.2619068920612335,
0.18739865720272064,
0.007940715178847313,
0.2997673451900482,
0.2879449725151062,
0.14206373691558838,
0.24858517944812775,
0.31710052490234375,
-0.0400233268737793,
-0.13484524190425873,
-0.0639454573392868,
-0.014475475996732712,
0.4534778594970703,
-0.055410049855709076,
0.458178848028183,
-0.22142767906188965,
0.028118029236793518,
-0.20692911744117737,
0.19624900817871094,
-0.3841957151889801,
0.023330705240368843,
0.14712661504745483,
-0.2653200626373291,
-0.05601793900132179,
0.06436119228601456,
-0.003508690744638443,
0.02647731825709343,
0.49053382873535156,
0.23142804205417633,
0.2814991772174835,
-0.352979451417923,
-0.4432322382926941,
-0.7061959505081177,
0.16672801971435547,
0.02313201315701008,
-0.3064349293708801,
-0.017993828281760216,
0.12486842274665833,
0.12715263664722443,
-0.1001904159784317,
0.07469296455383301,
-0.35190549492836,
0.3043104410171509,
0.6546194553375244,
-0.13863474130630493,
-0.016189109534025192,
-0.130776047706604,
0.11704979091882706,
-0.06711462885141373,
-0.21607869863510132,
0.305032879114151,
0.35159021615982056,
-0.055631883442401886,
0.20460301637649536,
0.37299761176109314,
-0.028206558898091316,
-0.31865572929382324,
-0.0951099544763565,
0.01259553711861372,
0.0027327314019203186,
0.03513164073228836,
0.004853283986449242,
-0.18408825993537903,
0.10576308518648148,
-0.11553094536066055,
-0.12297675758600235,
0.327055960893631,
0.41286545991897583,
0.17702864110469818,
-0.08075924217700958,
-0.35006582736968994,
-0.0628417506814003,
0.31897658109664917,
0.14865396916866302,
-0.3886556327342987,
0.22415313124656677,
0.12985637784004211,
0.2001485824584961,
0.3253851532936096,
0.4608398675918579,
0.022029466927051544,
-0.06451848894357681,
-0.3949521780014038,
-0.43277817964553833,
0.5375047326087952,
0.21196839213371277,
-0.322956383228302,
-0.12017635256052017,
-0.09331813454627991,
-0.12758272886276245,
0.04584735631942749,
-0.38178256154060364,
-0.10365535318851471,
-0.0975683405995369,
-0.03149747475981712,
-0.47011736035346985,
0.14581917226314545,
-0.17087595164775848,
-0.1203007698059082,
-0.06335670500993729,
-0.00034411996603012085,
0.2299572229385376,
-0.1367713361978531,
0.3738822340965271,
-0.011800915002822876
] |
https://github.com/huggingface/datasets/issues/6363
|
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
|
I don't know what the issue was, but after going through the thread here I loved the issue with https://github.com/huggingface/accelerate/issues/314#issuecomment-1565259831
|
### Describe the bug
Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely.
### Steps to reproduce the bug
accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model"
### Expected behavior
It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset.
I added some debug prints
```
print("==========HERE3=============")
with accelerator.main_process_first():
print(accelerator.is_main_process)
print("===========Here3.1===========")
if args.max_train_samples is not None:
dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples))
print("===========Here3.2===========")
# Set the training transforms
train_dataset = dataset["train"].with_transform(preprocess_train)
print("==========HERE4=============")
Corresponding Output
Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 1
Local process index: 1
Device: cuda:1
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 2
Local process index: 2
Device: cuda:2
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 0
Local process index: 0
Device: cuda:0
Mixed precision type: fp16
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
{‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values.
{‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values.
==========HERE1=============
==========HERE1=============
==========HERE1=============
==========HERE2=============
==========HERE2=============
==========HERE2=============
==========HERE3=============
True
===========Here3.1===========
===========Here3.2===========
==========HERE3=============
==========HERE3=========
```
### Environment info
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_kmp_llvm conda-forge
absl-py 2.0.0 pypi_0 pypi
accelerate 0.24.0 pypi_0 pypi
aiohttp 3.8.6 pypi_0 pypi
aiosignal 1.3.1 pypi_0 pypi
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
async-timeout 4.0.3 pypi_0 pypi
attrs 23.1.0 pypi_0 pypi
bitsandbytes 0.41.1 pypi_0 pypi
blas 1.0 mkl
blessings 1.7 py39h06a4308_1002
brotli-python 1.0.9 py39h6a678d5_7
bzip2 1.0.8 h7b6447c_0
ca-certificates 2023.08.22 h06a4308_0
cachetools 5.3.2 pypi_0 pypi
certifi 2023.7.22 py39h06a4308_0
cffi 1.15.1 py39h5eee18b_3
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.1.7 unix_pyh707e725_0 conda-forge
cryptography 41.0.3 py39hdda0065_0
cuda-cudart 11.7.99 0 nvidia
cuda-cupti 11.7.101 0 nvidia
cuda-libraries 11.7.1 0 nvidia
cuda-nvrtc 11.7.99 0 nvidia
cuda-nvtx 11.7.91 0 nvidia
cuda-runtime 11.7.1 0 nvidia
datasets 2.14.6 pypi_0 pypi
diffusers 0.22.0.dev0 pypi_0 pypi
dill 0.3.7 pypi_0 pypi
docker-pycreds 0.4.0 py_0 conda-forge
ffmpeg 4.3 hf484d3e_0 pytorch
filelock 3.12.4 pypi_0 pypi
freetype 2.12.1 h4a9f257_0
frozenlist 1.4.0 pypi_0 pypi
fsspec 2023.10.0 pypi_0 pypi
ftfy 6.1.1 pypi_0 pypi
giflib 5.2.1 h5eee18b_3
gitdb 4.0.11 pyhd8ed1ab_0 conda-forge
gitpython 3.1.40 pyhd8ed1ab_0 conda-forge
gmp 6.2.1 h295c915_3
gnutls 3.6.15 he1e5248_0
google-auth 2.23.3 pypi_0 pypi
google-auth-oauthlib 1.1.0 pypi_0 pypi
gpustat 0.6.0 pyhd3eb1b0_1
grpcio 1.59.0 pypi_0 pypi
huggingface-hub 0.17.3 pypi_0 pypi
idna 3.4 py39h06a4308_0
importlib-metadata 6.8.0 pypi_0 pypi
intel-openmp 2023.1.0 hdb19cb5_46305
jinja2 3.1.2 pypi_0 pypi
jpeg 9e h5eee18b_1
lame 3.100 h7b6447c_0
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libcublas 11.10.3.66 0 nvidia
libcufft 10.7.2.124 h4fbf590_0 nvidia
libcufile 1.8.0.34 0 nvidia
libcurand 10.3.4.52 0 nvidia
libcusolver 11.4.0.1 0 nvidia
libcusparse 11.7.4.91 0 nvidia
libdeflate 1.17 h5eee18b_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 13.2.0 h807b86a_2 conda-forge
libgfortran-ng 13.2.0 h69a702a_2 conda-forge
libgfortran5 13.2.0 ha4646dd_2 conda-forge
libiconv 1.16 h7f8727e_2
libidn2 2.3.4 h5eee18b_0
libnpp 11.7.4.75 0 nvidia
libnvjpeg 11.8.0.2 0 nvidia
libpng 1.6.39 h5eee18b_0
libprotobuf 3.20.3 he621ea3_0
libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge
libtasn1 4.19.0 h5eee18b_0
libtiff 4.5.1 h6a678d5_0
libunistring 0.9.10 h27cfd23_0
libwebp 1.3.2 h11a3e52_0
libwebp-base 1.3.2 h5eee18b_0
llvm-openmp 14.0.6 h9e868ea_0
lz4-c 1.9.4 h6a678d5_0
markdown 3.5 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
mkl 2023.1.0 h213fc3f_46343
mkl-service 2.4.0 py39h5eee18b_1
mkl_fft 1.3.8 py39h5eee18b_0
mkl_random 1.2.4 py39hdb19cb5_0
multidict 6.0.4 pypi_0 pypi
multiprocess 0.70.15 pypi_0 pypi
ncurses 6.4 h6a678d5_0
nettle 3.7.3 hbbd107a_1
numpy 1.26.0 py39h5f9d8c6_0
numpy-base 1.26.0 py39hb5e798b_0
nvidia-ml 7.352.0 pyhd3eb1b0_0
oauthlib 3.2.2 pypi_0 pypi
openh264 2.1.1 h4ff587b_0
openjpeg 2.4.0 h3ad879b_0
openssl 3.0.11 h7f8727e_2
packaging 23.2 pypi_0 pypi
pandas 2.1.1 pypi_0 pypi
pathtools 0.1.2 py_1 conda-forge
pillow 10.0.1 py39ha6cbd5a_0
pip 23.3 py39h06a4308_0
protobuf 4.23.4 pypi_0 pypi
psutil 5.9.6 pypi_0 pypi
pyarrow 13.0.0 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pycparser 2.21 pyhd3eb1b0_0
pyopenssl 23.2.0 py39h06a4308_0
pysocks 1.7.1 py39h06a4308_0
python 3.9.18 h955ad1f_0
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.9 2_cp39 conda-forge
pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch
pytorch-cuda 11.7 h778d358_5 pytorch
pytorch-mutex 1.0 cuda pytorch
pytz 2023.3.post1 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
readline 8.2 h5eee18b_0
regex 2023.10.3 pypi_0 pypi
requests 2.31.0 py39h06a4308_0
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
safetensors 0.4.0 pypi_0 pypi
scipy 1.11.3 py39h5f9d8c6_0
sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge
setproctitle 1.1.10 py39h3811e60_1004 conda-forge
setuptools 68.0.0 py39h06a4308_0
six 1.16.0 pyh6c4a22f_0 conda-forge
smmap 5.0.0 pyhd8ed1ab_0 conda-forge
sqlite 3.41.2 h5eee18b_0
tbb 2021.8.0 hdb19cb5_0
tensorboard 2.15.0 pypi_0 pypi
tensorboard-data-server 0.7.2 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
tokenizers 0.14.1 pypi_0 pypi
torchaudio 0.13.1 py39_cu117 pytorch
torchtriton 2.1.0 py39 pytorch
torchvision 0.14.1 py39_cu117 pytorch
tqdm 4.66.1 pypi_0 pypi
transformers 4.34.1 pypi_0 pypi
typing_extensions 4.7.1 py39h06a4308_0
tzdata 2023.3 pypi_0 pypi
urllib3 1.26.18 py39h06a4308_0
wandb 0.15.12 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.8 pypi_0 pypi
werkzeug 3.0.1 pypi_0 pypi
wheel 0.41.2 py39h06a4308_0
xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers
xxhash 3.4.1 pypi_0 pypi
xz 5.4.2 h5eee18b_0
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.9.2 pypi_0 pypi
zipp 3.17.0 pypi_0 pypi
zlib 1.2.13 h5eee18b_0
zstd 1.5.5 hc292b87_0
| 20
|
dataset.transform() hangs indefinitely while finetuning the stable diffusion XL
### Describe the bug
Multi-GPU fine-tuning the stable diffusion X by following https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/README_sdxl.md hangs indefinitely.
### Steps to reproduce the bug
accelerate launch train_text_to_image_sdxl.py --pretrained_model_name_or_path=$MODEL_NAME --pretrained_vae_model_name_or_path=$VAE_NAME --dataset_name=$DATASET_NAME --enable_xformers_memory_efficient_attention --resolution=512 --center_crop --random_flip --proportion_empty_prompts=0.2 --train_batch_size=1 --gradient_accumulation_steps=4 --gradient_checkpointing --max_train_steps=10000 --use_8bit_adam --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 --mixed_precision="fp16" --report_to="wandb" --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 --checkpointing_steps=5000 --output_dir="sdxl-pokemon-model"
### Expected behavior
It should start the training as it does for the single GPU training. I opened the issue in diffusers **https://github.com/huggingface/diffusers/issues/5534 but it does seem to be an issue with the Pokemon dataset.
I added some debug prints
```
print("==========HERE3=============")
with accelerator.main_process_first():
print(accelerator.is_main_process)
print("===========Here3.1===========")
if args.max_train_samples is not None:
dataset["train"] = dataset["train"].shuffle(seed=args.seed).select(range(args.max_train_samples))
print("===========Here3.2===========")
# Set the training transforms
train_dataset = dataset["train"].with_transform(preprocess_train)
print("==========HERE4=============")
Corresponding Output
Detected kernel version 5.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 1
Local process index: 1
Device: cuda:1
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 2
Local process index: 2
Device: cuda:2
Mixed precision type: fp16
10/25/2023 21:18:04 - INFO - main - Distributed environment: MULTI_GPU Backend: nccl
Num processes: 3
Process index: 0
Local process index: 0
Device: cuda:0
Mixed precision type: fp16
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
{‘variance_type’, ‘clip_sample_range’, ‘thresholding’, ‘dynamic_thresholding_ratio’} was not found in config. Values will be initialized to default values.
{‘attention_type’, ‘reverse_transformer_layers_per_block’, ‘dropout’} was not found in config. Values will be initialized to default values.
==========HERE1=============
==========HERE1=============
==========HERE1=============
==========HERE2=============
==========HERE2=============
==========HERE2=============
==========HERE3=============
True
===========Here3.1===========
===========Here3.2===========
==========HERE3=============
==========HERE3=========
```
### Environment info
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_kmp_llvm conda-forge
absl-py 2.0.0 pypi_0 pypi
accelerate 0.24.0 pypi_0 pypi
aiohttp 3.8.6 pypi_0 pypi
aiosignal 1.3.1 pypi_0 pypi
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
async-timeout 4.0.3 pypi_0 pypi
attrs 23.1.0 pypi_0 pypi
bitsandbytes 0.41.1 pypi_0 pypi
blas 1.0 mkl
blessings 1.7 py39h06a4308_1002
brotli-python 1.0.9 py39h6a678d5_7
bzip2 1.0.8 h7b6447c_0
ca-certificates 2023.08.22 h06a4308_0
cachetools 5.3.2 pypi_0 pypi
certifi 2023.7.22 py39h06a4308_0
cffi 1.15.1 py39h5eee18b_3
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.1.7 unix_pyh707e725_0 conda-forge
cryptography 41.0.3 py39hdda0065_0
cuda-cudart 11.7.99 0 nvidia
cuda-cupti 11.7.101 0 nvidia
cuda-libraries 11.7.1 0 nvidia
cuda-nvrtc 11.7.99 0 nvidia
cuda-nvtx 11.7.91 0 nvidia
cuda-runtime 11.7.1 0 nvidia
datasets 2.14.6 pypi_0 pypi
diffusers 0.22.0.dev0 pypi_0 pypi
dill 0.3.7 pypi_0 pypi
docker-pycreds 0.4.0 py_0 conda-forge
ffmpeg 4.3 hf484d3e_0 pytorch
filelock 3.12.4 pypi_0 pypi
freetype 2.12.1 h4a9f257_0
frozenlist 1.4.0 pypi_0 pypi
fsspec 2023.10.0 pypi_0 pypi
ftfy 6.1.1 pypi_0 pypi
giflib 5.2.1 h5eee18b_3
gitdb 4.0.11 pyhd8ed1ab_0 conda-forge
gitpython 3.1.40 pyhd8ed1ab_0 conda-forge
gmp 6.2.1 h295c915_3
gnutls 3.6.15 he1e5248_0
google-auth 2.23.3 pypi_0 pypi
google-auth-oauthlib 1.1.0 pypi_0 pypi
gpustat 0.6.0 pyhd3eb1b0_1
grpcio 1.59.0 pypi_0 pypi
huggingface-hub 0.17.3 pypi_0 pypi
idna 3.4 py39h06a4308_0
importlib-metadata 6.8.0 pypi_0 pypi
intel-openmp 2023.1.0 hdb19cb5_46305
jinja2 3.1.2 pypi_0 pypi
jpeg 9e h5eee18b_1
lame 3.100 h7b6447c_0
lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libcublas 11.10.3.66 0 nvidia
libcufft 10.7.2.124 h4fbf590_0 nvidia
libcufile 1.8.0.34 0 nvidia
libcurand 10.3.4.52 0 nvidia
libcusolver 11.4.0.1 0 nvidia
libcusparse 11.7.4.91 0 nvidia
libdeflate 1.17 h5eee18b_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 13.2.0 h807b86a_2 conda-forge
libgfortran-ng 13.2.0 h69a702a_2 conda-forge
libgfortran5 13.2.0 ha4646dd_2 conda-forge
libiconv 1.16 h7f8727e_2
libidn2 2.3.4 h5eee18b_0
libnpp 11.7.4.75 0 nvidia
libnvjpeg 11.8.0.2 0 nvidia
libpng 1.6.39 h5eee18b_0
libprotobuf 3.20.3 he621ea3_0
libstdcxx-ng 13.2.0 h7e041cc_2 conda-forge
libtasn1 4.19.0 h5eee18b_0
libtiff 4.5.1 h6a678d5_0
libunistring 0.9.10 h27cfd23_0
libwebp 1.3.2 h11a3e52_0
libwebp-base 1.3.2 h5eee18b_0
llvm-openmp 14.0.6 h9e868ea_0
lz4-c 1.9.4 h6a678d5_0
markdown 3.5 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
mkl 2023.1.0 h213fc3f_46343
mkl-service 2.4.0 py39h5eee18b_1
mkl_fft 1.3.8 py39h5eee18b_0
mkl_random 1.2.4 py39hdb19cb5_0
multidict 6.0.4 pypi_0 pypi
multiprocess 0.70.15 pypi_0 pypi
ncurses 6.4 h6a678d5_0
nettle 3.7.3 hbbd107a_1
numpy 1.26.0 py39h5f9d8c6_0
numpy-base 1.26.0 py39hb5e798b_0
nvidia-ml 7.352.0 pyhd3eb1b0_0
oauthlib 3.2.2 pypi_0 pypi
openh264 2.1.1 h4ff587b_0
openjpeg 2.4.0 h3ad879b_0
openssl 3.0.11 h7f8727e_2
packaging 23.2 pypi_0 pypi
pandas 2.1.1 pypi_0 pypi
pathtools 0.1.2 py_1 conda-forge
pillow 10.0.1 py39ha6cbd5a_0
pip 23.3 py39h06a4308_0
protobuf 4.23.4 pypi_0 pypi
psutil 5.9.6 pypi_0 pypi
pyarrow 13.0.0 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pycparser 2.21 pyhd3eb1b0_0
pyopenssl 23.2.0 py39h06a4308_0
pysocks 1.7.1 py39h06a4308_0
python 3.9.18 h955ad1f_0
python-dateutil 2.8.2 pypi_0 pypi
python_abi 3.9 2_cp39 conda-forge
pytorch 1.13.1 py3.9_cuda11.7_cudnn8.5.0_0 pytorch
pytorch-cuda 11.7 h778d358_5 pytorch
pytorch-mutex 1.0 cuda pytorch
pytz 2023.3.post1 pypi_0 pypi
pyyaml 6.0.1 pypi_0 pypi
readline 8.2 h5eee18b_0
regex 2023.10.3 pypi_0 pypi
requests 2.31.0 py39h06a4308_0
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
safetensors 0.4.0 pypi_0 pypi
scipy 1.11.3 py39h5f9d8c6_0
sentry-sdk 1.32.0 pyhd8ed1ab_0 conda-forge
setproctitle 1.1.10 py39h3811e60_1004 conda-forge
setuptools 68.0.0 py39h06a4308_0
six 1.16.0 pyh6c4a22f_0 conda-forge
smmap 5.0.0 pyhd8ed1ab_0 conda-forge
sqlite 3.41.2 h5eee18b_0
tbb 2021.8.0 hdb19cb5_0
tensorboard 2.15.0 pypi_0 pypi
tensorboard-data-server 0.7.2 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
tokenizers 0.14.1 pypi_0 pypi
torchaudio 0.13.1 py39_cu117 pytorch
torchtriton 2.1.0 py39 pytorch
torchvision 0.14.1 py39_cu117 pytorch
tqdm 4.66.1 pypi_0 pypi
transformers 4.34.1 pypi_0 pypi
typing_extensions 4.7.1 py39h06a4308_0
tzdata 2023.3 pypi_0 pypi
urllib3 1.26.18 py39h06a4308_0
wandb 0.15.12 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.8 pypi_0 pypi
werkzeug 3.0.1 pypi_0 pypi
wheel 0.41.2 py39h06a4308_0
xformers 0.0.22.post7 py39_cu11.7.1_pyt1.13.1 xformers
xxhash 3.4.1 pypi_0 pypi
xz 5.4.2 h5eee18b_0
yaml 0.2.5 h7f98852_2 conda-forge
yarl 1.9.2 pypi_0 pypi
zipp 3.17.0 pypi_0 pypi
zlib 1.2.13 h5eee18b_0
zstd 1.5.5 hc292b87_0
I don't know what the issue was, but after going through the thread here I loved the issue with https://github.com/huggingface/accelerate/issues/314#issuecomment-1565259831
|
[
-0.2909313142299652,
-0.4494292140007019,
0.03063831478357315,
0.10455915331840515,
0.7972440719604492,
-0.06378240138292313,
0.38594141602516174,
0.08792949467897415,
-0.1931465119123459,
0.4078894853591919,
0.08595011383295059,
0.1558985412120819,
0.01676599122583866,
-0.07265175879001617,
0.027911003679037094,
-0.12267427146434784,
0.16364240646362305,
-0.15872281789779663,
-0.010782182216644287,
-0.2772058844566345,
0.05453769117593765,
0.028257226571440697,
-0.19733786582946777,
0.05589411035180092,
-0.41591396927833557,
-0.17970792949199677,
0.07356647402048111,
-0.052424922585487366,
-0.07989758998155594,
0.049917370080947876,
0.06106260418891907,
0.29907146096229553,
-0.2509962320327759,
0.4152541160583496,
-0.00012525713827926666,
0.015866339206695557,
0.1796836256980896,
0.1232440322637558,
-0.06226165220141411,
-0.2744100093841553,
-0.0629986822605133,
0.13892412185668945,
-0.24097122251987457,
0.010507717728614807,
-0.15297085046768188,
0.09709914028644562,
-0.14965294301509857,
-0.3297664523124695,
0.4145652651786804,
0.1475335955619812,
0.06290807574987411,
-0.09227778017520905,
-0.10776286572217941,
-0.24873687326908112,
-0.05516479164361954,
-0.2281971126794815,
-0.22079509496688843,
0.09067060053348541,
0.29400521516799927,
0.02757553569972515,
-0.4739748239517212,
0.4821746349334717,
0.18431353569030762,
-0.2245834916830063,
-0.02243240922689438,
-0.22474639117717743,
0.30558106303215027,
-0.35450825095176697,
0.14583110809326172,
0.30093464255332947,
0.12916310131549835,
0.047329895198345184,
-0.34344545006752014,
-0.3459233045578003,
0.35185888409614563,
-0.05253325030207634,
0.2394193708896637,
-0.01879228837788105,
-0.2868102788925171,
0.01207176223397255,
-0.2741742432117462,
-0.1855694055557251,
-0.08772631734609604,
0.024806294590234756,
-0.2787264585494995,
0.5902503132820129,
0.04143891483545303,
0.21439191699028015,
0.38448113203048706,
0.08770143240690231,
0.06263413280248642,
0.21698600053787231,
0.30538588762283325,
-0.1278984248638153,
-0.6810311675071716,
0.2551581561565399,
0.012996014207601547,
-0.3107762038707733,
0.09026842564344406,
0.11214157193899155,
0.05166182294487953,
-0.1752391755580902,
0.18033534288406372,
-0.10411519557237625,
0.357540100812912,
0.2335810363292694,
-0.144460529088974,
0.09754444658756256,
0.28902775049209595,
0.08275619149208069,
-0.17459100484848022,
0.20930173993110657,
-0.18796367943286896,
-0.11595205217599869,
-0.3650616407394409,
-0.03389016166329384,
0.02104414999485016,
-0.10529637336730957,
-0.20619997382164001,
0.1473441869020462,
0.11149407178163528,
0.17682740092277527,
0.277732789516449,
0.4206738770008087,
0.07787610590457916,
0.7555185556411743,
0.257912278175354,
-0.15936248004436493,
-0.021704381331801414,
0.12056685239076614,
-0.13192851841449738,
0.027789870277047157,
-0.1524314433336258,
0.0048628998920321465,
-0.19922642409801483,
-0.4760673940181732,
-0.01766311749815941,
0.0025353282690048218,
0.2723659574985504,
-0.05497690662741661,
-0.18235507607460022,
-0.22081242501735687,
0.3747166693210602,
0.3783281743526459,
-0.21296723186969757,
0.27907422184944153,
-0.0012138374149799347,
0.0017619356513023376,
0.03826957195997238,
0.07553084194660187,
0.03614684194326401,
0.05429532751441002,
-0.10336780548095703,
0.12322819977998734,
0.01188783347606659,
0.1707298457622528,
0.011563584208488464,
0.07063840329647064,
0.1995268166065216,
-0.20098979771137238,
0.20380482077598572,
-0.41346997022628784,
0.11982405185699463,
-0.009271497838199139,
0.3818601965904236,
0.260712206363678,
0.056342657655477524,
-0.008020643144845963,
-0.17035649716854095,
0.040609341114759445,
0.07158017158508301,
0.09834849834442139,
0.036216069012880325,
0.04308474436402321,
-0.261851042509079,
-0.10603059083223343,
-0.12996649742126465,
-0.3587591350078583,
-0.3763449490070343,
0.3257404863834381,
-0.6488755941390991,
0.257179856300354,
0.019184783101081848,
0.26223865151405334,
0.2667233943939209,
0.023535553365945816,
-0.06492944061756134,
0.5186481475830078,
-0.3449784219264984,
0.13019080460071564,
-0.23221102356910706,
0.20998917520046234,
0.17275062203407288,
0.2422475963830948,
0.021468693390488625,
0.12182480096817017,
-0.25892117619514465,
0.6672348976135254,
0.2809159755706787,
0.03601785749197006,
0.056356966495513916,
0.16508258879184723,
0.151911661028862,
-0.1499212384223938,
0.09039834886789322,
0.0025763586163520813,
-0.24591588973999023,
0.17286092042922974,
0.357694149017334,
0.12002071738243103,
0.1579478532075882,
-0.03802584484219551,
-0.12708020210266113,
0.05208662152290344,
-0.3576095402240753,
-0.3875843286514282,
-0.09129577875137329,
0.06910276412963867,
0.03674650564789772,
0.19581332802772522,
-0.150717630982399,
0.447248250246048,
-0.027167949825525284,
0.2193111926317215,
-0.6124288439750671,
0.036619871854782104,
-0.0009292773902416229,
-0.030168935656547546,
-0.2348170429468155,
0.013935569673776627,
-0.1778128743171692,
-0.31566014885902405,
-0.41003119945526123,
0.5038653016090393,
-0.1705000251531601,
0.08790336549282074,
-0.07338646799325943,
0.00928989052772522,
0.22858093678951263,
-0.044565871357917786,
-0.07263553142547607,
0.05791258066892624,
-0.0787341296672821,
-0.20616716146469116,
-0.22220274806022644,
0.34187960624694824,
-0.08082795143127441,
0.27868029475212097,
-0.04384741559624672,
0.2329300343990326,
0.21554037928581238,
0.08909325301647186,
-0.29612964391708374,
0.14724145829677582,
0.41495653986930847,
-0.13992497324943542,
0.8125129342079163,
-0.2005472034215927,
-0.38266509771347046,
0.2616850733757019,
0.11219103634357452,
0.05131535604596138,
-0.17455503344535828,
0.15135785937309265,
0.06870908290147781,
0.0006396900862455368,
0.08073686063289642,
0.22402139008045197,
0.24204957485198975,
-0.04289424046874046,
0.022172339260578156,
0.0635918378829956,
-0.2823144793510437,
-0.21769167482852936,
-0.014195658266544342,
-0.28047752380371094,
0.3538026809692383,
0.18512821197509766,
0.023111607879400253,
0.08829193562269211,
-0.22599858045578003,
-0.18948931992053986,
0.10063637793064117,
0.22963441908359528,
-0.04913590848445892,
0.10131373256444931,
-0.2498294562101364,
-0.37356576323509216,
-0.23612120747566223,
-0.021930206567049026,
-0.33328497409820557,
-0.33781692385673523,
-0.2623460292816162,
0.16798603534698486,
-0.03258591890335083,
0.4826873540878296,
0.13254091143608093,
0.07212060689926147,
0.48610222339630127,
0.01502224151045084,
-0.48691681027412415,
-0.002072665374726057,
-0.04992719739675522,
-0.07366719096899033,
0.10482243448495865,
-0.18185727298259735,
0.06869793683290482,
0.3106411397457123,
-0.09867686033248901,
-0.22447477281093597,
-0.4791809320449829,
-0.08977998793125153,
-0.29762041568756104,
0.1205577477812767,
0.23006084561347961,
0.12817604839801788,
0.14892473816871643,
0.19109834730625153,
0.2674545645713806,
-0.48766300082206726,
-0.07869010418653488,
0.11802084743976593,
0.15102386474609375,
-0.21905310451984406,
-0.10704909265041351,
-0.3263396620750427,
-0.07102688401937485,
-0.2586098313331604,
0.07136141508817673,
-0.5934932231903076,
-0.16868844628334045,
0.1230410560965538,
0.2816597521305084,
0.04888850823044777,
-0.21608220040798187,
-0.24563071131706238,
-0.05555758625268936,
-0.1069805771112442,
0.2370842695236206,
0.008940368890762329,
-0.2885042428970337,
-0.22880391776561737,
-0.07171427458524704,
-0.009264107793569565,
0.4674828052520752,
-0.4094809889793396,
-0.03520368039608002,
-0.2461749166250229,
-0.10047348588705063,
-0.06544182449579239,
-0.1234767884016037,
0.24379247426986694,
-0.21410861611366272,
0.030196448788046837,
-0.050529107451438904,
-0.19405382871627808,
0.1511908918619156,
0.16746410727500916,
0.2063281536102295,
-0.2826564610004425,
0.23079505562782288,
0.11247844994068146,
0.20688728988170624,
0.0009272191673517227,
0.10379447042942047,
-0.14080379903316498,
-0.03888168931007385,
0.07296056300401688,
0.08758656680583954,
-0.26166611909866333,
0.5775623321533203,
0.011863023042678833,
-0.1623510867357254,
-0.09711039066314697,
0.017759831622242928,
0.16147345304489136,
-0.22313706576824188,
0.2664770185947418,
0.10300115495920181,
-0.08254055678844452,
0.04868558049201965,
-0.2374325692653656,
0.10538990795612335,
0.1205999106168747,
0.28714120388031006,
0.27017098665237427,
0.27155801653862,
-0.02739221416413784,
0.20987531542778015,
0.14358927309513092,
-0.1692335456609726,
0.04695175215601921,
-0.09968395531177521,
-0.26031655073165894,
0.014362804591655731,
-0.02391044981777668,
0.6091195940971375,
0.006027009338140488,
-0.013803869485855103,
0.10203304141759872,
-0.35482534766197205,
0.9719858765602112,
-0.22146891057491302,
-0.026669949293136597,
0.09222090244293213,
-0.5891109704971313,
-0.036201126873493195,
-0.06563286483287811,
-0.009041823446750641,
-0.3841770589351654,
0.2069769948720932,
0.4139442443847656,
-0.1048702597618103,
-0.23602111637592316,
0.3500778377056122,
-0.09194770455360413,
-0.14105303585529327,
-0.008301259018480778,
-0.07509315013885498,
-0.4364456534385681,
-0.13838261365890503,
0.43255025148391724,
-0.1384715884923935,
0.032212190330028534,
-0.4152679145336151,
-0.05839204788208008,
-0.10723406076431274,
-0.02535402961075306,
-0.09618085622787476,
0.18223531544208527,
0.06347599625587463,
-0.19367370009422302,
0.3128209710121155,
0.19289138913154602,
0.209426611661911,
0.021395046263933182,
0.26464560627937317,
-0.17532135546207428,
-0.3635667562484741,
0.05325290560722351,
-0.15946008265018463,
-0.005654327571392059,
0.6761318445205688,
-0.3135617673397064,
0.26909148693084717,
-0.04029731824994087,
0.4125898480415344,
-0.0502418614923954,
0.31664666533470154,
0.224014014005661,
0.2651069760322571,
-0.21922917664051056,
-0.476666122674942,
0.28769272565841675,
0.2983628809452057,
0.04188165068626404,
0.34689292311668396,
-0.31513458490371704,
-0.11680616438388824,
-0.15012584626674652,
0.15870410203933716,
0.8173946738243103,
-0.17136125266551971,
0.1826728880405426,
0.338352233171463,
0.22604139149188995,
0.06513624638319016,
0.22490675747394562,
0.23265604674816132,
-0.3383626639842987,
-0.7098580598831177,
-0.14239849150180817,
-0.10279437154531479,
0.30479851365089417,
-0.11201432347297668,
-0.11560866236686707,
0.3596273958683014,
-0.0016800612211227417,
0.06868381053209305,
0.018713735044002533,
0.2067711055278778,
0.05152280628681183,
-0.3911636173725128,
-0.13501936197280884,
0.04093477874994278,
-0.20171143114566803,
0.3496333360671997,
-0.028038229793310165,
-0.05542478710412979,
-0.27293673157691956,
-0.0966164767742157,
-0.20163097977638245,
0.3631892502307892,
-0.3456370234489441,
-0.07656154036521912,
-0.1540466696023941,
-0.40909379720687866,
0.24086695909500122,
0.32045766711235046,
-0.032180577516555786,
0.14836065471172333,
0.024087736383080482,
0.36679670214653015,
-0.022546134889125824,
-0.048226844519376755,
0.13627387583255768,
-0.2603508234024048,
0.4779268801212311,
0.0022416487336158752,
0.20125162601470947,
0.013138800859451294,
-0.01138076651841402,
0.16694651544094086,
-0.058686934411525726,
-0.009294450283050537,
0.09570208191871643,
0.13714097440242767,
0.026442427188158035,
0.17865398526191711,
-0.23142226040363312,
-0.5112199783325195,
0.01928648166358471,
0.1434318572282791,
-0.2184351086616516,
0.14479750394821167,
-0.14816860854625702,
-0.17964321374893188,
0.011207152158021927,
0.43189212679862976,
0.07744775712490082,
-0.13039210438728333,
0.15494340658187866,
0.1897956132888794,
0.005871675908565521,
-0.10631853342056274,
-0.002437237650156021,
0.10239073634147644,
-0.5212151408195496,
0.4950087368488312,
-0.2783111333847046,
-0.25704294443130493,
0.1102403998374939,
-0.22471708059310913,
0.043006300926208496,
-0.2163388729095459,
-0.14439043402671814,
-0.18616744875907898,
-0.19291947782039642,
-0.02306322753429413,
-0.0920305848121643,
-0.0026150159537792206,
-0.32395002245903015,
0.18614068627357483,
0.19449923932552338,
0.21860550343990326,
-0.1848040223121643,
-0.10701044648885727,
-0.45262545347213745,
0.07453195750713348,
0.019695976749062538,
-0.17327579855918884,
0.00314713129773736,
-0.22970975935459137,
0.05020694434642792,
0.24520517885684967,
-0.002795289270579815,
-0.10506158322095871,
-0.24379444122314453,
0.16888116300106049,
0.1230272650718689,
0.18950361013412476,
0.19521449506282806,
-0.11302787065505981,
-0.26053452491760254,
-0.1119370087981224,
0.31061163544654846,
0.04665236920118332,
-0.0031405240297317505,
-0.2647835910320282,
0.021670859307050705,
0.2501440942287445,
0.1690126210451126,
0.34759750962257385,
-0.0034813061356544495,
-0.3070365786552429,
0.2179809808731079,
0.2513970732688904,
-0.0049506500363349915,
-0.1919056475162506,
-0.6131374835968018,
-0.060071222484111786,
0.25315943360328674,
-0.023185934871435165,
0.4646250605583191,
-0.2349524050951004,
-0.08317502588033676,
0.1386394202709198,
0.5589498281478882,
0.5356136560440063,
-0.42532268166542053,
-0.02069808728992939,
0.28149035573005676,
0.08085137605667114,
-0.24977368116378784,
0.2214163988828659,
-0.2292531132698059,
-0.09324132651090622,
0.04120318964123726,
0.35616305470466614,
0.0705505907535553,
0.06011973321437836,
-0.4157065153121948,
0.2909100651741028,
0.25161269307136536,
-0.07609632611274719,
-0.020012762397527695,
0.34123364090919495,
0.10369378328323364,
0.278134822845459,
0.18926632404327393,
0.17580711841583252,
-0.07051258534193039,
0.3598213195800781,
0.3061894178390503,
0.572867751121521,
0.16298943758010864,
0.33639591932296753,
0.173575758934021,
-0.17035076022148132,
-0.08556930720806122,
0.5045970678329468,
-0.5123759508132935,
0.24821242690086365,
-0.315806120634079,
0.17096984386444092,
-0.4819340109825134,
-0.5417717099189758,
-0.06486179679632187,
0.4234418272972107,
-0.2529945373535156,
0.14326056838035583,
0.3605586886405945,
-0.060305725783109665,
-0.2993945777416229,
0.005423158407211304,
0.014906644821166992,
-0.0960320383310318,
0.36617735028266907,
0.14307017624378204,
0.10829155892133713,
-0.34942594170570374,
-0.4175249934196472,
-0.027774713933467865,
0.16122525930404663,
-0.3294582962989807,
0.36876431107521057,
0.23874181509017944,
-0.14335031807422638,
-0.16125862300395966,
0.3789471685886383,
0.4078805446624756,
0.5197629928588867,
-0.13192439079284668,
0.2619068920612335,
0.18739865720272064,
0.007940715178847313,
0.2997673451900482,
0.2879449725151062,
0.14206373691558838,
0.24858517944812775,
0.31710052490234375,
-0.0400233268737793,
-0.13484524190425873,
-0.0639454573392868,
-0.014475475996732712,
0.4534778594970703,
-0.055410049855709076,
0.458178848028183,
-0.22142767906188965,
0.028118029236793518,
-0.20692911744117737,
0.19624900817871094,
-0.3841957151889801,
0.023330705240368843,
0.14712661504745483,
-0.2653200626373291,
-0.05601793900132179,
0.06436119228601456,
-0.003508690744638443,
0.02647731825709343,
0.49053382873535156,
0.23142804205417633,
0.2814991772174835,
-0.352979451417923,
-0.4432322382926941,
-0.7061959505081177,
0.16672801971435547,
0.02313201315701008,
-0.3064349293708801,
-0.017993828281760216,
0.12486842274665833,
0.12715263664722443,
-0.1001904159784317,
0.07469296455383301,
-0.35190549492836,
0.3043104410171509,
0.6546194553375244,
-0.13863474130630493,
-0.016189109534025192,
-0.130776047706604,
0.11704979091882706,
-0.06711462885141373,
-0.21607869863510132,
0.305032879114151,
0.35159021615982056,
-0.055631883442401886,
0.20460301637649536,
0.37299761176109314,
-0.028206558898091316,
-0.31865572929382324,
-0.0951099544763565,
0.01259553711861372,
0.0027327314019203186,
0.03513164073228836,
0.004853283986449242,
-0.18408825993537903,
0.10576308518648148,
-0.11553094536066055,
-0.12297675758600235,
0.327055960893631,
0.41286545991897583,
0.17702864110469818,
-0.08075924217700958,
-0.35006582736968994,
-0.0628417506814003,
0.31897658109664917,
0.14865396916866302,
-0.3886556327342987,
0.22415313124656677,
0.12985637784004211,
0.2001485824584961,
0.3253851532936096,
0.4608398675918579,
0.022029466927051544,
-0.06451848894357681,
-0.3949521780014038,
-0.43277817964553833,
0.5375047326087952,
0.21196839213371277,
-0.322956383228302,
-0.12017635256052017,
-0.09331813454627991,
-0.12758272886276245,
0.04584735631942749,
-0.38178256154060364,
-0.10365535318851471,
-0.0975683405995369,
-0.03149747475981712,
-0.47011736035346985,
0.14581917226314545,
-0.17087595164775848,
-0.1203007698059082,
-0.06335670500993729,
-0.00034411996603012085,
0.2299572229385376,
-0.1367713361978531,
0.3738822340965271,
-0.011800915002822876
] |
https://github.com/huggingface/datasets/issues/6360
|
Add support for `Sequence(Audio/Image)` feature in `push_to_hub`
|
This issue stems from https://github.com/huggingface/datasets/blob/6d2f2a5e0fea3827eccfd1717d8021c15fc4292a/src/datasets/table.py#L2203-L2205
I'll address it as part of https://github.com/huggingface/datasets/pull/6283.
In the meantime, this should work
```python
import pyarrow as pa
from datasets import Image
dataset = dataset.with_format("arrow")
def embed_images(pa_table):
images_arr = pa.chunked_array(
[
pa.ListArray.from_arrays(chunk.offsets, Image().embed_storage(chunk.values), mask=chunk.is_null())
for chunk in pa_table["images"].chunks
]
)
return pa_table.set_column(pa_table.schema.get_field_index("images"), "images", images_arr)
dataset = dataset.map(embed_images, batched=True)
dataset = dataset.with_format("python")
dataset.push_to_hub(...)
```
|
### Feature request
Allow for `Sequence` of `Image` (or `Audio`) to be embedded inside the shards.
### Motivation
Currently, thanks to #3685, when `embed_external_files` is set to True (which is the default) in `push_to_hub`, features of type `Image` and `Audio` are embedded inside the arrow/parquet shards, instead of only storing paths to the files.
I've noticed that this behavior does not extend to `Sequence` of `Image`, when working with a [dataset of timelapse images](https://huggingface.co/datasets/1aurent/Human-Embryo-Timelapse).
### Your contribution
I'll submit a PR if I find a way to add this feature
| 58
|
Add support for `Sequence(Audio/Image)` feature in `push_to_hub`
### Feature request
Allow for `Sequence` of `Image` (or `Audio`) to be embedded inside the shards.
### Motivation
Currently, thanks to #3685, when `embed_external_files` is set to True (which is the default) in `push_to_hub`, features of type `Image` and `Audio` are embedded inside the arrow/parquet shards, instead of only storing paths to the files.
I've noticed that this behavior does not extend to `Sequence` of `Image`, when working with a [dataset of timelapse images](https://huggingface.co/datasets/1aurent/Human-Embryo-Timelapse).
### Your contribution
I'll submit a PR if I find a way to add this feature
This issue stems from https://github.com/huggingface/datasets/blob/6d2f2a5e0fea3827eccfd1717d8021c15fc4292a/src/datasets/table.py#L2203-L2205
I'll address it as part of https://github.com/huggingface/datasets/pull/6283.
In the meantime, this should work
```python
import pyarrow as pa
from datasets import Image
dataset = dataset.with_format("arrow")
def embed_images(pa_table):
images_arr = pa.chunked_array(
[
pa.ListArray.from_arrays(chunk.offsets, Image().embed_storage(chunk.values), mask=chunk.is_null())
for chunk in pa_table["images"].chunks
]
)
return pa_table.set_column(pa_table.schema.get_field_index("images"), "images", images_arr)
dataset = dataset.map(embed_images, batched=True)
dataset = dataset.with_format("python")
dataset.push_to_hub(...)
```
|
[
-0.25505995750427246,
-0.5069049000740051,
-0.11654670536518097,
0.14346197247505188,
-0.07700435072183609,
-0.09264016151428223,
0.16396303474903107,
0.22163426876068115,
-0.26074954867362976,
0.17967528104782104,
0.046998895704746246,
0.2636188864707947,
-0.43620237708091736,
0.16191202402114868,
0.019483786076307297,
-0.11654709279537201,
0.17083483934402466,
0.25490760803222656,
0.3873012661933899,
0.15251193940639496,
-0.25089821219444275,
-0.03947632759809494,
-0.10074879229068756,
-0.0303582102060318,
-0.28555065393447876,
0.048696547746658325,
-0.09204912930727005,
-0.1413174569606781,
0.023144645616412163,
-0.34679797291755676,
-0.2567020058631897,
0.19102439284324646,
0.11374837160110474,
0.2729092538356781,
-0.00012397338286973536,
-0.07202432304620743,
0.5071850419044495,
-0.15588583052158356,
-0.10968072712421417,
-0.13094885647296906,
-0.5026748180389404,
-0.0934143140912056,
0.057625338435173035,
-0.2776680588722229,
0.014322586357593536,
0.1258503645658493,
0.18671968579292297,
0.15408124029636383,
0.3910731077194214,
-0.03538239374756813,
0.07164889574050903,
0.065898098051548,
0.13381758332252502,
0.07107850909233093,
0.6388087272644043,
0.5541123747825623,
-0.3180387616157532,
-0.2652542293071747,
0.5817930102348328,
0.27706101536750793,
0.0217665433883667,
0.31545570492744446,
0.13922011852264404,
-0.10880129039287567,
0.33147189021110535,
0.13485674560070038,
-0.04590927064418793,
-0.38250643014907837,
-0.5307077765464783,
0.024745900183916092,
0.027901414781808853,
-0.47796282172203064,
-0.4051990211009979,
-0.3925899267196655,
-0.15030890703201294,
-0.4886975586414337,
0.16070574522018433,
0.1533474624156952,
-0.005959322676062584,
-0.035278353840112686,
-0.23952920734882355,
-0.20725294947624207,
-0.1967024803161621,
0.06496782600879669,
0.32979241013526917,
-0.025378413498401642,
0.19560229778289795,
-0.06402421742677689,
0.188670352101326,
-0.015917688608169556,
0.160264790058136,
-0.11554495990276337,
0.0475560799241066,
0.10268696397542953,
-0.19496102631092072,
-0.11608322709798813,
-0.09836550801992416,
0.3182810842990875,
-0.04098718613386154,
0.3321181535720825,
-0.12408876419067383,
0.23235228657722473,
-0.06270722299814224,
0.2713598906993866,
0.07880936563014984,
-0.13961046934127808,
0.22001591324806213,
-0.11367203295230865,
0.011451471596956253,
0.4450725317001343,
0.13686516880989075,
0.05639420449733734,
0.00901947170495987,
-0.19480085372924805,
-0.06395368278026581,
-0.0005483105778694153,
-0.019356779754161835,
0.09509614109992981,
-0.013059213757514954,
-0.044317200779914856,
0.0028966180980205536,
0.0703962966799736,
0.0942610576748848,
0.03321237489581108,
0.241662859916687,
-0.13680866360664368,
0.01869986578822136,
0.317487895488739,
-0.0778471827507019,
0.11217521131038666,
-0.12215185910463333,
0.3479265570640564,
-0.16936182975769043,
0.44973668456077576,
-0.0164853036403656,
-0.2991407513618469,
-0.01976962760090828,
-0.042807575315237045,
0.36095869541168213,
0.07686881721019745,
-0.2527485489845276,
-0.04742439463734627,
0.07740901410579681,
0.07791078835725784,
-0.2889544367790222,
0.05144927650690079,
-0.2868819236755371,
0.11027480661869049,
-0.21255433559417725,
0.05889838933944702,
-0.3544812798500061,
-0.19299741089344025,
0.13382749259471893,
-0.007428009994328022,
-0.5086273550987244,
0.37800145149230957,
-0.42734983563423157,
0.10305599123239517,
-0.11679976433515549,
-0.3004472553730011,
0.1271483451128006,
0.09315881133079529,
-0.5546584725379944,
-0.10877428203821182,
0.14921170473098755,
0.22651758790016174,
-0.12362052500247955,
0.027927391231060028,
0.13875925540924072,
0.16976875066757202,
-0.17509540915489197,
0.023541554808616638,
0.09756608307361603,
-0.08468847721815109,
-0.3004678189754486,
0.49852317571640015,
0.09720762819051743,
-0.6915470957756042,
-0.031564876437187195,
-0.27547743916511536,
-0.04073059931397438,
0.12717443704605103,
0.15598200261592865,
0.10990633815526962,
0.6469696760177612,
-0.2818514406681061,
0.09110008925199509,
0.4093163013458252,
0.1845495104789734,
-0.0609109103679657,
-0.1728478968143463,
-0.231687530875206,
-0.2749749422073364,
0.16325059533119202,
-0.23384766280651093,
-0.16047871112823486,
0.10313935577869415,
0.06775947660207748,
0.14041027426719666,
0.1481139361858368,
0.3968149423599243,
0.27393293380737305,
0.5291839838027954,
-0.0046563223004341125,
0.01764089986681938,
-0.4625531733036041,
-0.11195661872625351,
0.23694118857383728,
-0.0430440828204155,
0.06428997218608856,
-0.6702278852462769,
-0.08568836748600006,
-0.0396454781293869,
0.1214732900261879,
-0.3924016058444977,
0.16538070142269135,
-0.04501508176326752,
-0.2676343023777008,
-0.0008717961609363556,
0.1961456835269928,
0.048873450607061386,
0.3945842683315277,
0.036861568689346313,
0.07349030673503876,
-0.49648237228393555,
0.663769543170929,
0.08175303041934967,
-0.2508769631385803,
0.07673575729131699,
0.45361563563346863,
0.04096505790948868,
-0.227764293551445,
0.3074944317340851,
0.4799676537513733,
0.5231685638427734,
0.5904731750488281,
-0.4618261754512787,
0.2194226086139679,
0.4760698676109314,
-0.48650434613227844,
0.08370447158813477,
-0.20708106458187103,
0.08698012679815292,
-0.13490040600299835,
-0.22012117505073547,
0.4036705493927002,
0.2582082450389862,
0.30729302763938904,
-0.05607186257839203,
-0.18712009489536285,
-0.2871079742908478,
0.12709231674671173,
-0.2734845280647278,
-0.15334424376487732,
-0.09800052642822266,
0.07664278149604797,
-0.11802397668361664,
-0.2992199957370758,
0.21753662824630737,
0.02221803367137909,
0.3403283655643463,
0.1517370194196701,
-0.04893407225608826,
0.16494537889957428,
-0.21796968579292297,
-0.28374505043029785,
0.3970949351787567,
-0.05916760861873627,
0.009451605379581451,
0.19018737971782684,
-0.3171144425868988,
-0.01727086491882801,
-0.19982966780662537,
-0.09002983570098877,
0.01048453152179718,
0.1508193016052246,
0.30565187335014343,
0.20439061522483826,
0.4117885231971741,
0.10847558081150055,
-0.06282518804073334,
-0.3722397983074188,
0.029468709602952003,
0.001354258507490158,
-0.2441473752260208,
-0.19756920635700226,
-0.2807266414165497,
-0.10901837050914764,
0.15175269544124603,
-0.12172987312078476,
-0.017905306071043015,
-0.2066251039505005,
0.24015013873577118,
0.17628948390483856,
-0.12500904500484467,
0.3510558307170868,
0.32365769147872925,
0.15418842434883118,
0.010162362828850746,
-0.21856392920017242,
-0.3649151921272278,
-0.04806806519627571,
0.4767175614833832,
-0.05580395832657814,
0.059040896594524384,
0.35653156042099,
0.1799103170633316,
0.2590639293193817,
0.057791247963905334,
-0.3266279697418213,
-0.24131545424461365,
0.12155166268348694,
-0.13147133588790894,
0.07751943171024323,
-0.004788592457771301,
-0.1413021683692932,
0.1571657955646515,
-0.3966863453388214,
0.32497692108154297,
0.019065307453274727,
-0.32542675733566284,
0.08994732052087784,
-0.051158227026462555,
0.1875392645597458,
-0.07741433382034302,
0.3348499834537506,
-0.30748671293258667,
-0.5212706327438354,
0.24313810467720032,
0.4387020468711853,
0.0757119208574295,
0.28967908024787903,
0.1583932638168335,
-0.26831841468811035,
-0.052644312381744385,
-0.20037679374217987,
-0.004628433845937252,
0.18591558933258057,
0.4947294592857361,
-0.21123576164245605,
-0.11327046155929565,
-0.12066566944122314,
-0.22387437522411346,
-0.1589549034833908,
0.49742794036865234,
-0.11663173139095306,
-0.5896905660629272,
-0.018812062218785286,
0.03535230830311775,
0.0730474665760994,
-0.18054546415805817,
0.30158746242523193,
0.12121327966451645,
-0.0015678126364946365,
-0.04975282773375511,
0.02160058543086052,
0.13399644196033478,
0.4603497087955475,
-0.2817712724208832,
0.24801528453826904,
0.39753448963165283,
-0.001365717500448227,
0.34626710414886475,
0.01987314596772194,
-0.2088366597890854,
0.4871496260166168,
-0.14302420616149902,
0.08637890964746475,
-0.2900663912296295,
0.280125230550766,
-0.04047868773341179,
0.13131558895111084,
0.049326635897159576,
0.13174626231193542,
0.0015114415436983109,
-0.08359377086162567,
-0.09202316403388977,
0.009524531662464142,
-0.0749676525592804,
-0.1353042870759964,
-0.13590063154697418,
-0.024583816528320312,
0.17761388421058655,
-0.17311479151248932,
-0.2348206341266632,
-0.0651235282421112,
-0.2833006978034973,
0.0945855975151062,
-0.12761034071445465,
0.4744406044483185,
-0.15295830368995667,
-0.19717368483543396,
-0.06687528640031815,
-0.2374441921710968,
-0.09256704151630402,
0.3768782317638397,
0.10047580301761627,
-0.026048921048641205,
-0.09808118641376495,
0.10048411041498184,
-0.047853436321020126,
0.41879260540008545,
-0.32430216670036316,
0.07376426458358765,
-0.06925696134567261,
-0.029056288301944733,
-0.4457806348800659,
-0.06804914027452469,
-0.07955977320671082,
-0.021619396284222603,
-0.5080129504203796,
0.8306237459182739,
-0.1141965389251709,
-0.11230343580245972,
-0.08599139004945755,
0.06005719676613808,
0.004072926938533783,
-0.061527758836746216,
0.08765284717082977,
0.10252561420202255,
-0.49116554856300354,
-0.03863532096147537,
0.5149804353713989,
0.2452838271856308,
0.023690011352300644,
-0.38586926460266113,
0.10224173218011856,
0.017556849867105484,
0.004973895847797394,
-0.22717872262001038,
0.46750760078430176,
-0.22352775931358337,
0.33072376251220703,
0.006861653178930283,
0.06092583388090134,
0.18287895619869232,
-0.007577709853649139,
0.0740700364112854,
-0.058984577655792236,
0.16419178247451782,
-0.19941750168800354,
0.15300320088863373,
0.6463055610656738,
0.24630041420459747,
0.29834070801734924,
-0.4539656937122345,
0.20282293856143951,
-0.8109843134880066,
-0.18547001481056213,
0.21983855962753296,
-0.23479920625686646,
-0.06341800093650818,
0.1702796220779419,
0.3012796938419342,
-0.031538382172584534,
-0.1353979855775833,
0.06490065902471542,
0.5755516886711121,
-0.35687002539634705,
0.5145089626312256,
0.0593765452504158,
1.1529918909072876,
0.2239111065864563,
0.33775442838668823,
0.4504339098930359,
0.07885971665382385,
0.19948533177375793,
-0.277637243270874,
-0.05175739526748657,
-0.042948585003614426,
-0.13856004178524017,
-0.10327126830816269,
-0.13443298637866974,
-0.11731194704771042,
0.17153455317020416,
-0.12963752448558807,
-0.11002113670110703,
0.09495952725410461,
0.32984134554862976,
-0.17630282044410706,
-0.03819277137517929,
-0.10061945021152496,
-0.28162845969200134,
0.02089199237525463,
0.05247994512319565,
0.38705337047576904,
-0.2633512020111084,
-0.0847400650382042,
-0.22629542648792267,
-0.1685819923877716,
0.11268867552280426,
-0.16526439785957336,
-0.02379688061773777,
-0.07919860631227493,
0.1600934863090515,
-0.2880580723285675,
-0.4020528793334961,
0.15603841841220856,
0.04847866669297218,
0.08648545295000076,
-0.3399019241333008,
-0.22384797036647797,
0.14059896767139435,
-0.031247667968273163,
-0.10895106196403503,
-0.2577420771121979,
-0.07821694016456604,
0.07222556322813034,
-0.07042103260755539,
0.12423162907361984,
-0.10819952934980392,
0.023589566349983215,
-0.4017254114151001,
0.01630440354347229,
0.22896729409694672,
-0.09890596568584442,
0.14388875663280487,
-0.5459306836128235,
-0.0073357149958610535,
-0.23017963767051697,
-0.1225186437368393,
0.07008403539657593,
0.02372012287378311,
-0.24190732836723328,
0.22450968623161316,
-0.29073792695999146,
-0.023516982793807983,
0.02489425241947174,
0.36406776309013367,
-0.013775698840618134,
-0.1849900782108307,
0.17581355571746826,
0.040161799639463425,
-0.2709524631500244,
-0.05902497470378876,
0.11054148524999619,
0.2953473925590515,
-0.6527201533317566,
-0.11524543911218643,
-0.12962542474269867,
0.028030216693878174,
-0.10625576227903366,
0.08274294435977936,
-0.05041580647230148,
-0.1474176049232483,
-0.11716045439243317,
-0.2219555526971817,
0.007942680269479752,
0.6029160618782043,
-0.1838507503271103,
0.3158698081970215,
-0.44455069303512573,
0.018497932702302933,
0.007782651111483574,
0.10199412703514099,
-0.19254477322101593,
0.1599569171667099,
-0.010425344109535217,
0.20764902234077454,
-0.15758280456066132,
-0.011689204722642899,
0.07965303212404251,
-0.22995223104953766,
-0.01752372831106186,
0.5403506755828857,
-0.4467985928058624,
0.005302749574184418,
-0.08500735461711884,
0.2160213440656662,
0.15564730763435364,
0.2448752522468567,
-0.098687544465065,
-0.06456217914819717,
-0.173750102519989,
-0.18645359575748444,
0.08797511458396912,
0.1737861931324005,
-0.10450445115566254,
-0.2742890417575836,
1.0547168254852295,
-0.0025840625166893005,
0.12692393362522125,
0.18479523062705994,
0.2917432188987732,
0.4902663230895996,
-0.10285543650388718,
-0.010780543088912964,
-0.31645241379737854,
0.032278478145599365,
-0.12217167764902115,
0.4873281717300415,
0.28361302614212036,
-0.03364010155200958,
0.3159340023994446,
0.15589773654937744,
-0.22166021168231964,
-0.1350877732038498,
0.5815131664276123,
0.06800505518913269,
-0.2587129473686218,
-0.26989781856536865,
-0.027630921453237534,
0.08966508507728577,
0.08672221750020981,
-0.07884161919355392,
0.22263787686824799,
-0.16690100729465485,
0.10425207018852234,
0.061242926865816116,
0.48143312335014343,
0.27097827196121216,
-0.16616272926330566,
0.06115121394395828,
0.5885636210441589,
-0.36953669786453247,
-0.11367444694042206,
0.010884910821914673,
0.30751946568489075,
0.01650846377015114,
0.0076541174203157425,
0.03490316867828369,
0.5215048789978027,
0.26955491304397583,
-0.23365384340286255,
0.2637619972229004,
0.483180433511734,
-0.14676493406295776,
0.4924664795398712,
-0.05804092437028885,
-0.5187355875968933,
0.26643919944763184,
0.3961637616157532,
0.07478030025959015,
0.0498095341026783,
0.42895257472991943,
0.007638594135642052,
-0.06607513874769211,
-0.13189683854579926,
0.18949386477470398,
0.4096459448337555,
0.01911725476384163,
0.18450325727462769,
-0.06533169746398926,
-0.7341073751449585,
-0.18708167970180511,
-0.04005102440714836,
-0.015055201947689056,
0.1262599676847458,
0.10489239543676376,
0.38929229974746704,
0.3313503563404083,
0.03721388429403305,
0.29886919260025024,
0.4418076276779175,
-0.18363066017627716,
0.23109664022922516,
0.007757976651191711,
-0.07665321230888367,
0.2829760015010834,
-0.08339614421129227,
0.3150414526462555,
-0.10392220318317413,
-0.07961589097976685,
0.34228596091270447,
-0.060119714587926865,
-0.009730519726872444,
0.057996682822704315,
0.07157610356807709,
0.04718073457479477,
-0.0653546005487442,
0.22787928581237793,
0.11961162090301514,
-0.02022695727646351,
-0.25705134868621826,
0.21003365516662598,
-0.057885970920324326,
-0.08056633174419403,
0.28389695286750793,
-0.27066656947135925,
-0.28567856550216675,
0.26129695773124695,
-0.1897139847278595,
-0.28550079464912415,
0.023518122732639313,
-0.04995659366250038,
-0.2969365119934082,
0.031102053821086884,
0.2631169855594635,
-0.016079764813184738,
-0.40738391876220703,
0.2395898550748825,
0.14081472158432007,
0.2307535707950592,
0.022144701331853867,
-0.5427660942077637,
-0.33948054909706116,
0.1924179196357727,
0.002518314868211746,
-0.28316521644592285,
0.4300993084907532,
0.0634264126420021,
0.16245317459106445,
0.06869466602802277,
-0.06259521842002869,
0.03037629835307598,
-0.39218592643737793,
0.18828503787517548,
-0.4376373887062073,
0.2521437108516693,
0.40122026205062866,
0.002833263948559761,
-0.01977495104074478,
0.020692691206932068,
0.11956913769245148,
0.10072972625494003,
-0.06569867581129074,
0.06970471888780594,
0.03928434103727341,
-0.16734912991523743,
-0.25613924860954285,
0.31333041191101074,
-0.15867896378040314,
-0.03768989443778992,
-0.2642403841018677,
0.12477611750364304,
-0.14620661735534668,
-0.3289778530597687,
-0.007029387634247541,
-0.16733869910240173,
-0.1482972800731659,
0.647016167640686,
-0.13411439955234528,
-0.21155919134616852,
-0.058237601071596146,
0.372650146484375,
-0.08057264983654022,
-0.07213979214429855,
-0.1395772397518158,
0.04473906010389328,
-0.4211857318878174,
0.2805851101875305,
0.044102612882852554,
-0.1325148344039917,
0.08260218799114227,
0.0052354056388139725,
-0.14514349400997162,
-0.5377929210662842,
0.47205597162246704,
0.1752503514289856,
-0.04281871020793915,
0.2496531754732132,
0.12514108419418335,
0.08115779608488083,
0.21950297057628632,
-0.4257148206233978,
-0.15812423825263977,
0.13076770305633545,
0.25453221797943115,
-0.15688927471637726,
0.27245867252349854,
0.28096696734428406,
-0.24578434228897095,
-0.14524811506271362,
-0.1793029010295868,
0.14811281859874725,
0.17722062766551971,
-0.13082349300384521,
-0.3483209013938904
] |
https://github.com/huggingface/datasets/issues/6359
|
Stuck in "Resolving data files..."
|
Most likely, the data file inference logic is the problem here.
You can run the following code to verify this:
```python
import time
from datasets.data_files import get_data_patterns
start_time = time.time()
get_data_patterns("/path/to/img_dir")
end_time = time.time()
print(f"Elapsed time: {end_time - start_time:.2f}s")
```
We plan to optimize this for the next version (or version after that). In the meantime, specifying the split patterns manually should give better performance:
```python
ds = load_dataset("imagefolder", data_files={"train": "path/to/img_dir/train/**", ...}, split="train")
```
|
### Describe the bug
I have an image dataset with 300k images, the size of image is 768 * 768.
When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part?
From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes.
### Steps to reproduce the bug
# Run following code two times
dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')
### Expected behavior
Fast dataset building
### Environment info
- `datasets` version: 2.14.5
- Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.17.3
- PyArrow version: 10.0.1
- Pandas version: 1.5.3
| 74
|
Stuck in "Resolving data files..."
### Describe the bug
I have an image dataset with 300k images, the size of image is 768 * 768.
When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part?
From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes.
### Steps to reproduce the bug
# Run following code two times
dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')
### Expected behavior
Fast dataset building
### Environment info
- `datasets` version: 2.14.5
- Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.17.3
- PyArrow version: 10.0.1
- Pandas version: 1.5.3
Most likely, the data file inference logic is the problem here.
You can run the following code to verify this:
```python
import time
from datasets.data_files import get_data_patterns
start_time = time.time()
get_data_patterns("/path/to/img_dir")
end_time = time.time()
print(f"Elapsed time: {end_time - start_time:.2f}s")
```
We plan to optimize this for the next version (or version after that). In the meantime, specifying the split patterns manually should give better performance:
```python
ds = load_dataset("imagefolder", data_files={"train": "path/to/img_dir/train/**", ...}, split="train")
```
|
[
-0.23090432584285736,
0.04058679938316345,
-0.10604538023471832,
0.3675360679626465,
0.26099058985710144,
0.13373824954032898,
0.34540849924087524,
0.47421908378601074,
-0.103665292263031,
0.11970353126525879,
0.16956420242786407,
0.35598453879356384,
0.16056932508945465,
-0.18263034522533417,
-0.4411314129829407,
-0.22654613852500916,
-0.03422760218381882,
0.07452940940856934,
-0.008712813258171082,
-0.11590531468391418,
-0.20622682571411133,
0.023898471146821976,
-0.16543714702129364,
-0.26032137870788574,
-0.7119734287261963,
-0.33596545457839966,
-0.061822809278964996,
0.06397871673107147,
-0.2485315054655075,
-0.28442999720573425,
0.12351882457733154,
-0.0436713732779026,
-0.09121736139059067,
0.39952999353408813,
-0.00012005397002212703,
-0.10184633731842041,
0.6070085167884827,
0.21350839734077454,
-0.11404421925544739,
0.27869078516960144,
-0.16903287172317505,
-0.33051085472106934,
0.2183692753314972,
-0.37530553340911865,
0.07773225754499435,
-0.3076438009738922,
-0.0418807789683342,
-0.28979772329330444,
0.38838374614715576,
-0.10235690325498581,
0.11232347041368484,
-0.0022455602884292603,
-0.021347466856241226,
-0.0962008386850357,
-0.10249165445566177,
0.16476020216941833,
0.05192885547876358,
0.4499416649341583,
0.10262292623519897,
-0.25717586278915405,
-0.0723770335316658,
0.31013643741607666,
0.026890801265835762,
0.2157069742679596,
0.20114320516586304,
0.24109415709972382,
-0.012061439454555511,
-0.427540123462677,
0.01939290203154087,
0.0384787879884243,
0.2942146062850952,
0.2259616255760193,
-0.21666209399700165,
-0.551164984703064,
-0.11253830045461655,
-0.14995326101779938,
0.10671508312225342,
0.16244883835315704,
-0.15347030758857727,
-0.05768726393580437,
-0.013846415095031261,
0.015159649774432182,
-0.011940594762563705,
-0.0692913681268692,
-0.18875792622566223,
-0.12414298951625824,
0.07001740485429764,
0.289585679769516,
0.23470619320869446,
0.0893092229962349,
0.08136145770549774,
-0.3227140009403229,
0.17641590535640717,
0.17951686680316925,
-0.6519598364830017,
0.13489200174808502,
0.0924617201089859,
0.18143224716186523,
-0.007167734205722809,
0.13475967943668365,
-0.13285546004772186,
-0.26309460401535034,
-0.017412368208169937,
-0.174818754196167,
0.26441165804862976,
0.3020390272140503,
-0.33563175797462463,
0.09779424220323563,
0.2762557864189148,
-0.006550193764269352,
-0.35597729682922363,
0.027685493230819702,
-0.051581136882305145,
-0.5366824269294739,
-0.07338081300258636,
-0.08227946609258652,
0.26825541257858276,
-0.017006803303956985,
-0.11084232479333878,
-0.10098721832036972,
-0.2125980257987976,
-0.25105908513069153,
0.13016726076602936,
0.1386137753725052,
-0.28064751625061035,
0.4254174530506134,
-0.0024668239057064056,
-0.05150272697210312,
-0.4346980154514313,
0.22117027640342712,
-0.08405673503875732,
-0.185245081782341,
-0.41797301173210144,
-0.08601721376180649,
0.02711092308163643,
-0.07414557039737701,
-0.047701314091682434,
0.212259903550148,
0.010898351669311523,
-0.14625334739685059,
0.17071165144443512,
-0.46836793422698975,
-0.07476472109556198,
0.13060592114925385,
-0.21048225462436676,
0.31339505314826965,
-0.21411411464214325,
0.0892668068408966,
-0.03160160034894943,
0.2599359154701233,
-0.41348031163215637,
-0.10319994390010834,
-0.15460234880447388,
0.09507153183221817,
-0.03791727125644684,
0.2817070484161377,
-0.22440195083618164,
-0.07180328667163849,
0.20046207308769226,
0.1146102249622345,
-0.020842790603637695,
-0.15319283306598663,
0.0016395710408687592,
-0.20942100882530212,
0.2438778579235077,
0.31000739336013794,
-0.28330859541893005,
0.447551965713501,
-0.34232187271118164,
0.1715725064277649,
0.16693657636642456,
0.4575903117656708,
-0.2147146761417389,
0.38899582624435425,
-0.4889909029006958,
0.14171965420246124,
0.038577526807785034,
-0.1375727653503418,
-0.5263125896453857,
0.2921585738658905,
-0.24747255444526672,
0.13682518899440765,
0.1956709921360016,
0.28233060240745544,
0.055366918444633484,
-0.12428996711969376,
-0.041128009557724,
0.41119933128356934,
-0.13345329463481903,
-0.09428822249174118,
-0.3794918358325958,
-0.14198347926139832,
-0.05927634239196777,
0.06696328520774841,
-0.0292934812605381,
0.05180500075221062,
0.13025090098381042,
-0.19356338679790497,
0.37433716654777527,
-0.021718647330999374,
0.07308963686227798,
0.14586195349693298,
0.21564607322216034,
0.0947982519865036,
0.28539663553237915,
0.2131766378879547,
-0.3773474097251892,
0.4301590323448181,
0.043974414467811584,
-0.16950026154518127,
-0.522240161895752,
-0.06904258579015732,
-0.15600377321243286,
-0.09970460087060928,
-0.25889453291893005,
0.05304960161447525,
-0.07409840822219849,
0.07900742441415787,
0.12865915894508362,
0.1063431054353714,
0.057532209903001785,
0.4595412313938141,
-0.20573490858078003,
0.04271671175956726,
-0.4387921690940857,
0.46270492672920227,
0.16562512516975403,
-0.07946325838565826,
-0.17642174661159515,
-0.27384254336357117,
-0.03884228318929672,
-0.19302083551883698,
-0.17072772979736328,
0.21515518426895142,
0.2450355738401413,
0.28556638956069946,
0.1650492548942566,
0.07608252763748169,
0.10269010812044144,
-0.3493668735027313,
0.09715844690799713,
-0.10299348831176758,
0.18877501785755157,
-0.016779106110334396,
-0.1456032693386078,
0.2598908841609955,
-0.3512362241744995,
0.38549327850341797,
0.01638922095298767,
-0.15739399194717407,
0.18530094623565674,
-0.07605801522731781,
0.14609648287296295,
0.07744920253753662,
0.3481143116950989,
0.2724687159061432,
0.4181118607521057,
0.3373565077781677,
-0.19070938229560852,
0.21518391370773315,
0.6262253522872925,
-0.10818277299404144,
-0.20877894759178162,
0.19261744618415833,
0.11888700723648071,
0.0027969032526016235,
-0.00907934457063675,
0.4187190532684326,
0.5132095813751221,
0.24452771246433258,
0.10707460343837738,
-0.018863173201680183,
-0.13864722847938538,
-0.15301813185214996,
0.13333845138549805,
0.11011519283056259,
0.5132684707641602,
0.2588518559932709,
0.08916434645652771,
0.06258255988359451,
-0.22375741600990295,
-0.13219961524009705,
0.11908649653196335,
0.2218092828989029,
0.0586591400206089,
0.23011912405490875,
-0.31792953610420227,
-0.12204040586948395,
-0.11783137917518616,
0.1264037787914276,
-0.17323185503482819,
-0.22341860830783844,
-0.19248554110527039,
-0.13852669298648834,
0.07587139308452606,
0.1009242981672287,
-0.14272557199001312,
0.15457658469676971,
0.21845681965351105,
-0.04681774973869324,
-0.31190651655197144,
-0.15242823958396912,
-0.06528259813785553,
-0.01696794107556343,
0.23411881923675537,
0.028154725208878517,
0.2851455807685852,
-0.1521124690771103,
0.020418506115674973,
-0.17084704339504242,
-0.4694689214229584,
0.032713357359170914,
-0.013448365032672882,
0.3969067633152008,
0.005802445113658905,
0.30651211738586426,
0.06370442360639572,
-0.07415155321359634,
0.2928285300731659,
0.098079614341259,
-0.0766405537724495,
-0.26933687925338745,
0.024465518072247505,
0.16101688146591187,
-0.003944955766201019,
-0.25449666380882263,
-0.19756095111370087,
-0.3309216797351837,
0.4994938373565674,
-0.021412573754787445,
0.04053729772567749,
0.18950998783111572,
0.17897284030914307,
0.029665544629096985,
-0.2866796851158142,
-0.032709695398807526,
-0.16023288667201996,
-0.14464502036571503,
0.38924282789230347,
0.03269686922430992,
-0.13035039603710175,
-0.2958361804485321,
-0.25440073013305664,
0.07136432826519012,
0.13577306270599365,
-0.4896755814552307,
-0.27461254596710205,
-0.6782149076461792,
0.23835942149162292,
-0.23973819613456726,
0.11440586298704147,
0.07093341648578644,
-0.09894876927137375,
-0.14277352392673492,
-0.15894761681556702,
0.2063549906015396,
0.14447349309921265,
0.04169734567403793,
0.09845853596925735,
0.2394466996192932,
0.4252784550189972,
0.04596806690096855,
0.6054314374923706,
0.27212730050086975,
-0.025311801582574844,
0.19882869720458984,
-0.1327405571937561,
0.15078678727149963,
-0.36597228050231934,
-0.16869664192199707,
0.051709309220314026,
-0.027405232191085815,
-0.08361493051052094,
-0.07447266578674316,
0.11399257928133011,
0.003293832764029503,
-0.03820173442363739,
-0.03181811794638634,
-0.2603929340839386,
-0.24861638247966766,
0.11419179290533066,
-0.18479999899864197,
0.1452527642250061,
0.05831463262438774,
-0.001788649708032608,
-0.009497379884123802,
-0.021007180213928223,
0.06724037230014801,
0.014523118734359741,
0.38174906373023987,
-0.1113433837890625,
-0.010266706347465515,
-0.26706579327583313,
-0.13777020573616028,
0.1718415468931198,
0.18196390569210052,
0.06682413816452026,
0.1107759177684784,
-0.03854471072554588,
0.41135185956954956,
-0.15770258009433746,
1.0478553771972656,
0.24543018639087677,
0.04165205731987953,
-0.12339743971824646,
-0.10224716365337372,
-0.2411496490240097,
0.02202349528670311,
0.1118832379579544,
0.10104537010192871,
-0.20019787549972534,
0.41964054107666016,
-0.3013349771499634,
-0.16067956387996674,
0.07575564831495285,
0.4090626835823059,
-0.15290774405002594,
-0.20294663310050964,
-0.27248069643974304,
-0.18397453427314758,
-0.19620929658412933,
0.023117966949939728,
0.059567078948020935,
0.07454663515090942,
-0.1175268366932869,
-0.29961538314819336,
-0.42450860142707825,
-0.18272164463996887,
-0.11121296882629395,
0.07161171734333038,
0.4204934239387512,
-0.24601787328720093,
0.46590182185173035,
0.33064132928848267,
0.15791216492652893,
0.26040011644363403,
0.6817741394042969,
-0.15621820092201233,
-0.050676748156547546,
0.14898455142974854,
-0.11310704797506332,
0.22305136919021606,
0.34339720010757446,
-0.3720114231109619,
-0.13605552911758423,
-0.1993672400712967,
0.24926753342151642,
-0.4945945143699646,
0.14185476303100586,
0.677087128162384,
0.18081924319267273,
-0.3309749364852905,
-0.343059778213501,
0.4841408431529999,
0.2176530361175537,
-0.16477715969085693,
0.5786498785018921,
0.12789766490459442,
0.02182789519429207,
-0.055228203535079956,
-0.07082831114530563,
0.9730105996131897,
-0.05528222769498825,
0.10568755865097046,
0.029024282470345497,
-0.1878635138273239,
0.43236467242240906,
0.03904443234205246,
0.23311644792556763,
-0.145280659198761,
-0.13525763154029846,
0.14775827527046204,
-0.2726097106933594,
0.07463671267032623,
0.2948380708694458,
0.23136916756629944,
0.11130194365978241,
-0.2289240062236786,
-0.15631148219108582,
-0.25694194436073303,
0.33217573165893555,
-0.10360408574342728,
-0.013365007936954498,
-0.22946803271770477,
0.014059171080589294,
0.06014886498451233,
0.01580941118299961,
0.02719128504395485,
0.053958047181367874,
-0.19819392263889313,
-0.1313762217760086,
0.17127038538455963,
0.07817989587783813,
-0.17164896428585052,
0.25788232684135437,
-0.193080872297287,
-0.4212977886199951,
-0.08047200739383698,
0.10963962972164154,
-0.42677247524261475,
-0.021764259785413742,
0.10711659491062164,
0.585155725479126,
-0.0001415535807609558,
0.2023504227399826,
0.21113716065883636,
-0.3270694613456726,
0.29680803418159485,
0.06233205646276474,
0.020190678536891937,
-0.49187737703323364,
-0.3771529793739319,
-0.1167251318693161,
-0.11582387238740921,
0.3547670245170593,
0.054596930742263794,
0.2028229683637619,
-0.22241029143333435,
-0.020362399518489838,
-0.10603402554988861,
-0.034130796790122986,
0.11124800145626068,
0.2635948061943054,
0.08357923477888107,
0.6496148705482483,
-0.08088579773902893,
-0.39786094427108765,
0.023765340447425842,
0.2555839717388153,
0.2337544560432434,
0.0630362331867218,
0.4015384018421173,
0.09522141516208649,
-0.2814326584339142,
-0.07536835968494415,
-0.01539190486073494,
-0.007592885755002499,
-0.9301791191101074,
0.4300951361656189,
-0.03428654372692108,
0.3190181255340576,
0.07615569233894348,
-0.29344117641448975,
0.0463273748755455,
-0.3828357458114624,
-0.25275835394859314,
-0.3144935965538025,
-0.14952418208122253,
0.2782602906227112,
-0.30675849318504333,
0.2427939474582672,
-0.048095349222421646,
0.02775312028825283,
0.07742428779602051,
0.08447735011577606,
-0.21197214722633362,
0.30288124084472656,
-0.16135409474372864,
0.2362193614244461,
-0.14972442388534546,
-0.1446343958377838,
0.19371284544467926,
-0.0018125125207006931,
0.12797747552394867,
0.22406789660453796,
0.059744659811258316,
-0.18386483192443848,
-0.07247230410575867,
0.1783529371023178,
-0.20934352278709412,
-0.04004628211259842,
0.24930542707443237,
-0.476696252822876,
-0.19322270154953003,
-0.0274617038667202,
0.07347378134727478,
-0.042101360857486725,
0.02053852006793022,
-0.4608532190322876,
0.20725876092910767,
-0.23896998167037964,
-0.004782140254974365,
0.3772304654121399,
-0.31494179368019104,
0.36564958095550537,
0.2742287516593933,
0.1826035976409912,
-0.0461428128182888,
0.03763402998447418,
-0.2835732400417328,
-0.13889777660369873,
0.08913224935531616,
-0.2712775468826294,
0.26288095116615295,
-0.10633690655231476,
-0.08732093870639801,
-0.23454774916172028,
0.5475304126739502,
0.4386802315711975,
0.04101065173745155,
-0.20423787832260132,
0.10671191662549973,
0.12073676288127899,
-0.2699933648109436,
-0.09202868491411209,
0.07764817774295807,
0.0019305478781461716,
0.08931626379489899,
0.00995364785194397,
0.16259123384952545,
0.3890685439109802,
-0.44743382930755615,
-0.05272843688726425,
0.31092697381973267,
0.020265212282538414,
0.10917946696281433,
0.5991325974464417,
0.2890474200248718,
-0.12650001049041748,
0.4163110554218292,
0.02056965045630932,
0.13122889399528503,
0.6117173433303833,
-0.21641027927398682,
0.24299320578575134,
0.0684552788734436,
0.35654300451278687,
0.030755069106817245,
-0.25208422541618347,
-0.09317812323570251,
0.20886068046092987,
-0.3613530695438385,
-0.06390442699193954,
-0.1333961933851242,
0.4500722587108612,
-0.03303427994251251,
-0.1289375275373459,
-0.16948670148849487,
0.4302995800971985,
-0.034632012248039246,
-0.014755518175661564,
0.09606063365936279,
-0.24552413821220398,
-0.19754286110401154,
0.0872608870267868,
-0.03238995000720024,
-0.05951528251171112,
0.27747878432273865,
0.2919326722621918,
0.10097561776638031,
-0.3043924570083618,
0.0033716242760419846,
-0.02298964560031891,
0.5397708415985107,
-0.21900606155395508,
0.2813093066215515,
0.23448728024959564,
-0.07288968563079834,
0.0421346053481102,
0.3505970239639282,
0.35738494992256165,
0.3239578604698181,
-0.07387317717075348,
-0.12477999180555344,
0.17770352959632874,
0.08804530650377274,
-0.053282275795936584,
0.36068031191825867,
0.017157167196273804,
-0.08486548066139221,
0.16827209293842316,
0.042385466396808624,
-0.2455645501613617,
-0.21126337349414825,
-0.05942636355757713,
0.20599624514579773,
-0.29475221037864685,
0.211123526096344,
-0.24875900149345398,
-0.030126359313726425,
-0.22351333498954773,
0.1526694893836975,
-0.8096604347229004,
-0.24030926823616028,
0.397256076335907,
-0.4201980233192444,
-0.1703318953514099,
-0.10279495269060135,
0.044886328279972076,
-0.5966684818267822,
0.5693634748458862,
0.14848217368125916,
0.5265019536018372,
-0.19737012684345245,
-0.23995307087898254,
-0.6433260440826416,
-0.1929892599582672,
-0.1893686205148697,
0.0740828886628151,
0.07706271857023239,
0.2567518353462219,
-0.20998060703277588,
0.04242076352238655,
0.6207966208457947,
-0.06773637235164642,
0.16190479695796967,
0.33610063791275024,
-0.3144727349281311,
-0.032566506415605545,
-0.16300049424171448,
-0.18007932603359222,
-0.14807915687561035,
-0.44950371980667114,
0.12550565600395203,
-0.0943637564778328,
-0.015453077852725983,
0.12237431854009628,
-0.08182442933320999,
0.3246583044528961,
0.19499529898166656,
0.5045989751815796,
0.28350991010665894,
0.31740206480026245,
0.1119990423321724,
-0.163465216755867,
-0.11634260416030884,
-0.20079974830150604,
0.08864203095436096,
0.10660308599472046,
0.18080918490886688,
0.27628466486930847,
-0.2154153734445572,
0.08387786149978638,
-0.2136336714029312,
-0.1375160813331604,
-0.15018117427825928,
0.08090075850486755,
-0.18604137003421783,
-0.17913827300071716,
-0.2644183337688446,
0.2818492650985718,
0.09235888719558716,
0.3794262707233429,
0.17964410781860352,
0.044845692813396454,
-0.3098708391189575,
-0.4223334789276123,
0.5335379838943481,
-0.22530314326286316,
-0.34167081117630005,
0.22824420034885406,
0.10243905335664749,
0.08393437415361404,
0.13262276351451874,
-0.11903269588947296,
-0.04238762706518173,
0.43739452958106995,
-0.0400291383266449,
-0.02707364596426487,
0.26558300852775574,
0.08775065839290619,
-0.009764447808265686,
0.022578369826078415,
-0.029855899512767792,
0.012563757598400116,
-0.014488172717392445,
0.08813938498497009,
-0.10598042607307434
] |
https://github.com/huggingface/datasets/issues/6359
|
Stuck in "Resolving data files..."
|
Hi, @mariosasko, you are right; data file inference logic is extremely slow.
I have done a similar test, that is I modify the source code of datasets/load.py to measure the cost of two suspicious operations:
```python
def get_module(self) -> DatasetModule:
base_path = Path(self.data_dir or "").expanduser().resolve().as_posix()
start = time.time()
patterns = sanitize_patterns(self.data_files) if self.data_files is not None else get_data_patterns(base_path)
print(f"patterns: {time.time() - start}")
start = time.time()
data_files = DataFilesDict.from_patterns(
patterns,
download_config=self.download_config,
base_path=base_path,
)
print(f"data_files: {time.time() - start}")
```
It gaves:
patterns: 3062.2050700187683
data_files: 413.9576675891876
Thus, these two operations contribute to almost all of load time. What's going on in them?
|
### Describe the bug
I have an image dataset with 300k images, the size of image is 768 * 768.
When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part?
From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes.
### Steps to reproduce the bug
# Run following code two times
dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')
### Expected behavior
Fast dataset building
### Environment info
- `datasets` version: 2.14.5
- Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.17.3
- PyArrow version: 10.0.1
- Pandas version: 1.5.3
| 99
|
Stuck in "Resolving data files..."
### Describe the bug
I have an image dataset with 300k images, the size of image is 768 * 768.
When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part?
From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes.
### Steps to reproduce the bug
# Run following code two times
dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')
### Expected behavior
Fast dataset building
### Environment info
- `datasets` version: 2.14.5
- Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.17.3
- PyArrow version: 10.0.1
- Pandas version: 1.5.3
Hi, @mariosasko, you are right; data file inference logic is extremely slow.
I have done a similar test, that is I modify the source code of datasets/load.py to measure the cost of two suspicious operations:
```python
def get_module(self) -> DatasetModule:
base_path = Path(self.data_dir or "").expanduser().resolve().as_posix()
start = time.time()
patterns = sanitize_patterns(self.data_files) if self.data_files is not None else get_data_patterns(base_path)
print(f"patterns: {time.time() - start}")
start = time.time()
data_files = DataFilesDict.from_patterns(
patterns,
download_config=self.download_config,
base_path=base_path,
)
print(f"data_files: {time.time() - start}")
```
It gaves:
patterns: 3062.2050700187683
data_files: 413.9576675891876
Thus, these two operations contribute to almost all of load time. What's going on in them?
|
[
-0.20949207246303558,
0.16295254230499268,
-0.089963898062706,
0.41622066497802734,
0.1465522199869156,
0.10716231912374496,
0.29013460874557495,
0.4450823664665222,
-0.0868699848651886,
0.10743390768766403,
0.1154012456536293,
0.3833845555782318,
0.2073964923620224,
-0.2878904342651367,
-0.39628276228904724,
-0.11655527353286743,
-0.013868115842342377,
0.005139760673046112,
-0.050784796476364136,
-0.11281527578830719,
-0.21594345569610596,
0.0376969575881958,
-0.20382378995418549,
-0.22221709787845612,
-0.6117443442344666,
-0.34641534090042114,
-0.02440781705081463,
0.05006556585431099,
-0.3210417628288269,
-0.34121307730674744,
0.1369764357805252,
0.04144585505127907,
-0.13968423008918762,
0.4793089032173157,
-0.0001229946647072211,
-0.1586916446685791,
0.5912113785743713,
0.23773974180221558,
-0.12714309990406036,
0.25778621435165405,
-0.10645978897809982,
-0.28866657614707947,
0.1885182410478592,
-0.347848117351532,
0.10186680406332016,
-0.3226204812526703,
-0.03909844160079956,
-0.2930154800415039,
0.2746013402938843,
-0.02501617558300495,
0.07332304865121841,
-0.0034424010664224625,
-0.021146036684513092,
-0.0720168873667717,
-0.1166243776679039,
0.18206650018692017,
0.0981142446398735,
0.5111778974533081,
0.1551051139831543,
-0.24799643456935883,
-0.046012453734874725,
0.2543177604675293,
-0.004233162850141525,
0.19744618237018585,
0.16069132089614868,
0.17756251990795135,
0.07244708389043808,
-0.4220148026943207,
0.008287917822599411,
0.10576556622982025,
0.3258570432662964,
0.17824825644493103,
-0.26558127999305725,
-0.49072617292404175,
-0.09992621093988419,
-0.09138523787260056,
0.13138511776924133,
0.1301073580980301,
-0.2750479280948639,
-0.0355144627392292,
0.020109130069613457,
-0.021889647468924522,
-0.05068046972155571,
-0.09376606345176697,
-0.13810569047927856,
-0.13575847446918488,
0.0289471298456192,
0.2216462790966034,
0.21236927807331085,
0.11828567832708359,
0.10832539945840836,
-0.42895978689193726,
0.2037924975156784,
0.21663038432598114,
-0.7254014611244202,
0.12578460574150085,
0.19059938192367554,
0.20797547698020935,
0.04812433570623398,
0.08103048801422119,
-0.07660527527332306,
-0.22915732860565186,
-0.06501169502735138,
-0.14857441186904907,
0.22523048520088196,
0.29801300168037415,
-0.4180266559123993,
0.1147172674536705,
0.30948513746261597,
0.09345536679029465,
-0.25219160318374634,
0.024038273841142654,
-0.0982060506939888,
-0.5158846378326416,
-0.020047258585691452,
-0.0930982381105423,
0.3618735074996948,
-0.10850292444229126,
-0.21396367251873016,
-0.06788334250450134,
-0.22065100073814392,
-0.23860545456409454,
0.21672025322914124,
0.14165662229061127,
-0.3600965738296509,
0.48063910007476807,
0.022585034370422363,
-0.05759602040052414,
-0.35357922315597534,
0.2514953911304474,
-0.06928664445877075,
-0.15187884867191315,
-0.39947521686553955,
-0.03276081383228302,
0.07096314430236816,
-0.00938502512872219,
-0.09488724172115326,
0.20959284901618958,
0.003823518753051758,
-0.14668889343738556,
0.18055100739002228,
-0.5145636200904846,
-0.020281292498111725,
0.06482450664043427,
-0.33426281809806824,
0.2786160111427307,
-0.17522306740283966,
0.08635161817073822,
-0.006033509969711304,
0.214231938123703,
-0.45099490880966187,
-0.03704832121729851,
-0.11925847828388214,
0.09146876633167267,
-0.14170975983142853,
0.27094846963882446,
-0.340986043214798,
0.02887694165110588,
0.11389434337615967,
0.07260464131832123,
-0.05169893056154251,
-0.19085556268692017,
0.01044737920165062,
-0.15634047985076904,
0.33311963081359863,
0.40439730882644653,
-0.367501825094223,
0.4624006152153015,
-0.33285945653915405,
0.12178419530391693,
0.16661420464515686,
0.4555051624774933,
-0.23396065831184387,
0.4852760136127472,
-0.5367370843887329,
0.13219992816448212,
0.10822351276874542,
-0.2203228622674942,
-0.5336205959320068,
0.33360978960990906,
-0.23097944259643555,
0.19363196194171906,
0.20264941453933716,
0.2582687437534332,
-0.00567241758108139,
-0.18245001137256622,
-0.03014395385980606,
0.3352777361869812,
-0.07138931751251221,
-0.07813458144664764,
-0.37616977095603943,
-0.13380780816078186,
-0.00195993110537529,
0.04126768186688423,
-0.09267558157444,
0.08792369812726974,
0.15659157931804657,
-0.2355216145515442,
0.418820858001709,
-0.019681092351675034,
-0.05269031226634979,
0.08236416429281235,
0.2999204397201538,
0.05986234173178673,
0.2851828336715698,
0.13919395208358765,
-0.3044501543045044,
0.4071023762226105,
0.03501056879758835,
-0.22726058959960938,
-0.5086088180541992,
-0.06751541793346405,
-0.1355063021183014,
-0.03972063958644867,
-0.28525522351264954,
0.07435151934623718,
-0.0635785236954689,
0.05560953915119171,
0.1292371153831482,
0.09712487459182739,
0.08839328587055206,
0.45981892943382263,
-0.3092436194419861,
-0.02450363151729107,
-0.427768737077713,
0.3546278178691864,
0.17243193089962006,
0.012155944481492043,
-0.16546066105365753,
-0.35022419691085815,
-0.12882179021835327,
-0.21245771646499634,
-0.19249063730239868,
0.1811002790927887,
0.29070207476615906,
0.2820422053337097,
0.23880743980407715,
0.12940162420272827,
0.016732661053538322,
-0.35527363419532776,
0.06329475343227386,
-0.09592273831367493,
0.29812484979629517,
-0.023156408220529556,
-0.10596465319395065,
0.24149590730667114,
-0.3584688603878021,
0.34787869453430176,
0.019777119159698486,
-0.236331045627594,
0.23901742696762085,
0.011920604854822159,
0.13652192056179047,
0.1133154034614563,
0.40714117884635925,
0.33785462379455566,
0.4979344606399536,
0.3108632266521454,
-0.20869110524654388,
0.10323406755924225,
0.4732372760772705,
-0.11724744737148285,
-0.22272324562072754,
0.2019156813621521,
0.15279872715473175,
-0.03438941016793251,
-0.020188236609101295,
0.4492587149143219,
0.6243918538093567,
0.20138807594776154,
0.1447070986032486,
0.015113824047148228,
-0.15074892342090607,
-0.20578648149967194,
0.11841676384210587,
0.1333780735731125,
0.47785431146621704,
0.23253947496414185,
0.09498587995767593,
0.1190371960401535,
-0.23117148876190186,
-0.14209267497062683,
0.14600208401679993,
0.18958620727062225,
-0.030870310962200165,
0.2789652347564697,
-0.2407289296388626,
-0.11919529736042023,
-0.12595951557159424,
0.20841357111930847,
-0.021339382976293564,
-0.2445121854543686,
-0.23259581625461578,
-0.12197327613830566,
0.1518363058567047,
0.016372891142964363,
-0.24129916727542877,
0.1808519959449768,
0.16917411983013153,
-0.11172188073396683,
-0.3398059010505676,
-0.1313784122467041,
-0.07619264721870422,
-0.02705290913581848,
0.3099936842918396,
0.047288306057453156,
0.27412843704223633,
-0.15951955318450928,
-0.019430767744779587,
-0.2046407163143158,
-0.548208475112915,
0.0046202391386032104,
0.04710119962692261,
0.45455366373062134,
0.11710987985134125,
0.22969229519367218,
0.07538367807865143,
-0.012635793536901474,
0.21643216907978058,
0.08198501169681549,
-0.13159982860088348,
-0.21266122162342072,
-0.05726660415530205,
0.07324981689453125,
0.036692772060632706,
-0.2831514775753021,
-0.2570451498031616,
-0.2811684012413025,
0.46692001819610596,
0.037893231958150864,
0.005177751183509827,
0.26051807403564453,
0.10285548865795135,
0.10893231630325317,
-0.2454141080379486,
0.05463741719722748,
-0.15455497801303864,
-0.19840705394744873,
0.3685290515422821,
0.09340107440948486,
-0.18558385968208313,
-0.32520997524261475,
-0.2064816951751709,
0.11899083852767944,
0.13173407316207886,
-0.5061675906181335,
-0.31450513005256653,
-0.6455519199371338,
0.2665524184703827,
-0.21252742409706116,
0.08541546761989594,
0.10959721356630325,
-0.0495586097240448,
-0.11734925955533981,
-0.12928086519241333,
0.19440428912639618,
0.1712023764848709,
-0.017239805310964584,
0.06989002972841263,
0.22243866324424744,
0.41331395506858826,
0.0814438909292221,
0.47589045763015747,
0.3102901577949524,
-0.07376918196678162,
0.21255379915237427,
-0.06127692759037018,
0.24578996002674103,
-0.2906527519226074,
-0.14306843280792236,
0.019053727388381958,
-0.029012635350227356,
-0.17184898257255554,
-0.15000800788402557,
0.026392271742224693,
-0.00029662251472473145,
-0.054778218269348145,
-0.006947502493858337,
-0.26179954409599304,
-0.23495686054229736,
0.05471152812242508,
-0.3739616572856903,
0.10046932846307755,
0.08383986353874207,
0.005811601877212524,
-0.0876649022102356,
-0.04221023991703987,
0.11731132864952087,
0.07173509895801544,
0.42587047815322876,
-0.13292261958122253,
-0.09381160140037537,
-0.28154170513153076,
-0.1552879810333252,
0.17876112461090088,
0.08228316158056259,
0.15751701593399048,
0.08495277166366577,
0.018054526299238205,
0.3831407427787781,
-0.20000247657299042,
0.9773480296134949,
0.263702929019928,
0.047401636838912964,
-0.08313687145709991,
-0.09715519100427628,
-0.288023442029953,
-0.008643187582492828,
-0.05469747260212898,
0.060153499245643616,
-0.28349238634109497,
0.4255925118923187,
-0.27700120210647583,
-0.14869441092014313,
0.06453289091587067,
0.49090442061424255,
-0.12854652106761932,
-0.23616454005241394,
-0.2654191851615906,
-0.17180240154266357,
-0.13159503042697906,
0.04643026739358902,
-0.025350306183099747,
0.05261841416358948,
-0.13945522904396057,
-0.25742876529693604,
-0.4119270145893097,
-0.00458202138543129,
0.020586848258972168,
0.17247812449932098,
0.33623313903808594,
-0.24540528655052185,
0.47664135694503784,
0.3147241771221161,
0.10926464945077896,
0.29367342591285706,
0.623028576374054,
-0.08539034426212311,
-0.1042906641960144,
0.05733785405755043,
-0.014111065305769444,
0.20762893557548523,
0.2927764058113098,
-0.44169220328330994,
-0.15053841471672058,
-0.16691014170646667,
0.1414276361465454,
-0.4489896595478058,
0.18874670565128326,
0.771382212638855,
0.2844638526439667,
-0.32113340497016907,
-0.32318252325057983,
0.5058998465538025,
0.2736506164073944,
-0.25174376368522644,
0.6232341527938843,
0.06321556866168976,
-0.011567221954464912,
-0.07192427664995193,
-0.08461607247591019,
0.946561872959137,
-0.036117568612098694,
0.06166370213031769,
0.11916570365428925,
-0.16076980531215668,
0.4477887451648712,
0.09859895706176758,
0.1469334065914154,
-0.09961004555225372,
-0.17551830410957336,
0.14993931353092194,
-0.29659944772720337,
0.11097286641597748,
0.31843823194503784,
0.18284916877746582,
0.1348138302564621,
-0.28690123558044434,
-0.1946113109588623,
-0.1652233898639679,
0.3408537209033966,
-0.003532959148287773,
0.022278741002082825,
-0.2622029185295105,
0.01630033180117607,
0.0824722871184349,
0.00893712043762207,
-0.015407619066536427,
0.001211903989315033,
-0.2516797184944153,
-0.06559915095567703,
0.16665424406528473,
0.18597054481506348,
-0.15983285009860992,
0.29866576194763184,
-0.12703239917755127,
-0.2881041467189789,
-0.01152712944895029,
0.20209473371505737,
-0.3809513449668884,
0.07415585219860077,
0.019603027030825615,
0.5213980674743652,
-0.08665279299020767,
0.24937698245048523,
0.35678529739379883,
-0.3519821763038635,
0.32546478509902954,
0.048096925020217896,
-0.044681012630462646,
-0.4226917624473572,
-0.3788916766643524,
-0.09269912540912628,
-0.02933887392282486,
0.2993135452270508,
0.190248042345047,
0.25248754024505615,
-0.3063681125640869,
-0.030946962535381317,
-0.21774636209011078,
0.028123605996370316,
0.09234604239463806,
0.33689528703689575,
0.02261282131075859,
0.6818321347236633,
-0.03619799390435219,
-0.46325626969337463,
0.08587358891963959,
0.2686866521835327,
0.13249006867408752,
0.04737035185098648,
0.46874240040779114,
0.006989903748035431,
-0.2740408182144165,
-0.06157497316598892,
-0.036438919603824615,
-0.0701766386628151,
-0.860149621963501,
0.32331499457359314,
0.060050807893276215,
0.30962634086608887,
0.0841275304555893,
-0.2945556640625,
0.08362908661365509,
-0.36436307430267334,
-0.30638572573661804,
-0.3618014454841614,
-0.15120038390159607,
0.21863144636154175,
-0.3052544593811035,
0.2269013673067093,
-0.05230076611042023,
-0.06285364925861359,
0.007725799456238747,
0.06446798145771027,
-0.19208520650863647,
0.30319032073020935,
-0.1970687210559845,
0.22375896573066711,
-0.08376920223236084,
-0.10332349687814713,
0.15484075248241425,
-0.07521553337574005,
0.12476709485054016,
0.15489980578422546,
0.05238164961338043,
-0.15863794088363647,
-0.028877243399620056,
0.19840650260448456,
-0.20909813046455383,
-0.05127326399087906,
0.30100777745246887,
-0.479505717754364,
-0.20306269824504852,
-0.02861049398779869,
0.00681317038834095,
-0.036173541098833084,
0.00836697593331337,
-0.37290170788764954,
0.14341597259044647,
-0.2369232177734375,
-0.012348338961601257,
0.46067720651626587,
-0.34657981991767883,
0.26994264125823975,
0.1780906766653061,
0.21199128031730652,
-0.040810611099004745,
0.0005684271454811096,
-0.35399460792541504,
-0.05272660404443741,
0.08086296170949936,
-0.21454915404319763,
0.2914910316467285,
-0.051087960600852966,
0.011408518999814987,
-0.20585884153842926,
0.45735877752304077,
0.5261528491973877,
0.10148699581623077,
-0.22252361476421356,
0.09583348780870438,
0.08325039595365524,
-0.2606728672981262,
-0.09379524737596512,
0.08715406060218811,
-0.023560449481010437,
0.10652805864810944,
-0.014911390841007233,
0.16929656267166138,
0.3469260334968567,
-0.3527844548225403,
-0.1419466733932495,
0.3128112554550171,
-0.010301299393177032,
0.09086279571056366,
0.5904862284660339,
0.2760421931743622,
-0.13718637824058533,
0.42974141240119934,
0.040875956416130066,
0.12101873755455017,
0.5858052968978882,
-0.19864821434020996,
0.20634298026561737,
0.08488906174898148,
0.3721083402633667,
0.03901826962828636,
-0.2442099004983902,
0.04314880073070526,
0.27525758743286133,
-0.38884085416793823,
-0.0654696598649025,
-0.0901467502117157,
0.36881035566329956,
-0.041408341377973557,
-0.07448814809322357,
-0.15967988967895508,
0.40042644739151,
-0.022825472056865692,
-0.03102719783782959,
0.03973471373319626,
-0.22675222158432007,
-0.08996321260929108,
-0.049812331795692444,
-0.0687740296125412,
-0.024668730795383453,
0.23556268215179443,
0.2684391736984253,
0.056218221783638,
-0.3032158613204956,
-0.020881813019514084,
0.038813602179288864,
0.5300315618515015,
-0.21005389094352722,
0.26413506269454956,
0.1860799491405487,
-0.017964668571949005,
0.07715197652578354,
0.491109162569046,
0.40030255913734436,
0.38490137457847595,
-0.019407570362091064,
-0.09329564869403839,
0.1208651065826416,
0.04293838143348694,
-0.03189323842525482,
0.34263303875923157,
-0.027746200561523438,
-0.14180578291416168,
0.20110613107681274,
0.011707566678524017,
-0.20335906744003296,
-0.21120430529117584,
-0.04972865805029869,
0.19092078506946564,
-0.3562953770160675,
0.24475282430648804,
-0.2263302505016327,
-0.04505108296871185,
-0.2571481764316559,
0.2079090178012848,
-0.7587072253227234,
-0.19402220845222473,
0.45315325260162354,
-0.42108455300331116,
-0.14526355266571045,
-0.050021227449178696,
0.04546675831079483,
-0.5719866752624512,
0.5240824818611145,
0.19667214155197144,
0.5628745555877686,
-0.19198961555957794,
-0.12095776945352554,
-0.7582281827926636,
-0.16845452785491943,
-0.09315495193004608,
0.040991514921188354,
0.07415919750928879,
0.21204999089241028,
-0.13001784682273865,
0.13096818327903748,
0.5204954147338867,
-0.09198904037475586,
0.09247496724128723,
0.3112132251262665,
-0.3222484886646271,
-0.010360520333051682,
-0.18610431253910065,
-0.16430041193962097,
-0.19142110645771027,
-0.46033602952957153,
0.11629515886306763,
-0.12275240570306778,
-0.03872314840555191,
0.13857412338256836,
-0.010290149599313736,
0.26047462224960327,
0.31920409202575684,
0.5272154808044434,
0.3093889355659485,
0.4025556445121765,
0.10279031842947006,
-0.15450255572795868,
-0.10631845891475677,
-0.1720934957265854,
0.09078634530305862,
0.1582683026790619,
0.05954999849200249,
0.10668152570724487,
-0.13993600010871887,
0.026325847953557968,
-0.13870123028755188,
-0.1555970013141632,
-0.1806100755929947,
-0.05189903452992439,
-0.2708398699760437,
-0.19216714799404144,
-0.26628929376602173,
0.3442855477333069,
0.08193230628967285,
0.29752472043037415,
0.18359607458114624,
0.04237109422683716,
-0.314497709274292,
-0.37928029894828796,
0.5180895328521729,
-0.1973555088043213,
-0.23175151646137238,
0.11801185458898544,
0.20715902745723724,
0.0026185885071754456,
0.09498287737369537,
-0.10027581453323364,
0.011156134307384491,
0.513611912727356,
-0.10534126311540604,
-0.030971283093094826,
0.31702202558517456,
0.040140122175216675,
0.07110351324081421,
-0.016433237120509148,
-0.0466805100440979,
-0.12283618003129959,
0.030244724825024605,
0.03206593915820122,
-0.0850146934390068
] |
https://github.com/huggingface/datasets/issues/6359
|
Stuck in "Resolving data files..."
|
Furthermore, what's my current workaround about this problem? Should I save it by `save_to_disk()` and load dataset through `load_from_disk`?
|
### Describe the bug
I have an image dataset with 300k images, the size of image is 768 * 768.
When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part?
From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes.
### Steps to reproduce the bug
# Run following code two times
dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')
### Expected behavior
Fast dataset building
### Environment info
- `datasets` version: 2.14.5
- Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.17.3
- PyArrow version: 10.0.1
- Pandas version: 1.5.3
| 19
|
Stuck in "Resolving data files..."
### Describe the bug
I have an image dataset with 300k images, the size of image is 768 * 768.
When I run `dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')` in second time, it takes 50 minutes to finish "Resolving data files" part, what's going on in this part?
From my understand, after Arrow files been created in the first run, the second run should not take time longer than one or two minutes.
### Steps to reproduce the bug
# Run following code two times
dataset = load_dataset("imagefolder", data_dir="/path/to/img_dir", split='train')
### Expected behavior
Fast dataset building
### Environment info
- `datasets` version: 2.14.5
- Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.17.3
- PyArrow version: 10.0.1
- Pandas version: 1.5.3
Furthermore, what's my current workaround about this problem? Should I save it by `save_to_disk()` and load dataset through `load_from_disk`?
|
[
-0.2394726723432541,
-0.006857842206954956,
-0.12425394356250763,
0.3820541501045227,
0.29293787479400635,
0.18949264287948608,
0.2625264823436737,
0.4045516550540924,
-0.05470214784145355,
0.03535817563533783,
0.22675296664237976,
0.37057727575302124,
0.1320248246192932,
-0.19226370751857758,
-0.34687140583992004,
-0.18045993149280548,
-0.018676765263080597,
0.0645112469792366,
-0.04870133101940155,
-0.0983433723449707,
-0.23375381529331207,
0.028679220005869865,
-0.1596810519695282,
-0.25327104330062866,
-0.6265921592712402,
-0.37324267625808716,
-0.015418540686368942,
0.02753915637731552,
-0.21396492421627045,
-0.33096808195114136,
0.15030591189861298,
-0.03634875640273094,
-0.059609077870845795,
0.45227017998695374,
-0.0001208437024615705,
-0.08694528043270111,
0.6055532693862915,
0.17588678002357483,
-0.12049071490764618,
0.22338339686393738,
-0.19690927863121033,
-0.3771298825740814,
0.19541728496551514,
-0.4027356803417206,
0.12486424297094345,
-0.3013368844985962,
0.002343982458114624,
-0.35552507638931274,
0.33555930852890015,
-0.10554426163434982,
0.12480421364307404,
0.015777133405208588,
0.056581150740385056,
-0.04910477623343468,
-0.1295824944972992,
0.12098024785518646,
0.04736156761646271,
0.4413205087184906,
0.08117149770259857,
-0.1397034078836441,
-0.03273224085569382,
0.3241818845272064,
0.08318407088518143,
0.14642006158828735,
0.23173308372497559,
0.17053893208503723,
-0.05389565974473953,
-0.43019941449165344,
0.020352382212877274,
-0.008467279374599457,
0.4284057021141052,
0.1346912980079651,
-0.2676630914211273,
-0.44776952266693115,
-0.029113002121448517,
-0.137978658080101,
0.14561234414577484,
0.1950899362564087,
-0.17024798691272736,
-0.10595642030239105,
-0.08655258268117905,
-0.1247761994600296,
-0.07764674723148346,
-0.07689821720123291,
-0.08237381279468536,
-0.21415355801582336,
0.015115628950297832,
0.30375936627388,
0.26409846544265747,
0.04377535730600357,
0.16176968812942505,
-0.26419106125831604,
0.19375722110271454,
0.2441353052854538,
-0.6244086623191833,
0.17404267191886902,
-0.006277307868003845,
0.14234131574630737,
0.10321731120347977,
0.022694498300552368,
-0.10899081081151962,
-0.28670790791511536,
-0.07162413001060486,
-0.14572694897651672,
0.21204774081707,
0.35209450125694275,
-0.23121854662895203,
0.07522951066493988,
0.3356209993362427,
-0.027416139841079712,
-0.3257603645324707,
0.0005158931016921997,
-0.10720860213041306,
-0.47686484456062317,
0.013851780444383621,
-0.0919375941157341,
0.24888785183429718,
-0.04189386963844299,
-0.0020609814673662186,
-0.04193420708179474,
-0.07951316237449646,
-0.25805291533470154,
0.07062333822250366,
0.15214714407920837,
-0.22646832466125488,
0.3989831507205963,
-0.017095955088734627,
-0.10612164437770844,
-0.3363511264324188,
0.3053286075592041,
-0.031587857753038406,
-0.20908896625041962,
-0.36088618636131287,
-0.1209651455283165,
0.010170429944992065,
-0.1496974527835846,
0.04360491782426834,
0.1948792189359665,
-0.028158485889434814,
-0.10026498138904572,
0.20586323738098145,
-0.3928278982639313,
-0.13833379745483398,
0.16582073271274567,
-0.14041437208652496,
0.30583110451698303,
-0.23244808614253998,
0.09173958003520966,
0.011362694203853607,
0.32500046491622925,
-0.35122597217559814,
-0.08511911332607269,
-0.1650153398513794,
0.09569273144006729,
0.009207513183355331,
0.2881700396537781,
-0.2367982566356659,
-0.17724576592445374,
0.1871705949306488,
0.024552423506975174,
0.05922090262174606,
-0.11232200264930725,
0.03517783060669899,
-0.22558659315109253,
0.18216609954833984,
0.2829865515232086,
-0.2597607672214508,
0.41889688372612,
-0.2872767746448517,
0.08310429751873016,
0.1297694593667984,
0.35961493849754333,
-0.1417432427406311,
0.3554654121398926,
-0.5331942439079285,
-0.016421616077423096,
0.089075967669487,
-0.24441146850585938,
-0.6119125485420227,
0.32600629329681396,
-0.18878838419914246,
0.02090694196522236,
0.20262566208839417,
0.34373798966407776,
-0.005710402503609657,
-0.049964502453804016,
-0.001662328839302063,
0.413002610206604,
-0.15750393271446228,
-0.06484632194042206,
-0.35012108087539673,
-0.11004926264286041,
-0.0705583319067955,
0.0796767920255661,
-0.05065099522471428,
0.09174902737140656,
0.13735999166965485,
-0.2049819678068161,
0.31571608781814575,
-0.039421264082193375,
0.10521885007619858,
0.2798186242580414,
0.20261609554290771,
-0.000366799533367157,
0.2759566903114319,
0.2451428472995758,
-0.45580118894577026,
0.38177403807640076,
0.05685834586620331,
-0.20511454343795776,
-0.5388235449790955,
-0.04600139707326889,
-0.17561805248260498,
-0.04663263261318207,
-0.26925551891326904,
0.09222164005041122,
-0.07832936942577362,
0.11408856511116028,
0.19284360110759735,
0.13658128678798676,
0.013621348887681961,
0.5149227380752563,
-0.21925769746303558,
0.0487927608191967,
-0.5043078064918518,
0.3962743282318115,
0.134121373295784,
-0.05757589638233185,
-0.19942694902420044,
-0.29739663004875183,
-0.017018355429172516,
-0.22355367243289948,
-0.18985074758529663,
0.23609551787376404,
0.19717659056186676,
0.3119328022003174,
0.21172744035720825,
0.018649116158485413,
0.16308200359344482,
-0.362233430147171,
0.09588378667831421,
-0.09354318678379059,
0.22762928903102875,
-0.0073189884424209595,
-0.20561280846595764,
0.21393640339374542,
-0.40980643033981323,
0.3233797550201416,
0.07123401015996933,
-0.13512663543224335,
0.2487277388572693,
-0.03966337442398071,
0.06569523364305496,
0.07238483428955078,
0.3900928497314453,
0.34325289726257324,
0.4881492257118225,
0.2919312119483948,
-0.2324434369802475,
0.15687362849712372,
0.5640556216239929,
-0.10418738424777985,
-0.15719157457351685,
0.24502092599868774,
0.15166816115379333,
0.014708619564771652,
0.021480562165379524,
0.44531604647636414,
0.4103527069091797,
0.20642226934432983,
0.013621628284454346,
0.013880986720323563,
-0.07306724041700363,
-0.09004966169595718,
0.07515871524810791,
0.019855089485645294,
0.5392480492591858,
0.33887535333633423,
0.07854130864143372,
0.006770954467356205,
-0.26831936836242676,
-0.0975661426782608,
0.1395411342382431,
0.25093379616737366,
0.0604633204638958,
0.17124859988689423,
-0.22529572248458862,
-0.10307058691978455,
-0.08162536472082138,
0.20510819554328918,
-0.22785967588424683,
-0.1864599883556366,
-0.23957885801792145,
-0.08230392634868622,
0.14488373696804047,
0.18173888325691223,
-0.17532840371131897,
0.1360938847064972,
0.2301049381494522,
-0.005727434530854225,
-0.30122894048690796,
-0.18412190675735474,
0.02737945131957531,
-0.03142315521836281,
0.18022286891937256,
-0.08855949342250824,
0.3605334460735321,
-0.15515077114105225,
0.1146804690361023,
-0.3048805296421051,
-0.3979029357433319,
0.05389248579740524,
0.004916910082101822,
0.4610244631767273,
0.013959810137748718,
0.3272206783294678,
-0.024886542931199074,
0.03521285578608513,
0.24625404179096222,
0.07698037475347519,
-0.0957382470369339,
-0.28524118661880493,
0.0006195206078700721,
0.14955200254917145,
0.029935818165540695,
-0.2537617087364197,
-0.2655104696750641,
-0.3658590316772461,
0.5060079097747803,
-0.08477587252855301,
0.104899562895298,
0.13017116487026215,
0.14577330648899078,
0.04987506940960884,
-0.20980079472064972,
-0.013118447735905647,
-0.15194520354270935,
-0.2534492611885071,
0.399728924036026,
-0.018372556194663048,
-0.18306589126586914,
-0.2557780146598816,
-0.24173717200756073,
0.11818529665470123,
0.1865047663450241,
-0.5059144496917725,
-0.28615811467170715,
-0.5898591876029968,
0.26070263981819153,
-0.24757078289985657,
0.1635311245918274,
0.04928352311253548,
-0.11381100863218307,
-0.10986387729644775,
-0.171720951795578,
0.16318096220493317,
0.059058159589767456,
0.04866722226142883,
0.18943649530410767,
0.3209441900253296,
0.537556529045105,
-0.0732925534248352,
0.5904607772827148,
0.2290995717048645,
0.08774526417255402,
0.2380397468805313,
-0.20903636515140533,
0.20286224782466888,
-0.2892685830593109,
-0.17850397527217865,
-0.007533038966357708,
0.019259288907051086,
-0.12765724956989288,
-0.16118811070919037,
0.1318351924419403,
0.08577118068933487,
-0.030774420127272606,
-0.04835546761751175,
-0.34457889199256897,
-0.1468992680311203,
0.04429567605257034,
-0.19096583127975464,
0.23534265160560608,
0.03128836303949356,
-0.034019336104393005,
-0.01223151944577694,
-0.02800934761762619,
0.024249371141195297,
0.02350391447544098,
0.43163496255874634,
-0.11578673869371414,
-0.10996463894844055,
-0.3219524323940277,
-0.1959112584590912,
0.18787997961044312,
0.17503196001052856,
0.19108551740646362,
0.08831153810024261,
0.029340870678424835,
0.33698010444641113,
-0.1953873187303543,
1.0839734077453613,
0.21520577371120453,
0.07449951767921448,
-0.09890985488891602,
-0.07154099643230438,
-0.36879557371139526,
0.065309539437294,
0.2152315080165863,
0.1955009251832962,
-0.28954771161079407,
0.4416179955005646,
-0.2996183931827545,
-0.12167748063802719,
0.015818588435649872,
0.39703088998794556,
-0.2619035840034485,
-0.25556591153144836,
-0.27151843905448914,
-0.2856176793575287,
-0.2440066784620285,
0.018658429384231567,
-0.02954994887113571,
0.05204422026872635,
-0.03369634598493576,
-0.269100546836853,
-0.42612046003341675,
-0.16362214088439941,
-0.17814306914806366,
0.03734555467963219,
0.46944528818130493,
-0.2001470923423767,
0.476304829120636,
0.2894640266895294,
0.10446763038635254,
0.27002188563346863,
0.6819633841514587,
-0.198173388838768,
0.02378620207309723,
0.20632892847061157,
-0.18156211078166962,
0.2795455753803253,
0.23917213082313538,
-0.3444390296936035,
-0.12003358453512192,
-0.17000402510166168,
0.2065841555595398,
-0.4392789304256439,
0.08981546759605408,
0.5680946707725525,
0.22089196741580963,
-0.353456974029541,
-0.34698814153671265,
0.5185979604721069,
0.2503417432308197,
-0.13509559631347656,
0.599938690662384,
0.05395980551838875,
0.004449371714144945,
-0.07001814246177673,
-0.10064230114221573,
0.9113317728042603,
-0.12091509997844696,
0.12377399206161499,
-0.01888611912727356,
-0.2025371640920639,
0.40470659732818604,
0.02376677095890045,
0.24500314891338348,
-0.2429470419883728,
-0.1017487570643425,
0.13971838355064392,
-0.31823790073394775,
0.02974732220172882,
0.225009024143219,
0.19439373910427094,
0.1855996996164322,
-0.24550756812095642,
-0.2179012894630432,
-0.3046221435070038,
0.3352101147174835,
-0.14261700212955475,
-0.06725184619426727,
-0.33291158080101013,
0.00840173289179802,
-0.023316115140914917,
0.028959352523088455,
-0.07204145193099976,
0.12105683237314224,
-0.10422206670045853,
-0.16260114312171936,
0.20727337896823883,
0.028694983571767807,
-0.13004295527935028,
0.2685595154762268,
-0.16954384744167328,
-0.4966951608657837,
-0.12504376471042633,
0.1013413816690445,
-0.3891146779060364,
0.008418537676334381,
0.10958214104175568,
0.5103439092636108,
0.0016827136278152466,
0.21631427109241486,
0.09803909808397293,
-0.22688384354114532,
0.29253581166267395,
-0.010208386927843094,
0.07229550927877426,
-0.44710952043533325,
-0.4082602262496948,
-0.14260946214199066,
-0.10535407066345215,
0.2816702723503113,
0.0029625967144966125,
0.18075022101402283,
-0.26415136456489563,
-0.020206496119499207,
-0.10421295464038849,
-0.04716069996356964,
0.10233663022518158,
0.2777005434036255,
0.0741722360253334,
0.6891252994537354,
-0.008794408291578293,
-0.3143154978752136,
0.06831094622612,
0.2797573208808899,
0.27353614568710327,
-0.028484541922807693,
0.4010840952396393,
0.14959727227687836,
-0.24269939959049225,
-0.10637009143829346,
0.022253811359405518,
0.030842792242765427,
-0.8641774654388428,
0.49355748295783997,
-0.06028759852051735,
0.3619315028190613,
0.007074866909533739,
-0.30931416153907776,
0.06246178597211838,
-0.3951278626918793,
-0.20166610181331635,
-0.32246115803718567,
-0.3132796585559845,
0.26010018587112427,
-0.21116416156291962,
0.3038550317287445,
-0.009660115465521812,
-0.18409514427185059,
0.11670954525470734,
-0.009395105764269829,
-0.19139961898326874,
0.26934540271759033,
-0.22706924378871918,
0.19084587693214417,
-0.02685239166021347,
-0.04895259439945221,
0.1989900916814804,
-0.04993370175361633,
0.12756681442260742,
0.21491485834121704,
0.05864403024315834,
-0.17335420846939087,
-0.025703206658363342,
0.18933577835559845,
-0.19754260778427124,
-0.08758575469255447,
0.19410380721092224,
-0.5077081918716431,
-0.20908287167549133,
0.09448153525590897,
0.06463560461997986,
-0.053225744515657425,
0.03749358654022217,
-0.4545401930809021,
0.12315214425325394,
-0.22553759813308716,
0.030715376138687134,
0.37504133582115173,
-0.23296797275543213,
0.424724817276001,
0.35226866602897644,
0.20093286037445068,
0.023179519921541214,
0.0553177148103714,
-0.34579232335090637,
-0.19657549262046814,
0.08111846446990967,
-0.24567121267318726,
0.2465369999408722,
-0.207121804356575,
-0.011430870741605759,
-0.13911937177181244,
0.5462621450424194,
0.388616681098938,
-0.08019822835922241,
-0.15201511979103088,
0.07212865352630615,
0.14036938548088074,
-0.2920275032520294,
-0.14266322553157806,
0.03358902037143707,
-0.04271584004163742,
-0.01428176835179329,
-0.06186243146657944,
0.13514494895935059,
0.3218580186367035,
-0.4431239366531372,
0.01050364039838314,
0.32191747426986694,
-0.000625312328338623,
0.0769130289554596,
0.5333787798881531,
0.27401119470596313,
-0.10027280449867249,
0.43820425868034363,
0.09976686537265778,
0.0890277549624443,
0.6398398280143738,
-0.18791121244430542,
0.2774351239204407,
0.15030230581760406,
0.3937451243400574,
0.019355416297912598,
-0.2965124547481537,
-0.030493009835481644,
0.1373138427734375,
-0.3586399257183075,
-0.04922936111688614,
-0.1289941668510437,
0.3664725124835968,
0.006293737329542637,
-0.1734122484922409,
-0.17200148105621338,
0.4458513557910919,
-0.04975288361310959,
-0.04440784826874733,
0.08076144754886627,
-0.27578842639923096,
-0.05591205880045891,
0.17331437766551971,
-0.051599930971860886,
-0.03426092118024826,
0.21335142850875854,
0.32951444387435913,
0.09351690858602524,
-0.3212004005908966,
0.13485440611839294,
0.03604608029127121,
0.45871520042419434,
-0.17877039313316345,
0.3170751929283142,
0.22187352180480957,
-0.06690351665019989,
-0.0563487745821476,
0.42161786556243896,
0.3231125473976135,
0.3249003291130066,
-0.054203931242227554,
-0.09894242137670517,
0.15470421314239502,
0.10904116928577423,
-0.02709619328379631,
0.39342525601387024,
0.0746830627322197,
-0.07663078606128693,
0.11148518323898315,
0.040162503719329834,
-0.21588356792926788,
-0.10549062490463257,
-0.09280365705490112,
0.1481044590473175,
-0.16541585326194763,
0.14459800720214844,
-0.2182585895061493,
-0.07677733153104782,
-0.17085666954517365,
0.18954044580459595,
-0.7671761512756348,
-0.22934722900390625,
0.5608071088790894,
-0.36294126510620117,
-0.15802869200706482,
-0.12596756219863892,
0.03741369768977165,
-0.6035050749778748,
0.6070009469985962,
0.22231873869895935,
0.4638919234275818,
-0.19811215996742249,
-0.25292837619781494,
-0.6711025238037109,
-0.17724421620368958,
-0.13192415237426758,
0.15606161952018738,
0.0652056485414505,
0.21548539400100708,
-0.2185230553150177,
-0.005644962191581726,
0.6438552737236023,
-0.03912509232759476,
0.11490597575902939,
0.3225697875022888,
-0.28588539361953735,
-0.09470205008983612,
-0.08420206606388092,
-0.12831246852874756,
-0.1610143780708313,
-0.5085561275482178,
0.11807245016098022,
-0.12275700271129608,
0.0015158653259277344,
0.06380666792392731,
-0.054002340883016586,
0.23104670643806458,
0.14395363628864288,
0.5851191878318787,
0.272467702627182,
0.2908191978931427,
0.1224217638373375,
-0.20079629123210907,
-0.023819629102945328,
-0.28755322098731995,
0.12111423909664154,
0.060982223600149155,
0.19474035501480103,
0.22344817221164703,
-0.16141802072525024,
0.08879110962152481,
-0.2880479693412781,
-0.18794843554496765,
-0.18862439692020416,
0.10792656987905502,
-0.09856422245502472,
-0.18886221945285797,
-0.21645444631576538,
0.14109940826892853,
0.09216651320457458,
0.36950892210006714,
0.2109728902578354,
0.0800456553697586,
-0.3075336217880249,
-0.37322795391082764,
0.47720953822135925,
-0.14742738008499146,
-0.32885271310806274,
0.2553490400314331,
0.08695691078901291,
0.053651224821805954,
0.07933403551578522,
-0.15064597129821777,
0.04129061847925186,
0.46851393580436707,
-0.10008203238248825,
-0.03276888653635979,
0.266924113035202,
0.015084963291883469,
0.022565867751836777,
0.03279397264122963,
0.07751145958900452,
-0.03099203109741211,
-0.04518415033817291,
0.036298755556344986,
-0.061200618743896484
] |
https://github.com/huggingface/datasets/issues/6358
|
Mounting datasets cache fails due to absolute paths.
|
You may be able to make it work by tweaking some environment variables, such as [`HF_HOME`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#hfhome) or [`HF_DATASETS_CACHE`](https://huggingface.co/docs/datasets/cache#cache-directory).
|
### Describe the bug
Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache.
### Steps to reproduce the bug
1. Create a datasets cache by downloading some data
2. Mount the dataset folder into a docker container or remote system.
3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache.
4. Attempt to access the data from within the docker container.
5. An error is thrown saying no file exists at \<absolute path to original cache location\>
### Expected behavior
The data is loaded without error
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
| 18
|
Mounting datasets cache fails due to absolute paths.
### Describe the bug
Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache.
### Steps to reproduce the bug
1. Create a datasets cache by downloading some data
2. Mount the dataset folder into a docker container or remote system.
3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache.
4. Attempt to access the data from within the docker container.
5. An error is thrown saying no file exists at \<absolute path to original cache location\>
### Expected behavior
The data is loaded without error
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
You may be able to make it work by tweaking some environment variables, such as [`HF_HOME`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#hfhome) or [`HF_DATASETS_CACHE`](https://huggingface.co/docs/datasets/cache#cache-directory).
|
[
-0.00010101497173309326,
0.028453528881072998,
0.08273068070411682,
0.13505098223686218,
0.2485959678888321,
0.023464784026145935,
0.11947569251060486,
0.21675466001033783,
0.04908518120646477,
0.09170399606227875,
-0.07647697627544403,
0.08717944473028183,
-0.2398335188627243,
-0.3364962637424469,
0.18390847742557526,
-0.09930165112018585,
0.11063725501298904,
0.05225786939263344,
-0.31259071826934814,
0.029754936695098877,
-0.13113060593605042,
0.20235079526901245,
0.13913816213607788,
0.1667030155658722,
-0.2379501610994339,
0.03757784143090248,
-0.19137835502624512,
0.275305837392807,
0.12263626605272293,
-0.39663252234458923,
0.4465196430683136,
0.08144408464431763,
0.07906821370124817,
0.8231346011161804,
-0.0001203367137350142,
0.14614343643188477,
0.2531036138534546,
0.026049097999930382,
-0.37389707565307617,
-0.4609590768814087,
-0.40953630208969116,
-0.032229840755462646,
0.08424188941717148,
-0.1610822230577469,
-0.1557096391916275,
0.11569906771183014,
0.0008596014231443405,
-0.3523229658603668,
0.5980053544044495,
0.11831121891736984,
0.12908826768398285,
0.2749701142311096,
-0.10171857476234436,
-0.04732382297515869,
0.25261515378952026,
0.12925264239311218,
-0.22262713313102722,
0.5217984914779663,
-0.04575125873088837,
0.04095959663391113,
0.034606434404850006,
0.14331091940402985,
-0.11364074796438217,
0.0881635993719101,
0.2764192223548889,
-0.012393197976052761,
-0.48835402727127075,
-0.0017044246196746826,
0.04950763285160065,
0.42001229524612427,
0.49604687094688416,
-0.4395654797554016,
-0.6024464964866638,
-0.34022486209869385,
-0.17548958957195282,
-0.1726912409067154,
0.4340614378452301,
0.02503160759806633,
-0.005695343017578125,
0.2693641185760498,
-0.20412971079349518,
-0.1661904752254486,
-0.32482093572616577,
0.09033644199371338,
0.012022368609905243,
-0.09719936549663544,
-0.2919420301914215,
0.18499282002449036,
-0.05016367509961128,
0.13136346638202667,
0.11247900128364563,
-0.11203284561634064,
0.0868106484413147,
0.15549378097057343,
-0.1817048192024231,
0.16905707120895386,
-0.02917657047510147,
0.30198347568511963,
0.23911228775978088,
0.061687394976615906,
0.09067314863204956,
0.014762388542294502,
-0.2893807888031006,
0.2010171115398407,
-0.03147028386592865,
0.42807328701019287,
-0.11218013614416122,
-0.051085904240608215,
0.2938076853752136,
0.20639623701572418,
-0.10248681902885437,
-0.2874247133731842,
-0.042773500084877014,
-0.12142222374677658,
-0.20668500661849976,
0.034877508878707886,
0.10393522679805756,
-0.3075414001941681,
-0.042413607239723206,
0.027462366968393326,
0.2230835258960724,
0.3423733711242676,
0.25644758343696594,
0.33735036849975586,
-0.006309177726507187,
-0.11064610630273819,
0.08519454300403595,
0.2729165256023407,
0.06720157712697983,
0.2693014144897461,
-0.16577914357185364,
0.10877522826194763,
-0.2228686660528183,
0.301691472530365,
0.14078208804130554,
-0.08264139294624329,
0.27465638518333435,
0.022104598581790924,
0.19302678108215332,
0.006771698594093323,
-0.19747145473957062,
-0.049248818308115005,
0.046831320971250534,
0.3533553183078766,
-0.027862178161740303,
0.3391803503036499,
0.20777444541454315,
0.17786243557929993,
-0.06027869135141373,
-0.013166345655918121,
-0.10268817096948624,
-0.3198116421699524,
0.14617304503917694,
-0.006488758139312267,
-0.2420813888311386,
0.35999757051467896,
-0.3146202564239502,
-0.049384888261556625,
-0.010276958346366882,
-0.1215890496969223,
0.13556751608848572,
0.0868673250079155,
-0.09343448281288147,
-0.17191468179225922,
0.44977420568466187,
0.6902186274528503,
0.019978370517492294,
0.037431709468364716,
0.03779901936650276,
-0.023175042122602463,
-0.11340489238500595,
0.28987354040145874,
0.044962868094444275,
-0.028919510543346405,
-0.4187358319759369,
-0.14445607364177704,
0.005872681736946106,
-0.4679613411426544,
-0.4912973940372467,
0.196274995803833,
-0.07384233176708221,
0.2960467040538788,
0.16123223304748535,
-0.15106569230556488,
-0.016837291419506073,
-0.05058486759662628,
-0.054384633898735046,
0.22956645488739014,
0.21290527284145355,
-0.1689624935388565,
-0.2719804346561432,
-0.18222510814666748,
-0.11837650835514069,
0.02384931594133377,
0.2315109223127365,
0.15588292479515076,
0.16629236936569214,
0.11047559976577759,
0.17848892509937286,
-0.11988876760005951,
-0.04188904911279678,
0.535559356212616,
0.318215548992157,
0.2249145358800888,
-0.004705186001956463,
-0.2608768045902252,
-0.33240339159965515,
0.3909760117530823,
-0.1094144880771637,
-0.2671893835067749,
-0.24394921958446503,
-0.1854904741048813,
0.012184174731373787,
0.1846594512462616,
-0.05598554387688637,
0.030773209407925606,
0.05704471468925476,
0.15263083577156067,
0.2576453685760498,
0.28013792634010315,
-0.13015352189540863,
0.5971234440803528,
-0.09784842282533646,
0.14570499956607819,
-0.02730879932641983,
0.2483202964067459,
0.07038067281246185,
-0.13197025656700134,
-0.20842529833316803,
0.3071734607219696,
0.356380432844162,
-0.2449875771999359,
-0.12350065261125565,
0.5404943823814392,
-0.11194652318954468,
0.2302359938621521,
-0.06302657723426819,
0.26870885491371155,
0.33173006772994995,
-0.1803278625011444,
-0.22476571798324585,
-0.13843180239200592,
-0.047129757702350616,
0.13153865933418274,
-0.16388031840324402,
0.08520182222127914,
-0.5260401368141174,
0.32800549268722534,
0.0665694996714592,
-0.0021216440945863724,
0.009928746148943901,
0.07125240564346313,
-0.20534338057041168,
-0.06907795369625092,
0.48113808035850525,
0.06855066120624542,
0.31486281752586365,
-0.2883261740207672,
-0.032097406685352325,
0.07107267528772354,
0.02092617377638817,
0.1982545107603073,
0.13941356539726257,
0.2260323464870453,
-0.21271607279777527,
-0.03504244238138199,
0.306482195854187,
0.20179753005504608,
0.23179134726524353,
0.12595048546791077,
0.3227423429489136,
0.1823834925889969,
-0.1126437708735466,
-0.015293540433049202,
-0.04226069897413254,
0.11295248568058014,
-0.061423372477293015,
-0.07591737061738968,
0.06820506602525711,
0.26446565985679626,
-0.14080023765563965,
-0.25220757722854614,
-0.28734004497528076,
0.04078945517539978,
-0.2928612530231476,
0.2739892601966858,
-0.2536916136741638,
0.1591433584690094,
-0.13585011661052704,
-0.41022032499313354,
-0.2258320450782776,
-0.27782562375068665,
-0.1494830846786499,
0.45431065559387207,
0.02218606323003769,
0.08602974563837051,
-0.011610852554440498,
0.12700383365154266,
-0.07959364354610443,
-0.07785183191299438,
-0.2998940944671631,
-0.047809895128011703,
-0.11598958820104599,
-0.11673027276992798,
0.00017146673053503036,
-0.01432914100587368,
0.11159739643335342,
-0.17509180307388306,
0.15313175320625305,
-0.5326366424560547,
-0.3060944676399231,
0.07698827236890793,
0.08307208120822906,
0.6467131972312927,
0.2184661626815796,
0.16329246759414673,
-0.24093548953533173,
-0.06984466314315796,
0.17269152402877808,
-0.08082609623670578,
0.14334602653980255,
-0.011126925237476826,
-0.0971398577094078,
-0.06669238209724426,
-0.16528214514255524,
0.1439189612865448,
-0.27121543884277344,
-0.3374411463737488,
0.5436832308769226,
-0.020245403051376343,
-0.004489831626415253,
0.15248316526412964,
0.08001108467578888,
0.12314163148403168,
-0.3100084066390991,
0.1676236093044281,
-0.20056426525115967,
-0.5716198086738586,
0.2236563265323639,
-0.2590877413749695,
-0.30232059955596924,
-0.07745417207479477,
-0.008250486105680466,
0.12496395409107208,
0.11806055903434753,
-0.5109804272651672,
-0.4118402898311615,
-0.17156317830085754,
0.2871715724468231,
0.07066524028778076,
0.08164020627737045,
0.07670223712921143,
-0.08482157438993454,
0.05232717841863632,
-0.2956162393093109,
-0.0777001678943634,
0.09972202777862549,
-0.0942320004105568,
0.15507900714874268,
0.17511668801307678,
0.11157137900590897,
0.2819511890411377,
0.7120711207389832,
0.12173697352409363,
0.049654990434646606,
0.44483813643455505,
-0.03072754107415676,
0.9490541815757751,
-0.1977149248123169,
-0.40464407205581665,
0.07196050882339478,
0.03108508139848709,
-0.10125964134931564,
0.030536748468875885,
0.4224361181259155,
0.5226767659187317,
0.013201981782913208,
-0.24324539303779602,
-0.11970631778240204,
-0.2589903771877289,
-0.07217995822429657,
-0.16739468276500702,
-0.024477794766426086,
0.22586876153945923,
-0.08561686426401138,
-0.2775369882583618,
-0.12213749438524246,
0.19435614347457886,
0.6458677649497986,
0.43485724925994873,
0.34597912430763245,
-0.056245606392621994,
-0.033251333981752396,
-0.48348599672317505,
-0.055235356092453,
-0.11932887136936188,
0.3497302830219269,
-0.3721044659614563,
0.415190726518631,
0.02954019606113434,
-0.035368941724300385,
0.863373339176178,
0.0018257200717926025,
-0.06570065021514893,
-0.21432869136333466,
-0.10604959726333618,
-0.6279305815696716,
0.25875169038772583,
0.33999398350715637,
0.2833309769630432,
-0.04230697080492973,
0.28825700283050537,
-0.16954076290130615,
0.16541771590709686,
-0.3525587022304535,
0.3863050639629364,
-0.12007151544094086,
-0.4386500120162964,
-0.19974735379219055,
-0.17607292532920837,
-0.12340550869703293,
-0.036380402743816376,
0.07553215324878693,
-0.22279350459575653,
0.1435258537530899,
-0.0810166671872139,
-0.14721593260765076,
-0.0678037703037262,
-0.12803342938423157,
0.07045213878154755,
0.35657843947410583,
-0.33387312293052673,
0.13251465559005737,
0.4849676191806793,
-0.025023065507411957,
0.2861444354057312,
0.39738258719444275,
-0.3268463611602783,
0.14657828211784363,
-0.07543257623910904,
-0.14837034046649933,
-0.09609738737344742,
0.3452107906341553,
-0.22630055248737335,
0.028529956936836243,
0.14963237941265106,
0.06501534581184387,
-0.20112740993499756,
0.16173358261585236,
-0.14949853718280792,
0.10145071148872375,
0.08527056127786636,
-0.1706307828426361,
0.5943029522895813,
0.21147039532661438,
-0.17220333218574524,
0.5052993297576904,
0.7772500514984131,
-0.48731204867362976,
0.307620108127594,
-0.08149560540914536,
0.8938338756561279,
-0.251085102558136,
0.27478986978530884,
0.29504796862602234,
-0.27373790740966797,
0.715540885925293,
-0.12202365696430206,
0.07103364169597626,
-0.2029772400856018,
-0.41284486651420593,
-0.09919165819883347,
-0.18440558016300201,
0.015019036829471588,
-0.10285212099552155,
-0.01123124361038208,
0.31003904342651367,
-0.1986459195613861,
0.26291051506996155,
-0.004771290346980095,
-0.25842541456222534,
-0.09395486861467361,
-0.30395910143852234,
-0.275988906621933,
0.14051100611686707,
0.0013921558856964111,
0.30540212988853455,
-0.16094109416007996,
-0.12196226418018341,
-0.13550326228141785,
0.020793262869119644,
-0.2756880521774292,
0.009918101131916046,
-0.22145451605319977,
0.100551076233387,
0.2209150344133377,
-0.28096094727516174,
-0.08947688341140747,
0.15231427550315857,
0.5740761160850525,
0.13309085369110107,
-0.3642602562904358,
0.04970822483301163,
-0.05771174281835556,
-0.11998607963323593,
-0.20544977486133575,
-0.05342363193631172,
-0.038377031683921814,
0.03517535328865051,
0.1348598301410675,
-0.2753995656967163,
-0.30288949608802795,
-0.345488965511322,
0.286203533411026,
-0.015091069042682648,
0.08444616198539734,
0.1279907077550888,
-0.29945898056030273,
-0.09497644007205963,
0.07422870397567749,
-0.30205363035202026,
0.057010430842638016,
0.09660269320011139,
-0.06756968796253204,
0.03732883930206299,
-0.024790991097688675,
0.018622443079948425,
0.0453881174325943,
0.5438146591186523,
-0.33882880210876465,
-0.2348407357931137,
0.3005419969558716,
0.014731433242559433,
-0.3473755121231079,
0.03545001149177551,
-0.028677094727754593,
0.3397512435913086,
-0.38565555214881897,
-0.00434162188321352,
-0.20008136332035065,
0.1819891482591629,
-0.23705358803272247,
-0.2732881009578705,
0.5384505391120911,
-0.13651475310325623,
-0.02980533055961132,
-0.5116955041885376,
-0.36602357029914856,
0.12368197739124298,
-0.4268031418323517,
0.11167138814926147,
0.0720255970954895,
-0.3087233006954193,
0.11947248876094818,
-0.08308271318674088,
-0.22607925534248352,
0.10931191593408585,
-0.37571200728416443,
-0.2087586671113968,
0.33247020840644836,
0.06546778976917267,
0.21062128245830536,
-0.18076425790786743,
0.018362434580922127,
0.26000431180000305,
-0.16619358956813812,
-0.06515517830848694,
-0.359282910823822,
0.15538807213306427,
0.15048032999038696,
-0.16402645409107208,
0.016337931156158447,
-0.05549044907093048,
0.060144275426864624,
-0.19781310856342316,
0.21005071699619293,
0.5693410038948059,
0.031753987073898315,
-0.157440185546875,
-0.12833480536937714,
0.12518258392810822,
-0.44212037324905396,
0.12074252218008041,
0.0025702714920043945,
0.11730600148439407,
0.10946716368198395,
0.10934582352638245,
-0.2323574274778366,
-0.09842853248119354,
-0.09658443927764893,
0.005014188587665558,
-0.16710306704044342,
-0.06601240485906601,
0.2897472381591797,
-0.20374660193920135,
0.06969939172267914,
0.2647596001625061,
0.42674699425697327,
-0.32198312878608704,
-0.22428573668003082,
-0.07573366910219193,
0.3352363705635071,
0.0173982884734869,
0.004885673522949219,
0.06509897857904434,
0.03213874623179436,
0.03753332421183586,
0.1667836606502533,
0.1557111144065857,
0.4889813959598541,
-0.33242470026016235,
0.16380038857460022,
0.01848830282688141,
0.4999813735485077,
-0.2681669592857361,
-0.008241606876254082,
0.05472258850932121,
-0.11246077716350555,
0.28547751903533936,
0.22983196377754211,
0.20688089728355408,
0.15601524710655212,
0.5915970802307129,
-0.24579861760139465,
0.20175479352474213,
-0.055842481553554535,
-0.18948397040367126,
0.0845969170331955,
-0.4794195592403412,
-0.06671318411827087,
-0.04718317091464996,
0.2233959138393402,
0.03290734812617302,
-0.5150813460350037,
0.13916678726673126,
-0.5875229835510254,
0.08443906158208847,
0.09314524382352829,
-0.027534764260053635,
-0.1446647047996521,
-0.13582617044448853,
0.2063758820295334,
-0.13666309416294098,
0.1422044038772583,
-0.216688334941864,
0.014008380472660065,
-0.29509925842285156,
0.18284958600997925,
-0.009256258606910706,
0.1787533313035965,
-0.2563956379890442,
-0.2506176829338074,
0.3315449357032776,
-0.07384396344423294,
-0.029232770204544067,
0.335481733083725,
0.3775033950805664,
-0.09120313823223114,
0.05381673201918602,
-0.025948887690901756,
0.45681726932525635,
0.16735732555389404,
0.11559447646141052,
0.05153919383883476,
-0.014800067991018295,
-0.02383694238960743,
0.08294234424829483,
0.19899623095989227,
-0.10084888339042664,
-0.11492995917797089,
0.2526991665363312,
0.11395961046218872,
-0.10095128417015076,
0.4503202438354492,
-0.1587153971195221,
0.5168799757957458,
-0.21004988253116608,
0.030999518930912018,
-0.16205240786075592,
-0.07159533351659775,
-0.011465683579444885,
-0.03293091803789139,
-0.24971282482147217,
0.1003141775727272,
0.360635370016098,
-0.22883448004722595,
0.021836593747138977,
0.10292617231607437,
0.010133843868970871,
0.20373129844665527,
0.30226799845695496,
0.5280977487564087,
0.2704758942127228,
-0.3339574635028839,
0.03311355412006378,
-0.48576921224594116,
0.08787161111831665,
-0.1559910625219345,
0.043705061078071594,
-0.023951254785060883,
-0.15337583422660828,
-0.23937445878982544,
0.01307174377143383,
0.2610689103603363,
0.14409413933753967,
0.026655707508325577,
-0.37172576785087585,
-0.18604665994644165,
-0.021857164800167084,
0.14332348108291626,
-0.10693700611591339,
-0.08430366218090057,
-0.21818619966506958,
0.14350958168506622,
0.042057186365127563,
-0.006431639194488525,
0.026034053415060043,
0.24502381682395935,
-0.23763659596443176,
0.05397684872150421,
0.12831488251686096,
0.2102823257446289,
-0.024878084659576416,
0.044891878962516785,
-0.26700830459594727,
-0.34663882851600647,
-0.27596232295036316,
-0.03283264487981796,
-0.1220090463757515,
-0.18070392310619354,
0.4960469901561737,
-0.4246605634689331,
-0.6210842132568359,
-0.4449254870414734,
0.030049758031964302,
0.1690923571586609,
0.002371959388256073,
-0.07299356162548065,
0.26410001516342163,
-0.2419714331626892,
0.24868150055408478,
0.48941054940223694,
0.10613754391670227,
0.018362361937761307,
0.3514675796031952,
-0.14260011911392212,
-0.20824415981769562,
0.5945664644241333,
-0.5022558569908142,
-0.2772768437862396,
0.08031775057315826,
0.3309229016304016,
0.121324822306633,
-0.2277185469865799,
-0.5283297300338745,
-0.01776932179927826,
0.2592235505580902,
0.06315380334854126,
-0.04678964987397194,
-0.1524837762117386,
-0.31972843408584595,
0.17250490188598633,
0.005106743425130844,
0.2187526971101761,
0.06169071048498154,
-0.11423671245574951,
0.16951218247413635,
-0.24085527658462524
] |
https://github.com/huggingface/datasets/issues/6358
|
Mounting datasets cache fails due to absolute paths.
|
> You may be able to make it work by tweaking some environment variables, such as [`HF_HOME`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#hfhome) or [`HF_DATASETS_CACHE`](https://huggingface.co/docs/datasets/cache#cache-directory).
I am already doing this. The problem is that, while this seemingly allows flexibility, the absolute paths written into the cache still have the old cache directory. The paths written into the cache should be relative to the cache location to allow this sort of flexibility. Sorry, I omitted this in the reproduction steps, I have now added it.
|
### Describe the bug
Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache.
### Steps to reproduce the bug
1. Create a datasets cache by downloading some data
2. Mount the dataset folder into a docker container or remote system.
3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache.
4. Attempt to access the data from within the docker container.
5. An error is thrown saying no file exists at \<absolute path to original cache location\>
### Expected behavior
The data is loaded without error
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
| 78
|
Mounting datasets cache fails due to absolute paths.
### Describe the bug
Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache.
### Steps to reproduce the bug
1. Create a datasets cache by downloading some data
2. Mount the dataset folder into a docker container or remote system.
3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache.
4. Attempt to access the data from within the docker container.
5. An error is thrown saying no file exists at \<absolute path to original cache location\>
### Expected behavior
The data is loaded without error
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
> You may be able to make it work by tweaking some environment variables, such as [`HF_HOME`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#hfhome) or [`HF_DATASETS_CACHE`](https://huggingface.co/docs/datasets/cache#cache-directory).
I am already doing this. The problem is that, while this seemingly allows flexibility, the absolute paths written into the cache still have the old cache directory. The paths written into the cache should be relative to the cache location to allow this sort of flexibility. Sorry, I omitted this in the reproduction steps, I have now added it.
|
[
0.053802523761987686,
0.05613522231578827,
0.08096805214881897,
0.06797809898853302,
0.24285449087619781,
-0.015263363718986511,
0.10982007533311844,
0.2052084505558014,
0.030880846083164215,
0.05656001716852188,
-0.1255323439836502,
0.11960484832525253,
-0.24449746310710907,
-0.3772183954715729,
0.1891603320837021,
-0.10236293077468872,
0.07787122577428818,
0.04136114940047264,
-0.32159435749053955,
-0.029366908594965935,
-0.11165237426757812,
0.21256546676158905,
0.20006735622882843,
0.1676471084356308,
-0.17907992005348206,
0.017861241474747658,
-0.18501386046409607,
0.27880823612213135,
0.16108953952789307,
-0.41057008504867554,
0.4367198348045349,
0.1282210499048233,
0.12882177531719208,
0.7518696188926697,
-0.00011820915824500844,
0.16463139653205872,
0.20790378749370575,
0.02739652432501316,
-0.4010888636112213,
-0.41904985904693604,
-0.3475048243999481,
-0.030631855130195618,
0.057498179376125336,
-0.19889381527900696,
-0.14737431704998016,
0.09508440643548965,
0.02152823843061924,
-0.37957680225372314,
0.5996991991996765,
0.063716821372509,
0.13066677749156952,
0.23277446627616882,
-0.1638186275959015,
-0.028184551745653152,
0.20765283703804016,
0.10644267499446869,
-0.16219814121723175,
0.46642234921455383,
-0.07954050600528717,
0.07499326765537262,
0.015787966549396515,
0.14679336547851562,
-0.13031575083732605,
0.06120983511209488,
0.30233654379844666,
-0.0022320766001939774,
-0.4778386950492859,
0.04599587619304657,
0.06761017441749573,
0.3976326286792755,
0.4532676339149475,
-0.4560207426548004,
-0.6193302869796753,
-0.3654962480068207,
-0.17716026306152344,
-0.1846483051776886,
0.36718931794166565,
0.012359218671917915,
0.012296756729483604,
0.2720639705657959,
-0.20911362767219543,
-0.17890630662441254,
-0.31718170642852783,
0.10862997174263,
-0.00587661936879158,
-0.09802697598934174,
-0.2854989171028137,
0.15952184796333313,
0.002788316458463669,
0.15797486901283264,
0.03073149546980858,
-0.07684097439050674,
0.09288885444402695,
0.1609519124031067,
-0.15271654725074768,
0.18337033689022064,
-0.026673704385757446,
0.4431866705417633,
0.2724462151527405,
0.07837212830781937,
0.11329622566699982,
0.03344736620783806,
-0.29950466752052307,
0.1320001184940338,
-0.027250494807958603,
0.44090256094932556,
-0.08183582872152328,
-0.10619960725307465,
0.2551669478416443,
0.21374239027500153,
-0.08446232974529266,
-0.2867414355278015,
-0.04717664793133736,
-0.19878409802913666,
-0.17691725492477417,
0.022684460505843163,
0.08464983850717545,
-0.29010868072509766,
-0.03089015744626522,
0.02129492536187172,
0.2044820487499237,
0.3455418646335602,
0.25589627027511597,
0.38471105694770813,
-0.025869708508253098,
-0.06387820094823837,
0.054099008440971375,
0.22934019565582275,
0.04873201251029968,
0.26202505826950073,
-0.18247902393341064,
0.11573703587055206,
-0.2728613018989563,
0.2951527535915375,
0.11403544247150421,
-0.12965378165245056,
0.27538469433784485,
0.04012378305196762,
0.17395710945129395,
0.09006297588348389,
-0.2778330147266388,
0.013957804068922997,
0.11081881821155548,
0.29071861505508423,
-0.08398085832595825,
0.36748749017715454,
0.18286187946796417,
0.1646207720041275,
-0.0631825178861618,
-0.02960515022277832,
-0.08244123309850693,
-0.3186720609664917,
0.18233513832092285,
0.0033959639258682728,
-0.25600773096084595,
0.3390575349330902,
-0.26126977801322937,
-0.08343365788459778,
0.007686063647270203,
-0.09083671867847443,
0.12276189029216766,
0.08191951364278793,
-0.09329435974359512,
-0.1747289001941681,
0.43193015456199646,
0.7230838537216187,
0.03596724197268486,
0.01934327930212021,
0.05816180631518364,
-0.02126220613718033,
-0.19022142887115479,
0.2879144847393036,
0.031852517277002335,
-0.05352362245321274,
-0.4287981390953064,
-0.21178489923477173,
-0.01501474529504776,
-0.47991421818733215,
-0.48100465536117554,
0.21111714839935303,
-0.048405829817056656,
0.3155154287815094,
0.17280223965644836,
-0.19200874865055084,
-0.024473100900650024,
-0.03494200110435486,
-0.058199599385261536,
0.1960078924894333,
0.21962344646453857,
-0.15464647114276886,
-0.30624404549598694,
-0.18494684994220734,
-0.14550434052944183,
-0.028049010783433914,
0.20580655336380005,
0.14264151453971863,
0.1669337898492813,
0.08295382559299469,
0.25015759468078613,
-0.130315363407135,
-0.007815609686076641,
0.5223878622055054,
0.298165887594223,
0.24687039852142334,
-0.05520860105752945,
-0.23070243000984192,
-0.37051358819007874,
0.383276104927063,
-0.11926785856485367,
-0.26982980966567993,
-0.22490902245044708,
-0.213606059551239,
-0.004348604008555412,
0.11383161693811417,
-0.06237652525305748,
-0.021985765546560287,
0.061193570494651794,
0.17440485954284668,
0.30779168009757996,
0.2392534762620926,
-0.16638650000095367,
0.6350355744361877,
-0.09043294936418533,
0.11827103048563004,
-0.10020877420902252,
0.23048274219036102,
0.08029091358184814,
-0.11108765751123428,
-0.23360870778560638,
0.30958813428878784,
0.356807678937912,
-0.23073063790798187,
-0.057428739964962006,
0.5085713863372803,
-0.13477720320224762,
0.25590768456459045,
-0.11303899437189102,
0.30003902316093445,
0.356352835893631,
-0.14827901124954224,
-0.17615272104740143,
-0.17394888401031494,
-0.06909909099340439,
0.16305893659591675,
-0.19072476029396057,
0.10577110946178436,
-0.5148012042045593,
0.32221677899360657,
0.10516251623630524,
-0.02908356487751007,
0.0021637994796037674,
0.02446852996945381,
-0.24905507266521454,
-0.12868627905845642,
0.4470219016075134,
0.13755685091018677,
0.3648877441883087,
-0.2532251179218292,
-0.05322803556919098,
0.11947168409824371,
0.01550653949379921,
0.2105420082807541,
0.11529179662466049,
0.22952696681022644,
-0.2049037218093872,
-0.03610707074403763,
0.2874407172203064,
0.23688091337680817,
0.23129266500473022,
0.1643664389848709,
0.2992056906223297,
0.2103341966867447,
-0.11745234578847885,
-0.016168657690286636,
-0.053656093776226044,
0.08057833462953568,
-0.08710059523582458,
-0.06464765220880508,
0.032794445753097534,
0.2556426525115967,
-0.136911541223526,
-0.23237670958042145,
-0.29692506790161133,
0.014604716561734676,
-0.29071298241615295,
0.26038476824760437,
-0.3324882388114929,
0.12596791982650757,
-0.1769503802061081,
-0.3836419880390167,
-0.21582302451133728,
-0.2674645781517029,
-0.14599232375621796,
0.4027501046657562,
-0.012803381308913231,
0.15096867084503174,
-0.009044868871569633,
0.11354141682386398,
-0.14175836741924286,
-0.14169223606586456,
-0.27622270584106445,
-0.08208431303501129,
-0.13777080178260803,
-0.10967530310153961,
-0.0012421812862157822,
-0.03341297060251236,
0.0843907967209816,
-0.17805051803588867,
0.09118197113275528,
-0.5710768103599548,
-0.2711453139781952,
0.08049382269382477,
0.09376686811447144,
0.65513676404953,
0.22718682885169983,
0.1709386706352234,
-0.2227085828781128,
-0.04655400291085243,
0.14209164679050446,
-0.12449687719345093,
0.13044539093971252,
-0.07179230451583862,
-0.06554355472326279,
-0.036658331751823425,
-0.14099839329719543,
0.1211286187171936,
-0.2651275098323822,
-0.36268171668052673,
0.5432257056236267,
-0.009477537125349045,
-0.003856852650642395,
0.19361591339111328,
0.04293700307607651,
0.05436918884515762,
-0.26958873867988586,
0.20065659284591675,
-0.25560230016708374,
-0.5706408023834229,
0.24357014894485474,
-0.2543869912624359,
-0.2854950726032257,
-0.12276656925678253,
-0.06225404515862465,
0.17463535070419312,
0.10993262380361557,
-0.4642326235771179,
-0.40663477778434753,
-0.1438031792640686,
0.29672715067863464,
0.0945722758769989,
0.152407705783844,
0.10364175587892532,
-0.06278235465288162,
0.022783027961850166,
-0.27190959453582764,
-0.10296449065208435,
0.13909077644348145,
-0.07473298907279968,
0.10389906913042068,
0.14406101405620575,
0.0687951147556305,
0.27237749099731445,
0.7337577939033508,
0.13901285827159882,
-0.0006988756358623505,
0.4821380376815796,
-0.010979605838656425,
0.9366217851638794,
-0.18777060508728027,
-0.40812942385673523,
0.03857697173953056,
0.044850222766399384,
-0.10174715518951416,
0.031909555196762085,
0.4130084812641144,
0.5453307032585144,
0.02646695077419281,
-0.24223920702934265,
-0.0964745432138443,
-0.3226025402545929,
-0.04718214273452759,
-0.1311277151107788,
-0.029534466564655304,
0.2138773798942566,
-0.08164690434932709,
-0.2844168245792389,
-0.09472640603780746,
0.22182661294937134,
0.6638972163200378,
0.4168873131275177,
0.37545931339263916,
-0.06759078055620193,
0.016143126413226128,
-0.46939146518707275,
-0.03750774264335632,
-0.10018890351057053,
0.2582133412361145,
-0.3431973159313202,
0.34241214394569397,
-0.011684462428092957,
-0.047482311725616455,
0.8683082461357117,
0.036078475415706635,
-0.0796671211719513,
-0.18511183559894562,
-0.08862332999706268,
-0.5960775017738342,
0.2558973729610443,
0.3986707925796509,
0.2506359815597534,
-0.09366047382354736,
0.2579890191555023,
-0.2094654142856598,
0.11986072361469269,
-0.3275502324104309,
0.44818437099456787,
-0.15960635244846344,
-0.4147845506668091,
-0.20229265093803406,
-0.1817677915096283,
-0.14165979623794556,
-0.06638380140066147,
0.053370773792266846,
-0.2116619497537613,
0.1251360923051834,
-0.051673524081707,
-0.12014810740947723,
-0.14788712561130524,
-0.10416263341903687,
0.05629119649529457,
0.3837226629257202,
-0.2996189296245575,
0.10673061013221741,
0.47217652201652527,
0.02805153653025627,
0.2913132309913635,
0.41955047845840454,
-0.4063628613948822,
0.18415316939353943,
-0.08609839528799057,
-0.07082993537187576,
-0.04418525844812393,
0.3870360255241394,
-0.20206008851528168,
0.020437225699424744,
0.19053436815738678,
0.04196583107113838,
-0.1946975588798523,
0.1462811529636383,
-0.18467991054058075,
0.08490145951509476,
0.12623129785060883,
-0.23966269195079803,
0.604035496711731,
0.189158633351326,
-0.19180768728256226,
0.5161539316177368,
0.8119545578956604,
-0.504741907119751,
0.28596991300582886,
-0.07602234929800034,
0.9197479486465454,
-0.1510445475578308,
0.3104453682899475,
0.28399384021759033,
-0.2740994691848755,
0.7018769979476929,
-0.11139483004808426,
0.0594940111041069,
-0.19974097609519958,
-0.28603219985961914,
-0.07569470256567001,
-0.17306406795978546,
0.006083972752094269,
-0.0652584508061409,
0.0499698705971241,
0.3687542974948883,
-0.18475192785263062,
0.23198944330215454,
-0.011965274810791016,
-0.16216284036636353,
-0.11871080845594406,
-0.3114762604236603,
-0.28290891647338867,
0.13622713088989258,
-0.0028166882693767548,
0.2765902280807495,
-0.2000979781150818,
-0.15872032940387726,
-0.0982261598110199,
0.09095911681652069,
-0.2183065414428711,
-0.020701419562101364,
-0.2653294503688812,
0.14125341176986694,
0.17353172600269318,
-0.30472519993782043,
-0.1182427853345871,
0.1833631545305252,
0.5929130911827087,
0.10014079511165619,
-0.32638019323349,
0.07029078900814056,
-0.0344817116856575,
-0.07682691514492035,
-0.23893973231315613,
-0.06674415618181229,
0.02447664551436901,
0.06110479682683945,
0.11498210579156876,
-0.3019806444644928,
-0.29764997959136963,
-0.333814799785614,
0.2623833417892456,
-0.04498402029275894,
0.07201378047466278,
0.09592209756374359,
-0.25686320662498474,
-0.018021374940872192,
0.09068773686885834,
-0.26833048462867737,
0.06572533398866653,
0.11151134967803955,
-0.03301161155104637,
0.04921010881662369,
-0.0683756172657013,
0.026656977832317352,
0.002737985923886299,
0.5716647505760193,
-0.3734700381755829,
-0.22028903663158417,
0.30303195118904114,
-0.05804393067955971,
-0.34628725051879883,
0.03438977897167206,
-0.05011483654379845,
0.3241041600704193,
-0.37928786873817444,
0.002728044055402279,
-0.14787417650222778,
0.19534267485141754,
-0.24137869477272034,
-0.2908650040626526,
0.49804115295410156,
-0.12450145930051804,
-0.015207115560770035,
-0.4220339059829712,
-0.3395216166973114,
0.19222576916217804,
-0.4390421211719513,
0.12089473009109497,
0.06651151180267334,
-0.2455795556306839,
0.12338387966156006,
-0.09848925471305847,
-0.25362154841423035,
0.12350021302700043,
-0.2951476275920868,
-0.21079988777637482,
0.27535131573677063,
0.028216037899255753,
0.209401935338974,
-0.19183529913425446,
0.037566639482975006,
0.28595614433288574,
-0.1971658617258072,
-0.07911527156829834,
-0.37210771441459656,
0.15043295919895172,
0.14631110429763794,
-0.12913720309734344,
0.0354267954826355,
-0.025665560737252235,
0.12566091120243073,
-0.2055257111787796,
0.22886759042739868,
0.6170892715454102,
0.04617041349411011,
-0.1225418820977211,
-0.13927435874938965,
0.1115410178899765,
-0.41468745470046997,
0.06758877635002136,
-0.0007719695568084717,
0.10403032600879669,
0.14375635981559753,
0.11977136880159378,
-0.29228806495666504,
-0.1247737854719162,
-0.05850013718008995,
0.00949764996767044,
-0.12812882661819458,
-0.035961732268333435,
0.24648740887641907,
-0.147074893116951,
-0.0369081050157547,
0.2516249418258667,
0.4155668020248413,
-0.28890982270240784,
-0.23198522627353668,
-0.08478455990552902,
0.36070382595062256,
0.036925315856933594,
-0.01560466829687357,
0.10472026467323303,
0.01847970485687256,
0.016375485807657242,
0.23764657974243164,
0.19080516695976257,
0.5279804468154907,
-0.3511580526828766,
0.21308904886245728,
-0.006698538549244404,
0.4984872043132782,
-0.2880719304084778,
0.0009865860920399427,
0.07860659062862396,
-0.10982219129800797,
0.27880966663360596,
0.2556082606315613,
0.2577609717845917,
0.23109234869480133,
0.5544416904449463,
-0.27173513174057007,
0.20109353959560394,
-0.09082349389791489,
-0.14580506086349487,
0.09483230113983154,
-0.5044077038764954,
-0.09967829287052155,
-0.07717695832252502,
0.20683255791664124,
0.059413742274045944,
-0.48474228382110596,
0.1682237684726715,
-0.5364553928375244,
0.0644388496875763,
0.11186600476503372,
0.009917156770825386,
-0.14038345217704773,
-0.16560298204421997,
0.16010423004627228,
-0.16977667808532715,
0.13480263948440552,
-0.1779550015926361,
-0.007147453725337982,
-0.34984439611434937,
0.18008407950401306,
-0.041863009333610535,
0.1818760335445404,
-0.2779124975204468,
-0.2406771183013916,
0.27037572860717773,
-0.02775011956691742,
0.027359332889318466,
0.3459260165691376,
0.39409273862838745,
-0.1444036215543747,
0.03348196670413017,
-0.029019178822636604,
0.39635246992111206,
0.14636072516441345,
0.12519174814224243,
0.046334847807884216,
0.027177205309271812,
-0.005872657522559166,
0.043790511786937714,
0.11650387197732925,
-0.1290602684020996,
-0.14947785437107086,
0.242033913731575,
0.128623366355896,
-0.11412223428487778,
0.44881895184516907,
-0.14814218878746033,
0.5008344650268555,
-0.20005153119564056,
0.018767930567264557,
-0.07307001203298569,
-0.07799527049064636,
0.03305315226316452,
-0.018523983657360077,
-0.26594436168670654,
0.11626973748207092,
0.35636675357818604,
-0.25154781341552734,
0.04231507331132889,
0.08110548555850983,
0.027385514229536057,
0.2645103335380554,
0.30600908398628235,
0.4468252658843994,
0.2518390417098999,
-0.3568882346153259,
0.03427116572856903,
-0.49270159006118774,
0.012310236692428589,
-0.11990651488304138,
0.05987384915351868,
-0.06703709810972214,
-0.13744129240512848,
-0.1932927668094635,
0.007396811619400978,
0.24339385330677032,
0.12386076152324677,
0.03209007903933525,
-0.35967472195625305,
-0.18097634613513947,
0.028354976326227188,
0.16418594121932983,
-0.0768715962767601,
-0.02891058661043644,
-0.24833646416664124,
0.0849890410900116,
0.03616832569241524,
0.007632609456777573,
0.03211463987827301,
0.2662055194377899,
-0.18242017924785614,
0.08288847655057907,
0.11967070400714874,
0.20869655907154083,
-0.15128818154335022,
0.01987965777516365,
-0.2620493471622467,
-0.36752447485923767,
-0.20616748929023743,
-0.0737486407160759,
-0.14428472518920898,
-0.157899871468544,
0.47591111063957214,
-0.4080921411514282,
-0.6267051696777344,
-0.4809199273586273,
0.04015972837805748,
0.22214455902576447,
0.05578237771987915,
-0.06288178265094757,
0.2799888551235199,
-0.2006290853023529,
0.23362569510936737,
0.45836350321769714,
0.18360468745231628,
-0.027032986283302307,
0.38423165678977966,
-0.16184866428375244,
-0.2318422794342041,
0.6239172220230103,
-0.5126680731773376,
-0.22504669427871704,
0.1202155351638794,
0.36308297514915466,
0.1569705605506897,
-0.252921462059021,
-0.5197620987892151,
0.026029713451862335,
0.2599583566188812,
0.07038980722427368,
-0.050734519958496094,
-0.1728818416595459,
-0.34028947353363037,
0.12171612679958344,
0.015343140810728073,
0.19718164205551147,
0.10879898071289062,
-0.11730881780385971,
0.1427249312400818,
-0.27007895708084106
] |
https://github.com/huggingface/datasets/issues/6358
|
Mounting datasets cache fails due to absolute paths.
|
I'm unable to reproduce this with the cache
```bash
export HF_CACHE=$PWD/hf_cache
python -c "import datasets; datasets.load_dataset('imdb')"
```
imported inside a dummy container that is built from
```bash
FROM python:3.9
WORKDIR /usr/src/app
RUN pip install datasets
COPY ./hf_cache ./hf_cache
ENV HF_HOME=./hf_cache
ENV HF_DATASETS_OFFLINE=1
CMD ["python"]
```
What do you mean by "absolute paths written into the cache"? Paths inside the HF cache paths are based on hash (hashed URL of the downloaded files, etc.)
|
### Describe the bug
Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache.
### Steps to reproduce the bug
1. Create a datasets cache by downloading some data
2. Mount the dataset folder into a docker container or remote system.
3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache.
4. Attempt to access the data from within the docker container.
5. An error is thrown saying no file exists at \<absolute path to original cache location\>
### Expected behavior
The data is loaded without error
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
| 73
|
Mounting datasets cache fails due to absolute paths.
### Describe the bug
Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache.
### Steps to reproduce the bug
1. Create a datasets cache by downloading some data
2. Mount the dataset folder into a docker container or remote system.
3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache.
4. Attempt to access the data from within the docker container.
5. An error is thrown saying no file exists at \<absolute path to original cache location\>
### Expected behavior
The data is loaded without error
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
I'm unable to reproduce this with the cache
```bash
export HF_CACHE=$PWD/hf_cache
python -c "import datasets; datasets.load_dataset('imdb')"
```
imported inside a dummy container that is built from
```bash
FROM python:3.9
WORKDIR /usr/src/app
RUN pip install datasets
COPY ./hf_cache ./hf_cache
ENV HF_HOME=./hf_cache
ENV HF_DATASETS_OFFLINE=1
CMD ["python"]
```
What do you mean by "absolute paths written into the cache"? Paths inside the HF cache paths are based on hash (hashed URL of the downloaded files, etc.)
|
[
0.013612482696771622,
0.2874358296394348,
0.03356706723570824,
0.1214243620634079,
0.17181260883808136,
0.09251292794942856,
0.31584393978118896,
0.2463112771511078,
0.07502943277359009,
0.01845831423997879,
0.024602744728326797,
0.11198750883340836,
-0.14733338356018066,
-0.6419855952262878,
0.13109835982322693,
0.01410001516342163,
0.13350921869277954,
0.06422436237335205,
-0.24872052669525146,
-0.14073020219802856,
-0.07715530693531036,
0.0948316752910614,
0.07851257920265198,
0.07559207081794739,
-0.22124424576759338,
0.04882272332906723,
-0.0881006121635437,
0.26055023074150085,
0.13072828948497772,
-0.405994713306427,
0.4520382881164551,
0.09058751910924911,
0.1180056482553482,
0.8036792874336243,
-0.00012296682689338923,
0.15374863147735596,
0.3032827377319336,
0.006710624322295189,
-0.3999975025653839,
-0.42056185007095337,
-0.5888276696205139,
-0.07353106886148453,
0.020124781876802444,
-0.28147217631340027,
-0.03662153333425522,
0.15605278313159943,
-0.06163854897022247,
-0.499426007270813,
0.4625132083892822,
0.211382195353508,
0.1113525927066803,
0.06044326722621918,
-0.25046828389167786,
0.014194660820066929,
0.426148384809494,
0.048728276044130325,
-0.209085151553154,
0.3885602056980133,
-0.01958201825618744,
0.04171247035264969,
0.066160649061203,
0.12229064106941223,
-0.2032546103000641,
0.15780071914196014,
0.2693139314651489,
-0.024071481078863144,
-0.5108451843261719,
0.0029894374310970306,
0.06430172920227051,
0.41795074939727783,
0.6023048162460327,
-0.47325876355171204,
-0.6145088076591492,
-0.27771133184432983,
-0.21287967264652252,
-0.13202981650829315,
0.37619760632514954,
0.04093405604362488,
0.02306223288178444,
0.24840913712978363,
-0.14542405307292938,
-0.1317674070596695,
-0.32444268465042114,
0.07582955062389374,
-0.07969918102025986,
-0.02965901792049408,
-0.125552698969841,
0.15581312775611877,
-0.19162246584892273,
0.2027047574520111,
0.4021950960159302,
-0.26402395963668823,
0.17696525156497955,
0.17168863117694855,
-0.15489183366298676,
0.22987347841262817,
-0.022485002875328064,
0.16647088527679443,
0.22831523418426514,
-0.0651361346244812,
0.07550089806318283,
0.019784878939390182,
-0.3091577887535095,
0.2961537539958954,
-0.02190190553665161,
0.4123043417930603,
-0.1522974967956543,
0.06894955784082413,
0.33022016286849976,
0.08118634670972824,
-0.23691700398921967,
-0.2283424437046051,
-0.09369968622922897,
-0.12311799079179764,
0.08835707604885101,
0.1041114553809166,
0.07403481006622314,
-0.37422069907188416,
-0.15180283784866333,
0.13462390005588531,
0.1625862419605255,
0.2862922251224518,
0.18269914388656616,
0.3109830319881439,
-0.05079849436879158,
0.026819199323654175,
0.03993961960077286,
0.19902393221855164,
0.033325716853141785,
0.20338216423988342,
-0.09757428616285324,
0.09658606350421906,
-0.25272950530052185,
0.22552843391895294,
0.17134179174900055,
0.06708201766014099,
0.20633693039417267,
0.12713034451007843,
0.1577560156583786,
-0.039409786462783813,
-0.05017891526222229,
-0.20259952545166016,
0.16238944232463837,
0.3564337193965912,
0.07260636985301971,
0.33103951811790466,
0.16608476638793945,
0.10691697895526886,
-0.017143353819847107,
0.18689221143722534,
-0.1594216525554657,
-0.23800088465213776,
0.1681923121213913,
-0.021674957126379013,
-0.2218589037656784,
0.3666774034500122,
-0.27469968795776367,
-0.15421991050243378,
0.06816016882658005,
-0.10090619325637817,
0.16471484303474426,
-0.13520696759223938,
-0.03615216165781021,
-0.1830649971961975,
0.3531641662120819,
0.6793115735054016,
-0.1698618084192276,
0.182317316532135,
-0.014847846701741219,
0.1028660386800766,
-0.08433496206998825,
0.28237009048461914,
0.021878095343708992,
0.0317271389067173,
-0.36064502596855164,
-0.15739037096500397,
0.10847440361976624,
-0.5388996601104736,
-0.5888359546661377,
0.26936909556388855,
0.060530588030815125,
0.3353237807750702,
0.17146413028240204,
-0.10034170746803284,
0.19041012227535248,
-0.04824218153953552,
-0.09062828123569489,
0.27171939611434937,
0.09553536772727966,
-0.22091610729694366,
-0.29279181361198425,
-0.13115045428276062,
-0.1145593672990799,
-0.017505399882793427,
0.43380653858184814,
0.14348642528057098,
0.2646626830101013,
0.12308640033006668,
0.21074900031089783,
-0.07127411663532257,
-0.022602465003728867,
0.5356688499450684,
0.3240877091884613,
0.25065672397613525,
0.08890686184167862,
-0.2127939760684967,
-0.2682799696922302,
0.402403861284256,
-0.06948275864124298,
-0.37212643027305603,
-0.28655773401260376,
-0.21269097924232483,
0.08430270105600357,
0.1740809679031372,
-0.12918515503406525,
0.14683109521865845,
0.04980893433094025,
0.2011248916387558,
0.07643488049507141,
0.14337563514709473,
-0.09508247673511505,
0.6342452168464661,
-0.07297824323177338,
0.09851901233196259,
0.1429983526468277,
0.23005913197994232,
0.05212711542844772,
-0.09267076104879379,
-0.2968006432056427,
0.29285928606987,
0.3807927668094635,
-0.2105693370103836,
-0.16602644324302673,
0.47533324360847473,
0.04430761560797691,
0.13355222344398499,
-0.07511607557535172,
0.3743617534637451,
0.324024498462677,
-0.19182853400707245,
-0.06365873664617538,
-0.12973271310329437,
0.013741410337388515,
0.09092698246240616,
-0.16437721252441406,
0.0400281697511673,
-0.5190695524215698,
0.33336740732192993,
0.0669376477599144,
-0.10732502490282059,
0.04690146446228027,
0.01656113937497139,
-0.14389580488204956,
-0.06997302919626236,
0.37877142429351807,
0.10242359340190887,
0.3077182173728943,
-0.28063273429870605,
0.017390534281730652,
0.1254829317331314,
0.030255693942308426,
0.19172658026218414,
0.20950579643249512,
0.1452682912349701,
-0.19504615664482117,
-0.09128507971763611,
0.25761228799819946,
0.32806849479675293,
0.213234081864357,
0.11139767616987228,
0.3693333566188812,
0.14289957284927368,
-0.16722308099269867,
0.035057492554187775,
-0.055041782557964325,
0.11283993721008301,
-0.026052160188555717,
0.08944559097290039,
0.04760419577360153,
0.3370344042778015,
-0.008596975356340408,
-0.3505778908729553,
-0.23600444197654724,
0.027676623314619064,
-0.2552506923675537,
0.34599801898002625,
-0.3347906172275543,
0.30257582664489746,
-0.09244198352098465,
-0.3398461639881134,
-0.08410817384719849,
-0.3140202462673187,
-0.18658241629600525,
0.4489865303039551,
0.12157723307609558,
0.06118049472570419,
-0.24565190076828003,
0.12213598191738129,
-0.06878048926591873,
-0.09274222701787949,
-0.17358916997909546,
-0.07159726321697235,
-0.16267290711402893,
-0.15081645548343658,
0.007554470561444759,
0.010870939120650291,
0.13849125802516937,
-0.09513351321220398,
0.17947031557559967,
-0.4830433428287506,
-0.29772868752479553,
0.05129740387201309,
0.1947287768125534,
0.6245657801628113,
0.11473356187343597,
0.12604115903377533,
-0.24267879128456116,
-0.015997329726815224,
0.07907141745090485,
0.015233291313052177,
0.24012154340744019,
0.019368983805179596,
-0.16548943519592285,
-0.18275460600852966,
-0.04596995562314987,
0.010518550872802734,
-0.3185483515262604,
-0.30103155970573425,
0.22828547656536102,
0.03254091367125511,
0.07832907140254974,
0.09632617235183716,
0.034851089119911194,
0.10732536017894745,
-0.09268373250961304,
0.1491847187280655,
-0.1622476726770401,
-0.5347024202346802,
0.3142837882041931,
-0.2925451397895813,
-0.24479131400585175,
-0.008244819939136505,
-0.03157214820384979,
0.09720052778720856,
0.31797462701797485,
-0.5880427360534668,
-0.1897851973772049,
-0.09005532413721085,
0.285087525844574,
0.020118393003940582,
0.01910896599292755,
0.05211108177900314,
-0.07593513280153275,
0.09887880086898804,
-0.47931215167045593,
-0.06614688038825989,
0.03657213971018791,
-0.06757587939500809,
0.2030315399169922,
0.1943034529685974,
0.17183560132980347,
0.3158487379550934,
0.7245540618896484,
0.11357845366001129,
0.050957683473825455,
0.46469658613204956,
0.044558532536029816,
0.902446985244751,
-0.10047353059053421,
-0.31067904829978943,
-0.03490731865167618,
0.06628112494945526,
-0.24880068004131317,
-0.03524404764175415,
0.3477852940559387,
0.3443833887577057,
0.07112029939889908,
-0.19744722545146942,
-0.11662612110376358,
-0.21495145559310913,
0.004808858036994934,
-0.4304506182670593,
0.0642673596739769,
0.24167242646217346,
-0.01733456552028656,
-0.2973043918609619,
-0.08061107248067856,
0.15726613998413086,
0.5834910869598389,
0.4531531035900116,
0.31255900859832764,
0.05765121057629585,
-0.020418236032128334,
-0.24238324165344238,
-0.13062134385108948,
-0.05782096087932587,
0.5210354328155518,
-0.40020328760147095,
0.49290212988853455,
-0.06173974275588989,
-0.056227460503578186,
0.8370711207389832,
-0.2455703169107437,
0.020952552556991577,
-0.053630586713552475,
0.013632792979478836,
-0.48666778206825256,
0.13008412718772888,
0.31130078434944153,
0.34874406456947327,
-0.15571607649326324,
0.1153566837310791,
-0.030293144285678864,
0.24849840998649597,
-0.3699922561645508,
0.3945261240005493,
-0.15210483968257904,
-0.4483693540096283,
-0.09546263515949249,
-0.06566751003265381,
-0.0018767081201076508,
-0.07875476032495499,
-0.0014591515064239502,
-0.3152320683002472,
0.09355970472097397,
-0.16637864708900452,
-0.19949349761009216,
-0.014498627744615078,
-0.08692173659801483,
0.1054888367652893,
0.3299066126346588,
-0.4002739191055298,
0.1329726278781891,
0.39778223633766174,
-0.09261515736579895,
0.3891129493713379,
0.34389933943748474,
-0.3876868784427643,
0.22965067625045776,
-0.08896689862012863,
-0.2560625970363617,
-0.11098868399858475,
0.28326988220214844,
-0.21267879009246826,
-0.10081664472818375,
0.11640079319477081,
-0.08823101222515106,
-0.03136304020881653,
0.0677894726395607,
-0.16667591035366058,
0.03400975093245506,
0.03546484559774399,
-0.34133201837539673,
0.5803905725479126,
0.18728385865688324,
-0.2390914410352707,
0.48009082674980164,
0.5708157420158386,
-0.5989266633987427,
0.44917207956314087,
-0.011906273663043976,
0.8282451629638672,
-0.1858193725347519,
0.15596389770507812,
0.14555713534355164,
-0.2544560432434082,
0.5081919431686401,
-0.2600916028022766,
-0.016523919999599457,
-0.23420165479183197,
-0.43419501185417175,
-0.170753613114357,
-0.3071722388267517,
0.09510602056980133,
0.050784237682819366,
-0.09151583164930344,
0.3228018879890442,
-0.34128522872924805,
0.222738116979599,
0.04038168489933014,
-0.2811620831489563,
-0.04073018580675125,
-0.20625294744968414,
-0.0578475147485733,
0.14644578099250793,
0.0039152465760707855,
0.12009908258914948,
-0.19810527563095093,
-0.09042177349328995,
-0.19173167645931244,
0.09049923717975616,
-0.2923494279384613,
0.06843806058168411,
-0.2689425051212311,
0.19998301565647125,
0.1059466302394867,
-0.3138633370399475,
-0.047243475914001465,
0.008565492928028107,
0.5459793210029602,
0.07868265360593796,
-0.2730490565299988,
0.033381879329681396,
0.1207880824804306,
-0.0784020870923996,
-0.06586606800556183,
-0.03082340583205223,
0.0780424028635025,
0.06649186462163925,
0.06679052859544754,
-0.23515909910202026,
-0.36983320116996765,
-0.3998779058456421,
0.3913770914077759,
-0.09425382316112518,
0.31769251823425293,
0.19062218070030212,
-0.38605573773384094,
-0.052928805351257324,
0.010330263525247574,
-0.2534227967262268,
0.04562550038099289,
0.06260834634304047,
-0.03295287862420082,
0.23182791471481323,
-0.04309428855776787,
-0.014430597424507141,
0.12550832331180573,
0.4816959798336029,
-0.2184411585330963,
-0.20661455392837524,
0.23367300629615784,
-0.042001351714134216,
-0.38628125190734863,
0.009014368057250977,
-0.03259860351681709,
0.2257092446088791,
-0.2232288420200348,
-0.07889736443758011,
-0.4038107097148895,
0.24315901100635529,
-0.17274287343025208,
-0.4941891133785248,
0.4939199686050415,
-0.05026935786008835,
-0.19996927678585052,
-0.6313786506652832,
-0.2339046746492386,
0.09491203725337982,
-0.40821394324302673,
0.09306379407644272,
-0.0439482107758522,
-0.43652206659317017,
0.0983067974448204,
-0.13728323578834534,
-0.1870386302471161,
0.07691094279289246,
-0.27451494336128235,
-0.08210227638483047,
0.19897498190402985,
0.1428457498550415,
0.042265478521585464,
-0.24976862967014313,
-0.0006223898380994797,
0.21587082743644714,
-0.11838772892951965,
-0.05478069931268692,
-0.3554181754589081,
0.1972687691450119,
0.20908886194229126,
-0.11028514802455902,
-0.03614846244454384,
-0.21133166551589966,
0.005971170961856842,
-0.17597968876361847,
0.2016831636428833,
0.510973334312439,
-0.036180756986141205,
-0.09748659282922745,
-0.09249690175056458,
0.1037902683019638,
-0.5220096111297607,
0.11622526496648788,
0.004978962242603302,
0.1772293746471405,
0.10940589010715485,
0.20623281598091125,
-0.15181373059749603,
-0.0742151141166687,
-0.2337280958890915,
-0.014151066541671753,
-0.24732010066509247,
0.0022558532655239105,
0.4203559160232544,
-0.2855002284049988,
0.2800920903682709,
0.4295434057712555,
0.30391955375671387,
-0.2894033193588257,
-0.2925751805305481,
-0.09702307730913162,
0.28634947538375854,
0.03304300829768181,
0.020636625587940216,
-0.03537062928080559,
-0.026512421667575836,
0.059202585369348526,
0.12589046359062195,
0.13602212071418762,
0.5941237807273865,
-0.40258464217185974,
0.1401321142911911,
-0.012039466761052608,
0.6110978722572327,
-0.44534730911254883,
0.021139992401003838,
0.15545424818992615,
-0.11779457330703735,
0.3252756595611572,
0.14452117681503296,
0.18787144124507904,
0.08978717029094696,
0.7990317344665527,
-0.11997754126787186,
0.20794589817523956,
0.2737906277179718,
-0.2875351309776306,
0.028758615255355835,
-0.47275346517562866,
-0.011815331876277924,
-0.030662506818771362,
0.26375269889831543,
0.08427923172712326,
-0.4435098171234131,
-0.18483462929725647,
-0.4356045126914978,
0.12883108854293823,
0.18971820175647736,
-0.16380108892917633,
-0.14974787831306458,
-0.023832745850086212,
0.2339644432067871,
-0.12990576028823853,
0.08080267906188965,
-0.27791404724121094,
-0.018219325691461563,
-0.16989432275295258,
0.0877583771944046,
0.1081804484128952,
0.13353487849235535,
-0.20055994391441345,
-0.051886893808841705,
0.27946531772613525,
-0.021344728767871857,
-0.10728559643030167,
0.3039155602455139,
0.26183581352233887,
0.010524284094572067,
0.036859653890132904,
-0.15240687131881714,
0.43037930130958557,
0.3068280518054962,
0.008578679524362087,
-0.031205441802740097,
0.030319925397634506,
-0.08792558312416077,
0.05435557663440704,
0.16618578135967255,
-0.1879459023475647,
-0.13017863035202026,
0.16385671496391296,
0.09668395668268204,
-0.06278802454471588,
0.5051052570343018,
-0.014833953231573105,
0.395390123128891,
-0.1871558129787445,
0.04940187186002731,
-0.005550414323806763,
-0.1474056839942932,
0.09023664891719818,
-0.018836818635463715,
-0.1891079843044281,
-0.031225979328155518,
0.6077622771263123,
-0.29007577896118164,
0.07172417640686035,
0.1395401656627655,
0.009301584213972092,
0.1258961707353592,
0.22052372992038727,
0.4641689956188202,
0.27188968658447266,
-0.3837028741836548,
0.15548376739025116,
-0.5039096474647522,
0.023369766771793365,
-0.24231433868408203,
-0.04772242531180382,
0.09400424361228943,
-0.062254391610622406,
-0.24603840708732605,
0.010791100561618805,
0.3304574489593506,
0.13813021779060364,
0.06048120558261871,
-0.26930680871009827,
-0.20973658561706543,
-0.08191725611686707,
0.18348872661590576,
-0.07194574177265167,
-0.1771944910287857,
-0.42499208450317383,
0.10453636944293976,
0.03320794552564621,
-0.00902673602104187,
0.04060586541891098,
0.03711257874965668,
-0.01776454783976078,
0.1666342318058014,
0.20682017505168915,
0.131576806306839,
0.1475943624973297,
0.054521963000297546,
-0.20427754521369934,
-0.3640502691268921,
-0.23963718116283417,
-0.016625901684165,
-0.11467648297548294,
-0.1753738969564438,
0.4394862949848175,
-0.3911333680152893,
-0.6060815453529358,
-0.3722563087940216,
-0.021909400820732117,
0.0545976459980011,
0.010652080178260803,
-0.07333705574274063,
0.23406629264354706,
-0.29849568009376526,
0.3112172484397888,
0.4318598806858063,
-0.008366640657186508,
0.043432511389255524,
0.42126452922821045,
-0.11824225634336472,
-0.16780534386634827,
0.4875297546386719,
-0.4403071701526642,
-0.3111035227775574,
-0.03620157390832901,
0.3710158169269562,
-0.04801080375909805,
-0.14479468762874603,
-0.4625261127948761,
-0.041113417595624924,
0.38132598996162415,
-0.059385210275650024,
-0.11096300184726715,
-0.20395654439926147,
-0.16415207087993622,
0.2759942412376404,
0.02913752570748329,
0.13403156399726868,
-0.07916092872619629,
-0.08884669095277786,
0.015867918729782104,
-0.25226032733917236
] |
https://github.com/huggingface/datasets/issues/6358
|
Mounting datasets cache fails due to absolute paths.
|
@mariosasko Same problem: the absolute paths written into the cache still have the old cache directory. Like:
{'bytes': None, 'path': 'E:\\work-20240321\\datasets\\downloads\\extracted\\9752883596854dc57e01c74cc3f494b2ba63754dadd9e77f9d1932deddbd2273\\58f33a03-026f-4adc-b69f-b89d16b9f35a.webp'}
When I move this cached directory to another directory, these datasets cannot be used casue path changes. So, the paths written into the cache should be relative to the cache location to allow this sort of flexibility.
|
### Describe the bug
Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache.
### Steps to reproduce the bug
1. Create a datasets cache by downloading some data
2. Mount the dataset folder into a docker container or remote system.
3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache.
4. Attempt to access the data from within the docker container.
5. An error is thrown saying no file exists at \<absolute path to original cache location\>
### Expected behavior
The data is loaded without error
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
| 58
|
Mounting datasets cache fails due to absolute paths.
### Describe the bug
Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache.
### Steps to reproduce the bug
1. Create a datasets cache by downloading some data
2. Mount the dataset folder into a docker container or remote system.
3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache.
4. Attempt to access the data from within the docker container.
5. An error is thrown saying no file exists at \<absolute path to original cache location\>
### Expected behavior
The data is loaded without error
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
@mariosasko Same problem: the absolute paths written into the cache still have the old cache directory. Like:
{'bytes': None, 'path': 'E:\\work-20240321\\datasets\\downloads\\extracted\\9752883596854dc57e01c74cc3f494b2ba63754dadd9e77f9d1932deddbd2273\\58f33a03-026f-4adc-b69f-b89d16b9f35a.webp'}
When I move this cached directory to another directory, these datasets cannot be used casue path changes. So, the paths written into the cache should be relative to the cache location to allow this sort of flexibility.
|
[
0.011259403079748154,
0.37163111567497253,
0.024076316505670547,
0.03639822453260422,
0.23385226726531982,
0.05079390108585358,
0.23201219737529755,
0.22075273096561432,
-0.07462278008460999,
-0.022126778960227966,
-0.0031440728344023228,
0.18851961195468903,
-0.21793341636657715,
-0.7169725298881531,
0.13850614428520203,
0.010229598730802536,
0.08531118929386139,
0.0448819100856781,
-0.29470035433769226,
-0.08974198997020721,
-0.13070283830165863,
0.09409953653812408,
0.10300342738628387,
0.10795876383781433,
-0.1903451532125473,
-0.006244095042347908,
-0.17841583490371704,
0.23186850547790527,
0.2177230566740036,
-0.43329665064811707,
0.4397452175617218,
0.07245822250843048,
0.18657541275024414,
0.7830773591995239,
-0.00011893695045728236,
0.24388571083545685,
0.28120267391204834,
0.06544994562864304,
-0.4518734812736511,
-0.3442193269729614,
-0.6004531383514404,
-0.11737747490406036,
-0.021077312529087067,
-0.2790725827217102,
-0.006369093433022499,
0.12141786515712738,
-0.0037698987871408463,
-0.49758660793304443,
0.5495679974555969,
0.24492037296295166,
0.15079855918884277,
0.06567785143852234,
-0.2549055516719818,
0.03721483424305916,
0.305584579706192,
0.03416148200631142,
-0.1956375539302826,
0.41534048318862915,
-0.06282275915145874,
0.10039073973894119,
0.048409704118967056,
0.12263517081737518,
-0.20159202814102173,
0.07197916507720947,
0.13779063522815704,
-0.05177675187587738,
-0.46463286876678467,
0.055317968130111694,
0.13854414224624634,
0.40346020460128784,
0.6306532025337219,
-0.42784446477890015,
-0.5631752610206604,
-0.32591354846954346,
-0.1792716085910797,
-0.10629262030124664,
0.34148111939430237,
0.008480435237288475,
0.0882447361946106,
0.2724785804748535,
-0.18150123953819275,
-0.1725902408361435,
-0.301982581615448,
0.08853435516357422,
-0.10901238024234772,
-0.06530211865901947,
-0.140316903591156,
0.1363045573234558,
-0.1481824815273285,
0.23795689642429352,
0.3943828046321869,
-0.19769851863384247,
0.15818719565868378,
0.13977742195129395,
-0.14819516241550446,
0.2556728720664978,
-0.04553923010826111,
0.25257107615470886,
0.14427495002746582,
0.018725834786891937,
0.23505373299121857,
0.004146477207541466,
-0.3673281967639923,
0.168916717171669,
-0.06456725299358368,
0.4735775887966156,
-0.15838348865509033,
0.0851544439792633,
0.3722207546234131,
0.10030517727136612,
-0.15744827687740326,
-0.2350478172302246,
-0.0972069501876831,
-0.24469168484210968,
0.0028274692595005035,
0.11754347383975983,
0.10150673985481262,
-0.2578985095024109,
-0.08569036424160004,
0.08196137100458145,
0.22693461179733276,
0.30997782945632935,
0.1903538852930069,
0.273380309343338,
0.060652051120996475,
0.028867250308394432,
0.012882255017757416,
0.19223695993423462,
0.14944399893283844,
0.2725498378276825,
-0.14859215915203094,
0.04108884185552597,
-0.30953148007392883,
0.23658449947834015,
0.14877457916736603,
0.0538383349776268,
0.2219088226556778,
0.018738940358161926,
0.08723943680524826,
0.08569246530532837,
-0.19068168103694916,
-0.07326050102710724,
0.12354762852191925,
0.35038453340530396,
-0.10188665986061096,
0.38094890117645264,
0.08924858272075653,
0.1913861334323883,
-0.014635324478149414,
0.19021505117416382,
-0.18481791019439697,
-0.26032188534736633,
0.23836219310760498,
0.009661891497671604,
-0.22340920567512512,
0.337045818567276,
-0.23567333817481995,
-0.13857907056808472,
0.04116649925708771,
-0.10479189455509186,
0.1610642969608307,
-0.14776156842708588,
-0.013565700501203537,
-0.19259704649448395,
0.31414973735809326,
0.6272234320640564,
-0.11490055918693542,
0.23383429646492004,
-0.05215858295559883,
0.09686966240406036,
-0.0949830487370491,
0.31780683994293213,
0.012923954986035824,
-0.043941155076026917,
-0.38452139496803284,
-0.18541456758975983,
0.16669657826423645,
-0.46446725726127625,
-0.5901139378547668,
0.2198472023010254,
0.0023213326930999756,
0.2572769820690155,
0.12913496792316437,
-0.16282127797603607,
0.06724438816308975,
-0.06990818679332733,
-0.14967313408851624,
0.291301965713501,
0.1829400509595871,
-0.14233669638633728,
-0.3021688759326935,
-0.1629343330860138,
-0.07784383744001389,
-0.08340975642204285,
0.3263985812664032,
0.12182892858982086,
0.29011058807373047,
0.10560280829668045,
0.1744416058063507,
-0.1033007800579071,
0.016081692650914192,
0.5499337911605835,
0.2887704372406006,
0.03352824226021767,
0.045856036245822906,
-0.2085956633090973,
-0.37229713797569275,
0.40353283286094666,
-0.11090941727161407,
-0.3578604459762573,
-0.22533999383449554,
-0.14261548221111298,
0.015516838058829308,
0.07811789214611053,
-0.11298386752605438,
0.07211874425411224,
0.08211551606655121,
0.21804100275039673,
0.26710712909698486,
0.19535517692565918,
-0.09065596759319305,
0.5076240301132202,
-0.0929165929555893,
0.08636689186096191,
0.1538247913122177,
0.2647051215171814,
0.046986956149339676,
-0.11944575607776642,
-0.361269474029541,
0.3009803891181946,
0.36716434359550476,
-0.24292370676994324,
-0.17161422967910767,
0.4762154817581177,
-0.07954441010951996,
0.2154744565486908,
-0.08649396151304245,
0.34976378083229065,
0.33839067816734314,
-0.17731191217899323,
-0.09446524828672409,
-0.10362917184829712,
-0.04081129655241966,
0.13768723607063293,
-0.21817472577095032,
-0.03400015830993652,
-0.5578411817550659,
0.3592960238456726,
0.11257427930831909,
-0.06725210696458817,
0.12930282950401306,
0.0018802881240844727,
-0.1571534126996994,
-0.08126953989267349,
0.37226158380508423,
0.2382505089044571,
0.3717827796936035,
-0.21650218963623047,
0.038240812718868256,
0.11388303339481354,
-0.028082314878702164,
0.15604433417320251,
0.21639767289161682,
0.2100890576839447,
-0.24514272809028625,
-0.1545112431049347,
0.22356905043125153,
0.43717050552368164,
0.26095569133758545,
0.1443147361278534,
0.442116916179657,
0.12608602643013,
-0.1418784260749817,
-0.07053247094154358,
-0.02700517326593399,
0.05891943722963333,
-0.008285325020551682,
0.08694873750209808,
0.09832634776830673,
0.2837364375591278,
-0.047988805919885635,
-0.27886268496513367,
-0.17056547105312347,
0.04001086205244064,
-0.15777473151683807,
0.2927282452583313,
-0.36617788672447205,
0.25649523735046387,
-0.23076605796813965,
-0.35527145862579346,
-0.0889061689376831,
-0.3418278992176056,
-0.17029881477355957,
0.4067872166633606,
0.05713726207613945,
0.160782128572464,
-0.1267656683921814,
0.09572427719831467,
-0.09381291270256042,
-0.09264855086803436,
-0.2875925302505493,
-0.10177088528871536,
-0.2014715075492859,
-0.09307397902011871,
0.03854905068874359,
-0.05439012125134468,
0.04748380184173584,
-0.10538915544748306,
0.2180652916431427,
-0.5878236293792725,
-0.25118380784988403,
0.00032562389969825745,
0.23378562927246094,
0.5815114378929138,
0.13320305943489075,
0.13337016105651855,
-0.14053648710250854,
0.000014862976968288422,
0.039979998022317886,
-0.03715997189283371,
0.23911359906196594,
-0.021802673116326332,
-0.15992218255996704,
-0.10687186568975449,
-0.06412340700626373,
-0.027820870280265808,
-0.36832258105278015,
-0.29828211665153503,
0.35414355993270874,
-0.012792453169822693,
0.020726103335618973,
0.14665330946445465,
0.02572314441204071,
0.05372651666402817,
-0.11950847506523132,
0.13937793672084808,
-0.17112334072589874,
-0.5195524096488953,
0.3254011273384094,
-0.2254982739686966,
-0.2381710261106491,
-0.14913800358772278,
-0.03779488056898117,
0.17007385194301605,
0.32009851932525635,
-0.5236752033233643,
-0.1713622808456421,
-0.16731595993041992,
0.3028016984462738,
0.09879697859287262,
0.06063111871480942,
0.09995577484369278,
-0.060674216598272324,
0.026021556928753853,
-0.36013898253440857,
-0.05227867513895035,
0.05353133752942085,
0.06907757371664047,
0.18957528471946716,
0.16438934206962585,
0.027531322091817856,
0.3355858027935028,
0.7172841429710388,
0.01311568170785904,
-0.06659981608390808,
0.4464169442653656,
0.04164450615644455,
0.9502501487731934,
-0.13946112990379333,
-0.30524930357933044,
0.04353101924061775,
0.10209103673696518,
-0.258182168006897,
-0.03880833089351654,
0.3711284399032593,
0.2985380291938782,
0.09226715564727783,
-0.1815788447856903,
-0.07809672504663467,
-0.21367494761943817,
-0.0012705866247415543,
-0.334227979183197,
0.034457240253686905,
0.2964521050453186,
-0.07216066867113113,
-0.251671701669693,
-0.09176106750965118,
0.1206146776676178,
0.5685724020004272,
0.3937084376811981,
0.3379004895687103,
-0.05425702780485153,
-0.06824998557567596,
-0.31702831387519836,
-0.07814288139343262,
-0.029466383159160614,
0.45733246207237244,
-0.3180544376373291,
0.4561478793621063,
-0.04586400091648102,
-0.0015754704363644123,
0.7450961470603943,
-0.1887718290090561,
-0.08169090747833252,
-0.03227418288588524,
0.09649959206581116,
-0.4808874726295471,
0.14496061205863953,
0.3787176311016083,
0.3128167390823364,
-0.12086215615272522,
0.12884670495986938,
0.019524432718753815,
0.24163095653057098,
-0.38656288385391235,
0.5023393630981445,
-0.16200308501720428,
-0.36219844222068787,
-0.15400564670562744,
-0.14351829886436462,
-0.08732137829065323,
-0.09234734624624252,
-0.04906918853521347,
-0.31616896390914917,
0.03230568766593933,
-0.1483820676803589,
-0.19346049427986145,
-0.11466789245605469,
-0.20334060490131378,
0.0772637128829956,
0.28440555930137634,
-0.29758498072624207,
0.05790280923247337,
0.4222216308116913,
0.04129066318273544,
0.39305615425109863,
0.29185473918914795,
-0.44301000237464905,
0.24675704538822174,
-0.133196622133255,
-0.19383417069911957,
-0.11365003138780594,
0.2882338762283325,
-0.24367645382881165,
-0.13542374968528748,
0.10353388637304306,
-0.11718517541885376,
-0.015325893647968769,
0.15566623210906982,
-0.17838720977306366,
0.08526773750782013,
0.07046359777450562,
-0.3444136381149292,
0.5296229124069214,
0.17188093066215515,
-0.28555727005004883,
0.447649747133255,
0.49952882528305054,
-0.6247773766517639,
0.29228198528289795,
-0.06397188454866409,
0.7554859519004822,
-0.19026394188404083,
0.22640980780124664,
0.1432730257511139,
-0.2658720910549164,
0.5986379981040955,
-0.1465466171503067,
0.021003620699048042,
-0.18898312747478485,
-0.3376360237598419,
-0.13255174458026886,
-0.2668686807155609,
0.07641071081161499,
0.05415372550487518,
-0.048229485750198364,
0.36973777413368225,
-0.21774519979953766,
0.2637060284614563,
0.07981156557798386,
-0.2416820228099823,
0.04626910760998726,
-0.17986026406288147,
-0.09084944427013397,
0.1557350903749466,
-0.06901465356349945,
0.07797616720199585,
-0.1865440309047699,
-0.08789040148258209,
-0.10305911302566528,
0.17587034404277802,
-0.21053873002529144,
0.04255625605583191,
-0.2889946699142456,
0.2611802816390991,
0.007436942309141159,
-0.363103449344635,
-0.11212660372257233,
0.17244908213615417,
0.564265787601471,
0.0508560948073864,
-0.30658698081970215,
0.09396433085203171,
0.039164140820503235,
-0.06300561875104904,
-0.11190930753946304,
-0.06613143533468246,
-0.019078629091382027,
0.14355874061584473,
0.12498284131288528,
-0.25171124935150146,
-0.36715227365493774,
-0.4076001048088074,
0.32153093814849854,
-0.10062474012374878,
0.33495885133743286,
0.216293066740036,
-0.3257106840610504,
-0.01748187094926834,
-0.020653530955314636,
-0.28244417905807495,
0.07733643054962158,
0.05070053040981293,
0.09341394901275635,
0.2343805730342865,
-0.1258649379014969,
-0.014427624642848969,
0.097068652510643,
0.46652087569236755,
-0.24040520191192627,
-0.2482529878616333,
0.2672297954559326,
-0.18106785416603088,
-0.32576918601989746,
-0.0007342882454395294,
0.05538460612297058,
0.15988357365131378,
-0.2366650104522705,
-0.01449048426002264,
-0.29045653343200684,
0.22791944444179535,
-0.1947173774242401,
-0.4931683838367462,
0.47588050365448,
-0.06240319460630417,
-0.21011462807655334,
-0.49844667315483093,
-0.3150899112224579,
0.08159565925598145,
-0.3792528212070465,
0.141489177942276,
-0.01783345267176628,
-0.4265323579311371,
0.1429038792848587,
-0.21571297943592072,
-0.21683081984519958,
0.16442549228668213,
-0.2339058369398117,
-0.12395304441452026,
0.2271113097667694,
0.09103742241859436,
0.043816134333610535,
-0.2141272872686386,
0.017182422801852226,
0.20861367881298065,
-0.09542950242757797,
-0.07738951593637466,
-0.2960496246814728,
0.14387810230255127,
0.2228788137435913,
-0.10941441357135773,
-0.04255417734384537,
-0.26583874225616455,
0.09586246311664581,
-0.19861729443073273,
0.1129719614982605,
0.48588019609451294,
-0.043787769973278046,
-0.09003816545009613,
-0.18368478119373322,
0.09267155826091766,
-0.4311894178390503,
0.15354596078395844,
-0.17849358916282654,
0.08415135741233826,
0.09406693279743195,
0.25961384177207947,
-0.1108875647187233,
-0.10819180309772491,
-0.23507845401763916,
-0.0543302521109581,
-0.22882790863513947,
0.055692121386528015,
0.34419944882392883,
-0.23616020381450653,
0.11034785211086273,
0.40325313806533813,
0.2630845010280609,
-0.27635809779167175,
-0.2525172829627991,
-0.1472470760345459,
0.3531380295753479,
0.04255014657974243,
-0.020432688295841217,
-0.015894340351223946,
0.024062789976596832,
0.057889509946107864,
0.19588603079319,
0.0716618075966835,
0.6113120317459106,
-0.47924235463142395,
0.16688930988311768,
-0.0011934749782085419,
0.5753561854362488,
-0.4545656442642212,
0.035242266952991486,
0.23847541213035583,
-0.010998323559761047,
0.2857135534286499,
0.18893465399742126,
0.19105376303195953,
0.09475357830524445,
0.7628641724586487,
-0.26411500573158264,
0.30784398317337036,
0.26348891854286194,
-0.27654337882995605,
0.08722566068172455,
-0.4476054012775421,
-0.044447194784879684,
-0.08135250210762024,
0.1764441877603531,
0.06317895650863647,
-0.3998289406299591,
-0.08724062889814377,
-0.4784206748008728,
0.17114946246147156,
0.18434812128543854,
-0.10615149140357971,
-0.17307940125465393,
-0.1164417564868927,
0.13411591947078705,
-0.1388576328754425,
0.21243247389793396,
-0.2215556651353836,
-0.06769466400146484,
-0.14991380274295807,
0.14232316613197327,
-0.03031662106513977,
0.12150783091783524,
-0.21706324815750122,
-0.09995479136705399,
0.2374509572982788,
-0.09711798280477524,
-0.03981943428516388,
0.3101714551448822,
0.30210739374160767,
-0.09958484768867493,
0.07650276273488998,
-0.10126211494207382,
0.4302537739276886,
0.28778311610221863,
0.04682125523686409,
0.012156598269939423,
0.06257233023643494,
-0.06121157854795456,
-0.0026388652622699738,
0.18806134164333344,
-0.1815977394580841,
-0.16870464384555817,
0.18518850207328796,
0.1278868168592453,
-0.09029199928045273,
0.5268798470497131,
-0.02405308559536934,
0.4328497052192688,
-0.12655562162399292,
-0.021032951772212982,
0.04106774181127548,
-0.14134272933006287,
0.1301001012325287,
0.04707171022891998,
-0.13216310739517212,
0.0632871612906456,
0.532119631767273,
-0.33067816495895386,
0.030584610998630524,
0.1457984447479248,
0.03292272612452507,
0.22194422781467438,
0.32520148158073425,
0.40930309891700745,
0.21591311693191528,
-0.3454250991344452,
0.11725671589374542,
-0.5465899705886841,
-0.006205625832080841,
-0.1609600931406021,
0.0645359680056572,
-0.03855302184820175,
-0.0960330069065094,
-0.2724432647228241,
-0.0052253082394599915,
0.3427123427391052,
0.17673765122890472,
0.06954218447208405,
-0.34904056787490845,
-0.20145128667354584,
0.015185508877038956,
0.25398728251457214,
-0.0410868301987648,
-0.140954852104187,
-0.4107581377029419,
0.13824987411499023,
0.09794680774211884,
0.012929867953062057,
0.06560646742582321,
0.15004611015319824,
-0.05740227922797203,
0.24449102580547333,
0.13389256596565247,
0.15472732484340668,
-0.021567292511463165,
0.07580147683620453,
-0.16250216960906982,
-0.4157050848007202,
-0.27519991993904114,
0.0072921523824334145,
-0.1699926257133484,
-0.156268909573555,
0.37591493129730225,
-0.45949065685272217,
-0.5085413455963135,
-0.4312383234500885,
-0.1365937739610672,
0.12477819621562958,
0.15060816705226898,
-0.0880165845155716,
0.17583173513412476,
-0.23603570461273193,
0.31664615869522095,
0.44674739241600037,
0.01519865170121193,
0.015019841492176056,
0.36268144845962524,
-0.10334064811468124,
-0.25851547718048096,
0.5135086178779602,
-0.39053523540496826,
-0.312084436416626,
0.011454296298325062,
0.31810274720191956,
0.016432959586381912,
-0.08402135968208313,
-0.36286988854408264,
-0.051279544830322266,
0.4018569588661194,
-0.022540509700775146,
-0.10007935762405396,
-0.258355975151062,
-0.1918519288301468,
0.24315117299556732,
0.02515055611729622,
0.15615960955619812,
-0.010879464447498322,
-0.11450958251953125,
0.03567894920706749,
-0.25933176279067993
] |
https://github.com/huggingface/datasets/issues/6358
|
Mounting datasets cache fails due to absolute paths.
|
Sorry, the reply on this thread escaped my attention. The problem with @mariosasko's attempted reproduction is the absolute path `./hf_cache` is the same in the host system and the docker container, so naturally the paths would be correct. Modifying the docker image as below should reproduce the error...
```
FROM python:3.9
WORKDIR /usr/src/app
RUN pip install datasets
COPY ./hf_cache ./my_cache/
ENV HF_HOME=./my_cache/
ENV HF_DATASETS_OFFLINE=1
CMD ["python"]
```
The paths written inside the cache will still have `./hf_cache` prefixing all the paths. If they were relative paths (relative to the top level of the cache) this would be avoided.
|
### Describe the bug
Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache.
### Steps to reproduce the bug
1. Create a datasets cache by downloading some data
2. Mount the dataset folder into a docker container or remote system.
3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache.
4. Attempt to access the data from within the docker container.
5. An error is thrown saying no file exists at \<absolute path to original cache location\>
### Expected behavior
The data is loaded without error
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
| 98
|
Mounting datasets cache fails due to absolute paths.
### Describe the bug
Creating a datasets cache and mounting this into, for example, a docker container, renders the data unreadable due to absolute paths written into the cache.
### Steps to reproduce the bug
1. Create a datasets cache by downloading some data
2. Mount the dataset folder into a docker container or remote system.
3. (Edit) Set `HF_HOME` or `HF_DATASET_CACHE` to point to the mounted cache.
4. Attempt to access the data from within the docker container.
5. An error is thrown saying no file exists at \<absolute path to original cache location\>
### Expected behavior
The data is loaded without error
### Environment info
- `datasets` version: 2.14.4
- Platform: Linux-5.4.0-162-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.16.4
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
Sorry, the reply on this thread escaped my attention. The problem with @mariosasko's attempted reproduction is the absolute path `./hf_cache` is the same in the host system and the docker container, so naturally the paths would be correct. Modifying the docker image as below should reproduce the error...
```
FROM python:3.9
WORKDIR /usr/src/app
RUN pip install datasets
COPY ./hf_cache ./my_cache/
ENV HF_HOME=./my_cache/
ENV HF_DATASETS_OFFLINE=1
CMD ["python"]
```
The paths written inside the cache will still have `./hf_cache` prefixing all the paths. If they were relative paths (relative to the top level of the cache) this would be avoided.
|
[
-0.03243767470121384,
0.3068828284740448,
0.026575930416584015,
0.028484337031841278,
0.20578259229660034,
0.03505914658308029,
0.24988776445388794,
0.27949628233909607,
0.05382830277085304,
0.05413994938135147,
0.043213509023189545,
0.14124047756195068,
-0.19221186637878418,
-0.6428014039993286,
0.19184382259845734,
0.01950017735362053,
0.11253462731838226,
0.11057940125465393,
-0.2711370289325714,
-0.13562822341918945,
-0.07615967094898224,
0.15500153601169586,
0.13120068609714508,
0.12797911465168,
-0.19824008643627167,
0.08616412431001663,
-0.153982475399971,
0.2728438675403595,
0.16727766394615173,
-0.4121641516685486,
0.4514925479888916,
0.01911109685897827,
0.12902706861495972,
0.8240641355514526,
-0.00011849429574795067,
0.2489832192659378,
0.29733991622924805,
0.01600511185824871,
-0.4224919378757477,
-0.4571804404258728,
-0.5748928785324097,
-0.14797675609588623,
0.013756005093455315,
-0.28574642539024353,
-0.07747431099414825,
0.08044925332069397,
-0.007883341982960701,
-0.4000219404697418,
0.5159332752227783,
0.18271668255329132,
0.1438320130109787,
0.17223265767097473,
-0.24182763695716858,
-0.05004945769906044,
0.33061566948890686,
0.0011141523718833923,
-0.17145659029483795,
0.43538081645965576,
-0.019718505442142487,
0.012560343369841576,
0.10967332869768143,
0.15888084471225739,
-0.16265591979026794,
0.130118727684021,
0.16336393356323242,
-0.04438547044992447,
-0.4120291769504547,
0.02724851667881012,
0.11877714097499847,
0.4391706585884094,
0.5331555008888245,
-0.4255487024784088,
-0.6013187766075134,
-0.27226442098617554,
-0.19619257748126984,
-0.119455985724926,
0.33597996830940247,
0.08237526565790176,
-0.014320031739771366,
0.29685235023498535,
-0.10885454714298248,
-0.15977993607521057,
-0.3027138411998749,
0.07794416695833206,
-0.10791255533695221,
-0.0011392533779144287,
-0.16609986126422882,
0.13646194338798523,
-0.23314808309078217,
0.22544583678245544,
0.307370662689209,
-0.24407997727394104,
0.16990432143211365,
0.13134066760540009,
-0.181997150182724,
0.2411891222000122,
-0.011221513152122498,
0.10836364328861237,
0.21807461977005005,
-0.061178162693977356,
0.1779063642024994,
-0.015854451805353165,
-0.2753639221191406,
0.2438667118549347,
-0.005305945873260498,
0.4157993793487549,
-0.19910278916358948,
0.07735100388526917,
0.28476202487945557,
0.08523610234260559,
-0.1616516411304474,
-0.24334073066711426,
-0.124181367456913,
-0.1246233731508255,
0.0007241852581501007,
0.10907153785228729,
0.08709675073623657,
-0.30565938353538513,
-0.11230847239494324,
0.13370315730571747,
0.2024737298488617,
0.32708802819252014,
0.16906078159809113,
0.2730483114719391,
0.013794553466141224,
0.043394360691308975,
0.04621710628271103,
0.21250154078006744,
0.07644065469503403,
0.20934222638607025,
-0.17615221440792084,
0.1466071754693985,
-0.28039780259132385,
0.21495908498764038,
0.15356679260730743,
0.042247459292411804,
0.23454682528972626,
0.06421837210655212,
0.12469482421875,
0.0032727420330047607,
-0.11101748794317245,
-0.12342305481433868,
0.14190015196800232,
0.3883081078529358,
0.029104437679052353,
0.3370320498943329,
0.19300828874111176,
0.11330185830593109,
-0.0066771432757377625,
0.20258739590644836,
-0.12318605929613113,
-0.2654871940612793,
0.19382132589817047,
0.01875663921236992,
-0.24293306469917297,
0.37092864513397217,
-0.22257375717163086,
-0.12382517755031586,
0.09335364401340485,
-0.11048375070095062,
0.14497746527194977,
-0.1368219554424286,
-0.012366250157356262,
-0.17120715975761414,
0.40916240215301514,
0.6329569220542908,
-0.17434868216514587,
0.18165172636508942,
-0.029627347365021706,
0.12012240290641785,
-0.024171732366085052,
0.2813699543476105,
0.028106018900871277,
0.007472306489944458,
-0.37317734956741333,
-0.1361057162284851,
0.058256082236766815,
-0.4499185383319855,
-0.5120911598205566,
0.2579071819782257,
-0.032521769404411316,
0.2999279797077179,
0.12940463423728943,
-0.14861975610256195,
0.11040802299976349,
-0.03386077284812927,
-0.06685078144073486,
0.2527835965156555,
0.136219322681427,
-0.21036329865455627,
-0.3233228027820587,
-0.15214504301548004,
-0.15963172912597656,
-0.02408960461616516,
0.40255576372146606,
0.13136963546276093,
0.2255893349647522,
0.07807303965091705,
0.20119303464889526,
-0.10578200221061707,
0.010104921646416187,
0.5647485256195068,
0.3513288199901581,
0.18102233111858368,
0.0449049212038517,
-0.24264371395111084,
-0.1982865035533905,
0.44364577531814575,
-0.048222191631793976,
-0.31948721408843994,
-0.2536758780479431,
-0.13134218752384186,
0.038604579865932465,
0.18316490948200226,
-0.12459425628185272,
0.0629141628742218,
0.09714072942733765,
0.2198048233985901,
0.13616202771663666,
0.2014685571193695,
-0.0774386003613472,
0.5567174553871155,
-0.11156245321035385,
0.04921825975179672,
0.14863868057727814,
0.24445001780986786,
0.010909760370850563,
-0.06428390741348267,
-0.2987658381462097,
0.28015801310539246,
0.3283613622188568,
-0.18029767274856567,
-0.1405775547027588,
0.45303982496261597,
-0.027392221614718437,
0.12895096838474274,
-0.07088600844144821,
0.26148656010627747,
0.26668450236320496,
-0.18312056362628937,
-0.08955106884241104,
-0.09576742351055145,
0.00813407264649868,
0.09987234324216843,
-0.18338164687156677,
0.012775108218193054,
-0.48702171444892883,
0.34290239214897156,
0.06052736937999725,
-0.07184721529483795,
0.07998055219650269,
0.03561514988541603,
-0.195576474070549,
-0.04853314161300659,
0.448187917470932,
0.14412519335746765,
0.28877726197242737,
-0.322350412607193,
0.028164997696876526,
0.10606808960437775,
-0.047689203172922134,
0.18790675699710846,
0.20546981692314148,
0.15838240087032318,
-0.2088872492313385,
-0.11403065174818039,
0.2219361811876297,
0.4014414846897125,
0.2156960666179657,
0.16944947838783264,
0.4078240990638733,
0.09416381269693375,
-0.1348799616098404,
0.014427460730075836,
-0.03593406826257706,
0.11096811294555664,
-0.006232965271919966,
0.11235153675079346,
0.0732550173997879,
0.2676525413990021,
-0.03166988492012024,
-0.34738242626190186,
-0.24072492122650146,
-0.007942978292703629,
-0.1798410713672638,
0.3243162930011749,
-0.3295622169971466,
0.3166961073875427,
-0.14164705574512482,
-0.3399792015552521,
-0.11442926526069641,
-0.3349913954734802,
-0.14518769085407257,
0.35335013270378113,
0.027350351214408875,
0.11011778563261032,
-0.2034110277891159,
0.06322066485881805,
-0.08957940340042114,
-0.17319826781749725,
-0.17979246377944946,
-0.1048784926533699,
-0.1762542426586151,
-0.12276135385036469,
-0.025100039318203926,
-0.0010606066789478064,
0.11939789354801178,
-0.08988337963819504,
0.13183709979057312,
-0.4801832437515259,
-0.27246037125587463,
0.07067254185676575,
0.17859463393688202,
0.6417492628097534,
0.16836129128932953,
0.14749658107757568,
-0.18008244037628174,
0.008806333877146244,
0.10523038357496262,
-0.04781447350978851,
0.1879834234714508,
0.005450008437037468,
-0.16730809211730957,
-0.22166411578655243,
-0.09454120695590973,
0.0015279948711395264,
-0.36963948607444763,
-0.31555306911468506,
0.2771685719490051,
0.002938017249107361,
0.04628569632768631,
0.14689123630523682,
0.07713817805051804,
0.05807067081332207,
-0.09589871764183044,
0.13431665301322937,
-0.2142096757888794,
-0.47597089409828186,
0.28006720542907715,
-0.253680557012558,
-0.25906917452812195,
-0.05136025696992874,
-0.0908593013882637,
0.17492268979549408,
0.28150230646133423,
-0.541749119758606,
-0.21748918294906616,
-0.15847134590148926,
0.3015897870063782,
0.03729819506406784,
0.08765548467636108,
0.06707075238227844,
-0.10475274175405502,
0.038264043629169464,
-0.4379242956638336,
-0.018234454095363617,
0.07388560473918915,
-0.06591173261404037,
0.17035937309265137,
0.17548444867134094,
0.06652268767356873,
0.32049500942230225,
0.7831346988677979,
0.026355843991041183,
0.07088781893253326,
0.4069604277610779,
0.003933588042855263,
0.9545697569847107,
-0.1621139645576477,
-0.31727394461631775,
-0.008395818062126637,
0.08368361741304398,
-0.28294867277145386,
-0.026531800627708435,
0.35396823287010193,
0.3357478678226471,
0.05405580997467041,
-0.19826571643352509,
-0.11028352379798889,
-0.22305171191692352,
0.010459277778863907,
-0.29345205426216125,
0.08654534071683884,
0.301056832075119,
-0.04310861974954605,
-0.29213860630989075,
-0.08777117729187012,
0.11664506793022156,
0.5809023380279541,
0.3583970069885254,
0.3695596754550934,
0.02133100852370262,
-0.07626818120479584,
-0.3374115824699402,
-0.11772593855857849,
-0.042368195950984955,
0.5244775414466858,
-0.34669530391693115,
0.43632248044013977,
-0.09349901974201202,
-0.10425747185945511,
0.8008257746696472,
-0.17930030822753906,
-0.02143995463848114,
-0.06899549067020416,
0.03227422386407852,
-0.5412546992301941,
0.1250217705965042,
0.36182284355163574,
0.2824612557888031,
-0.14736120402812958,
0.10872293263673782,
-0.04141996055841446,
0.2634933292865753,
-0.39350807666778564,
0.4803072214126587,
-0.14611078798770905,
-0.410871684551239,
-0.16103625297546387,
-0.129289448261261,
0.012375889346003532,
-0.1092066690325737,
0.02360897697508335,
-0.2943560481071472,
0.09326351433992386,
-0.07642503082752228,
-0.15012681484222412,
0.0004349350929260254,
-0.14957578480243683,
0.07778646051883698,
0.32243630290031433,
-0.39665335416793823,
0.1382293403148651,
0.38826295733451843,
-0.005916856229305267,
0.31415700912475586,
0.36044371128082275,
-0.4279242753982544,
0.24711740016937256,
-0.059925176203250885,
-0.2535976767539978,
-0.13477912545204163,
0.3202352821826935,
-0.23771554231643677,
-0.1367652714252472,
0.1440993696451187,
-0.0667581856250763,
-0.02552131935954094,
0.09913653135299683,
-0.22442497313022614,
0.06986314058303833,
0.09102611243724823,
-0.3513409197330475,
0.5522003173828125,
0.21042944490909576,
-0.22382646799087524,
0.4698244333267212,
0.5497220754623413,
-0.5453658103942871,
0.3859966993331909,
-0.09932807832956314,
0.7796337604522705,
-0.14910343289375305,
0.23956865072250366,
0.2095736265182495,
-0.24764128029346466,
0.5763663649559021,
-0.1768054962158203,
0.08007948845624924,
-0.23283164203166962,
-0.42912518978118896,
-0.13459941744804382,
-0.26719507575035095,
0.01259666308760643,
0.05709269642829895,
0.0009385719895362854,
0.3174636662006378,
-0.2218114733695984,
0.27155789732933044,
0.08439699560403824,
-0.2590101361274719,
-0.021027589216828346,
-0.2215648740530014,
-0.05148041248321533,
0.1745126098394394,
-0.04327133297920227,
0.15890304744243622,
-0.19707128405570984,
-0.0756523534655571,
-0.20443467795848846,
0.07177021354436874,
-0.2861243784427643,
0.09699515253305435,
-0.2468491941690445,
0.23926545679569244,
0.0697806105017662,
-0.31438252329826355,
-0.10514327883720398,
0.017167173326015472,
0.47356897592544556,
0.10536405444145203,
-0.2962343990802765,
0.09275354444980621,
0.10245111584663391,
-0.07117529213428497,
-0.1040097326040268,
-0.046322405338287354,
0.010778520256280899,
0.0933290645480156,
0.11528364568948746,
-0.31269150972366333,
-0.40228474140167236,
-0.33793091773986816,
0.3410254716873169,
-0.06453163921833038,
0.3298768401145935,
0.2607515752315521,
-0.37310415506362915,
0.03396783769130707,
0.040676649659872055,
-0.24164989590644836,
0.08358441293239594,
0.0537484809756279,
-0.03824091702699661,
0.17773881554603577,
-0.10799859464168549,
0.004730589687824249,
0.12292465567588806,
0.46735072135925293,
-0.2020750343799591,
-0.21928083896636963,
0.32159531116485596,
-0.04365796968340874,
-0.33102667331695557,
-0.02087733894586563,
-0.012296244502067566,
0.18820065259933472,
-0.2579204738140106,
-0.06783224642276764,
-0.38110384345054626,
0.22107242047786713,
-0.15275368094444275,
-0.4521714150905609,
0.5704284906387329,
-0.08042814582586288,
-0.11608569324016571,
-0.6100354790687561,
-0.24712421000003815,
0.05235709249973297,
-0.4225141108036041,
0.12079612910747528,
-0.020977556705474854,
-0.3668763339519501,
0.11027517914772034,
-0.21149739623069763,
-0.23663872480392456,
0.10456885397434235,
-0.26998844742774963,
-0.12967510521411896,
0.20857447385787964,
0.11144890636205673,
0.12480351328849792,
-0.2500842809677124,
0.038102053105831146,
0.21415254473686218,
-0.11848121881484985,
-0.08647824823856354,
-0.31225040555000305,
0.1509944200515747,
0.18031126260757446,
-0.02711334638297558,
0.006091482937335968,
-0.19050750136375427,
-0.0061685312539339066,
-0.16947980225086212,
0.15918803215026855,
0.5320788621902466,
-0.0802120715379715,
-0.12305844575166702,
-0.15476351976394653,
0.14004839956760406,
-0.4938332438468933,
0.17633970081806183,
-0.04920247197151184,
0.16170665621757507,
0.10028757154941559,
0.2136162370443344,
-0.12278595566749573,
-0.053449101746082306,
-0.21838557720184326,
-0.00813911110162735,
-0.32380813360214233,
0.0360281765460968,
0.3540498912334442,
-0.30427831411361694,
0.17466144263744354,
0.3509697914123535,
0.36474698781967163,
-0.2737463414669037,
-0.2931029200553894,
-0.08901592344045639,
0.3496609926223755,
0.07559231668710709,
-0.05172687768936157,
0.04894784465432167,
-0.010679688304662704,
0.061427872627973557,
0.19836021959781647,
0.13441680371761322,
0.555983304977417,
-0.4472144842147827,
0.13136018812656403,
0.04896403104066849,
0.564594030380249,
-0.4604964852333069,
0.03964041918516159,
0.15819315612316132,
-0.06513198465108871,
0.3497438430786133,
0.11206281930208206,
0.18835562467575073,
0.06247030943632126,
0.8196746706962585,
-0.17708805203437805,
0.18910755217075348,
0.30106979608535767,
-0.3021121919155121,
0.02804667130112648,
-0.4886729121208191,
-0.00901380181312561,
-0.04662792384624481,
0.21694257855415344,
0.07992459833621979,
-0.4525127410888672,
-0.13283321261405945,
-0.4920445680618286,
0.15250945091247559,
0.15815643966197968,
-0.11914792656898499,
-0.15925759077072144,
0.0051219770684838295,
0.13168564438819885,
-0.15774750709533691,
0.129632830619812,
-0.23460540175437927,
0.05320717766880989,
-0.17073982954025269,
0.03455648571252823,
0.042167775332927704,
0.09143418818712234,
-0.2288350909948349,
-0.1713695526123047,
0.29781436920166016,
-0.11952466517686844,
-0.1145525574684143,
0.29027125239372253,
0.33978205919265747,
-0.06817127764225006,
0.057001709938049316,
-0.11637220531702042,
0.45538130402565,
0.3074404001235962,
0.0491999015212059,
-0.04292907193303108,
0.0638308972120285,
-0.09807422012090683,
0.03288258984684944,
0.18792980909347534,
-0.17542541027069092,
-0.18968400359153748,
0.2534761130809784,
0.12615372240543365,
-0.09897445887327194,
0.5301481485366821,
0.005202416330575943,
0.42814669013023376,
-0.14309795200824738,
0.027597948908805847,
-0.02066490799188614,
-0.09958106279373169,
0.04172401502728462,
-0.01053900271654129,
-0.2726648449897766,
0.033746007829904556,
0.5154674053192139,
-0.2359645664691925,
0.057029254734516144,
0.1275356411933899,
0.04204330965876579,
0.12755075097084045,
0.20542828738689423,
0.47765833139419556,
0.1828145682811737,
-0.3802412748336792,
0.11548939347267151,
-0.5218316316604614,
0.01702781766653061,
-0.3140108287334442,
-0.07980676740407944,
-0.0021469909697771072,
-0.07663633674383163,
-0.23902630805969238,
0.026556331664323807,
0.2813282012939453,
0.15608040988445282,
-0.012717648409307003,
-0.2448461353778839,
-0.20803385972976685,
-0.10822486877441406,
0.24739140272140503,
-0.05621463805437088,
-0.1251603662967682,
-0.40137726068496704,
0.045832790434360504,
0.06032515689730644,
0.0371965616941452,
0.03553103283047676,
0.06607300043106079,
-0.052398182451725006,
0.20225629210472107,
0.1415233016014099,
0.16851209104061127,
0.07477223873138428,
0.037868157029151917,
-0.2522287964820862,
-0.3743607997894287,
-0.24852772057056427,
-0.052305493503808975,
-0.08745572715997696,
-0.14207230508327484,
0.4593155086040497,
-0.41326233744621277,
-0.6073415279388428,
-0.4402848780155182,
-0.11101654917001724,
0.10704723000526428,
0.040880683809518814,
-0.08224236965179443,
0.23703953623771667,
-0.27247005701065063,
0.34914612770080566,
0.41350674629211426,
0.007325071841478348,
0.021890517324209213,
0.3930148482322693,
-0.10790818184614182,
-0.24617668986320496,
0.490933895111084,
-0.4768730401992798,
-0.35567405819892883,
-0.02858084812760353,
0.35344094038009644,
-0.07968951016664505,
-0.08674578368663788,
-0.35154369473457336,
-0.04365742951631546,
0.36237621307373047,
0.0007900930941104889,
-0.08657753467559814,
-0.20836353302001953,
-0.21989116072654724,
0.2762461304664612,
0.03715135529637337,
0.16130703687667847,
-0.03353642672300339,
-0.180789515376091,
-0.004365153610706329,
-0.25682276487350464
] |
https://github.com/huggingface/datasets/issues/6354
|
`IterableDataset.from_spark` does not support multiple workers in pytorch `Dataloader`
|
I am having issues as well with this.
However, the error I am getting is :
`RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.`
Also did not work with pyspark==3.3.0 and py4j==0.10.9.5
|
### Describe the bug
Looks like `IterableDataset.from_spark` does not support multiple workers in pytorch `Dataloader` if I'm not missing anything.
Also, returns not consistent error messages, which probably depend on the nondeterministic order of worker executions
Some exampes I've encountered:
```
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__
yield from self.generate_examples_fn()
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn
df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id"))
File "/databricks/spark/python/pyspark/instrumentation_utils.py", line 54, in wrapper
logger.log_failure(
File "/databricks/spark/python/pyspark/databricks/usage_logger.py", line 70, in log_failure
self.logger.recordFunctionCallFailureEvent(
File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1322, in __call__
return_value = get_return_value(
File "/databricks/spark/python/pyspark/errors/exceptions/captured.py", line 188, in deco
return f(*a, **kw)
File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/protocol.py", line 342, in get_return_value
return OUTPUT_CONVERTER[type](answer[2:], gateway_client)
KeyError: 'c'
```
```
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__
yield from self.generate_examples_fn()
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn
df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id"))
File "/databricks/spark/python/pyspark/sql/utils.py", line 162, in wrapped
return f(*args, **kwargs)
File "/databricks/spark/python/pyspark/sql/functions.py", line 4893, in spark_partition_id
return _invoke_function("spark_partition_id")
File "/databricks/spark/python/pyspark/sql/functions.py", line 98, in _invoke_function
return Column(jf(*args))
File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1322, in __call__
return_value = get_return_value(
File "/databricks/spark/python/pyspark/errors/exceptions/captured.py", line 188, in deco
return f(*a, **kw)
File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/protocol.py", line 342, in get_return_value
return OUTPUT_CONVERTER[type](answer[2:], gateway_client)
KeyError: 'm'
```
```
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__
yield from self.generate_examples_fn()
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn
df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id"))
File "/databricks/spark/python/pyspark/sql/utils.py", line 162, in wrapped
return f(*args, **kwargs)
File "/databricks/spark/python/pyspark/sql/functions.py", line 4893, in spark_partition_id
return _invoke_function("spark_partition_id")
File "/databricks/spark/python/pyspark/sql/functions.py", line 97, in _invoke_function
jf = _get_jvm_function(name, SparkContext._active_spark_context)
File "/databricks/spark/python/pyspark/sql/functions.py", line 88, in _get_jvm_function
return getattr(sc._jvm.functions, name)
File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1725, in __getattr__
raise Py4JError(message)
py4j.protocol.Py4JError: functions does not exist in the JVM
```
### Steps to reproduce the bug
```python
import pandas as pd
import numpy as np
batch_size = 16
pdf = pd.DataFrame({
key: np.random.rand(16*100) for key in ['feature', 'target']
})
test_df = spark.createDataFrame(pdf)
from datasets import IterableDataset
from torch.utils.data import DataLoader
ids = IterableDataset.from_spark(test_df)
for batch in DataLoader(ids, batch_size=16, num_workers=4):
for k, b in batch.items():
print(k, b.shape, sep='\t')
print('\n')
```
### Expected behavior
For `num_workers` equal to 0 or 1 works fine as expected:
```
feature torch.Size([16])
target torch.Size([16])
feature torch.Size([16])
target torch.Size([16])
....
```
Expected to support workers >1.
### Environment info
Databricks 13.3 LTS ML runtime - Spark 3.4.1
pyspark==3.4.1
py4j==0.10.9.7
datasets==2.13.1 and also tested with datasets==2.14.6
| 62
|
`IterableDataset.from_spark` does not support multiple workers in pytorch `Dataloader`
### Describe the bug
Looks like `IterableDataset.from_spark` does not support multiple workers in pytorch `Dataloader` if I'm not missing anything.
Also, returns not consistent error messages, which probably depend on the nondeterministic order of worker executions
Some exampes I've encountered:
```
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__
yield from self.generate_examples_fn()
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn
df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id"))
File "/databricks/spark/python/pyspark/instrumentation_utils.py", line 54, in wrapper
logger.log_failure(
File "/databricks/spark/python/pyspark/databricks/usage_logger.py", line 70, in log_failure
self.logger.recordFunctionCallFailureEvent(
File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1322, in __call__
return_value = get_return_value(
File "/databricks/spark/python/pyspark/errors/exceptions/captured.py", line 188, in deco
return f(*a, **kw)
File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/protocol.py", line 342, in get_return_value
return OUTPUT_CONVERTER[type](answer[2:], gateway_client)
KeyError: 'c'
```
```
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__
yield from self.generate_examples_fn()
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn
df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id"))
File "/databricks/spark/python/pyspark/sql/utils.py", line 162, in wrapped
return f(*args, **kwargs)
File "/databricks/spark/python/pyspark/sql/functions.py", line 4893, in spark_partition_id
return _invoke_function("spark_partition_id")
File "/databricks/spark/python/pyspark/sql/functions.py", line 98, in _invoke_function
return Column(jf(*args))
File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1322, in __call__
return_value = get_return_value(
File "/databricks/spark/python/pyspark/errors/exceptions/captured.py", line 188, in deco
return f(*a, **kw)
File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/protocol.py", line 342, in get_return_value
return OUTPUT_CONVERTER[type](answer[2:], gateway_client)
KeyError: 'm'
```
```
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 79, in __iter__
yield from self.generate_examples_fn()
File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-68c05436-3512-41c4-88ca-5630012b70d1/lib/python3.10/site-packages/datasets/packaged_modules/spark/spark.py", line 49, in generate_fn
df_with_partition_id = df.select("*", pyspark.sql.functions.spark_partition_id().alias("part_id"))
File "/databricks/spark/python/pyspark/sql/utils.py", line 162, in wrapped
return f(*args, **kwargs)
File "/databricks/spark/python/pyspark/sql/functions.py", line 4893, in spark_partition_id
return _invoke_function("spark_partition_id")
File "/databricks/spark/python/pyspark/sql/functions.py", line 97, in _invoke_function
jf = _get_jvm_function(name, SparkContext._active_spark_context)
File "/databricks/spark/python/pyspark/sql/functions.py", line 88, in _get_jvm_function
return getattr(sc._jvm.functions, name)
File "/databricks/spark/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1725, in __getattr__
raise Py4JError(message)
py4j.protocol.Py4JError: functions does not exist in the JVM
```
### Steps to reproduce the bug
```python
import pandas as pd
import numpy as np
batch_size = 16
pdf = pd.DataFrame({
key: np.random.rand(16*100) for key in ['feature', 'target']
})
test_df = spark.createDataFrame(pdf)
from datasets import IterableDataset
from torch.utils.data import DataLoader
ids = IterableDataset.from_spark(test_df)
for batch in DataLoader(ids, batch_size=16, num_workers=4):
for k, b in batch.items():
print(k, b.shape, sep='\t')
print('\n')
```
### Expected behavior
For `num_workers` equal to 0 or 1 works fine as expected:
```
feature torch.Size([16])
target torch.Size([16])
feature torch.Size([16])
target torch.Size([16])
....
```
Expected to support workers >1.
### Environment info
Databricks 13.3 LTS ML runtime - Spark 3.4.1
pyspark==3.4.1
py4j==0.10.9.7
datasets==2.13.1 and also tested with datasets==2.14.6
I am having issues as well with this.
However, the error I am getting is :
`RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.`
Also did not work with pyspark==3.3.0 and py4j==0.10.9.5
|
[
-0.287352055311203,
-0.16247232258319855,
-0.0674358606338501,
0.5066514015197754,
-0.03184514492750168,
-0.3001956045627594,
0.7239212393760681,
-0.012372933328151703,
-0.012353291735053062,
0.030812695622444153,
0.00817926973104477,
0.44511735439300537,
-0.0035252394154667854,
0.015947548672556877,
-0.14707735180854797,
-0.05004870891571045,
-0.05345702916383743,
-0.0882202684879303,
-0.4748925268650055,
0.08345535397529602,
-0.2508130371570587,
0.37931403517723083,
-0.18931126594543457,
0.09771322458982468,
-0.41138845682144165,
-0.12632517516613007,
-0.2657884359359741,
0.00044065341353416443,
0.32029521465301514,
-0.23772922158241272,
0.2663690745830536,
0.1699841320514679,
0.09847060590982437,
0.7632463574409485,
-0.00011906841973541304,
0.07295949757099152,
0.282112717628479,
0.11122351884841919,
-0.02085961401462555,
-0.3277810215950012,
0.1749533712863922,
-0.23814938962459564,
0.25343599915504456,
-0.4041900932788849,
0.21386146545410156,
-0.2514369487762451,
0.08404984325170517,
0.004519276320934296,
0.38659679889678955,
0.11346989125013351,
0.17539867758750916,
0.17944613099098206,
-0.16484569013118744,
-0.06815405189990997,
-0.0025081783533096313,
0.019267253577709198,
0.03774802386760712,
0.353145569562912,
0.1335034966468811,
-0.05465506762266159,
-0.4470018744468689,
-0.02825937047600746,
0.0058952029794454575,
0.37656131386756897,
0.2280716598033905,
-0.002080146223306656,
-0.18651282787322998,
-0.350602388381958,
-0.08763762563467026,
0.1723089963197708,
0.3391117751598358,
-0.24365335702896118,
-0.2978731095790863,
-0.31239235401153564,
-0.1339438110589981,
-0.015519385226070881,
0.4646642804145813,
0.05275309085845947,
-0.05428892374038696,
-0.14405950903892517,
-0.09453808516263962,
0.28170567750930786,
-0.1377241611480713,
-0.02048833668231964,
-0.18611548840999603,
0.48040473461151123,
-0.07621440291404724,
0.2519385814666748,
0.49896568059921265,
0.05928685888648033,
0.33957839012145996,
-0.03898373991250992,
0.266465961933136,
-0.1136627346277237,
-0.32113298773765564,
-0.1440054476261139,
0.04422199726104736,
-0.4990595877170563,
-0.17652979493141174,
0.06989122927188873,
-0.0599529966711998,
-0.10224596410989761,
-0.011476925574243069,
0.1117011308670044,
0.44766169786453247,
-0.23539601266384125,
-0.020750217139720917,
0.3077006936073303,
0.42914116382598877,
0.08770865947008133,
-0.022298375144600868,
0.013651901856064796,
-0.02311808243393898,
-0.5283818244934082,
0.28141671419143677,
0.13515368103981018,
0.08944502472877502,
0.19957807660102844,
-0.269687294960022,
-0.2591796815395355,
-0.43113070726394653,
-0.30598941445350647,
-0.024441052228212357,
0.17073260247707367,
-0.1925358772277832,
-0.12106769531965256,
-0.009745411574840546,
0.1968022882938385,
0.0980103462934494,
-0.04932206869125366,
-0.08357439935207367,
0.13240724802017212,
0.1344628483057022,
-0.005693947896361351,
0.08950139582157135,
-0.2721691131591797,
0.2501554787158966,
0.37434741854667664,
-0.11885766685009003,
-0.17238466441631317,
0.18756785988807678,
-0.49689000844955444,
-0.22264903783798218,
-0.08719602227210999,
0.11809295415878296,
0.35689640045166016,
-0.16279762983322144,
0.1332765817642212,
-0.0027740225195884705,
0.08702127635478973,
-0.29458916187286377,
-0.1962861865758896,
-0.3852916359901428,
0.13212813436985016,
-0.13465845584869385,
-0.11640043556690216,
-0.19523751735687256,
-0.21214772760868073,
0.25705981254577637,
-0.20164482295513153,
0.1585034877061844,
-0.3885151743888855,
-0.14548251032829285,
-0.27431219816207886,
-0.14544829726219177,
0.4607735872268677,
-0.12093496322631836,
-0.05850265547633171,
0.02388835698366165,
0.014025028795003891,
0.32279297709465027,
0.17124363780021667,
-0.16752871870994568,
0.3003767430782318,
-0.4338154196739197,
0.21106578409671783,
-0.002576492726802826,
-0.241045281291008,
-0.09295674413442612,
0.6665257215499878,
0.1231851875782013,
0.29728996753692627,
0.3068525493144989,
0.06846752017736435,
0.2992386519908905,
-0.19941014051437378,
0.32684385776519775,
0.2108333557844162,
-0.06265810132026672,
0.05082648992538452,
-0.05807344987988472,
-0.02474302239716053,
0.1149621456861496,
0.07238870859146118,
0.30191662907600403,
-0.17935273051261902,
-0.00517793744802475,
-0.08106740564107895,
0.3551367521286011,
-0.06546778976917267,
-0.05751022696495056,
0.2688262462615967,
-0.06478376686573029,
-0.009970337152481079,
0.14165844023227692,
-0.21233046054840088,
-0.4437013864517212,
0.19513240456581116,
-0.027897106483578682,
-0.09340983629226685,
0.044538360089063644,
0.09928637742996216,
-0.004048186354339123,
0.02541460655629635,
-0.45334771275520325,
-0.12384876608848572,
0.05040927976369858,
0.28936493396759033,
-0.13550671935081482,
-0.0744909942150116,
-0.06380628049373627,
0.3739983141422272,
-0.2559727430343628,
-0.12196210026741028,
-0.1092267632484436,
0.466424822807312,
-0.11324679106473923,
-0.28032442927360535,
-0.05738933011889458,
0.16944798827171326,
0.23520353436470032,
-0.2653636634349823,
-0.0026552174240350723,
0.2509235143661499,
0.12488413602113724,
0.23618659377098083,
-0.309864342212677,
0.24670220911502838,
0.3818817138671875,
0.17996306717395782,
-0.08033427596092224,
0.44919928908348083,
-0.14442116022109985,
-0.17618459463119507,
0.16262048482894897,
0.3996831178665161,
-0.5273168683052063,
0.2802882790565491,
0.026593297719955444,
0.12060800939798355,
0.336078017950058,
0.09901364147663116,
-0.16647934913635254,
0.13128207623958588,
0.22352327406406403,
-0.1463046669960022,
0.1184341311454773,
-0.07189836353063583,
-0.5339338779449463,
-0.10358328372240067,
0.23177103698253632,
0.1643490195274353,
0.19029992818832397,
-0.07667051255702972,
-0.14303502440452576,
-0.14140889048576355,
0.24984312057495117,
0.5794193148612976,
0.5155059099197388,
0.0005634080152958632,
-0.02945004031062126,
-0.25973257422447205,
0.006801036652177572,
-0.12241608649492264,
0.0351390615105629,
-0.07014162838459015,
0.38739684224128723,
0.3315567374229431,
0.03716942295432091,
0.1291850209236145,
0.01793786883354187,
-0.32994961738586426,
0.19031232595443726,
0.23935171961784363,
-0.25926265120506287,
0.17124921083450317,
-0.16999761760234833,
-0.43184399604797363,
-0.255784809589386,
-0.005450906231999397,
-0.19383159279823303,
-0.283731609582901,
-0.18781426548957825,
0.7786915302276611,
-0.08480758965015411,
0.24952241778373718,
0.23106282949447632,
-0.033193930983543396,
0.057227395474910736,
0.1681855171918869,
-0.3428487479686737,
0.1700623482465744,
-0.09529940038919449,
-0.011928349733352661,
0.3069804310798645,
-0.2430488020181656,
0.29485824704170227,
-0.003143070265650749,
-0.3048866391181946,
-0.6749898195266724,
0.1751229465007782,
0.2384658306837082,
0.04593363031744957,
0.37420302629470825,
0.29764556884765625,
-0.09851443767547607,
-0.14495061337947845,
-0.3813478350639343,
0.3221067488193512,
-0.2775495946407318,
-0.07143907248973846,
0.24728456139564514,
-0.2776049077510834,
0.24515284597873688,
0.05721211060881615,
-0.007767669856548309,
-0.35871830582618713,
-0.29514938592910767,
0.13562172651290894,
0.00022475048899650574,
0.3181818127632141,
0.07808051258325577,
-0.0871296152472496,
-0.01422038208693266,
0.23813726007938385,
-0.3717278242111206,
-0.011854676529765129,
-0.11543210595846176,
0.33796584606170654,
-0.17929045855998993,
-0.3229184150695801,
-0.08236148953437805,
-0.007807061076164246,
0.016248516738414764,
0.042301855981349945,
-0.3515024185180664,
-0.48020032048225403,
-0.04463561624288559,
0.19447962939739227,
-0.2508500814437866,
-0.052618011832237244,
0.4819813668727875,
0.055073343217372894,
0.1032482385635376,
-0.053600046783685684,
-0.19731418788433075,
0.19435229897499084,
0.30084028840065,
0.032583147287368774,
0.05808623507618904,
0.3996981978416443,
0.11367076635360718,
0.547957718372345,
0.18271100521087646,
-0.06517069041728973,
0.3023696541786194,
-0.304897665977478,
-0.09843012690544128,
0.21905559301376343,
-0.43708348274230957,
-0.15860861539840698,
-0.4401693046092987,
0.025869831442832947,
0.059313319623470306,
-0.4886813759803772,
-0.0826473981142044,
0.12625530362129211,
-0.006466483697295189,
-0.25422823429107666,
-0.09544404596090317,
0.2933247685432434,
-0.45810186862945557,
0.15854918956756592,
-0.36990734934806824,
0.07666317373514175,
-0.13285984098911285,
0.04670453816652298,
-0.02754676155745983,
-0.11636058986186981,
0.4304795563220978,
-0.02493448369204998,
0.015001330524682999,
-0.13196352124214172,
-0.14434009790420532,
0.17393150925636292,
0.22464698553085327,
0.16959817707538605,
0.24030034244060516,
0.1956729292869568,
0.2322862148284912,
-0.08955539017915726,
0.9298156499862671,
-0.013476790860295296,
0.04291285201907158,
0.09002368152141571,
-0.5112496614456177,
-0.3287358283996582,
-0.2965950071811676,
-0.40462931990623474,
0.11665090918540955,
0.3762255907058716,
0.6277815103530884,
-0.17435342073440552,
-0.17812994122505188,
0.34533074498176575,
-0.1815062016248703,
-0.2360377162694931,
-0.3538109362125397,
-0.22594591975212097,
-0.21184319257736206,
-0.20236915349960327,
0.13268235325813293,
0.25805774331092834,
0.2670966684818268,
-0.231367290019989,
-0.08067398518323898,
0.05884052813053131,
-0.2225109040737152,
-0.05612476170063019,
0.1404373049736023,
0.24750036001205444,
-0.3324213922023773,
0.1726382076740265,
0.4546639025211334,
-0.006179355084896088,
0.16998513042926788,
0.045284271240234375,
0.1009080559015274,
-0.11570180952548981,
0.3890484571456909,
-0.11427939683198929,
0.21680119633674622,
0.1038275957107544,
-0.1055411845445633,
0.08887065201997757,
-0.23028680682182312,
0.0719359740614891,
-0.09861315041780472,
-0.051092736423015594,
0.5583792328834534,
-0.09959802031517029,
-0.05414918437600136,
-0.3489241302013397,
0.16578735411167145,
0.11186711490154266,
0.09410203993320465,
0.38378968834877014,
-0.14909394085407257,
-0.08483044803142548,
0.36021965742111206,
0.06540150940418243,
0.5198527574539185,
-0.006833516061306,
-0.07720737159252167,
0.3608922064304352,
-0.023053495213389397,
0.5677493810653687,
-0.08112436532974243,
0.38702189922332764,
-0.5948231816291809,
-0.1610221415758133,
0.10188953578472137,
-0.1717185378074646,
-0.1194983646273613,
0.08144557476043701,
-0.1805485337972641,
0.21178776025772095,
0.16791103780269623,
0.1377473622560501,
-0.24480919539928436,
0.11685428023338318,
-0.24507483839988708,
-0.1219518631696701,
0.13880077004432678,
0.019705891609191895,
-0.01747206598520279,
0.2761841416358948,
-0.27216723561286926,
-0.1754618138074875,
0.37596598267555237,
-0.07824406772851944,
-0.3330288529396057,
0.0838441476225853,
-0.2959664463996887,
0.4008302092552185,
0.14300677180290222,
-0.2568349242210388,
-0.023249901831150055,
0.3239949643611908,
0.007577486336231232,
-0.4129734933376312,
0.09779109060764313,
-0.16120897233486176,
-0.21405237913131714,
0.06244547665119171,
-0.1506141871213913,
-0.041981302201747894,
0.3165663480758667,
-0.259676992893219,
-0.06770928204059601,
-0.195878803730011,
0.00947078038007021,
-0.6424798369407654,
0.18183615803718567,
0.2929789423942566,
-0.2068311721086502,
-0.10019293427467346,
-0.0004564686678349972,
0.04589508846402168,
-0.14429211616516113,
-0.3405193090438843,
0.04707879200577736,
0.10477536916732788,
-0.13343964517116547,
0.235594242811203,
-0.4252697229385376,
-0.005618102848529816,
-0.02359899878501892,
0.23466283082962036,
0.12424474954605103,
0.09301124513149261,
0.4962013363838196,
0.19973920285701752,
-0.04368890821933746,
-0.11611134558916092,
-0.1345665156841278,
0.1130465716123581,
-0.5953401327133179,
0.32995736598968506,
-0.3035966157913208,
0.1674380749464035,
-0.17254140973091125,
0.28192538022994995,
0.1847018450498581,
0.29650795459747314,
-0.20427864789962769,
-0.2446279078722,
-0.08516484498977661,
0.09177985042333603,
-0.09067539870738983,
0.032327767461538315,
0.036559104919433594,
0.07946869730949402,
0.0018496029078960419,
0.15994884073734283,
-0.23619799315929413,
0.0829896405339241,
-0.3165242671966553,
-0.12071847915649414,
0.30990421772003174,
-0.2600095868110657,
-0.07642097026109695,
0.21737328171730042,
0.059993721544742584,
0.2453640103340149,
0.1127202957868576,
-0.11283089220523834,
-0.06358988583087921,
0.0942482277750969,
0.07745726406574249,
-0.12651093304157257,
0.006921500898897648,
-0.1963805854320526,
-0.1689475029706955,
-0.10538624227046967,
0.0647892951965332,
0.14451053738594055,
-0.05753128230571747,
0.21062317490577698,
0.4133375883102417,
0.2130235731601715,
-0.34661275148391724,
0.06349742412567139,
0.08677782118320465,
0.05799179524183273,
-0.13715268671512604,
0.44545337557792664,
0.2614368200302124,
0.013391807675361633,
-0.18203891813755035,
0.03536953404545784,
0.2636868357658386,
0.21433886885643005,
0.29778897762298584,
-0.3330458402633667,
-0.011682093143463135,
-0.051460832357406616,
0.441885381937027,
0.5267378091812134,
-0.2451881766319275,
-0.15066249668598175,
0.08325149863958359,
0.186842679977417,
-0.10172542929649353,
-0.05970309302210808,
0.08526197075843811,
-0.07013053447008133,
-0.02005840092897415,
0.2720721662044525,
0.29352623224258423,
0.12567229568958282,
0.15163594484329224,
0.2606051564216614,
0.33277082443237305,
-0.5339267253875732,
0.06290867924690247,
0.21489045023918152,
-0.1320875734090805,
0.02178071439266205,
0.6185001730918884,
-0.04077375307679176,
0.18279653787612915,
0.19562974572181702,
0.24325549602508545,
0.19203393161296844,
0.15206128358840942,
-0.3233936131000519,
0.4386473596096039,
-0.34907904267311096,
-0.12247335910797119,
-0.16814041137695312,
-0.07200586795806885,
-0.22844776511192322,
-0.05622465908527374,
0.023864436894655228,
-0.5717103481292725,
0.00973287969827652,
-0.3302167057991028,
0.09635156393051147,
-0.3564017713069916,
0.11785575747489929,
0.05181463062763214,
-0.30310192704200745,
-0.04231080412864685,
-0.02896953374147415,
-0.1577875018119812,
-0.013353653252124786,
0.3942543566226959,
-0.0634351372718811,
-0.29159027338027954,
-0.24440841376781464,
-0.12474813312292099,
-0.006554167717695236,
0.18542958796024323,
-0.3055645525455475,
0.07408536225557327,
0.08646797388792038,
-0.06889379024505615,
-0.4361664950847626,
0.4464137852191925,
0.5251491665840149,
0.2611793279647827,
-0.08999043703079224,
-0.0995611846446991,
-0.25839918851852417,
0.06877513974905014,
-0.04065649211406708,
0.18238000571727753,
-0.012084558606147766,
0.0063774604350328445,
0.16497722268104553,
0.10383792221546173,
-0.1303262710571289,
0.30936962366104126,
0.19187159836292267,
0.11411434412002563,
-0.08052597939968109,
0.4096105694770813,
-0.2871370017528534,
-0.22981709241867065,
0.23680329322814941,
0.009845107793807983,
-0.1141752302646637,
-0.13330858945846558,
0.37597912549972534,
-0.046248018741607666,
0.12197428196668625,
-0.018054261803627014,
0.0816277265548706,
0.00815684162080288,
0.1497422754764557,
0.3324827551841736,
0.0734369158744812,
-0.45761722326278687,
0.0064219459891319275,
-0.407809853553772,
0.3163241147994995,
0.0429859459400177,
0.3166680634021759,
-0.017724258825182915,
0.45323407649993896,
-0.0791337713599205,
-0.1756376326084137,
0.22528332471847534,
-0.05081217363476753,
0.07964968681335449,
0.47467300295829773,
-0.18448567390441895,
-0.1640210896730423,
-0.0180610790848732,
-0.00970999151468277,
0.07752425223588943,
-0.3339748680591583,
0.1738782525062561,
-0.33554184436798096,
0.0932542011141777,
0.09710193425416946,
-0.23973479866981506,
0.3105711340904236,
-0.4758841097354889,
0.3384196162223816,
0.12737439572811127,
0.48819687962532043,
-0.09656354784965515,
-0.008991415612399578,
-0.05410681292414665,
-0.2427990734577179,
-0.2409781664609909,
0.13336001336574554,
0.03719405457377434,
0.359285831451416,
0.13986393809318542,
0.14412711560726166,
-0.5992413759231567,
0.2118925005197525,
-0.3031626343727112,
0.16254039108753204,
-0.07609467208385468,
0.10905054211616516,
-0.10285677760839462,
-0.06476527452468872,
0.16094006597995758,
0.1842675507068634,
0.11747032403945923,
0.09823793917894363,
-0.4865344762802124,
-0.26680994033813477,
0.07698144018650055,
-0.4347418546676636,
-0.30862608551979065,
-0.420777291059494,
0.2752094268798828,
0.07685761898756027,
0.29274865984916687,
-0.23167851567268372,
-0.11933118849992752,
0.4163093566894531,
-0.013729866594076157,
0.07558900117874146,
0.08356347680091858,
0.17346923053264618,
-0.03557588532567024,
0.0696670264005661,
0.12657901644706726,
0.1506132036447525,
-0.24904227256774902,
0.26903635263442993,
-0.2194933444261551
] |
https://github.com/huggingface/datasets/issues/6353
|
load_dataset save_to_disk load_from_disk error
|
I'm using the latest datasets and fsspec , but still got this error!
datasets : Version: 2.13.0
fsspec Version: 2023.10.0
```
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/load.py", line 1892, in load_from_disk
return DatasetDict.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options)
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1371, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1639, in load_from_disk
fs_token_paths = fsspec.get_fs_token_paths(dataset_path, storage_options=storage_options)
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/core.py", line 610, in get_fs_token_paths
chain = _un_chain(urlpath0, storage_options or {})
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/core.py", line 325, in _un_chain
cls = get_filesystem_class(protocol)
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/registry.py", line 232, in get_filesystem_class
raise ValueError(f"Protocol not known: {protocol}")
```
|
### Describe the bug
datasets version: 2.10.1
I `load_dataset `and `save_to_disk` sucessfully on windows10( **and I `load_from_disk(/LLM/data/wiki)` succcesfully on windows10**), and I copy the dataset `/LLM/data/wiki`
into a ubuntu system, but when I `load_from_disk(/LLM/data/wiki)` on ubuntu, something weird happens:
```
load_from_disk('/LLM/data/wiki')
File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/load.py", line 1874, in load_from_disk
return DatasetDict.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options)
File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1309, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(
File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1543, in load_from_disk
fs_token_paths = fsspec.get_fs_token_paths(dataset_path, storage_options=storage_options)
File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/core.py", line 610, in get_fs_token_paths
chain = _un_chain(urlpath0, storage_options or {})
File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/core.py", line 325, in _un_chain
cls = get_filesystem_class(protocol)
File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/registry.py", line 232, in get_filesystem_class
raise ValueError(f"Protocol not known: {protocol}")
ValueError: Protocol not known: /LLM/data/wiki
```
It seems that something went wrong on the arrow file?
How can I solve this , since currently I can not save_to_disk on ubuntu system
### Steps to reproduce the bug
datasets version: 2.10.1
### Expected behavior
datasets version: 2.10.1
### Environment info
datasets version: 2.10.1
| 83
|
load_dataset save_to_disk load_from_disk error
### Describe the bug
datasets version: 2.10.1
I `load_dataset `and `save_to_disk` sucessfully on windows10( **and I `load_from_disk(/LLM/data/wiki)` succcesfully on windows10**), and I copy the dataset `/LLM/data/wiki`
into a ubuntu system, but when I `load_from_disk(/LLM/data/wiki)` on ubuntu, something weird happens:
```
load_from_disk('/LLM/data/wiki')
File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/load.py", line 1874, in load_from_disk
return DatasetDict.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options)
File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1309, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(
File "/usr/local/miniconda3/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1543, in load_from_disk
fs_token_paths = fsspec.get_fs_token_paths(dataset_path, storage_options=storage_options)
File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/core.py", line 610, in get_fs_token_paths
chain = _un_chain(urlpath0, storage_options or {})
File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/core.py", line 325, in _un_chain
cls = get_filesystem_class(protocol)
File "/usr/local/miniconda3/lib/python3.8/site-packages/fsspec/registry.py", line 232, in get_filesystem_class
raise ValueError(f"Protocol not known: {protocol}")
ValueError: Protocol not known: /LLM/data/wiki
```
It seems that something went wrong on the arrow file?
How can I solve this , since currently I can not save_to_disk on ubuntu system
### Steps to reproduce the bug
datasets version: 2.10.1
### Expected behavior
datasets version: 2.10.1
### Environment info
datasets version: 2.10.1
I'm using the latest datasets and fsspec , but still got this error!
datasets : Version: 2.13.0
fsspec Version: 2023.10.0
```
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/load.py", line 1892, in load_from_disk
return DatasetDict.load_from_disk(dataset_path, keep_in_memory=keep_in_memory, storage_options=storage_options)
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/dataset_dict.py", line 1371, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1639, in load_from_disk
fs_token_paths = fsspec.get_fs_token_paths(dataset_path, storage_options=storage_options)
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/core.py", line 610, in get_fs_token_paths
chain = _un_chain(urlpath0, storage_options or {})
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/core.py", line 325, in _un_chain
cls = get_filesystem_class(protocol)
File "/home/guoby/app/Anaconda3-2021.05/envs/news/lib/python3.8/site-packages/fsspec/registry.py", line 232, in get_filesystem_class
raise ValueError(f"Protocol not known: {protocol}")
```
|
[
-0.30200204253196716,
0.007541432976722717,
0.07424837350845337,
0.3547016978263855,
0.3853200078010559,
0.19839993119239807,
0.3081058859825134,
0.09688109159469604,
0.03803102299571037,
0.08450604230165482,
-0.020637651905417442,
0.3757514953613281,
0.020783403888344765,
0.058200374245643616,
0.005796828307211399,
-0.04394078254699707,
0.25803691148757935,
-0.10684780776500702,
-0.15890690684318542,
-0.21719130873680115,
-0.4443010687828064,
0.18944518268108368,
-0.15024378895759583,
-0.10594120621681213,
-0.09335952997207642,
-0.2973520755767822,
-0.23654572665691376,
0.43008583784103394,
0.08052276074886322,
-0.363066703081131,
0.3200773000717163,
-0.2786256968975067,
0.3140890896320343,
0.41642019152641296,
-0.00011119424016214907,
0.013939492404460907,
0.20191307365894318,
-0.03035399690270424,
-0.45452332496643066,
-0.1746901422739029,
-0.11253171414136887,
-0.2785893976688385,
0.06480478495359421,
-0.271489679813385,
0.1610087752342224,
0.08170817792415619,
-0.15438339114189148,
-0.3643896281719208,
0.04745499789714813,
0.18768921494483948,
0.25833261013031006,
0.22982172667980194,
-0.03578262776136398,
-0.2292596697807312,
0.19864830374717712,
-0.017390884459018707,
-0.12234404683113098,
0.24782541394233704,
-0.017193779349327087,
-0.18858523666858673,
0.28183284401893616,
0.09024806320667267,
-0.1837518811225891,
-0.20397798717021942,
0.25930893421173096,
0.037869345396757126,
0.19750718772411346,
-0.222306489944458,
0.15529581904411316,
0.18175733089447021,
0.6693470478057861,
-0.3566685914993286,
-0.3745465874671936,
-0.06648427248001099,
0.008737757802009583,
0.06681295484304428,
0.26627764105796814,
0.23999947309494019,
0.01749999076128006,
0.09970341622829437,
-0.07907915860414505,
-0.22092431783676147,
-0.05078982561826706,
0.24558062851428986,
-0.03034425713121891,
-0.05469167232513428,
-0.13194480538368225,
0.04503827914595604,
0.06705270707607269,
0.049010224640369415,
0.08673885464668274,
-0.24682366847991943,
-0.02608754113316536,
0.10004262626171112,
-0.2838897407054901,
0.02172185480594635,
-0.08389454334974289,
0.014684472233057022,
-0.1671091914176941,
0.1768711507320404,
0.22069084644317627,
-0.21818405389785767,
0.22790509462356567,
0.28934869170188904,
0.29199355840682983,
0.26566389203071594,
-0.12868532538414001,
0.2485439032316208,
0.23625630140304565,
0.0261314008384943,
0.08223728835582733,
-0.06329577416181564,
-0.00943782553076744,
-0.16858844459056854,
0.2405497282743454,
-0.027063705027103424,
0.3603394627571106,
-0.07816068083047867,
-0.4644826054573059,
0.0962328389286995,
0.2789361774921417,
0.06447281688451767,
-0.00377772469073534,
0.4038967192173004,
-0.09899506717920303,
0.4266290068626404,
-0.0019556358456611633,
0.39127588272094727,
-0.20078347623348236,
0.3887462913990021,
-0.1776304543018341,
-0.09576120972633362,
0.017639990895986557,
0.05540947616100311,
0.13098692893981934,
-0.2591671943664551,
0.29598167538642883,
0.12624017894268036,
-0.30661410093307495,
-0.09071727097034454,
0.058627307415008545,
-0.07679350674152374,
-0.010096259415149689,
0.2486802339553833,
0.17726725339889526,
0.4604780673980713,
0.19236166775226593,
-0.17225301265716553,
-0.11476656049489975,
0.2757524251937866,
-0.32384419441223145,
-0.16837994754314423,
-0.35270199179649353,
0.26934918761253357,
-0.04368697106838226,
-0.07640489935874939,
-0.3991198241710663,
-0.18290957808494568,
0.31993818283081055,
0.016366146504878998,
0.11180843412876129,
-0.03866366297006607,
-0.46822023391723633,
-0.3872421681880951,
0.17395257949829102,
0.3885345458984375,
-0.44718024134635925,
-0.06949609518051147,
0.0248915683478117,
-0.2296440601348877,
0.17443767189979553,
0.2489764243364334,
0.05482315272092819,
0.1922774314880371,
-0.4051453769207001,
0.2262691706418991,
0.13221219182014465,
-0.6127691268920898,
-0.45195817947387695,
0.33268654346466064,
-0.15091760456562042,
-0.049924012273550034,
0.00030678510665893555,
0.07999971508979797,
0.2965605556964874,
-0.07619082182645798,
0.09747101366519928,
0.29305940866470337,
0.09072425216436386,
0.12992048263549805,
-0.482336163520813,
-0.18952085077762604,
0.20258715748786926,
0.10239551961421967,
-0.07044568657875061,
0.20652036368846893,
0.505304753780365,
0.40870028734207153,
0.2837441861629486,
-0.11412279307842255,
0.001920992275699973,
0.39621371030807495,
0.5197304487228394,
-0.1264270544052124,
-0.126201331615448,
-0.01866750605404377,
-0.5319817066192627,
0.24674490094184875,
-0.04209335520863533,
-0.1219734251499176,
0.055276673287153244,
0.0036400742828845978,
-0.25429853796958923,
0.050084762275218964,
-0.3742562532424927,
0.08302079141139984,
0.11077333986759186,
0.12056444585323334,
-0.1495206356048584,
0.2577289044857025,
0.1172933280467987,
0.026479914784431458,
-0.27452370524406433,
0.026038020849227905,
-0.33160245418548584,
0.4012766480445862,
-0.28197088837623596,
-0.04227451607584953,
-0.05719631910324097,
0.025184355676174164,
0.30362311005592346,
-0.023840753361582756,
-0.07415679842233658,
0.44661492109298706,
0.07776229828596115,
0.3390119671821594,
-0.21614772081375122,
-0.1640748530626297,
0.2691241204738617,
-0.23284536600112915,
0.19900137186050415,
0.30517110228538513,
0.2999773323535919,
-0.07111307978630066,
0.016842149198055267,
0.13574695587158203,
-0.2441876381635666,
0.07138291001319885,
0.1080227941274643,
0.14597250521183014,
0.16636402904987335,
0.02308369055390358,
0.2366776168346405,
-0.2682352066040039,
0.23994265496730804,
0.3738362789154053,
0.4000503420829773,
-0.03293195366859436,
-0.02369558811187744,
0.09519404172897339,
0.4072537124156952,
0.01846284419298172,
0.17551130056381226,
0.08748163282871246,
-0.20799538493156433,
-0.08385114371776581,
0.0883558839559555,
0.34359583258628845,
0.5764807462692261,
0.11132588982582092,
0.11507442593574524,
0.14542539417743683,
-0.10169770568609238,
-0.1003606766462326,
0.326657772064209,
-0.02858603000640869,
0.12928326427936554,
0.2785007953643799,
0.009205360896885395,
0.18584907054901123,
-0.19843867421150208,
0.15266035497188568,
-0.005121608264744282,
0.2272464781999588,
-0.5626528263092041,
0.09028735756874084,
-0.23968568444252014,
0.23316404223442078,
-0.22030827403068542,
0.13129131495952606,
-0.12167967855930328,
-0.33554935455322266,
-0.08488593250513077,
0.5092931389808655,
-0.09941980242729187,
0.09991709142923355,
-0.2293528914451599,
0.0852520614862442,
-0.04028032720088959,
-0.17049552500247955,
0.025290466845035553,
-0.07661259174346924,
-0.297710120677948,
0.034521233290433884,
0.41145575046539307,
0.02070755884051323,
0.3107720613479614,
-0.14967001974582672,
-0.04049298167228699,
-0.2736593186855316,
-0.03541705384850502,
-0.039889588952064514,
0.055129535496234894,
0.34986886382102966,
0.05494685843586922,
0.09839513897895813,
-0.07443679124116898,
-0.25087571144104004,
0.24502068758010864,
-0.02422044239938259,
-0.32669273018836975,
0.37254980206489563,
0.07971541583538055,
-0.21926583349704742,
-0.137963205575943,
-0.28636980056762695,
-0.37654346227645874,
-0.38148659467697144,
0.02678515389561653,
-0.11234670877456665,
0.026934020221233368,
0.22466571629047394,
0.24842971563339233,
0.02396349608898163,
0.29452189803123474,
-0.08318085223436356,
-0.256069540977478,
-0.4180489182472229,
0.39875510334968567,
-0.20159375667572021,
-0.4952256977558136,
0.16749441623687744,
0.27349144220352173,
-0.0709633082151413,
0.06738804280757904,
-0.5113333463668823,
-0.14413169026374817,
-0.08516984432935715,
0.19409574568271637,
-0.16710977256298065,
0.21056626737117767,
0.25467973947525024,
0.05130534619092941,
-0.0026605110615491867,
-0.10684100538492203,
-0.12373906373977661,
0.024431772530078888,
-0.01467990130186081,
0.18670940399169922,
-0.17024049162864685,
0.20094740390777588,
0.018858760595321655,
0.2926711440086365,
0.2902415692806244,
0.20870250463485718,
0.5172399878501892,
0.0791044756770134,
0.5441207885742188,
-0.1407889723777771,
-0.4530608057975769,
0.091007299721241,
-0.22818103432655334,
-0.2909761071205139,
0.3032616972923279,
-0.07828419655561447,
-0.021197067573666573,
-0.0160930585116148,
-0.18987661600112915,
-0.1099163070321083,
-0.19474999606609344,
-0.06506139039993286,
-0.22221532464027405,
0.020697928965091705,
-0.011785734444856644,
0.3193713426589966,
-0.028466524556279182,
-0.1030232384800911,
0.06073335185647011,
0.37907838821411133,
-0.19516700506210327,
0.1221657544374466,
-0.47032418847084045,
-0.13977736234664917,
-0.4997677206993103,
0.11344552785158157,
0.10423916578292847,
0.489014208316803,
-0.15131431818008423,
-0.16201317310333252,
0.04849784076213837,
-0.09670879691839218,
0.5865620970726013,
-0.11736930161714554,
0.28233975172042847,
0.21640636026859283,
-0.03867378085851669,
-0.45656317472457886,
-0.15592335164546967,
-0.08996612578630447,
-0.2344013750553131,
-0.16225765645503998,
0.3409213721752167,
0.024749472737312317,
-0.03668715059757233,
-0.4240533411502838,
0.3723544478416443,
-0.3814167082309723,
-0.09525229781866074,
-0.3209490478038788,
-0.5536007285118103,
-0.3245164453983307,
-0.24907219409942627,
-0.1032029464840889,
0.22939012944698334,
-0.17134088277816772,
0.003032948821783066,
-0.323478102684021,
-0.17525041103363037,
-0.039219632744789124,
-0.023557035252451897,
0.40587031841278076,
-0.12447263300418854,
0.3372013568878174,
-0.10566268861293793,
0.12294548749923706,
0.5347764492034912,
0.5324152708053589,
-0.3135319650173187,
-0.11692576110363007,
0.010793507099151611,
-0.19916534423828125,
-0.13016021251678467,
0.02807660400867462,
-0.14333947002887726,
-0.21912327408790588,
-0.07432939112186432,
0.017666302621364594,
-0.40306541323661804,
-0.1271340250968933,
0.1904110163450241,
-0.02169658988714218,
-0.22554387152194977,
-0.12842346727848053,
0.33070334792137146,
-0.01674448698759079,
0.045583367347717285,
0.2059560865163803,
0.023274526000022888,
-0.43470311164855957,
0.3684595823287964,
0.009676143527030945,
0.6023591756820679,
-0.07220540940761566,
0.2770213484764099,
0.29300183057785034,
-0.21713830530643463,
0.2429007738828659,
0.1617652326822281,
-0.08803582936525345,
-0.4190346598625183,
-0.18069277703762054,
-0.045643724501132965,
0.018762674182653427,
-0.018940024077892303,
0.17457109689712524,
-0.24822209775447845,
0.14042507112026215,
-0.31421560049057007,
0.10115519165992737,
-0.021107317879796028,
0.16873861849308014,
-0.18851874768733978,
-0.22521981596946716,
-0.5151568651199341,
0.24682632088661194,
0.18931779265403748,
0.12301912903785706,
-0.0928981602191925,
0.053037744015455246,
-0.10015000402927399,
-0.21737010776996613,
-0.18994374573230743,
0.2674896717071533,
-0.33056777715682983,
0.5188916325569153,
-0.2567632794380188,
-0.4478336572647095,
0.0231931135058403,
0.47318747639656067,
0.3838154673576355,
0.01377679593861103,
-0.077934131026268,
-0.15892615914344788,
-0.13963767886161804,
0.1300504207611084,
-0.005018112249672413,
0.005541837774217129,
0.333059161901474,
-0.11242862045764923,
-0.08454291522502899,
-0.10047347098588943,
-0.16503500938415527,
-0.08386953175067902,
-0.008986040949821472,
0.15983791649341583,
-0.13988113403320312,
-0.1467525213956833,
-0.1583550125360489,
-0.23690345883369446,
0.1643826961517334,
-0.38912153244018555,
0.12152734398841858,
0.014788474887609482,
0.0001729705836623907,
0.3795630931854248,
-0.11783446371555328,
-0.24030335247516632,
0.05431070178747177,
0.5025373697280884,
-0.1446426510810852,
0.028627432882785797,
0.5872565507888794,
-0.10101139545440674,
-0.11199644207954407,
-0.2636566162109375,
0.5393493175506592,
-0.052350111305713654,
-0.21377131342887878,
0.102045938372612,
-0.0457523949444294,
0.13172484934329987,
-0.18598011136054993,
0.3658562898635864,
0.14669162034988403,
-0.07973157614469528,
0.0017862021923065186,
-0.4133966565132141,
-0.2574157118797302,
0.028749078512191772,
0.06454305350780487,
0.18440581858158112,
0.18227127194404602,
-0.046495649963617325,
-0.10588870942592621,
-0.13984894752502441,
-0.3234131932258606,
0.20018194615840912,
-0.31707796454429626,
-0.05198083817958832,
0.12017858028411865,
0.03809301555156708,
0.13218533992767334,
-0.19205275177955627,
0.169010192155838,
-0.14599929749965668,
-0.03283954784274101,
-0.25707295536994934,
-0.21260812878608704,
0.11002019047737122,
0.21911191940307617,
-0.14521169662475586,
0.05106506496667862,
-0.21418718993663788,
0.04801452159881592,
-0.18407705426216125,
0.013029899448156357,
0.46739697456359863,
-0.009273432195186615,
0.22278673946857452,
-0.007523570209741592,
0.3274204432964325,
-0.1884174644947052,
0.32519444823265076,
-0.17057690024375916,
0.1928461790084839,
-0.12030588090419769,
0.2249743789434433,
0.17704206705093384,
0.002905033528804779,
-0.3235069513320923,
-0.1180814728140831,
0.04623246565461159,
0.20371133089065552,
0.18401916325092316,
-0.3144596219062805,
0.07153695821762085,
0.0892997458577156,
0.17113454639911652,
0.3139939606189728,
-0.2614884674549103,
-0.12680621445178986,
0.28114789724349976,
0.23424428701400757,
-0.2433667629957199,
-0.24307261407375336,
0.05757554620504379,
-0.20427317917346954,
-0.19600781798362732,
0.16343793272972107,
0.11091743409633636,
-0.3082539439201355,
-0.08334900438785553,
-0.036426909267902374,
0.491661936044693,
-0.01604895293712616,
0.30311548709869385,
0.4829581677913666,
0.04610994830727577,
0.269574910402298,
-0.1806972622871399,
0.040632106363773346,
0.20415927469730377,
0.529326856136322,
-0.13975372910499573,
0.3333490192890167,
-0.05450271815061569,
0.16151298582553864,
-0.1027693971991539,
-0.5151997208595276,
0.16847267746925354,
-0.1012042909860611,
-0.1783834993839264,
0.07420569658279419,
-0.13282369077205658,
0.3100791871547699,
-0.32365262508392334,
-0.2698540985584259,
0.022179724648594856,
0.08944335579872131,
-0.2728690803050995,
-0.21646606922149658,
-0.2644767165184021,
-0.03607701137661934,
0.23052546381950378,
0.1187412440776825,
-0.10987719893455505,
-0.3413677215576172,
0.17083293199539185,
0.15978112816810608,
-0.2613498568534851,
-0.272023469209671,
0.16064125299453735,
0.32536619901657104,
-0.2400413453578949,
-0.2486540824174881,
0.06818334013223648,
0.1158825233578682,
-0.008857794106006622,
-0.04421530291438103,
0.1999116837978363,
0.5350953340530396,
0.4601651728153229,
0.016152646392583847,
0.017726875841617584,
0.25817936658859253,
0.02164742536842823,
-0.026946615427732468,
-0.07462961971759796,
-0.08370129764080048,
0.13255548477172852,
0.3553849458694458,
0.1622830629348755,
-0.06416213512420654,
0.10178068280220032,
0.2636350989341736,
-0.05015000328421593,
-0.01612114906311035,
0.23638179898262024,
-0.25598660111427307,
-0.10175755620002747,
-0.22870969772338867,
0.14774450659751892,
-0.11441058665513992,
0.21264037489891052,
0.4326857328414917,
-0.045476511120796204,
0.2424618899822235,
0.07686372846364975,
0.10552702844142914,
-0.0558738149702549,
0.36017823219299316,
0.32559531927108765,
-0.23526841402053833,
-0.2732565402984619,
0.011928088963031769,
-0.6629286408424377,
0.1776868999004364,
0.030453946441411972,
0.04444608837366104,
-0.13875311613082886,
0.21552112698554993,
-0.0884290263056755,
-0.0021186023950576782,
0.12207858264446259,
0.13588236272335052,
0.015550981275737286,
0.39393627643585205,
-0.21848662197589874,
-0.2835388779640198,
-0.012041501700878143,
-0.04687102884054184,
0.003970615565776825,
-0.6223597526550293,
0.14541542530059814,
-0.019418612122535706,
0.02419685572385788,
-0.15631422400474548,
0.2517426311969757,
-0.31603434681892395,
-0.16545484960079193,
0.5042311549186707,
0.10268371552228928,
0.2572323977947235,
-0.140118807554245,
-0.20684587955474854,
-0.027564208954572678,
-0.2477363795042038,
-0.19673463702201843,
0.1706782877445221,
0.02855437621474266,
0.2660198211669922,
-0.27324169874191284,
-0.10441198945045471,
-0.2579335868358612,
0.3774063289165497,
0.1325777769088745,
0.27759459614753723,
-0.274783730506897,
0.2281457781791687,
0.0534648522734642,
0.02194291166961193,
0.3644852042198181,
0.012390773743391037,
-0.06995782256126404,
0.4672340154647827,
-0.26012155413627625,
-0.4974443018436432,
0.18996983766555786,
-0.21706995368003845,
-0.05745727941393852,
0.017385438084602356,
0.29198628664016724,
-0.16895544528961182,
0.005090638995170593,
-0.5269594192504883,
0.12758556008338928,
0.4498942494392395,
-0.1675059199333191,
-0.1968797892332077,
0.17126649618148804,
-0.18255235254764557,
0.003937907516956329,
0.011565878987312317,
0.23589417338371277,
-0.037146180868148804,
-0.24261300265789032,
0.29617688059806824,
-0.3383523225784302
] |
https://github.com/huggingface/datasets/issues/6352
|
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
|
+1
```
Found cached dataset csv (file:///home/ubuntu/.cache/huggingface/datasets/theSquarePond___csv/theSquarePond--XXXXX-bbf0a8365d693d2c/0.0.0/eea64c71ca8b46dd3f537ed218fc9bf495d5707789152eb2764f5c78fa66d59d)
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In[14], line 4
1 get_ipython().system('pip install -U datasets')
3 # Load dataset from the hub
----> 4 dataset = load_dataset(dataset_name)
File ~/anaconda3/envs/python38-env/lib/python3.8/site-packages/datasets/load.py:1810, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1806 # Build dataset for splits
1807 keep_in_memory = (
1808 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1809 )
-> 1810 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
1811 # Rename and cast features to match task schema
1812 if task is not None:
File ~/anaconda3/envs/python38-env/lib/python3.8/site-packages/datasets/builder.py:1128, in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory)
1126 is_local = not is_remote_filesystem(self._fs)
1127 if not is_local:
-> 1128 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
1129 if not os.path.exists(self._output_dir):
1130 raise FileNotFoundError(
1131 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call "
1132 "builder.download_and_prepare(), or use "
1133 "datasets.load_dataset() before trying to access the Dataset object."
1134 )
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
```
|
I was trying to load the wiki dataset, but i got this error
traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train')
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset
raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
| 183
|
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
I was trying to load the wiki dataset, but i got this error
traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train')
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset
raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
+1
```
Found cached dataset csv (file:///home/ubuntu/.cache/huggingface/datasets/theSquarePond___csv/theSquarePond--XXXXX-bbf0a8365d693d2c/0.0.0/eea64c71ca8b46dd3f537ed218fc9bf495d5707789152eb2764f5c78fa66d59d)
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In[14], line 4
1 get_ipython().system('pip install -U datasets')
3 # Load dataset from the hub
----> 4 dataset = load_dataset(dataset_name)
File ~/anaconda3/envs/python38-env/lib/python3.8/site-packages/datasets/load.py:1810, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1806 # Build dataset for splits
1807 keep_in_memory = (
1808 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1809 )
-> 1810 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
1811 # Rename and cast features to match task schema
1812 if task is not None:
File ~/anaconda3/envs/python38-env/lib/python3.8/site-packages/datasets/builder.py:1128, in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory)
1126 is_local = not is_remote_filesystem(self._fs)
1127 if not is_local:
-> 1128 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
1129 if not os.path.exists(self._output_dir):
1130 raise FileNotFoundError(
1131 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call "
1132 "builder.download_and_prepare(), or use "
1133 "datasets.load_dataset() before trying to access the Dataset object."
1134 )
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
```
|
[
-0.2605902850627899,
-0.20326261222362518,
-0.04139673337340355,
0.2912046015262604,
0.2911195158958435,
0.308462530374527,
0.2381640374660492,
0.4173070788383484,
0.42362433671951294,
-0.02376396954059601,
0.1007637083530426,
0.09992359578609467,
-0.0672031044960022,
-0.00048125535249710083,
-0.07775619626045227,
-0.19842039048671722,
0.0796428695321083,
0.09755069762468338,
0.11143548786640167,
0.03305964171886444,
-0.2395295351743698,
0.1872662603855133,
-0.29019808769226074,
0.2034323662519455,
-0.4309784471988678,
-0.035728007555007935,
-0.0009301230311393738,
0.24062949419021606,
-0.07381121069192886,
-0.3661339282989502,
0.4812164902687073,
-0.10537846386432648,
0.3384254574775696,
0.336775541305542,
-0.00010994209151249379,
0.21057476103305817,
0.4018089175224304,
0.01127803884446621,
-0.40421637892723083,
-0.04439309239387512,
-0.2930485010147095,
-0.35755613446235657,
0.24522872269153595,
-0.2794899642467499,
-0.11993245780467987,
-0.056933265179395676,
-0.04090457409620285,
-0.3124392330646515,
0.43712782859802246,
0.32619181275367737,
0.2333834022283554,
0.11091841757297516,
0.28691017627716064,
0.0657573938369751,
-0.016271278262138367,
-0.1925441473722458,
-0.10881784558296204,
0.09700959920883179,
0.08187300711870193,
-0.19706326723098755,
0.004667907953262329,
0.060965750366449356,
-0.15937425196170807,
0.2227042019367218,
0.3308335840702057,
0.06348950415849686,
0.13967162370681763,
-0.34512221813201904,
0.34390029311180115,
0.287370502948761,
0.9424644708633423,
0.05174093693494797,
-0.2733084261417389,
-0.16013383865356445,
-0.1192481592297554,
-0.031317632645368576,
0.45372840762138367,
0.05694528669118881,
-0.30776503682136536,
0.2135619819164276,
-0.21501731872558594,
-0.2138994038105011,
-0.0009756013751029968,
0.1970858871936798,
0.018948592245578766,
0.5648834705352783,
-0.009611074812710285,
0.20004653930664062,
-0.028130490332841873,
-0.15304917097091675,
0.546787679195404,
-0.1712840050458908,
-0.02205463871359825,
0.3955901861190796,
-0.43496227264404297,
0.13483169674873352,
-0.2481020987033844,
0.1500558853149414,
0.07961702346801758,
-0.08243484795093536,
-0.06060129404067993,
0.07981856167316437,
0.12263882160186768,
0.15073096752166748,
0.33969205617904663,
0.3841359615325928,
-0.011056020855903625,
0.09519680589437485,
-0.012055426836013794,
0.07110963761806488,
-0.09812483936548233,
-0.19733908772468567,
-0.26843535900115967,
-0.2458115518093109,
0.014823298901319504,
-0.08864390105009079,
0.09156559407711029,
-0.2980760931968689,
-0.11528021842241287,
0.01681302860379219,
0.23330917954444885,
-0.03752885386347771,
0.016156740486621857,
0.3164224326610565,
-0.0719594955444336,
0.45478740334510803,
0.018008548766374588,
0.07220740616321564,
-0.1672140508890152,
0.14123179018497467,
-0.14813938736915588,
0.05870955437421799,
-0.13765588402748108,
0.09812286496162415,
0.06705184280872345,
-0.14980226755142212,
0.4032009541988373,
-0.0796661302447319,
0.020547933876514435,
-0.1925990879535675,
0.00974828191101551,
0.02257835865020752,
-0.02806936949491501,
0.3873993754386902,
-0.16720184683799744,
0.3879501223564148,
0.43796250224113464,
-0.3023035526275635,
-0.1806284487247467,
0.22495326399803162,
-0.683314323425293,
-0.4698031544685364,
-0.24550555646419525,
0.18682846426963806,
-0.005263226106762886,
-0.143183171749115,
-0.19995424151420593,
-0.04402024671435356,
0.3785305619239807,
-0.3342246413230896,
-0.0325440987944603,
-0.17673279345035553,
-0.2252485156059265,
-0.23180152475833893,
0.3934095501899719,
0.1433434784412384,
-0.41230636835098267,
-0.052605461329221725,
-0.264857679605484,
-0.08141544461250305,
0.13591566681861877,
0.18415527045726776,
-0.308167040348053,
0.3373735845088959,
-0.24687770009040833,
0.05293716490268707,
0.376400887966156,
-0.3993622660636902,
-0.5940361022949219,
0.02053094655275345,
-0.09001979976892471,
0.30022287368774414,
-0.1984844207763672,
0.012734231539070606,
-0.16063867509365082,
-0.12858496606349945,
0.1733740121126175,
0.33319592475891113,
0.025924313813447952,
0.16106662154197693,
-0.26297059655189514,
-0.38777104020118713,
0.3323668837547302,
0.24859307706356049,
0.19038820266723633,
0.002428203821182251,
0.08409231901168823,
0.34207263588905334,
0.21485286951065063,
-0.10140073299407959,
0.05823736637830734,
0.283844530582428,
0.04966268315911293,
-0.04849378019571304,
0.014948185533285141,
0.0528167262673378,
-0.5230768322944641,
0.4259662926197052,
0.013259217143058777,
-0.07780322432518005,
0.06159508228302002,
-0.09188155829906464,
-0.29845166206359863,
0.0026611220091581345,
-0.483094722032547,
-0.2785012423992157,
0.16631704568862915,
0.1841171681880951,
0.25404807925224304,
0.12629950046539307,
-0.19883421063423157,
0.009046324528753757,
-0.18835313618183136,
-0.01212992426007986,
-0.10829828679561615,
0.11467534303665161,
-0.008673267439007759,
-0.0029044076800346375,
-0.0841652974486351,
0.20843201875686646,
0.030481034889817238,
-0.08533306419849396,
-0.3113498389720917,
0.32948195934295654,
0.008539419621229172,
0.18278411030769348,
-0.004153788089752197,
-0.01594117283821106,
-0.03927629441022873,
-0.14516864717006683,
-0.04720460623502731,
-0.020697157829999924,
0.2200329750776291,
-0.15906499326229095,
0.017935648560523987,
0.09123188257217407,
0.10622300207614899,
0.3385239541530609,
-0.14658740162849426,
0.1371968388557434,
0.09792636334896088,
0.049537185579538345,
0.2916578948497772,
-0.11918383836746216,
0.06783844530582428,
0.03468746691942215,
-0.011399466544389725,
-0.1938069611787796,
0.3021005392074585,
-0.16333869099617004,
0.408348947763443,
0.16436895728111267,
0.15687671303749084,
0.1372520923614502,
-0.16468128561973572,
-0.2206951081752777,
0.21871110796928406,
-0.043215204030275345,
0.30531078577041626,
0.00670655956491828,
-0.03449593111872673,
-0.06546606868505478,
0.22561711072921753,
-0.008750639855861664,
0.19628503918647766,
0.11368194222450256,
0.24153044819831848,
0.33207860589027405,
0.023391613736748695,
-0.1079053282737732,
-0.21094325184822083,
0.23861616849899292,
0.07962565124034882,
0.3696238398551941,
-0.08001109212636948,
0.10957881063222885,
-0.1827649176120758,
0.37026354670524597,
0.23699742555618286,
-0.14141720533370972,
-0.22037723660469055,
-0.5086201429367065,
-0.04245002567768097,
0.18483829498291016,
0.1514839380979538,
0.24422428011894226,
-0.29770609736442566,
0.1159294918179512,
0.08424420654773712,
-0.14576181769371033,
-0.20206330716609955,
-0.38032761216163635,
-0.3452828526496887,
0.11174377799034119,
0.4034363925457001,
0.09042375534772873,
0.24754182994365692,
-0.16010496020317078,
-0.038965560495853424,
-0.3502526581287384,
-0.10268153250217438,
0.07902112603187561,
-0.29053306579589844,
0.3442322015762329,
-0.018226541578769684,
0.40282541513442993,
-0.34070390462875366,
-0.5013718008995056,
0.3694804906845093,
-0.38828739523887634,
-0.0651591420173645,
0.022331010550260544,
0.086941659450531,
-0.04296901822090149,
0.0732915848493576,
-0.19947975873947144,
-0.3936201333999634,
-0.23451462388038635,
-0.09083670377731323,
0.1590748429298401,
-0.06039183586835861,
-0.08373051136732101,
0.1569957286119461,
0.14462155103683472,
0.0881308913230896,
-0.10451540350914001,
-0.28375154733657837,
-0.40999850630760193,
0.21117939054965973,
-0.19257815182209015,
-0.28523147106170654,
0.08805333077907562,
0.11293819546699524,
0.24781131744384766,
-0.08207478374242783,
-0.5207028985023499,
-0.11762244999408722,
-0.09889619797468185,
0.253542959690094,
-0.0054494403302669525,
0.014561301097273827,
0.2463141530752182,
0.02054925076663494,
-0.017841897904872894,
-0.011470954865217209,
0.1850864440202713,
-0.12103397399187088,
-0.20330184698104858,
0.18059641122817993,
0.20917591452598572,
0.2676031291484833,
-0.14857815206050873,
0.8820564150810242,
0.2570292353630066,
0.05790330842137337,
0.36474722623825073,
-0.03758741170167923,
0.1010720282793045,
-0.3126075565814972,
-0.28257134556770325,
0.29736244678497314,
-0.12773892283439636,
-0.09534010291099548,
0.308161199092865,
0.02904653176665306,
-0.2584949731826782,
-0.316800057888031,
0.07475246489048004,
-0.41710007190704346,
-0.30486297607421875,
0.03351958468556404,
0.16067659854888916,
0.14510685205459595,
-0.03410232067108154,
-0.013372592628002167,
-0.15875335037708282,
-0.45650428533554077,
0.2760099768638611,
0.29063135385513306,
-0.10265018790960312,
-0.011577039957046509,
-0.3973197042942047,
-0.2647351324558258,
-0.5689085125923157,
0.2628142237663269,
0.24363648891448975,
0.3559799790382385,
-0.11114639043807983,
0.00855281576514244,
0.16104185581207275,
-0.0061692711897194386,
0.4092220664024353,
-0.45902958512306213,
-0.07025154680013657,
0.21944020688533783,
0.10688535869121552,
-0.1471593827009201,
-0.1421176791191101,
-0.10561563074588776,
0.4150068163871765,
-0.09764151275157928,
0.05318133533000946,
-0.15645627677440643,
-0.15220895409584045,
0.026279855519533157,
0.290033221244812,
-0.2911972105503082,
-0.3213811218738556,
-0.20982931554317474,
-0.15618044137954712,
-0.35589760541915894,
-0.19267281889915466,
-0.1530037671327591,
0.4087577760219574,
-0.2314261943101883,
0.03819657489657402,
-0.4404725730419159,
0.27071619033813477,
-0.033699050545692444,
0.02713576704263687,
0.3218333125114441,
0.1382339596748352,
-0.09345470368862152,
0.15660592913627625,
0.030191855505108833,
0.048264481127262115,
0.6018391251564026,
0.0036078914999961853,
0.006647065281867981,
0.026077331975102425,
-0.029100392013788223,
-0.04591432958841324,
-0.014719456434249878,
-0.13183848559856415,
-0.07427679747343063,
0.07777738571166992,
0.0781330093741417,
-0.11009007692337036,
0.04614794999361038,
0.22845673561096191,
0.08539953827857971,
-0.32178473472595215,
-0.3583056926727295,
0.6149120926856995,
0.16835950314998627,
-0.04813230410218239,
0.28082841634750366,
0.2123575359582901,
-0.27053019404411316,
-0.018057579174637794,
0.34925270080566406,
0.8678388595581055,
-0.24375878274440765,
0.14348308742046356,
0.1783624291419983,
0.47776949405670166,
0.40021568536758423,
-0.3750762939453125,
0.12240087240934372,
-0.32780686020851135,
-0.27746251225471497,
-0.18549565970897675,
0.05852404609322548,
0.023189939558506012,
0.017089128494262695,
-0.2812248766422272,
0.26631414890289307,
-0.24413664638996124,
0.3486090898513794,
-0.030721398070454597,
0.23966360092163086,
-0.17912301421165466,
-0.10757052898406982,
-0.3063512146472931,
0.17274664342403412,
-0.07078775763511658,
0.28045934438705444,
-0.23953363299369812,
0.13078707456588745,
0.09295018017292023,
-0.16669714450836182,
-0.3906427025794983,
0.09905538707971573,
-0.13272710144519806,
0.49570298194885254,
-0.21697372198104858,
-0.2768367528915405,
-0.046704113483428955,
0.5597723722457886,
0.4882950186729431,
0.10227988660335541,
-0.3345906734466553,
0.20918314158916473,
-0.11667080968618393,
-0.327375203371048,
-0.28062358498573303,
0.07844483107328415,
0.24203713238239288,
-0.10670146346092224,
-0.2650306224822998,
0.30767372250556946,
-0.3726201355457306,
-0.29735198616981506,
0.10209459066390991,
-0.06987573206424713,
0.3532424569129944,
-0.309030145406723,
-0.5495814085006714,
-0.04229654371738434,
-0.06347651034593582,
-0.05581646412611008,
0.115073561668396,
0.01142088696360588,
-0.01773175410926342,
-0.034858740866184235,
0.23828697204589844,
-0.2514417767524719,
0.14087317883968353,
0.43812429904937744,
0.15712863206863403,
-0.1886618286371231,
0.8822599649429321,
0.0984460860490799,
-0.19291837513446808,
-0.21375083923339844,
-0.058815665543079376,
0.16201668977737427,
-0.2347499132156372,
-0.17023965716362,
0.17134428024291992,
0.11133502423763275,
-0.06730534136295319,
0.5403761863708496,
0.31103676557540894,
0.049866512417793274,
-0.08671126514673233,
-0.47821518778800964,
-0.2382870614528656,
0.15457791090011597,
-0.15155886113643646,
0.21670052409172058,
0.033951230347156525,
-0.4412372410297394,
0.03624112904071808,
0.1293211579322815,
-0.2832273244857788,
0.044446155428886414,
-0.3400112986564636,
-0.07240452617406845,
0.11913929879665375,
0.08165907114744186,
0.275716632604599,
0.11005967855453491,
0.1387806087732315,
0.06398029625415802,
-0.15613937377929688,
-0.2619662284851074,
0.021999552845954895,
0.18796484172344208,
0.2914891839027405,
-0.22409401834011078,
-0.0006199795752763748,
-0.20900578796863556,
0.016802607104182243,
-0.23798802495002747,
0.2681354582309723,
-0.049644988030195236,
-0.0695362538099289,
0.036930620670318604,
0.30631953477859497,
0.1740478277206421,
-0.3192359209060669,
0.31701621413230896,
-0.21749764680862427,
0.05150850862264633,
0.016212979331612587,
-0.07539255917072296,
0.31429094076156616,
0.10659095644950867,
0.14051824808120728,
0.18865898251533508,
0.19049644470214844,
0.08147589862346649,
0.23609158396720886,
-0.4382110834121704,
0.044770050793886185,
0.15490655601024628,
0.02123316377401352,
0.42277002334594727,
-0.23729601502418518,
0.0278168935328722,
0.32808905839920044,
0.25134485960006714,
-0.08781933039426804,
-0.2960685193538666,
0.26524221897125244,
0.03799135982990265,
-0.0568811371922493,
0.037954673171043396,
0.17302468419075012,
-0.4656963050365448,
0.000812917947769165,
0.08420196175575256,
0.30871766805648804,
-0.4031471014022827,
0.12437555193901062,
0.4582744836807251,
-0.06951412558555603,
-0.04074036702513695,
-0.011728832498192787,
-0.0296800434589386,
0.06752478331327438,
0.2011009007692337,
-0.2926393151283264,
0.2630968987941742,
-0.13156768679618835,
0.24344506859779358,
-0.290175199508667,
-0.5874446034431458,
0.5049030184745789,
0.08458118140697479,
-0.20477566123008728,
0.1951790750026703,
-0.002755671739578247,
0.0779961347579956,
-0.06797456741333008,
0.037850141525268555,
-0.4101475775241852,
0.21752601861953735,
-0.1720125377178192,
-0.23459330201148987,
0.027888812124729156,
-0.18401546776294708,
0.09639015793800354,
0.04633726552128792,
-0.08662168681621552,
-0.19869698584079742,
0.10626552999019623,
0.0667811706662178,
-0.17766384780406952,
-0.15746666491031647,
0.17146775126457214,
0.37822937965393066,
0.07198087871074677,
-0.18861466646194458,
0.21691952645778656,
0.12331592291593552,
0.04119999334216118,
0.028950819745659828,
0.2832043468952179,
0.38901156187057495,
0.4322967529296875,
-0.3312004506587982,
0.06526520848274231,
0.032952506095170975,
-0.001203984022140503,
0.05277591198682785,
0.4191894829273224,
-0.031771525740623474,
-0.011595122516155243,
0.30301034450531006,
0.20410355925559998,
-0.16142556071281433,
-0.07206189632415771,
-0.2075684815645218,
0.2699233889579773,
-0.2342599779367447,
-0.1547723412513733,
0.12986761331558228,
0.007762916386127472,
-0.09800948202610016,
0.27192825078964233,
-0.2824161946773529,
0.06436560302972794,
0.12921638786792755,
-0.053993746638298035,
0.22026190161705017,
-0.022078894078731537,
0.0740719810128212,
-0.1812332570552826,
0.60200434923172,
0.5072509050369263,
-0.1144186481833458,
-0.11410263925790787,
-0.1940811574459076,
-0.618777871131897,
0.23944172263145447,
-0.20438024401664734,
-0.253959983587265,
0.23447173833847046,
-0.17599929869174957,
-0.055809907615184784,
0.3457774519920349,
0.08074726164340973,
0.12459085881710052,
-0.04733232408761978,
0.03443869203329086,
-0.3411172926425934,
-0.17203281819820404,
0.062219783663749695,
0.003984588198363781,
-0.13043193519115448,
-0.4793081283569336,
0.18394239246845245,
-0.08496879041194916,
0.004654422402381897,
-0.1069231927394867,
0.1512707769870758,
-0.037058908492326736,
-0.27857157588005066,
0.3983912467956543,
0.24011532962322235,
0.39346572756767273,
0.002543848007917404,
-0.025567369535565376,
-0.39495402574539185,
-0.29457250237464905,
-0.16092053055763245,
0.13738197088241577,
-0.08033978939056396,
0.3248373866081238,
-0.2562429904937744,
0.0022528469562530518,
-0.22753523290157318,
0.20371747016906738,
0.15974892675876617,
0.2806696891784668,
-0.0835014209151268,
-0.05622079223394394,
0.06365863233804703,
0.1244463250041008,
0.43566247820854187,
0.22579970955848694,
0.06171083077788353,
0.10864563286304474,
-0.079926036298275,
-0.19240720570087433,
0.4051772952079773,
-0.4474591016769409,
-0.3089635968208313,
0.031984634697437286,
-0.07702527940273285,
-0.15608656406402588,
-0.17836494743824005,
-0.47637781500816345,
0.14448827505111694,
0.48256373405456543,
0.04637745022773743,
-0.11087465286254883,
0.1214948445558548,
-0.027025830000638962,
-0.03767902031540871,
-0.16560828685760498,
0.08205262571573257,
-0.17696717381477356,
-0.026969444006681442,
-0.241463765501976,
-0.27688485383987427
] |
https://github.com/huggingface/datasets/issues/6352
|
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
|
+1
```
Found cached dataset csv ([file://C:/Users/Shady/.cache/huggingface/datasets/knkarthick___csv/knkarthick--dialogsum-cd36827d3490488d/0.0.0/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1](file:///C:/Users/Shady/.cache/huggingface/datasets/knkarthick___csv/knkarthick--dialogsum-cd36827d3490488d/0.0.0/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1))
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In[38], line 3
1 huggingface_dataset_name = "knkarthick/dialogsum"
----> 3 dataset = load_dataset(huggingface_dataset_name)
File D:\Desktop\Workspace\GenAI\genai\lib\site-packages\datasets\load.py:1804, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1800 # Build dataset for splits
1801 keep_in_memory = (
1802 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1803 )
-> 1804 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
1805 # Rename and cast features to match task schema
1806 if task is not None:
File D:\Desktop\Workspace\GenAI\genai\lib\site-packages\datasets\builder.py:1108, in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory)
1106 is_local = not is_remote_filesystem(self._fs)
1107 if not is_local:
-> 1108 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
1109 if not os.path.exists(self._output_dir):
1110 raise FileNotFoundError(
1111 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call "
1112 "builder.download_and_prepare(), or use "
1113 "datasets.load_dataset() before trying to access the Dataset object."
1114 )
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
```
|
I was trying to load the wiki dataset, but i got this error
traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train')
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset
raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
| 175
|
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
I was trying to load the wiki dataset, but i got this error
traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train')
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset
raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
+1
```
Found cached dataset csv ([file://C:/Users/Shady/.cache/huggingface/datasets/knkarthick___csv/knkarthick--dialogsum-cd36827d3490488d/0.0.0/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1](file:///C:/Users/Shady/.cache/huggingface/datasets/knkarthick___csv/knkarthick--dialogsum-cd36827d3490488d/0.0.0/6954658bab30a358235fa864b05cf819af0e179325c740e4bc853bcc7ec513e1))
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In[38], line 3
1 huggingface_dataset_name = "knkarthick/dialogsum"
----> 3 dataset = load_dataset(huggingface_dataset_name)
File D:\Desktop\Workspace\GenAI\genai\lib\site-packages\datasets\load.py:1804, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1800 # Build dataset for splits
1801 keep_in_memory = (
1802 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1803 )
-> 1804 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
1805 # Rename and cast features to match task schema
1806 if task is not None:
File D:\Desktop\Workspace\GenAI\genai\lib\site-packages\datasets\builder.py:1108, in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory)
1106 is_local = not is_remote_filesystem(self._fs)
1107 if not is_local:
-> 1108 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
1109 if not os.path.exists(self._output_dir):
1110 raise FileNotFoundError(
1111 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call "
1112 "builder.download_and_prepare(), or use "
1113 "datasets.load_dataset() before trying to access the Dataset object."
1114 )
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
```
|
[
-0.2221677154302597,
-0.21753457188606262,
-0.05269873887300491,
0.3149648904800415,
0.2889442443847656,
0.30626943707466125,
0.2462483048439026,
0.4402700960636139,
0.4070063531398773,
-0.022960200905799866,
0.0835910364985466,
0.12875190377235413,
-0.07824687659740448,
0.017832348123192787,
-0.05677403509616852,
-0.21034857630729675,
0.07324272394180298,
0.06333032995462418,
0.09232323616743088,
0.015873901546001434,
-0.24962809681892395,
0.16997884213924408,
-0.2754528224468231,
0.17851652204990387,
-0.43127384781837463,
-0.040971383452415466,
-0.02205287292599678,
0.22833406925201416,
-0.05985041707754135,
-0.36839595437049866,
0.46098944544792175,
-0.13731561601161957,
0.3549604117870331,
0.3468276858329773,
-0.00010862593626370654,
0.22044850885868073,
0.42930275201797485,
0.0032797791063785553,
-0.4315219819545746,
-0.01462814211845398,
-0.26947298645973206,
-0.3478531539440155,
0.23633603751659393,
-0.3062009811401367,
-0.10575470328330994,
-0.04241654649376869,
-0.049437038600444794,
-0.32576242089271545,
0.4434680938720703,
0.33413150906562805,
0.2449900507926941,
0.12554094195365906,
0.29649651050567627,
0.05709473416209221,
-0.02171064168214798,
-0.2113974243402481,
-0.1231512725353241,
0.10243947803974152,
0.07010083645582199,
-0.14078357815742493,
0.013373643159866333,
0.04430519416928291,
-0.1396303027868271,
0.1980670541524887,
0.36122623085975647,
0.04171762615442276,
0.1733858585357666,
-0.3602564334869385,
0.30980589985847473,
0.303277850151062,
0.9261816143989563,
0.050671953707933426,
-0.24762099981307983,
-0.1556365191936493,
-0.09252925217151642,
-0.026665624231100082,
0.43103307485580444,
0.07085542380809784,
-0.325660765171051,
0.19000980257987976,
-0.18473298847675323,
-0.18471291661262512,
0.01004616916179657,
0.1946433186531067,
0.024795345962047577,
0.5732225179672241,
0.020756715908646584,
0.20311230421066284,
-0.018642526119947433,
-0.1356770545244217,
0.5156365036964417,
-0.17609946429729462,
-0.036987725645303726,
0.3710063099861145,
-0.39041537046432495,
0.125375434756279,
-0.23530659079551697,
0.15227626264095306,
0.07168910652399063,
-0.11699096858501434,
-0.02126573771238327,
0.07356846332550049,
0.09040697664022446,
0.14738166332244873,
0.3273716866970062,
0.3576522767543793,
0.00703759491443634,
0.09279061108827591,
-0.010378360748291016,
0.06962866336107254,
-0.09607115387916565,
-0.1552199423313141,
-0.28358224034309387,
-0.25263604521751404,
-0.00963938795030117,
-0.08035524189472198,
0.06198517233133316,
-0.27497872710227966,
-0.10836276412010193,
0.026273610070347786,
0.2387526035308838,
-0.05392567813396454,
0.02158832922577858,
0.3087646961212158,
-0.0969766229391098,
0.42382076382637024,
0.00803389772772789,
0.07697983831167221,
-0.1570979654788971,
0.12911896407604218,
-0.14742526412010193,
0.07302527129650116,
-0.14620988070964813,
0.08952438831329346,
0.062466155737638474,
-0.14403213560581207,
0.4157056212425232,
-0.06603971123695374,
-0.03672891855239868,
-0.17911218106746674,
-0.0021453704684972763,
0.008812092244625092,
-0.04972038418054581,
0.36438706517219543,
-0.17128458619117737,
0.36726000905036926,
0.4248766005039215,
-0.26744455099105835,
-0.1777496188879013,
0.23344868421554565,
-0.6670094728469849,
-0.4564397633075714,
-0.2524007558822632,
0.1906140148639679,
-0.012787916697561741,
-0.16643039882183075,
-0.22068005800247192,
-0.019754484295845032,
0.3343755304813385,
-0.33735913038253784,
-0.026645608246326447,
-0.17817731201648712,
-0.22943143546581268,
-0.22402642667293549,
0.38241440057754517,
0.13051748275756836,
-0.4063441753387451,
-0.0477474108338356,
-0.2630004584789276,
-0.08557027578353882,
0.1322411447763443,
0.15439587831497192,
-0.3339671194553375,
0.3489533066749573,
-0.2543797791004181,
0.03626991808414459,
0.3588937520980835,
-0.3880977928638458,
-0.5362404584884644,
0.02717965468764305,
-0.10251016914844513,
0.2824682295322418,
-0.19253838062286377,
0.011935494840145111,
-0.17289210855960846,
-0.12523120641708374,
0.1681024134159088,
0.33672577142715454,
0.06538372486829758,
0.12781475484371185,
-0.29388225078582764,
-0.3813133239746094,
0.32287561893463135,
0.22177055478096008,
0.18537959456443787,
-0.020392924547195435,
0.08400693535804749,
0.2548348605632782,
0.2106015682220459,
-0.06950302422046661,
0.0341363325715065,
0.3098803162574768,
0.020967883989214897,
-0.049233272671699524,
0.008174536749720573,
0.061042770743370056,
-0.517500638961792,
0.42897850275039673,
0.016794010996818542,
-0.054149478673934937,
0.06809225678443909,
-0.08597804605960846,
-0.27564266324043274,
0.00586816668510437,
-0.479507714509964,
-0.29774317145347595,
0.17302022874355316,
0.18107318878173828,
0.25433704257011414,
0.15336060523986816,
-0.1819232851266861,
-0.03173770755529404,
-0.17990310490131378,
-0.016280770301818848,
-0.11061574518680573,
0.12108878791332245,
-0.0015177670866250992,
0.009743298403918743,
-0.08906076848506927,
0.19831165671348572,
0.026125997304916382,
-0.07808003574609756,
-0.30690497159957886,
0.32728326320648193,
0.03151138871908188,
0.17687362432479858,
0.02311640977859497,
-0.06908294558525085,
-0.019262956455349922,
-0.15156492590904236,
-0.048189423978328705,
0.014509742148220539,
0.2130979597568512,
-0.1769922971725464,
0.032090265303850174,
0.10967207700014114,
0.11418449878692627,
0.33862772583961487,
-0.11876822263002396,
0.13714906573295593,
0.08326849341392517,
0.04407702758908272,
0.3049246072769165,
-0.09190889447927475,
0.08328753709793091,
0.06748795509338379,
-0.009899334982037544,
-0.18242263793945312,
0.2996543049812317,
-0.14584386348724365,
0.403723806142807,
0.15964362025260925,
0.15636511147022247,
0.16273146867752075,
-0.16755199432373047,
-0.21245655417442322,
0.21100005507469177,
-0.04186456650495529,
0.28883492946624756,
0.023901209235191345,
-0.023645620793104172,
-0.06611157208681107,
0.22194959223270416,
-0.007472365163266659,
0.22001168131828308,
0.12875896692276,
0.2732967436313629,
0.33337587118148804,
-0.0006395443342626095,
-0.10397270321846008,
-0.19813621044158936,
0.22139817476272583,
0.11400008946657181,
0.3774976432323456,
-0.09008754789829254,
0.07490736246109009,
-0.19288703799247742,
0.3913189172744751,
0.1991448998451233,
-0.13407157361507416,
-0.23964950442314148,
-0.5283181071281433,
-0.05214342474937439,
0.18321482837200165,
0.12276563048362732,
0.23863014578819275,
-0.31862872838974,
0.10889331996440887,
0.05582406371831894,
-0.12054417282342911,
-0.21174262464046478,
-0.4047449231147766,
-0.3804585337638855,
0.11795510351657867,
0.45597049593925476,
0.10531548410654068,
0.27068477869033813,
-0.13148993253707886,
-0.055687952786684036,
-0.3451099693775177,
-0.11275806277990341,
0.07317932695150375,
-0.3026014566421509,
0.3472577929496765,
-0.031978853046894073,
0.4289841055870056,
-0.36846888065338135,
-0.5443592071533203,
0.3728659451007843,
-0.3767397403717041,
-0.043149009346961975,
0.04326406121253967,
0.08870331197977066,
-0.026319177821278572,
0.08223854005336761,
-0.23472124338150024,
-0.4115648865699768,
-0.23598968982696533,
-0.06907640397548676,
0.1543482542037964,
-0.051145441830158234,
-0.064241424202919,
0.1585041582584381,
0.1583552062511444,
0.09803355485200882,
-0.09657921642065048,
-0.2634228765964508,
-0.3987399637699127,
0.20760689675807953,
-0.22563397884368896,
-0.2989865243434906,
0.0647602528333664,
0.11062026023864746,
0.200654536485672,
-0.09742803871631622,
-0.5503265857696533,
-0.06777243316173553,
-0.10577873885631561,
0.2542109787464142,
0.0013354979455471039,
0.008464742451906204,
0.24281935393810272,
0.0346054770052433,
-0.03161986172199249,
-0.016329314559698105,
0.19855059683322906,
-0.09919529408216476,
-0.27007654309272766,
0.20743228495121002,
0.1884303092956543,
0.2903737425804138,
-0.14243529736995697,
0.8331688046455383,
0.26030433177948,
0.04449900984764099,
0.359014093875885,
-0.0500195249915123,
0.07098472118377686,
-0.3170539438724518,
-0.2751651704311371,
0.28803732991218567,
-0.15724211931228638,
-0.08014892041683197,
0.3259771466255188,
0.02356506511569023,
-0.27199774980545044,
-0.3389148414134979,
0.03295021131634712,
-0.41129183769226074,
-0.3074592351913452,
0.053755924105644226,
0.1439150869846344,
0.12886513769626617,
-0.05832904204726219,
-0.005075275897979736,
-0.1854802519083023,
-0.45099180936813354,
0.2767098546028137,
0.27379393577575684,
-0.1057659313082695,
-0.015305635519325733,
-0.4270731806755066,
-0.21752417087554932,
-0.5629857778549194,
0.2716643214225769,
0.223946675658226,
0.3577612340450287,
-0.07259221374988556,
-0.010105965659022331,
0.15115131437778473,
-0.03501063212752342,
0.42712587118148804,
-0.44026505947113037,
-0.05839607119560242,
0.20762528479099274,
0.1613234281539917,
-0.18093439936637878,
-0.1402548849582672,
-0.09503419697284698,
0.41244396567344666,
-0.02704744040966034,
0.06009909510612488,
-0.16640843451023102,
-0.13308945298194885,
0.057129595428705215,
0.2686867117881775,
-0.2820633351802826,
-0.35120150446891785,
-0.22520723938941956,
-0.16315580904483795,
-0.30545222759246826,
-0.1786525547504425,
-0.16177532076835632,
0.4035680294036865,
-0.253641813993454,
0.013391990214586258,
-0.4146925210952759,
0.23219364881515503,
-0.012210801243782043,
0.014004213735461235,
0.3264375925064087,
0.1555177867412567,
-0.07046946883201599,
0.15890026092529297,
0.05929575115442276,
0.05704289674758911,
0.6163005232810974,
-0.034500036388635635,
0.018702425062656403,
0.024722380563616753,
-0.048769090324640274,
-0.01992601901292801,
0.0022460967302322388,
-0.10198380798101425,
-0.07166626304388046,
0.06881772726774216,
0.062420375645160675,
-0.11582323163747787,
0.037055209279060364,
0.24652200937271118,
0.06710626184940338,
-0.37093016505241394,
-0.36551183462142944,
0.6527916193008423,
0.15658201277256012,
-0.036014556884765625,
0.3041408658027649,
0.19027122855186462,
-0.28135740756988525,
-0.03946271911263466,
0.3450566530227661,
0.8828228116035461,
-0.22788585722446442,
0.13842645287513733,
0.20605039596557617,
0.4840795397758484,
0.38962289690971375,
-0.38422220945358276,
0.10148060321807861,
-0.3369092345237732,
-0.2474018782377243,
-0.1836753487586975,
0.053306642919778824,
0.018936026841402054,
0.016168512403964996,
-0.26844409108161926,
0.2158089429140091,
-0.277965784072876,
0.3500024378299713,
-0.02766554243862629,
0.28278738260269165,
-0.21171367168426514,
-0.07794301211833954,
-0.3090009391307831,
0.1774463653564453,
-0.050438009202480316,
0.2526528239250183,
-0.23171189427375793,
0.10212875157594681,
0.06720373034477234,
-0.17795084416866302,
-0.3874056339263916,
0.09253630042076111,
-0.1541837900876999,
0.5257838368415833,
-0.2584327161312103,
-0.27665817737579346,
-0.05228899419307709,
0.5480844378471375,
0.4795524477958679,
0.08915175497531891,
-0.3308248519897461,
0.222136452794075,
-0.08678696304559708,
-0.3305085599422455,
-0.2549273371696472,
0.06361616402864456,
0.2538628578186035,
-0.12618884444236755,
-0.2938455045223236,
0.32964423298835754,
-0.36450716853141785,
-0.3226172924041748,
0.0686819851398468,
-0.08871248364448547,
0.29775670170783997,
-0.2896961271762848,
-0.5645925998687744,
-0.013679824769496918,
-0.09347712993621826,
-0.05030478164553642,
0.12461434304714203,
-0.001112222671508789,
-0.01597250998020172,
-0.01834259182214737,
0.2246038019657135,
-0.25921010971069336,
0.11678394675254822,
0.448647677898407,
0.16639265418052673,
-0.15590158104896545,
0.883838415145874,
0.1256350576877594,
-0.19606763124465942,
-0.22302022576332092,
-0.02140973135828972,
0.21228888630867004,
-0.2144148051738739,
-0.1639416366815567,
0.17033419013023376,
0.13307605683803558,
-0.062147874385118484,
0.5394942760467529,
0.29338744282722473,
0.022168278694152832,
-0.07151561975479126,
-0.490313857793808,
-0.2455509752035141,
0.19510596990585327,
-0.1334446668624878,
0.2413434088230133,
0.027871444821357727,
-0.38857096433639526,
0.028177546337246895,
0.13432231545448303,
-0.29227036237716675,
0.058853887021541595,
-0.2814665734767914,
-0.09015867114067078,
0.09789712727069855,
0.08055581152439117,
0.2756583094596863,
0.12182801961898804,
0.14848580956459045,
0.07489144057035446,
-0.14287061989307404,
-0.26582270860671997,
0.010595060884952545,
0.18383556604385376,
0.25336596369743347,
-0.2171388417482376,
-0.015214142389595509,
-0.2539639174938202,
0.016043279320001602,
-0.2042214423418045,
0.23426112532615662,
-0.04583941772580147,
-0.08356975018978119,
0.05104519799351692,
0.338751882314682,
0.19775733351707458,
-0.30292177200317383,
0.3161885738372803,
-0.23435047268867493,
0.062176015228033066,
0.01928023062646389,
-0.07223985344171524,
0.30046460032463074,
0.10335665941238403,
0.136908158659935,
0.1614488959312439,
0.15574273467063904,
0.11480993777513504,
0.21553152799606323,
-0.4159312844276428,
0.05678906664252281,
0.14266741275787354,
0.0023098252713680267,
0.48595696687698364,
-0.22643479704856873,
0.03625921905040741,
0.3418577313423157,
0.25640255212783813,
-0.09509433060884476,
-0.2818187177181244,
0.22944414615631104,
0.016063621267676353,
-0.06829621642827988,
0.009664371609687805,
0.16302691400051117,
-0.4421417713165283,
-0.016048192977905273,
0.07073962688446045,
0.25568288564682007,
-0.40583693981170654,
0.13923174142837524,
0.47576916217803955,
-0.05202886089682579,
-0.05930083617568016,
-0.04874701797962189,
-0.031404148787260056,
0.06522118300199509,
0.1978539526462555,
-0.28805142641067505,
0.2667449712753296,
-0.14951595664024353,
0.2283438742160797,
-0.2634660303592682,
-0.5860162377357483,
0.525664746761322,
0.10345898568630219,
-0.2066935896873474,
0.2391185760498047,
0.019155889749526978,
0.13707934319972992,
-0.06904556602239609,
0.029117146506905556,
-0.44747331738471985,
0.2217063009738922,
-0.15755224227905273,
-0.2281351536512375,
-0.0024124085903167725,
-0.2196437418460846,
0.09128919243812561,
0.05066319927573204,
-0.1003798246383667,
-0.19132237136363983,
0.07776137441396713,
0.11392910778522491,
-0.18280600011348724,
-0.16249226033687592,
0.15339010953903198,
0.36050930619239807,
0.1122681275010109,
-0.1818157285451889,
0.21689462661743164,
0.14344410598278046,
0.036463748663663864,
0.019847266376018524,
0.24454191327095032,
0.39933139085769653,
0.4263887107372284,
-0.36269596219062805,
0.036057617515325546,
0.017197376117110252,
0.005538487806916237,
0.04952365159988403,
0.4188915491104126,
0.02563132718205452,
-0.03683101013302803,
0.328274667263031,
0.20663827657699585,
-0.15832050144672394,
-0.07569204270839691,
-0.1862051784992218,
0.28472381830215454,
-0.2533951699733734,
-0.14503410458564758,
0.1330243945121765,
0.005982503294944763,
-0.09366369247436523,
0.25290796160697937,
-0.28570035099983215,
0.08612983673810959,
0.13748617470264435,
-0.05681712552905083,
0.1972898244857788,
-0.048846807330846786,
0.08033974468708038,
-0.19628682732582092,
0.6226210594177246,
0.4900020956993103,
-0.09911201149225235,
-0.11442192643880844,
-0.19354501366615295,
-0.602260947227478,
0.22437557578086853,
-0.21460247039794922,
-0.27499669790267944,
0.22268415987491608,
-0.20923912525177002,
-0.04547623544931412,
0.32840555906295776,
0.08632771670818329,
0.09679482877254486,
-0.05868102237582207,
0.060230888426303864,
-0.36121270060539246,
-0.15371325612068176,
0.03605572506785393,
0.03848870098590851,
-0.12280010432004929,
-0.4738612473011017,
0.20224671065807343,
-0.08751299977302551,
0.01263761892914772,
-0.13752540946006775,
0.13164469599723816,
-0.002531975507736206,
-0.23794004321098328,
0.3885871171951294,
0.21750494837760925,
0.480527400970459,
-0.009271366521716118,
-0.0537729449570179,
-0.41411441564559937,
-0.2797306478023529,
-0.13814668357372284,
0.167099267244339,
-0.04861915484070778,
0.30434250831604004,
-0.24832239747047424,
-0.035112570971250534,
-0.21112708747386932,
0.2378561794757843,
0.1421786993741989,
0.2882172167301178,
-0.11677931994199753,
-0.09823610633611679,
0.09162994474172592,
0.10572955757379532,
0.4479825794696808,
0.2896871268749237,
0.06225505471229553,
0.1109493225812912,
-0.07257332652807236,
-0.1908254772424698,
0.4050971269607544,
-0.4413760304450989,
-0.2967063784599304,
0.02106940746307373,
-0.09031590819358826,
-0.1393071711063385,
-0.12404639273881912,
-0.5088819265365601,
0.13426604866981506,
0.49273812770843506,
0.07159125804901123,
-0.08924127370119095,
0.1317150592803955,
0.020043814554810524,
-0.03843138739466667,
-0.15594005584716797,
0.08630071580410004,
-0.18300750851631165,
-0.017440885305404663,
-0.23490013182163239,
-0.28018656373023987
] |
https://github.com/huggingface/datasets/issues/6352
|
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
|
This error stems from a breaking change in `fsspec`. It has been fixed in the latest `datasets` release (`2.14.6`). Updating the installation with `pip install -U datasets` should fix the issue.
|
I was trying to load the wiki dataset, but i got this error
traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train')
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset
raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
| 31
|
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
I was trying to load the wiki dataset, but i got this error
traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train')
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset
raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
This error stems from a breaking change in `fsspec`. It has been fixed in the latest `datasets` release (`2.14.6`). Updating the installation with `pip install -U datasets` should fix the issue.
|
[
-0.3686904311180115,
-0.10481403768062592,
0.0012889057397842407,
0.19462135434150696,
0.27150213718414307,
0.0910445973277092,
0.062022943049669266,
0.3505299985408783,
0.38558274507522583,
0.036840327084064484,
0.15493632853031158,
0.20195272564888,
-0.0501236766576767,
0.28850099444389343,
-0.1578100323677063,
-0.18020027875900269,
0.19849669933319092,
0.13243262469768524,
-0.0227469801902771,
0.09337563812732697,
-0.18804307281970978,
0.2896002233028412,
-0.28691366314888,
0.1582290530204773,
-0.367387592792511,
0.07463402301073074,
-0.04026762396097183,
0.2340298891067505,
-0.17717504501342773,
-0.5925011038780212,
0.558570146560669,
-0.18501625955104828,
0.2908708155155182,
0.29855093359947205,
-0.00011634402471827343,
0.14387336373329163,
0.45930206775665283,
0.017602620646357536,
-0.32629871368408203,
0.07457851618528366,
-0.3162565231323242,
-0.4375722408294678,
0.24257679283618927,
-0.17847958207130432,
-0.06227414309978485,
-0.16781796514987946,
-0.04932359606027603,
-0.2946435213088989,
0.46597081422805786,
0.4910893738269806,
0.19855745136737823,
0.09446293860673904,
0.3235306143760681,
-0.0348639041185379,
0.0327923558652401,
-0.3149282932281494,
-0.137303426861763,
-0.2877731919288635,
0.0026452094316482544,
-0.25649264454841614,
0.06706901639699936,
-0.020498991012573242,
-0.09227927029132843,
0.15789516270160675,
0.3620060086250305,
-0.09065369516611099,
0.2521485686302185,
-0.35580751299858093,
0.27663207054138184,
0.2639274597167969,
0.8795590996742249,
0.04918805882334709,
-0.3613976538181305,
-0.1211293488740921,
-0.12851925194263458,
0.05975186824798584,
0.3696489632129669,
-0.11422660946846008,
-0.2869880795478821,
0.1349252611398697,
0.07889584451913834,
-0.267742782831192,
0.025220677256584167,
0.24147388339042664,
0.005614630877971649,
0.4050338566303253,
-0.018552005290985107,
0.17251428961753845,
-0.0281045101583004,
-0.26232898235321045,
0.44268953800201416,
-0.06022593379020691,
-0.13305990397930145,
0.265934556722641,
-0.36889830231666565,
0.08732223510742188,
-0.005626901984214783,
0.18265752494335175,
-0.039464037865400314,
-0.09487953782081604,
-0.2946099638938904,
0.14752107858657837,
0.09561315923929214,
0.20161309838294983,
0.25061559677124023,
0.2449883371591568,
0.12259777635335922,
0.11649393290281296,
-0.02255241572856903,
-0.04551397264003754,
-0.05731390789151192,
-0.1911315619945526,
-0.14931893348693848,
-0.37577036023139954,
-0.24034717679023743,
-0.07304771989583969,
0.04634916037321091,
-0.296186238527298,
-0.14285947382450104,
0.060023847967386246,
0.38763320446014404,
-0.03305038809776306,
-0.10977555811405182,
0.330409973859787,
-0.03362094983458519,
0.6192829012870789,
0.037528105080127716,
0.1034620925784111,
-0.30034512281417847,
0.17665766179561615,
-0.10922086238861084,
-0.029919307678937912,
-0.2068375200033188,
0.05519849807024002,
0.03769197687506676,
-0.017139751464128494,
0.3505591154098511,
-0.12677563726902008,
-0.08604161441326141,
-0.05210832133889198,
-0.1729847490787506,
0.05650637671351433,
-0.01774243265390396,
0.4507424533367157,
-0.25740373134613037,
0.38512420654296875,
0.35363829135894775,
-0.26366275548934937,
-0.21497690677642822,
0.21083492040634155,
-0.5810539126396179,
-0.428280770778656,
-0.30448806285858154,
0.11523603647947311,
0.061226874589920044,
-0.22481733560562134,
-0.3197891116142273,
-0.028307970613241196,
0.20207512378692627,
-0.49675559997558594,
-0.01946225017309189,
-0.3304656147956848,
-0.344847708940506,
-0.16760128736495972,
0.23141467571258545,
0.16789227724075317,
-0.3113575875759125,
-0.13699209690093994,
-0.32650962471961975,
-0.12892282009124756,
0.11477074027061462,
0.10889884829521179,
-0.26082921028137207,
0.26422587037086487,
-0.17020387947559357,
0.022535450756549835,
0.45764681696891785,
-0.48783132433891296,
-0.6016173362731934,
0.09888917207717896,
0.07407546043395996,
0.1492348313331604,
-0.1896822452545166,
-0.15696020424365997,
-0.032872796058654785,
-0.1394094079732895,
-0.0018783584237098694,
0.24707096815109253,
0.026875117793679237,
0.209090456366539,
-0.21046239137649536,
-0.5126625299453735,
0.44056153297424316,
0.13568349182605743,
0.25932303071022034,
0.08822132647037506,
0.07563138008117676,
0.2839657962322235,
0.24923491477966309,
-0.03037865087389946,
0.02469743601977825,
0.3083900809288025,
0.3076744079589844,
0.019170742481946945,
0.05188619717955589,
-0.1989627480506897,
-0.4362226724624634,
0.43676134943962097,
-0.05467086285352707,
-0.08255624771118164,
0.07426571846008301,
0.03306233882904053,
-0.2508901059627533,
0.062253326177597046,
-0.3323437571525574,
-0.3530906140804291,
0.07186484336853027,
0.13288934528827667,
0.24195468425750732,
0.1468663215637207,
-0.15967771410942078,
0.021972613409161568,
-0.10022054612636566,
-0.01850534975528717,
-0.07616785168647766,
0.20246165990829468,
0.016849862411618233,
-0.06497101485729218,
-0.09271053969860077,
0.2906098961830139,
0.13821476697921753,
-0.08305273205041885,
-0.34914231300354004,
0.39595863223075867,
0.3168478310108185,
0.1080600693821907,
-0.021627284586429596,
0.059553615748882294,
-0.05064183473587036,
-0.23744450509548187,
-0.049629852175712585,
0.0907922238111496,
0.14523862302303314,
-0.041686512529850006,
0.07125796377658844,
-0.045131802558898926,
0.11490841209888458,
0.4116952121257782,
-0.13027332723140717,
0.19412268698215485,
0.1746850311756134,
0.003063548356294632,
0.23174452781677246,
-0.13377878069877625,
0.040174227207899094,
0.10995529592037201,
-0.004320614039897919,
-0.15187206864356995,
0.4029604494571686,
-0.04112230986356735,
0.4569433927536011,
0.2147933542728424,
0.007432702928781509,
0.3039594888687134,
-0.13566458225250244,
-0.17085373401641846,
0.3407023549079895,
-0.021707646548748016,
0.3005521893501282,
0.04154902324080467,
-0.1546357274055481,
-0.006606852635741234,
0.20285247266292572,
0.08317979425191879,
0.30519652366638184,
0.14579910039901733,
0.1827736496925354,
0.2890923321247101,
0.12473982572555542,
-0.025644246488809586,
-0.23428842425346375,
0.18775948882102966,
-0.01856324076652527,
0.39358556270599365,
-0.13057130575180054,
0.17584259808063507,
-0.30181369185447693,
0.3214177191257477,
0.09340492635965347,
-0.06273570656776428,
-0.038992080837488174,
-0.4836196005344391,
-0.04636859893798828,
0.23451974987983704,
0.11837626993656158,
0.28823143243789673,
-0.23259688913822174,
0.11282936483621597,
0.05957258492708206,
-0.023462491109967232,
-0.2208728790283203,
-0.26737189292907715,
-0.4327751696109772,
0.012182220816612244,
0.4483380913734436,
0.24431608617305756,
0.1415279060602188,
-0.03705591708421707,
-0.06249772384762764,
-0.3535410165786743,
-0.19438427686691284,
0.05580228939652443,
-0.2386947125196457,
0.409518837928772,
0.018910259008407593,
0.2950243353843689,
-0.12835964560508728,
-0.42092835903167725,
0.31718143820762634,
-0.5252513885498047,
-0.008779306896030903,
0.03777747601270676,
0.03523537516593933,
-0.158053457736969,
0.0186835415661335,
-0.3119364082813263,
-0.37885230779647827,
-0.2075706124305725,
0.0832844153046608,
0.026731103658676147,
-0.024276383221149445,
-0.0977899581193924,
0.18030382692813873,
-0.023985818028450012,
-0.07352647930383682,
-0.16616936028003693,
-0.1982281655073166,
-0.28235599398612976,
0.12926962971687317,
-0.3014158010482788,
-0.34464946389198303,
0.08708873391151428,
0.17301639914512634,
0.061766766011714935,
-0.13759994506835938,
-0.4834522008895874,
-0.04346640408039093,
-0.2314353734254837,
0.28395503759384155,
-0.036174677312374115,
0.13066205382347107,
0.4148081839084625,
0.14243429899215698,
-0.0040974002331495285,
-0.159250408411026,
0.22566312551498413,
-0.11872761696577072,
-0.14151519536972046,
0.13942314684391022,
0.0720607191324234,
0.21858596801757812,
-0.10217946767807007,
0.7706566452980042,
0.42925429344177246,
0.058496829122304916,
0.3065062165260315,
-0.21664197742938995,
0.08565492928028107,
-0.3621177077293396,
-0.2712082862854004,
0.28468048572540283,
-0.2396269142627716,
-0.029564205557107925,
0.2946200370788574,
0.052915509790182114,
-0.2152126282453537,
-0.20790140330791473,
0.3027748763561249,
-0.3883724808692932,
-0.29880595207214355,
-0.020261002704501152,
0.15600372850894928,
0.22489643096923828,
0.030429694801568985,
0.10359186679124832,
-0.14774033427238464,
-0.36670568585395813,
0.2852037847042084,
0.21678224205970764,
-0.18094724416732788,
-0.018942924216389656,
-0.39273327589035034,
-0.27435731887817383,
-0.6062972545623779,
0.20419681072235107,
0.2191113829612732,
0.46215739846229553,
-0.08198434114456177,
0.025465231388807297,
0.09619325399398804,
-0.04273271933197975,
0.37287092208862305,
-0.4928564429283142,
-0.06664169579744339,
0.2560068964958191,
0.22759264707565308,
-0.3565641939640045,
-0.21138548851013184,
-0.033301424235105515,
0.31027597188949585,
-0.04103967174887657,
-0.0667867362499237,
-0.15030986070632935,
-0.2763519883155823,
-0.007298380136489868,
0.1574239432811737,
-0.2433062642812729,
-0.1186501681804657,
-0.19988301396369934,
-0.03221843019127846,
-0.31382760405540466,
-0.30589979887008667,
-0.11524751782417297,
0.3864087760448456,
-0.3172565698623657,
0.0544174499809742,
-0.3814696967601776,
0.2445906698703766,
-0.07488904893398285,
0.013154301792383194,
0.3326945900917053,
0.12587568163871765,
-0.054015614092350006,
0.14197157323360443,
-0.05332249402999878,
0.20716269314289093,
0.6282252073287964,
-0.08878527581691742,
-0.031081318855285645,
0.05916815623641014,
0.06869615614414215,
-0.048175595700740814,
0.10201045870780945,
-0.1882605403661728,
-0.12207824736833572,
-0.006251322105526924,
0.1464444100856781,
-0.2539961636066437,
0.11662278324365616,
0.3608325719833374,
0.12061210721731186,
-0.18193110823631287,
-0.36365941166877747,
0.7125649452209473,
0.1771269142627716,
-0.07842682301998138,
0.2766072452068329,
0.32459911704063416,
-0.21012352406978607,
0.19920124113559723,
0.11176499724388123,
0.7636163830757141,
-0.11665122210979462,
0.18919305503368378,
0.19102555513381958,
0.3818984031677246,
0.3047081232070923,
-0.4077814221382141,
-0.01545003056526184,
-0.2791961431503296,
-0.1823684573173523,
-0.18072186410427094,
0.0018805712461471558,
0.20730605721473694,
-0.02411597967147827,
-0.22827106714248657,
0.3248753845691681,
-0.08803588896989822,
0.14475496113300323,
0.02533707581460476,
0.27057579159736633,
-0.09808476269245148,
-0.12803293764591217,
-0.3409913182258606,
0.19283168017864227,
0.02392435073852539,
0.29028546810150146,
-0.16252198815345764,
0.12905147671699524,
0.03345916047692299,
-0.16621099412441254,
-0.6019218564033508,
0.1278698444366455,
-0.09774646162986755,
0.4767999053001404,
-0.07505439221858978,
-0.08628255128860474,
0.09308843314647675,
0.5330826044082642,
0.3342377543449402,
0.1057148277759552,
-0.4461604356765747,
0.2785634696483612,
-0.08268507570028305,
-0.22244112193584442,
-0.10617241263389587,
0.053690195083618164,
0.16529075801372528,
-0.09279544651508331,
-0.29046306014060974,
0.1897377073764801,
-0.393606036901474,
-0.23486945033073425,
0.17855322360992432,
-0.022553592920303345,
0.43043947219848633,
-0.3369985520839691,
-0.5449537038803101,
0.0719854086637497,
0.08481992781162262,
-0.08451119065284729,
0.08292874693870544,
0.0014169961214065552,
-0.08172885328531265,
0.26006874442100525,
0.15482251346111298,
-0.2100650519132614,
0.14989346265792847,
0.43079131841659546,
-0.051941171288490295,
-0.07504022121429443,
0.8685647249221802,
0.03657585009932518,
-0.17252084612846375,
-0.18250593543052673,
0.013584494590759277,
0.09117679297924042,
-0.18832048773765564,
-0.2688748240470886,
0.1280919313430786,
0.004812151193618774,
0.0899067223072052,
0.7709423303604126,
0.12416889518499374,
-0.02614467591047287,
-0.07514813542366028,
-0.33540838956832886,
-0.09891674667596817,
0.14987188577651978,
-0.14161784946918488,
0.2175309807062149,
-0.08562664687633514,
-0.20977595448493958,
-0.10892818123102188,
0.10790842026472092,
-0.2358749955892563,
0.16882486641407013,
-0.08769102394580841,
-0.02296121045947075,
0.1349676549434662,
0.07959666848182678,
0.31405210494995117,
-0.08082057535648346,
0.032100528478622437,
0.0934031754732132,
-0.22601869702339172,
-0.18710055947303772,
-0.1049116849899292,
0.1916656494140625,
0.3648654520511627,
-0.23732149600982666,
-0.05410027876496315,
-0.20597617328166962,
-0.030521824955940247,
-0.19590777158737183,
0.24115803837776184,
0.08676444739103317,
-0.143286794424057,
0.2613241374492645,
0.2972951829433441,
0.13545937836170197,
-0.08313015103340149,
0.39770933985710144,
-0.1062224954366684,
0.15639621019363403,
0.009371260181069374,
0.10442516207695007,
0.19697515666484833,
0.11167627573013306,
0.17126788198947906,
0.20819267630577087,
0.1778026521205902,
0.18907520174980164,
0.2113889753818512,
-0.4655376076698303,
0.06605608761310577,
0.1386987566947937,
0.05731106549501419,
0.5320174694061279,
-0.18603013455867767,
-0.007649977691471577,
0.448758602142334,
0.22256244719028473,
-0.15194237232208252,
-0.32623934745788574,
0.29838991165161133,
0.05221549794077873,
-0.045180872082710266,
-0.11552246659994125,
0.28347858786582947,
-0.5541703701019287,
0.07825307548046112,
0.15262627601623535,
0.00725611113011837,
-0.3082200884819031,
0.28923118114471436,
0.31905102729797363,
0.0053560771048069,
-0.0422915555536747,
0.006793040782213211,
-0.0833495557308197,
0.08440683037042618,
0.464446485042572,
-0.08382397145032883,
0.35250598192214966,
-0.07553140819072723,
0.26013749837875366,
-0.3514769375324249,
-0.618410050868988,
0.5184111595153809,
-0.16672572493553162,
-0.08349373936653137,
0.10259202122688293,
0.024137813597917557,
0.2345539629459381,
-0.10543184727430344,
-0.09500275552272797,
-0.41269925236701965,
0.21720878779888153,
-0.14238283038139343,
-0.4328012466430664,
0.2617794871330261,
-0.011600054800510406,
0.15946578979492188,
0.05163368955254555,
-0.13760362565517426,
-0.24540062248706818,
0.2824702262878418,
0.14041677117347717,
-0.18576942384243011,
-0.18940001726150513,
-0.05378800630569458,
0.30618056654930115,
0.1627429872751236,
-0.08613412082195282,
0.28739774227142334,
-0.02307450771331787,
-0.14879459142684937,
-0.04028395190834999,
0.2527250647544861,
0.4652913212776184,
0.3168196380138397,
-0.4822368621826172,
0.014281083829700947,
-0.008786365389823914,
0.06181056797504425,
0.1189393699169159,
0.41645169258117676,
-0.09835189580917358,
0.1401931792497635,
0.24457646906375885,
0.1380021721124649,
-0.1567010134458542,
-0.2337702065706253,
-0.24604247510433197,
0.3341362774372101,
-0.3358619511127472,
0.03188376873731613,
0.1369839310646057,
0.22685465216636658,
-0.10323455929756165,
0.3027467131614685,
-0.34437692165374756,
-0.003121626563370228,
0.23820726573467255,
-0.028634419664740562,
0.2305406630039215,
-0.09918475151062012,
0.057195425033569336,
-0.17646822333335876,
0.5425509810447693,
0.4524882733821869,
-0.030535802245140076,
0.009058145806193352,
-0.23782478272914886,
-0.5342156887054443,
0.118061363697052,
-0.23679006099700928,
-0.10061708837747574,
0.2568451166152954,
-0.10355808585882187,
-0.1505458652973175,
0.19608761370182037,
0.12227944284677505,
-0.001188104972243309,
-0.07029147446155548,
0.15139059722423553,
-0.3154137134552002,
0.03510501608252525,
-0.08973166346549988,
0.048525840044021606,
-0.07615390419960022,
-0.5238589644432068,
0.12622950971126556,
-0.1295783519744873,
-0.043037258088588715,
-0.05996832251548767,
-0.00486152246594429,
-0.06797093152999878,
-0.5225118398666382,
0.46008792519569397,
0.2624821662902832,
0.3570076823234558,
-0.07365740835666656,
-0.15221482515335083,
-0.42716658115386963,
-0.414114773273468,
-0.13730093836784363,
0.15950071811676025,
-0.17239782214164734,
0.3996727764606476,
-0.30769920349121094,
0.10379188507795334,
-0.25547873973846436,
0.10781367868185043,
0.15875063836574554,
0.1592666059732437,
-0.21880142390727997,
0.034717172384262085,
-0.027662355452775955,
0.14950300753116608,
0.22162902355194092,
0.2634088397026062,
0.04090370982885361,
0.20185545086860657,
-0.0034678131341934204,
-0.1701553910970688,
0.4411465525627136,
-0.43977075815200806,
-0.3185461759567261,
-0.04664986953139305,
0.0006973296403884888,
-0.19497206807136536,
-0.2484700083732605,
-0.5056133270263672,
0.050505392253398895,
0.31364676356315613,
0.09888337552547455,
-0.08442959189414978,
0.10236287117004395,
-0.13611046969890594,
-0.07134300470352173,
-0.19323469698429108,
0.3930705487728119,
-0.16409960389137268,
0.042284078896045685,
-0.03873903304338455,
-0.2749179005622864
] |
https://github.com/huggingface/datasets/issues/6352
|
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
|
> Which version of `fsspec` and OS are you using ?
`fsspec-2023.10.0` and Windows 10, guess fsspec version too old...
|
I was trying to load the wiki dataset, but i got this error
traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train')
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset
raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
| 20
|
Error loading wikitext data raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
I was trying to load the wiki dataset, but i got this error
traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train')
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/load.py", line 1804, in load_dataset
ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
File "/home/aelkordy/.conda/envs/prune_llm/lib/python3.9/site-packages/datasets/builder.py", line 1108, in as_dataset
raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
> Which version of `fsspec` and OS are you using ?
`fsspec-2023.10.0` and Windows 10, guess fsspec version too old...
|
[
-0.3441484570503235,
-0.22284260392189026,
-0.025703147053718567,
0.29061275720596313,
0.32129019498825073,
0.1246219351887703,
0.11653044819831848,
0.2996569871902466,
0.4202099144458771,
0.058271002024412155,
0.10787539184093475,
0.12942950427532196,
-0.047553956508636475,
0.3180031478404999,
-0.17992405593395233,
-0.14753036201000214,
0.1298893690109253,
0.03558410704135895,
0.015787020325660706,
0.03228863328695297,
-0.21679159998893738,
0.19356393814086914,
-0.2867782711982727,
0.13654939830303192,
-0.4367935061454773,
0.016130341216921806,
-0.08968174457550049,
0.258095920085907,
-0.1443760246038437,
-0.46550989151000977,
0.5282754898071289,
-0.20558378100395203,
0.3611181080341339,
0.29355138540267944,
-0.00011319133045617491,
0.11652444303035736,
0.44659876823425293,
-0.01960327848792076,
-0.25688448548316956,
0.06866514682769775,
-0.2679404020309448,
-0.3501776456832886,
0.24691088497638702,
-0.2257097363471985,
-0.1407109797000885,
-0.116936095058918,
-0.01622196100652218,
-0.24097393453121185,
0.4470425844192505,
0.44660812616348267,
0.23206186294555664,
0.03641755133867264,
0.26696422696113586,
0.03903037682175636,
0.020921975374221802,
-0.24934972822666168,
-0.11927539110183716,
-0.17727862298488617,
-0.02162989228963852,
-0.25197020173072815,
0.045298319309949875,
-0.044195257127285004,
-0.09015972912311554,
0.1623259335756302,
0.3543398082256317,
-0.039815038442611694,
0.3282170593738556,
-0.465483158826828,
0.2528393566608429,
0.20192471146583557,
0.9432770609855652,
0.12505166232585907,
-0.2828211784362793,
-0.07723824679851532,
-0.15850374102592468,
0.04942101985216141,
0.3573901653289795,
-0.010001597926020622,
-0.29062512516975403,
0.09223611652851105,
0.051134880632162094,
-0.2125045359134674,
0.013718709349632263,
0.21453212201595306,
0.1297406703233719,
0.3195068836212158,
-0.041102245450019836,
0.20854225754737854,
0.023395685479044914,
-0.28070223331451416,
0.37496593594551086,
-0.20080365240573883,
-0.011383827775716782,
0.3585398495197296,
-0.38993221521377563,
0.0795837789773941,
-0.04696144908666611,
0.09781001508235931,
-0.014163224026560783,
-0.07326564192771912,
-0.229779914021492,
0.07323897629976273,
0.09520439803600311,
0.20141249895095825,
0.2930401563644409,
0.27458563446998596,
0.12591829895973206,
0.06131131201982498,
-0.1438036412000656,
-0.054558224976062775,
-0.22208285331726074,
-0.16814008355140686,
-0.23660995066165924,
-0.321265310049057,
-0.19562049210071564,
0.02337193675339222,
0.07066838443279266,
-0.3867615759372711,
-0.12576226890087128,
0.08929663151502609,
0.3290770649909973,
-0.08203549683094025,
-0.04641614481806755,
0.38554972410202026,
-0.05554793030023575,
0.6016751527786255,
0.07145661115646362,
0.07759822905063629,
-0.2918054461479187,
0.08400818705558777,
-0.0995866134762764,
0.05557916685938835,
-0.23134340345859528,
0.09436654299497604,
0.066287562251091,
-0.09162260591983795,
0.31604352593421936,
-0.17719389498233795,
-0.15875189006328583,
-0.17641346156597137,
-0.11961956322193146,
-0.038074325770139694,
-0.03496020287275314,
0.4238166809082031,
-0.24033482372760773,
0.34871071577072144,
0.3591163754463196,
-0.22629523277282715,
-0.22958171367645264,
0.22796392440795898,
-0.6214272975921631,
-0.44084179401397705,
-0.23912502825260162,
0.1481555700302124,
0.07622036337852478,
-0.2063860297203064,
-0.296561598777771,
-0.01556551456451416,
0.26120439171791077,
-0.3417239487171173,
-0.037020303308963776,
-0.1919761300086975,
-0.42957693338394165,
-0.2079986184835434,
0.2732585370540619,
0.19064125418663025,
-0.31991031765937805,
-0.05294684320688248,
-0.26989421248435974,
-0.2005348950624466,
0.18565669655799866,
0.1451200544834137,
-0.15986289083957672,
0.3966955840587616,
-0.22555404901504517,
0.10547034442424774,
0.4676615595817566,
-0.45615634322166443,
-0.5001331567764282,
0.09516987949609756,
0.03747381269931793,
0.15918408334255219,
-0.18094658851623535,
-0.11560709774494171,
-0.0798664316534996,
-0.10524985939264297,
0.06857403367757797,
0.3081701397895813,
0.049008358269929886,
0.17686152458190918,
-0.2749521732330322,
-0.5320608019828796,
0.44282931089401245,
0.2758149206638336,
0.2285955846309662,
0.06674998998641968,
0.14434830844402313,
0.1872236430644989,
0.24745893478393555,
-0.0033403784036636353,
-0.06413436681032181,
0.3234262466430664,
0.22542278468608856,
-0.02145180106163025,
-0.009423185139894485,
-0.12970811128616333,
-0.4282241761684418,
0.39604267477989197,
-0.08390626311302185,
-0.08554789423942566,
0.2641924023628235,
-0.03210175782442093,
-0.16510945558547974,
-0.0015087202191352844,
-0.42212069034576416,
-0.35813552141189575,
0.10885375738143921,
0.12328894436359406,
0.29796844720840454,
0.13743199408054352,
-0.15438580513000488,
-0.04093371331691742,
-0.16343137621879578,
-0.0458141528069973,
-0.059277672320604324,
0.20105792582035065,
-0.0483819916844368,
-0.05794653296470642,
-0.08622787892818451,
0.25465506315231323,
0.19818758964538574,
-0.04107574000954628,
-0.2925594747066498,
0.3200671076774597,
0.3756386339664459,
0.0894947499036789,
0.0011648796498775482,
0.1177225336432457,
-0.053610317409038544,
-0.26468807458877563,
-0.1595717966556549,
0.10884778201580048,
0.18479059636592865,
-0.11422839760780334,
0.12281021475791931,
-0.032272934913635254,
0.1693601757287979,
0.42744624614715576,
-0.15159904956817627,
0.15904714167118073,
0.11963574588298798,
0.013546165078878403,
0.3139387369155884,
-0.03737553954124451,
0.14172598719596863,
0.1269267499446869,
-0.06798896193504333,
-0.11103206872940063,
0.38764718174934387,
-0.10856551676988602,
0.4188462197780609,
0.1472269594669342,
-0.0070611536502838135,
0.24207428097724915,
-0.1198028102517128,
-0.17540684342384338,
0.3603493571281433,
-0.20935912430286407,
0.2861121594905853,
0.033184170722961426,
-0.18073596060276031,
0.009288527071475983,
0.2650866210460663,
0.10910585522651672,
0.2891526222229004,
0.1343342661857605,
0.2686118483543396,
0.27901795506477356,
0.05188219994306564,
-0.038659241050481796,
-0.27885881066322327,
0.17586219310760498,
0.03438127040863037,
0.37001174688339233,
-0.1342010647058487,
0.08176805078983307,
-0.20207907259464264,
0.2520289421081543,
0.24977147579193115,
0.050802476704120636,
-0.11233969032764435,
-0.42707040905952454,
-0.09413480758666992,
0.2904963493347168,
0.11442665755748749,
0.27022457122802734,
-0.29973745346069336,
0.1904076635837555,
0.06864291429519653,
-0.07418258488178253,
-0.21968670189380646,
-0.2178448587656021,
-0.4013022184371948,
0.04092089459300041,
0.5470404624938965,
0.19615064561367035,
0.18225283920764923,
-0.030529921874403954,
-0.022989649325609207,
-0.33397188782691956,
-0.07681126147508621,
0.07496175169944763,
-0.2024136781692505,
0.36425840854644775,
-0.05016656219959259,
0.3517095446586609,
-0.13386069238185883,
-0.5163604021072388,
0.3650616705417633,
-0.4597039520740509,
-0.0831279456615448,
0.007268168032169342,
0.06447320431470871,
-0.11107657104730606,
0.04950272664427757,
-0.22247394919395447,
-0.38405436277389526,
-0.21132022142410278,
0.0812477394938469,
0.04583551362156868,
0.0013919323682785034,
-0.039032358676195145,
0.12364587187767029,
0.019627749919891357,
-0.09111130982637405,
-0.06250731647014618,
-0.27462536096572876,
-0.3799339532852173,
0.16866092383861542,
-0.2543705403804779,
-0.38644590973854065,
0.09645317494869232,
0.14296554028987885,
0.0439889095723629,
-0.21336369216442108,
-0.4959903359413147,
-0.054129622876644135,
-0.20912672579288483,
0.21189522743225098,
0.003371473401784897,
0.10392003506422043,
0.40390294790267944,
0.07684256136417389,
-0.02164926379919052,
-0.06316103786230087,
0.17019443213939667,
-0.03731430321931839,
-0.13141459226608276,
0.19469115138053894,
0.1028662696480751,
0.20177042484283447,
-0.13880664110183716,
0.8119151592254639,
0.43167349696159363,
0.0743028074502945,
0.4070155620574951,
-0.1514056771993637,
-0.009472113102674484,
-0.3325314223766327,
-0.3067101538181305,
0.3912254869937897,
-0.23015055060386658,
-0.11294253170490265,
0.33166825771331787,
0.026929523795843124,
-0.20776577293872833,
-0.2580164074897766,
0.17727522552013397,
-0.4345376193523407,
-0.2633552551269531,
-0.045818448066711426,
0.12194545567035675,
0.18737421929836273,
-0.07574470341205597,
0.06586717814207077,
-0.08951947093009949,
-0.3572976887226105,
0.3413047790527344,
0.26505526900291443,
-0.1220715120434761,
-0.04662489518523216,
-0.4492311179637909,
-0.269328236579895,
-0.6151042580604553,
0.2214895486831665,
0.21317043900489807,
0.3576963543891907,
-0.1969362497329712,
0.009050749242305756,
0.16721823811531067,
-0.08246328681707382,
0.43962639570236206,
-0.46948567032814026,
-0.01714632660150528,
0.2427840232849121,
0.09352211654186249,
-0.28938359022140503,
-0.20406605303287506,
0.003354594111442566,
0.23668897151947021,
-0.12178471684455872,
-0.11580400168895721,
-0.1583852767944336,
-0.2344708889722824,
-0.1131378710269928,
0.09264014661312103,
-0.28844064474105835,
-0.22114990651607513,
-0.19402968883514404,
-0.0467681959271431,
-0.30373355746269226,
-0.22167345881462097,
-0.16225184500217438,
0.40889784693717957,
-0.2307792752981186,
0.09572789072990417,
-0.3785537779331207,
0.25047773122787476,
-0.021734237670898438,
-0.0664457455277443,
0.3475498557090759,
0.15129530429840088,
-0.0017349906265735626,
0.09747402369976044,
0.009890511631965637,
0.1584405153989792,
0.6386681795120239,
-0.04110328480601311,
-0.05558328330516815,
0.0899454727768898,
0.02234804630279541,
0.0331098735332489,
-0.021172985434532166,
-0.14431938529014587,
-0.059361182153224945,
-0.04573561251163483,
0.12201010435819626,
-0.36489519476890564,
0.1316635012626648,
0.33410096168518066,
0.10673373192548752,
-0.2160680592060089,
-0.30837199091911316,
0.6805106997489929,
0.11550270020961761,
-0.048202015459537506,
0.30628713965415955,
0.1563638150691986,
-0.22673480212688446,
0.1664048731327057,
0.18533016741275787,
0.8893690705299377,
-0.21789030730724335,
0.18331173062324524,
0.13513755798339844,
0.4424636960029602,
0.27973416447639465,
-0.46191203594207764,
0.013469114899635315,
-0.2949804365634918,
-0.23104815185070038,
-0.16252470016479492,
0.0017199181020259857,
0.19538801908493042,
0.03402009233832359,
-0.19738924503326416,
0.2559811472892761,
-0.16559922695159912,
0.13079863786697388,
0.0035212375223636627,
0.34581494331359863,
-0.03563467413187027,
-0.12499590218067169,
-0.32631248235702515,
0.210200235247612,
-0.00016044825315475464,
0.34930798411369324,
-0.17019465565681458,
0.13201695680618286,
0.12618578970432281,
-0.18577320873737335,
-0.4959481954574585,
0.2121419906616211,
-0.15696732699871063,
0.4958910346031189,
-0.18893003463745117,
-0.034074798226356506,
0.008796025067567825,
0.5536426305770874,
0.2901275157928467,
0.0609770193696022,
-0.39362016320228577,
0.22384150326251984,
-0.023359820246696472,
-0.2479541003704071,
-0.23190613090991974,
0.0003641517832875252,
0.19149766862392426,
-0.1500629484653473,
-0.24766111373901367,
0.23578304052352905,
-0.41586124897003174,
-0.33238643407821655,
0.10502281785011292,
-0.07450541853904724,
0.4375009536743164,
-0.25878652930259705,
-0.5502399802207947,
0.12340472638607025,
-0.03334062546491623,
0.01998833939433098,
0.09658385813236237,
0.039597321301698685,
-0.07352377474308014,
0.19364897906780243,
0.22629795968532562,
-0.2209429293870926,
0.14266186952590942,
0.4759123921394348,
0.015487780794501305,
-0.05567129701375961,
0.8789585828781128,
0.01753862574696541,
-0.2119295299053192,
-0.23672038316726685,
0.025962308049201965,
0.13446955382823944,
-0.07722558826208115,
-0.2913056015968323,
0.17683830857276917,
0.01705557107925415,
0.008283463306725025,
0.8705037832260132,
0.20397721230983734,
-0.0394899845123291,
-0.028957240283489227,
-0.3820820450782776,
-0.22610247135162354,
0.13760124146938324,
-0.1801403909921646,
0.22433650493621826,
-0.05989681929349899,
-0.20612666010856628,
-0.04536162689328194,
0.09615445137023926,
-0.2588176727294922,
0.14047223329544067,
-0.21793042123317719,
-0.03020622581243515,
0.07811540365219116,
0.06428705155849457,
0.28610843420028687,
-0.017562858760356903,
0.08531006425619125,
0.06587748974561691,
-0.17837004363536835,
-0.22675684094429016,
-0.05524977669119835,
0.20378659665584564,
0.4299362897872925,
-0.23595723509788513,
-0.06259854137897491,
-0.2832929491996765,
-0.07355166971683502,
-0.18284791707992554,
0.1494736522436142,
0.11541105061769485,
-0.179829403758049,
0.1943938434123993,
0.290606290102005,
0.1086854338645935,
-0.2702600955963135,
0.43458348512649536,
-0.20975035429000854,
0.13912387192249298,
0.07572077959775925,
-0.0432548001408577,
0.1801469922065735,
0.10161180794239044,
0.23525746166706085,
0.2244926393032074,
0.2333477884531021,
0.1399267464876175,
0.19794923067092896,
-0.3917919993400574,
0.017687182873487473,
0.09339617937803268,
0.025683484971523285,
0.48583462834358215,
-0.20876654982566833,
0.08806221187114716,
0.43212974071502686,
0.24993537366390228,
-0.16391931474208832,
-0.25251442193984985,
0.2264583259820938,
0.006525132805109024,
-0.10135116428136826,
-0.09828106313943863,
0.12799224257469177,
-0.4632130563259125,
0.09650283306837082,
0.11566471308469772,
-0.03424375504255295,
-0.24473993480205536,
0.22235144674777985,
0.215512216091156,
-0.041388921439647675,
-0.018020082265138626,
-0.023453498259186745,
-0.07584419846534729,
-0.007642477750778198,
0.3053736686706543,
-0.12345559149980545,
0.3322206437587738,
-0.13673463463783264,
0.2509557008743286,
-0.271283358335495,
-0.6404871940612793,
0.5464437007904053,
-0.06381286680698395,
-0.11915482580661774,
0.12215951085090637,
-0.0723470151424408,
0.19483178853988647,
-0.023582659661769867,
-0.19177605211734772,
-0.38274234533309937,
0.2525697350502014,
-0.13975584506988525,
-0.3160463571548462,
0.1569110006093979,
-0.017561934888362885,
0.16844835877418518,
0.07844750583171844,
-0.061387766152620316,
-0.2902706265449524,
0.292858749628067,
0.16027501225471497,
-0.24873121082782745,
-0.03814419358968735,
-0.04527606815099716,
0.40400010347366333,
0.20444361865520477,
-0.08665835857391357,
0.3127458393573761,
-0.08602085709571838,
-0.04098334163427353,
0.005142252892255783,
0.2815687656402588,
0.40470123291015625,
0.4051007628440857,
-0.4785776436328888,
-0.011889583431184292,
0.0806826651096344,
0.08701431751251221,
0.10955952107906342,
0.46033236384391785,
-0.0639130026102066,
0.12305963039398193,
0.3370167315006256,
0.13588406145572662,
-0.16407887637615204,
-0.23075316846370697,
-0.2541563808917999,
0.24398814141750336,
-0.31769976019859314,
-0.02208833396434784,
0.1581978052854538,
0.2229868471622467,
-0.12938687205314636,
0.30568110942840576,
-0.36943498253822327,
-0.04221281409263611,
0.18617470562458038,
-0.10026570409536362,
0.2721877098083496,
-0.07591035962104797,
0.05624586343765259,
-0.2796294093132019,
0.5168173909187317,
0.5033383965492249,
0.04420865327119827,
-0.09910880774259567,
-0.21161174774169922,
-0.549256443977356,
0.13703487813472748,
-0.23937419056892395,
-0.14006008207798004,
0.1648663431406021,
-0.0995829701423645,
-0.07390373200178146,
0.2832183241844177,
0.1387462615966797,
0.028008611872792244,
-0.04772254452109337,
0.23502705991268158,
-0.31847625970840454,
0.06373344361782074,
-0.10789665579795837,
0.07409533113241196,
-0.09160082042217255,
-0.5646287798881531,
0.22442346811294556,
-0.06838211417198181,
-0.01070447638630867,
-0.0006363727152347565,
-0.007075771689414978,
-0.07684312760829926,
-0.48140332102775574,
0.47273576259613037,
0.18157289922237396,
0.4408518373966217,
-0.08641748875379562,
-0.09663645923137665,
-0.3454206585884094,
-0.33595237135887146,
-0.08218944072723389,
0.06895124912261963,
-0.17595745623111725,
0.27351492643356323,
-0.3002552390098572,
0.1995352953672409,
-0.2569769024848938,
0.1292889267206192,
0.12716136872768402,
0.19742517173290253,
-0.20660081505775452,
-0.03149809688329697,
0.003212474286556244,
0.15781278908252716,
0.24163652956485748,
0.2252894639968872,
0.001626860350370407,
0.1384560912847519,
-0.06412254273891449,
-0.07858391106128693,
0.4827338457107544,
-0.40482237935066223,
-0.25747150182724,
-0.08936687558889389,
0.0017878934741020203,
-0.1989201009273529,
-0.11251819878816605,
-0.461561918258667,
-0.0044177621603012085,
0.4050070643424988,
0.061624202877283096,
-0.09445837140083313,
0.13202893733978271,
-0.16654661297798157,
-0.0968036875128746,
-0.18969805538654327,
0.28116241097450256,
-0.2097066044807434,
0.09191697090864182,
-0.0663069412112236,
-0.3508434295654297
] |
https://github.com/huggingface/datasets/issues/6350
|
Different objects are returned from calls that should be returning the same kind of object.
|
`load_dataset` returns a `DatasetDict` object unless `split` is defined, in which case it returns a `Dataset` (or a list of datasets if `split` is a list). We've discussed dropping `DatasetDict` from the API in https://github.com/huggingface/datasets/issues/5189 to always return the same type in `load_dataset` and support datasets without (explicit) splits. IIRC the main discussion point is deciding what to return when loading a dataset with multiple splits, but `split` is not specified. What would you expect as a return value in that scenario?
|
### Describe the bug
1. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir, split='train[:1%]')
2. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir)
The only difference I would expect these calls to have is the size of the dataset.
But, while 2. returns a dictionary with "train" key in it, 1. returns a dataset WITHOUT any initial "train" keyword.
Both calls are to be used within exactly the same context. They should return identically structured datasets of different size.
### Steps to reproduce the bug
See above.
### Expected behavior
Expect both calls to return the same structured Dataset structure but with different number of elements, i.e. call 1. should have 1% of the data of the call 2.0
### Environment info
Ubuntu 20.04
gcc 9.x.x.
It is really irrelevant.
| 82
|
Different objects are returned from calls that should be returning the same kind of object.
### Describe the bug
1. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir, split='train[:1%]')
2. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir)
The only difference I would expect these calls to have is the size of the dataset.
But, while 2. returns a dictionary with "train" key in it, 1. returns a dataset WITHOUT any initial "train" keyword.
Both calls are to be used within exactly the same context. They should return identically structured datasets of different size.
### Steps to reproduce the bug
See above.
### Expected behavior
Expect both calls to return the same structured Dataset structure but with different number of elements, i.e. call 1. should have 1% of the data of the call 2.0
### Environment info
Ubuntu 20.04
gcc 9.x.x.
It is really irrelevant.
`load_dataset` returns a `DatasetDict` object unless `split` is defined, in which case it returns a `Dataset` (or a list of datasets if `split` is a list). We've discussed dropping `DatasetDict` from the API in https://github.com/huggingface/datasets/issues/5189 to always return the same type in `load_dataset` and support datasets without (explicit) splits. IIRC the main discussion point is deciding what to return when loading a dataset with multiple splits, but `split` is not specified. What would you expect as a return value in that scenario?
|
[
0.06545893847942352,
-0.35832342505455017,
-0.04736258089542389,
0.5416802763938904,
0.15500493347644806,
-0.27208203077316284,
0.2597041428089142,
0.1721973568201065,
0.10662184655666351,
0.15586799383163452,
-0.15613964200019836,
0.3137839734554291,
-0.04439723119139671,
0.36528387665748596,
-0.0241723470389843,
-0.2792162597179413,
0.1791413426399231,
0.06686579436063766,
-0.09482555091381073,
-0.31087571382522583,
-0.11311279982328415,
0.5632563829421997,
0.09311725199222565,
0.1663520187139511,
-0.6222880482673645,
0.005307340994477272,
-0.19270211458206177,
0.1274276077747345,
-0.05388475954532623,
-0.0932748094201088,
0.6022229194641113,
-0.006467785686254501,
-0.31362631916999817,
0.40642422437667847,
-0.0001189687754958868,
0.1023312509059906,
0.10690518468618393,
-0.05779392272233963,
-0.2234911322593689,
-0.49289852380752563,
0.09773138910531998,
-0.13966313004493713,
0.36339071393013,
-0.17792204022407532,
-0.04290248826146126,
-0.09468119591474533,
-0.12964197993278503,
-0.39101698994636536,
0.2641485333442688,
0.07794345915317535,
0.167216956615448,
0.1275206208229065,
-0.3237430155277252,
-0.09159041196107864,
0.39007750153541565,
0.311387300491333,
-0.021807879209518433,
0.1602875143289566,
-0.12536704540252686,
0.2180623859167099,
0.17081394791603088,
0.10705588757991791,
-0.19060830771923065,
0.22442185878753662,
-0.029070600867271423,
0.40232741832733154,
-0.317106157541275,
-0.20990212261676788,
0.14037317037582397,
0.29833248257637024,
0.48220786452293396,
-0.006775401532649994,
-0.20860379934310913,
-0.4968891441822052,
-0.08605217933654785,
-0.23559723794460297,
0.10015395283699036,
0.2849465608596802,
-0.14762724936008453,
0.028683941811323166,
-0.24066856503486633,
0.3637014329433441,
0.004386715590953827,
0.06402131915092468,
-0.3644023537635803,
-0.19929462671279907,
-0.09431815892457962,
0.4819505214691162,
-0.08568499982357025,
0.34484899044036865,
-0.21172869205474854,
-0.2660880982875824,
-0.004313208162784576,
-0.11313997209072113,
-0.04558062180876732,
-0.011835571378469467,
0.21500104665756226,
-0.30486321449279785,
0.394679993391037,
0.23962917923927307,
0.11565031111240387,
0.054769378155469894,
-0.28979939222335815,
0.020130734890699387,
0.46303412318229675,
0.23479489982128143,
0.12496389448642731,
0.08998638391494751,
0.05493592470884323,
-0.0599382147192955,
-0.34937745332717896,
-0.03312201052904129,
0.339339941740036,
0.16018471121788025,
0.038862962275743484,
0.07439690828323364,
0.3803141117095947,
-0.34084412455558777,
-0.4446603059768677,
-0.04606878384947777,
-0.25866976380348206,
-0.08731468766927719,
-0.1471802294254303,
0.19213593006134033,
0.05350100249052048,
0.3736187815666199,
0.05637916922569275,
0.1708790808916092,
-0.2980264723300934,
-0.34976401925086975,
-0.26991599798202515,
-0.23181356489658356,
-0.3936462104320526,
0.1670936793088913,
0.13201309740543365,
-0.030887842178344727,
0.1126408576965332,
0.2951399087905884,
-0.03011714667081833,
-0.33107274770736694,
0.17959673702716827,
-0.3368208408355713,
0.4190751910209656,
-0.004581935703754425,
0.0027196817100048065,
0.28357166051864624,
0.21578846871852875,
-0.004464082419872284,
-0.14200875163078308,
-0.0863313302397728,
-0.40121233463287354,
-0.38977953791618347,
0.17479830980300903,
0.09625380486249924,
0.004676107317209244,
0.2699577510356903,
-0.13744118809700012,
0.5619324445724487,
0.10092999041080475,
-0.10428590327501297,
0.018116138875484467,
-0.17441317439079285,
-0.3526175022125244,
-0.43129876255989075,
-0.009124115109443665,
0.24528472125530243,
-0.33150649070739746,
-0.2550601363182068,
0.10207752138376236,
-0.3172666132450104,
0.035964563488960266,
0.2443007081747055,
-0.29035836458206177,
0.27078765630722046,
-0.416806161403656,
-0.14621207118034363,
0.0879468023777008,
-0.166209876537323,
-0.5218113660812378,
0.14630411565303802,
0.04450056701898575,
0.3471994400024414,
0.04078351706266403,
-0.041486188769340515,
0.3209351897239685,
0.14167870581150055,
0.39348652958869934,
0.30400997400283813,
-0.04155552387237549,
0.03014652244746685,
-0.13591066002845764,
-0.07100694626569748,
0.15951411426067352,
-0.1890716701745987,
0.06113029271364212,
0.13413655757904053,
0.024576060473918915,
-0.1468736082315445,
0.257575124502182,
-0.026628252118825912,
-0.11646660417318344,
-0.2021350860595703,
0.05690774321556091,
0.11589609086513519,
0.09583722054958344,
-0.07478034496307373,
-0.5829617381095886,
0.2910501956939697,
-0.10570258647203445,
-0.1025238186120987,
0.03994709253311157,
-0.2237762212753296,
-0.18374362587928772,
0.0680905431509018,
-0.06069617345929146,
-0.19932858645915985,
0.05672798305749893,
0.30322006344795227,
0.16191403567790985,
0.17192372679710388,
-0.1151876300573349,
0.48941951990127563,
-0.05191890895366669,
0.18295001983642578,
-0.16878364980220795,
0.48775148391723633,
0.21772852540016174,
-0.09889610856771469,
-0.24087657034397125,
0.16524936258792877,
0.1731174737215042,
-0.1615431159734726,
-0.10348102450370789,
0.22901177406311035,
0.3221421539783478,
-0.16269083321094513,
-0.19177857041358948,
-0.01874290406703949,
0.04842356592416763,
0.12636077404022217,
0.10140454024076462,
0.028805550187826157,
0.21345409750938416,
-0.2307301163673401,
0.012993179261684418,
0.7672536373138428,
0.09430794417858124,
0.28881800174713135,
0.059377096593379974,
-0.02662324160337448,
-0.04082510620355606,
0.011291619390249252,
-0.10199735313653946,
-0.1618802845478058,
0.045444756746292114,
-0.3011412024497986,
0.258102685213089,
0.1568927764892578,
-0.2719862759113312,
0.07389305531978607,
0.904924750328064,
-0.11569049954414368,
0.030558153986930847,
-0.003372553735971451,
-0.15996918082237244,
-0.19574898481369019,
-0.07523656636476517,
0.35210129618644714,
0.7526577115058899,
0.17837485671043396,
0.05723422393202782,
0.06597337871789932,
-0.03613361343741417,
0.03123919665813446,
0.20572298765182495,
0.24567624926567078,
0.07452317327260971,
0.23198044300079346,
0.14558947086334229,
-0.12856709957122803,
-0.4138874411582947,
-0.03793357312679291,
0.0005524232983589172,
-0.17959527671337128,
-0.11340834200382233,
0.19564257562160492,
-0.16825027763843536,
-0.06813980638980865,
-0.4223625063896179,
-0.10988465696573257,
-0.21369613707065582,
-0.21031992137432098,
-0.1486327052116394,
0.09839963912963867,
-0.08610036969184875,
-0.09558820724487305,
-0.09403024613857269,
0.3406704068183899,
-0.1990700364112854,
0.1772281378507614,
0.139625683426857,
0.1049380972981453,
-0.4026835262775421,
-0.04538574442267418,
0.0464937649667263,
-0.09539923816919327,
0.42797866463661194,
-0.14305637776851654,
-0.1300467997789383,
-0.061654604971408844,
-0.2794119417667389,
0.41690370440483093,
-0.13966378569602966,
0.005595562979578972,
0.31985166668891907,
0.054260361939668655,
0.16138005256652832,
-0.15891478955745697,
0.21797575056552887,
-0.19920781254768372,
-0.22999657690525055,
-0.007661794312298298,
0.03860058635473251,
0.042944520711898804,
-0.21706591546535492,
-0.43607351183891296,
-0.07115822285413742,
-0.0949036031961441,
0.12107216566801071,
-0.026659436523914337,
0.12058275938034058,
0.01179995946586132,
-0.010694174095988274,
0.16232295334339142,
0.10669417679309845,
0.14101894199848175,
-0.5550051927566528,
-0.1511441320180893,
-0.20330731570720673,
-0.10772295296192169,
-0.3160809576511383,
-0.2839358448982239,
-0.13132229447364807,
0.06086019426584244,
0.05909451097249985,
-0.47477614879608154,
0.04653897508978844,
-0.07864944636821747,
0.14560644328594208,
0.08653131127357483,
-0.22317545115947723,
0.23841609060764313,
-0.01092151366174221,
-0.056507520377635956,
-0.22504258155822754,
-0.3377673327922821,
0.18476271629333496,
0.1133633628487587,
0.12641562521457672,
0.17365944385528564,
0.11187151819467545,
0.09959571063518524,
0.6023675203323364,
0.24431240558624268,
-0.10267949104309082,
0.2505645751953125,
0.22167223691940308,
0.20816464722156525,
-0.49542227387428284,
-0.20400243997573853,
-0.0722070038318634,
-0.27509281039237976,
-0.11887014657258987,
0.42038899660110474,
0.027788985520601273,
-0.18324802815914154,
-0.1518796682357788,
-0.04315567389130592,
-0.08892691880464554,
-0.31528767943382263,
0.1627635359764099,
-0.1882159411907196,
-0.35881564021110535,
0.08401302993297577,
0.15660136938095093,
-0.14486269652843475,
0.31455230712890625,
-0.07914343476295471,
-0.004089616239070892,
-0.05654459446668625,
0.026739824563264847,
-0.7441854476928711,
-0.07314471900463104,
-0.3467651605606079,
0.47502386569976807,
0.07849378883838654,
-0.11113300919532776,
0.0931195616722107,
-0.15802600979804993,
0.3920575976371765,
0.17468823492527008,
0.8303183317184448,
0.24750033020973206,
-0.3480985760688782,
0.070954829454422,
-0.16631801426410675,
-0.31999099254608154,
-0.44016754627227783,
-0.17829744517803192,
0.48568040132522583,
0.11915755271911621,
0.2600964903831482,
-0.51859050989151,
-0.2293931394815445,
0.016034778207540512,
0.09739971905946732,
-0.10558310151100159,
0.09009146690368652,
-0.2272053062915802,
-0.07103575766086578,
-0.04226764664053917,
0.031609907746315,
-0.137542724609375,
0.12176661938428879,
-0.42525455355644226,
-0.43708255887031555,
-0.0722472295165062,
-0.08018380403518677,
0.017774678766727448,
-0.06416190415620804,
0.5055909156799316,
-0.26038071513175964,
-0.029657818377017975,
0.4086669683456421,
0.6290433406829834,
0.019381385296583176,
0.715477466583252,
-0.33543726801872253,
-0.2594783902168274,
0.23723983764648438,
-0.09667229652404785,
0.13097384572029114,
0.5121160745620728,
0.033818915486335754,
-0.0348137766122818,
-0.09172959625720978,
0.03945158049464226,
-0.010389464907348156,
0.06645027548074722,
0.45575273036956787,
0.06333570182323456,
-0.6572638750076294,
-0.5565388798713684,
0.40945014357566833,
0.12399496138095856,
-0.326989084482193,
0.5763639211654663,
0.17993375658988953,
-0.3414798080921173,
0.6402422189712524,
-0.2994456887245178,
0.9545741677284241,
0.17843428254127502,
0.2909282147884369,
0.36427903175354004,
-0.19641365110874176,
0.5335865020751953,
-0.12295787781476974,
0.13182449340820312,
-0.3058537542819977,
-0.2491835504770279,
-0.05802410840988159,
-0.18145187199115753,
-0.11031534522771835,
0.2618716359138489,
-0.12106002867221832,
0.19142836332321167,
-0.21406011283397675,
0.0010424703359603882,
-0.260051429271698,
0.12428820133209229,
0.15012629330158234,
0.09589695930480957,
-0.08923326432704926,
0.043199338018894196,
-0.028407514095306396,
0.4337438941001892,
0.011842472478747368,
0.08312104642391205,
-0.2858615815639496,
-0.4611055254936218,
-0.22399799525737762,
-0.09938796609640121,
-0.031498271971940994,
0.361979603767395,
0.20811040699481964,
-0.31371986865997314,
-0.21707116067409515,
0.21362529695034027,
0.12817448377609253,
-0.17975525557994843,
0.02836163528263569,
0.0726659893989563,
-0.07400619238615036,
0.45588362216949463,
-0.018923332914710045,
-0.40287357568740845,
0.5227808356285095,
0.1773955225944519,
-0.2837860584259033,
-0.1706295609474182,
-0.12880797684192657,
-0.096040740609169,
-0.10401415079832077,
0.24402998387813568,
0.21470330655574799,
-0.6490800380706787,
-0.09330184757709503,
0.1382252424955368,
0.2675003409385681,
-0.23236294090747833,
0.03474852442741394,
-0.06329680979251862,
-0.07170404493808746,
0.12410082668066025,
0.19910800457000732,
-0.44677409529685974,
-0.1651705801486969,
0.09766662120819092,
0.45881590247154236,
-0.04424133524298668,
0.4165686070919037,
0.032090459018945694,
-0.030644815415143967,
-0.05336454138159752,
0.029674820601940155,
0.3815138638019562,
-0.6464768648147583,
0.483716756105423,
-0.11723417788743973,
0.14798231422901154,
-0.055071305483579636,
0.1937440037727356,
0.06385374069213867,
0.2788635492324829,
-0.10012930631637573,
-0.21968773007392883,
-0.01218227855861187,
0.22530411183834076,
-0.24718128144741058,
0.41868191957473755,
0.14060693979263306,
0.02872525528073311,
0.02220780961215496,
0.11498777568340302,
-0.2261458933353424,
0.09782683104276657,
-0.03867209702730179,
0.11279863119125366,
0.31163206696510315,
-0.06739570200443268,
0.2173793911933899,
0.10213179886341095,
0.026345020160079002,
0.08719997107982635,
-0.09432635456323624,
-0.12130750715732574,
-0.24245381355285645,
0.2054031640291214,
0.01987968385219574,
0.13987129926681519,
-0.01016790047287941,
0.2394406944513321,
0.3356214165687561,
-0.20980414748191833,
0.4640478789806366,
0.3389716148376465,
-0.0029222220182418823,
0.12708202004432678,
0.18044476211071014,
0.2886461019515991,
-0.17701122164726257,
0.17021295428276062,
0.034961700439453125,
0.10935872793197632,
0.24193942546844482,
0.1538802981376648,
-0.18061363697052002,
-0.05359867215156555,
-0.11952012777328491,
0.13579612970352173,
0.09327483922243118,
0.12271013110876083,
0.10992664843797684,
-0.1836782991886139,
0.13387835025787354,
-0.07510930299758911,
0.23332250118255615,
0.07948226481676102,
-0.2139579951763153,
-0.08953411132097244,
-0.19507738947868347,
0.12892800569534302,
0.04126662015914917,
-0.2024896889925003,
0.3037077486515045,
0.06565365195274353,
-0.1477285772562027,
0.23084788024425507,
0.21662867069244385,
0.1774369776248932,
-0.19349141418933868,
-0.08814482390880585,
0.2859974503517151,
0.18494844436645508,
0.5633517503738403,
0.3500109314918518,
0.043237779289484024,
0.25175538659095764,
0.3141469955444336,
-0.00465986505150795,
0.05469222739338875,
0.4327656030654907,
-0.13397759199142456,
0.13675101101398468,
-0.13054808974266052,
-0.0498591773211956,
0.40501463413238525,
-0.40341147780418396,
0.054079100489616394,
0.35396844148635864,
-0.3252953588962555,
0.2544565796852112,
0.005127213895320892,
0.2405160665512085,
-0.3318883180618286,
-0.3177504241466522,
-0.40570059418678284,
-0.022136878222227097,
-0.2006922960281372,
-0.01783076301217079,
0.008453916758298874,
-0.2244732677936554,
-0.1431255042552948,
0.3013179898262024,
-0.2699736952781677,
-0.24828295409679413,
0.3504239022731781,
-0.12460508942604065,
-0.22532208263874054,
-0.25710955262184143,
0.008965160697698593,
-0.01905972510576248,
0.13781386613845825,
-0.08464248478412628,
0.1787041276693344,
0.25036072731018066,
-0.1244727224111557,
0.28917890787124634,
-0.032183386385440826,
0.28924039006233215,
0.08785729110240936,
-0.08604897558689117,
-0.160768061876297,
0.135176882147789,
0.05410252511501312,
-0.11966373771429062,
0.15958470106124878,
-0.02938895672559738,
-0.2846071720123291,
0.19059763848781586,
0.09287857264280319,
-0.08008754253387451,
-0.1613362729549408,
0.2862855792045593,
0.4000774621963501,
-0.6154875159263611,
0.45880863070487976,
-0.4750039279460907,
-0.017187919467687607,
-0.34393954277038574,
0.1850953996181488,
-0.390118271112442,
-0.4011112153530121,
0.04956751689314842,
0.18485864996910095,
0.1273239552974701,
-0.1089041605591774,
0.037961188703775406,
-0.10960741341114044,
0.11695102602243423,
-0.008227366954088211,
0.10568887740373611,
-0.18309342861175537,
0.04407641291618347,
-0.134473979473114,
0.29632923007011414,
0.12068884074687958,
0.3075212836265564,
-0.1996423304080963,
0.15537099540233612,
-0.02941247820854187,
-0.0652901828289032,
0.19910484552383423,
0.18814155459403992,
0.07789383828639984,
0.15787088871002197,
-0.38081976771354675,
-0.2779792845249176,
-0.29738444089889526,
-0.2852743864059448,
0.050434328615665436,
-0.3255171477794647,
0.00422118604183197,
-0.02884342521429062,
-0.07187358289957047,
-0.12592719495296478,
-0.06405670940876007,
0.17723457515239716,
-0.12758880853652954,
0.29271307587623596,
0.5577346682548523,
0.45870301127433777,
0.04647684842348099,
-0.21431942284107208,
0.03150106593966484,
-0.11408725380897522,
-0.2557455599308014,
0.5020924806594849,
-0.19757941365242004,
0.3788156509399414,
-0.09125037491321564,
0.2846618592739105,
0.042726196348667145,
0.20953935384750366,
0.33094996213912964,
-0.11390280723571777,
-0.35044705867767334,
0.018789226189255714,
-0.21464237570762634,
-0.1494007110595703,
0.24625058472156525,
0.70836341381073,
0.12551729381084442,
-0.09649509191513062,
-0.15866407752037048,
-0.011550978757441044,
0.44777345657348633,
-0.2891327440738678,
-0.1759556382894516,
-0.0790894478559494,
0.3421122133731842,
0.30814358592033386,
-0.18377618491649628,
-0.462432324886322,
-0.30840417742729187,
0.34053611755371094,
-0.29834672808647156,
-0.19346825778484344,
0.15768583118915558,
0.05429118499159813,
-0.11240561306476593,
-0.13015685975551605,
0.13627701997756958,
0.08224353939294815,
-0.5032218098640442,
0.5723219513893127,
-0.2812122404575348
] |
https://github.com/huggingface/datasets/issues/6350
|
Different objects are returned from calls that should be returning the same kind of object.
|
> `load_dataset` returns a `DatasetDict` object unless `split` is defined, in which case it returns a `Dataset` (or a list of datasets if `split` is a list). We've discussed dropping `DatasetDict` from the API in #5189 to always return the same type in `load_dataset` and support datasets without (explicit) splits. IIRC the main discussion point is deciding what to return when loading a dataset with multiple splits, but `split` is not specified. What would you expect as a return value in that scenario?
Wouldn't a dataset with multiple splits already have keys and their related data arrays?
Lets say the dataset has "train" : trainset, "valid": validset and "test": testset
So a dictionary can be returned,, i.e.
{
"train": trainset,
"valid": validset,
"test": testset
}
if a split is provided split=['train[:80%]', 'valid[80%:90%]', 'test[90%:100%]']
would also return the same dictionary as above.
split='train[:10%]' should return the same value as split=['train[:10%]']
{
"train": trainset
}
|
### Describe the bug
1. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir, split='train[:1%]')
2. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir)
The only difference I would expect these calls to have is the size of the dataset.
But, while 2. returns a dictionary with "train" key in it, 1. returns a dataset WITHOUT any initial "train" keyword.
Both calls are to be used within exactly the same context. They should return identically structured datasets of different size.
### Steps to reproduce the bug
See above.
### Expected behavior
Expect both calls to return the same structured Dataset structure but with different number of elements, i.e. call 1. should have 1% of the data of the call 2.0
### Environment info
Ubuntu 20.04
gcc 9.x.x.
It is really irrelevant.
| 153
|
Different objects are returned from calls that should be returning the same kind of object.
### Describe the bug
1. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir, split='train[:1%]')
2. dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=training_args.cache_dir)
The only difference I would expect these calls to have is the size of the dataset.
But, while 2. returns a dictionary with "train" key in it, 1. returns a dataset WITHOUT any initial "train" keyword.
Both calls are to be used within exactly the same context. They should return identically structured datasets of different size.
### Steps to reproduce the bug
See above.
### Expected behavior
Expect both calls to return the same structured Dataset structure but with different number of elements, i.e. call 1. should have 1% of the data of the call 2.0
### Environment info
Ubuntu 20.04
gcc 9.x.x.
It is really irrelevant.
> `load_dataset` returns a `DatasetDict` object unless `split` is defined, in which case it returns a `Dataset` (or a list of datasets if `split` is a list). We've discussed dropping `DatasetDict` from the API in #5189 to always return the same type in `load_dataset` and support datasets without (explicit) splits. IIRC the main discussion point is deciding what to return when loading a dataset with multiple splits, but `split` is not specified. What would you expect as a return value in that scenario?
Wouldn't a dataset with multiple splits already have keys and their related data arrays?
Lets say the dataset has "train" : trainset, "valid": validset and "test": testset
So a dictionary can be returned,, i.e.
{
"train": trainset,
"valid": validset,
"test": testset
}
if a split is provided split=['train[:80%]', 'valid[80%:90%]', 'test[90%:100%]']
would also return the same dictionary as above.
split='train[:10%]' should return the same value as split=['train[:10%]']
{
"train": trainset
}
|
[
0.06662899255752563,
-0.18669447302818298,
-0.08955490589141846,
0.5604850649833679,
0.058910273015499115,
-0.2986443340778351,
0.28418490290641785,
0.21379871666431427,
0.12141832709312439,
0.16319361329078674,
-0.01704932190477848,
0.4322667717933655,
-0.04269428178668022,
0.26921844482421875,
-0.1165824830532074,
-0.18335962295532227,
0.1811823546886444,
0.10833575576543808,
-0.027422279119491577,
-0.30970168113708496,
-0.14221173524856567,
0.4199058413505554,
0.07582883536815643,
0.10915739089250565,
-0.6052102446556091,
-0.028225606307387352,
-0.26863893866539,
0.06144037842750549,
-0.07116582244634628,
-0.17099812626838684,
0.4970378279685974,
0.044024694710969925,
-0.34119364619255066,
0.3454349637031555,
-0.00011885122512467206,
0.045941129326820374,
0.14196623861789703,
-0.036306172609329224,
-0.22583091259002686,
-0.46015751361846924,
-0.09099889546632767,
-0.1765630841255188,
0.3645096719264984,
-0.26185745000839233,
0.041870616376399994,
-0.2208693027496338,
-0.1650211215019226,
-0.5530492663383484,
0.242849662899971,
0.13259005546569824,
0.16014523804187775,
-0.09148016571998596,
-0.3130964934825897,
-0.05171036347746849,
0.34348946809768677,
0.2437329888343811,
0.010631946846842766,
0.07042388617992401,
-0.027571648359298706,
0.1906176060438156,
0.17099902033805847,
0.016315549612045288,
-0.2275875210762024,
0.18420028686523438,
-0.06835030764341354,
0.33607959747314453,
-0.19946178793907166,
-0.27667737007141113,
0.20172038674354553,
0.24899578094482422,
0.6291348934173584,
0.04118731990456581,
-0.17340320348739624,
-0.42971158027648926,
-0.09483194351196289,
-0.17013861238956451,
0.06964157521724701,
0.2710319459438324,
-0.1148744523525238,
-0.00024215131998062134,
-0.1900675892829895,
0.33323463797569275,
-0.03775102645158768,
0.09787175059318542,
-0.3450024425983429,
-0.033050984144210815,
0.027682479470968246,
0.5227804780006409,
-0.17025217413902283,
0.335679829120636,
-0.061020683497190475,
-0.35607561469078064,
-0.0022523626685142517,
-0.07086426019668579,
0.0014097541570663452,
-0.036240458488464355,
0.24265247583389282,
-0.4171885550022125,
0.393447607755661,
0.1971789300441742,
0.22162657976150513,
0.14958830177783966,
-0.24525080621242523,
0.0027723684906959534,
0.5383043885231018,
0.16295339167118073,
0.16748562455177307,
0.17350025475025177,
-0.0025063268840312958,
-0.14201577007770538,
-0.3953589200973511,
0.0022417977452278137,
0.2673858404159546,
0.1972176432609558,
0.13745266199111938,
0.19526958465576172,
0.3317611813545227,
-0.3169493079185486,
-0.4061059355735779,
-0.00627498421818018,
-0.3757443130016327,
-0.07282541692256927,
-0.19148410856723785,
0.12259352207183838,
0.12339316308498383,
0.48225024342536926,
-0.003911398351192474,
0.13362157344818115,
-0.22088821232318878,
-0.3671436607837677,
-0.2393638789653778,
-0.2255449742078781,
-0.3308506906032562,
0.09893662482500076,
0.2005833089351654,
0.06870847940444946,
0.0842718705534935,
0.2753466069698334,
-0.07606066763401031,
-0.3578437268733978,
0.2702234983444214,
-0.29941868782043457,
0.46227890253067017,
-0.012159798294305801,
-0.0016413219273090363,
0.2683112323284149,
0.19519826769828796,
-0.11922021210193634,
-0.2097242772579193,
0.06322744488716125,
-0.43663209676742554,
-0.3704029321670532,
0.1676357239484787,
0.12610243260860443,
-0.03311295062303543,
0.2490531951189041,
-0.0672726109623909,
0.538312554359436,
0.10483429580926895,
-0.15878909826278687,
-0.03021373599767685,
-0.21198275685310364,
-0.26168715953826904,
-0.5373237133026123,
-0.06572604179382324,
0.21481958031654358,
-0.5013338327407837,
-0.13574470579624176,
-0.05821968615055084,
-0.20834961533546448,
0.04747259244322777,
0.11420236527919769,
-0.35074830055236816,
0.34171316027641296,
-0.3531373143196106,
-0.1223229169845581,
0.12122879177331924,
-0.21221408247947693,
-0.5833433866500854,
0.20252437889575958,
0.08727359771728516,
0.3600674867630005,
0.11222343146800995,
-0.0017238352447748184,
0.38118284940719604,
0.20902948081493378,
0.3972979485988617,
0.29564350843429565,
-0.022388102486729622,
0.03231317549943924,
-0.15205249190330505,
-0.07154935598373413,
0.12192578613758087,
-0.22721201181411743,
0.11548742651939392,
0.03507354483008385,
0.06046116724610329,
-0.14003898203372955,
0.2655565142631531,
-0.019771356135606766,
-0.09859448671340942,
-0.2740989327430725,
0.1217489093542099,
0.004310257732868195,
0.12715347111225128,
0.007940564304590225,
-0.5633988380432129,
0.3408149182796478,
-0.10654014348983765,
-0.16045163571834564,
0.005781151354312897,
-0.24998551607131958,
-0.12065177410840988,
0.14218991994857788,
-0.12188521027565002,
-0.153201624751091,
0.09463135898113251,
0.2519514560699463,
0.0785362720489502,
0.11015929281711578,
-0.07875524461269379,
0.4354169964790344,
0.08694685995578766,
0.05039888247847557,
-0.02605019137263298,
0.5112501978874207,
0.15811549127101898,
-0.04293639585375786,
-0.22793251276016235,
0.15956449508666992,
0.18459470570087433,
-0.12386827915906906,
-0.12295428663492203,
0.21974125504493713,
0.4704034626483917,
-0.25761884450912476,
-0.3009412884712219,
0.05392615497112274,
0.07969100028276443,
0.1813613623380661,
0.17709502577781677,
0.0882510095834732,
0.23318107426166534,
-0.2879117727279663,
0.030116574838757515,
0.7605733871459961,
0.17032036185264587,
0.3219342827796936,
0.03573186695575714,
-0.029518097639083862,
0.0008132178336381912,
0.012143295258283615,
-0.0968523696064949,
-0.21043244004249573,
-0.056356657296419144,
-0.2659962475299835,
0.2591315507888794,
0.1350853443145752,
-0.08188413083553314,
0.1739417016506195,
0.8033425211906433,
-0.05342095345258713,
0.06515588611364365,
-0.08539161831140518,
-0.15178236365318298,
-0.22796544432640076,
-0.05581431835889816,
0.45772430300712585,
0.8029670715332031,
0.16354456543922424,
0.04403688386082649,
0.010932660661637783,
-0.024714600294828415,
0.06196609139442444,
0.2355765551328659,
0.2454744428396225,
0.16413886845111847,
0.31621187925338745,
0.09139469265937805,
-0.12232040613889694,
-0.30253687500953674,
-0.1555415540933609,
0.1071290597319603,
-0.1187111884355545,
-0.10063639283180237,
0.19519124925136566,
-0.22395701706409454,
-0.10043826699256897,
-0.35164541006088257,
-0.08265341073274612,
-0.0510493703186512,
-0.27336955070495605,
-0.08111946284770966,
-0.020622801035642624,
-0.14063537120819092,
-0.15328165888786316,
-0.1068660169839859,
0.31340357661247253,
-0.2197328507900238,
0.16121135652065277,
0.18670377135276794,
-0.010598978027701378,
-0.43055927753448486,
-0.03095410019159317,
0.08971655368804932,
-0.14694969356060028,
0.4310706853866577,
0.02990744821727276,
-0.10265766084194183,
-0.03925536572933197,
-0.3000350296497345,
0.30372944474220276,
-0.05344259738922119,
-0.07221899181604385,
0.28803980350494385,
-0.025469131767749786,
0.25203579664230347,
-0.2607162892818451,
0.09911855310201645,
-0.15248718857765198,
-0.2293468862771988,
0.014465723186731339,
0.002908215392380953,
-0.009912625886499882,
-0.1704738885164261,
-0.4946728050708771,
-0.10335912555456161,
-0.10184623301029205,
-0.02172539383172989,
0.054981779307127,
0.18473391234874725,
-0.10138021409511566,
0.03203125670552254,
0.14579206705093384,
0.22398103773593903,
0.04731760174036026,
-0.48787376284599304,
0.09635324776172638,
-0.2048514038324356,
-0.13274219632148743,
-0.328963041305542,
-0.19462667405605316,
-0.1668587476015091,
0.14974896609783173,
0.1098439022898674,
-0.477996826171875,
0.14075952768325806,
-0.0454324409365654,
0.13393594324588776,
0.01587029919028282,
-0.3063294291496277,
0.26601284742355347,
0.1133696436882019,
-0.06501267850399017,
-0.20111322402954102,
-0.2350374460220337,
0.17443135380744934,
0.17083758115768433,
0.14439542591571808,
0.1534358263015747,
0.09239606559276581,
0.09958739578723907,
0.5467633605003357,
0.2029149830341339,
-0.14378373324871063,
0.21502503752708435,
0.295986533164978,
0.12128815054893494,
-0.44080790877342224,
-0.12540166079998016,
-0.1836506724357605,
-0.30243542790412903,
-0.2219344973564148,
0.4545247554779053,
-0.013711279258131981,
-0.4078064560890198,
-0.17200903594493866,
-0.009385917335748672,
-0.10293081402778625,
-0.29680299758911133,
0.1968366950750351,
-0.3990383744239807,
-0.33258962631225586,
0.07431560754776001,
0.16934740543365479,
-0.18093936145305634,
0.31684964895248413,
-0.18408264219760895,
-0.15415896475315094,
-0.08405742794275284,
-0.060551196336746216,
-0.7720265984535217,
-0.12107231467962265,
-0.22718101739883423,
0.5044539570808411,
0.0829397663474083,
-0.028484806418418884,
0.15076106786727905,
-0.1030970886349678,
0.3546646237373352,
0.1290448158979416,
0.7390083074569702,
0.09828329086303711,
-0.3430139422416687,
0.16279058158397675,
-0.06395178288221359,
-0.2723820209503174,
-0.45656758546829224,
-0.22634674608707428,
0.5976747870445251,
0.02497006021440029,
0.20476290583610535,
-0.5033674836158752,
-0.15222306549549103,
-0.11636658012866974,
0.13769258558750153,
-0.1438070684671402,
0.09094232320785522,
-0.19300022721290588,
-0.06703730672597885,
-0.05629841238260269,
-0.030724652111530304,
-0.17311500012874603,
0.12593115866184235,
-0.4697687327861786,
-0.4963664412498474,
-0.061209939420223236,
-0.07177375257015228,
-0.027177050709724426,
-0.059433046728372574,
0.5158502459526062,
-0.268932580947876,
0.005712445825338364,
0.3016434907913208,
0.5882601737976074,
0.053000375628471375,
0.6291201114654541,
-0.22743231058120728,
-0.12981553375720978,
0.19009968638420105,
-0.1324775665998459,
0.14506098628044128,
0.5003782510757446,
0.04585767909884453,
-0.04376261681318283,
-0.14399997889995575,
-0.029902108013629913,
0.09125147014856339,
0.03850262612104416,
0.3635931611061096,
-0.07465590536594391,
-0.703148603439331,
-0.6086063981056213,
0.3903976082801819,
0.10380750894546509,
-0.36247920989990234,
0.6637514233589172,
0.13315421342849731,
-0.3458748161792755,
0.8485227227210999,
-0.15870869159698486,
0.9478111863136292,
0.15702387690544128,
0.2805817723274231,
0.21404048800468445,
-0.20995664596557617,
0.4885067939758301,
-0.17887158691883087,
0.14546844363212585,
-0.30375534296035767,
-0.22068317234516144,
-0.0456341877579689,
-0.19199471175670624,
-0.0324108749628067,
0.4768131971359253,
-0.21779479086399078,
0.0981544628739357,
-0.21852852404117584,
-0.04930463060736656,
-0.23918820917606354,
0.18842929601669312,
0.1514413207769394,
0.19893476366996765,
0.15008726716041565,
0.03716381639242172,
-0.03493800759315491,
0.3083992004394531,
-0.03812948614358902,
0.12639568746089935,
-0.3237772285938263,
-0.48566555976867676,
-0.30830705165863037,
-0.14287936687469482,
-0.019405998289585114,
0.4997904896736145,
0.06319369375705719,
-0.28457966446876526,
-0.16570955514907837,
0.2093525230884552,
-0.023385003209114075,
-0.11362841725349426,
-0.022751042619347572,
0.1075347512960434,
0.010546654462814331,
0.3697698414325714,
0.04652313515543938,
-0.43147456645965576,
0.4975408911705017,
0.1581304371356964,
-0.3257068693637848,
-0.061835236847400665,
-0.1387190818786621,
-0.17893412709236145,
-0.1747170388698578,
0.31900182366371155,
0.2588265538215637,
-0.5721496343612671,
-0.13154703378677368,
0.1921258568763733,
0.1308695673942566,
-0.18030355870723724,
0.03699250891804695,
-0.05990736186504364,
-0.066695436835289,
0.26003068685531616,
0.1533084511756897,
-0.45388373732566833,
-0.11717092990875244,
0.10669924318790436,
0.580208420753479,
-0.024646272882819176,
0.45843568444252014,
-0.03364792838692665,
0.0005705393850803375,
-0.08523501455783844,
0.010513044893741608,
0.2867552638053894,
-0.5157674551010132,
0.3872831463813782,
-0.16495640575885773,
0.17408786714076996,
-0.003651269944384694,
0.09232249855995178,
0.035554610192775726,
0.3982499837875366,
-0.13686607778072357,
-0.22118820250034332,
0.03510042279958725,
0.244476318359375,
-0.22361202538013458,
0.417630136013031,
-0.007381457835435867,
-0.08828991651535034,
-0.008524048142135143,
0.23148755729198456,
-0.2139991819858551,
0.05322450399398804,
0.0035368409007787704,
0.12630240619182587,
0.24037304520606995,
-0.005399715155363083,
0.04515067860484123,
0.1067272275686264,
0.050013162195682526,
-0.011479943990707397,
-0.037471525371074677,
-0.12129326164722443,
-0.126368910074234,
0.2070396989583969,
0.10123869776725769,
0.20706239342689514,
-0.05345909297466278,
0.07744576781988144,
0.33052870631217957,
-0.12589485943317413,
0.3586181104183197,
0.29608502984046936,
-0.08994258940219879,
0.19544300436973572,
0.21814553439617157,
0.3645176589488983,
-0.2279493510723114,
0.24252411723136902,
0.0012998133897781372,
0.16230982542037964,
0.27064281702041626,
0.24851828813552856,
-0.0821278840303421,
-0.11843273043632507,
-0.16388429701328278,
0.11763906478881836,
-0.028620481491088867,
0.12585881352424622,
0.1828303337097168,
-0.12995126843452454,
0.20400384068489075,
-0.05468776822090149,
0.15266641974449158,
0.15628114342689514,
-0.22195491194725037,
-0.06498368084430695,
-0.19766566157341003,
0.1263502836227417,
0.03729322552680969,
-0.30400386452674866,
0.19826972484588623,
0.05604485794901848,
-0.15657633543014526,
0.24933546781539917,
0.2635565400123596,
0.09010697901248932,
-0.21251808106899261,
-0.07301761209964752,
0.32092544436454773,
0.18892911076545715,
0.5643402338027954,
0.4710482954978943,
0.04933847859501839,
0.1672411859035492,
0.18428945541381836,
-0.06019948795437813,
0.05729244649410248,
0.47147637605667114,
-0.09464309364557266,
0.19882860779762268,
0.04696756601333618,
-0.14910195767879486,
0.4390580952167511,
-0.31785234808921814,
0.0999794527888298,
0.3432141840457916,
-0.29603317379951477,
0.23385441303253174,
0.15305767953395844,
0.03314715623855591,
-0.2684454321861267,
-0.2210952788591385,
-0.40150296688079834,
-0.14157602190971375,
-0.1851729154586792,
0.05685167387127876,
-0.055194735527038574,
-0.2744750678539276,
-0.16941209137439728,
0.22259560227394104,
-0.32489416003227234,
-0.22420091927051544,
0.33911025524139404,
-0.0864696055650711,
-0.2543677091598511,
-0.18263421952724457,
0.1982322335243225,
-0.051893219351768494,
0.1537882536649704,
-0.17676512897014618,
0.09389614313840866,
0.2718455195426941,
-0.12761811912059784,
0.2700473666191101,
-0.15552064776420593,
0.29739534854888916,
0.20982199907302856,
-0.23989138007164001,
-0.11737579852342606,
0.14040325582027435,
-0.02405264414846897,
-0.17328430712223053,
0.14857852458953857,
-0.07158833742141724,
-0.3257830739021301,
0.23596946895122528,
0.09079571068286896,
-0.05669792369008064,
-0.14022374153137207,
0.4471626281738281,
0.39435330033302307,
-0.4954100251197815,
0.3953258991241455,
-0.36180442571640015,
-0.07920784503221512,
-0.14845702052116394,
0.2114255428314209,
-0.3550857603549957,
-0.5801945328712463,
0.0788731724023819,
0.19115978479385376,
0.11329934746026993,
-0.17273594439029694,
0.030671805143356323,
-0.14709016680717468,
0.17623907327651978,
-0.04543350264430046,
0.13970963656902313,
-0.24201148748397827,
-0.006337858736515045,
-0.1694955825805664,
0.3074020445346832,
-0.009232424199581146,
0.18761739134788513,
-0.16755178570747375,
0.20937812328338623,
-0.004150055348873138,
-0.055636271834373474,
0.1775614470243454,
0.22534920275211334,
0.051220789551734924,
0.2838822901248932,
-0.4335272014141083,
-0.29682889580726624,
-0.2035316675901413,
-0.24496793746948242,
-0.015008612535893917,
-0.4210633635520935,
0.05508546531200409,
-0.005705198738723993,
-0.031249884516000748,
-0.18512745201587677,
-0.19544927775859833,
0.33581480383872986,
0.02049207128584385,
0.33477407693862915,
0.5093206167221069,
0.5416277647018433,
0.053649090230464935,
-0.160967156291008,
0.005514215677976608,
0.004747975617647171,
-0.2039235234260559,
0.5219480991363525,
-0.10432456433773041,
0.2845968008041382,
-0.04772728681564331,
0.39399605989456177,
0.16147726774215698,
0.11386028677225113,
0.20581980049610138,
-0.05710175633430481,
-0.3418147563934326,
-0.04204169660806656,
-0.2072124183177948,
-0.13893383741378784,
0.21751919388771057,
0.6180726885795593,
0.1217438280582428,
-0.15285730361938477,
-0.10779176652431488,
0.01197165809571743,
0.32534724473953247,
-0.16363605856895447,
-0.16150830686092377,
-0.08699296414852142,
0.3549012541770935,
0.13957037031650543,
-0.02781706117093563,
-0.27982452511787415,
-0.37486493587493896,
0.4373815655708313,
-0.3275778591632843,
-0.21943458914756775,
0.11541138589382172,
0.11573119461536407,
-0.13516539335250854,
-0.15402698516845703,
0.09842345118522644,
0.02450341358780861,
-0.4282901883125305,
0.444495290517807,
-0.31961125135421753
] |
https://github.com/huggingface/datasets/issues/6349
|
Can't load ds = load_dataset("imdb")
|
I'm unable to reproduce this error. The server hosting the files may have been down temporarily, so try again.
|
### Describe the bug
I did `from datasets import load_dataset, load_metric` and then `ds = load_dataset("imdb")` and it gave me the error:
ExpectedMoreDownloadedFiles: {'http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz'}
I tried doing `ds = load_dataset("imdb",download_mode="force_redownload")` as well as reinstalling dataset. I still face this problem.
### Steps to reproduce the bug
1. from datasets import load_dataset, load_metric
2. ds = load_dataset("imdb")
### Expected behavior
It should load and give me this when I run `ds`
DatasetDict({
train: Dataset({
features: ['text', 'label'],
num_rows: 25000
})
test: Dataset({
features: ['text', 'label'],
num_rows: 25000
})
unsupervised: Dataset({
features: ['text', 'label'],
num_rows: 50000
})
})
### Environment info
- `datasets` version: 2.14.6
- Platform: Linux-5.4.0-164-generic-x86_64-with-glibc2.17
- Python version: 3.8.18
- Huggingface_hub version: 0.16.2
- PyArrow version: 13.0.0
- Pandas version: 2.0.2
| 19
|
Can't load ds = load_dataset("imdb")
### Describe the bug
I did `from datasets import load_dataset, load_metric` and then `ds = load_dataset("imdb")` and it gave me the error:
ExpectedMoreDownloadedFiles: {'http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz'}
I tried doing `ds = load_dataset("imdb",download_mode="force_redownload")` as well as reinstalling dataset. I still face this problem.
### Steps to reproduce the bug
1. from datasets import load_dataset, load_metric
2. ds = load_dataset("imdb")
### Expected behavior
It should load and give me this when I run `ds`
DatasetDict({
train: Dataset({
features: ['text', 'label'],
num_rows: 25000
})
test: Dataset({
features: ['text', 'label'],
num_rows: 25000
})
unsupervised: Dataset({
features: ['text', 'label'],
num_rows: 50000
})
})
### Environment info
- `datasets` version: 2.14.6
- Platform: Linux-5.4.0-164-generic-x86_64-with-glibc2.17
- Python version: 3.8.18
- Huggingface_hub version: 0.16.2
- PyArrow version: 13.0.0
- Pandas version: 2.0.2
I'm unable to reproduce this error. The server hosting the files may have been down temporarily, so try again.
|
[
-0.3720936179161072,
0.03497987985610962,
-0.05937010422348976,
0.5213472247123718,
0.4125431180000305,
0.14905023574829102,
0.34063559770584106,
0.12810684740543365,
0.6659700870513916,
0.07853175699710846,
-0.1272825449705124,
0.14698426425457,
-0.03618498519062996,
0.06833238154649734,
0.025375695899128914,
-0.1382458508014679,
0.0168708935379982,
-0.013022273778915405,
-0.12123657763004303,
0.009276114404201508,
-0.19209866225719452,
0.24735645949840546,
-0.3583052158355713,
-0.10842089354991913,
-0.25010946393013,
0.10590799152851105,
0.0029570739716291428,
0.12266598641872406,
-0.27344492077827454,
-0.2972703278064728,
0.3573562800884247,
0.12031625211238861,
0.4726550281047821,
0.49113744497299194,
-0.00012007865007035434,
-0.023538243025541306,
0.49493247270584106,
-0.17353759706020355,
-0.31827428936958313,
-0.49633127450942993,
-0.17200353741645813,
-0.055631719529628754,
0.31934261322021484,
-0.07856903225183487,
0.13219764828681946,
-0.24067816138267517,
-0.09317905455827713,
-0.3892047703266144,
-0.08224360644817352,
0.304541677236557,
0.1450476050376892,
0.1425897479057312,
0.11531347036361694,
-0.24170754849910736,
0.0996336117386818,
-0.02327900379896164,
-0.032093655318021774,
0.7286028265953064,
0.09307071566581726,
-0.13595923781394958,
0.04600856825709343,
-0.1543358862400055,
-0.23740451037883759,
0.058242011815309525,
0.39455240964889526,
0.20708446204662323,
0.20419806241989136,
-0.20729480683803558,
0.125564843416214,
0.3818558156490326,
0.820830225944519,
0.022582033649086952,
-0.4919860363006592,
-0.1555824726819992,
0.17543533444404602,
-0.24512110650539398,
0.1322820782661438,
0.03761252015829086,
-0.06253080815076828,
0.2009095549583435,
-0.08859634399414062,
0.08807558566331863,
-0.11896108090877533,
0.4518545866012573,
-0.2591820955276489,
-0.06355436146259308,
-0.09694747626781464,
0.10540971159934998,
0.3773235082626343,
-0.0309203639626503,
0.2527310252189636,
0.010354677215218544,
-0.07050533592700958,
-0.06363426893949509,
-0.4495390057563782,
0.19388046860694885,
0.06062993407249451,
-0.03128765523433685,
-0.018632065504789352,
0.33810555934906006,
0.15595293045043945,
-0.061415284872055054,
-0.1318316012620926,
0.18093593418598175,
0.43726077675819397,
0.4754062592983246,
-0.0239020437002182,
0.1957245022058487,
0.19395670294761658,
0.41449710726737976,
-0.22073522210121155,
-0.22524631023406982,
-0.16336318850517273,
-0.30164438486099243,
0.27045708894729614,
-0.1304510533809662,
0.15068569779396057,
-0.25340357422828674,
-0.4367152750492096,
0.10221872478723526,
0.09191613644361496,
-0.1834435909986496,
0.10625569522380829,
0.339456707239151,
-0.11606953293085098,
0.3629489243030548,
0.22386519610881805,
0.4995354413986206,
0.028224965557456017,
-0.17789490520954132,
-0.14716920256614685,
0.0012769177556037903,
-0.08832453191280365,
0.003552495501935482,
0.3351254463195801,
-0.18810012936592102,
0.3637830913066864,
0.17642799019813538,
0.1450977325439453,
-0.3680286705493927,
0.03337559103965759,
-0.14011713862419128,
0.0965864509344101,
0.3299446702003479,
0.13013143837451935,
0.11964292079210281,
0.14719600975513458,
-0.16453850269317627,
-0.0036610588431358337,
0.3807602822780609,
-0.4224366843700409,
-0.18399445712566376,
-0.06591413915157318,
0.11161290109157562,
-0.1454586535692215,
-0.23403513431549072,
-0.87767493724823,
0.14569152891635895,
-0.21630865335464478,
-0.12189054489135742,
-0.04542975872755051,
-0.1352100521326065,
0.06088593229651451,
-0.11571356654167175,
0.28483715653419495,
0.578612208366394,
-0.43170779943466187,
0.009669817984104156,
-0.3088633716106415,
0.13343428075313568,
0.1594982147216797,
0.19949685037136078,
-0.420357882976532,
0.36274638772010803,
-0.4221738278865814,
-0.07785900682210922,
0.29181206226348877,
-0.3653845489025116,
-0.587177574634552,
0.38652876019477844,
-0.03328652307391167,
0.396686851978302,
0.034426651895046234,
0.13359035551548004,
0.21274355053901672,
0.07505624741315842,
0.19203068315982819,
0.14947853982448578,
0.05687803030014038,
-0.37825825810432434,
-0.21315358579158783,
-0.15159514546394348,
0.4024919271469116,
0.0843961089849472,
0.2546604573726654,
0.24142184853553772,
0.06494876742362976,
0.21656551957130432,
0.3014719486236572,
-0.00519002228975296,
-0.24244840443134308,
-0.007964566349983215,
-0.19713957607746124,
0.3876184821128845,
0.15018491446971893,
-0.0442114882171154,
-0.28988131880760193,
0.35578787326812744,
0.02025441825389862,
-0.1135234534740448,
-0.014849014580249786,
-0.01278945803642273,
-0.4223064184188843,
-0.024636780843138695,
-0.041192058473825455,
-0.039879295974969864,
-0.017509888857603073,
-0.0480065792798996,
-0.2603199779987335,
0.024305421859025955,
-0.3195222318172455,
0.2191142737865448,
-0.30995792150497437,
0.26366034150123596,
-0.28140851855278015,
0.4064934253692627,
-0.008341951295733452,
0.08094953745603561,
-0.14647547900676727,
-0.3294048011302948,
0.28408193588256836,
-0.17309848964214325,
-0.24194076657295227,
0.3063771426677704,
0.1922716498374939,
0.0943763479590416,
-0.38738977909088135,
-0.1499684900045395,
0.278634250164032,
-0.09042470157146454,
0.24698787927627563,
0.22695522010326385,
0.07592069357633591,
-0.12535670399665833,
-0.07685153931379318,
0.07621011137962341,
-0.23529352247714996,
0.34638261795043945,
-0.008029084652662277,
-0.12960468232631683,
0.1802518218755722,
-0.19922788441181183,
-0.05378367006778717,
-0.3083467483520508,
0.2079830765724182,
0.012014797888696194,
-0.025788910686969757,
-0.036567069590091705,
-0.026056483387947083,
0.04552759975194931,
0.37957972288131714,
-0.0032964367419481277,
0.018047984689474106,
0.2541503608226776,
-0.2114381492137909,
0.009051859378814697,
-0.08890412002801895,
0.25897330045700073,
0.40484124422073364,
0.1848616749048233,
-0.145354762673378,
-0.11094150692224503,
-0.010913620702922344,
-0.2855788469314575,
0.16354061663150787,
0.14267876744270325,
0.015565025620162487,
0.4425049126148224,
0.014560752548277378,
0.1507950872182846,
-0.32667192816734314,
-0.212168887257576,
-0.03552587702870369,
0.35020914673805237,
-0.361554354429245,
0.028368370607495308,
-0.3687123954296112,
-0.01905033364892006,
0.031189966946840286,
-0.10464928299188614,
-0.1119505912065506,
-0.2352023422718048,
-0.3320057988166809,
0.3960793614387512,
0.1889616698026657,
-0.05154319107532501,
-0.1091800183057785,
0.04888683557510376,
-0.076033815741539,
0.08328267186880112,
0.043094389140605927,
-0.01772337406873703,
-0.2016998827457428,
-0.04395339637994766,
0.4553241431713104,
-0.020384470000863075,
-0.016081059351563454,
-0.18758524954319,
-0.1009276732802391,
-0.038364604115486145,
-0.24504691362380981,
-0.27417775988578796,
0.052645716816186905,
0.3199804723262787,
-0.06350678205490112,
0.34938836097717285,
0.10755045711994171,
-0.2883339822292328,
0.04643798992037773,
-0.11584408581256866,
0.13964520394802094,
0.11330388486385345,
0.12390608340501785,
-0.04070941358804703,
-0.09729611128568649,
-0.5516406893730164,
-0.05369950085878372,
-0.32220637798309326,
0.2650335431098938,
0.19244682788848877,
-0.057353585958480835,
0.22867190837860107,
0.29135385155677795,
-0.053231075406074524,
0.4943777620792389,
0.1509101390838623,
-0.1921590119600296,
-0.2921167314052582,
0.3534291386604309,
-0.11291779577732086,
-0.29855552315711975,
0.039459940046072006,
-0.002918349578976631,
0.16189195215702057,
-0.06157124787569046,
-0.6322011351585388,
0.034155018627643585,
-0.08329631388187408,
0.05885938182473183,
-0.06033854931592941,
-0.16419394314289093,
0.05957922711968422,
-0.1354135423898697,
-0.02563970722258091,
-0.09109938889741898,
-0.1390780657529831,
0.03958060219883919,
-0.03469836711883545,
-0.07175620645284653,
-0.07061346620321274,
0.47349023818969727,
-0.21683639287948608,
0.19800415635108948,
0.023666508495807648,
0.05157024413347244,
0.23601053655147552,
-0.05905675143003464,
0.36066317558288574,
-0.3433736264705658,
-0.5643512606620789,
-0.176687553524971,
-0.15404772758483887,
-0.04410356283187866,
0.18128030002117157,
-0.07049571722745895,
-0.17364516854286194,
-0.23915694653987885,
0.05381043627858162,
-0.12643033266067505,
0.016452498733997345,
0.16116155683994293,
-0.18004147708415985,
-0.2354230284690857,
0.17861784994602203,
0.267939954996109,
-0.14256659150123596,
-0.14246824383735657,
0.04758131876587868,
0.10862917453050613,
0.29002872109413147,
-0.142565056681633,
0.02630908414721489,
0.141381174325943,
-0.28713443875312805,
0.11616236716508865,
-0.10046617686748505,
0.3231615424156189,
0.13213498890399933,
0.08955445140600204,
0.14808186888694763,
0.026802221313118935,
0.7077271938323975,
-0.26398783922195435,
0.11554276943206787,
0.17600472271442413,
-0.0886349231004715,
-0.5422073006629944,
-0.030378390103578568,
-0.09814954549074173,
-0.040973879396915436,
0.08649183809757233,
0.5449784994125366,
-0.0040209293365478516,
0.1546793282032013,
0.2747517228126526,
0.30215907096862793,
-0.07815615087747574,
-0.3641449511051178,
-0.23345349729061127,
-0.11285948753356934,
-0.17600004374980927,
-0.3373129963874817,
0.10179921239614487,
0.19326189160346985,
-0.3117368221282959,
-0.24638918042182922,
-0.26837506890296936,
-0.05027226358652115,
0.21982796490192413,
0.0305880568921566,
0.22342580556869507,
0.22060182690620422,
0.146731436252594,
0.21206897497177124,
-0.06327683478593826,
0.43071702122688293,
0.7950780391693115,
-0.23974987864494324,
-0.38820749521255493,
0.048709262162446976,
0.010827776975929737,
-0.07917561382055283,
0.17241014540195465,
-0.17176368832588196,
-0.11126228421926498,
0.06958098709583282,
0.008069321513175964,
-0.27472472190856934,
0.15965396165847778,
0.4440684914588928,
0.03628214821219444,
-0.1981934905052185,
-0.7887676358222961,
0.5888438820838928,
0.2650095522403717,
-0.04395150765776634,
0.4278028607368469,
0.0667620450258255,
-0.2975649833679199,
0.29595834016799927,
-0.08045367151498795,
0.7437142729759216,
-0.08749639987945557,
-0.11985491216182709,
0.18282806873321533,
-0.008836481720209122,
0.15421871840953827,
-0.26370668411254883,
0.13528724014759064,
-0.2044711709022522,
-0.4689888656139374,
-0.08944042772054672,
-0.12459127604961395,
0.17178797721862793,
0.3242373466491699,
-0.0865602046251297,
0.2215869426727295,
-0.38248926401138306,
0.012392554432153702,
0.03409900516271591,
0.5102887153625488,
-0.009256536141037941,
-0.07436418533325195,
-0.19006100296974182,
0.07086917757987976,
0.19540554285049438,
0.1456165313720703,
0.010865407064557076,
0.03115171007812023,
-0.05790599435567856,
-0.1492103934288025,
-0.44621795415878296,
0.19576603174209595,
-0.16065140068531036,
0.1954784095287323,
-0.2904924154281616,
-0.28817832469940186,
0.21827691793441772,
0.4579037129878998,
0.22022907435894012,
0.20374374091625214,
-0.06761734187602997,
0.1675325483083725,
-0.1720624566078186,
-0.21040160953998566,
0.05093957483768463,
-0.030294299125671387,
0.13287588953971863,
0.051810070872306824,
-0.4246838390827179,
-0.026457473635673523,
-0.017216861248016357,
-0.2174636721611023,
0.10092248022556305,
0.20269162952899933,
0.24738188087940216,
-0.44259703159332275,
-0.2681683897972107,
-0.09042477607727051,
0.16233640909194946,
-0.28163009881973267,
0.042817696928977966,
0.035966381430625916,
0.20864802598953247,
-0.12808316946029663,
0.28181734681129456,
-0.4620938003063202,
-0.12196241319179535,
0.7424882650375366,
0.04355812445282936,
0.04440493881702423,
0.318593293428421,
0.036591317504644394,
-0.07411845028400421,
-0.1054927334189415,
0.03823160380125046,
0.14339832961559296,
-0.560295581817627,
0.43102720379829407,
0.07440808415412903,
0.3610706925392151,
0.1723155528306961,
0.054011229425668716,
0.09310133755207062,
-0.06259959191083908,
-0.11922523379325867,
-0.48100540041923523,
-0.1572311371564865,
0.16547852754592896,
0.00466550886631012,
0.11258794367313385,
-0.09758433699607849,
-0.4593459963798523,
-0.14124087989330292,
-0.030218930914998055,
-0.17763492465019226,
0.22371435165405273,
0.020454859361052513,
-0.10182422399520874,
0.1229904517531395,
-0.16617193818092346,
0.2016853392124176,
-0.21224598586559296,
0.09334582090377808,
0.03006751276552677,
0.20869950950145721,
-0.16689744591712952,
-0.23007461428642273,
0.18349070847034454,
0.050493448972702026,
-0.07756179571151733,
-0.15460751950740814,
-0.3167429566383362,
-0.17268991470336914,
-0.28901004791259766,
0.2626412510871887,
0.41644805669784546,
0.04254729300737381,
0.028164610266685486,
0.20180702209472656,
0.03803463280200958,
-0.2553465962409973,
0.19590014219284058,
-0.02080930769443512,
0.2647883892059326,
0.18215292692184448,
-0.007711105048656464,
0.27356666326522827,
0.13319657742977142,
-0.40881821513175964,
0.10706513375043869,
-0.03313681483268738,
0.18248498439788818,
0.6145604252815247,
-0.38979822397232056,
0.24596470594406128,
0.2812420129776001,
0.2191796898841858,
0.39743730425834656,
-0.14105813205242157,
-0.01701965369284153,
-0.01893923059105873,
0.12941990792751312,
-0.41810721158981323,
-0.151316300034523,
0.24625177681446075,
0.08801201730966568,
-0.09518048167228699,
0.1014304906129837,
0.1712760180234909,
-0.39264094829559326,
0.06280678510665894,
0.018244285136461258,
0.5806928277015686,
0.05085112899541855,
0.4016781449317932,
0.38112181425094604,
0.02768601104617119,
0.029673418030142784,
0.2437998205423355,
0.24695220589637756,
0.26098453998565674,
0.35516899824142456,
-0.2360413372516632,
-0.08589670062065125,
-0.13762417435646057,
0.18761874735355377,
-0.19214946031570435,
-0.5169728398323059,
0.08452534675598145,
0.29258793592453003,
-0.26089218258857727,
0.056478455662727356,
-0.025541096925735474,
0.2863416075706482,
-0.163436159491539,
-0.04588959738612175,
-0.16526460647583008,
-0.2060631960630417,
-0.20045122504234314,
-0.0796901285648346,
0.06140879541635513,
-0.24815437197685242,
-0.15592697262763977,
0.0488729290664196,
-0.05116366967558861,
-0.1537470817565918,
-0.16880416870117188,
0.18129025399684906,
-0.3121832609176636,
-0.5961878299713135,
-0.15252870321273804,
0.02013305202126503,
0.1318839192390442,
-0.3641496002674103,
0.2562139630317688,
0.33247482776641846,
0.05961783975362778,
0.48181426525115967,
0.23447391390800476,
0.48139262199401855,
0.3965250253677368,
0.22780920565128326,
0.04654581472277641,
0.12420898675918579,
-0.10621025413274765,
-0.03420604020357132,
0.1746826320886612,
0.19116061925888062,
0.21953615546226501,
0.10865721106529236,
0.13891048729419708,
-0.12902195751667023,
0.3071405589580536,
0.16865631937980652,
0.43696489930152893,
-0.47198933362960815,
0.14622502028942108,
-0.036448873579502106,
0.10499946027994156,
-0.3670559227466583,
-0.09407386928796768,
-0.2582019567489624,
-0.3493247628211975,
0.32550838589668274,
-0.12360255420207977,
-0.005947064608335495,
0.000053141266107559204,
0.034823108464479446,
-0.20397116243839264,
0.25258976221084595,
0.35461536049842834,
0.20132902264595032,
-0.3646703064441681,
0.047376811504364014,
-0.7762361168861389,
0.08483396470546722,
-0.02787717804312706,
0.11910521984100342,
0.05852817744016647,
0.061663344502449036,
-0.12447855621576309,
0.08726802468299866,
0.16947214305400848,
0.049714285880327225,
0.02323073148727417,
0.13344478607177734,
-0.3849169909954071,
-0.1787857562303543,
-0.1527784913778305,
0.03441987931728363,
-0.1313524842262268,
-0.2989697754383087,
0.051075082272291183,
-0.48328250646591187,
-0.12302471697330475,
-0.0162920281291008,
-0.0728139653801918,
-0.07530073821544647,
0.47235479950904846,
0.5854244828224182,
-0.059424035251140594,
0.724819540977478,
0.04121537506580353,
-0.13986368477344513,
-0.3654260039329529,
-0.36013510823249817,
-0.06871488690376282,
0.3155113458633423,
0.28108853101730347,
0.24475210905075073,
-0.2669014036655426,
-0.13937045633792877,
-0.18863432109355927,
0.270046204328537,
0.018066808581352234,
-0.1398557722568512,
-0.42798399925231934,
-0.09235692024230957,
-0.10108824074268341,
-0.05452447012066841,
0.08911494165658951,
0.2010369896888733,
0.05356095731258392,
0.09545526653528214,
0.030653879046440125,
-0.20114505290985107,
0.4791107773780823,
-0.27530771493911743,
-0.025989597663283348,
-0.22039809823036194,
0.06444407254457474,
0.06927619129419327,
0.13997091352939606,
-0.3556005656719208,
0.11912078410387039,
0.48214441537857056,
0.049868784844875336,
-0.1860196441411972,
0.2778065502643585,
-0.2064054161310196,
0.25408151745796204,
-0.12207023799419403,
0.23468232154846191,
0.11676749587059021,
-0.3352922797203064,
0.1171097606420517,
-0.1928553432226181
] |
https://github.com/huggingface/datasets/issues/6349
|
Can't load ds = load_dataset("imdb")
|
I am getting the following error:
Env: Python3.10
datasets: 2.10.1
Linux: Amazon Linux2
`Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/load.py", line 1759, in load_dataset
builder_instance = load_dataset_builder(
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/load.py", line 1496, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/load.py", line 1218, in dataset_module_factory
raise e1 from None
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/load.py", line 1202, in dataset_module_factory
).get_module()
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/load.py", line 767, in get_module
else get_data_patterns_in_dataset_repository(hfh_dataset_info, self.data_dir)
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/data_files.py", line 675, in get_data_patterns_in_dataset_repository
return _get_data_files_patterns(resolver)
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/data_files.py", line 236, in _get_data_files_patterns
data_files = pattern_resolver(pattern)
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/data_files.py", line 486, in _resolve_single_pattern_in_dataset_repository
glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)]
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/fsspec/spec.py", line 606, in glob
pattern = glob_translate(path + ("/" if ends_with_sep else ""))
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/fsspec/utils.py", line 734, in glob_translate
raise ValueError(
ValueError: Invalid pattern: '**' can only be an entire path component`
|
### Describe the bug
I did `from datasets import load_dataset, load_metric` and then `ds = load_dataset("imdb")` and it gave me the error:
ExpectedMoreDownloadedFiles: {'http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz'}
I tried doing `ds = load_dataset("imdb",download_mode="force_redownload")` as well as reinstalling dataset. I still face this problem.
### Steps to reproduce the bug
1. from datasets import load_dataset, load_metric
2. ds = load_dataset("imdb")
### Expected behavior
It should load and give me this when I run `ds`
DatasetDict({
train: Dataset({
features: ['text', 'label'],
num_rows: 25000
})
test: Dataset({
features: ['text', 'label'],
num_rows: 25000
})
unsupervised: Dataset({
features: ['text', 'label'],
num_rows: 50000
})
})
### Environment info
- `datasets` version: 2.14.6
- Platform: Linux-5.4.0-164-generic-x86_64-with-glibc2.17
- Python version: 3.8.18
- Huggingface_hub version: 0.16.2
- PyArrow version: 13.0.0
- Pandas version: 2.0.2
| 134
|
Can't load ds = load_dataset("imdb")
### Describe the bug
I did `from datasets import load_dataset, load_metric` and then `ds = load_dataset("imdb")` and it gave me the error:
ExpectedMoreDownloadedFiles: {'http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz'}
I tried doing `ds = load_dataset("imdb",download_mode="force_redownload")` as well as reinstalling dataset. I still face this problem.
### Steps to reproduce the bug
1. from datasets import load_dataset, load_metric
2. ds = load_dataset("imdb")
### Expected behavior
It should load and give me this when I run `ds`
DatasetDict({
train: Dataset({
features: ['text', 'label'],
num_rows: 25000
})
test: Dataset({
features: ['text', 'label'],
num_rows: 25000
})
unsupervised: Dataset({
features: ['text', 'label'],
num_rows: 50000
})
})
### Environment info
- `datasets` version: 2.14.6
- Platform: Linux-5.4.0-164-generic-x86_64-with-glibc2.17
- Python version: 3.8.18
- Huggingface_hub version: 0.16.2
- PyArrow version: 13.0.0
- Pandas version: 2.0.2
I am getting the following error:
Env: Python3.10
datasets: 2.10.1
Linux: Amazon Linux2
`Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/load.py", line 1759, in load_dataset
builder_instance = load_dataset_builder(
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/load.py", line 1496, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/load.py", line 1218, in dataset_module_factory
raise e1 from None
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/load.py", line 1202, in dataset_module_factory
).get_module()
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/load.py", line 767, in get_module
else get_data_patterns_in_dataset_repository(hfh_dataset_info, self.data_dir)
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/data_files.py", line 675, in get_data_patterns_in_dataset_repository
return _get_data_files_patterns(resolver)
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/data_files.py", line 236, in _get_data_files_patterns
data_files = pattern_resolver(pattern)
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/datasets/data_files.py", line 486, in _resolve_single_pattern_in_dataset_repository
glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)]
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/fsspec/spec.py", line 606, in glob
pattern = glob_translate(path + ("/" if ends_with_sep else ""))
File "/home/ec2-user/anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/fsspec/utils.py", line 734, in glob_translate
raise ValueError(
ValueError: Invalid pattern: '**' can only be an entire path component`
|
[
-0.3400319814682007,
0.0037206560373306274,
-0.08301885426044464,
0.5072858333587646,
0.3482735753059387,
0.13206663727760315,
0.31678318977355957,
0.05768486484885216,
0.589535653591156,
0.023881785571575165,
0.017912935465574265,
0.19759416580200195,
-0.04222168028354645,
0.1094679906964302,
-0.02630634233355522,
-0.20183682441711426,
0.018414989113807678,
-0.02124200016260147,
-0.13305449485778809,
0.04133220762014389,
-0.14638787508010864,
0.24842475354671478,
-0.35044801235198975,
-0.25265026092529297,
-0.23081324994564056,
0.15276753902435303,
0.11613184213638306,
0.04273229092359543,
-0.28400346636772156,
-0.3354170024394989,
0.48566651344299316,
-0.003930773586034775,
0.43447938561439514,
0.44329410791397095,
-0.00011861485108966008,
0.029404424130916595,
0.5371197462081909,
-0.151569202542305,
-0.46226176619529724,
-0.5503178238868713,
-0.07959355413913727,
-0.029325995594263077,
0.37454161047935486,
-0.18269239366054535,
0.05857022851705551,
-0.15946809947490692,
-0.12361758947372437,
-0.36381614208221436,
0.031282760202884674,
0.23127692937850952,
0.17213168740272522,
0.16979269683361053,
0.16316501796245575,
-0.20800137519836426,
0.22337642312049866,
0.11580868065357208,
-0.0677950456738472,
0.40591496229171753,
0.05396338924765587,
-0.020657524466514587,
0.05494897812604904,
-0.1648613065481186,
-0.2008969485759735,
0.19761718809604645,
0.4591934084892273,
0.18461592495441437,
0.1900913119316101,
-0.14660035073757172,
0.10632611811161041,
0.22544044256210327,
0.9019074440002441,
0.0285329632461071,
-0.4573207199573517,
-0.024862125515937805,
0.13399598002433777,
-0.19022893905639648,
0.12987112998962402,
0.057297997176647186,
-0.12163344025611877,
0.07974356412887573,
-0.18088415265083313,
0.08843819051980972,
-0.18536332249641418,
0.4850696325302124,
-0.28677165508270264,
0.16326281428337097,
-0.17242546379566193,
0.1309930384159088,
0.2683615982532501,
-0.09983862936496735,
0.3008067309856415,
0.07595840096473694,
-0.05946023389697075,
-0.07555785030126572,
-0.4044433832168579,
0.2211087942123413,
0.11962346732616425,
-0.04341290891170502,
-0.10738342255353928,
0.4698221683502197,
0.16645966470241547,
-0.061223261058330536,
0.06382638216018677,
0.17157049477100372,
0.3648936450481415,
0.3756273090839386,
0.10312743484973907,
0.3483796715736389,
0.11531132459640503,
0.40615713596343994,
-0.16585475206375122,
-0.20239600539207458,
-0.14994129538536072,
-0.24287158250808716,
0.2633849084377289,
-0.11209557205438614,
0.17152509093284607,
-0.28051021695137024,
-0.5250173211097717,
0.1374516785144806,
0.0877453163266182,
-0.19969774782657623,
0.19962863624095917,
0.356179416179657,
-0.06620039790868759,
0.1549195647239685,
0.28137773275375366,
0.46058833599090576,
0.032820478081703186,
-0.04847206175327301,
-0.17987899482250214,
-0.06607280671596527,
-0.07958349585533142,
-0.11207816749811172,
0.40778037905693054,
-0.10076488554477692,
0.5034319162368774,
0.1303265392780304,
0.1677246391773224,
-0.34326237440109253,
0.0799773558974266,
-0.062030524015426636,
0.10694501549005508,
0.35609281063079834,
0.04119400307536125,
0.09986769407987595,
0.20166410505771637,
-0.1707153469324112,
0.012318938970565796,
0.3048330843448639,
-0.38081055879592896,
-0.2020157128572464,
-0.17015467584133148,
0.13718464970588684,
-0.12629055976867676,
-0.2700749635696411,
-0.7807948589324951,
0.03389817476272583,
-0.08583394438028336,
-0.2357795685529709,
-0.04424078017473221,
-0.12909875810146332,
0.03910211846232414,
-0.08305478096008301,
0.3647853136062622,
0.4932224750518799,
-0.47477078437805176,
-0.03745080158114433,
-0.36256611347198486,
0.17032642662525177,
0.1819104552268982,
0.10991045832633972,
-0.4200884699821472,
0.34355735778808594,
-0.3290959596633911,
-0.20483696460723877,
0.24047215282917023,
-0.4722248315811157,
-0.5370019674301147,
0.389207661151886,
0.012878045439720154,
0.2795228362083435,
0.09421995282173157,
0.07756587862968445,
0.17965254187583923,
0.03522380813956261,
0.2560758590698242,
0.15908612310886383,
0.08219347894191742,
-0.31708264350891113,
-0.19987361133098602,
-0.11925636231899261,
0.4548184275627136,
0.13076917827129364,
0.1599346250295639,
0.08359364420175552,
0.11813086271286011,
0.3470901548862457,
0.24682608246803284,
-0.0009960606694221497,
-0.2443939745426178,
0.08692841976881027,
-0.16600646078586578,
0.2531960606575012,
0.11689627915620804,
-0.0021891966462135315,
-0.421194463968277,
0.31622791290283203,
-0.008402183651924133,
-0.05968327820301056,
-0.09130635857582092,
0.0493897870182991,
-0.4205189347267151,
-0.012684834189713001,
-0.10330124199390411,
-0.16794505715370178,
0.03955352306365967,
-0.08964252471923828,
-0.19711408019065857,
-0.14073234796524048,
-0.26412448287010193,
0.027656350284814835,
-0.3026251792907715,
0.25499704480171204,
-0.35658398270606995,
0.4355742633342743,
0.059530146420001984,
0.07780987024307251,
-0.06825274229049683,
-0.27076929807662964,
0.3254358470439911,
-0.16325117647647858,
-0.29071953892707825,
0.30246832966804504,
0.24318498373031616,
0.20229585468769073,
-0.405248761177063,
-0.13909225165843964,
0.17240656912326813,
-0.0748058333992958,
0.2870306670665741,
0.3296547532081604,
0.05864167958498001,
-0.1422346532344818,
-0.242025226354599,
0.017955005168914795,
-0.25266414880752563,
0.45212483406066895,
-0.09346413612365723,
-0.1770433932542801,
0.18146581947803497,
-0.12024274468421936,
-0.06868908554315567,
-0.3768424391746521,
0.19327811896800995,
0.13102227449417114,
0.10213689506053925,
-0.05186939984560013,
0.18516787886619568,
0.032769300043582916,
0.21674606204032898,
0.13935600221157074,
-0.0009952187538146973,
0.2537529468536377,
-0.2899987995624542,
-0.042171165347099304,
0.005896689370274544,
0.3823263347148895,
0.4252678155899048,
0.21438202261924744,
-0.09745433926582336,
-0.11436986178159714,
-0.03758059814572334,
-0.21987546980381012,
0.23860672116279602,
0.1417790949344635,
0.14621049165725708,
0.4006376266479492,
0.062185369431972504,
0.08138275891542435,
-0.3261019289493561,
-0.19081231951713562,
0.011792682111263275,
0.3746725916862488,
-0.39094680547714233,
0.060089342296123505,
-0.41363513469696045,
0.026357337832450867,
0.14340940117835999,
0.1193694993853569,
-0.026448864489793777,
-0.2082989513874054,
-0.3075881004333496,
0.4512942135334015,
0.11414645612239838,
-0.0794086754322052,
-0.0927179753780365,
0.06734395027160645,
-0.01775476336479187,
-0.1215147152543068,
-0.019864536821842194,
-0.116762176156044,
-0.17666563391685486,
-0.01886749267578125,
0.4419388771057129,
0.07154706120491028,
0.12390732020139694,
-0.15475228428840637,
-0.08907166123390198,
-0.08617860823869705,
-0.3394200801849365,
-0.22577789425849915,
0.06220715492963791,
0.38352158665657043,
0.07401025295257568,
0.30320578813552856,
0.059644632041454315,
-0.35967978835105896,
0.08304547518491745,
-0.0772910863161087,
0.07741736620664597,
0.11573369801044464,
0.10349509865045547,
-0.04984131455421448,
-0.03240629658102989,
-0.6148930191993713,
-0.03129180520772934,
-0.3673570454120636,
0.22432397305965424,
0.3424597382545471,
-0.059263020753860474,
0.09396321326494217,
0.23668056726455688,
-0.0692347064614296,
0.5349883437156677,
0.17569600045681,
-0.2083454132080078,
-0.45913800597190857,
0.2954534590244293,
-0.21658441424369812,
-0.19416576623916626,
-0.0010300539433956146,
0.08728865534067154,
0.3308720886707306,
-0.024762943387031555,
-0.5873804092407227,
0.10251495987176895,
-0.049153946340084076,
0.0568917877972126,
-0.07664291560649872,
-0.013570869341492653,
0.1304650902748108,
-0.04697888717055321,
-0.03333334997296333,
-0.06500813364982605,
-0.25822752714157104,
0.0929066389799118,
0.010565726086497307,
0.06516887247562408,
-0.19600528478622437,
0.4637855589389801,
-0.16831566393375397,
0.3389773964881897,
0.08996714651584625,
-0.05962050333619118,
0.23474512994289398,
0.004820011556148529,
0.21767711639404297,
-0.38959768414497375,
-0.4962575435638428,
-0.07348877936601639,
-0.17439645528793335,
-0.06476284563541412,
0.11558866500854492,
-0.0824919193983078,
-0.29024094343185425,
-0.23778843879699707,
0.04750843718647957,
-0.20042511820793152,
0.012163203209638596,
0.0677342340350151,
-0.17293007671833038,
-0.11888376623392105,
0.14045432209968567,
0.28246626257896423,
-0.15149004757404327,
-0.1861802041530609,
-0.064360611140728,
-0.12226758897304535,
0.19986549019813538,
-0.1495896875858307,
-0.09707391262054443,
0.1292908489704132,
-0.24886327981948853,
0.2698339819908142,
-0.15500132739543915,
0.26450830698013306,
0.09239262342453003,
0.07438445091247559,
0.12327698618173599,
0.018315818160772324,
0.575866162776947,
-0.3625641167163849,
0.1536085456609726,
0.101655513048172,
-0.045155543833971024,
-0.6395833492279053,
-0.029658138751983643,
-0.14891572296619415,
0.20472776889801025,
0.007361866533756256,
0.4069845378398895,
-0.13257966935634613,
0.10115469247102737,
0.2984672486782074,
0.2743567228317261,
-0.08097585290670395,
-0.40874993801116943,
-0.1682126671075821,
-0.027518535032868385,
-0.18878276646137238,
-0.2816534638404846,
0.11839877814054489,
0.22173002362251282,
-0.23151132464408875,
-0.26730111241340637,
-0.2894424796104431,
0.043696388602256775,
0.11875034868717194,
0.01771717146039009,
0.2839535176753998,
0.11309085786342621,
0.12392821907997131,
0.1534813642501831,
-0.15646882355213165,
0.5131235122680664,
0.8466647267341614,
-0.1731400489807129,
-0.2876850664615631,
0.11596035957336426,
0.08911383152008057,
-0.03903394192457199,
0.10235671699047089,
-0.1056542620062828,
-0.0941118374466896,
0.08091292530298233,
0.08995313197374344,
-0.290960431098938,
0.02074390836060047,
0.465079128742218,
0.03881207853555679,
-0.1111484244465828,
-0.6748106479644775,
0.561002790927887,
0.18705643713474274,
0.027916647493839264,
0.38542288541793823,
0.045628633350133896,
-0.32158902287483215,
0.4241432547569275,
0.03504926338791847,
0.6809787750244141,
0.0931212306022644,
-0.09159363806247711,
0.17778602242469788,
0.0539807453751564,
0.31883466243743896,
-0.4583158493041992,
0.1135784313082695,
-0.2627480924129486,
-0.29095467925071716,
-0.06790663301944733,
-0.12670482695102692,
0.16835471987724304,
0.30573350191116333,
-0.11583398282527924,
0.24213160574436188,
-0.40050435066223145,
-0.09837421774864197,
-0.01679123006761074,
0.49663734436035156,
-0.10794448107481003,
-0.15474142134189606,
-0.19278322160243988,
0.10170315206050873,
0.07181689143180847,
0.13846325874328613,
-0.027786366641521454,
0.11162029206752777,
0.02782660350203514,
-0.27962976694107056,
-0.5250899791717529,
0.20235487818717957,
-0.17804159224033356,
0.31181126832962036,
-0.22683069109916687,
-0.3332637846469879,
0.19524134695529938,
0.33507710695266724,
0.2030353844165802,
0.2790124714374542,
-0.0852823331952095,
0.2504810690879822,
-0.1378168761730194,
-0.10373406857252121,
0.08304005116224289,
-0.06274363398551941,
0.15555672347545624,
0.006239928305149078,
-0.39179298281669617,
-0.0511302724480629,
0.02191142737865448,
-0.20860646665096283,
0.24658778309822083,
0.14118249714374542,
0.10596033930778503,
-0.42369356751441956,
-0.294613778591156,
0.016396135091781616,
0.06407757103443146,
-0.30214351415634155,
0.05892119184136391,
0.0055329203605651855,
0.02305341139435768,
-0.06963876634836197,
0.2790355384349823,
-0.4749968945980072,
-0.07787589728832245,
0.8283219933509827,
0.035250887274742126,
0.004511639475822449,
0.41205403208732605,
0.10765975713729858,
-0.05300626903772354,
-0.1736045777797699,
0.19330424070358276,
0.1405593454837799,
-0.6076319813728333,
0.34279364347457886,
0.14127106964588165,
0.37614309787750244,
0.2410448044538498,
0.05705279856920242,
0.0625765472650528,
0.027106817811727524,
-0.10075488686561584,
-0.430040568113327,
-0.09336849302053452,
0.15849992632865906,
-0.024479780346155167,
0.12144556641578674,
-0.07214449346065521,
-0.46407797932624817,
-0.17008376121520996,
0.07190103083848953,
-0.20272932946681976,
0.25005149841308594,
0.007929710671305656,
-0.06257086247205734,
0.08980920165777206,
-0.132532000541687,
0.19905035197734833,
-0.2164108157157898,
0.13007256388664246,
0.007726121693849564,
0.12354260683059692,
-0.20154109597206116,
-0.24861784279346466,
0.17413349449634552,
-0.0066940877586603165,
0.00724468007683754,
-0.21740320324897766,
-0.3226100206375122,
-0.15428590774536133,
-0.25065237283706665,
0.28129521012306213,
0.37075865268707275,
0.08994230628013611,
0.0885239839553833,
0.1779053509235382,
0.009659212082624435,
-0.19624753296375275,
0.09522970020771027,
0.018658235669136047,
0.16255483031272888,
0.2128710001707077,
0.058044493198394775,
0.30803990364074707,
0.07249723374843597,
-0.34759578108787537,
0.0659005269408226,
-0.08471241593360901,
0.18410983681678772,
0.5906031131744385,
-0.4517119526863098,
0.1655515432357788,
0.07264647632837296,
0.16733448207378387,
0.4276982545852661,
-0.12043853104114532,
-0.0413409061729908,
-0.05055289715528488,
0.18236473202705383,
-0.4131709933280945,
-0.12729178369045258,
0.11383593082427979,
0.14021846652030945,
-0.07613445073366165,
0.047448813915252686,
0.062403615564107895,
-0.3733462691307068,
0.1268932819366455,
0.07368830591440201,
0.47678738832473755,
-0.23665829002857208,
0.42523661255836487,
0.310161292552948,
-0.026800641790032387,
-0.004217896610498428,
0.17770440876483917,
0.2016502171754837,
0.25767090916633606,
0.3538690209388733,
-0.15067380666732788,
-0.0024970434606075287,
-0.009124752134084702,
0.20654666423797607,
-0.15083801746368408,
-0.3575693666934967,
0.05092165991663933,
0.18421903252601624,
-0.16669660806655884,
0.10390566289424896,
0.02060861885547638,
0.2555024027824402,
-0.04192565008997917,
-0.06487977504730225,
-0.33673787117004395,
-0.22161875665187836,
-0.21280211210250854,
-0.15046411752700806,
-0.11456487327814102,
-0.2903152406215668,
-0.15233257412910461,
0.03389875963330269,
-0.10470134019851685,
-0.20449505746364594,
-0.2348884642124176,
0.2083578109741211,
-0.23219327628612518,
-0.6871917843818665,
-0.11986877769231796,
-0.02514313906431198,
0.08650077134370804,
-0.3218182623386383,
0.323667049407959,
0.359674334526062,
0.02258995920419693,
0.37968599796295166,
0.22397641837596893,
0.5076111555099487,
0.3640781044960022,
0.12393443286418915,
0.05281132832169533,
0.15408360958099365,
-0.17699883878231049,
-0.0660332664847374,
0.17947301268577576,
0.18503743410110474,
0.17864707112312317,
0.11576472222805023,
0.16510352492332458,
-0.13822035491466522,
0.3157375454902649,
0.10785256326198578,
0.33403122425079346,
-0.4545494019985199,
0.23825350403785706,
-0.01824599876999855,
0.12568578124046326,
-0.23924463987350464,
-0.04262911528348923,
-0.404034286737442,
-0.38132786750793457,
0.3421403169631958,
-0.09709304571151733,
0.012188214808702469,
0.00877714529633522,
0.05486519634723663,
-0.21232953667640686,
0.34652143716812134,
0.24216103553771973,
0.19575121998786926,
-0.4241161346435547,
0.07901062071323395,
-0.659722626209259,
0.07534833252429962,
-0.04514889046549797,
0.12540675699710846,
0.051995471119880676,
0.14439430832862854,
0.004722684621810913,
0.1318245232105255,
0.15543238818645477,
-0.09677085280418396,
0.007759147323668003,
0.19218207895755768,
-0.37543997168540955,
-0.029103253036737442,
-0.13607026636600494,
0.08541828393936157,
-0.11842263489961624,
-0.298005610704422,
-0.1000036746263504,
-0.3871559500694275,
-0.11354556679725647,
-0.08008747547864914,
-0.0541277676820755,
0.03288738802075386,
0.42661869525909424,
0.5803329944610596,
-0.06731245666742325,
0.7030668258666992,
0.010769888758659363,
-0.0914616733789444,
-0.3899679481983185,
-0.4477177560329437,
-0.05481470376253128,
0.3713609576225281,
0.22593949735164642,
0.3446516692638397,
-0.23595966398715973,
-0.21735583245754242,
-0.20843125879764557,
0.16033042967319489,
-0.09921306371688843,
-0.1677061766386032,
-0.3693009316921234,
-0.10455813258886337,
-0.17184147238731384,
0.043989960104227066,
0.02376142144203186,
0.11917136609554291,
0.057980455458164215,
0.08449076116085052,
0.0014412924647331238,
-0.24842949211597443,
0.49408477544784546,
-0.21728654205799103,
-0.037464484572410583,
-0.09038577973842621,
0.1013987809419632,
0.15261103212833405,
0.06720419973134995,
-0.35098835825920105,
0.18521127104759216,
0.47826239466667175,
-0.043224141001701355,
-0.13974596560001373,
0.26270079612731934,
-0.13833045959472656,
0.26753461360931396,
-0.19734449684619904,
0.12541264295578003,
0.08091537654399872,
-0.32334187626838684,
-0.03146025538444519,
-0.28216370940208435
] |
https://github.com/huggingface/datasets/issues/6347
|
Incorrect example code in 'Create a dataset' docs
|
This was fixed in https://github.com/huggingface/datasets/pull/6247. You can find the fix in the `main` version of the docs
|
### Describe the bug
On [this](https://huggingface.co/docs/datasets/create_dataset) page, the example code for loading in images and audio is incorrect.
Currently, examples are:
``` python
from datasets import ImageFolder
dataset = load_dataset("imagefolder", data_dir="/path/to/pokemon")
```
and
``` python
from datasets import AudioFolder
dataset = load_dataset("audiofolder", data_dir="/path/to/folder")
```
I'm pretty sure the imports are wrong and should be:
``` python
from datasets import load_dataset
dataset = load_dataset("audiofolder", data_dir="/path/to/folder")
```
I am happy to update this if this is right but just wanted to check before making any changes.
### Steps to reproduce the bug
Go to https://huggingface.co/docs/datasets/create_dataset
### Expected behavior
N/A
### Environment info
N/A
| 17
|
Incorrect example code in 'Create a dataset' docs
### Describe the bug
On [this](https://huggingface.co/docs/datasets/create_dataset) page, the example code for loading in images and audio is incorrect.
Currently, examples are:
``` python
from datasets import ImageFolder
dataset = load_dataset("imagefolder", data_dir="/path/to/pokemon")
```
and
``` python
from datasets import AudioFolder
dataset = load_dataset("audiofolder", data_dir="/path/to/folder")
```
I'm pretty sure the imports are wrong and should be:
``` python
from datasets import load_dataset
dataset = load_dataset("audiofolder", data_dir="/path/to/folder")
```
I am happy to update this if this is right but just wanted to check before making any changes.
### Steps to reproduce the bug
Go to https://huggingface.co/docs/datasets/create_dataset
### Expected behavior
N/A
### Environment info
N/A
This was fixed in https://github.com/huggingface/datasets/pull/6247. You can find the fix in the `main` version of the docs
|
[
0.10520043969154358,
-0.31855326890945435,
-0.024814145639538765,
0.4940106272697449,
0.09755571186542511,
-0.024004079401493073,
0.3480845093727112,
-0.0857214480638504,
0.09643733501434326,
0.09243975579738617,
-0.1433933675289154,
0.171068012714386,
-0.07363741099834442,
0.32302120327949524,
0.31259992718696594,
-0.13733278214931488,
0.29220300912857056,
0.209440216422081,
-0.32150202989578247,
-0.06994063407182693,
-0.19201910495758057,
0.4307299554347992,
-0.25328153371810913,
0.02387036755681038,
-0.3340725600719452,
0.1405942291021347,
-0.24061138927936554,
0.46232473850250244,
-0.22921879589557648,
-0.2848341763019562,
0.2452554553747177,
0.06626469641923904,
0.10408622026443481,
0.6147079467773438,
-0.00011750643170671538,
-0.062457576394081116,
0.31177955865859985,
-0.1676405817270279,
-0.09007014334201813,
-0.2970070242881775,
-0.30064937472343445,
-0.027375459671020508,
0.13941583037376404,
-0.08295027166604996,
0.027708813548088074,
-0.31325146555900574,
-0.07776537537574768,
-0.24166515469551086,
0.6037494540214539,
0.2760361433029175,
0.16844704747200012,
0.2994982600212097,
0.18003249168395996,
-0.09499133378267288,
0.09863043576478958,
0.46671271324157715,
-0.01374748907983303,
0.44511404633522034,
0.16415071487426758,
-0.010193699970841408,
0.12491077184677124,
0.35079166293144226,
0.14889970421791077,
0.03457876294851303,
0.5960197448730469,
0.2520645558834076,
-0.4050494134426117,
-0.41208982467651367,
-0.1495988965034485,
0.36322861909866333,
0.49260932207107544,
-0.2576579451560974,
-0.5770531892776489,
-0.3466810882091522,
-0.05487477406859398,
-0.2913249135017395,
0.31456491351127625,
0.2544461786746979,
-0.08335055410861969,
0.09465871751308441,
-0.27855658531188965,
-0.15331986546516418,
-0.0723407045006752,
0.30532053112983704,
0.16530722379684448,
-0.227828711271286,
-0.33253949880599976,
-0.04078192263841629,
0.016272421926259995,
-0.2355208843946457,
-0.012872881256043911,
-0.14565742015838623,
0.04252326861023903,
0.34448421001434326,
-0.06685739755630493,
0.14959539473056793,
0.010159425437450409,
0.37963438034057617,
0.1034606322646141,
-0.007802098989486694,
0.10757074505090714,
-0.13380515575408936,
-0.2188616693019867,
0.30572858452796936,
0.12910598516464233,
0.13551919162273407,
0.14432044327259064,
-0.11840924620628357,
0.21033631265163422,
0.2522872984409332,
0.12495259940624237,
-0.1914951205253601,
-0.16018949449062347,
-0.14020901918411255,
-0.11066503822803497,
-0.339059442281723,
0.3472856879234314,
-0.11648588627576828,
-0.1222599446773529,
0.029885951429605484,
-0.0826442688703537,
-0.16430924832820892,
0.04410598799586296,
0.310360848903656,
0.08393453061580658,
-0.28043270111083984,
0.18204444646835327,
0.5423824787139893,
-0.1092013344168663,
-0.051771197468042374,
-0.17363283038139343,
0.1932656466960907,
-0.25975435972213745,
0.06761055439710617,
0.15385973453521729,
-0.3123675286769867,
0.5234838128089905,
0.23034457862377167,
0.22466683387756348,
-0.16340269148349762,
-0.029208537191152573,
0.10360448062419891,
0.18796783685684204,
0.1336427628993988,
0.10450144112110138,
0.07201740890741348,
0.11400000751018524,
-0.17838844656944275,
-0.09832153469324112,
0.10148931294679642,
-0.32661372423171997,
-0.058540552854537964,
-0.17258808016777039,
0.11908286064863205,
-0.33609539270401,
0.04588562250137329,
-0.4927590787410736,
0.2455020695924759,
0.04485417529940605,
-0.3295590579509735,
-0.0347013846039772,
-0.04154476523399353,
-0.2922251224517822,
-0.10845988988876343,
0.42054304480552673,
0.7536677122116089,
-0.20067544281482697,
-0.15089178085327148,
-0.044406890869140625,
-0.06756046414375305,
-0.031342171132564545,
0.23747262358665466,
-0.14428120851516724,
0.333610475063324,
-0.5369756817817688,
0.07386019825935364,
0.16311419010162354,
-0.51460862159729,
0.1119624450802803,
0.12362770736217499,
0.08718129992485046,
0.2119600772857666,
0.05397103726863861,
-0.005920846480876207,
-0.03673342987895012,
-0.006100041791796684,
0.12043383717536926,
0.2964549660682678,
-0.008413111791014671,
0.22462382912635803,
0.04592273756861687,
-0.29395759105682373,
0.13214483857154846,
0.055073779076337814,
-0.37926802039146423,
0.2825162410736084,
0.12990975379943848,
0.04242703318595886,
0.32413822412490845,
-0.17965324223041534,
-0.03007339872419834,
0.3616397976875305,
0.2740975022315979,
0.09058870375156403,
0.0332956463098526,
-0.21951359510421753,
-0.4122524857521057,
0.15068331360816956,
-0.07062909007072449,
0.14861714839935303,
-0.0032035112380981445,
-0.025614138692617416,
-0.3738724887371063,
-0.0881546139717102,
-0.41274169087409973,
-0.17481034994125366,
0.06457412987947464,
-0.04038465768098831,
0.06086723878979683,
0.023491136729717255,
-0.15739113092422485,
0.47890111804008484,
0.003231855109333992,
0.277299165725708,
-0.6287043690681458,
0.2788497805595398,
0.03419531136751175,
-0.14388523995876312,
0.16001467406749725,
0.10328622162342072,
0.17485228180885315,
-0.19177518784999847,
-0.07798013836145401,
0.6498210430145264,
0.3693426847457886,
0.5015419721603394,
-0.1875838339328766,
0.10712588578462601,
0.3429933190345764,
-0.26028749346733093,
0.16620782017707825,
0.08448772132396698,
0.26893341541290283,
-0.016764000058174133,
-0.5120630264282227,
0.3344637155532837,
-0.08983632922172546,
0.08966302871704102,
0.21971605718135834,
-0.17131075263023376,
-0.004770165309309959,
0.24550724029541016,
-0.26635801792144775,
-0.20078755915164948,
0.09835529327392578,
0.05516902357339859,
0.41658467054367065,
0.06352312862873077,
-0.21516932547092438,
-0.16170012950897217,
0.12874063849449158,
-0.09366938471794128,
0.008674785494804382,
0.20514270663261414,
-0.050582803785800934,
-0.1919470727443695,
0.10930433869361877,
0.15574707090854645,
0.37207889556884766,
0.14707811176776886,
-0.08745376765727997,
0.18045425415039062,
0.059391338378190994,
-0.1406872719526291,
0.2699160575866699,
0.06908212602138519,
0.04432246461510658,
-0.0866674855351448,
0.0011301469057798386,
-0.13394251465797424,
-0.3518776595592499,
0.054738204926252365,
-0.15708893537521362,
0.08157903701066971,
-0.6495653390884399,
0.002967946231365204,
-0.17691563069820404,
-0.3183455169200897,
-0.40313300490379333,
-0.07670240849256516,
-0.3029361963272095,
-0.11501995474100113,
-0.17773309350013733,
0.15184804797172546,
-0.14139685034751892,
-0.06460431218147278,
-0.02955992892384529,
-0.008361950516700745,
-0.29294484853744507,
0.0030768271535634995,
-0.10815046727657318,
0.2599543035030365,
-0.16127577424049377,
0.018156282603740692,
0.17777134478092194,
0.3304204046726227,
0.2759387791156769,
-0.4251171946525574,
-0.017397264018654823,
-0.08372955769300461,
-0.4275433123111725,
0.28162074089050293,
0.007131129503250122,
0.45114102959632874,
0.2003461718559265,
0.06187468767166138,
-0.006476573646068573,
-0.22344094514846802,
0.22289328277111053,
-0.1927095353603363,
-0.23007580637931824,
0.0021617859601974487,
0.07178632915019989,
0.06346031278371811,
-0.24946856498718262,
-0.3098706305027008,
-0.11491795629262924,
-0.222019225358963,
0.2759012281894684,
0.18359103798866272,
0.045780498534440994,
0.31004616618156433,
0.21267274022102356,
0.15221697092056274,
-0.1507338434457779,
0.18925094604492188,
-0.09852628409862518,
-0.5359106063842773,
0.1902346909046173,
-0.31545332074165344,
-0.3303121030330658,
-0.144621804356575,
-0.04598842188715935,
0.12392519414424896,
-0.08827916532754898,
-0.05345410481095314,
-0.44147297739982605,
-0.34582799673080444,
0.0977739691734314,
0.08436191082000732,
0.3764640986919403,
0.14859256148338318,
-0.041880588978528976,
0.017427360638976097,
-0.35599708557128906,
-0.2530458867549896,
0.16108718514442444,
-0.12863078713417053,
-0.10053949803113937,
0.18576577305793762,
0.2997753322124481,
-0.4296872913837433,
0.4213816523551941,
0.31883910298347473,
0.10994979739189148,
0.44566115736961365,
-0.3109418749809265,
0.6354271173477173,
-0.17707282304763794,
-0.1604146808385849,
0.09543298929929733,
0.12364030629396439,
-0.02775653637945652,
0.20340192317962646,
0.29855766892433167,
0.1819288432598114,
-0.12264829874038696,
0.11736911535263062,
-0.6489111185073853,
-0.1131521612405777,
-0.14515312016010284,
-0.007798232138156891,
0.04330611601471901,
0.03519317880272865,
0.06421569734811783,
-0.018198486417531967,
0.0005333377048373222,
-0.0005504470318555832,
0.2572316825389862,
0.27758416533470154,
0.17970840632915497,
-0.40618857741355896,
-0.05486532300710678,
-0.34695714712142944,
-0.11686913669109344,
0.05361446365714073,
0.3076677918434143,
0.013500835746526718,
-0.015325136482715607,
-0.09085817635059357,
0.07412149012088776,
0.5616082549095154,
0.1354483664035797,
-0.07076899707317352,
-0.11957436800003052,
-0.14443790912628174,
-0.415114164352417,
0.05529997870326042,
-0.33353859186172485,
0.11264415830373764,
0.05931011587381363,
0.4799191653728485,
-0.3605024814605713,
-0.20829398930072784,
0.06392547488212585,
0.40828728675842285,
-0.06381966173648834,
-0.10696051269769669,
-0.24874885380268097,
-0.35124361515045166,
-0.42120057344436646,
-0.2503487169742584,
0.19842706620693207,
0.05253634229302406,
-0.0870848298072815,
0.04372253641486168,
0.12780643999576569,
0.1486925184726715,
0.21847818791866302,
0.1328536719083786,
0.5796393156051636,
-0.024762384593486786,
0.2922099828720093,
0.3862784504890442,
-0.05367742478847504,
0.2065102458000183,
0.5266939401626587,
-0.20106802880764008,
-0.18996313214302063,
-0.10288483649492264,
-0.14106421172618866,
0.15794597566127777,
0.2537318766117096,
-0.02654409408569336,
-0.12457568198442459,
0.20497798919677734,
-0.02121778577566147,
-0.3967389166355133,
0.08844271302223206,
0.34572020173072815,
0.03165159001946449,
0.050387341529130936,
-0.5456494688987732,
0.523154079914093,
0.07406742870807648,
-0.025479428470134735,
0.4781668782234192,
0.5905933976173401,
-0.19215445220470428,
0.051569096744060516,
-0.11878841370344162,
0.8064569234848022,
0.11273366212844849,
0.35107916593551636,
0.559634804725647,
-0.41201597452163696,
0.3790917694568634,
0.09404926002025604,
-0.1805785894393921,
-0.30802759528160095,
-0.18635229766368866,
0.061438336968421936,
-0.17816831171512604,
-0.03972197324037552,
-0.008722104132175446,
-0.05842715501785278,
0.2484389692544937,
-0.33269309997558594,
0.1961093693971634,
-0.0976560190320015,
0.22447648644447327,
-0.21236777305603027,
-0.3312165141105652,
-0.40626955032348633,
0.10900211334228516,
0.22323833405971527,
0.3049495816230774,
-0.22046193480491638,
-0.08176203072071075,
-0.2137729376554489,
-0.29113638401031494,
-0.1396833062171936,
0.05537952482700348,
-0.16779905557632446,
0.014944345690310001,
0.11703300476074219,
-0.2129153460264206,
0.10420659184455872,
0.611773669719696,
0.23297768831253052,
-0.013153985142707825,
-0.4141119122505188,
0.10784351825714111,
-0.23530521988868713,
0.16524755954742432,
-0.10485297441482544,
-0.0023604813031852245,
0.019488437101244926,
-0.04950811713933945,
-0.06613239645957947,
-0.1774609386920929,
-0.16672880947589874,
0.1366458684206009,
-0.18130123615264893,
0.08939383178949356,
-0.30516231060028076,
-0.2264108508825302,
-0.4010409414768219,
-0.07395398616790771,
0.1621393859386444,
-0.2633790671825409,
0.07677382230758667,
0.4118672013282776,
-0.03131816163659096,
-0.040590204298496246,
0.1685335785150528,
-0.16827809810638428,
-0.182201087474823,
0.3661334812641144,
-0.09041761606931686,
-0.17816591262817383,
0.4531005322933197,
0.16082258522510529,
-0.09408329427242279,
-0.07380272448062897,
0.3358656167984009,
0.332989901304245,
-0.4283091723918915,
0.22855886816978455,
0.02953925170004368,
0.008430033922195435,
-0.14838185906410217,
0.17181992530822754,
0.1817711740732193,
-0.2250615358352661,
0.23371060192584991,
-0.23121178150177002,
-0.23786234855651855,
0.41533857583999634,
0.08042049407958984,
0.19772104918956757,
-0.09300803393125534,
-0.08982351422309875,
0.22628134489059448,
-0.24513456225395203,
-0.26749512553215027,
0.24780476093292236,
0.06603290885686874,
-0.06870541721582413,
0.3941155970096588,
0.21695613861083984,
0.28755322098731995,
-0.256254106760025,
-0.0046878382563591,
-0.15921373665332794,
-0.2335233837366104,
-0.06611324846744537,
-0.3223499655723572,
0.15572649240493774,
0.14033836126327515,
-0.35309913754463196,
0.27484703063964844,
-0.08121809363365173,
-0.15398471057415009,
-0.3115676939487457,
0.20927731692790985,
0.2876654267311096,
-0.0009204968810081482,
0.04471858963370323,
-0.06608814001083374,
0.07832083106040955,
0.025904081761837006,
0.017446639016270638,
0.08766529709100723,
0.07525323331356049,
0.124813973903656,
-0.05738043785095215,
-0.17604735493659973,
-0.11786066740751266,
0.2830919325351715,
0.2884851098060608,
0.07311369478702545,
0.10550345480442047,
0.13393238186836243,
-0.21880467236042023,
0.2918727397918701,
-0.04694337025284767,
0.5090467929840088,
0.3364991545677185,
-0.23660340905189514,
0.2704472839832306,
0.07232452929019928,
0.13486547768115997,
-0.15643692016601562,
-0.08933836966753006,
-0.05027433857321739,
-0.2066115289926529,
0.032397348433732986,
0.20414644479751587,
0.009141065180301666,
0.1894286870956421,
-0.2633211612701416,
-0.03837328404188156,
0.4274020791053772,
0.011234610341489315,
0.25056564807891846,
0.18177101016044617,
-0.32546520233154297,
0.28622114658355713,
0.18380819261074066,
0.0903770923614502,
0.12205003947019577,
0.33620667457580566,
-0.12124709039926529,
0.28971922397613525,
-0.10825563222169876,
0.13361717760562897,
0.29500454664230347,
-0.3274580240249634,
-0.06511250138282776,
0.14325962960720062,
0.13419939577579498,
0.11541920900344849,
-0.0740487277507782,
0.4764406979084015,
-0.41672930121421814,
-0.04592793807387352,
-0.2512577474117279,
-0.014756128191947937,
-0.017814505845308304,
-0.16730070114135742,
0.13168679177761078,
-0.3692678213119507,
-0.08121028542518616,
-0.07616546750068665,
-0.17664188146591187,
-0.3715260624885559,
0.07604996114969254,
-0.1307230442762375,
-0.07201267778873444,
-0.45248255133628845,
-0.05251763015985489,
0.12626564502716064,
0.0022500157356262207,
-0.16626285016536713,
0.24233846366405487,
0.28672850131988525,
-0.25931087136268616,
0.21149542927742004,
0.4622154235839844,
0.6294410228729248,
0.34963497519493103,
0.3274209797382355,
0.02668911963701248,
0.051103588193655014,
-0.029715098440647125,
0.047718025743961334,
0.2175591140985489,
0.02503017708659172,
0.17383861541748047,
0.2892798185348511,
0.15222829580307007,
-0.18274831771850586,
-0.17180977761745453,
0.34570246934890747,
0.06413966417312622,
-0.40332716703414917,
0.20333519577980042,
-0.6387581825256348,
0.045550376176834106,
-0.180567666888237,
-0.08341456204652786,
-0.4600042700767517,
0.17380930483341217,
0.27360767126083374,
0.14473731815814972,
0.026324834674596786,
0.06956779211759567,
0.04503108561038971,
0.19825774431228638,
0.3852331340312958,
0.3639286458492279,
0.3638979494571686,
-0.2675425410270691,
-0.2807084321975708,
-0.8097894787788391,
-0.09212913364171982,
-0.07461981475353241,
0.004426652565598488,
0.014672619290649891,
0.005651190876960754,
0.09303243458271027,
0.06551022082567215,
0.15892037749290466,
0.14510466158390045,
-0.04640796035528183,
-0.055556297302246094,
-0.0966281145811081,
-0.19729575514793396,
-0.09288646280765533,
0.20747682452201843,
-0.040082551538944244,
-0.3360586166381836,
0.0596001073718071,
-0.2669248878955841,
-0.05829800292849541,
-0.15515448153018951,
0.3155257999897003,
-0.28181707859039307,
-0.27001631259918213,
0.2566869854927063,
0.10985128581523895,
0.28766632080078125,
-0.2601322829723358,
-0.2828673720359802,
-0.08245238661766052,
-0.25820302963256836,
-0.18650078773498535,
0.32105574011802673,
-0.26040592789649963,
0.3962612450122833,
-0.17198114097118378,
-0.4252545237541199,
-0.396335631608963,
0.25189009308815,
0.22360916435718536,
-0.062494587153196335,
-0.5197998881340027,
0.2690505385398865,
-0.2264673113822937,
-0.1075412929058075,
0.23364494740962982,
0.1419900804758072,
-0.2839210331439972,
0.11183677613735199,
-0.06783746182918549,
-0.22085894644260406,
0.6119194626808167,
-0.4651916027069092,
0.01707436516880989,
-0.1928423047065735,
0.20301420986652374,
0.3037997782230377,
-0.30633947253227234,
-0.5349797010421753,
0.3350725769996643,
0.29100891947746277,
-0.09838057309389114,
-0.11257931590080261,
0.3128938376903534,
-0.2484738528728485,
-0.13463707268238068,
-0.006785552948713303,
0.31238746643066406,
0.18721595406532288,
-0.3012532591819763,
0.3194744288921356,
-0.11049658060073853
] |
https://github.com/huggingface/datasets/issues/6333
|
Support fsspec 2023.10.0
|
Hi @albertvillanova @lhoestq
I believe the pull request that pins the fsspec version (https://github.com/huggingface/datasets/pull/6331) was merged by mistake. Another fix for the issue was merged on the same day an hour apart. See https://github.com/huggingface/datasets/pull/6334
I'm now having an issue in my project where I can't use newer versions of fsspec.
Can we remove the pin?
Have a nice day! :)
|
Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381
| 60
|
Support fsspec 2023.10.0
Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381
Hi @albertvillanova @lhoestq
I believe the pull request that pins the fsspec version (https://github.com/huggingface/datasets/pull/6331) was merged by mistake. Another fix for the issue was merged on the same day an hour apart. See https://github.com/huggingface/datasets/pull/6334
I'm now having an issue in my project where I can't use newer versions of fsspec.
Can we remove the pin?
Have a nice day! :)
|
[
-0.3055720031261444,
-0.3316722512245178,
-0.06892885267734528,
0.08399096131324768,
0.1788211464881897,
-0.22656306624412537,
-0.08412584662437439,
0.24305778741836548,
-0.11625458300113678,
0.43162983655929565,
0.14748883247375488,
0.23408645391464233,
0.06694773584604263,
0.6333125829696655,
-0.36154186725616455,
0.22187291085720062,
0.21717384457588196,
0.21556967496871948,
-0.2839367091655731,
0.11703027784824371,
-0.05508669465780258,
0.30862993001937866,
-0.03741246461868286,
-0.0869070291519165,
-0.2967628240585327,
0.1041593849658966,
0.008394086733460426,
0.15846121311187744,
-0.4137948155403137,
-0.303390234708786,
0.46317237615585327,
-0.03917856141924858,
-0.09423226863145828,
0.29489853978157043,
-0.00010216994996881112,
-0.031108733266592026,
0.37136179208755493,
0.06996450573205948,
0.034863777458667755,
-0.03197197616100311,
-0.16376502811908722,
-0.17821890115737915,
-0.039724431931972504,
0.09570712596178055,
-0.12196880578994751,
-0.18493741750717163,
-0.05554167181253433,
-0.11607500910758972,
0.36268937587738037,
0.1975255161523819,
0.3435594439506531,
-0.0265241377055645,
0.3360873758792877,
-0.20376650989055634,
0.28049904108047485,
-0.09719966351985931,
-0.11355439573526382,
-0.16033624112606049,
0.1604996919631958,
-0.09670008718967438,
0.11640352010726929,
0.09430180490016937,
0.2645135819911957,
-0.008779775351285934,
0.13987836241722107,
-0.18301479518413544,
0.21000495553016663,
-0.3699900507926941,
0.3148771822452545,
-0.045596182346343994,
0.25691813230514526,
-0.005476146936416626,
-0.25231999158859253,
0.0809369906783104,
-0.0994640588760376,
-0.17911604046821594,
0.4186958968639374,
-0.23174621164798737,
0.17868301272392273,
0.03207850828766823,
0.35716715455055237,
0.002274250378832221,
0.05477175861597061,
-0.03115532547235489,
-0.11823813617229462,
-0.20668581128120422,
-0.3367640972137451,
0.012678679078817368,
0.48152387142181396,
-0.3730977773666382,
-0.13107474148273468,
0.1420612335205078,
-0.06867627799510956,
-0.007136390544474125,
-0.100924551486969,
-0.24748556315898895,
0.1052338182926178,
0.05596819519996643,
-0.0338553711771965,
0.1994522362947464,
-0.5277072191238403,
0.24985933303833008,
-0.0515160895884037,
0.06569451093673706,
-0.07208582758903503,
0.2047051340341568,
0.0797901526093483,
0.043853648006916046,
0.14471295475959778,
0.14746175706386566,
-0.08403117209672928,
-0.01853107661008835,
0.2438553124666214,
-0.5366449952125549,
-0.378675639629364,
0.09850572794675827,
0.25334876775741577,
-0.46967020630836487,
-0.1835034340620041,
0.007562736049294472,
-0.005895655602216721,
0.16458173096179962,
-0.07490339130163193,
0.15629971027374268,
0.3471262454986572,
0.5943756103515625,
0.01867760717868805,
-0.055019862949848175,
-0.3237323760986328,
-0.005867003928869963,
-0.12297281622886658,
-0.015207983553409576,
-0.2455015778541565,
0.1080760806798935,
0.07720951735973358,
-0.482680082321167,
0.09884191304445267,
0.0630122646689415,
-0.1191781759262085,
0.06563203781843185,
-0.12381118535995483,
0.016933264210820198,
-0.0632072165608406,
0.35884934663772583,
-0.21773752570152283,
-0.020641271024942398,
0.005936238914728165,
0.1253591775894165,
-0.08150066435337067,
-0.06001114100217819,
-0.10796020179986954,
-0.1716439574956894,
-0.3447081446647644,
0.301719069480896,
0.11194181442260742,
0.1531868875026703,
-0.3016514182090759,
-0.1391741782426834,
-0.28714480996131897,
-0.19819015264511108,
-0.02556035667657852,
-0.07784386724233627,
-0.334153950214386,
-0.001867096871137619,
0.010867344215512276,
0.07642453163862228,
-0.15723708271980286,
-0.06602515280246735,
-0.14917434751987457,
-0.37643304467201233,
-0.0218798965215683,
0.22811606526374817,
0.12256515026092529,
-0.20818251371383667,
-0.30069705843925476,
0.3317926526069641,
-0.009643085300922394,
-0.4188564419746399,
-0.5600664019584656,
0.3173903524875641,
-0.07789990305900574,
-0.15820211172103882,
0.018224410712718964,
-0.1282128095626831,
0.03023315779864788,
-0.13698045909404755,
-0.17007309198379517,
-0.23106040060520172,
0.1338188797235489,
-0.07389818876981735,
-0.4667969346046448,
-0.5086234211921692,
-0.10958941280841827,
0.08652035892009735,
0.010000605136156082,
0.10322697460651398,
0.23812466859817505,
-0.1604008823633194,
0.06330221146345139,
-0.047702815383672714,
0.00940608512610197,
0.15246649086475372,
0.6307216286659241,
0.21508009731769562,
-0.15342533588409424,
-0.30992457270622253,
-0.41163477301597595,
0.2577663064002991,
-0.1982049196958542,
-0.14846323430538177,
0.2351735681295395,
-0.1783580332994461,
-0.06892569363117218,
-0.19413240253925323,
-0.0858500599861145,
-0.12175555527210236,
0.1975925713777542,
-0.04557367414236069,
0.07235351204872131,
-0.17261695861816406,
-0.008544418960809708,
-0.08037924766540527,
-0.11709405481815338,
-0.03358716890215874,
-0.19118843972682953,
0.41044360399246216,
-0.32043904066085815,
-0.1315237283706665,
0.1059500128030777,
0.1630248725414276,
0.34272727370262146,
-0.14118796586990356,
-0.02850223332643509,
0.25988471508026123,
0.3650722801685333,
0.19683687388896942,
-0.16002702713012695,
0.5145069360733032,
0.07262592017650604,
-0.20062431693077087,
-0.17982591688632965,
0.16107267141342163,
0.041931528598070145,
0.02989175170660019,
0.2097654938697815,
0.11985645443201065,
0.027255922555923462,
-0.022873111069202423,
-0.00006082653999328613,
-0.042300425469875336,
0.3135683238506317,
-0.11192190647125244,
0.13002122938632965,
-0.1716333031654358,
0.21472756564617157,
0.24425648152828217,
0.165500208735466,
0.14490056037902832,
-0.02579439803957939,
0.0834292396903038,
0.21240882575511932,
0.05413205549120903,
-0.25529417395591736,
0.15680235624313354,
-0.033151887357234955,
-0.0750255361199379,
0.26037904620170593,
0.18369972705841064,
0.24898269772529602,
0.32398712635040283,
-0.17823071777820587,
0.14630328118801117,
0.2412211000919342,
-0.10154974460601807,
0.24576374888420105,
-0.04792378842830658,
0.25274816155433655,
0.24752336740493774,
0.177475243806839,
0.1064562126994133,
-0.30147773027420044,
-0.0014986023306846619,
-0.06500042229890823,
0.27030184864997864,
-0.19015033543109894,
-0.13697871565818787,
-0.36309725046157837,
-0.3723657727241516,
-0.10981083661317825,
0.232852503657341,
-0.024952862411737442,
-0.21911340951919556,
0.10903189331293106,
0.4150696396827698,
-0.12995433807373047,
0.22490194439888,
0.15439936518669128,
0.38134753704071045,
-0.13075871765613556,
0.27921438217163086,
-0.22397899627685547,
0.22037814557552338,
-0.20464682579040527,
0.15322698652744293,
0.39395198225975037,
0.06999485939741135,
0.16547322273254395,
0.12934094667434692,
-0.04623398929834366,
-0.5642321705818176,
-0.42955562472343445,
0.11770275235176086,
-0.14207230508327484,
0.2014431208372116,
0.22478258609771729,
0.021815888583660126,
0.2748175263404846,
0.009482338093221188,
0.015395481139421463,
-0.37767767906188965,
-0.30112603306770325,
-0.2102920562028885,
-0.1774606704711914,
0.09459391981363297,
-0.34692472219467163,
-0.13237127661705017,
-0.01506507582962513,
-0.3671785593032837,
0.513459324836731,
-0.2449640929698944,
-0.005307286977767944,
0.2986699342727661,
-0.010409694164991379,
-0.04691525548696518,
-0.24984562397003174,
-0.24891319870948792,
-0.33725228905677795,
-0.3054508864879608,
0.014753147959709167,
-0.10250670462846756,
-0.4699418246746063,
0.1573573350906372,
0.17758555710315704,
-0.028809573501348495,
-0.14821374416351318,
-0.34872162342071533,
-0.4255780875682831,
-0.3200725018978119,
0.24470707774162292,
-0.18412445485591888,
0.010287908837199211,
0.603941798210144,
0.04218139499425888,
-0.23319712281227112,
-0.12015410512685776,
-0.19293653964996338,
0.03898604214191437,
0.03553882986307144,
0.06411434710025787,
-0.10914366692304611,
0.11211132258176804,
0.184269979596138,
0.6359726190567017,
0.21799412369728088,
-0.17889297008514404,
0.19949306547641754,
-0.034396037459373474,
0.26117807626724243,
-0.2953515946865082,
-0.13781924545764923,
0.05438125878572464,
0.013281062245368958,
0.044113367795944214,
0.36238205432891846,
-0.011446181684732437,
0.1687595099210739,
0.09016925096511841,
0.07629907131195068,
-0.09067285805940628,
-0.18856005370616913,
-0.18122877180576324,
0.11662353575229645,
0.19411417841911316,
0.05525412783026695,
0.0844314768910408,
0.07151827216148376,
-0.048335783183574677,
0.10955564677715302,
0.06444354355335236,
0.06145522743463516,
-0.08852730691432953,
-0.359711617231369,
-0.07838906347751617,
-0.25289446115493774,
0.4021736979484558,
0.21226833760738373,
0.13820841908454895,
-0.3257955312728882,
0.0033084191381931305,
0.1875506192445755,
-0.12764962017536163,
0.315601646900177,
0.05142376571893692,
0.35449016094207764,
0.24842840433120728,
-0.20066265761852264,
-0.22569386661052704,
-0.14072181284427643,
0.10888552665710449,
-0.0523294135928154,
0.2178662270307541,
0.36578258872032166,
-0.1307106465101242,
-0.3313153088092804,
-0.21984167397022247,
-0.16808757185935974,
0.06470844149589539,
0.21380047500133514,
-0.07496782392263412,
-0.12415002286434174,
-0.07306264340877533,
-0.2590109407901764,
-0.03240736573934555,
0.07329671829938889,
-0.10962007939815521,
-0.0035798586905002594,
-0.0739004984498024,
-0.3477975130081177,
-0.0382380336523056,
-0.14161831140518188,
0.24333533644676208,
0.034141842275857925,
0.1890447735786438,
0.181776762008667,
0.06232226639986038,
0.40745246410369873,
0.33308449387550354,
0.024427473545074463,
-0.06933948397636414,
0.22542980313301086,
-0.00309637188911438,
0.0884060189127922,
0.421577125787735,
0.02156948298215866,
0.23218631744384766,
-0.2686340808868408,
0.2228424847126007,
-0.4430621266365051,
0.04493069648742676,
0.2683112919330597,
0.048429958522319794,
0.10055958479642868,
0.09894392639398575,
0.326541006565094,
0.1786719560623169,
-0.06090645119547844,
0.18450000882148743,
0.37716811895370483,
-0.09616143256425858,
0.16268211603164673,
-0.27525725960731506,
0.6849502921104431,
0.06689310073852539,
0.026148492470383644,
-0.07027549296617508,
-0.05210322514176369,
0.27256181836128235,
-0.19441138207912445,
-0.04426833614706993,
-0.17288677394390106,
-0.25062304735183716,
-0.0020642168819904327,
0.0773804783821106,
0.3819095194339752,
-0.19219554960727692,
-0.0502539798617363,
0.3143259882926941,
0.18808291852474213,
0.14790663123130798,
0.0376335009932518,
0.19711706042289734,
-0.19979320466518402,
-0.11921048164367676,
-0.3363713324069977,
0.33129167556762695,
0.156094491481781,
0.13171452283859253,
-0.043185461312532425,
0.03691598027944565,
0.162507563829422,
-0.15774422883987427,
-0.24099355936050415,
0.08545692265033722,
-0.40049901604652405,
0.2552863359451294,
0.002707105129957199,
0.17020724713802338,
0.17182624340057373,
-0.012926016002893448,
-0.11761409044265747,
0.08677569776773453,
-0.23088780045509338,
0.19909125566482544,
0.20872041583061218,
0.004977838601917028,
-0.10003717988729477,
-0.026943199336528778,
0.01706128939986229,
-0.20261439681053162,
-0.01863516867160797,
-0.12274853140115738,
-0.07858330011367798,
-0.2802429795265198,
0.011611208319664001,
0.020254842936992645,
0.1410396695137024,
-0.0929219052195549,
0.044671349227428436,
-0.03470878303050995,
0.03873107209801674,
-0.18324382603168488,
0.2515549659729004,
-0.14212213456630707,
-0.08159622550010681,
-0.03626817464828491,
0.0717649757862091,
-0.23559696972370148,
0.13849502801895142,
0.5173922777175903,
-0.23292765021324158,
0.2090572863817215,
0.34397318959236145,
-0.11321483552455902,
-0.14716510474681854,
-0.3149094581604004,
0.14021703600883484,
-0.24929097294807434,
-0.23414310812950134,
-0.0418202206492424,
0.13209132850170135,
-0.2650577425956726,
0.23281018435955048,
0.79179847240448,
0.10481369495391846,
-0.12740734219551086,
0.09273633360862732,
-0.15393540263175964,
-0.25949227809906006,
0.09636490046977997,
-0.31172963976860046,
0.300398588180542,
-0.042511388659477234,
0.3410665690898895,
-0.21076005697250366,
-0.18947337567806244,
-0.43669864535331726,
0.4771425127983093,
-0.1646280139684677,
-0.005952492356300354,
0.13278615474700928,
-0.09547796100378036,
0.33733895421028137,
-0.2657996714115143,
0.1982172578573227,
0.34647512435913086,
-0.3980671465396881,
-0.3255044221878052,
0.027285698801279068,
0.08123642951250076,
0.16041699051856995,
-0.2555030584335327,
-0.04356890171766281,
-0.04105512425303459,
-0.17212115228176117,
0.1905006766319275,
0.023686546832323074,
0.4183896780014038,
0.0007020831108093262,
0.23327481746673584,
-0.08041514456272125,
0.11643785238265991,
0.04518183320760727,
0.24668152630329132,
0.0871177613735199,
0.26806384325027466,
-0.07319244742393494,
0.16521289944648743,
-0.3003567159175873,
0.09130138158798218,
-0.09650599211454391,
0.14692339301109314,
0.23229679465293884,
0.12460696697235107,
-0.02477266639471054,
-0.03837268799543381,
-0.1464146226644516,
0.2501658797264099,
0.37175437808036804,
0.1313343644142151,
-0.20776799321174622,
-0.13909243047237396,
0.29586076736450195,
0.3493565320968628,
-0.14393571019172668,
0.15119443833827972,
0.0719778835773468,
0.023278161883354187,
0.0690285712480545,
-0.0823112353682518,
0.4778346121311188,
-0.2377336174249649,
0.23341402411460876,
0.31841281056404114,
-0.21820712089538574,
-0.07068019360303879,
0.34326425194740295,
-0.1762329488992691,
-0.01257588341832161,
-0.08612127602100372,
0.3031710386276245,
-0.1337766945362091,
0.0967775210738182,
0.4036516547203064,
-0.012813851237297058,
0.34541046619415283,
-0.3166908323764801,
0.2264571189880371,
-0.010214708745479584,
-0.3431106507778168,
0.07073545455932617,
0.2681232690811157,
-0.16569605469703674,
-0.16203728318214417,
0.06711861491203308,
0.6452465653419495,
-0.14447902143001556,
-0.41730135679244995,
-0.13336865603923798,
0.19638319313526154,
-0.189973384141922,
-0.25158190727233887,
0.28455400466918945,
0.04406871646642685,
0.016994699835777283,
0.10059362649917603,
-0.1424301415681839,
0.030104536563158035,
0.6495341062545776,
0.1513197422027588,
-0.3187595009803772,
-0.04951833188533783,
-0.18137356638908386,
0.18556010723114014,
0.3171287178993225,
0.010444045066833496,
0.2745968997478485,
-0.1662345677614212,
-0.044069983065128326,
0.34926676750183105,
0.4543643891811371,
0.3056577444076538,
-0.1251373291015625,
-0.07342217862606049,
-0.19022223353385925,
-0.01667023077607155,
0.005183128640055656,
-0.015539206564426422,
0.18060539662837982,
-0.07349920272827148,
0.22292838990688324,
0.23885171115398407,
0.241758793592453,
-0.2791810929775238,
-0.31324806809425354,
-0.1434856355190277,
0.2243638038635254,
-0.3892718255519867,
0.16723601520061493,
-0.08354030549526215,
0.2453835904598236,
-0.027254879474639893,
0.22147881984710693,
-0.2931714355945587,
-0.25942447781562805,
0.05544528365135193,
0.04575776308774948,
0.3224949240684509,
-0.14157851040363312,
0.16963015496730804,
-0.14027972519397736,
0.11140567064285278,
0.22743657231330872,
-0.192186176776886,
-0.0673312395811081,
-0.4145743250846863,
-0.4055280089378357,
-0.07030763477087021,
0.1408134251832962,
0.2408556342124939,
-0.20488765835762024,
0.0922887921333313,
0.020159296691417694,
-0.16860970854759216,
0.09597806632518768,
-0.275369793176651,
0.2059277445077896,
0.11001339554786682,
-0.14839334785938263,
0.39314037561416626,
-0.014012940227985382,
-0.34868499636650085,
0.15201117098331451,
-0.4547119438648224,
-0.000051505863666534424,
-0.10567373782396317,
0.20691636204719543,
0.033188145607709885,
0.05268803983926773,
-0.23058734834194183,
-0.20099017024040222,
0.3722977638244629,
0.22070814669132233,
0.21775805950164795,
-0.1580517292022705,
-0.31862714886665344,
-0.17730087041854858,
-0.2925211787223816,
-0.10619562864303589,
-0.03807663172483444,
-0.1976928412914276,
0.2058492749929428,
-0.1573275625705719,
0.21607708930969238,
-0.36383408308029175,
0.02279564179480076,
-0.199288472533226,
0.24064509570598602,
-0.49033597111701965,
0.3679669499397278,
-0.2813265025615692,
0.12079808115959167,
-0.16278259456157684,
0.3609313368797302,
0.0348883718252182,
0.03354997932910919,
-0.4084181785583496,
-0.2998170256614685,
0.3537593483924866,
-0.2894984781742096,
-0.1000840961933136,
0.0035559656098484993,
0.31871485710144043,
0.19651582837104797,
-0.14309175312519073,
-0.2691933512687683,
0.02028881013393402,
0.09394349902868271,
0.16464829444885254,
-0.1137283444404602,
0.1924067735671997,
-0.4335382580757141,
-0.18167199194431305,
-0.061339594423770905,
0.6767337322235107,
0.22579717636108398,
0.05968017876148224,
0.43577831983566284,
-0.2496851682662964
] |
https://github.com/huggingface/datasets/issues/6333
|
Support fsspec 2023.10.0
|
Hi @tomscholz,
Thanks for pointing this out. I think you are right.
I am doing some cross-checks and fixing it.
|
Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381
| 20
|
Support fsspec 2023.10.0
Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381
Hi @tomscholz,
Thanks for pointing this out. I think you are right.
I am doing some cross-checks and fixing it.
|
[
-0.23591981828212738,
-0.333761066198349,
-0.12830422818660736,
0.07966715842485428,
0.36585384607315063,
-0.3130488991737366,
0.06623788923025131,
0.12028428912162781,
0.02420186623930931,
0.3996662497520447,
0.10560925304889679,
0.11766967922449112,
0.08764316141605377,
0.42124325037002563,
-0.31861674785614014,
0.36694619059562683,
0.12093023210763931,
0.1683216094970703,
-0.25991806387901306,
-0.11035981774330139,
-0.04859437048435211,
0.2711215913295746,
0.036547861993312836,
-0.05918450653553009,
-0.25543874502182007,
0.3090079128742218,
0.13166669011116028,
0.30447861552238464,
-0.3397269546985626,
-0.18879730999469757,
0.1386314034461975,
-0.15597130358219147,
-0.23002921044826508,
0.23670005798339844,
-0.00009734756167745218,
0.09854893386363983,
0.3483541011810303,
0.003062961623072624,
-0.07482391595840454,
0.15660856664180756,
-0.1308130919933319,
-0.16753986477851868,
-0.0728725865483284,
-0.014321178197860718,
-0.24675685167312622,
-0.0982484370470047,
0.12165158241987228,
0.024740256369113922,
0.303702712059021,
0.15482166409492493,
0.4374694526195526,
-0.13706502318382263,
0.16939853131771088,
-0.1416051834821701,
0.3023456931114197,
-0.06930610537528992,
-0.006873879581689835,
-0.182272806763649,
0.1146932914853096,
-0.23021051287651062,
-0.15503904223442078,
-0.03345641866326332,
0.2187362164258957,
-0.016074448823928833,
0.01941724121570587,
-0.15086400508880615,
0.384136825799942,
-0.10870195925235748,
0.2471621334552765,
-0.25320303440093994,
0.11195243895053864,
0.05833762511610985,
-0.052504539489746094,
0.11940724402666092,
-0.15662647783756256,
-0.10234089195728302,
0.34398552775382996,
-0.10246279090642929,
-0.014985737390816212,
0.004798926413059235,
0.4337158501148224,
0.06204403564333916,
-0.019642654806375504,
-0.008741125464439392,
-0.09762248396873474,
-0.14392633736133575,
-0.23095709085464478,
-0.0900910422205925,
0.29921191930770874,
-0.32961755990982056,
-0.2190999537706375,
0.1284676194190979,
-0.10486510396003723,
-0.11429288238286972,
-0.039749886840581894,
-0.08302849531173706,
0.22866153717041016,
-0.030856311321258545,
-0.11747284233570099,
0.15020543336868286,
-0.33598148822784424,
0.34895941615104675,
0.07565126568078995,
0.10037322342395782,
-0.14731304347515106,
0.14375849068164825,
0.022161919623613358,
0.029040038585662842,
0.15905475616455078,
0.09914559125900269,
-0.2392691820859909,
-0.014431670308113098,
0.19958552718162537,
-0.4169018864631653,
-0.23819677531719208,
0.14674198627471924,
0.012092310935258865,
-0.32455047965049744,
-0.05046335235238075,
0.035440512001514435,
0.10873743146657944,
0.20649529993534088,
-0.04597560316324234,
0.2773212492465973,
0.2936220169067383,
0.29842451214790344,
0.17026329040527344,
-0.020309649407863617,
-0.37568607926368713,
0.03385889530181885,
-0.1937127262353897,
-0.05697151646018028,
-0.4370640516281128,
-0.025185344740748405,
0.09255637228488922,
-0.09133775532245636,
0.11146768927574158,
0.0043474165722727776,
-0.13183102011680603,
-0.006498746573925018,
-0.10859046131372452,
0.026262905448675156,
0.05046406388282776,
0.27325621247291565,
-0.029530445113778114,
-0.05441439896821976,
0.016229664906859398,
0.17015759646892548,
0.1313871443271637,
-0.027126535773277283,
0.022663980722427368,
-0.14915020763874054,
-0.19985675811767578,
0.4155614674091339,
0.23562093079090118,
0.18094471096992493,
-0.07824891060590744,
-0.2643316686153412,
-0.07411680370569229,
-0.1291300654411316,
0.027481108903884888,
0.07085810601711273,
-0.1787903904914856,
-0.04104989767074585,
-0.04750629886984825,
0.11701162159442902,
0.07109883427619934,
-0.07111569494009018,
-0.0893445760011673,
-0.30280813574790955,
0.16830755770206451,
0.14082928001880646,
0.18193566799163818,
-0.06480344384908676,
-0.39913228154182434,
0.3422657251358032,
0.036454007029533386,
-0.3861787021160126,
-0.39466604590415955,
0.287410169839859,
-0.14143718779087067,
-0.28410905599594116,
0.06351306289434433,
-0.044046808034181595,
-0.04812069237232208,
0.028883732855319977,
-0.10773387551307678,
-0.008153006434440613,
0.23756811022758484,
0.15461434423923492,
-0.5112075209617615,
-0.2694331705570221,
-0.25454968214035034,
0.1286856085062027,
0.07113375514745712,
0.04267731308937073,
0.22230839729309082,
-0.09555554389953613,
0.22511279582977295,
-0.07797835767269135,
0.022048385813832283,
0.04679485410451889,
0.6266281604766846,
0.21455195546150208,
-0.06944689154624939,
-0.10070133954286575,
-0.16355910897254944,
0.15493622422218323,
-0.2751724123954773,
-0.008288349956274033,
0.1281234323978424,
0.004441592842340469,
0.001411130651831627,
-0.10762366652488708,
-0.14271773397922516,
-0.09365963935852051,
0.36954641342163086,
0.19663496315479279,
-0.1566886305809021,
-0.033513594418764114,
0.22575800120830536,
-0.17787900567054749,
-0.16483275592327118,
-0.012789875268936157,
0.019420716911554337,
0.35087525844573975,
-0.250772088766098,
-0.2476794719696045,
0.03766472637653351,
0.03630789369344711,
0.3196180760860443,
-0.11263816058635712,
-0.0705319344997406,
0.2668328881263733,
0.48153766989707947,
0.21740584075450897,
-0.07809191197156906,
0.37307167053222656,
-0.06793998926877975,
-0.15286614000797272,
-0.20006681978702545,
0.22359298169612885,
0.11064516752958298,
-0.06824428588151932,
0.23377785086631775,
0.024982742965221405,
0.10346192121505737,
-0.03203148394823074,
0.08693860471248627,
-0.0641910508275032,
0.3165156841278076,
-0.18814566731452942,
0.2516763210296631,
-0.1697629988193512,
0.2989915609359741,
0.2786700129508972,
0.0004903525114059448,
0.12181773781776428,
0.11111980676651001,
0.03903836011886597,
0.15068773925304413,
0.07038851082324982,
-0.04158034920692444,
0.17999884486198425,
0.1440754383802414,
-0.11421633511781693,
0.16746124625205994,
0.11891335248947144,
0.24343013763427734,
0.23278144001960754,
-0.06511494517326355,
0.011912433430552483,
0.20347477495670319,
-0.10922513157129288,
0.3619403839111328,
-0.15373477339744568,
0.09542489796876907,
0.4129875600337982,
0.20378805696964264,
-0.2139255851507187,
-0.4503476619720459,
-0.009869404137134552,
0.024085013195872307,
0.11389095336198807,
-0.23283718526363373,
-0.22346557676792145,
-0.2951427102088928,
-0.2659298777580261,
0.08767211437225342,
0.2044600546360016,
0.16974541544914246,
-0.22090984880924225,
0.10173658281564713,
0.4030430316925049,
-0.19298772513866425,
0.18966884911060333,
0.10355633497238159,
0.2290138304233551,
0.125126451253891,
0.3249984681606293,
-0.13543733954429626,
0.20655076205730438,
-0.06605860590934753,
0.18172205984592438,
0.34305644035339355,
0.06795722246170044,
0.09987499564886093,
0.05234373360872269,
-0.03053298592567444,
-0.37269681692123413,
-0.3416934311389923,
0.10895148664712906,
-0.04743390530347824,
0.12863075733184814,
0.17788013815879822,
0.08894457668066025,
0.2624037265777588,
0.022778231650590897,
0.12850254774093628,
-0.25250518321990967,
-0.361624151468277,
-0.014982686378061771,
-0.05099581182003021,
-0.07035520672798157,
-0.4801153242588043,
-0.009441517293453217,
0.04766157269477844,
-0.4256875813007355,
0.3259361982345581,
-0.1419862061738968,
-0.033139102160930634,
0.2635582685470581,
0.0057505154982209206,
-0.07112277299165726,
-0.06870246678590775,
-0.03835564851760864,
-0.3115212619304657,
-0.24033129215240479,
0.08659370988607407,
-0.28951966762542725,
-0.4202004671096802,
0.014164712280035019,
0.06521773338317871,
-0.06204529479146004,
-0.09540663659572601,
-0.31655609607696533,
-0.3115055561065674,
-0.2651870548725128,
0.15480561554431915,
-0.27653416991233826,
-0.049366481602191925,
0.37013617157936096,
0.11789877712726593,
-0.36985915899276733,
-0.20227035880088806,
-0.07376563549041748,
0.23405250906944275,
-0.008608508855104446,
0.023502841591835022,
-0.34931501746177673,
0.08353208005428314,
0.10985259711742401,
0.39343953132629395,
-0.08274338394403458,
0.02724066935479641,
0.2591349482536316,
-0.05941443145275116,
0.23851042985916138,
-0.20420700311660767,
-0.03614218533039093,
0.11723127961158752,
0.1939345896244049,
-0.12984207272529602,
0.4152628183364868,
-0.08316397666931152,
0.122018963098526,
0.20517399907112122,
0.14697939157485962,
-0.11071963608264923,
-0.21781477332115173,
-0.10676683485507965,
0.1669371873140335,
0.1841357946395874,
0.0031171347945928574,
0.17220309376716614,
0.07486140727996826,
-0.003669432830065489,
0.11260312795639038,
0.12410452216863632,
-0.08183350414037704,
-0.1739666610956192,
-0.22090356051921844,
-0.0813143327832222,
-0.0894937738776207,
0.06663664430379868,
0.14432626962661743,
0.05792378634214401,
-0.456341952085495,
-0.1294352412223816,
0.28851616382598877,
-0.19221064448356628,
0.28460031747817993,
0.06677766889333725,
0.45681536197662354,
0.14156584441661835,
-0.1574423909187317,
-0.08864076435565948,
-0.17411834001541138,
0.006672628223896027,
-0.0005218563601374626,
0.08812686800956726,
0.19004449248313904,
-0.1670067310333252,
-0.0933186486363411,
-0.38389408588409424,
-0.31420883536338806,
-0.010834839195013046,
0.1133875772356987,
0.06797643005847931,
-0.033364005386829376,
-0.08321487903594971,
-0.20682662725448608,
-0.018311986699700356,
0.05256194248795509,
-0.1312876045703888,
-0.09729941189289093,
-0.08177550882101059,
-0.23858991265296936,
-0.042269691824913025,
-0.0779033899307251,
0.2873116731643677,
-0.04505854472517967,
0.18465815484523773,
-0.01600480079650879,
0.032574400305747986,
0.3148830831050873,
0.22934071719646454,
0.07511931657791138,
0.18013203144073486,
0.24405184388160706,
-0.16937242448329926,
-0.0695626363158226,
0.29170382022857666,
-0.009371872991323471,
0.18005627393722534,
-0.3387487232685089,
0.19239187240600586,
-0.3594101667404175,
0.09449443221092224,
0.2620667815208435,
0.04165763780474663,
0.2639476954936981,
0.15833495557308197,
0.1329900622367859,
-0.13718530535697937,
-0.13242343068122864,
0.05473485589027405,
0.22550596296787262,
-0.18344654142856598,
0.2656114101409912,
-0.15385213494300842,
0.6822749376296997,
0.13568514585494995,
0.11587020754814148,
0.12274632602930069,
-0.09192946553230286,
-0.12002095580101013,
-0.28941941261291504,
-0.010271644219756126,
-0.18929125368595123,
-0.20530818402767181,
0.05196908861398697,
0.01999560371041298,
0.17419470846652985,
-0.0016879700124263763,
-0.011432655155658722,
-0.04176495969295502,
0.12722282111644745,
-0.078560471534729,
-0.08171200752258301,
-0.0074596889317035675,
-0.03443284332752228,
-0.11711019277572632,
-0.20781129598617554,
0.4065910875797272,
0.27783581614494324,
0.02964063547551632,
-0.09119899570941925,
-0.006057744845747948,
0.13642951846122742,
-0.04594653099775314,
-0.18780627846717834,
0.07746893167495728,
-0.2899416983127594,
0.34779077768325806,
0.009755946695804596,
0.15441031754016876,
-0.13370481133460999,
-0.04350708797574043,
-0.22476904094219208,
0.15996268391609192,
-0.017732223495841026,
0.2711544334888458,
0.23919886350631714,
0.15821373462677002,
-0.16554421186447144,
0.037617456167936325,
-0.05715169012546539,
-0.17628026008605957,
-0.03728485852479935,
-0.28506016731262207,
-0.10051127523183823,
-0.2471984326839447,
0.053800374269485474,
0.044014137238264084,
0.1642463505268097,
-0.1189112663269043,
-0.06484650075435638,
0.054478906095027924,
-0.1648932546377182,
-0.1179022490978241,
0.34694644808769226,
-0.1098988950252533,
-0.18085990846157074,
0.08459463715553284,
0.07700155675411224,
-0.19881612062454224,
0.002657569944858551,
0.35343384742736816,
-0.25265002250671387,
0.22264686226844788,
0.42350292205810547,
-0.18555450439453125,
-0.1882830560207367,
-0.4151858389377594,
0.027721010148525238,
-0.23106999695301056,
-0.061724770814180374,
0.028252575546503067,
0.09473811089992523,
-0.39651036262512207,
0.2825045585632324,
0.4916444420814514,
0.05268919840455055,
-0.007788442075252533,
0.010677773505449295,
-0.10472550988197327,
-0.24994246661663055,
-0.10694412887096405,
-0.3059878349304199,
0.2601456344127655,
-0.24770119786262512,
0.25989189743995667,
-0.16038945317268372,
-0.2606261372566223,
-0.5020939111709595,
0.4351133108139038,
-0.30645689368247986,
0.0955183282494545,
-0.014218006283044815,
-0.2663725018501282,
0.24065528810024261,
-0.21145442128181458,
0.3499928414821625,
0.29367440938949585,
-0.2608974874019623,
-0.41568121314048767,
0.03391963616013527,
0.038667500019073486,
0.22306963801383972,
-0.17103028297424316,
0.023531559854745865,
-0.0014327708631753922,
-0.18115068972110748,
0.1791839599609375,
-0.03591158241033554,
0.32897520065307617,
-0.04061037302017212,
0.216851145029068,
0.03913373500108719,
0.28437185287475586,
0.1371774971485138,
0.21359054744243622,
0.03633490204811096,
0.30601704120635986,
-0.1590076982975006,
-0.08873972296714783,
-0.3321998119354248,
0.03359873592853546,
-0.03504197299480438,
0.14692449569702148,
0.1425512731075287,
0.18920966982841492,
0.1259765625,
-0.0335749089717865,
-0.16234636306762695,
0.20697103440761566,
0.325286865234375,
0.019047200679779053,
-0.21992117166519165,
-0.2330959588289261,
0.19495689868927002,
0.5175908207893372,
-0.06782343983650208,
0.11609134823083878,
-0.13672895729541779,
-0.1886029839515686,
0.1799079030752182,
-0.05336890369653702,
0.18912503123283386,
-0.4216141402721405,
0.18995478749275208,
0.37088021636009216,
-0.3131481409072876,
-0.008235976099967957,
0.07921752333641052,
-0.22204172611236572,
-0.1358857899904251,
0.08905097842216492,
0.14747720956802368,
-0.2021806389093399,
0.025380253791809082,
0.48428070545196533,
0.0959145724773407,
0.34482133388519287,
-0.22478502988815308,
0.1079915463924408,
-0.05492285639047623,
-0.357684463262558,
0.08017086982727051,
0.20029592514038086,
-0.07763102650642395,
-0.09408421069383621,
-0.011104635894298553,
0.3535299301147461,
-0.10782506316900253,
-0.2560458779335022,
-0.1541348397731781,
0.03899708017706871,
-0.3710402548313141,
-0.20919011533260345,
0.20779012143611908,
0.16383805871009827,
-0.02623961865901947,
0.0891188383102417,
-0.02708972617983818,
0.15272808074951172,
0.31291842460632324,
0.24895808100700378,
-0.09360954165458679,
0.08388747274875641,
-0.21875134110450745,
0.213166743516922,
0.22368374466896057,
-0.08785312622785568,
0.2274695336818695,
-0.02245330810546875,
-0.09776483476161957,
0.24038565158843994,
0.2942023277282715,
0.2603195607662201,
0.148631751537323,
-0.1236666589975357,
-0.09994060546159744,
0.07530572265386581,
0.017042795196175575,
-0.2875567674636841,
0.16244320571422577,
-0.052856966853141785,
0.3088446855545044,
0.10640007257461548,
0.3368947207927704,
-0.47888869047164917,
-0.15021459758281708,
0.050656821578741074,
-0.08551797270774841,
0.010099094361066818,
0.13240745663642883,
0.07743437588214874,
0.1743319034576416,
-0.14565575122833252,
0.028178341686725616,
-0.4414503872394562,
-0.39581364393234253,
0.007330515421926975,
0.04548366740345955,
0.3892083168029785,
-0.15748368203639984,
0.19676461815834045,
-0.019077319651842117,
0.23974652588367462,
-0.002423759549856186,
-0.2467462122440338,
-0.07481693476438522,
-0.3812546133995056,
-0.21893282234668732,
0.06581410020589828,
0.11257405579090118,
0.0578681081533432,
-0.37452760338783264,
0.10146636515855789,
-0.00925946980714798,
-0.37616807222366333,
0.060144055634737015,
-0.20239315927028656,
0.08423076570034027,
0.27276164293289185,
-0.2780497074127197,
0.27118179202079773,
-0.0445665568113327,
-0.2856488525867462,
0.11742521822452545,
-0.42871612310409546,
0.09029385447502136,
-0.05658305808901787,
0.41907697916030884,
0.17529118061065674,
-0.06046217679977417,
-0.31251707673072815,
0.00020140409469604492,
0.36443865299224854,
0.05201563984155655,
0.19047623872756958,
-0.38792353868484497,
-0.35295891761779785,
-0.056990835815668106,
-0.28057849407196045,
-0.0003795390948653221,
-0.12114792317152023,
-0.008739195764064789,
0.21937687695026398,
-0.020328687503933907,
0.1998058408498764,
-0.2458285391330719,
0.06093636900186539,
-0.10458745062351227,
0.10202186554670334,
-0.27769505977630615,
0.46828576922416687,
-0.20274850726127625,
0.09846612811088562,
-0.22644992172718048,
0.31548401713371277,
0.11404843628406525,
-0.015512421727180481,
-0.336656391620636,
-0.3538404703140259,
0.2720268964767456,
-0.11046250909566879,
-0.17883005738258362,
0.006944979541003704,
0.26834923028945923,
-0.017740927636623383,
0.01133596058934927,
-0.16139289736747742,
-0.009170114994049072,
-0.016238320618867874,
0.0017518028616905212,
-0.08669418096542358,
0.12717534601688385,
-0.2122223973274231,
-0.1532658040523529,
-0.14077475666999817,
0.39148765802383423,
0.21800380945205688,
0.021249672397971153,
0.30648311972618103,
-0.18586738407611847
] |
https://github.com/huggingface/datasets/issues/6333
|
Support fsspec 2023.10.0
|
Hi again, @tomscholz.
After a more cautious investigation, I think the pin is OK because there are other reasons for it. Chronologically:
- #6331
- #6334
- #6336
- #6337
The reason is that after version 2023.10.0, they changed again the behavior of their `glob` function. See: https://github.com/huggingface/datasets/pull/6337#issuecomment-1774930135
We are working on our side to support both previous and new glob behavior.
Note:
- First pin was < 2023.10.0
- Last pin is <= 2023.10.0
|
Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381
| 75
|
Support fsspec 2023.10.0
Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381
Hi again, @tomscholz.
After a more cautious investigation, I think the pin is OK because there are other reasons for it. Chronologically:
- #6331
- #6334
- #6336
- #6337
The reason is that after version 2023.10.0, they changed again the behavior of their `glob` function. See: https://github.com/huggingface/datasets/pull/6337#issuecomment-1774930135
We are working on our side to support both previous and new glob behavior.
Note:
- First pin was < 2023.10.0
- Last pin is <= 2023.10.0
|
[
-0.22064712643623352,
-0.45426133275032043,
-0.058803774416446686,
0.1850799173116684,
0.2825242280960083,
-0.35852766036987305,
0.0379960760474205,
0.14722241461277008,
0.05086889490485191,
0.4707432985305786,
0.003786351764574647,
0.0504310205578804,
0.0073102423921227455,
0.6066052317619324,
-0.11553019285202026,
0.3917822539806366,
0.10348663479089737,
0.19063156843185425,
-0.3896154463291168,
-0.055864788591861725,
-0.14760516583919525,
0.31799671053886414,
-0.02494441717863083,
-0.08671942353248596,
-0.34647268056869507,
0.3203074038028717,
-0.010920004919171333,
0.3451489806175232,
-0.3747948408126831,
-0.19471874833106995,
0.14960825443267822,
-0.09734708070755005,
-0.13602641224861145,
0.2531174123287201,
-0.00010142334940610453,
-0.024406079202890396,
0.2675132751464844,
-0.07554999738931656,
-0.155169278383255,
0.017821259796619415,
-0.17031799256801605,
-0.20431864261627197,
-0.21714645624160767,
0.05331268161535263,
-0.15812566876411438,
-0.18012891709804535,
0.05489311367273331,
-0.007995463907718658,
0.24485880136489868,
0.18052442371845245,
0.3749653398990631,
-0.028559021651744843,
0.29541391134262085,
-0.18436847627162933,
0.5135048031806946,
-0.03243695944547653,
-0.08528133481740952,
-0.021151453256607056,
0.14087843894958496,
-0.1489357203245163,
-0.06964799016714096,
0.06984280049800873,
0.20454004406929016,
0.01858515851199627,
0.18575873970985413,
0.03676636889576912,
0.224749356508255,
-0.1695040464401245,
0.18635013699531555,
-0.07593072205781937,
0.20838816463947296,
-0.035677894949913025,
-0.21647627651691437,
-0.010290540754795074,
-0.21298708021640778,
-0.1468956023454666,
0.3463204801082611,
-0.025113092735409737,
0.1307147890329361,
0.03385024890303612,
0.4417060315608978,
0.17852894961833954,
-0.03187629207968712,
-0.002736300230026245,
-0.14032457768917084,
-0.1548083871603012,
-0.3542102873325348,
0.002695605158805847,
0.46745216846466064,
-0.23403362929821014,
-0.29312077164649963,
0.02058505453169346,
-0.13161233067512512,
-0.041632313281297684,
0.05442456901073456,
-0.11297117173671722,
0.24604356288909912,
0.21637889742851257,
0.1654946506023407,
0.21152368187904358,
-0.3705083131790161,
0.24218866229057312,
-0.00413174694404006,
0.13872656226158142,
-0.0911618173122406,
0.28562459349632263,
0.02336912229657173,
-0.017451830208301544,
0.25955986976623535,
0.12820853292942047,
-0.23446732759475708,
-0.09446645528078079,
0.2292940765619278,
-0.4273412227630615,
-0.2654252052307129,
-0.03948906064033508,
0.1848239004611969,
-0.3217508792877197,
-0.21232029795646667,
-0.011379723437130451,
0.12124783545732498,
0.18573689460754395,
-0.005456640385091305,
0.3151713013648987,
0.23338577151298523,
0.276899516582489,
0.1148274838924408,
-0.06704339385032654,
-0.20093610882759094,
0.054629821330308914,
-0.21437907218933105,
-0.05078786239027977,
-0.38683345913887024,
0.16197331249713898,
-0.019905878230929375,
-0.22998830676078796,
0.11072245985269547,
0.03948856145143509,
-0.08606770634651184,
-0.028243912383913994,
-0.21606791019439697,
-0.0749317854642868,
0.1881592869758606,
0.33172255754470825,
-0.12294730544090271,
-0.05398305505514145,
0.01993633806705475,
0.17251582443714142,
0.011356666684150696,
0.03942381218075752,
-0.09458284825086594,
-0.29305708408355713,
-0.416579931974411,
0.3154003322124481,
0.0677676871418953,
0.26183924078941345,
-0.2020060420036316,
-0.17422975599765778,
-0.22783136367797852,
-0.2312815636396408,
-0.02796565741300583,
0.0014181137084960938,
-0.2755700647830963,
-0.15783599019050598,
0.0011474806815385818,
0.13165177404880524,
-0.09602756798267365,
-0.057437483221292496,
0.001922972034662962,
-0.25121623277664185,
0.18539845943450928,
0.215690478682518,
0.11048508435487747,
-0.20840424299240112,
-0.49259111285209656,
0.44323110580444336,
-0.10333872586488724,
-0.18389438092708588,
-0.5093138217926025,
0.2820616662502289,
-0.18695026636123657,
-0.12344758212566376,
0.1578475832939148,
0.041810471564531326,
-0.07883226871490479,
-0.1202627494931221,
-0.009891398251056671,
-0.056603141129016876,
0.26884642243385315,
0.15645833313465118,
-0.46010857820510864,
-0.23497594892978668,
-0.25162696838378906,
-0.004314964637160301,
-0.1938627064228058,
0.03634392097592354,
0.21410122513771057,
-0.149064302444458,
0.21927395462989807,
-0.08990168571472168,
0.082211434841156,
0.025855503976345062,
0.7034462094306946,
0.2132001519203186,
-0.027110038325190544,
-0.13140027225017548,
-0.5177479386329651,
0.22014456987380981,
-0.371341347694397,
-0.0829315185546875,
0.041573815047740936,
-0.2476944625377655,
-0.07747381925582886,
-0.09452496469020844,
-0.08662651479244232,
-0.11323787271976471,
0.23317575454711914,
0.1608526110649109,
0.051498208194971085,
-0.05959245562553406,
0.12616196274757385,
-0.09587307274341583,
-0.08511843532323837,
0.05693437531590462,
-0.011487454175949097,
0.47643622756004333,
-0.24324877560138702,
-0.2445792853832245,
0.14391282200813293,
0.08586104214191437,
0.3384169340133667,
-0.24233296513557434,
-0.0017137406393885612,
0.44798579812049866,
0.34125658869743347,
0.1911124438047409,
-0.24179118871688843,
0.32256224751472473,
0.01617639884352684,
0.02076970413327217,
-0.05669007450342178,
-0.012083519250154495,
0.13669180870056152,
-0.10418291389942169,
0.17373527586460114,
0.15642713010311127,
0.11594611406326294,
-0.0987200066447258,
0.05733664333820343,
-0.08531643450260162,
0.21634189784526825,
-0.17270822823047638,
0.16854727268218994,
-0.22503206133842468,
0.2416079342365265,
0.21160845458507538,
0.14518341422080994,
0.3080403506755829,
-0.04444325715303421,
0.0926753580570221,
0.4704408049583435,
0.01592939719557762,
-0.014478147029876709,
0.2750360667705536,
-0.04104653000831604,
-0.22138658165931702,
0.2167418748140335,
0.09175045788288116,
0.38885021209716797,
0.2837182879447937,
-0.0473044328391552,
0.029391949996352196,
0.18385401368141174,
-0.14891791343688965,
0.31046628952026367,
-0.20997609198093414,
0.22298289835453033,
0.33988896012306213,
0.25423315167427063,
-0.16246424615383148,
-0.4106416404247284,
0.11907796561717987,
-0.07958955317735672,
0.09849263727664948,
-0.2035834640264511,
-0.20675715804100037,
-0.23260200023651123,
-0.2518012821674347,
-0.10713943094015121,
0.14224867522716522,
-0.0017767511308193207,
-0.23332948982715607,
0.17668238282203674,
0.4494093656539917,
-0.243581622838974,
0.0959365963935852,
0.3311963975429535,
0.33240318298339844,
0.0716000646352768,
0.1496313512325287,
-0.2887856960296631,
0.38600876927375793,
-0.15108373761177063,
0.1084558367729187,
0.25790998339653015,
0.03211430832743645,
0.11634141951799393,
0.13803218305110931,
-0.031658731400966644,
-0.5087717175483704,
-0.3517422378063202,
0.15649157762527466,
-0.12624415755271912,
0.19844654202461243,
0.23347854614257812,
0.09242964535951614,
0.32380467653274536,
0.03436135873198509,
0.17091317474842072,
-0.3935049772262573,
-0.3623705208301544,
-0.0333699956536293,
-0.030719859525561333,
-0.039343222975730896,
-0.5557157397270203,
0.06584350764751434,
-0.08657174557447433,
-0.4125428795814514,
0.46281981468200684,
-0.0497133731842041,
0.03697258234024048,
0.20518898963928223,
0.051669809967279434,
0.009131797589361668,
-0.08259987831115723,
-0.19652089476585388,
-0.3966764509677887,
-0.3644826114177704,
0.16513165831565857,
-0.238327294588089,
-0.46052131056785583,
-0.0671636164188385,
0.1239439845085144,
-0.1771080493927002,
-0.07405486702919006,
-0.39186322689056396,
-0.5720042586326599,
-0.3727218508720398,
0.07014913856983185,
-0.08817915618419647,
0.03193734586238861,
0.42175430059432983,
-0.03600183129310608,
-0.3058222234249115,
-0.24669137597084045,
-0.19628046452999115,
0.25382938981056213,
0.15114276111125946,
-0.0008876249194145203,
-0.10812545567750931,
0.015693627297878265,
0.2775726616382599,
0.38170158863067627,
0.05814056470990181,
-0.14907421171665192,
0.2814658582210541,
-0.14625976979732513,
0.3906940519809723,
-0.30711352825164795,
-0.033604055643081665,
0.13988685607910156,
0.09621701389551163,
-0.1263020783662796,
0.4449508786201477,
0.009276675060391426,
0.19086234271526337,
0.1562194973230362,
0.17649398744106293,
-0.07617664337158203,
-0.20737551152706146,
-0.002191135659813881,
0.34211358428001404,
0.027292072772979736,
0.039008017629384995,
0.003597736358642578,
0.08000621199607849,
-0.031826674938201904,
0.13497120141983032,
-0.008828379213809967,
0.0956222414970398,
-0.06377673149108887,
-0.23330385982990265,
-0.014249804429709911,
-0.3152376115322113,
0.37098973989486694,
0.19727067649364471,
-0.14134007692337036,
-0.2890563905239105,
-0.06444039195775986,
0.18057876825332642,
-0.145285964012146,
0.3555452525615692,
0.0703580304980278,
0.45519793033599854,
0.14375025033950806,
-0.12911322712898254,
-0.19548961520195007,
-0.0965641587972641,
-0.04471520707011223,
0.030903898179531097,
0.14982733130455017,
0.32351821660995483,
-0.34274205565452576,
-0.2653021216392517,
-0.12238630652427673,
-0.15972842276096344,
0.021531056612730026,
0.16748224198818207,
-0.07132147997617722,
-0.1815389096736908,
-0.08497153222560883,
-0.25434792041778564,
0.16964557766914368,
0.12699276208877563,
-0.1490272581577301,
-0.19178688526153564,
-0.022587837651371956,
-0.3581385612487793,
-0.045854851603507996,
-0.15026487410068512,
0.39775893092155457,
0.08330044150352478,
0.0874253362417221,
0.1546556055545807,
0.13027217984199524,
0.45382872223854065,
0.4292590618133545,
-0.06288306415081024,
0.10888858139514923,
0.15911751985549927,
-0.11683627218008041,
0.017812393605709076,
0.3866117298603058,
-0.024263564497232437,
0.1036340519785881,
-0.4039464294910431,
0.22584569454193115,
-0.41478219628334045,
0.09925945103168488,
0.3326528072357178,
0.05729822814464569,
0.09812407940626144,
0.10742814838886261,
0.4116484522819519,
0.017943918704986572,
-0.12454985082149506,
0.3002176582813263,
0.41808032989501953,
-0.19728846848011017,
0.22303007543087006,
-0.24996507167816162,
0.7591933608055115,
0.07577317208051682,
0.18779250979423523,
0.17619165778160095,
-0.05622103437781334,
0.004225314594805241,
-0.10344342887401581,
-0.09962639212608337,
-0.31422287225723267,
-0.2719614505767822,
0.05427771806716919,
-0.03148256242275238,
0.20102617144584656,
-0.003455575555562973,
-0.04841623455286026,
0.05681173503398895,
0.1184026300907135,
0.19607780873775482,
-0.1448473334312439,
0.05207217484712601,
-0.12801969051361084,
-0.1416085809469223,
-0.27609556913375854,
0.3440564274787903,
0.22059999406337738,
0.1411675661802292,
-0.07775746285915375,
-0.03619544953107834,
0.20131731033325195,
-0.16705574095249176,
-0.1828080415725708,
0.10700023919343948,
-0.5386209487915039,
0.20906279981136322,
0.06950856745243073,
0.11231644451618195,
-0.24796856939792633,
0.08994576334953308,
-0.2206423133611679,
0.06691989302635193,
-0.04963196814060211,
0.16983337700366974,
-0.015539616346359253,
0.21137896180152893,
-0.15944445133209229,
-0.04380675405263901,
0.10637682676315308,
-0.09760763496160507,
0.05942731350660324,
-0.2357664406299591,
-0.0678282380104065,
-0.324241042137146,
0.12444612383842468,
0.03738996386528015,
0.037708476185798645,
-0.20047344267368317,
-0.11432698369026184,
0.033884380012750626,
-0.10740119218826294,
-0.16641691327095032,
0.2529146075248718,
-0.09287294745445251,
-0.1184859573841095,
0.04961267113685608,
-0.005584463477134705,
-0.2116382122039795,
0.01957877352833748,
0.3888634741306305,
-0.27245789766311646,
0.3154444098472595,
0.2775469720363617,
-0.13471627235412598,
-0.10002299398183823,
-0.2968467175960541,
0.09335281699895859,
-0.19413231313228607,
-0.16645857691764832,
0.21117451786994934,
0.05899383872747421,
-0.32203924655914307,
0.16510237753391266,
0.6356353759765625,
0.16305112838745117,
0.02465033158659935,
0.05758611485362053,
-0.1829119324684143,
-0.1597810834646225,
0.021150588989257812,
-0.1765587031841278,
0.3528432846069336,
-0.08542390167713165,
0.30454304814338684,
-0.12518146634101868,
-0.20289906859397888,
-0.4792381525039673,
0.4755474328994751,
-0.23062677681446075,
0.053974419832229614,
0.009447659365832806,
-0.1343986988067627,
0.4365706443786621,
-0.23168879747390747,
0.23948633670806885,
0.44453275203704834,
-0.31689223647117615,
-0.30762165784835815,
-0.07359252125024796,
0.06942833960056305,
0.15317106246948242,
-0.14182445406913757,
0.017775051295757294,
-0.05727721378207207,
-0.1807597428560257,
0.03351909667253494,
0.19049035012722015,
0.3330659568309784,
-0.09950627386569977,
0.12274929881095886,
0.05266919732093811,
0.17519235610961914,
0.19710861146450043,
0.13857027888298035,
-0.029137395322322845,
0.28459134697914124,
-0.04507947340607643,
-0.036451488733291626,
-0.40542346239089966,
0.02342238277196884,
0.05360563099384308,
0.16516250371932983,
0.14573700726032257,
0.1755581796169281,
0.06201595440506935,
-0.015969857573509216,
-0.2756671607494354,
0.16524535417556763,
0.5530645847320557,
0.001555800437927246,
-0.22372041642665863,
-0.1985880732536316,
0.2061661183834076,
0.39397868514060974,
-0.10905522853136063,
0.0023843005765229464,
-0.032230544835329056,
-0.04113932326436043,
0.15841029584407806,
-0.0149758979678154,
0.3863438665866852,
-0.24775461852550507,
0.10208849608898163,
0.29642191529273987,
-0.1708911508321762,
-0.015793710947036743,
0.09967558085918427,
-0.20862644910812378,
-0.09192900359630585,
0.13019047677516937,
0.35470882058143616,
-0.0198393315076828,
0.1868123710155487,
0.47418320178985596,
-0.03117182105779648,
0.3207133412361145,
-0.22815045714378357,
0.1727355569601059,
-0.016313113272190094,
-0.34528404474258423,
0.014119844883680344,
0.4655517637729645,
-0.15876367688179016,
-0.06828007847070694,
0.009933218359947205,
0.3759951591491699,
-0.23535628616809845,
-0.2312828004360199,
-0.10353247076272964,
0.04850731045007706,
-0.2577168941497803,
-0.18225422501564026,
0.18218961358070374,
0.05438465625047684,
-0.05234474316239357,
0.10497772693634033,
-0.056947093456983566,
-0.04289558529853821,
0.565008282661438,
0.06695875525474548,
-0.06821243464946747,
-0.010644122958183289,
-0.1691855788230896,
0.12209784239530563,
0.30816972255706787,
-0.09990186989307404,
0.2526063323020935,
-0.043547555804252625,
-0.01920781284570694,
0.3661193251609802,
0.3160233199596405,
0.2988603711128235,
0.12893366813659668,
0.023531751707196236,
-0.11924988776445389,
-0.1088193953037262,
-0.024732565507292747,
-0.33710184693336487,
0.15077465772628784,
-0.11383259296417236,
0.13341635465621948,
0.28219038248062134,
0.3043055534362793,
-0.4127117097377777,
-0.24142001569271088,
0.015589721500873566,
0.11198312044143677,
-0.11708123981952667,
0.12880180776119232,
-0.12437763810157776,
-0.018975749611854553,
-0.1740454137325287,
-0.02792951464653015,
-0.314715713262558,
-0.4475426971912384,
-0.0243515707552433,
-0.029801398515701294,
0.4057398736476898,
-0.07115475833415985,
0.16961053013801575,
0.049002259969711304,
0.17507898807525635,
0.06271753460168839,
-0.29248282313346863,
-0.02247093990445137,
-0.4413319230079651,
-0.3978876769542694,
0.004862338304519653,
0.19556955993175507,
0.06442343443632126,
-0.3188941478729248,
0.2564089894294739,
-0.0279756560921669,
-0.3819044828414917,
-0.007149592041969299,
-0.1827651411294937,
0.1344519853591919,
0.03809273615479469,
-0.3095116913318634,
0.2422468662261963,
-0.13211041688919067,
-0.19496838748455048,
0.1971958577632904,
-0.4522424638271332,
0.04569865018129349,
-0.15873920917510986,
0.31042176485061646,
-0.007278870791196823,
0.18355140089988708,
-0.4025258719921112,
-0.11725318431854248,
0.5931732058525085,
0.11848234385251999,
0.06563156843185425,
-0.3079821467399597,
-0.23773424327373505,
-0.14678114652633667,
-0.23950009047985077,
-0.05664971098303795,
-0.15134117007255554,
-0.10244669020175934,
0.2163683921098709,
-0.00046734418720006943,
0.08868800103664398,
-0.26196250319480896,
0.017254378646612167,
0.025475360453128815,
0.21316640079021454,
-0.31832894682884216,
0.4711971879005432,
-0.2698988914489746,
-0.04806810989975929,
-0.14516079425811768,
0.4589475691318512,
0.0034620724618434906,
-0.1414235681295395,
-0.26599276065826416,
-0.44659802317619324,
0.4830271899700165,
-0.19874854385852814,
-0.1617937833070755,
0.1292707324028015,
0.36252182722091675,
0.126169353723526,
-0.13299082219600677,
-0.20766404271125793,
0.07063769549131393,
0.08318713307380676,
0.15309694409370422,
-0.20640113949775696,
0.21439185738563538,
-0.2972264587879181,
-0.12358446419239044,
-0.1085757315158844,
0.3908023536205292,
0.3451021909713745,
-0.1613832712173462,
0.3729322552680969,
-0.2989528775215149
] |
https://github.com/huggingface/datasets/issues/6330
|
Latest fsspec==2023.10.0 issue with streaming datasets
|
I also encountered a similar error below.
Appreciate the team could shed some light on this issue.
```
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
[/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb) Cell 1 line 4
[1](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0) from datasets import load_dataset, load_dataset
[3](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=2) # ds = load_dataset("parquet", data_dir="/home/ubuntu/work/EveryDream2trainer/datasets/monse_v1/data")
----> [4](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=3) ds = load_dataset("Raspberry-ai/monse-v1")
File [/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/load.py:1804](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/load.py:1804), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1800 # Build dataset for splits
1801 keep_in_memory = (
1802 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1803 )
-> 1804 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
1805 # Rename and cast features to match task schema
1806 if task is not None:
File [/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/builder.py:1108](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/builder.py:1108), in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory)
1106 is_local = not is_remote_filesystem(self._fs)
1107 if not is_local:
-> 1108 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
1109 if not os.path.exists(self._output_dir):
1110 raise FileNotFoundError(
1111 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call "
1112 "builder.download_and_prepare(), or use "
1113 "datasets.load_dataset() before trying to access the Dataset object."
1114 )
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
```
Code to reproduce the issue:
```
from datasets import load_dataset
ds = load_dataset("Raspberry-ai/monse-v1")
```
Dependencies:
```
Package Version
------------------------- ------------
absl-py 2.0.0
accelerate 0.23.0
aiohttp 3.8.4
aiosignal 1.3.1
antlr4-python3-runtime 4.9.3
anyio 4.0.0
appdirs 1.4.4
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asttokens 2.4.0
async-lru 2.0.4
async-timeout 4.0.3
attrs 23.1.0
Babel 2.13.0
backcall 0.2.0
beautifulsoup4 4.12.2
bitsandbytes 0.41.1
bleach 6.1.0
braceexpand 0.1.7
cachetools 5.3.1
certifi 2023.7.22
cffi 1.16.0
charset-normalizer 3.3.1
click 8.1.7
cmake 3.27.7
colorama 0.4.6
comm 0.1.4
compel 1.1.6
datasets 2.11.0
debugpy 1.8.0
decorator 5.1.1
defusedxml 0.7.1
diffusers 0.18.0
dill 0.3.6
docker-pycreds 0.4.0
dowg 0.3.1
einops 0.7.0
einops-exts 0.0.4
exceptiongroup 1.1.3
executing 2.0.0
fastjsonschema 2.18.1
filelock 3.12.4
fqdn 1.5.1
frozenlist 1.4.0
fsspec 2023.10.0
ftfy 6.1.1
gitdb 4.0.11
GitPython 3.1.40
google-auth 2.23.3
google-auth-oauthlib 1.1.0
grpcio 1.59.0
huggingface-hub 0.18.0
idna 3.4
importlib-metadata 6.8.0
inflection 0.5.1
ipykernel 6.25.2
ipython 8.16.1
isoduration 20.11.0
jedi 0.19.1
Jinja2 3.1.2
joblib 1.3.2
json5 0.9.14
jsonpointer 2.4
jsonschema 4.19.1
jsonschema-specifications 2023.7.1
jupyter_client 8.4.0
jupyter_core 5.4.0
jupyter-events 0.8.0
jupyter-lsp 2.2.0
jupyter_server 2.8.0
jupyter_server_terminals 0.4.4
jupyterlab 4.0.7
jupyterlab-pygments 0.2.2
jupyterlab_server 2.25.0
lightning-utilities 0.9.0
lion-pytorch 0.1.2
lit 17.0.3
Markdown 3.5
MarkupSafe 2.1.3
matplotlib-inline 0.1.6
mistune 3.0.2
more-itertools 10.1.0
mpmath 1.3.0
multidict 6.0.4
multiprocess 0.70.14
mypy-extensions 1.0.0
nbclient 0.8.0
nbconvert 7.9.2
nbformat 5.9.2
nest-asyncio 1.5.8
networkx 3.2
nltk 3.8.1
notebook_shim 0.2.3
numpy 1.23.5
oauthlib 3.2.2
omegaconf 2.2.3
open-clip-torch 2.22.0
open-flamingo 2.0.0
overrides 7.4.0
packaging 23.2
pandas 2.1.1
pandocfilters 1.5.0
parso 0.8.3
pathtools 0.1.2
pexpect 4.8.0
pickleshare 0.7.5
Pillow 10.1.0
pip 23.3.1
platformdirs 3.11.0
prometheus-client 0.17.1
prompt-toolkit 3.0.39
protobuf 3.20.1
psutil 5.9.6
ptyprocess 0.7.0
pure-eval 0.2.2
pyarrow 13.0.0
pyasn1 0.5.0
pyasn1-modules 0.3.0
pycparser 2.21
pyDeprecate 0.3.2
Pygments 2.16.1
pynvml 11.4.1
pyparsing 3.1.1
pyre-extensions 0.0.29
python-dateutil 2.8.2
python-json-logger 2.0.7
pytorch-lightning 1.6.5
pytz 2023.3.post1
PyYAML 6.0.1
pyzmq 25.1.1
referencing 0.30.2
regex 2023.10.3
requests 2.31.0
requests-oauthlib 1.3.1
responses 0.18.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rpds-py 0.10.6
rsa 4.9
safetensors 0.4.0
scipy 1.11.3
Send2Trash 1.8.2
sentencepiece 0.1.98
sentry-sdk 1.32.0
setproctitle 1.3.3
setuptools 68.2.2
six 1.16.0
smmap 5.0.1
sniffio 1.3.0
soupsieve 2.5
stack-data 0.6.3
sympy 1.12
tensorboard 2.15.0
tensorboard-data-server 0.7.1
terminado 0.17.1
timm 0.9.8
tinycss2 1.2.1
tokenizers 0.13.3
tomli 2.0.1
torch 2.0.1+cu118
torchmetrics 1.2.0
torchvision 0.15.2+cu118
tornado 6.3.3
tqdm 4.66.1
traitlets 5.11.2
transformers 4.29.2
triton 2.0.0
types-python-dateutil 2.8.19.14
typing_extensions 4.8.0
typing-inspect 0.9.0
tzdata 2023.3
uri-template 1.3.0
urllib3 2.0.7
wandb 0.15.12
wcwidth 0.2.8
webcolors 1.13
webdataset 0.2.62
webencodings 0.5.1
websocket-client 1.6.4
Werkzeug 3.0.0
wheel 0.41.2
xformers 0.0.20
xxhash 3.4.1
yarl 1.9.2
zipp 3.17.0
```
|
### Describe the bug
Loading a streaming dataset with this version of fsspec fails with the following error:
`NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.`
I suspect the issue is with this PR
https://github.com/fsspec/filesystem_spec/pull/1381
### Steps to reproduce the bug
1. Upgrade fsspec to version `2023.10.0`
2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)`
3. Observe the following exception:
```
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset
return builder_instance.as_streaming_dataset(split=split)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset
raise NotImplementedError(
NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.
```
### Expected behavior
Should stream the dataset as normal.
### Environment info
datasets@main
fsspec==2023.10.0
| 588
|
Latest fsspec==2023.10.0 issue with streaming datasets
### Describe the bug
Loading a streaming dataset with this version of fsspec fails with the following error:
`NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.`
I suspect the issue is with this PR
https://github.com/fsspec/filesystem_spec/pull/1381
### Steps to reproduce the bug
1. Upgrade fsspec to version `2023.10.0`
2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)`
3. Observe the following exception:
```
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset
return builder_instance.as_streaming_dataset(split=split)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset
raise NotImplementedError(
NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.
```
### Expected behavior
Should stream the dataset as normal.
### Environment info
datasets@main
fsspec==2023.10.0
I also encountered a similar error below.
Appreciate the team could shed some light on this issue.
```
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
[/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb) Cell 1 line 4
[1](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0) from datasets import load_dataset, load_dataset
[3](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=2) # ds = load_dataset("parquet", data_dir="/home/ubuntu/work/EveryDream2trainer/datasets/monse_v1/data")
----> [4](vscode-notebook-cell://ssh-remote%2Braspberry-g5.4x/home/ubuntu/work/EveryDream2trainer/prepare_dataset.ipynb#W0sdnNjb2RlLXJlbW90ZQ%3D%3D?line=3) ds = load_dataset("Raspberry-ai/monse-v1")
File [/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/load.py:1804](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/load.py:1804), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1800 # Build dataset for splits
1801 keep_in_memory = (
1802 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1803 )
-> 1804 ds = builder_instance.as_dataset(split=split, verification_mode=verification_mode, in_memory=keep_in_memory)
1805 # Rename and cast features to match task schema
1806 if task is not None:
File [/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/builder.py:1108](https://vscode-remote+ssh-002dremote-002braspberry-002dg5-002e4x.vscode-resource.vscode-cdn.net/opt/conda/envs/everydream/lib/python3.10/site-packages/datasets/builder.py:1108), in DatasetBuilder.as_dataset(self, split, run_post_process, verification_mode, ignore_verifications, in_memory)
1106 is_local = not is_remote_filesystem(self._fs)
1107 if not is_local:
-> 1108 raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
1109 if not os.path.exists(self._output_dir):
1110 raise FileNotFoundError(
1111 f"Dataset {self.name}: could not find data in {self._output_dir}. Please make sure to call "
1112 "builder.download_and_prepare(), or use "
1113 "datasets.load_dataset() before trying to access the Dataset object."
1114 )
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.
```
Code to reproduce the issue:
```
from datasets import load_dataset
ds = load_dataset("Raspberry-ai/monse-v1")
```
Dependencies:
```
Package Version
------------------------- ------------
absl-py 2.0.0
accelerate 0.23.0
aiohttp 3.8.4
aiosignal 1.3.1
antlr4-python3-runtime 4.9.3
anyio 4.0.0
appdirs 1.4.4
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asttokens 2.4.0
async-lru 2.0.4
async-timeout 4.0.3
attrs 23.1.0
Babel 2.13.0
backcall 0.2.0
beautifulsoup4 4.12.2
bitsandbytes 0.41.1
bleach 6.1.0
braceexpand 0.1.7
cachetools 5.3.1
certifi 2023.7.22
cffi 1.16.0
charset-normalizer 3.3.1
click 8.1.7
cmake 3.27.7
colorama 0.4.6
comm 0.1.4
compel 1.1.6
datasets 2.11.0
debugpy 1.8.0
decorator 5.1.1
defusedxml 0.7.1
diffusers 0.18.0
dill 0.3.6
docker-pycreds 0.4.0
dowg 0.3.1
einops 0.7.0
einops-exts 0.0.4
exceptiongroup 1.1.3
executing 2.0.0
fastjsonschema 2.18.1
filelock 3.12.4
fqdn 1.5.1
frozenlist 1.4.0
fsspec 2023.10.0
ftfy 6.1.1
gitdb 4.0.11
GitPython 3.1.40
google-auth 2.23.3
google-auth-oauthlib 1.1.0
grpcio 1.59.0
huggingface-hub 0.18.0
idna 3.4
importlib-metadata 6.8.0
inflection 0.5.1
ipykernel 6.25.2
ipython 8.16.1
isoduration 20.11.0
jedi 0.19.1
Jinja2 3.1.2
joblib 1.3.2
json5 0.9.14
jsonpointer 2.4
jsonschema 4.19.1
jsonschema-specifications 2023.7.1
jupyter_client 8.4.0
jupyter_core 5.4.0
jupyter-events 0.8.0
jupyter-lsp 2.2.0
jupyter_server 2.8.0
jupyter_server_terminals 0.4.4
jupyterlab 4.0.7
jupyterlab-pygments 0.2.2
jupyterlab_server 2.25.0
lightning-utilities 0.9.0
lion-pytorch 0.1.2
lit 17.0.3
Markdown 3.5
MarkupSafe 2.1.3
matplotlib-inline 0.1.6
mistune 3.0.2
more-itertools 10.1.0
mpmath 1.3.0
multidict 6.0.4
multiprocess 0.70.14
mypy-extensions 1.0.0
nbclient 0.8.0
nbconvert 7.9.2
nbformat 5.9.2
nest-asyncio 1.5.8
networkx 3.2
nltk 3.8.1
notebook_shim 0.2.3
numpy 1.23.5
oauthlib 3.2.2
omegaconf 2.2.3
open-clip-torch 2.22.0
open-flamingo 2.0.0
overrides 7.4.0
packaging 23.2
pandas 2.1.1
pandocfilters 1.5.0
parso 0.8.3
pathtools 0.1.2
pexpect 4.8.0
pickleshare 0.7.5
Pillow 10.1.0
pip 23.3.1
platformdirs 3.11.0
prometheus-client 0.17.1
prompt-toolkit 3.0.39
protobuf 3.20.1
psutil 5.9.6
ptyprocess 0.7.0
pure-eval 0.2.2
pyarrow 13.0.0
pyasn1 0.5.0
pyasn1-modules 0.3.0
pycparser 2.21
pyDeprecate 0.3.2
Pygments 2.16.1
pynvml 11.4.1
pyparsing 3.1.1
pyre-extensions 0.0.29
python-dateutil 2.8.2
python-json-logger 2.0.7
pytorch-lightning 1.6.5
pytz 2023.3.post1
PyYAML 6.0.1
pyzmq 25.1.1
referencing 0.30.2
regex 2023.10.3
requests 2.31.0
requests-oauthlib 1.3.1
responses 0.18.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rpds-py 0.10.6
rsa 4.9
safetensors 0.4.0
scipy 1.11.3
Send2Trash 1.8.2
sentencepiece 0.1.98
sentry-sdk 1.32.0
setproctitle 1.3.3
setuptools 68.2.2
six 1.16.0
smmap 5.0.1
sniffio 1.3.0
soupsieve 2.5
stack-data 0.6.3
sympy 1.12
tensorboard 2.15.0
tensorboard-data-server 0.7.1
terminado 0.17.1
timm 0.9.8
tinycss2 1.2.1
tokenizers 0.13.3
tomli 2.0.1
torch 2.0.1+cu118
torchmetrics 1.2.0
torchvision 0.15.2+cu118
tornado 6.3.3
tqdm 4.66.1
traitlets 5.11.2
transformers 4.29.2
triton 2.0.0
types-python-dateutil 2.8.19.14
typing_extensions 4.8.0
typing-inspect 0.9.0
tzdata 2023.3
uri-template 1.3.0
urllib3 2.0.7
wandb 0.15.12
wcwidth 0.2.8
webcolors 1.13
webdataset 0.2.62
webencodings 0.5.1
websocket-client 1.6.4
Werkzeug 3.0.0
wheel 0.41.2
xformers 0.0.20
xxhash 3.4.1
yarl 1.9.2
zipp 3.17.0
```
|
[
-0.39628320932388306,
-0.05229165405035019,
0.08950150012969971,
0.22059626877307892,
0.2076960951089859,
-0.055555298924446106,
0.11532983183860779,
0.16825377941131592,
-0.1815401017665863,
0.2266598641872406,
-0.04434133321046829,
0.20201539993286133,
-0.05889022350311279,
0.46524885296821594,
0.03397681191563606,
-0.23244649171829224,
0.21127450466156006,
0.14988009631633759,
-0.14640243351459503,
0.22781391441822052,
-0.0821220874786377,
0.3697831332683563,
-0.1280137151479721,
-0.21536098420619965,
-0.029460446909070015,
0.16141262650489807,
-0.12643899023532867,
0.17121705412864685,
-0.10415718704462051,
-0.5332134962081909,
0.3809049427509308,
-0.17306116223335266,
0.25456443428993225,
0.4597494900226593,
-0.00012335451901890337,
0.006056159734725952,
0.5310840010643005,
-0.07231667637825012,
-0.1516987532377243,
-0.30244511365890503,
-0.19589102268218994,
-0.2654663026332855,
-0.0151259396225214,
0.2547120153903961,
-0.2628384232521057,
-0.20207934081554413,
0.009919319301843643,
-0.7879801392555237,
0.27228879928588867,
0.37475326657295227,
0.1428717076778412,
0.19683411717414856,
-0.026495398953557014,
0.00866031739860773,
0.2627697288990021,
-0.1858050674200058,
-0.24066483974456787,
-0.19479097425937653,
0.18100795149803162,
-0.1475493609905243,
-0.18196642398834229,
0.17778624594211578,
0.10201077163219452,
0.1130792647600174,
0.4155326783657074,
-0.21017788350582123,
-0.061200715601444244,
-0.33172062039375305,
0.15244707465171814,
0.22920706868171692,
0.707782506942749,
0.013624776154756546,
-0.6167393326759338,
-0.09039470553398132,
-0.12665392458438873,
-0.5123701691627502,
0.31349998712539673,
0.06076567620038986,
-0.002656581811606884,
0.05139906704425812,
-0.054596275091171265,
-0.053144585341215134,
-0.15253230929374695,
0.15104611217975616,
0.06203792244195938,
-0.08312706649303436,
-0.10331710427999496,
0.025355994701385498,
0.05808844044804573,
-0.19863328337669373,
0.29792189598083496,
-0.24497780203819275,
0.01818426325917244,
0.2890026867389679,
-0.522383987903595,
0.11736258864402771,
0.13254208862781525,
0.19935593008995056,
-0.2514883875846863,
0.2541206479072571,
-0.11042053997516632,
0.04396483302116394,
-0.11898841708898544,
0.03164782375097275,
0.24166235327720642,
0.2237950712442398,
0.18970388174057007,
0.0491185337305069,
0.12271788716316223,
0.19205375015735626,
-0.01830250583589077,
-0.2446935474872589,
0.04201462119817734,
-0.13698463141918182,
-0.15225428342819214,
0.0860552117228508,
0.19445204734802246,
-0.48492342233657837,
-0.19334053993225098,
0.10936203598976135,
-0.0551794096827507,
-0.009297207929193974,
-0.01428112480789423,
0.31312960386276245,
-0.03208308666944504,
0.7415674328804016,
-0.05545897036790848,
0.05051440745592117,
-0.1804877370595932,
-0.29429981112480164,
-0.2064194679260254,
-0.13971242308616638,
-0.10473689436912537,
0.27085620164871216,
0.2672165334224701,
-0.7928375601768494,
0.24916881322860718,
-0.2683975398540497,
-0.09626753628253937,
0.06467019021511078,
-0.10598936676979065,
-0.16745240986347198,
0.11390921473503113,
0.4165315628051758,
-0.27970242500305176,
0.10119681805372238,
0.014000147581100464,
0.21845181286334991,
-0.06322550028562546,
0.17704129219055176,
-0.00435435026884079,
-0.5156028270721436,
-0.0858328565955162,
0.07666859030723572,
-0.18337801098823547,
-0.1578584909439087,
-0.3201518654823303,
0.08235751837491989,
0.00924229621887207,
-0.28594261407852173,
-0.11255065351724625,
-0.12923121452331543,
-0.7099597454071045,
-0.11890479177236557,
0.21696388721466064,
0.47714143991470337,
-0.4753422141075134,
-0.13269075751304626,
-0.3968436121940613,
-0.045676615089178085,
0.35665494203567505,
0.20769308507442474,
-0.09602842479944229,
-0.11698084324598312,
-0.1683201789855957,
0.1549055278301239,
-0.04561705142259598,
-0.2788662612438202,
-0.4666627049446106,
0.4678911566734314,
0.053447067737579346,
0.3665514886379242,
0.2139645516872406,
-0.11601297557353973,
0.233443483710289,
-0.08447263389825821,
0.17379319667816162,
0.23487791419029236,
-0.20118805766105652,
0.05152619630098343,
-0.29386046528816223,
-0.3600947856903076,
0.20582525432109833,
0.22273662686347961,
0.21012665331363678,
0.25522515177726746,
0.12306032329797745,
0.0276588536798954,
0.23167067766189575,
-0.023539353162050247,
0.1803330034017563,
0.2059902548789978,
0.6657281517982483,
0.09497153013944626,
0.03823339566588402,
-0.3211025595664978,
-0.3665664494037628,
0.366990864276886,
0.13194970786571503,
-0.08573175966739655,
0.36435437202453613,
0.029798641800880432,
0.016535837203264236,
-0.06163252145051956,
-0.17569468915462494,
-0.2232399880886078,
-0.035955917090177536,
0.2257683426141739,
0.0715220719575882,
-0.044372037053108215,
-0.3146677613258362,
0.3884241580963135,
-0.19424276053905487,
-0.13839462399482727,
-0.22052554786205292,
0.3352363407611847,
0.04373227059841156,
-0.2525569498538971,
-0.0017689205706119537,
0.11394746601581573,
0.3313739597797394,
-0.11416501551866531,
-0.25686344504356384,
0.4068351686000824,
0.4234439432621002,
0.30708909034729004,
-0.3304961919784546,
0.355678915977478,
0.28882381319999695,
-0.2507207989692688,
-0.055145762860774994,
0.37964630126953125,
0.0987025797367096,
-0.0007782652974128723,
0.1001676544547081,
0.22960150241851807,
0.12068431079387665,
0.1935882270336151,
0.12631428241729736,
-0.06267976760864258,
0.25874993205070496,
0.12903515994548798,
-0.06211823970079422,
-0.11101643741130829,
0.40090814232826233,
-0.29690679907798767,
0.3103073537349701,
-0.08233816176652908,
-0.22249285876750946,
0.028411567211151123,
0.07550916820764542,
0.05600442364811897,
-0.4726576805114746,
0.1298946738243103,
-0.2205389142036438,
-0.20175975561141968,
0.592477560043335,
0.3279036283493042,
0.5910861492156982,
0.12503407895565033,
-0.042972382158041,
0.21465173363685608,
0.22588123381137848,
-0.12681028246879578,
0.2342933714389801,
-0.1261914074420929,
0.08626196533441544,
0.3484724462032318,
0.16680029034614563,
0.175104022026062,
-0.21968382596969604,
-0.01931113749742508,
0.019437288865447044,
0.21262139081954956,
-0.3314349949359894,
-0.01772698387503624,
-0.3896300196647644,
-0.3092600107192993,
-0.2080926150083542,
0.21450014412403107,
0.0034456364810466766,
-0.23065663874149323,
-0.15707990527153015,
0.7053329348564148,
-0.15147612988948822,
0.14527903497219086,
-0.21077655255794525,
0.34513044357299805,
-0.048287250101566315,
0.03871788829565048,
-0.25055718421936035,
0.17088821530342102,
-0.297902375459671,
-0.039572663605213165,
0.35536742210388184,
-0.21138571202754974,
0.04367954283952713,
0.027728496119379997,
-0.028191983699798584,
-0.48985153436660767,
-0.2653390169143677,
0.16911596059799194,
0.06026267632842064,
0.37939542531967163,
-0.07264254987239838,
0.07855480909347534,
0.23554770648479462,
-0.14116734266281128,
0.04957899823784828,
-0.49814334511756897,
-0.23239900171756744,
0.04081255942583084,
-0.08783841878175735,
0.13284838199615479,
-0.16580915451049805,
-0.28346070647239685,
-0.314954936504364,
-0.4260421395301819,
0.3011384606361389,
-0.24058997631072998,
0.07954121381044388,
0.2818574607372284,
-0.056721724569797516,
-0.05822054296731949,
-0.0629434585571289,
-0.274799644947052,
-0.16821067035198212,
-0.38117489218711853,
0.1495172679424286,
-0.2341499775648117,
-0.49985483288764954,
0.09082414209842682,
0.2876356244087219,
-0.08482760190963745,
0.1336858570575714,
-0.3661714792251587,
0.0561538003385067,
-0.22355525195598602,
0.04571283981204033,
-0.05389925092458725,
-0.227052703499794,
0.34524208307266235,
-0.1374214142560959,
-0.009481418877840042,
-0.25056374073028564,
-0.280581533908844,
-0.02688254415988922,
0.3497791290283203,
0.20691174268722534,
0.07115916907787323,
0.20271718502044678,
0.16058722138404846,
0.6069154143333435,
0.4088953137397766,
-0.09029397368431091,
0.6099034547805786,
0.10729372501373291,
0.2955538034439087,
-0.22860068082809448,
-0.14096029102802277,
-0.06192206218838692,
-0.13965719938278198,
-0.16946230828762054,
0.2043316811323166,
0.19699475169181824,
-0.27074387669563293,
-0.12740761041641235,
0.0767412781715393,
-0.00233517587184906,
0.016989920288324356,
0.02329305373132229,
-0.4389936029911041,
0.4360995292663574,
0.022463355213403702,
0.10104652494192123,
0.083346888422966,
-0.24891093373298645,
0.014455029740929604,
0.24625608325004578,
0.33388039469718933,
0.07971362769603729,
-0.003434430807828903,
-0.1388927847146988,
-0.5173633694648743,
0.12826155126094818,
0.21422028541564941,
0.7154552936553955,
-0.40007859468460083,
-0.08370882272720337,
0.037713512778282166,
0.010151540860533714,
0.19273367524147034,
-0.4322708547115326,
0.2576838433742523,
0.24881196022033691,
-0.1908014565706253,
-0.11671064049005508,
-0.2328108549118042,
0.09059113264083862,
-0.08978545665740967,
-0.08257338404655457,
0.5566504001617432,
-0.0157863050699234,
-0.19730274379253387,
-0.11677505075931549,
0.02584521844983101,
-0.03717518597841263,
-0.09151141345500946,
-0.1531640887260437,
-0.0018786229193210602,
0.010064477100968361,
-0.1252138912677765,
-0.15595093369483948,
0.22262606024742126,
-0.22736766934394836,
0.22501952946186066,
-0.028081463649868965,
0.16962039470672607,
-0.010325610637664795,
-0.14889149367809296,
0.2205173373222351,
-0.004309505689889193,
0.3989972472190857,
0.36141708493232727,
-0.03681105375289917,
0.3496575653553009,
0.4338845908641815,
0.044025078415870667,
-0.34692496061325073,
0.19626858830451965,
0.27815335988998413,
-0.0028443410992622375,
0.33781105279922485,
-0.2535203695297241,
0.052116759121418,
0.29943326115608215,
-0.10875760018825531,
-0.1852547824382782,
0.04966707527637482,
0.13415610790252686,
0.044669508934020996,
0.0022559044882655144,
-0.47268110513687134,
0.30729940533638,
0.03801950812339783,
0.05204044282436371,
0.3857896625995636,
-0.006091982126235962,
-0.08350389450788498,
0.36808812618255615,
-0.16721853613853455,
0.6379009485244751,
-0.035866133868694305,
0.1408994048833847,
0.16417157649993896,
-0.13435934484004974,
0.060577407479286194,
-0.16057059168815613,
0.12408018112182617,
-0.19597670435905457,
-0.2616099417209625,
-0.10559872537851334,
-0.05786391720175743,
0.4460727870464325,
-0.1768108606338501,
-0.017515964806079865,
0.47868141531944275,
0.17558808624744415,
0.3795020580291748,
0.15953364968299866,
0.19603197276592255,
-0.10527629405260086,
-0.1117936372756958,
-0.3926316201686859,
0.1471739560365677,
-0.049468569457530975,
0.28622204065322876,
-0.0068555669859051704,
-0.06919903308153152,
0.13489383459091187,
0.03627888858318329,
-0.5659934282302856,
0.28421732783317566,
-0.35431116819381714,
0.09967554360628128,
-0.24586790800094604,
-0.11993488669395447,
0.11447681486606598,
0.1907079666852951,
-0.12860700488090515,
-0.26277026534080505,
-0.3999083638191223,
0.13924577832221985,
0.11841781437397003,
0.15555264055728912,
-0.029269488528370857,
-0.1491670459508896,
0.2613659203052521,
-0.19430741667747498,
-0.14166024327278137,
-0.0977184846997261,
-0.3740598261356354,
-0.4426174759864807,
0.40492063760757446,
-0.060947269201278687,
0.31091755628585815,
0.023393211886286736,
-0.04270762577652931,
0.09528346359729767,
0.1329636573791504,
-0.12235793471336365,
0.09326207637786865,
-0.0154300257563591,
-0.22003351151943207,
-0.15891185402870178,
-0.12057049572467804,
-0.12081579864025116,
-0.05801740661263466,
0.6441303491592407,
-0.2098795771598816,
0.11184266209602356,
0.4926010072231293,
0.01007966697216034,
-0.1307619959115982,
-0.03331039845943451,
-0.09467044472694397,
-0.060961104929447174,
-0.08420314639806747,
-0.10489151626825333,
-0.1620483100414276,
0.03799918293952942,
0.03314067795872688,
0.5513266324996948,
0.21807044744491577,
-0.1211002841591835,
-0.2226862758398056,
-0.2274385541677475,
-0.23006987571716309,
0.046677786856889725,
-0.29731234908103943,
0.17318464815616608,
-0.2005932331085205,
0.10528585314750671,
-0.07103855162858963,
-0.07376706600189209,
-0.2101207971572876,
0.17735294997692108,
0.1341746300458908,
0.05852646753191948,
0.22197659313678741,
0.03717796504497528,
0.32973676919937134,
-0.15508128702640533,
-0.027874765917658806,
0.1268496960401535,
-0.329397588968277,
-0.08543622493743896,
-0.04329445958137512,
0.16974730789661407,
0.4330346882343292,
-0.32890817523002625,
-0.20004713535308838,
-0.23820734024047852,
-0.18949580192565918,
-0.043564725667238235,
0.04634642228484154,
0.3709504306316376,
-0.17769977450370789,
0.13610345125198364,
0.20492446422576904,
0.192629873752594,
-0.05349535867571831,
0.33657464385032654,
-0.059085071086883545,
0.19784489274024963,
-0.04312148690223694,
0.23123280704021454,
0.060410574078559875,
0.010347887873649597,
0.024503391236066818,
-0.07813633233308792,
0.10656170547008514,
0.21841773390769958,
0.36119794845581055,
-0.3613710403442383,
0.06827829778194427,
0.1344951093196869,
0.3378279507160187,
0.21753035485744476,
-0.0012823257129639387,
0.007281487807631493,
0.25795915722846985,
0.1347612887620926,
-0.08378733694553375,
-0.09998457133769989,
0.09952731430530548,
0.08198429644107819,
-0.04585706442594528,
-0.1546294391155243,
0.595246434211731,
-0.1599057912826538,
0.24283675849437714,
0.11630181223154068,
0.16556449234485626,
-0.0565619170665741,
0.39049819111824036,
0.08005611598491669,
0.1653422713279724,
0.2369770109653473,
0.006888207048177719,
-0.14428004622459412,
-0.010960295796394348,
0.33272385597229004,
0.13134750723838806,
0.25220316648483276,
0.008013376966118813,
0.15299972891807556,
-0.15639957785606384,
-0.8849549889564514,
0.09456396102905273,
0.09232402592897415,
-0.1695055067539215,
0.1156216710805893,
0.007598429918289185,
0.5218511819839478,
-0.29505637288093567,
-0.2454695701599121,
-0.156568706035614,
0.051125265657901764,
-0.1698826253414154,
-0.2123468667268753,
0.17537477612495422,
-0.008316121995449066,
0.0016026422381401062,
0.2093672901391983,
-0.025010544806718826,
0.16766002774238586,
0.5947638154029846,
0.049645066261291504,
-0.2498800903558731,
-0.14363402128219604,
-0.3227495551109314,
0.32397031784057617,
0.2939494550228119,
-0.1340349167585373,
0.45249560475349426,
-0.17051436007022858,
-0.1540095955133438,
0.20583368837833405,
0.21108099818229675,
0.30209437012672424,
0.22338634729385376,
0.047491926699876785,
0.026226337999105453,
0.11077286303043365,
0.07412748038768768,
0.18713781237602234,
0.3831467926502228,
-0.05234380066394806,
0.29978427290916443,
0.2943190634250641,
0.024159418419003487,
-0.04367620870471001,
0.13026870787143707,
-0.1255306899547577,
0.29762184619903564,
-0.4275321364402771,
0.1957114338874817,
-0.08622097223997116,
0.095951147377491,
-0.03678949922323227,
0.1310710310935974,
-0.1606156826019287,
0.10914573073387146,
0.501350462436676,
0.010751500725746155,
0.23531833291053772,
0.08312258869409561,
0.042143065482378006,
-0.083767369389534,
0.18116913735866547,
0.42558741569519043,
-0.1261608898639679,
-0.27240416407585144,
-0.3799760341644287,
-0.5623794198036194,
0.09584043174982071,
-0.024700772017240524,
0.3434756398200989,
0.013550776988267899,
0.2543250322341919,
-0.06207311898469925,
-0.08127222210168839,
-0.1166660338640213,
-0.14407825469970703,
-0.053931206464767456,
0.22618870437145233,
-0.3170788586139679,
0.03920184448361397,
0.11699457466602325,
0.05330932140350342,
-0.08117217570543289,
-0.4910530149936676,
0.06681504100561142,
0.062001023441553116,
-0.03593067824840546,
0.16367363929748535,
-0.3122122287750244,
-0.09290671348571777,
-0.41511285305023193,
0.26584339141845703,
0.029623571783304214,
0.33471566438674927,
-0.03302621841430664,
-0.28083986043930054,
-0.480509877204895,
-0.2886418104171753,
-0.20265734195709229,
-0.04986484348773956,
-0.37213438749313354,
0.6119183301925659,
-0.17593981325626373,
0.23319129645824432,
-0.5175113677978516,
0.2905002236366272,
-0.12008044123649597,
-0.2120906561613083,
-0.33678025007247925,
0.27016937732696533,
-0.36083003878593445,
0.203068807721138,
-0.07335173338651657,
0.22059503197669983,
-0.058390870690345764,
0.024643054232001305,
-0.3717082738876343,
-0.1660684049129486,
0.5125212669372559,
-0.7782444357872009,
-0.00821763463318348,
-0.05458211153745651,
0.18115219473838806,
0.4228380620479584,
-0.17474114894866943,
-0.4311305284500122,
0.03560861200094223,
0.23256410658359528,
-0.13000687956809998,
0.057795729488134384,
0.06418072432279587,
-0.21701817214488983,
0.08958415687084198,
-0.10662811994552612,
0.37927940487861633,
0.05276046320796013,
-0.06785394996404648,
0.15847739577293396,
-0.3184130787849426
] |
https://github.com/huggingface/datasets/issues/6330
|
Latest fsspec==2023.10.0 issue with streaming datasets
|
Thanks for reporting and for the investigation, @ZachNagengast! :hugs:
We are investigating the root cause of the issue. In the meantime, we are going to pin fsspec < 2023.10.0.
|
### Describe the bug
Loading a streaming dataset with this version of fsspec fails with the following error:
`NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.`
I suspect the issue is with this PR
https://github.com/fsspec/filesystem_spec/pull/1381
### Steps to reproduce the bug
1. Upgrade fsspec to version `2023.10.0`
2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)`
3. Observe the following exception:
```
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset
return builder_instance.as_streaming_dataset(split=split)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset
raise NotImplementedError(
NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.
```
### Expected behavior
Should stream the dataset as normal.
### Environment info
datasets@main
fsspec==2023.10.0
| 29
|
Latest fsspec==2023.10.0 issue with streaming datasets
### Describe the bug
Loading a streaming dataset with this version of fsspec fails with the following error:
`NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.`
I suspect the issue is with this PR
https://github.com/fsspec/filesystem_spec/pull/1381
### Steps to reproduce the bug
1. Upgrade fsspec to version `2023.10.0`
2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)`
3. Observe the following exception:
```
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset
return builder_instance.as_streaming_dataset(split=split)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset
raise NotImplementedError(
NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.
```
### Expected behavior
Should stream the dataset as normal.
### Environment info
datasets@main
fsspec==2023.10.0
Thanks for reporting and for the investigation, @ZachNagengast! :hugs:
We are investigating the root cause of the issue. In the meantime, we are going to pin fsspec < 2023.10.0.
|
[
-0.4481064975261688,
-0.09368028491735458,
0.0792476087808609,
0.21370616555213928,
0.2142108976840973,
-0.08358772844076157,
0.07893045991659164,
0.2109934687614441,
-0.11809469759464264,
0.23674732446670532,
-0.02385362982749939,
0.1587570756673813,
-0.07089689373970032,
0.4641270339488983,
0.030599776655435562,
-0.2120533287525177,
0.20528250932693481,
0.1413600742816925,
-0.09850458800792694,
0.20818518102169037,
-0.10977150499820709,
0.32350024580955505,
-0.10636784136295319,
-0.25390559434890747,
-0.04920974373817444,
0.15659931302070618,
-0.12700751423835754,
0.15914340317249298,
-0.10529463738203049,
-0.5379760265350342,
0.37859976291656494,
-0.15242542326450348,
0.2642004191875458,
0.445048451423645,
-0.00011717985762516037,
0.03012099862098694,
0.5292680859565735,
-0.04327937215566635,
-0.18246351182460785,
-0.25471609830856323,
-0.14017514884471893,
-0.26581424474716187,
-0.010397328995168209,
0.23616263270378113,
-0.29423898458480835,
-0.2496078759431839,
0.018354937434196472,
-0.7414262890815735,
0.2996395230293274,
0.361491322517395,
0.19276978075504303,
0.17620810866355896,
-0.015503354370594025,
-0.01132439449429512,
0.2286401391029358,
-0.18591924011707306,
-0.2072773426771164,
-0.19984865188598633,
0.17328166961669922,
-0.1259918361902237,
-0.21155840158462524,
0.1713801473379135,
0.049386098980903625,
0.09911128878593445,
0.3646945655345917,
-0.22645597159862518,
-0.0661938413977623,
-0.34872838854789734,
0.13197894394397736,
0.2498956024646759,
0.6511347889900208,
0.021628526970744133,
-0.5666757822036743,
-0.07337449491024017,
-0.11194062232971191,
-0.5156790614128113,
0.28986623883247375,
0.0392058901488781,
-0.036623984575271606,
0.06702625751495361,
-0.023964205756783485,
-0.06193249300122261,
-0.12389716506004333,
0.18781080842018127,
0.11634375154972076,
-0.09902270138263702,
-0.09841219335794449,
0.004075676202774048,
0.06254418939352036,
-0.1810861974954605,
0.2478204369544983,
-0.2354440689086914,
0.008994463831186295,
0.25633949041366577,
-0.5381748080253601,
0.09521308541297913,
0.11169175803661346,
0.20972216129302979,
-0.22783023118972778,
0.2558906078338623,
-0.11118945479393005,
0.06694905459880829,
-0.13325463235378265,
0.034706518054008484,
0.17961563169956207,
0.20874154567718506,
0.14979709684848785,
0.02267603948712349,
0.12673768401145935,
0.18140919506549835,
-0.04421670734882355,
-0.2154771387577057,
0.06920082122087479,
-0.14855501055717468,
-0.19074112176895142,
0.06294512003660202,
0.20420099794864655,
-0.4562034606933594,
-0.19032137095928192,
0.10434212535619736,
-0.08954225480556488,
0.008001215755939484,
-0.03065246343612671,
0.3371814787387848,
-0.0569920614361763,
0.7201944589614868,
-0.022544147446751595,
0.036609433591365814,
-0.19467364251613617,
-0.25852420926094055,
-0.24080082774162292,
-0.148143470287323,
-0.09926687180995941,
0.27426356077194214,
0.2776365578174591,
-0.7539955377578735,
0.24838712811470032,
-0.2300315946340561,
-0.12315894663333893,
0.06106480211019516,
-0.08282001316547394,
-0.15553410351276398,
0.14905208349227905,
0.4059392213821411,
-0.2690993547439575,
0.10653878003358841,
0.049261800944805145,
0.20331422984600067,
-0.04880329221487045,
0.1407935470342636,
0.005359679460525513,
-0.46842244267463684,
-0.0752759650349617,
0.12910455465316772,
-0.16087058186531067,
-0.18922695517539978,
-0.31781622767448425,
0.12239301204681396,
-0.036822475492954254,
-0.2832764983177185,
-0.08190935105085373,
-0.12345340847969055,
-0.6482996344566345,
-0.12459950149059296,
0.23742038011550903,
0.46119070053100586,
-0.4011027216911316,
-0.16172952950000763,
-0.4000857472419739,
-0.06262128055095673,
0.3654695153236389,
0.19770415127277374,
-0.10084065794944763,
-0.1406775712966919,
-0.17546963691711426,
0.13484317064285278,
-0.014809347689151764,
-0.2658514976501465,
-0.46736398339271545,
0.4737577736377716,
0.025452077388763428,
0.3585646152496338,
0.19723284244537354,
-0.0988256186246872,
0.22997279465198517,
-0.0894671157002449,
0.14708161354064941,
0.26304906606674194,
-0.1363295614719391,
0.05612950772047043,
-0.343150794506073,
-0.37425893545150757,
0.2181311845779419,
0.19448138773441315,
0.17593084275722504,
0.23274379968643188,
0.1263575553894043,
0.03867722302675247,
0.2782338261604309,
0.0007526464760303497,
0.14365747570991516,
0.19707192480564117,
0.6562775373458862,
0.09269620478153229,
0.01606416143476963,
-0.3267597258090973,
-0.38597384095191956,
0.352789968252182,
0.16710114479064941,
-0.11012043058872223,
0.3926183581352234,
-0.006907852366566658,
0.06356898695230484,
-0.05960799753665924,
-0.20157282054424286,
-0.2331734597682953,
0.021631594747304916,
0.2610577940940857,
0.05729148909449577,
-0.03681226447224617,
-0.318146675825119,
0.38029563426971436,
-0.19746965169906616,
-0.1527005285024643,
-0.23747016489505768,
0.32467949390411377,
0.03256857767701149,
-0.2421075999736786,
0.02970031648874283,
0.11256381869316101,
0.33098724484443665,
-0.07007232308387756,
-0.23827794194221497,
0.4196646809577942,
0.3831811845302582,
0.30109772086143494,
-0.2776263654232025,
0.3288062512874603,
0.26196280121803284,
-0.30109137296676636,
-0.0632893517613411,
0.4386153519153595,
0.09080065041780472,
0.017688944935798645,
0.09887664020061493,
0.2152876853942871,
0.14583201706409454,
0.1868031769990921,
0.1419624388217926,
-0.07856744527816772,
0.27211982011795044,
0.1289285570383072,
-0.06727403402328491,
-0.10570856928825378,
0.4331403374671936,
-0.28993335366249084,
0.3198043704032898,
-0.08577162027359009,
-0.2771408259868622,
0.0367279127240181,
0.13600221276283264,
0.06568196415901184,
-0.41874438524246216,
0.1753990352153778,
-0.26399359107017517,
-0.21481037139892578,
0.5820031762123108,
0.2746277451515198,
0.5471715331077576,
0.17380306124687195,
-0.04888511821627617,
0.1920107752084732,
0.22755372524261475,
-0.15382765233516693,
0.24654638767242432,
-0.10607577860355377,
0.0514848530292511,
0.32174059748649597,
0.19875989854335785,
0.1839662343263626,
-0.293350487947464,
-0.028370626270771027,
-0.025915179401636124,
0.1986052542924881,
-0.3188951015472412,
-0.02129777893424034,
-0.411994069814682,
-0.29405611753463745,
-0.19539926946163177,
0.1432795226573944,
0.007648637518286705,
-0.2270699292421341,
-0.11563415825366974,
0.6487444639205933,
-0.13548660278320312,
0.18075871467590332,
-0.21477477252483368,
0.32992106676101685,
-0.055441781878471375,
0.00904406514018774,
-0.2823168635368347,
0.1805250346660614,
-0.30060362815856934,
0.014543876051902771,
0.35018619894981384,
-0.17744091153144836,
0.0654614195227623,
0.07578500360250473,
-0.03270673379302025,
-0.4598594009876251,
-0.27600136399269104,
0.13882482051849365,
0.03889545798301697,
0.36923813819885254,
-0.10206854343414307,
0.08538493514060974,
0.2418876439332962,
-0.164972186088562,
0.034642115235328674,
-0.5426012277603149,
-0.22517715394496918,
0.03899344801902771,
-0.113202765583992,
0.15868818759918213,
-0.16915933787822723,
-0.32661405205726624,
-0.33324888348579407,
-0.4784361720085144,
0.31075626611709595,
-0.19436131417751312,
0.055772263556718826,
0.30806219577789307,
-0.024751823395490646,
-0.05133427679538727,
-0.059807103127241135,
-0.25092294812202454,
-0.21003322303295135,
-0.3666454255580902,
0.14064322412014008,
-0.21470683813095093,
-0.48748961091041565,
0.07320940494537354,
0.2712942361831665,
-0.10788051784038544,
0.11282172054052353,
-0.4023776054382324,
0.05290349945425987,
-0.2340613156557083,
0.06111351028084755,
-0.05404556542634964,
-0.21733537316322327,
0.34337523579597473,
-0.12126802653074265,
-0.06564437597990036,
-0.22911983728408813,
-0.2058636099100113,
-0.050054438412189484,
0.2859986126422882,
0.21852418780326843,
0.03163498267531395,
0.21160969138145447,
0.1581740379333496,
0.6121025085449219,
0.40861526131629944,
-0.10076978802680969,
0.6090869903564453,
0.08904765546321869,
0.3264872431755066,
-0.2796611487865448,
-0.15081612765789032,
-0.039126843214035034,
-0.13491708040237427,
-0.16232118010520935,
0.21750983595848083,
0.1604907512664795,
-0.275726318359375,
-0.12557879090309143,
0.0947350263595581,
-0.013816632330417633,
-0.003595113754272461,
0.011488324962556362,
-0.35857272148132324,
0.36656454205513,
-0.005340373143553734,
0.11151797324419022,
0.08630383014678955,
-0.2853054404258728,
0.0463113971054554,
0.22402320802211761,
0.29603585600852966,
0.10694057494401932,
-0.04518836364150047,
-0.12386362254619598,
-0.5207449793815613,
0.16186948120594025,
0.15514446794986725,
0.6686159372329712,
-0.39034706354141235,
-0.11512670665979385,
0.04494338855147362,
-0.017942123115062714,
0.19394201040267944,
-0.39833056926727295,
0.23807482421398163,
0.2657560408115387,
-0.13215643167495728,
-0.14094063639640808,
-0.17959488928318024,
0.07564330101013184,
-0.07350382953882217,
-0.05545790120959282,
0.533502459526062,
-0.01427718997001648,
-0.18681438267230988,
-0.11485493183135986,
0.03471076861023903,
-0.06382474303245544,
-0.11586005240678787,
-0.17804251611232758,
0.007478527724742889,
-0.03262704610824585,
-0.13540810346603394,
-0.1451053023338318,
0.2125186324119568,
-0.2928510308265686,
0.16180075705051422,
-0.04337350279092789,
0.14978298544883728,
-0.016565680503845215,
-0.16332197189331055,
0.2214471697807312,
0.02193589322268963,
0.3855104446411133,
0.37612080574035645,
0.012678496539592743,
0.32532113790512085,
0.44463470578193665,
0.04827224090695381,
-0.3256426453590393,
0.19858255982398987,
0.2907971143722534,
0.02991402894258499,
0.335754930973053,
-0.2345953732728958,
0.07568641006946564,
0.28958603739738464,
-0.06309452652931213,
-0.22238582372665405,
0.11534520238637924,
0.13815999031066895,
0.027695585042238235,
-0.018305528908967972,
-0.4932403862476349,
0.3760910928249359,
0.03061683475971222,
0.03045184165239334,
0.3892592191696167,
-0.014256447553634644,
-0.08527922630310059,
0.39624452590942383,
-0.15569716691970825,
0.681255578994751,
-0.033539630472660065,
0.13979746401309967,
0.17583152651786804,
-0.06852833926677704,
0.08221358805894852,
-0.22233846783638,
0.15540556609630585,
-0.21283818781375885,
-0.2860966920852661,
-0.07560211420059204,
-0.036817099899053574,
0.42900851368904114,
-0.18704897165298462,
-0.048340555280447006,
0.46983346343040466,
0.16236050426959991,
0.36554399132728577,
0.14681315422058105,
0.2230502963066101,
-0.1298019289970398,
-0.13462935388088226,
-0.41470518708229065,
0.20618553459644318,
-0.03623349219560623,
0.2717505693435669,
-0.002169880084693432,
-0.0592065155506134,
0.17179381847381592,
0.021124277263879776,
-0.5300593376159668,
0.303689569234848,
-0.39363330602645874,
0.1001824364066124,
-0.26255813241004944,
-0.0942007452249527,
0.012726951390504837,
0.21763207018375397,
-0.15313124656677246,
-0.21277908980846405,
-0.3985857665538788,
0.1640102118253708,
0.1208304837346077,
0.13100257515907288,
-0.05977843701839447,
-0.17399825155735016,
0.3024156987667084,
-0.19832772016525269,
-0.14264900982379913,
-0.02687598019838333,
-0.3039490878582001,
-0.46889638900756836,
0.3855571150779724,
-0.08763504028320312,
0.32636141777038574,
0.034459397196769714,
-0.061818890273571014,
0.10973631590604782,
0.1008547991514206,
-0.12744103372097015,
0.13925667107105255,
-0.015359900891780853,
-0.220648393034935,
-0.1625233292579651,
-0.09961967170238495,
-0.1248006820678711,
-0.08300216495990753,
0.6202813982963562,
-0.17919087409973145,
0.13719137012958527,
0.4982375204563141,
0.044650908559560776,
-0.1421886384487152,
-0.0878608375787735,
-0.08959361910820007,
-0.020607393234968185,
-0.08843790739774704,
-0.11872807890176773,
-0.11232874542474747,
0.04227812588214874,
0.06466227769851685,
0.5600361824035645,
0.16618366539478302,
-0.16493508219718933,
-0.2331947386264801,
-0.23228928446769714,
-0.23574748635292053,
0.05413854867219925,
-0.2945277988910675,
0.20385028421878815,
-0.1763593554496765,
0.08117854595184326,
-0.07393432408571243,
-0.057921767234802246,
-0.27326780557632446,
0.1434735357761383,
0.11949228495359421,
0.02876349538564682,
0.16056208312511444,
0.03069021739065647,
0.39425209164619446,
-0.12866145372390747,
0.01943976618349552,
0.13743598759174347,
-0.3323943614959717,
-0.14230209589004517,
-0.026975521817803383,
0.15015867352485657,
0.4226613938808441,
-0.2916015386581421,
-0.22371606528759003,
-0.2126709669828415,
-0.16223187744617462,
-0.06524991989135742,
0.04577324911952019,
0.34721049666404724,
-0.16957031190395355,
0.1353457123041153,
0.20138508081436157,
0.195781409740448,
-0.016687018796801567,
0.2887618839740753,
-0.054869502782821655,
0.21661286056041718,
-0.03735019266605377,
0.16811156272888184,
0.05744234099984169,
0.021043062210083008,
0.05100608617067337,
-0.08824007958173752,
0.1306525468826294,
0.2455502152442932,
0.34189143776893616,
-0.3434305191040039,
0.010284006595611572,
0.1387091428041458,
0.3268251419067383,
0.21526090800762177,
-0.00464502302929759,
0.003456365317106247,
0.2455144226551056,
0.1931445300579071,
-0.08930003643035889,
-0.07400763779878616,
0.09457392990589142,
0.06700944900512695,
-0.038007158786058426,
-0.18675807118415833,
0.5294876098632812,
-0.17198142409324646,
0.2498406320810318,
0.1361517608165741,
0.12763604521751404,
-0.09083393961191177,
0.3801157474517822,
0.03961467370390892,
0.17443498969078064,
0.19033081829547882,
-0.005909096449613571,
-0.14465640485286713,
0.026941001415252686,
0.3325701355934143,
0.10928139090538025,
0.26192915439605713,
0.030660193413496017,
0.12001384794712067,
-0.1438390612602234,
-0.8715801239013672,
0.110541433095932,
0.07804901897907257,
-0.2126237452030182,
0.1532343029975891,
-0.001099713146686554,
0.5114277005195618,
-0.273600697517395,
-0.22850021719932556,
-0.17526504397392273,
0.038936033844947815,
-0.16010522842407227,
-0.22340045869350433,
0.15792176127433777,
0.009208403527736664,
-0.02987583354115486,
0.2171662449836731,
-0.020611930638551712,
0.1299961358308792,
0.5386735200881958,
0.058648861944675446,
-0.2791960835456848,
-0.16967657208442688,
-0.34121185541152954,
0.321721613407135,
0.30094197392463684,
-0.14973390102386475,
0.4530045688152313,
-0.1323489248752594,
-0.15224942564964294,
0.18769535422325134,
0.20093359053134918,
0.28053995966911316,
0.19235464930534363,
-0.003806889057159424,
0.06228790804743767,
0.10854712128639221,
0.06309375166893005,
0.14529426395893097,
0.3810763955116272,
-0.031358882784843445,
0.2907739579677582,
0.29922235012054443,
0.08813795447349548,
-0.09856146574020386,
0.15089021623134613,
-0.13164818286895752,
0.33775654435157776,
-0.43338871002197266,
0.21194523572921753,
-0.04282226413488388,
0.1291128396987915,
-0.06526844948530197,
0.12320684641599655,
-0.21209603548049927,
0.1028158962726593,
0.510988175868988,
-0.00437433086335659,
0.22356197237968445,
0.01804988831281662,
0.07624407112598419,
-0.09785081446170807,
0.21768131852149963,
0.41954505443573,
-0.11579257994890213,
-0.2304246872663498,
-0.33900630474090576,
-0.5693967938423157,
0.10585082322359085,
-0.012432396411895752,
0.3593863844871521,
-0.050462834537029266,
0.24152405560016632,
-0.03811173886060715,
-0.02849017083644867,
-0.15320904552936554,
-0.15580426156520844,
-0.014123990200459957,
0.20215633511543274,
-0.30335596203804016,
0.050290219485759735,
0.09074492007493973,
0.07453463226556778,
-0.07675375044345856,
-0.5045340657234192,
0.06027437001466751,
-0.025225065648555756,
0.021903641521930695,
0.1441737860441208,
-0.3332301080226898,
-0.07865612953901291,
-0.40177303552627563,
0.33821311593055725,
0.036893703043460846,
0.27172785997390747,
-0.09218588471412659,
-0.29075855016708374,
-0.46474528312683105,
-0.2807249426841736,
-0.23144720494747162,
-0.08977898210287094,
-0.3734707236289978,
0.637423038482666,
-0.1713240146636963,
0.21968001127243042,
-0.4958662986755371,
0.27155375480651855,
-0.10435913503170013,
-0.24061346054077148,
-0.32071438431739807,
0.2502628564834595,
-0.34133392572402954,
0.1953936219215393,
-0.0866299644112587,
0.26449424028396606,
-0.06342774629592896,
0.03638678789138794,
-0.3488301634788513,
-0.20753243565559387,
0.5230141282081604,
-0.7888439893722534,
0.004226792603731155,
-0.07547013461589813,
0.22629046440124512,
0.4372994601726532,
-0.14003756642341614,
-0.4345302879810333,
0.07154693454504013,
0.2432074397802353,
-0.08722960203886032,
0.0631214827299118,
0.10054360330104828,
-0.24087586998939514,
0.09747005999088287,
-0.10897660255432129,
0.3781317472457886,
0.09869258850812912,
-0.05309608578681946,
0.1793471872806549,
-0.324471116065979
] |
https://github.com/huggingface/datasets/issues/6330
|
Latest fsspec==2023.10.0 issue with streaming datasets
|
You can also update `datasets`:
```
pip install -U datasets
```
It will also update `fsspec` to use the right version
|
### Describe the bug
Loading a streaming dataset with this version of fsspec fails with the following error:
`NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.`
I suspect the issue is with this PR
https://github.com/fsspec/filesystem_spec/pull/1381
### Steps to reproduce the bug
1. Upgrade fsspec to version `2023.10.0`
2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)`
3. Observe the following exception:
```
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset
return builder_instance.as_streaming_dataset(split=split)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset
raise NotImplementedError(
NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.
```
### Expected behavior
Should stream the dataset as normal.
### Environment info
datasets@main
fsspec==2023.10.0
| 21
|
Latest fsspec==2023.10.0 issue with streaming datasets
### Describe the bug
Loading a streaming dataset with this version of fsspec fails with the following error:
`NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.`
I suspect the issue is with this PR
https://github.com/fsspec/filesystem_spec/pull/1381
### Steps to reproduce the bug
1. Upgrade fsspec to version `2023.10.0`
2. Attempt to load a streaming dataset e.g. `load_dataset("laion/gpt4v-emotion-dataset", split="train", streaming=True)`
3. Observe the following exception:
```
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/load.py", line 2146, in load_dataset
return builder_instance.as_streaming_dataset(split=split)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/datasets/builder.py", line 1318, in as_streaming_dataset
raise NotImplementedError(
NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet.
```
### Expected behavior
Should stream the dataset as normal.
### Environment info
datasets@main
fsspec==2023.10.0
You can also update `datasets`:
```
pip install -U datasets
```
It will also update `fsspec` to use the right version
|
[
-0.48434939980506897,
-0.09176091849803925,
0.06091989204287529,
0.20084676146507263,
0.20000620186328888,
-0.06782553344964981,
0.0504738949239254,
0.21000048518180847,
-0.08580006659030914,
0.21352165937423706,
-0.019064806401729584,
0.21504388749599457,
-0.0560278594493866,
0.46829548478126526,
0.01426059938967228,
-0.2275453805923462,
0.2069287896156311,
0.1467083990573883,
-0.12188835442066193,
0.19807620346546173,
-0.07931636273860931,
0.3374628722667694,
-0.08738114684820175,
-0.23393653333187103,
-0.00830209068953991,
0.12171326577663422,
-0.08224251121282578,
0.12612244486808777,
-0.15082517266273499,
-0.5611509680747986,
0.3609999120235443,
-0.14829058945178986,
0.2624996304512024,
0.47979867458343506,
-0.00011638276191661134,
0.03299196809530258,
0.5327134728431702,
-0.03815517947077751,
-0.17427945137023926,
-0.3119879961013794,
-0.12277814745903015,
-0.34161943197250366,
-0.01917264610528946,
0.2122153341770172,
-0.266926109790802,
-0.23179782927036285,
0.033386364579200745,
-0.72945636510849,
0.3241208791732788,
0.38108935952186584,
0.20282098650932312,
0.1785626858472824,
0.03204463794827461,
-0.013155926950275898,
0.24900954961776733,
-0.22789029777050018,
-0.21725080907344818,
-0.19350355863571167,
0.15472093224525452,
-0.103680819272995,
-0.13277634978294373,
0.21610210835933685,
0.026081165298819542,
0.11416597664356232,
0.36258286237716675,
-0.22951741516590118,
-0.027681253850460052,
-0.36638447642326355,
0.12649503350257874,
0.23457247018814087,
0.6261739730834961,
-0.004189729690551758,
-0.60164475440979,
-0.06839130818843842,
-0.10616862773895264,
-0.5109714269638062,
0.26095402240753174,
0.05881636589765549,
-0.052969906479120255,
0.07493066042661667,
-0.0018300320953130722,
-0.098194919526577,
-0.11586940288543701,
0.19629910588264465,
0.09648594260215759,
-0.06702177226543427,
-0.11224314570426941,
0.008326418697834015,
0.08715982735157013,
-0.20237891376018524,
0.25457969307899475,
-0.2061663120985031,
0.005898021161556244,
0.26848021149635315,
-0.5066985487937927,
0.11614006757736206,
0.12498465180397034,
0.2278164029121399,
-0.2341558337211609,
0.25438058376312256,
-0.11619681119918823,
0.051047373563051224,
-0.12415918707847595,
0.04174090549349785,
0.18522264063358307,
0.1997588574886322,
0.11614933609962463,
0.06573545187711716,
0.13450534641742706,
0.18949772417545319,
-0.010664448142051697,
-0.20517542958259583,
0.06072257459163666,
-0.18076716363430023,
-0.2026614546775818,
0.06978511810302734,
0.2145053595304489,
-0.4332762658596039,
-0.21050401031970978,
0.08306672424077988,
-0.02956794947385788,
0.0012317188084125519,
-0.04949602112174034,
0.33196431398391724,
-0.09278899431228638,
0.7111824750900269,
-0.01559518463909626,
0.03193807229399681,
-0.22314779460430145,
-0.229379802942276,
-0.23675908148288727,
-0.1315421164035797,
-0.06570443511009216,
0.2206522673368454,
0.2628996670246124,
-0.7786654233932495,
0.3073540925979614,
-0.24338063597679138,
-0.14449559152126312,
0.08432236313819885,
-0.09584063291549683,
-0.16751953959465027,
0.09208399057388306,
0.43110552430152893,
-0.2431008666753769,
0.11871402710676193,
0.055192504078149796,
0.18070253729820251,
-0.06291739642620087,
0.1338038295507431,
-0.012817226350307465,
-0.4533947706222534,
-0.09431034326553345,
0.12886498868465424,
-0.14095841348171234,
-0.1997484713792801,
-0.34960657358169556,
0.08486239612102509,
-0.012570858001708984,
-0.31329819560050964,
-0.11683622747659683,
-0.15684115886688232,
-0.6000066995620728,
-0.12747003138065338,
0.2437470555305481,
0.41697144508361816,
-0.38561108708381653,
-0.168668732047081,
-0.4219045042991638,
-0.05335994437336922,
0.3705429136753082,
0.19497790932655334,
-0.06980491429567337,
-0.09976089745759964,
-0.14242662489414215,
0.09836693108081818,
0.04534781724214554,
-0.3307367265224457,
-0.4911247193813324,
0.44568705558776855,
0.059460967779159546,
0.33310920000076294,
0.1944674253463745,
-0.10505934804677963,
0.2504766583442688,
-0.053153589367866516,
0.13871558010578156,
0.22443759441375732,
-0.13498784601688385,
0.03599376231431961,
-0.33714327216148376,
-0.3769383728504181,
0.2079826146364212,
0.20854151248931885,
0.17991484701633453,
0.1892741471529007,
0.1188453882932663,
0.038602154701948166,
0.2675636410713196,
0.022395599633455276,
0.1270141303539276,
0.2157486379146576,
0.6736180186271667,
0.11331604421138763,
-0.005984198767691851,
-0.34542909264564514,
-0.3433070182800293,
0.3310132920742035,
0.14497146010398865,
-0.10992954671382904,
0.32332462072372437,
-0.0073811933398246765,
0.020919252187013626,
-0.07296766340732574,
-0.17836683988571167,
-0.23288121819496155,
0.03320104628801346,
0.2597074806690216,
0.08248551189899445,
-0.037355002015829086,
-0.30247658491134644,
0.39727896451950073,
-0.1756981462240219,
-0.1316194385290146,
-0.24570514261722565,
0.30878517031669617,
-0.0241605993360281,
-0.24902644753456116,
0.04083864390850067,
0.13262294232845306,
0.32461273670196533,
-0.08094991743564606,
-0.22040319442749023,
0.449195921421051,
0.3725852966308594,
0.2739417552947998,
-0.28873592615127563,
0.31299591064453125,
0.2712651491165161,
-0.2745750844478607,
-0.0640365481376648,
0.45190736651420593,
0.07069814205169678,
0.06603135913610458,
0.1062280461192131,
0.16395768523216248,
0.0977373868227005,
0.17251968383789062,
0.14133845269680023,
-0.05209486186504364,
0.29097238183021545,
0.1722436398267746,
-0.07540909945964813,
-0.10448713600635529,
0.43169039487838745,
-0.2811266779899597,
0.3274766206741333,
-0.13073663413524628,
-0.24711062014102936,
0.03454314172267914,
0.135903000831604,
0.1042008101940155,
-0.4068923592567444,
0.13648606836795807,
-0.2413678765296936,
-0.18709692358970642,
0.5593334436416626,
0.2894764542579651,
0.5281252861022949,
0.19117039442062378,
-0.059604380279779434,
0.19632385671138763,
0.19625863432884216,
-0.1194969043135643,
0.23699849843978882,
-0.10763631761074066,
0.018940996378660202,
0.3229502737522125,
0.17694847285747528,
0.17756587266921997,
-0.24561023712158203,
-0.042363185435533524,
-0.05729135125875473,
0.22189846634864807,
-0.3009710907936096,
-0.018809849396348,
-0.40741458535194397,
-0.27139636874198914,
-0.19053804874420166,
0.13404054939746857,
0.020260140299797058,
-0.2312421351671219,
-0.11827614903450012,
0.6601524949073792,
-0.11968427896499634,
0.20934216678142548,
-0.21015310287475586,
0.28625786304473877,
-0.034158822149038315,
0.0024387240409851074,
-0.2495010793209076,
0.14663757383823395,
-0.311733603477478,
0.009439639747142792,
0.3208412230014801,
-0.14425337314605713,
0.08425237238407135,
0.01200312189757824,
-0.03568381443619728,
-0.4724879860877991,
-0.2716558575630188,
0.14659598469734192,
-0.002852868288755417,
0.4225029945373535,
-0.05313649773597717,
0.10581924766302109,
0.2416965514421463,
-0.13915666937828064,
0.05093224719166756,
-0.5317234396934509,
-0.1908866912126541,
0.006961869075894356,
-0.11717157810926437,
0.12028462439775467,
-0.16135428845882416,
-0.36231565475463867,
-0.3695668578147888,
-0.4934800863265991,
0.29257118701934814,
-0.15399688482284546,
0.05355047062039375,
0.29699966311454773,
0.022784147411584854,
-0.06554978340864182,
-0.05146254971623421,
-0.226796492934227,
-0.19710473716259003,
-0.35162124037742615,
0.16727690398693085,
-0.23687216639518738,
-0.4960741698741913,
0.09047870337963104,
0.2829660177230835,
-0.05247599259018898,
0.09429007023572922,
-0.4154852032661438,
0.01806483417749405,
-0.23156918585300446,
0.08669565618038177,
-0.06081085652112961,
-0.1314435601234436,
0.3550574481487274,
-0.10784664005041122,
-0.06305311620235443,
-0.2483643889427185,
-0.19691939651966095,
-0.07183166593313217,
0.2531633675098419,
0.24173030257225037,
0.03946898132562637,
0.22938990592956543,
0.15384280681610107,
0.6342645287513733,
0.4387088119983673,
-0.0873495489358902,
0.5622293949127197,
0.049966104328632355,
0.35645413398742676,
-0.2557432949542999,
-0.1799813210964203,
-0.06480877846479416,
-0.1358565390110016,
-0.1425405889749527,
0.2037343680858612,
0.16135931015014648,
-0.25017574429512024,
-0.13899244368076324,
0.12977342307567596,
-0.031425051391124725,
-0.010813221335411072,
-0.02446896769106388,
-0.3494739532470703,
0.40684905648231506,
0.03366706147789955,
0.12377246469259262,
0.03967805951833725,
-0.26605311036109924,
0.05992498621344566,
0.21560226380825043,
0.24203303456306458,
0.14081008732318878,
-0.041808534413576126,
-0.17592892050743103,
-0.5400555729866028,
0.16463394463062286,
0.15419717133045197,
0.654944121837616,
-0.3581656515598297,
-0.08803912997245789,
0.019901618361473083,
-0.022850865498185158,
0.17890621721744537,
-0.4168698787689209,
0.21536032855510712,
0.25737789273262024,
-0.08378936350345612,
-0.19902336597442627,
-0.19502241909503937,
0.06294286251068115,
-0.07021140307188034,
-0.05180336907505989,
0.5207066535949707,
-0.0672919973731041,
-0.19736531376838684,
-0.0751064270734787,
0.04092327132821083,
-0.04690905660390854,
-0.056922003626823425,
-0.20053941011428833,
-0.03954095393419266,
-0.054819367825984955,
-0.14798954129219055,
-0.12880924344062805,
0.2230563759803772,
-0.26121896505355835,
0.1967054009437561,
-0.0351889431476593,
0.15884137153625488,
-0.01623600721359253,
-0.12069535255432129,
0.2705780267715454,
0.0012533987173810601,
0.3630926311016083,
0.36944711208343506,
-0.008918724954128265,
0.31367260217666626,
0.5019347071647644,
0.03622275963425636,
-0.3438158333301544,
0.14789023995399475,
0.28842049837112427,
0.003992140293121338,
0.2871699929237366,
-0.23790790140628815,
0.04561690241098404,
0.2803044617176056,
-0.04522907733917236,
-0.17606595158576965,
0.1443781554698944,
0.17107342183589935,
0.04676166549324989,
-0.016234615817666054,
-0.5176827907562256,
0.3778853118419647,
0.07042042911052704,
0.04129154980182648,
0.37593257427215576,
-0.0007540807127952576,
-0.08480141311883926,
0.38309961557388306,
-0.17845618724822998,
0.664103627204895,
0.0006959997117519379,
0.1447106897830963,
0.20346403121948242,
-0.09640322625637054,
0.08080442249774933,
-0.24885517358779907,
0.13032448291778564,
-0.19441665709018707,
-0.2568717300891876,
-0.07121419906616211,
-0.00838053971529007,
0.4140809178352356,
-0.19181887805461884,
-0.0831911712884903,
0.4990561306476593,
0.2110561579465866,
0.35804516077041626,
0.13491013646125793,
0.20853030681610107,
-0.14199426770210266,
-0.12080129981040955,
-0.4183426797389984,
0.21601909399032593,
-0.0443296879529953,
0.27215883135795593,
-0.015869595110416412,
-0.04557458311319351,
0.14259061217308044,
-0.012724921107292175,
-0.5357615351676941,
0.24940752983093262,
-0.41914188861846924,
0.12001439929008484,
-0.2700762152671814,
-0.10815088450908661,
-0.0147579126060009,
0.21277908980846405,
-0.1381281316280365,
-0.16293880343437195,
-0.3875996172428131,
0.1637248992919922,
0.10342123359441757,
0.0860956683754921,
-0.04425175115466118,
-0.12715046107769012,
0.2539950907230377,
-0.20424431562423706,
-0.14001689851284027,
-0.004493109881877899,
-0.3360659182071686,
-0.4340686798095703,
0.4171179533004761,
-0.08449038863182068,
0.28456342220306396,
0.03144257515668869,
-0.06063733249902725,
0.10800334811210632,
0.12835544347763062,
-0.12904240190982819,
0.14460186660289764,
-0.0066967979073524475,
-0.21911384165287018,
-0.1072346642613411,
-0.1063297688961029,
-0.12250053137540817,
-0.09998209774494171,
0.5863713622093201,
-0.2058652639389038,
0.13697375357151031,
0.510379433631897,
0.017498847097158432,
-0.1450987309217453,
-0.08264459669589996,
-0.10687505453824997,
-0.0757959634065628,
-0.08356555551290512,
-0.10185084491968155,
-0.1271882802248001,
0.016753971576690674,
0.06717021018266678,
0.5787920951843262,
0.1953844577074051,
-0.16394543647766113,
-0.20844899117946625,
-0.22120973467826843,
-0.22493876516819,
0.1034310981631279,
-0.2695174217224121,
0.2049768716096878,
-0.1410350203514099,
0.07682373374700546,
-0.10120542347431183,
-0.08027754724025726,
-0.27826499938964844,
0.13722749054431915,
0.1240379735827446,
0.05447409301996231,
0.18616358935832977,
0.04077325761318207,
0.3606901466846466,
-0.13104233145713806,
0.030487844720482826,
0.12102752178907394,
-0.3527044355869293,
-0.15934574604034424,
-0.043529003858566284,
0.14188523590564728,
0.407366544008255,
-0.2963578402996063,
-0.17948104441165924,
-0.2068241685628891,
-0.16488200426101685,
-0.07397475838661194,
0.05428021773695946,
0.3404964506626129,
-0.15558356046676636,
0.1612233966588974,
0.1859269142150879,
0.18741731345653534,
0.016859591007232666,
0.3008526861667633,
-0.05331096053123474,
0.20659521222114563,
-0.025105314329266548,
0.2212950736284256,
0.07987010478973389,
0.01782441884279251,
0.05425586923956871,
-0.10385356098413467,
0.16306132078170776,
0.24225810170173645,
0.36088377237319946,
-0.3766626715660095,
0.06281587481498718,
0.1658245474100113,
0.3302852511405945,
0.24566197395324707,
-0.010344907641410828,
0.0011590216308832169,
0.2573107182979584,
0.2019129991531372,
-0.1252080500125885,
-0.06097748503088951,
0.06765540689229965,
0.05428043752908707,
0.0005431883037090302,
-0.18021953105926514,
0.534543514251709,
-0.14798656105995178,
0.2515915632247925,
0.151028573513031,
0.14971555769443512,
-0.09784050285816193,
0.3993592858314514,
0.050904445350170135,
0.17473119497299194,
0.1729881763458252,
-0.028723614290356636,
-0.14771738648414612,
-0.0004672929644584656,
0.36958014965057373,
0.08880352973937988,
0.2419622242450714,
0.06924870610237122,
0.12495648860931396,
-0.16433146595954895,
-0.8224498629570007,
0.0668105036020279,
0.01891222596168518,
-0.20032352209091187,
0.13611339032649994,
0.014907948672771454,
0.494897723197937,
-0.2904031276702881,
-0.24224846065044403,
-0.1831466406583786,
0.04573170095682144,
-0.14913839101791382,
-0.25988155603408813,
0.16050347685813904,
0.01297256350517273,
-0.03673017397522926,
0.20114608108997345,
0.003151834011077881,
0.11056965589523315,
0.4917909801006317,
0.062170710414648056,
-0.27314329147338867,
-0.22311656177043915,
-0.33273929357528687,
0.30642035603523254,
0.28858840465545654,
-0.13396956026554108,
0.4702191650867462,
-0.11429394781589508,
-0.18707910180091858,
0.1386203169822693,
0.23581193387508392,
0.3443240821361542,
0.18243248760700226,
-0.0034477990120649338,
0.041754819452762604,
0.07623803615570068,
0.0616072341799736,
0.13459816575050354,
0.36373040080070496,
-0.03715328872203827,
0.2974908649921417,
0.2836376428604126,
0.09611808508634567,
-0.10789430141448975,
0.13000807166099548,
-0.1551811695098877,
0.31281962990760803,
-0.4316987693309784,
0.2356044352054596,
-0.07869412004947662,
0.13283276557922363,
-0.07232962548732758,
0.11971090734004974,
-0.24535128474235535,
0.12442485988140106,
0.5188129544258118,
0.036980707198381424,
0.2159774899482727,
-0.003756728721782565,
0.07962807267904282,
-0.10739974677562714,
0.21122896671295166,
0.42129889130592346,
-0.06388592720031738,
-0.21458710730075836,
-0.3451031446456909,
-0.5765061378479004,
0.07741667330265045,
-0.06921912729740143,
0.30685824155807495,
-0.05920500308275223,
0.2123812586069107,
-0.052576519548892975,
0.004055492579936981,
-0.10255968570709229,
-0.16747651994228363,
0.007930711843073368,
0.22782456874847412,
-0.29004189372062683,
0.03841637074947357,
0.034920383244752884,
0.09043782949447632,
-0.04988373816013336,
-0.5028574466705322,
0.021496064960956573,
-0.034681156277656555,
0.029903709888458252,
0.14667783677577972,
-0.33575013279914856,
-0.07527300715446472,
-0.44175201654434204,
0.33504006266593933,
0.036485057324171066,
0.27226555347442627,
-0.080730140209198,
-0.30225324630737305,
-0.5049740076065063,
-0.27822113037109375,
-0.2524551749229431,
-0.044889383018016815,
-0.36788490414619446,
0.6341798305511475,
-0.1988343894481659,
0.19018961489200592,
-0.4963188171386719,
0.29186204075813293,
-0.08506935834884644,
-0.2568771541118622,
-0.3006387948989868,
0.22680604457855225,
-0.3037009537220001,
0.19626696407794952,
-0.09957718849182129,
0.2399706244468689,
-0.07001729309558868,
0.07189040631055832,
-0.3382677733898163,
-0.22462089359760284,
0.5286164283752441,
-0.777539849281311,
0.001258833333849907,
-0.06544947624206543,
0.21954874694347382,
0.4489217698574066,
-0.16143526136875153,
-0.4303598701953888,
0.08905652910470963,
0.2265596091747284,
-0.10673920065164566,
0.055695790797472,
0.09234166145324707,
-0.2220340520143509,
0.10242001712322235,
-0.10408073663711548,
0.40958651900291443,
0.06279459595680237,
-0.061188988387584686,
0.18695470690727234,
-0.3115338087081909
] |
https://github.com/huggingface/datasets/issues/6327
|
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)`
|
You can clone the `togethercomputer/RedPajama-Data-1T-Sample` repo and load the dataset with `load_dataset("path/to/cloned_repo")` to use it offline.
|
### Describe the bug
Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs.
### Steps to reproduce the bug
I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process.
So I try the following code to load the files streamingly
```py
dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True)
print(next(iter(dataset['train'])))
```
Sadly, it raises the following:
```
FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl'
```
I've noticed that the dataset can be properly found in the begining
```
Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub.
```
But it seems that the paths couldn't be properly parsed when loading iteratively.
How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works.
Thanks.
### Expected behavior
Properly load the dataset.
### Environment info
`datasets==2.14.5`
| 16
|
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)`
### Describe the bug
Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs.
### Steps to reproduce the bug
I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process.
So I try the following code to load the files streamingly
```py
dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True)
print(next(iter(dataset['train'])))
```
Sadly, it raises the following:
```
FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl'
```
I've noticed that the dataset can be properly found in the begining
```
Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub.
```
But it seems that the paths couldn't be properly parsed when loading iteratively.
How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works.
Thanks.
### Expected behavior
Properly load the dataset.
### Environment info
`datasets==2.14.5`
You can clone the `togethercomputer/RedPajama-Data-1T-Sample` repo and load the dataset with `load_dataset("path/to/cloned_repo")` to use it offline.
|
[
-0.3336906135082245,
-0.10643303394317627,
0.10457676649093628,
0.33565467596054077,
0.19966669380664825,
0.007022768259048462,
0.2094419002532959,
0.368282288312912,
0.07302562892436981,
0.0012070611119270325,
0.15766353905200958,
0.28006258606910706,
-0.20167630910873413,
-0.12300232797861099,
-0.02176419273018837,
-0.05131082236766815,
-0.08652570098638535,
0.1781945675611496,
-0.11513178050518036,
0.019068822264671326,
-0.10091903060674667,
0.2891966700553894,
-0.2755325734615326,
0.03725209832191467,
-0.08573544025421143,
-0.012144820764660835,
-0.091254323720932,
0.4832437336444855,
-0.023501107469201088,
-0.13152624666690826,
0.2138756513595581,
-0.0639849603176117,
0.195752814412117,
0.6028720736503601,
-0.00012228496780153364,
0.13889160752296448,
0.17505501210689545,
-0.3115907311439514,
-0.31969156861305237,
-0.5971413254737854,
-0.32240521907806396,
0.0015993937849998474,
0.05095220357179642,
-0.2196466475725174,
-0.1528456211090088,
-0.2498973160982132,
0.23846207559108734,
-0.25828614830970764,
0.4575362205505371,
0.23508842289447784,
0.04524993896484375,
0.14384478330612183,
0.09258528053760529,
0.07430335134267807,
-0.09207115322351456,
0.1847440004348755,
0.009927758947014809,
0.3621397018432617,
0.04767438769340515,
-0.09468772262334824,
-0.0632302388548851,
0.3260413706302643,
-0.22990861535072327,
0.014307957142591476,
0.3235873878002167,
0.08275055885314941,
-0.2320203185081482,
-0.31658169627189636,
0.005494892597198486,
0.3365730047225952,
0.3807314932346344,
-0.2738989293575287,
-0.44493308663368225,
-0.39771294593811035,
-0.021598920226097107,
-0.33489009737968445,
0.2835215926170349,
0.28766384720802307,
-0.2329983115196228,
0.142733633518219,
0.13661569356918335,
-0.3033113479614258,
-0.32885032892227173,
0.20271660387516022,
0.2146238386631012,
-0.06291739642620087,
-0.0894014835357666,
0.09051105380058289,
0.05999752879142761,
0.08636754751205444,
-0.23062480986118317,
0.002510892227292061,
0.0971575528383255,
0.25360167026519775,
-0.14607945084571838,
0.2123522162437439,
0.10537651926279068,
-0.14665722846984863,
0.09645579010248184,
0.040298942476511,
0.4106346368789673,
-0.09874279052019119,
-0.1957978755235672,
0.1957198977470398,
0.2093256413936615,
0.1970551311969757,
-0.012553185224533081,
0.0451061874628067,
0.32586753368377686,
0.5235635042190552,
-0.16075582802295685,
-0.05495375394821167,
-0.212057963013649,
-0.11257404088973999,
-0.18779516220092773,
-0.04812183976173401,
0.4310510754585266,
-0.18517640233039856,
-0.32417789101600647,
-0.13683387637138367,
-0.10603727400302887,
-0.028096618130803108,
0.1077643632888794,
0.44151976704597473,
-0.0730370357632637,
0.07470061630010605,
0.16567778587341309,
0.23556697368621826,
-0.2351270616054535,
-0.23924857378005981,
-0.11603018641471863,
0.1837349534034729,
-0.22281812131404877,
0.05074597895145416,
0.11681534349918365,
-0.35088273882865906,
0.46432554721832275,
-0.18008343875408173,
0.08004700392484665,
-0.2292407900094986,
0.018105773255228996,
-0.1145787239074707,
0.1503714919090271,
0.2676357626914978,
-0.04918801411986351,
0.10592765361070633,
0.2911432981491089,
-0.0329541340470314,
-0.028417564928531647,
0.19940173625946045,
-0.3968588709831238,
-0.3107830286026001,
0.2637968063354492,
0.0010867835953831673,
-0.4941900968551636,
0.05797472596168518,
-0.28764796257019043,
-0.05554455146193504,
-0.017302222549915314,
-0.5291857123374939,
-0.03798972815275192,
-0.04192955791950226,
-0.10352165997028351,
-0.22312936186790466,
0.4218631088733673,
0.9821246862411499,
-0.31478360295295715,
-0.09990791976451874,
0.11577398329973221,
-0.07349233329296112,
0.07925339043140411,
0.23884129524230957,
-0.23727941513061523,
0.2614358067512512,
-0.5445768237113953,
-0.0018692761659622192,
0.597967803478241,
-0.4384443163871765,
-0.3357345163822174,
0.3495750427246094,
-0.37912797927856445,
0.28703758120536804,
0.23935508728027344,
0.03846708685159683,
-0.1787639856338501,
0.002189317485317588,
0.20922718942165375,
0.2098877876996994,
0.003866804763674736,
0.12306386977434158,
-0.25716617703437805,
-0.25962841510772705,
0.24873794615268707,
0.1291726976633072,
-0.03172272816300392,
0.1073167473077774,
0.05393492802977562,
-0.03848839923739433,
0.40938112139701843,
-0.19876712560653687,
0.014541256241500378,
0.1294574737548828,
0.184023916721344,
0.01807215064764023,
0.06480918824672699,
0.1845613718032837,
-0.40845954418182373,
0.3164606988430023,
0.14776511490345,
-0.28542667627334595,
-0.389559805393219,
0.14829310774803162,
0.07592807710170746,
-0.11509405076503754,
-0.5097121596336365,
-0.31199702620506287,
-0.076663076877594,
0.20140644907951355,
0.20752333104610443,
0.017101649194955826,
-0.5271252393722534,
0.7245537638664246,
-0.3749430179595947,
0.1626712530851364,
-0.6144903302192688,
0.2710258364677429,
0.2143111228942871,
-0.05373898148536682,
-0.03994954377412796,
0.16230840981006622,
-0.036075443029403687,
-0.26578956842422485,
-0.09554094821214676,
0.42169731855392456,
0.1533225178718567,
0.37734663486480713,
0.15902745723724365,
-0.07321663200855255,
0.12107409536838531,
-0.23270753026008606,
-0.07072483748197556,
0.2515939176082611,
0.21093519032001495,
0.15976977348327637,
-0.2418210208415985,
0.47953182458877563,
-0.1553478240966797,
0.29572373628616333,
0.32922089099884033,
-0.08379679173231125,
0.1961677521467209,
0.04299735650420189,
-0.4064439535140991,
-0.02471766248345375,
0.5070565938949585,
0.05321713909506798,
0.33500707149505615,
-0.09036813676357269,
-0.4073256552219391,
-0.08844643086194992,
0.12232780456542969,
0.16064982116222382,
0.05520240589976311,
0.1194838210940361,
-0.17212921380996704,
0.08128944784402847,
-0.05653891712427139,
0.39614740014076233,
0.45992469787597656,
0.030059460550546646,
-0.22225677967071533,
0.21687395870685577,
-0.05021337792277336,
-0.13790133595466614,
0.05146821215748787,
0.0459853932261467,
0.3215344548225403,
0.4479885697364807,
-0.05410498008131981,
0.07974287122488022,
-0.4002659320831299,
-0.28145015239715576,
-0.06371337175369263,
0.18153329193592072,
-0.39023783802986145,
0.21508662402629852,
-0.1782744973897934,
-0.38750481605529785,
-0.37376540899276733,
0.054195161908864975,
-0.07106666266918182,
-0.0025237957015633583,
-0.22104381024837494,
0.3490866720676422,
-0.04431555047631264,
0.0009464379400014877,
-0.2932288944721222,
0.018117398023605347,
0.023148873820900917,
-0.6316943764686584,
0.08204701542854309,
-0.09070798754692078,
-0.05192013084888458,
-0.1029474288225174,
0.24610431492328644,
-0.1525333970785141,
0.17456209659576416,
-0.253046452999115,
-0.08321277797222137,
-0.1718798130750656,
-0.1354900598526001,
0.04657372459769249,
-0.09630942344665527,
0.07314396649599075,
0.048089053481817245,
0.4651402235031128,
0.14235244691371918,
-0.20884083211421967,
0.19163063168525696,
-0.30366650223731995,
-0.17899392545223236,
0.09506997466087341,
0.05473412200808525,
0.12860451638698578,
-0.09960813820362091,
-0.6534104347229004,
-0.21187756955623627,
-0.4051319658756256,
0.22557152807712555,
-0.08254766464233398,
0.08233795315027237,
0.33055707812309265,
0.28416022658348083,
0.20288096368312836,
-0.050713397562503815,
0.018616672605276108,
0.02484256401658058,
-0.4030243456363678,
0.425749808549881,
-0.06875474005937576,
-0.2792237102985382,
0.2426263391971588,
-0.1320267617702484,
0.26618555188179016,
0.3266564607620239,
-0.4411333203315735,
-0.2677658796310425,
0.3716948330402374,
0.026889678090810776,
-0.025649532675743103,
-0.16914455592632294,
0.2391246110200882,
-0.17414559423923492,
0.08064515143632889,
-0.12010383605957031,
-0.06928053498268127,
0.1520770788192749,
0.2672118842601776,
0.4216146469116211,
0.17044878005981445,
0.585283637046814,
-0.05282910168170929,
0.6758423447608948,
0.304819792509079,
0.17435511946678162,
0.39273402094841003,
-0.04911920428276062,
0.41611841320991516,
-0.11667097359895706,
-0.10230082273483276,
-0.08535782247781754,
0.036813996732234955,
-0.2648167312145233,
0.16381412744522095,
0.17089995741844177,
-0.10543708503246307,
-0.4717758893966675,
-0.030674342066049576,
-0.39907780289649963,
-0.25035184621810913,
0.18387295305728912,
-0.004630181938409805,
0.11448647081851959,
0.013588525354862213,
0.09655273705720901,
0.013019870966672897,
-0.11104590445756912,
0.034907009452581406,
0.5688430666923523,
0.3580147922039032,
0.19523705542087555,
-0.07492390275001526,
-0.21010199189186096,
-0.2335580587387085,
0.07643843442201614,
0.11028207093477249,
0.38136938214302063,
-0.04733288288116455,
-0.21611201763153076,
0.057167358696460724,
-0.09367652237415314,
0.6115880012512207,
-0.034689389169216156,
0.027531161904335022,
-0.0007677190005779266,
-0.12225654721260071,
-0.20945394039154053,
-0.17171303927898407,
0.21989884972572327,
0.40736132860183716,
0.05162402614951134,
0.18917164206504822,
-0.14912427961826324,
-0.05827966332435608,
-0.06618975102901459,
0.29290616512298584,
-0.14218378067016602,
-0.13925403356552124,
-0.3981279134750366,
-0.2350749373435974,
-0.3780660033226013,
-0.06278414279222488,
-0.16643568873405457,
0.03027733601629734,
-0.015553876757621765,
0.1984902173280716,
0.15066294372081757,
0.032334811985492706,
-0.08912307024002075,
0.08482809364795685,
0.49776479601860046,
-0.1206415519118309,
0.10821546614170074,
0.7329671382904053,
0.18241074681282043,
0.25251850485801697,
0.6751276850700378,
0.04650745913386345,
-0.4481540322303772,
0.06818932294845581,
-0.11899715662002563,
0.08168960362672806,
0.4081096649169922,
-0.2019965946674347,
-0.037720777094364166,
0.22747255861759186,
-0.02841951698064804,
-0.08068140596151352,
-0.04350850731134415,
0.2717989385128021,
-0.06355104595422745,
-0.1925967037677765,
-0.6949067115783691,
0.32637718319892883,
0.04629439488053322,
0.055055394768714905,
0.3932468295097351,
-0.06320075690746307,
-0.21818529069423676,
0.33147507905960083,
-0.250642865896225,
0.7336887717247009,
0.03167050704360008,
0.24861420691013336,
0.4243663549423218,
0.06705553084611893,
0.541929304599762,
-0.3392708897590637,
0.3031022548675537,
-0.23561714589595795,
-0.21696311235427856,
-0.09757900983095169,
-0.23094891011714935,
0.1357826441526413,
-0.00678054615855217,
-0.12312616407871246,
0.5089525580406189,
-0.03937561810016632,
0.17044858634471893,
0.07254287600517273,
-0.04158628731966019,
0.13749876618385315,
-0.07880780100822449,
-0.5680605173110962,
-0.09189990162849426,
-0.06400781124830246,
0.458019495010376,
-0.020397888496518135,
-0.2954035997390747,
-0.17173290252685547,
-0.10885515809059143,
-0.11932173371315002,
0.27004122734069824,
-0.2713299095630646,
0.11484916508197784,
-0.17027638852596283,
-0.22965162992477417,
-0.20663298666477203,
0.5957050919532776,
0.015737906098365784,
-0.27405402064323425,
-0.2360387146472931,
0.10159505903720856,
-0.08583316951990128,
-0.06399878114461899,
-0.2862360179424286,
-0.020859960466623306,
0.4229559898376465,
-0.056231461465358734,
0.125467449426651,
0.22606763243675232,
-0.3484792113304138,
-0.33015745878219604,
0.14138439297676086,
-0.0077240243554115295,
0.13022831082344055,
0.15168923139572144,
-0.30309340357780457,
0.23038385808467865,
-0.030553054064512253,
-0.0055948421359062195,
-0.035979144275188446,
0.3320120573043823,
-0.2605038583278656,
-0.1306089162826538,
0.12509050965309143,
-0.4186488389968872,
0.05600961297750473,
0.5095577836036682,
-0.09899619966745377,
-0.08053767681121826,
0.5796023607254028,
0.07903876900672913,
0.014624014496803284,
-0.09411761164665222,
-0.035414405167102814,
0.13921275734901428,
-0.4089435636997223,
0.018499642610549927,
0.11752893775701523,
0.4495130777359009,
-0.01794453337788582,
-0.14531998336315155,
0.1984335482120514,
-0.19419902563095093,
-0.11901581287384033,
-0.5495317578315735,
-0.34571683406829834,
0.25161927938461304,
-0.0040636248886585236,
-0.03885895386338234,
0.08790171891450882,
-0.24115051329135895,
0.3250117599964142,
-0.26385313272476196,
-0.1445634514093399,
0.13417871296405792,
-0.03510059416294098,
0.01557996403425932,
0.3310418128967285,
0.29731494188308716,
0.5081155896186829,
0.005203239619731903,
-0.029574386775493622,
-0.10920877754688263,
-0.26782962679862976,
-0.016459107398986816,
-0.1711958348751068,
0.22428160905838013,
0.008996538817882538,
0.01016123965382576,
-0.08980781584978104,
-0.31233543157577515,
0.04077443480491638,
-0.09009324759244919,
0.13522781431674957,
0.007678709924221039,
-0.07682108879089355,
-0.10031537711620331,
0.02223726361989975,
0.07231604307889938,
-0.3176237940788269,
0.14403575658798218,
-0.14253105223178864,
0.21355322003364563,
0.2520226240158081,
0.07151234894990921,
-0.24922914803028107,
-0.03290945291519165,
-0.10864301770925522,
-0.023339025676250458,
-0.15739725530147552,
0.12069582939147949,
0.2733628451824188,
-0.47369372844696045,
0.20883429050445557,
-0.22729137539863586,
0.24619588255882263,
0.5056759119033813,
-0.25575724244117737,
0.11799022555351257,
0.14962390065193176,
0.013403560034930706,
-0.2368481308221817,
0.055575642734766006,
0.3883465528488159,
0.01229021605104208,
0.03693488612771034,
0.24851197004318237,
0.08259586989879608,
-0.057654205709695816,
-0.03083132952451706,
0.10284128785133362,
0.4457438886165619,
-0.279132604598999,
0.3294127881526947,
0.2513260543346405,
0.022726666182279587,
0.31097346544265747,
-0.18483597040176392,
0.27625617384910583,
0.18916329741477966,
0.2923993468284607,
-0.28396767377853394,
0.274231493473053,
0.0029485374689102173,
0.005027309060096741,
-0.2885119318962097,
-0.7016329765319824,
-0.19544456899166107,
0.2740093767642975,
-0.07029135525226593,
0.2124181091785431,
-0.17065486311912537,
0.441879004240036,
-0.2873297929763794,
0.045421939343214035,
-0.06891363114118576,
0.03882700949907303,
-0.004409715533256531,
-0.019732048735022545,
0.006933022290468216,
-0.3594484329223633,
-0.12982678413391113,
0.03773970529437065,
0.15721037983894348,
-0.10275417566299438,
0.07637660950422287,
0.11776910722255707,
-0.11467210948467255,
-0.3325076103210449,
0.08281983435153961,
0.19250982999801636,
0.1029016450047493,
-0.20751622319221497,
0.3229023516178131,
0.052043430507183075,
-0.026669688522815704,
0.2489004284143448,
-0.029206087812781334,
0.4405820667743683,
0.4040922224521637,
0.012511813081800938,
0.09668635576963425,
0.051233451813459396,
-0.01563103124499321,
-0.0023513268679380417,
0.1049918457865715,
-0.07334627211093903,
-0.07750847935676575,
0.3697558343410492,
0.042847707867622375,
-0.0005617095157504082,
0.5029730796813965,
0.05337780341506004,
0.26282840967178345,
-0.11529621481895447,
0.0507754422724247,
-0.19040678441524506,
0.18569013476371765,
-0.18035069108009338,
-0.07833974808454514,
-0.4022848904132843,
0.10603669285774231,
0.3309735953807831,
-0.0755634754896164,
0.03970496729016304,
0.20518143475055695,
-0.00794911663979292,
0.06366850435733795,
0.29372504353523254,
0.569269061088562,
0.08704566955566406,
-0.2856687605381012,
-0.08491547405719757,
-0.8362773060798645,
0.09839443117380142,
-0.05558493360877037,
0.15319354832172394,
-0.20672139525413513,
0.23963536322116852,
0.04140351340174675,
0.023168403655290604,
0.15128014981746674,
-0.20265904068946838,
0.07856988161802292,
0.21656982600688934,
-0.2732827663421631,
-0.4324343204498291,
-0.02534099668264389,
0.3057149052619934,
-0.0117556843906641,
-0.2077805995941162,
-0.01574784889817238,
-0.20586638152599335,
-0.08629965782165527,
0.18446432054042816,
-0.0061544738709926605,
-0.22785089910030365,
-0.29335084557533264,
0.3055528998374939,
-0.1605859249830246,
0.26337701082229614,
-0.00014691799879074097,
-0.3095047175884247,
-0.4064837694168091,
-0.1211649477481842,
-0.1395140439271927,
0.15387097001075745,
0.14561042189598083,
0.6183735132217407,
-0.2559136152267456,
-0.10058233141899109,
-0.4920050799846649,
0.07983437925577164,
0.0873328149318695,
-0.28910431265830994,
-0.21636919677257538,
0.13126961886882782,
0.025163322687149048,
0.32422804832458496,
-0.034668032079935074,
0.09284847229719162,
-0.2129938304424286,
0.04309923201799393,
-0.25413429737091064,
-0.08506793528795242,
0.6583105325698853,
-0.5007294416427612,
0.050604384392499924,
0.012677420862019062,
0.22747531533241272,
0.1821148693561554,
0.19539712369441986,
-0.43326064944267273,
0.31161734461784363,
0.2842440605163574,
-0.06556510180234909,
-0.3021026849746704,
-0.0384882353246212,
-0.16203059256076813,
0.01859915629029274,
0.053810227662324905,
0.1984279751777649,
0.06919267773628235,
-0.45417290925979614,
0.2660907506942749,
-0.22592808306217194
] |
https://github.com/huggingface/datasets/issues/6327
|
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)`
|
@mariosasko Thank you for your kind reply! I'll try it as a workaround.
Does that mean that currently it's not supported to simply load with a short name?
|
### Describe the bug
Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs.
### Steps to reproduce the bug
I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process.
So I try the following code to load the files streamingly
```py
dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True)
print(next(iter(dataset['train'])))
```
Sadly, it raises the following:
```
FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl'
```
I've noticed that the dataset can be properly found in the begining
```
Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub.
```
But it seems that the paths couldn't be properly parsed when loading iteratively.
How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works.
Thanks.
### Expected behavior
Properly load the dataset.
### Environment info
`datasets==2.14.5`
| 28
|
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)`
### Describe the bug
Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs.
### Steps to reproduce the bug
I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process.
So I try the following code to load the files streamingly
```py
dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True)
print(next(iter(dataset['train'])))
```
Sadly, it raises the following:
```
FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl'
```
I've noticed that the dataset can be properly found in the begining
```
Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub.
```
But it seems that the paths couldn't be properly parsed when loading iteratively.
How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works.
Thanks.
### Expected behavior
Properly load the dataset.
### Environment info
`datasets==2.14.5`
@mariosasko Thank you for your kind reply! I'll try it as a workaround.
Does that mean that currently it's not supported to simply load with a short name?
|
[
-0.3336906135082245,
-0.10643303394317627,
0.10457676649093628,
0.33565467596054077,
0.19966669380664825,
0.007022768259048462,
0.2094419002532959,
0.368282288312912,
0.07302562892436981,
0.0012070611119270325,
0.15766353905200958,
0.28006258606910706,
-0.20167630910873413,
-0.12300232797861099,
-0.02176419273018837,
-0.05131082236766815,
-0.08652570098638535,
0.1781945675611496,
-0.11513178050518036,
0.019068822264671326,
-0.10091903060674667,
0.2891966700553894,
-0.2755325734615326,
0.03725209832191467,
-0.08573544025421143,
-0.012144820764660835,
-0.091254323720932,
0.4832437336444855,
-0.023501107469201088,
-0.13152624666690826,
0.2138756513595581,
-0.0639849603176117,
0.195752814412117,
0.6028720736503601,
-0.00012228496780153364,
0.13889160752296448,
0.17505501210689545,
-0.3115907311439514,
-0.31969156861305237,
-0.5971413254737854,
-0.32240521907806396,
0.0015993937849998474,
0.05095220357179642,
-0.2196466475725174,
-0.1528456211090088,
-0.2498973160982132,
0.23846207559108734,
-0.25828614830970764,
0.4575362205505371,
0.23508842289447784,
0.04524993896484375,
0.14384478330612183,
0.09258528053760529,
0.07430335134267807,
-0.09207115322351456,
0.1847440004348755,
0.009927758947014809,
0.3621397018432617,
0.04767438769340515,
-0.09468772262334824,
-0.0632302388548851,
0.3260413706302643,
-0.22990861535072327,
0.014307957142591476,
0.3235873878002167,
0.08275055885314941,
-0.2320203185081482,
-0.31658169627189636,
0.005494892597198486,
0.3365730047225952,
0.3807314932346344,
-0.2738989293575287,
-0.44493308663368225,
-0.39771294593811035,
-0.021598920226097107,
-0.33489009737968445,
0.2835215926170349,
0.28766384720802307,
-0.2329983115196228,
0.142733633518219,
0.13661569356918335,
-0.3033113479614258,
-0.32885032892227173,
0.20271660387516022,
0.2146238386631012,
-0.06291739642620087,
-0.0894014835357666,
0.09051105380058289,
0.05999752879142761,
0.08636754751205444,
-0.23062480986118317,
0.002510892227292061,
0.0971575528383255,
0.25360167026519775,
-0.14607945084571838,
0.2123522162437439,
0.10537651926279068,
-0.14665722846984863,
0.09645579010248184,
0.040298942476511,
0.4106346368789673,
-0.09874279052019119,
-0.1957978755235672,
0.1957198977470398,
0.2093256413936615,
0.1970551311969757,
-0.012553185224533081,
0.0451061874628067,
0.32586753368377686,
0.5235635042190552,
-0.16075582802295685,
-0.05495375394821167,
-0.212057963013649,
-0.11257404088973999,
-0.18779516220092773,
-0.04812183976173401,
0.4310510754585266,
-0.18517640233039856,
-0.32417789101600647,
-0.13683387637138367,
-0.10603727400302887,
-0.028096618130803108,
0.1077643632888794,
0.44151976704597473,
-0.0730370357632637,
0.07470061630010605,
0.16567778587341309,
0.23556697368621826,
-0.2351270616054535,
-0.23924857378005981,
-0.11603018641471863,
0.1837349534034729,
-0.22281812131404877,
0.05074597895145416,
0.11681534349918365,
-0.35088273882865906,
0.46432554721832275,
-0.18008343875408173,
0.08004700392484665,
-0.2292407900094986,
0.018105773255228996,
-0.1145787239074707,
0.1503714919090271,
0.2676357626914978,
-0.04918801411986351,
0.10592765361070633,
0.2911432981491089,
-0.0329541340470314,
-0.028417564928531647,
0.19940173625946045,
-0.3968588709831238,
-0.3107830286026001,
0.2637968063354492,
0.0010867835953831673,
-0.4941900968551636,
0.05797472596168518,
-0.28764796257019043,
-0.05554455146193504,
-0.017302222549915314,
-0.5291857123374939,
-0.03798972815275192,
-0.04192955791950226,
-0.10352165997028351,
-0.22312936186790466,
0.4218631088733673,
0.9821246862411499,
-0.31478360295295715,
-0.09990791976451874,
0.11577398329973221,
-0.07349233329296112,
0.07925339043140411,
0.23884129524230957,
-0.23727941513061523,
0.2614358067512512,
-0.5445768237113953,
-0.0018692761659622192,
0.597967803478241,
-0.4384443163871765,
-0.3357345163822174,
0.3495750427246094,
-0.37912797927856445,
0.28703758120536804,
0.23935508728027344,
0.03846708685159683,
-0.1787639856338501,
0.002189317485317588,
0.20922718942165375,
0.2098877876996994,
0.003866804763674736,
0.12306386977434158,
-0.25716617703437805,
-0.25962841510772705,
0.24873794615268707,
0.1291726976633072,
-0.03172272816300392,
0.1073167473077774,
0.05393492802977562,
-0.03848839923739433,
0.40938112139701843,
-0.19876712560653687,
0.014541256241500378,
0.1294574737548828,
0.184023916721344,
0.01807215064764023,
0.06480918824672699,
0.1845613718032837,
-0.40845954418182373,
0.3164606988430023,
0.14776511490345,
-0.28542667627334595,
-0.389559805393219,
0.14829310774803162,
0.07592807710170746,
-0.11509405076503754,
-0.5097121596336365,
-0.31199702620506287,
-0.076663076877594,
0.20140644907951355,
0.20752333104610443,
0.017101649194955826,
-0.5271252393722534,
0.7245537638664246,
-0.3749430179595947,
0.1626712530851364,
-0.6144903302192688,
0.2710258364677429,
0.2143111228942871,
-0.05373898148536682,
-0.03994954377412796,
0.16230840981006622,
-0.036075443029403687,
-0.26578956842422485,
-0.09554094821214676,
0.42169731855392456,
0.1533225178718567,
0.37734663486480713,
0.15902745723724365,
-0.07321663200855255,
0.12107409536838531,
-0.23270753026008606,
-0.07072483748197556,
0.2515939176082611,
0.21093519032001495,
0.15976977348327637,
-0.2418210208415985,
0.47953182458877563,
-0.1553478240966797,
0.29572373628616333,
0.32922089099884033,
-0.08379679173231125,
0.1961677521467209,
0.04299735650420189,
-0.4064439535140991,
-0.02471766248345375,
0.5070565938949585,
0.05321713909506798,
0.33500707149505615,
-0.09036813676357269,
-0.4073256552219391,
-0.08844643086194992,
0.12232780456542969,
0.16064982116222382,
0.05520240589976311,
0.1194838210940361,
-0.17212921380996704,
0.08128944784402847,
-0.05653891712427139,
0.39614740014076233,
0.45992469787597656,
0.030059460550546646,
-0.22225677967071533,
0.21687395870685577,
-0.05021337792277336,
-0.13790133595466614,
0.05146821215748787,
0.0459853932261467,
0.3215344548225403,
0.4479885697364807,
-0.05410498008131981,
0.07974287122488022,
-0.4002659320831299,
-0.28145015239715576,
-0.06371337175369263,
0.18153329193592072,
-0.39023783802986145,
0.21508662402629852,
-0.1782744973897934,
-0.38750481605529785,
-0.37376540899276733,
0.054195161908864975,
-0.07106666266918182,
-0.0025237957015633583,
-0.22104381024837494,
0.3490866720676422,
-0.04431555047631264,
0.0009464379400014877,
-0.2932288944721222,
0.018117398023605347,
0.023148873820900917,
-0.6316943764686584,
0.08204701542854309,
-0.09070798754692078,
-0.05192013084888458,
-0.1029474288225174,
0.24610431492328644,
-0.1525333970785141,
0.17456209659576416,
-0.253046452999115,
-0.08321277797222137,
-0.1718798130750656,
-0.1354900598526001,
0.04657372459769249,
-0.09630942344665527,
0.07314396649599075,
0.048089053481817245,
0.4651402235031128,
0.14235244691371918,
-0.20884083211421967,
0.19163063168525696,
-0.30366650223731995,
-0.17899392545223236,
0.09506997466087341,
0.05473412200808525,
0.12860451638698578,
-0.09960813820362091,
-0.6534104347229004,
-0.21187756955623627,
-0.4051319658756256,
0.22557152807712555,
-0.08254766464233398,
0.08233795315027237,
0.33055707812309265,
0.28416022658348083,
0.20288096368312836,
-0.050713397562503815,
0.018616672605276108,
0.02484256401658058,
-0.4030243456363678,
0.425749808549881,
-0.06875474005937576,
-0.2792237102985382,
0.2426263391971588,
-0.1320267617702484,
0.26618555188179016,
0.3266564607620239,
-0.4411333203315735,
-0.2677658796310425,
0.3716948330402374,
0.026889678090810776,
-0.025649532675743103,
-0.16914455592632294,
0.2391246110200882,
-0.17414559423923492,
0.08064515143632889,
-0.12010383605957031,
-0.06928053498268127,
0.1520770788192749,
0.2672118842601776,
0.4216146469116211,
0.17044878005981445,
0.585283637046814,
-0.05282910168170929,
0.6758423447608948,
0.304819792509079,
0.17435511946678162,
0.39273402094841003,
-0.04911920428276062,
0.41611841320991516,
-0.11667097359895706,
-0.10230082273483276,
-0.08535782247781754,
0.036813996732234955,
-0.2648167312145233,
0.16381412744522095,
0.17089995741844177,
-0.10543708503246307,
-0.4717758893966675,
-0.030674342066049576,
-0.39907780289649963,
-0.25035184621810913,
0.18387295305728912,
-0.004630181938409805,
0.11448647081851959,
0.013588525354862213,
0.09655273705720901,
0.013019870966672897,
-0.11104590445756912,
0.034907009452581406,
0.5688430666923523,
0.3580147922039032,
0.19523705542087555,
-0.07492390275001526,
-0.21010199189186096,
-0.2335580587387085,
0.07643843442201614,
0.11028207093477249,
0.38136938214302063,
-0.04733288288116455,
-0.21611201763153076,
0.057167358696460724,
-0.09367652237415314,
0.6115880012512207,
-0.034689389169216156,
0.027531161904335022,
-0.0007677190005779266,
-0.12225654721260071,
-0.20945394039154053,
-0.17171303927898407,
0.21989884972572327,
0.40736132860183716,
0.05162402614951134,
0.18917164206504822,
-0.14912427961826324,
-0.05827966332435608,
-0.06618975102901459,
0.29290616512298584,
-0.14218378067016602,
-0.13925403356552124,
-0.3981279134750366,
-0.2350749373435974,
-0.3780660033226013,
-0.06278414279222488,
-0.16643568873405457,
0.03027733601629734,
-0.015553876757621765,
0.1984902173280716,
0.15066294372081757,
0.032334811985492706,
-0.08912307024002075,
0.08482809364795685,
0.49776479601860046,
-0.1206415519118309,
0.10821546614170074,
0.7329671382904053,
0.18241074681282043,
0.25251850485801697,
0.6751276850700378,
0.04650745913386345,
-0.4481540322303772,
0.06818932294845581,
-0.11899715662002563,
0.08168960362672806,
0.4081096649169922,
-0.2019965946674347,
-0.037720777094364166,
0.22747255861759186,
-0.02841951698064804,
-0.08068140596151352,
-0.04350850731134415,
0.2717989385128021,
-0.06355104595422745,
-0.1925967037677765,
-0.6949067115783691,
0.32637718319892883,
0.04629439488053322,
0.055055394768714905,
0.3932468295097351,
-0.06320075690746307,
-0.21818529069423676,
0.33147507905960083,
-0.250642865896225,
0.7336887717247009,
0.03167050704360008,
0.24861420691013336,
0.4243663549423218,
0.06705553084611893,
0.541929304599762,
-0.3392708897590637,
0.3031022548675537,
-0.23561714589595795,
-0.21696311235427856,
-0.09757900983095169,
-0.23094891011714935,
0.1357826441526413,
-0.00678054615855217,
-0.12312616407871246,
0.5089525580406189,
-0.03937561810016632,
0.17044858634471893,
0.07254287600517273,
-0.04158628731966019,
0.13749876618385315,
-0.07880780100822449,
-0.5680605173110962,
-0.09189990162849426,
-0.06400781124830246,
0.458019495010376,
-0.020397888496518135,
-0.2954035997390747,
-0.17173290252685547,
-0.10885515809059143,
-0.11932173371315002,
0.27004122734069824,
-0.2713299095630646,
0.11484916508197784,
-0.17027638852596283,
-0.22965162992477417,
-0.20663298666477203,
0.5957050919532776,
0.015737906098365784,
-0.27405402064323425,
-0.2360387146472931,
0.10159505903720856,
-0.08583316951990128,
-0.06399878114461899,
-0.2862360179424286,
-0.020859960466623306,
0.4229559898376465,
-0.056231461465358734,
0.125467449426651,
0.22606763243675232,
-0.3484792113304138,
-0.33015745878219604,
0.14138439297676086,
-0.0077240243554115295,
0.13022831082344055,
0.15168923139572144,
-0.30309340357780457,
0.23038385808467865,
-0.030553054064512253,
-0.0055948421359062195,
-0.035979144275188446,
0.3320120573043823,
-0.2605038583278656,
-0.1306089162826538,
0.12509050965309143,
-0.4186488389968872,
0.05600961297750473,
0.5095577836036682,
-0.09899619966745377,
-0.08053767681121826,
0.5796023607254028,
0.07903876900672913,
0.014624014496803284,
-0.09411761164665222,
-0.035414405167102814,
0.13921275734901428,
-0.4089435636997223,
0.018499642610549927,
0.11752893775701523,
0.4495130777359009,
-0.01794453337788582,
-0.14531998336315155,
0.1984335482120514,
-0.19419902563095093,
-0.11901581287384033,
-0.5495317578315735,
-0.34571683406829834,
0.25161927938461304,
-0.0040636248886585236,
-0.03885895386338234,
0.08790171891450882,
-0.24115051329135895,
0.3250117599964142,
-0.26385313272476196,
-0.1445634514093399,
0.13417871296405792,
-0.03510059416294098,
0.01557996403425932,
0.3310418128967285,
0.29731494188308716,
0.5081155896186829,
0.005203239619731903,
-0.029574386775493622,
-0.10920877754688263,
-0.26782962679862976,
-0.016459107398986816,
-0.1711958348751068,
0.22428160905838013,
0.008996538817882538,
0.01016123965382576,
-0.08980781584978104,
-0.31233543157577515,
0.04077443480491638,
-0.09009324759244919,
0.13522781431674957,
0.007678709924221039,
-0.07682108879089355,
-0.10031537711620331,
0.02223726361989975,
0.07231604307889938,
-0.3176237940788269,
0.14403575658798218,
-0.14253105223178864,
0.21355322003364563,
0.2520226240158081,
0.07151234894990921,
-0.24922914803028107,
-0.03290945291519165,
-0.10864301770925522,
-0.023339025676250458,
-0.15739725530147552,
0.12069582939147949,
0.2733628451824188,
-0.47369372844696045,
0.20883429050445557,
-0.22729137539863586,
0.24619588255882263,
0.5056759119033813,
-0.25575724244117737,
0.11799022555351257,
0.14962390065193176,
0.013403560034930706,
-0.2368481308221817,
0.055575642734766006,
0.3883465528488159,
0.01229021605104208,
0.03693488612771034,
0.24851197004318237,
0.08259586989879608,
-0.057654205709695816,
-0.03083132952451706,
0.10284128785133362,
0.4457438886165619,
-0.279132604598999,
0.3294127881526947,
0.2513260543346405,
0.022726666182279587,
0.31097346544265747,
-0.18483597040176392,
0.27625617384910583,
0.18916329741477966,
0.2923993468284607,
-0.28396767377853394,
0.274231493473053,
0.0029485374689102173,
0.005027309060096741,
-0.2885119318962097,
-0.7016329765319824,
-0.19544456899166107,
0.2740093767642975,
-0.07029135525226593,
0.2124181091785431,
-0.17065486311912537,
0.441879004240036,
-0.2873297929763794,
0.045421939343214035,
-0.06891363114118576,
0.03882700949907303,
-0.004409715533256531,
-0.019732048735022545,
0.006933022290468216,
-0.3594484329223633,
-0.12982678413391113,
0.03773970529437065,
0.15721037983894348,
-0.10275417566299438,
0.07637660950422287,
0.11776910722255707,
-0.11467210948467255,
-0.3325076103210449,
0.08281983435153961,
0.19250982999801636,
0.1029016450047493,
-0.20751622319221497,
0.3229023516178131,
0.052043430507183075,
-0.026669688522815704,
0.2489004284143448,
-0.029206087812781334,
0.4405820667743683,
0.4040922224521637,
0.012511813081800938,
0.09668635576963425,
0.051233451813459396,
-0.01563103124499321,
-0.0023513268679380417,
0.1049918457865715,
-0.07334627211093903,
-0.07750847935676575,
0.3697558343410492,
0.042847707867622375,
-0.0005617095157504082,
0.5029730796813965,
0.05337780341506004,
0.26282840967178345,
-0.11529621481895447,
0.0507754422724247,
-0.19040678441524506,
0.18569013476371765,
-0.18035069108009338,
-0.07833974808454514,
-0.4022848904132843,
0.10603669285774231,
0.3309735953807831,
-0.0755634754896164,
0.03970496729016304,
0.20518143475055695,
-0.00794911663979292,
0.06366850435733795,
0.29372504353523254,
0.569269061088562,
0.08704566955566406,
-0.2856687605381012,
-0.08491547405719757,
-0.8362773060798645,
0.09839443117380142,
-0.05558493360877037,
0.15319354832172394,
-0.20672139525413513,
0.23963536322116852,
0.04140351340174675,
0.023168403655290604,
0.15128014981746674,
-0.20265904068946838,
0.07856988161802292,
0.21656982600688934,
-0.2732827663421631,
-0.4324343204498291,
-0.02534099668264389,
0.3057149052619934,
-0.0117556843906641,
-0.2077805995941162,
-0.01574784889817238,
-0.20586638152599335,
-0.08629965782165527,
0.18446432054042816,
-0.0061544738709926605,
-0.22785089910030365,
-0.29335084557533264,
0.3055528998374939,
-0.1605859249830246,
0.26337701082229614,
-0.00014691799879074097,
-0.3095047175884247,
-0.4064837694168091,
-0.1211649477481842,
-0.1395140439271927,
0.15387097001075745,
0.14561042189598083,
0.6183735132217407,
-0.2559136152267456,
-0.10058233141899109,
-0.4920050799846649,
0.07983437925577164,
0.0873328149318695,
-0.28910431265830994,
-0.21636919677257538,
0.13126961886882782,
0.025163322687149048,
0.32422804832458496,
-0.034668032079935074,
0.09284847229719162,
-0.2129938304424286,
0.04309923201799393,
-0.25413429737091064,
-0.08506793528795242,
0.6583105325698853,
-0.5007294416427612,
0.050604384392499924,
0.012677420862019062,
0.22747531533241272,
0.1821148693561554,
0.19539712369441986,
-0.43326064944267273,
0.31161734461784363,
0.2842440605163574,
-0.06556510180234909,
-0.3021026849746704,
-0.0384882353246212,
-0.16203059256076813,
0.01859915629029274,
0.053810227662324905,
0.1984279751777649,
0.06919267773628235,
-0.45417290925979614,
0.2660907506942749,
-0.22592808306217194
] |
https://github.com/huggingface/datasets/issues/6327
|
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)`
|
It is, but manually downloading repo files to the cache can easily lead to failure (the HF cache is not meant to be modified by a user besides deleting the files 🙂), as in your case. Hence, the clone + `load_dataset("path/to/cloned_repo")` workflow should be used instead.
|
### Describe the bug
Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs.
### Steps to reproduce the bug
I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process.
So I try the following code to load the files streamingly
```py
dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True)
print(next(iter(dataset['train'])))
```
Sadly, it raises the following:
```
FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl'
```
I've noticed that the dataset can be properly found in the begining
```
Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub.
```
But it seems that the paths couldn't be properly parsed when loading iteratively.
How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works.
Thanks.
### Expected behavior
Properly load the dataset.
### Environment info
`datasets==2.14.5`
| 46
|
FileNotFoundError when trying to load the downloaded dataset with `load_dataset(..., streaming=True)`
### Describe the bug
Hi, I'm trying to load the dataset `togethercomputer/RedPajama-Data-1T-Sample` with `load_dataset` in streaming mode, i.e., `streaming=True`, but `FileNotFoundError` occurs.
### Steps to reproduce the bug
I've downloaded the dataset and save it to the cache dir in advance. My hope is loading the files in offline environment and without taking too much hours to prepross the entire data before running into the training process.
So I try the following code to load the files streamingly
```py
dataset = load_dataset('togethercomputer/RedPajama-Data-1T-Sample', streaming=True)
print(next(iter(dataset['train'])))
```
Sadly, it raises the following:
```
FileNotFoundError: [Errno 2] No such file or directory: 'CURRENT_CODE_PATH/arxiv_sample.jsonl'
```
I've noticed that the dataset can be properly found in the begining
```
Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T-Sample/6ea3bc8ec2e84ec6d2df1930942e9028ace8c5b9d9143823cf911c50bbd92039 (last modified on Sat Oct 21 20:12:57 2023) since it couldn't be found locally at togethercomputer/RedPajama-Data-1T-Sample., or remotely on the Hugging Face Hub.
```
But it seems that the paths couldn't be properly parsed when loading iteratively.
How should I fix this error. I've tried specifying `data_files` or `data_dir` as `.../arxiv_sample.jsonl` but none of them works.
Thanks.
### Expected behavior
Properly load the dataset.
### Environment info
`datasets==2.14.5`
It is, but manually downloading repo files to the cache can easily lead to failure (the HF cache is not meant to be modified by a user besides deleting the files 🙂), as in your case. Hence, the clone + `load_dataset("path/to/cloned_repo")` workflow should be used instead.
|
[
-0.3336906135082245,
-0.10643303394317627,
0.10457676649093628,
0.33565467596054077,
0.19966669380664825,
0.007022768259048462,
0.2094419002532959,
0.368282288312912,
0.07302562892436981,
0.0012070611119270325,
0.15766353905200958,
0.28006258606910706,
-0.20167630910873413,
-0.12300232797861099,
-0.02176419273018837,
-0.05131082236766815,
-0.08652570098638535,
0.1781945675611496,
-0.11513178050518036,
0.019068822264671326,
-0.10091903060674667,
0.2891966700553894,
-0.2755325734615326,
0.03725209832191467,
-0.08573544025421143,
-0.012144820764660835,
-0.091254323720932,
0.4832437336444855,
-0.023501107469201088,
-0.13152624666690826,
0.2138756513595581,
-0.0639849603176117,
0.195752814412117,
0.6028720736503601,
-0.00012228496780153364,
0.13889160752296448,
0.17505501210689545,
-0.3115907311439514,
-0.31969156861305237,
-0.5971413254737854,
-0.32240521907806396,
0.0015993937849998474,
0.05095220357179642,
-0.2196466475725174,
-0.1528456211090088,
-0.2498973160982132,
0.23846207559108734,
-0.25828614830970764,
0.4575362205505371,
0.23508842289447784,
0.04524993896484375,
0.14384478330612183,
0.09258528053760529,
0.07430335134267807,
-0.09207115322351456,
0.1847440004348755,
0.009927758947014809,
0.3621397018432617,
0.04767438769340515,
-0.09468772262334824,
-0.0632302388548851,
0.3260413706302643,
-0.22990861535072327,
0.014307957142591476,
0.3235873878002167,
0.08275055885314941,
-0.2320203185081482,
-0.31658169627189636,
0.005494892597198486,
0.3365730047225952,
0.3807314932346344,
-0.2738989293575287,
-0.44493308663368225,
-0.39771294593811035,
-0.021598920226097107,
-0.33489009737968445,
0.2835215926170349,
0.28766384720802307,
-0.2329983115196228,
0.142733633518219,
0.13661569356918335,
-0.3033113479614258,
-0.32885032892227173,
0.20271660387516022,
0.2146238386631012,
-0.06291739642620087,
-0.0894014835357666,
0.09051105380058289,
0.05999752879142761,
0.08636754751205444,
-0.23062480986118317,
0.002510892227292061,
0.0971575528383255,
0.25360167026519775,
-0.14607945084571838,
0.2123522162437439,
0.10537651926279068,
-0.14665722846984863,
0.09645579010248184,
0.040298942476511,
0.4106346368789673,
-0.09874279052019119,
-0.1957978755235672,
0.1957198977470398,
0.2093256413936615,
0.1970551311969757,
-0.012553185224533081,
0.0451061874628067,
0.32586753368377686,
0.5235635042190552,
-0.16075582802295685,
-0.05495375394821167,
-0.212057963013649,
-0.11257404088973999,
-0.18779516220092773,
-0.04812183976173401,
0.4310510754585266,
-0.18517640233039856,
-0.32417789101600647,
-0.13683387637138367,
-0.10603727400302887,
-0.028096618130803108,
0.1077643632888794,
0.44151976704597473,
-0.0730370357632637,
0.07470061630010605,
0.16567778587341309,
0.23556697368621826,
-0.2351270616054535,
-0.23924857378005981,
-0.11603018641471863,
0.1837349534034729,
-0.22281812131404877,
0.05074597895145416,
0.11681534349918365,
-0.35088273882865906,
0.46432554721832275,
-0.18008343875408173,
0.08004700392484665,
-0.2292407900094986,
0.018105773255228996,
-0.1145787239074707,
0.1503714919090271,
0.2676357626914978,
-0.04918801411986351,
0.10592765361070633,
0.2911432981491089,
-0.0329541340470314,
-0.028417564928531647,
0.19940173625946045,
-0.3968588709831238,
-0.3107830286026001,
0.2637968063354492,
0.0010867835953831673,
-0.4941900968551636,
0.05797472596168518,
-0.28764796257019043,
-0.05554455146193504,
-0.017302222549915314,
-0.5291857123374939,
-0.03798972815275192,
-0.04192955791950226,
-0.10352165997028351,
-0.22312936186790466,
0.4218631088733673,
0.9821246862411499,
-0.31478360295295715,
-0.09990791976451874,
0.11577398329973221,
-0.07349233329296112,
0.07925339043140411,
0.23884129524230957,
-0.23727941513061523,
0.2614358067512512,
-0.5445768237113953,
-0.0018692761659622192,
0.597967803478241,
-0.4384443163871765,
-0.3357345163822174,
0.3495750427246094,
-0.37912797927856445,
0.28703758120536804,
0.23935508728027344,
0.03846708685159683,
-0.1787639856338501,
0.002189317485317588,
0.20922718942165375,
0.2098877876996994,
0.003866804763674736,
0.12306386977434158,
-0.25716617703437805,
-0.25962841510772705,
0.24873794615268707,
0.1291726976633072,
-0.03172272816300392,
0.1073167473077774,
0.05393492802977562,
-0.03848839923739433,
0.40938112139701843,
-0.19876712560653687,
0.014541256241500378,
0.1294574737548828,
0.184023916721344,
0.01807215064764023,
0.06480918824672699,
0.1845613718032837,
-0.40845954418182373,
0.3164606988430023,
0.14776511490345,
-0.28542667627334595,
-0.389559805393219,
0.14829310774803162,
0.07592807710170746,
-0.11509405076503754,
-0.5097121596336365,
-0.31199702620506287,
-0.076663076877594,
0.20140644907951355,
0.20752333104610443,
0.017101649194955826,
-0.5271252393722534,
0.7245537638664246,
-0.3749430179595947,
0.1626712530851364,
-0.6144903302192688,
0.2710258364677429,
0.2143111228942871,
-0.05373898148536682,
-0.03994954377412796,
0.16230840981006622,
-0.036075443029403687,
-0.26578956842422485,
-0.09554094821214676,
0.42169731855392456,
0.1533225178718567,
0.37734663486480713,
0.15902745723724365,
-0.07321663200855255,
0.12107409536838531,
-0.23270753026008606,
-0.07072483748197556,
0.2515939176082611,
0.21093519032001495,
0.15976977348327637,
-0.2418210208415985,
0.47953182458877563,
-0.1553478240966797,
0.29572373628616333,
0.32922089099884033,
-0.08379679173231125,
0.1961677521467209,
0.04299735650420189,
-0.4064439535140991,
-0.02471766248345375,
0.5070565938949585,
0.05321713909506798,
0.33500707149505615,
-0.09036813676357269,
-0.4073256552219391,
-0.08844643086194992,
0.12232780456542969,
0.16064982116222382,
0.05520240589976311,
0.1194838210940361,
-0.17212921380996704,
0.08128944784402847,
-0.05653891712427139,
0.39614740014076233,
0.45992469787597656,
0.030059460550546646,
-0.22225677967071533,
0.21687395870685577,
-0.05021337792277336,
-0.13790133595466614,
0.05146821215748787,
0.0459853932261467,
0.3215344548225403,
0.4479885697364807,
-0.05410498008131981,
0.07974287122488022,
-0.4002659320831299,
-0.28145015239715576,
-0.06371337175369263,
0.18153329193592072,
-0.39023783802986145,
0.21508662402629852,
-0.1782744973897934,
-0.38750481605529785,
-0.37376540899276733,
0.054195161908864975,
-0.07106666266918182,
-0.0025237957015633583,
-0.22104381024837494,
0.3490866720676422,
-0.04431555047631264,
0.0009464379400014877,
-0.2932288944721222,
0.018117398023605347,
0.023148873820900917,
-0.6316943764686584,
0.08204701542854309,
-0.09070798754692078,
-0.05192013084888458,
-0.1029474288225174,
0.24610431492328644,
-0.1525333970785141,
0.17456209659576416,
-0.253046452999115,
-0.08321277797222137,
-0.1718798130750656,
-0.1354900598526001,
0.04657372459769249,
-0.09630942344665527,
0.07314396649599075,
0.048089053481817245,
0.4651402235031128,
0.14235244691371918,
-0.20884083211421967,
0.19163063168525696,
-0.30366650223731995,
-0.17899392545223236,
0.09506997466087341,
0.05473412200808525,
0.12860451638698578,
-0.09960813820362091,
-0.6534104347229004,
-0.21187756955623627,
-0.4051319658756256,
0.22557152807712555,
-0.08254766464233398,
0.08233795315027237,
0.33055707812309265,
0.28416022658348083,
0.20288096368312836,
-0.050713397562503815,
0.018616672605276108,
0.02484256401658058,
-0.4030243456363678,
0.425749808549881,
-0.06875474005937576,
-0.2792237102985382,
0.2426263391971588,
-0.1320267617702484,
0.26618555188179016,
0.3266564607620239,
-0.4411333203315735,
-0.2677658796310425,
0.3716948330402374,
0.026889678090810776,
-0.025649532675743103,
-0.16914455592632294,
0.2391246110200882,
-0.17414559423923492,
0.08064515143632889,
-0.12010383605957031,
-0.06928053498268127,
0.1520770788192749,
0.2672118842601776,
0.4216146469116211,
0.17044878005981445,
0.585283637046814,
-0.05282910168170929,
0.6758423447608948,
0.304819792509079,
0.17435511946678162,
0.39273402094841003,
-0.04911920428276062,
0.41611841320991516,
-0.11667097359895706,
-0.10230082273483276,
-0.08535782247781754,
0.036813996732234955,
-0.2648167312145233,
0.16381412744522095,
0.17089995741844177,
-0.10543708503246307,
-0.4717758893966675,
-0.030674342066049576,
-0.39907780289649963,
-0.25035184621810913,
0.18387295305728912,
-0.004630181938409805,
0.11448647081851959,
0.013588525354862213,
0.09655273705720901,
0.013019870966672897,
-0.11104590445756912,
0.034907009452581406,
0.5688430666923523,
0.3580147922039032,
0.19523705542087555,
-0.07492390275001526,
-0.21010199189186096,
-0.2335580587387085,
0.07643843442201614,
0.11028207093477249,
0.38136938214302063,
-0.04733288288116455,
-0.21611201763153076,
0.057167358696460724,
-0.09367652237415314,
0.6115880012512207,
-0.034689389169216156,
0.027531161904335022,
-0.0007677190005779266,
-0.12225654721260071,
-0.20945394039154053,
-0.17171303927898407,
0.21989884972572327,
0.40736132860183716,
0.05162402614951134,
0.18917164206504822,
-0.14912427961826324,
-0.05827966332435608,
-0.06618975102901459,
0.29290616512298584,
-0.14218378067016602,
-0.13925403356552124,
-0.3981279134750366,
-0.2350749373435974,
-0.3780660033226013,
-0.06278414279222488,
-0.16643568873405457,
0.03027733601629734,
-0.015553876757621765,
0.1984902173280716,
0.15066294372081757,
0.032334811985492706,
-0.08912307024002075,
0.08482809364795685,
0.49776479601860046,
-0.1206415519118309,
0.10821546614170074,
0.7329671382904053,
0.18241074681282043,
0.25251850485801697,
0.6751276850700378,
0.04650745913386345,
-0.4481540322303772,
0.06818932294845581,
-0.11899715662002563,
0.08168960362672806,
0.4081096649169922,
-0.2019965946674347,
-0.037720777094364166,
0.22747255861759186,
-0.02841951698064804,
-0.08068140596151352,
-0.04350850731134415,
0.2717989385128021,
-0.06355104595422745,
-0.1925967037677765,
-0.6949067115783691,
0.32637718319892883,
0.04629439488053322,
0.055055394768714905,
0.3932468295097351,
-0.06320075690746307,
-0.21818529069423676,
0.33147507905960083,
-0.250642865896225,
0.7336887717247009,
0.03167050704360008,
0.24861420691013336,
0.4243663549423218,
0.06705553084611893,
0.541929304599762,
-0.3392708897590637,
0.3031022548675537,
-0.23561714589595795,
-0.21696311235427856,
-0.09757900983095169,
-0.23094891011714935,
0.1357826441526413,
-0.00678054615855217,
-0.12312616407871246,
0.5089525580406189,
-0.03937561810016632,
0.17044858634471893,
0.07254287600517273,
-0.04158628731966019,
0.13749876618385315,
-0.07880780100822449,
-0.5680605173110962,
-0.09189990162849426,
-0.06400781124830246,
0.458019495010376,
-0.020397888496518135,
-0.2954035997390747,
-0.17173290252685547,
-0.10885515809059143,
-0.11932173371315002,
0.27004122734069824,
-0.2713299095630646,
0.11484916508197784,
-0.17027638852596283,
-0.22965162992477417,
-0.20663298666477203,
0.5957050919532776,
0.015737906098365784,
-0.27405402064323425,
-0.2360387146472931,
0.10159505903720856,
-0.08583316951990128,
-0.06399878114461899,
-0.2862360179424286,
-0.020859960466623306,
0.4229559898376465,
-0.056231461465358734,
0.125467449426651,
0.22606763243675232,
-0.3484792113304138,
-0.33015745878219604,
0.14138439297676086,
-0.0077240243554115295,
0.13022831082344055,
0.15168923139572144,
-0.30309340357780457,
0.23038385808467865,
-0.030553054064512253,
-0.0055948421359062195,
-0.035979144275188446,
0.3320120573043823,
-0.2605038583278656,
-0.1306089162826538,
0.12509050965309143,
-0.4186488389968872,
0.05600961297750473,
0.5095577836036682,
-0.09899619966745377,
-0.08053767681121826,
0.5796023607254028,
0.07903876900672913,
0.014624014496803284,
-0.09411761164665222,
-0.035414405167102814,
0.13921275734901428,
-0.4089435636997223,
0.018499642610549927,
0.11752893775701523,
0.4495130777359009,
-0.01794453337788582,
-0.14531998336315155,
0.1984335482120514,
-0.19419902563095093,
-0.11901581287384033,
-0.5495317578315735,
-0.34571683406829834,
0.25161927938461304,
-0.0040636248886585236,
-0.03885895386338234,
0.08790171891450882,
-0.24115051329135895,
0.3250117599964142,
-0.26385313272476196,
-0.1445634514093399,
0.13417871296405792,
-0.03510059416294098,
0.01557996403425932,
0.3310418128967285,
0.29731494188308716,
0.5081155896186829,
0.005203239619731903,
-0.029574386775493622,
-0.10920877754688263,
-0.26782962679862976,
-0.016459107398986816,
-0.1711958348751068,
0.22428160905838013,
0.008996538817882538,
0.01016123965382576,
-0.08980781584978104,
-0.31233543157577515,
0.04077443480491638,
-0.09009324759244919,
0.13522781431674957,
0.007678709924221039,
-0.07682108879089355,
-0.10031537711620331,
0.02223726361989975,
0.07231604307889938,
-0.3176237940788269,
0.14403575658798218,
-0.14253105223178864,
0.21355322003364563,
0.2520226240158081,
0.07151234894990921,
-0.24922914803028107,
-0.03290945291519165,
-0.10864301770925522,
-0.023339025676250458,
-0.15739725530147552,
0.12069582939147949,
0.2733628451824188,
-0.47369372844696045,
0.20883429050445557,
-0.22729137539863586,
0.24619588255882263,
0.5056759119033813,
-0.25575724244117737,
0.11799022555351257,
0.14962390065193176,
0.013403560034930706,
-0.2368481308221817,
0.055575642734766006,
0.3883465528488159,
0.01229021605104208,
0.03693488612771034,
0.24851197004318237,
0.08259586989879608,
-0.057654205709695816,
-0.03083132952451706,
0.10284128785133362,
0.4457438886165619,
-0.279132604598999,
0.3294127881526947,
0.2513260543346405,
0.022726666182279587,
0.31097346544265747,
-0.18483597040176392,
0.27625617384910583,
0.18916329741477966,
0.2923993468284607,
-0.28396767377853394,
0.274231493473053,
0.0029485374689102173,
0.005027309060096741,
-0.2885119318962097,
-0.7016329765319824,
-0.19544456899166107,
0.2740093767642975,
-0.07029135525226593,
0.2124181091785431,
-0.17065486311912537,
0.441879004240036,
-0.2873297929763794,
0.045421939343214035,
-0.06891363114118576,
0.03882700949907303,
-0.004409715533256531,
-0.019732048735022545,
0.006933022290468216,
-0.3594484329223633,
-0.12982678413391113,
0.03773970529437065,
0.15721037983894348,
-0.10275417566299438,
0.07637660950422287,
0.11776910722255707,
-0.11467210948467255,
-0.3325076103210449,
0.08281983435153961,
0.19250982999801636,
0.1029016450047493,
-0.20751622319221497,
0.3229023516178131,
0.052043430507183075,
-0.026669688522815704,
0.2489004284143448,
-0.029206087812781334,
0.4405820667743683,
0.4040922224521637,
0.012511813081800938,
0.09668635576963425,
0.051233451813459396,
-0.01563103124499321,
-0.0023513268679380417,
0.1049918457865715,
-0.07334627211093903,
-0.07750847935676575,
0.3697558343410492,
0.042847707867622375,
-0.0005617095157504082,
0.5029730796813965,
0.05337780341506004,
0.26282840967178345,
-0.11529621481895447,
0.0507754422724247,
-0.19040678441524506,
0.18569013476371765,
-0.18035069108009338,
-0.07833974808454514,
-0.4022848904132843,
0.10603669285774231,
0.3309735953807831,
-0.0755634754896164,
0.03970496729016304,
0.20518143475055695,
-0.00794911663979292,
0.06366850435733795,
0.29372504353523254,
0.569269061088562,
0.08704566955566406,
-0.2856687605381012,
-0.08491547405719757,
-0.8362773060798645,
0.09839443117380142,
-0.05558493360877037,
0.15319354832172394,
-0.20672139525413513,
0.23963536322116852,
0.04140351340174675,
0.023168403655290604,
0.15128014981746674,
-0.20265904068946838,
0.07856988161802292,
0.21656982600688934,
-0.2732827663421631,
-0.4324343204498291,
-0.02534099668264389,
0.3057149052619934,
-0.0117556843906641,
-0.2077805995941162,
-0.01574784889817238,
-0.20586638152599335,
-0.08629965782165527,
0.18446432054042816,
-0.0061544738709926605,
-0.22785089910030365,
-0.29335084557533264,
0.3055528998374939,
-0.1605859249830246,
0.26337701082229614,
-0.00014691799879074097,
-0.3095047175884247,
-0.4064837694168091,
-0.1211649477481842,
-0.1395140439271927,
0.15387097001075745,
0.14561042189598083,
0.6183735132217407,
-0.2559136152267456,
-0.10058233141899109,
-0.4920050799846649,
0.07983437925577164,
0.0873328149318695,
-0.28910431265830994,
-0.21636919677257538,
0.13126961886882782,
0.025163322687149048,
0.32422804832458496,
-0.034668032079935074,
0.09284847229719162,
-0.2129938304424286,
0.04309923201799393,
-0.25413429737091064,
-0.08506793528795242,
0.6583105325698853,
-0.5007294416427612,
0.050604384392499924,
0.012677420862019062,
0.22747531533241272,
0.1821148693561554,
0.19539712369441986,
-0.43326064944267273,
0.31161734461784363,
0.2842440605163574,
-0.06556510180234909,
-0.3021026849746704,
-0.0384882353246212,
-0.16203059256076813,
0.01859915629029274,
0.053810227662324905,
0.1984279751777649,
0.06919267773628235,
-0.45417290925979614,
0.2660907506942749,
-0.22592808306217194
] |
https://github.com/huggingface/datasets/issues/6324
|
Conversion to Arrow fails due to wrong type heuristic
|
Unlike Pandas, Arrow is strict with types, so converting the problematic strings to ints (or ints to strings) to ensure all the values have the same type is the only fix.
JSON support has been requested in Arrow [here](https://github.com/apache/arrow/issues/32538), but I don't expect this to be implemented soon.
Also, this type could be represented with the Arrow Union type. However, due to low usage, the Union type has limited support in the Arrow ecosystem (e.g., IIRC Parquet still does not support it). So, we should probably wait a bit more before adding support for it in `datasets`
|
### Describe the bug
I have a list of dictionaries with valid/JSON-serializable values.
One key is the denominator for a paragraph. In 99.9% of cases its a number, but there are some occurences of '1a', '2b' and so on.
If trying to convert this list to a dataset with `Dataset.from_list()`, I always get
`ArrowInvalid: Could not convert '1' with type str: tried to convert to int64`, presumably because pyarrow tries to convert the keys to integers.
Is there any way to circumvent this and fix dtypes? I didn't find anything in the documentation.
### Steps to reproduce the bug
* create a list of dicts with one key being a string of an integer for the first few thousand occurences and try to convert to dataset.
### Expected behavior
There shouldn't be an error (e.g. some flag to turn off automatic str to numeric conversion).
### Environment info
- `datasets` version: 2.14.5
- Platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.35
- Python version: 3.9.18
- Huggingface_hub version: 0.17.3
- PyArrow version: 13.0.0
- Pandas version: 2.1.1
| 97
|
Conversion to Arrow fails due to wrong type heuristic
### Describe the bug
I have a list of dictionaries with valid/JSON-serializable values.
One key is the denominator for a paragraph. In 99.9% of cases its a number, but there are some occurences of '1a', '2b' and so on.
If trying to convert this list to a dataset with `Dataset.from_list()`, I always get
`ArrowInvalid: Could not convert '1' with type str: tried to convert to int64`, presumably because pyarrow tries to convert the keys to integers.
Is there any way to circumvent this and fix dtypes? I didn't find anything in the documentation.
### Steps to reproduce the bug
* create a list of dicts with one key being a string of an integer for the first few thousand occurences and try to convert to dataset.
### Expected behavior
There shouldn't be an error (e.g. some flag to turn off automatic str to numeric conversion).
### Environment info
- `datasets` version: 2.14.5
- Platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.35
- Python version: 3.9.18
- Huggingface_hub version: 0.17.3
- PyArrow version: 13.0.0
- Pandas version: 2.1.1
Unlike Pandas, Arrow is strict with types, so converting the problematic strings to ints (or ints to strings) to ensure all the values have the same type is the only fix.
JSON support has been requested in Arrow [here](https://github.com/apache/arrow/issues/32538), but I don't expect this to be implemented soon.
Also, this type could be represented with the Arrow Union type. However, due to low usage, the Union type has limited support in the Arrow ecosystem (e.g., IIRC Parquet still does not support it). So, we should probably wait a bit more before adding support for it in `datasets`
|
[
-0.13682858645915985,
-0.0849025696516037,
0.04728252813220024,
0.1811200976371765,
0.4715588092803955,
-0.02025952935218811,
0.2181389331817627,
0.3003547191619873,
-0.2322428673505783,
-0.14563103020191193,
0.018225114792585373,
0.5438292622566223,
-0.03047063946723938,
-0.01941782981157303,
-0.22284570336341858,
-0.1401798129081726,
0.14481189846992493,
0.1447741985321045,
-0.012342989444732666,
-0.010029390454292297,
-0.09116487950086594,
0.042458727955818176,
-0.23945367336273193,
0.057064853608608246,
0.02432621829211712,
-0.13121870160102844,
0.058239929378032684,
-0.14985671639442444,
0.03776323050260544,
-0.4905490577220917,
0.0846591368317604,
-0.28318101167678833,
0.2623118758201599,
0.41524773836135864,
-0.0001317612041020766,
-0.04344490170478821,
0.4414130449295044,
0.06704549491405487,
-0.4016267657279968,
-0.026938751339912415,
0.03984399884939194,
-0.1301046907901764,
0.33474287390708923,
-0.1387093961238861,
-0.022732865065336227,
-0.5756146907806396,
-0.13077840209007263,
-0.3322681784629822,
0.5444527864456177,
0.4350404143333435,
0.07023653388023376,
-0.0513036884367466,
0.3298937976360321,
0.2046128511428833,
0.2996648848056793,
0.6489044427871704,
-0.13744255900382996,
0.40133532881736755,
0.03283773362636566,
0.14691655337810516,
0.023384712636470795,
-0.04808075353503227,
-0.07938174903392792,
-0.023378726094961166,
0.28368499875068665,
0.2077355831861496,
0.12684395909309387,
-0.14009328186511993,
0.0127726960927248,
0.13773730397224426,
0.5513535737991333,
-0.3630084991455078,
-0.3714389503002167,
-0.14967665076255798,
-0.2125922292470932,
-0.31994864344596863,
0.04351019114255905,
-0.1169440746307373,
-0.2649897038936615,
0.2442803978919983,
0.20584534108638763,
0.03551372513175011,
-0.35067620873451233,
0.3200682997703552,
-0.18492594361305237,
0.026977181434631348,
0.1276208609342575,
0.21029317378997803,
0.1124921441078186,
-0.27033621072769165,
0.4169248640537262,
-0.1462281197309494,
-0.03240111097693443,
-0.025840137153863907,
-0.06712853908538818,
-0.16937142610549927,
-0.22175467014312744,
-0.2578953802585602,
0.09080097824335098,
-0.03408937156200409,
-0.022695977240800858,
0.036726195365190506,
-0.00504430802538991,
-0.12479052692651749,
0.41303780674934387,
0.08274330198764801,
0.03957072272896767,
0.2591685354709625,
0.2073572725057602,
0.01611587032675743,
0.2857905328273773,
0.10380249470472336,
0.07224158942699432,
-0.09320934861898422,
0.40507805347442627,
-0.05244394391775131,
0.16210052371025085,
-0.048765357583761215,
-0.29105204343795776,
0.0721651166677475,
-0.6111747026443481,
0.18944190442562103,
-0.11021079868078232,
0.042410075664520264,
0.004937353543937206,
0.44487231969833374,
0.08133827149868011,
0.31035053730010986,
-0.10032954066991806,
-0.072076715528965,
0.09471994638442993,
-0.1246333122253418,
-0.09782111644744873,
-0.27456536889076233,
-0.040195174515247345,
0.12329518795013428,
-0.13801367580890656,
0.4077235162258148,
-0.05293659865856171,
-0.05561002716422081,
-0.09198891371488571,
-0.13345032930374146,
0.08158104121685028,
0.013636469841003418,
-0.41239258646965027,
0.1523524671792984,
0.19098515808582306,
-0.4022332429885864,
-0.15657684206962585,
0.33359554409980774,
-0.11086764186620712,
0.03303101286292076,
-0.31079035997390747,
-0.029562395066022873,
-0.05123423412442207,
-0.21259662508964539,
-0.3772578239440918,
0.2451881468296051,
0.26679012179374695,
0.015755310654640198,
0.17341287434101105,
-0.34232819080352783,
0.4138239324092865,
-0.36565691232681274,
-0.08409233391284943,
0.30491331219673157,
-0.6361575126647949,
0.07318805158138275,
-0.15354804694652557,
0.06406719982624054,
0.4378412067890167,
0.37734365463256836,
-0.1977822631597519,
-0.0436832532286644,
-0.06205512583255768,
0.22503776848316193,
0.1623394638299942,
-0.1378072202205658,
-0.3535793423652649,
0.24170272052288055,
0.13639843463897705,
-0.009381446987390518,
-0.03891286998987198,
0.04006090760231018,
0.1824597418308258,
-0.14371520280838013,
0.05915380269289017,
0.1696397215127945,
-0.17382711172103882,
0.029249565675854683,
-0.16769146919250488,
-0.17859934270381927,
0.35491371154785156,
-0.013313543051481247,
0.0034215226769447327,
0.02643457055091858,
0.19686737656593323,
-0.06882454454898834,
0.21566638350486755,
-0.15504619479179382,
0.10034975409507751,
-0.022476401180028915,
0.37753865122795105,
-0.14889337122440338,
0.27936339378356934,
-0.1129475086927414,
-0.3442211449146271,
-0.1510700136423111,
-0.23382046818733215,
-0.07369144260883331,
-0.3593273162841797,
-0.20009322464466095,
-0.30405691266059875,
0.18400944769382477,
0.03817915916442871,
0.3048069179058075,
0.004774339497089386,
-0.020262226462364197,
-0.11883410811424255,
0.11887694895267487,
-0.12279264628887177,
-0.362121045589447,
0.07618627697229385,
0.24994221329689026,
-0.007871031761169434,
0.08956379443407059,
0.0635947659611702,
-0.2630056142807007,
-0.13395226001739502,
0.15021084249019623,
0.06530946493148804,
-0.05439605563879013,
-0.22659268975257874,
0.34615856409072876,
0.18683810532093048,
-0.017209403216838837,
-0.13513991236686707,
0.20201915502548218,
0.3780088722705841,
-0.5087363719940186,
-0.09416014701128006,
0.6718677282333374,
0.11891768127679825,
-0.07466332614421844,
-0.1353265941143036,
0.14634324610233307,
0.09563682973384857,
0.39795762300491333,
-0.3194037675857544,
0.45797958970069885,
0.452377587556839,
0.18467704951763153,
-0.058840326964855194,
0.006893917918205261,
-0.17809906601905823,
0.06968149542808533,
-0.005111550912261009,
0.1713314652442932,
-0.35372206568717957,
0.2618499994277954,
0.04796725511550903,
-0.13460130989551544,
0.39059099555015564,
0.21623194217681885,
-0.24873340129852295,
-0.12194791436195374,
0.42337456345558167,
-0.06000452861189842,
0.1352468580007553,
0.05816531553864479,
0.08680202811956406,
-0.10834253579378128,
-0.2522045075893402,
-0.09179626405239105,
0.33084213733673096,
0.0833636000752449,
0.3344820737838745,
0.016149960458278656,
0.2856489419937134,
-0.05391495302319527,
-0.1570063978433609,
-0.04938359558582306,
0.0554933026432991,
0.18040400743484497,
-0.5236549973487854,
0.268939733505249,
-0.6220009922981262,
0.08874046057462692,
-0.0891137346625328,
-0.4559546113014221,
0.005154037848114967,
-0.18408113718032837,
-0.010516725480556488,
0.07603692263364792,
-0.22664634883403778,
0.1531391590833664,
0.02453763782978058,
0.1123960092663765,
0.03475222736597061,
-0.2968827486038208,
-0.48707690834999084,
-0.2665637135505676,
-0.5041363835334778,
-0.09755659103393555,
0.4451289474964142,
-0.16855843365192413,
0.14084313809871674,
-0.11713897436857224,
-0.22496441006660461,
-0.3526528477668762,
-0.4297932982444763,
0.10923391580581665,
-0.07495096325874329,
0.2268730252981186,
0.43123137950897217,
0.07836103439331055,
-0.2897130846977234,
0.1360330432653427,
0.14774416387081146,
0.2039867788553238,
-0.09927399456501007,
0.4640592634677887,
-0.19905875623226166,
0.06263497471809387,
-0.0472286194562912,
-0.13173294067382812,
-0.10859384387731552,
-0.04663708060979843,
0.21757030487060547,
0.032142702490091324,
0.10281556844711304,
0.2318899929523468,
0.3037421405315399,
0.002450936008244753,
-0.00246758246794343,
-0.041805267333984375,
0.009267706423997879,
0.5598143935203552,
0.4253515601158142,
0.027597010135650635,
-0.2779369354248047,
-0.11734794080257416,
-0.14642271399497986,
-0.14360398054122925,
0.31547367572784424,
-0.2789573669433594,
-0.019483231008052826,
-0.4158424437046051,
0.36541077494621277,
-0.300354927778244,
-0.051465943455696106,
0.1894466131925583,
0.2566224932670593,
0.05420014262199402,
-0.17485716938972473,
0.12276376783847809,
0.21628329157829285,
-0.09599696844816208,
0.3691689372062683,
0.311575323343277,
0.4768694341182709,
0.11151576042175293,
0.5113766193389893,
0.23471418023109436,
-0.4074246287345886,
0.29266446828842163,
-0.20278285443782806,
0.04919100180268288,
-0.052547357976436615,
0.0878053605556488,
-0.21398185193538666,
-0.07645104825496674,
-0.05743608623743057,
0.005947418510913849,
-0.13049212098121643,
-0.17282894253730774,
0.133427694439888,
0.09345562756061554,
-0.16954165697097778,
-0.21981477737426758,
0.13877296447753906,
-0.47326022386550903,
-0.06512435525655746,
-0.11367590725421906,
0.2126522660255432,
-0.008510969579219818,
-0.17001435160636902,
0.31195810437202454,
-0.10762712359428406,
0.06420496851205826,
0.11488974839448929,
-0.0026821568608283997,
-0.34382712841033936,
-0.20760437846183777,
0.30798473954200745,
0.038251958787441254,
0.4472110867500305,
0.12195760011672974,
-0.08504030108451843,
0.10881692916154861,
0.09158822149038315,
0.24134111404418945,
0.003116834908723831,
-0.15771906077861786,
-0.007532515563070774,
0.17976310849189758,
-0.4071443974971771,
0.0004880577325820923,
-0.4205712676048279,
0.36802250146865845,
-0.11087468266487122,
0.11444645375013351,
-0.8034753203392029,
-0.01293166633695364,
0.039642058312892914,
0.26643529534339905,
-0.016213063150644302,
0.056228604167699814,
-0.016629517078399658,
-0.491566926240921,
-0.2424817532300949,
0.12883219122886658,
0.48117896914482117,
0.23719565570354462,
0.003879561787471175,
-0.3535948395729065,
-0.4570029377937317,
-0.26293039321899414,
0.06288443505764008,
-0.013617517426609993,
0.4451967775821686,
-0.2725297212600708,
-0.12437690794467926,
-0.2128949761390686,
0.2886395752429962,
0.5579570531845093,
0.31806066632270813,
0.3739628791809082,
-0.7592394351959229,
-0.006943494081497192,
-0.03729526698589325,
0.1453828066587448,
0.05208153277635574,
-0.22304849326610565,
0.06593921035528183,
-0.12393598258495331,
0.013838812708854675,
0.11814799904823303,
-0.11855843663215637,
0.16297684609889984,
0.03231339529156685,
-0.14382795989513397,
-0.017770860344171524,
0.6464679837226868,
-0.009293113835155964,
-0.05909043550491333,
0.21741145849227905,
0.49831855297088623,
-0.2127024531364441,
0.25765836238861084,
0.6020824909210205,
1.0010312795639038,
0.059888944029808044,
0.09912268817424774,
0.36238327622413635,
-0.3910542130470276,
0.3571861684322357,
0.36695152521133423,
-0.15701942145824432,
-0.5157110691070557,
0.3092913329601288,
-0.0684153363108635,
-0.15495789051055908,
-0.021558165550231934,
0.20251797139644623,
-0.29689711332321167,
0.13136988878250122,
-0.6691046953201294,
0.4036335349082947,
0.3493691086769104,
-0.16615739464759827,
-0.2555927634239197,
-0.1450258195400238,
-0.1547747403383255,
-0.016564100980758667,
-0.16202351450920105,
-0.1302763968706131,
-0.11125323921442032,
-0.27720701694488525,
-0.3061895966529846,
-0.06431391835212708,
-0.23042739927768707,
-0.036033034324645996,
-0.2759396433830261,
0.18415726721286774,
0.17320527136325836,
-0.41828036308288574,
0.09120242297649384,
0.4346732199192047,
0.3287699818611145,
-0.015602290630340576,
-0.2971610128879547,
-0.1102728396654129,
0.09209377318620682,
0.11734648793935776,
0.3005245625972748,
-0.1569167673587799,
0.3818916380405426,
0.12007623165845871,
-0.03431811183691025,
0.0335264578461647,
-0.08072487264871597,
-0.17581060528755188,
-0.03412691503763199,
-0.13466884195804596,
-0.13165633380413055,
-0.28367429971694946,
0.24343277513980865,
-0.4016979932785034,
-0.26941582560539246,
-0.15773309767246246,
-0.026335421949625015,
0.032353825867176056,
0.1845150738954544,
0.3002810478210449,
-0.15308907628059387,
-0.07603207230567932,
0.08267528563737869,
-0.14544185996055603,
0.0783681720495224,
-0.007433116436004639,
0.35199597477912903,
0.15628907084465027,
-0.28127384185791016,
-0.12082623690366745,
0.15615007281303406,
0.08233954757452011,
-0.6633655428886414,
0.6123897433280945,
-0.35277795791625977,
-0.1005968451499939,
-0.23288853466510773,
0.22014828026294708,
0.22177033126354218,
0.1372954249382019,
-0.31152835488319397,
-0.12726277112960815,
-0.20221328735351562,
0.29961270093917847,
0.059507690370082855,
0.10115322470664978,
-0.10088234394788742,
-0.12644438445568085,
-0.0831373780965805,
-0.4355829060077667,
-0.09865725785493851,
-0.04030759632587433,
0.11299016326665878,
0.044075898826122284,
-0.44199642539024353,
0.15384557843208313,
-0.05744486674666405,
0.01747903786599636,
-0.011097735725343227,
0.21959321200847626,
0.3535875678062439,
-0.02801208570599556,
-0.014217578805983067,
0.2113327980041504,
0.18211302161216736,
-0.1694985032081604,
0.0900966078042984,
-0.21026302874088287,
-0.19886018335819244,
-0.1880837380886078,
-0.2283225804567337,
0.09278548508882523,
-0.058830246329307556,
0.1928710788488388,
0.5386660099029541,
0.17694702744483948,
-0.022297605872154236,
0.16165460646152496,
-0.0915633887052536,
0.3068058490753174,
-0.26791995763778687,
0.3804546892642975,
0.2615574300289154,
-0.10977564752101898,
-0.20246024429798126,
0.2799476087093353,
0.25839346647262573,
-0.15138593316078186,
0.34097933769226074,
-0.3019234538078308,
-0.10776835680007935,
0.2512288987636566,
0.37390080094337463,
0.5679662227630615,
-0.32210326194763184,
-0.029825009405612946,
0.26851874589920044,
0.007008418440818787,
-0.2655186057090759,
-0.09679564088582993,
-0.2918042540550232,
0.053679294884204865,
-0.16490687429904938,
0.34933188557624817,
0.00020920485258102417,
-0.09546391665935516,
-0.13367368280887604,
-0.10884198546409607,
-0.00023500295355916023,
-0.14985963702201843,
-0.021227296441793442,
0.8244534134864807,
-0.07959044724702835,
-0.04014277830719948,
0.38262778520584106,
-0.20422863960266113,
0.2140336036682129,
0.18416562676429749,
-0.20767536759376526,
0.16880203783512115,
0.23953735828399658,
-0.08054998517036438,
0.22836413979530334,
0.1410808563232422,
-0.01842130348086357,
0.14839638769626617,
0.32652586698532104,
0.02975359931588173,
0.4701927602291107,
0.5095993280410767,
0.10397802293300629,
-0.10530436038970947,
-0.31998664140701294,
-0.057373445481061935,
-0.14800599217414856,
-0.05072434991598129,
-0.2866182029247284,
0.00044721364974975586,
-0.23089522123336792,
-0.31619730591773987,
-0.3596076965332031,
-0.1368183046579361,
0.4805125892162323,
0.27203336358070374,
0.049129776656627655,
-0.6377257704734802,
0.33119747042655945,
0.12920726835727692,
0.3132954239845276,
-0.13360391557216644,
-0.03882826119661331,
0.21925850212574005,
-0.3035036325454712,
-0.0026741214096546173,
0.23843376338481903,
0.2880112826824188,
0.470098614692688,
-0.49873632192611694,
0.06966488063335419,
-0.1716660112142563,
-0.19809533655643463,
0.056355834007263184,
0.2733144760131836,
-0.08425186574459076,
0.18346931040287018,
0.24535782635211945,
-0.061875395476818085,
0.029034622013568878,
0.02181386575102806,
-0.13191775977611542,
0.05907248333096504,
-0.08050177991390228,
0.5277169942855835,
-0.10158433020114899,
-0.17517706751823425,
0.17115066945552826,
-0.16082140803337097,
0.031630970537662506,
-0.4209369421005249,
0.29472312331199646,
-0.006085550412535667,
0.07963623851537704,
-0.01862257346510887,
-0.007535761222243309,
-0.01611560955643654,
0.2568803131580353,
0.0322723388671875,
0.19239798188209534,
-0.12631089985370636,
0.3500330448150635,
-0.46415644884109497,
0.13124515116214752,
0.11899757385253906,
-0.3092333972454071,
0.46756264567375183,
0.26888641715049744,
0.06052796542644501,
0.4125378727912903,
0.2905598282814026,
0.16136480867862701,
0.08003982901573181,
0.41237837076187134,
0.08394482731819153,
-0.0804358720779419,
0.03245575726032257,
0.04972316324710846,
-0.09441124647855759,
-0.36901170015335083,
0.586049497127533,
0.16629989445209503,
-0.09941619634628296,
-0.11778688430786133,
0.024264074862003326,
0.35918232798576355,
-0.07725121080875397,
0.21031349897384644,
0.37002795934677124,
0.22688601911067963,
0.09038368612527847,
0.008393997326493263,
-0.076866015791893,
-0.25791093707084656,
-0.5177484750747681,
0.43527859449386597,
-0.3379298746585846,
0.023058786988258362,
-0.2274778038263321,
0.022333821281790733,
-0.1824500858783722,
-0.1368495374917984,
0.040114209055900574,
0.0827593058347702,
-0.5482502579689026,
0.3058658540248871,
-0.3401004374027252,
0.024329839274287224,
0.03263542801141739,
0.08888512849807739,
0.07851359248161316,
0.26627248525619507,
-0.22932404279708862,
-0.709501326084137,
0.3188706636428833,
-0.22307509183883667,
-0.25814029574394226,
0.19129745662212372,
0.04589443653821945,
0.2611645460128784,
-0.16886062920093536,
-0.27929115295410156,
-0.25161176919937134,
0.3285360634326935,
0.018602659925818443,
-0.04695799574255943,
-0.13127225637435913,
0.11324892938137054,
0.15973669290542603,
-0.22598934173583984,
0.6453506946563721,
-0.16285079717636108,
0.18914704024791718,
0.046518001705408096,
-0.38776475191116333
] |
https://github.com/huggingface/datasets/issues/6324
|
Conversion to Arrow fails due to wrong type heuristic
|
> Unlike Pandas, Arrow is strict with types, so converting the problematic strings to ints (or ints to strings) to ensure all the values have the same type is the only fix.
>
> JSON support has been requested in Arrow [here](https://github.com/apache/arrow/issues/32538), but I don't expect this to be implemented soon.
>
> Also, this type could be represented with the Arrow Union type. However, due to low usage, the Union type has limited support in the Arrow ecosystem (e.g., IIRC Parquet still does not support it). So, we should probably wait a bit more before adding support for it in `datasets`
Ok many thanks, I was able to mitigate the problem by manually checking and converting all problematic fields now.
|
### Describe the bug
I have a list of dictionaries with valid/JSON-serializable values.
One key is the denominator for a paragraph. In 99.9% of cases its a number, but there are some occurences of '1a', '2b' and so on.
If trying to convert this list to a dataset with `Dataset.from_list()`, I always get
`ArrowInvalid: Could not convert '1' with type str: tried to convert to int64`, presumably because pyarrow tries to convert the keys to integers.
Is there any way to circumvent this and fix dtypes? I didn't find anything in the documentation.
### Steps to reproduce the bug
* create a list of dicts with one key being a string of an integer for the first few thousand occurences and try to convert to dataset.
### Expected behavior
There shouldn't be an error (e.g. some flag to turn off automatic str to numeric conversion).
### Environment info
- `datasets` version: 2.14.5
- Platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.35
- Python version: 3.9.18
- Huggingface_hub version: 0.17.3
- PyArrow version: 13.0.0
- Pandas version: 2.1.1
| 121
|
Conversion to Arrow fails due to wrong type heuristic
### Describe the bug
I have a list of dictionaries with valid/JSON-serializable values.
One key is the denominator for a paragraph. In 99.9% of cases its a number, but there are some occurences of '1a', '2b' and so on.
If trying to convert this list to a dataset with `Dataset.from_list()`, I always get
`ArrowInvalid: Could not convert '1' with type str: tried to convert to int64`, presumably because pyarrow tries to convert the keys to integers.
Is there any way to circumvent this and fix dtypes? I didn't find anything in the documentation.
### Steps to reproduce the bug
* create a list of dicts with one key being a string of an integer for the first few thousand occurences and try to convert to dataset.
### Expected behavior
There shouldn't be an error (e.g. some flag to turn off automatic str to numeric conversion).
### Environment info
- `datasets` version: 2.14.5
- Platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.35
- Python version: 3.9.18
- Huggingface_hub version: 0.17.3
- PyArrow version: 13.0.0
- Pandas version: 2.1.1
> Unlike Pandas, Arrow is strict with types, so converting the problematic strings to ints (or ints to strings) to ensure all the values have the same type is the only fix.
>
> JSON support has been requested in Arrow [here](https://github.com/apache/arrow/issues/32538), but I don't expect this to be implemented soon.
>
> Also, this type could be represented with the Arrow Union type. However, due to low usage, the Union type has limited support in the Arrow ecosystem (e.g., IIRC Parquet still does not support it). So, we should probably wait a bit more before adding support for it in `datasets`
Ok many thanks, I was able to mitigate the problem by manually checking and converting all problematic fields now.
|
[
-0.12485140562057495,
-0.08872374147176743,
0.048213306814432144,
0.1975042223930359,
0.4978136420249939,
-0.03315114974975586,
0.2346266508102417,
0.3139345049858093,
-0.23804928362369537,
-0.1408151537179947,
0.036657921969890594,
0.5494911074638367,
-0.01877802237868309,
-0.01878339797258377,
-0.21995535492897034,
-0.1503709852695465,
0.15172013640403748,
0.13658025860786438,
-0.012384757399559021,
-0.010054212063550949,
-0.09933894872665405,
0.04565950483083725,
-0.23990504443645477,
0.07427050173282623,
0.03750109672546387,
-0.12871365249156952,
0.07079873979091644,
-0.11871116608381271,
0.025206826627254486,
-0.48886290192604065,
0.06472346931695938,
-0.31287604570388794,
0.24496102333068848,
0.4183105528354645,
-0.00013097665214445442,
-0.044676415622234344,
0.42467355728149414,
0.07202747464179993,
-0.3770173490047455,
-0.05143415927886963,
0.0626583844423294,
-0.1297341138124466,
0.33196568489074707,
-0.1358090341091156,
-0.034779973328113556,
-0.547925591468811,
-0.13242894411087036,
-0.29716500639915466,
0.5558770895004272,
0.4569958448410034,
0.07180270552635193,
-0.03845398128032684,
0.34842875599861145,
0.21632398664951324,
0.30520254373550415,
0.626817524433136,
-0.13907065987586975,
0.40302735567092896,
0.033021632581949234,
0.14916393160820007,
0.018470115959644318,
-0.04652244970202446,
-0.08618046343326569,
-0.04732803627848625,
0.2776552736759186,
0.19641421735286713,
0.13698261976242065,
-0.14987313747406006,
0.029303789138793945,
0.12405087798833847,
0.5319575071334839,
-0.3739219903945923,
-0.36659422516822815,
-0.13749590516090393,
-0.2140275537967682,
-0.3423193395137787,
0.061505384743213654,
-0.11081986874341965,
-0.26093828678131104,
0.23732231557369232,
0.21721288561820984,
0.0455847904086113,
-0.3676064610481262,
0.3111523389816284,
-0.19766245782375336,
0.03003159537911415,
0.12925702333450317,
0.20669123530387878,
0.09616803377866745,
-0.27849334478378296,
0.42059850692749023,
-0.14847531914710999,
-0.029869098216295242,
-0.029490508139133453,
-0.08686113357543945,
-0.1771732121706009,
-0.22019895911216736,
-0.2893083095550537,
0.08374170958995819,
-0.034141041338443756,
-0.019793801009655,
0.05032304674386978,
0.013588217087090015,
-0.12294474989175797,
0.41101276874542236,
0.0883556455373764,
0.021224968135356903,
0.26087361574172974,
0.20237049460411072,
0.0346631184220314,
0.2728981375694275,
0.09805677831172943,
0.0815422534942627,
-0.10471027344465256,
0.390080064535141,
-0.046391092240810394,
0.16912458837032318,
-0.06329059600830078,
-0.28449174761772156,
0.07756028324365616,
-0.6172126531600952,
0.19651642441749573,
-0.10106239467859268,
0.045389845967292786,
0.0029735234566032887,
0.426352858543396,
0.08328232914209366,
0.326415479183197,
-0.08917181938886642,
-0.07022687792778015,
0.09188034385442734,
-0.11686719954013824,
-0.11458566784858704,
-0.26652777194976807,
-0.04517355188727379,
0.12249371409416199,
-0.13094215095043182,
0.41207700967788696,
-0.0620754212141037,
-0.06806617975234985,
-0.11258579045534134,
-0.14725373685359955,
0.07038314640522003,
0.02398526296019554,
-0.4142843782901764,
0.15462589263916016,
0.2022460401058197,
-0.39543449878692627,
-0.14234523475170135,
0.3421093821525574,
-0.12517762184143066,
0.01605275645852089,
-0.29473334550857544,
-0.027946583926677704,
-0.03825325891375542,
-0.21775928139686584,
-0.37927868962287903,
0.24460570514202118,
0.2726570665836334,
0.025490600615739822,
0.18006157875061035,
-0.33947545289993286,
0.404485821723938,
-0.362895131111145,
-0.08468478918075562,
0.3081028461456299,
-0.6199197769165039,
0.09634993970394135,
-0.14590011537075043,
0.07215772569179535,
0.4422958195209503,
0.38838285207748413,
-0.19949813187122345,
-0.048806168138980865,
-0.04793528467416763,
0.23373658955097198,
0.16463157534599304,
-0.1470555067062378,
-0.34062331914901733,
0.24772092700004578,
0.1263037472963333,
0.0021105948835611343,
-0.0533466711640358,
0.015440949238836765,
0.18129613995552063,
-0.14097420871257782,
0.023608382791280746,
0.16800659894943237,
-0.17859162390232086,
0.05367138236761093,
-0.18764148652553558,
-0.1649438589811325,
0.3638268709182739,
-0.015086140483617783,
0.020339271053671837,
0.01887587457895279,
0.2007196545600891,
-0.06652798503637314,
0.2107316553592682,
-0.15650969743728638,
0.09634710103273392,
-0.019397638738155365,
0.38382554054260254,
-0.17077796161174774,
0.2705715596675873,
-0.11428215354681015,
-0.34400925040245056,
-0.1538633108139038,
-0.26064109802246094,
-0.0490102618932724,
-0.36139851808547974,
-0.16486863791942596,
-0.3207901120185852,
0.1810479462146759,
0.04493088647723198,
0.29574844241142273,
0.008472226560115814,
-0.0328376442193985,
-0.1362467259168625,
0.12104685604572296,
-0.1253841370344162,
-0.3765895366668701,
0.052519895136356354,
0.26657232642173767,
-0.0007991846650838852,
0.08168600499629974,
0.05703713744878769,
-0.2683149576187134,
-0.13456296920776367,
0.13664431869983673,
0.10060573369264603,
-0.04957819730043411,
-0.23878198862075806,
0.34017813205718994,
0.18884439766407013,
0.0020416006445884705,
-0.15255069732666016,
0.19315797090530396,
0.3829728364944458,
-0.5196547508239746,
-0.09672284871339798,
0.6666398048400879,
0.10906888544559479,
-0.085110604763031,
-0.1075427308678627,
0.1435512900352478,
0.10820309817790985,
0.39759373664855957,
-0.30357688665390015,
0.44294002652168274,
0.4629984200000763,
0.16140733659267426,
-0.0421023964881897,
0.018955588340759277,
-0.17798368632793427,
0.096785768866539,
-0.013322144746780396,
0.17742352187633514,
-0.3669862449169159,
0.279065877199173,
0.05832497030496597,
-0.13051027059555054,
0.3602922856807709,
0.23232895135879517,
-0.22359472513198853,
-0.13191008567810059,
0.4135233461856842,
-0.06464005261659622,
0.12877458333969116,
0.05590032786130905,
0.07526283711194992,
-0.08912624418735504,
-0.24721992015838623,
-0.09558790177106857,
0.35209155082702637,
0.0708906427025795,
0.3551473319530487,
0.025747150182724,
0.28789862990379333,
-0.048592302948236465,
-0.1592746078968048,
-0.026901796460151672,
0.087349534034729,
0.19570797681808472,
-0.5355435013771057,
0.26507076621055603,
-0.6220178604125977,
0.09528063982725143,
-0.10153228044509888,
-0.4670175015926361,
-0.006573401391506195,
-0.16697804629802704,
-0.007162518799304962,
0.10044197738170624,
-0.22346127033233643,
0.16830752789974213,
0.05782606080174446,
0.10293019562959671,
0.03898531198501587,
-0.30002251267433167,
-0.4990983307361603,
-0.26600292325019836,
-0.5077589750289917,
-0.09522034227848053,
0.4678553342819214,
-0.1727360337972641,
0.12591971457004547,
-0.09720401465892792,
-0.2378462702035904,
-0.3732493221759796,
-0.4368833899497986,
0.09693475812673569,
-0.09029482305049896,
0.2177511304616928,
0.4046846628189087,
0.09469231218099594,
-0.2850630581378937,
0.12604805827140808,
0.1513749361038208,
0.20598562061786652,
-0.11129139363765717,
0.49780672788619995,
-0.21077248454093933,
0.046416766941547394,
-0.046338945627212524,
-0.14030247926712036,
-0.10513515770435333,
-0.04673682898283005,
0.20596924424171448,
0.03304537758231163,
0.10679946839809418,
0.2459440678358078,
0.2944011390209198,
-0.01460888423025608,
0.008610517717897892,
-0.04102971404790878,
0.011982136406004429,
0.5468546152114868,
0.4142501950263977,
0.024842899292707443,
-0.28746363520622253,
-0.11097350716590881,
-0.13534128665924072,
-0.1345595121383667,
0.33399254083633423,
-0.2919071316719055,
-0.009124761447310448,
-0.4057168960571289,
0.3602806627750397,
-0.30964434146881104,
-0.06920120120048523,
0.19511553645133972,
0.2649436593055725,
0.053969815373420715,
-0.16031736135482788,
0.11303313076496124,
0.20903337001800537,
-0.08242138475179672,
0.396579772233963,
0.2893504500389099,
0.4936218857765198,
0.12367215752601624,
0.5195544362068176,
0.21731562912464142,
-0.399058073759079,
0.3025694787502289,
-0.20434552431106567,
0.03608496114611626,
-0.05512867122888565,
0.07674626260995865,
-0.20297454297542572,
-0.08211368322372437,
-0.056661393493413925,
-0.0009357854723930359,
-0.15559643507003784,
-0.18531283736228943,
0.1251460313796997,
0.08589375019073486,
-0.17863884568214417,
-0.22273582220077515,
0.14881370961666107,
-0.45223796367645264,
-0.0482097864151001,
-0.10321006178855896,
0.21133941411972046,
-0.010280211456120014,
-0.19288218021392822,
0.3190251886844635,
-0.10384581983089447,
0.05225873365998268,
0.11071217805147171,
0.017370600253343582,
-0.36291489005088806,
-0.20719069242477417,
0.3008168041706085,
0.040536895394325256,
0.4408034384250641,
0.11034192144870758,
-0.07987752556800842,
0.1155901700258255,
0.08734831213951111,
0.2420964241027832,
0.016934089362621307,
-0.15507091581821442,
-0.007472573779523373,
0.1630571335554123,
-0.3829244077205658,
-0.005627099424600601,
-0.41128021478652954,
0.35455843806266785,
-0.11555308103561401,
0.13620971143245697,
-0.8197728991508484,
-0.02257627062499523,
0.042056478559970856,
0.264767587184906,
-0.022859012708067894,
0.05664055421948433,
-0.021956462413072586,
-0.4991350769996643,
-0.24231946468353271,
0.12746332585811615,
0.4702296853065491,
0.24247868359088898,
-0.00004340917803347111,
-0.3485269844532013,
-0.4352710545063019,
-0.25219666957855225,
0.048502467572689056,
0.0028570257127285004,
0.42660531401634216,
-0.27767252922058105,
-0.12490341067314148,
-0.22906279563903809,
0.27724507451057434,
0.572695791721344,
0.30822476744651794,
0.3845004439353943,
-0.7485793232917786,
-0.022111356258392334,
-0.030757907778024673,
0.1392437368631363,
0.07678350806236267,
-0.22449694573879242,
0.08388065546751022,
-0.1426818072795868,
0.008237853646278381,
0.12355615943670273,
-0.14899678528308868,
0.18988525867462158,
0.02325231209397316,
-0.11764489859342575,
-0.0033319946378469467,
0.6376665234565735,
-0.045536383986473083,
-0.04053574427962303,
0.19910785555839539,
0.5017043948173523,
-0.20047390460968018,
0.2708585858345032,
0.5901238918304443,
1.0203721523284912,
0.04825180396437645,
0.0784187763929367,
0.3830801248550415,
-0.39999163150787354,
0.3698697090148926,
0.3617646098136902,
-0.15506111085414886,
-0.5382651090621948,
0.298857182264328,
-0.06103985756635666,
-0.1456591933965683,
0.0024779140949249268,
0.20680934190750122,
-0.2971043288707733,
0.12575432658195496,
-0.6548367738723755,
0.39121612906455994,
0.34569528698921204,
-0.16955159604549408,
-0.2430620789527893,
-0.15487885475158691,
-0.1929163783788681,
-0.01824634149670601,
-0.18454083800315857,
-0.13639870285987854,
-0.10887247323989868,
-0.2958377003669739,
-0.31083065271377563,
-0.07330335676670074,
-0.22200921177864075,
-0.009167270734906197,
-0.28348225355148315,
0.18684296309947968,
0.1745789647102356,
-0.40624403953552246,
0.09771549701690674,
0.4115563631057739,
0.34862005710601807,
-0.03896384313702583,
-0.29282471537590027,
-0.10306668281555176,
0.10090673714876175,
0.11684898287057877,
0.2911919355392456,
-0.14586399495601654,
0.3995174765586853,
0.09743856638669968,
-0.03437843173742294,
0.04196293652057648,
-0.09341643750667572,
-0.17231759428977966,
-0.026870280504226685,
-0.14492405951023102,
-0.13257978856563568,
-0.2885770797729492,
0.22461272776126862,
-0.40008169412612915,
-0.27915799617767334,
-0.16805477440357208,
-0.021135736256837845,
0.014200471341609955,
0.18040086328983307,
0.31032848358154297,
-0.17262354493141174,
-0.08693980425596237,
0.07323043048381805,
-0.15899765491485596,
0.050563544034957886,
0.010137032717466354,
0.35956138372421265,
0.15576046705245972,
-0.28075408935546875,
-0.11384715139865875,
0.1420290470123291,
0.06410021334886551,
-0.6596925258636475,
0.6000438332557678,
-0.3443814814090729,
-0.10577491670846939,
-0.22681032121181488,
0.2108197808265686,
0.223892480134964,
0.14070209860801697,
-0.2978649139404297,
-0.13834962248802185,
-0.20123977959156036,
0.28678831458091736,
0.06349548697471619,
0.0865049734711647,
-0.09522378444671631,
-0.07607100903987885,
-0.07539692521095276,
-0.4222556948661804,
-0.10263073444366455,
-0.02713119238615036,
0.1003098115324974,
0.05855686217546463,
-0.4548484981060028,
0.1460082083940506,
-0.05764969065785408,
0.01947740837931633,
-0.01309161726385355,
0.22069093585014343,
0.3604150712490082,
-0.029252899810671806,
-0.022305315360426903,
0.21260128915309906,
0.2089117169380188,
-0.17487403750419617,
0.08130350708961487,
-0.21398253738880157,
-0.19344362616539001,
-0.18086043000221252,
-0.23221908509731293,
0.10780968517065048,
-0.06067046523094177,
0.18876846134662628,
0.5265465974807739,
0.1802578866481781,
-0.03289151191711426,
0.15798082947731018,
-0.10781368613243103,
0.30956918001174927,
-0.2680618166923523,
0.37600916624069214,
0.23981629312038422,
-0.11390377581119537,
-0.21812814474105835,
0.2624070942401886,
0.2600097060203552,
-0.16013139486312866,
0.36154821515083313,
-0.3003014922142029,
-0.13033398985862732,
0.24425216019153595,
0.3683300018310547,
0.5649341344833374,
-0.3313182592391968,
-0.03373539447784424,
0.27475082874298096,
0.00595126673579216,
-0.28236672282218933,
-0.08456933498382568,
-0.3026977777481079,
0.028203383088111877,
-0.16928233206272125,
0.3382234573364258,
0.014153022319078445,
-0.09675709158182144,
-0.11278358101844788,
-0.10285039246082306,
0.017700590193271637,
-0.15101909637451172,
-0.025827156379818916,
0.7979105114936829,
-0.0943412333726883,
-0.035804633051157,
0.38379013538360596,
-0.18323397636413574,
0.2033916860818863,
0.15591955184936523,
-0.19583258032798767,
0.14498399198055267,
0.2044273316860199,
-0.09304538369178772,
0.21500876545906067,
0.13299976289272308,
-0.027263890951871872,
0.15399204194545746,
0.32059216499328613,
0.01775301992893219,
0.4642987549304962,
0.5076863765716553,
0.12105343490839005,
-0.10204239189624786,
-0.30655795335769653,
-0.023228053003549576,
-0.14856606721878052,
-0.024384737014770508,
-0.27882567048072815,
0.006461791694164276,
-0.24005027115345,
-0.3175472915172577,
-0.3572346866130829,
-0.1264091581106186,
0.47649314999580383,
0.29650557041168213,
0.028609193861484528,
-0.6129871010780334,
0.29970210790634155,
0.1368495374917984,
0.3166465759277344,
-0.13799990713596344,
-0.02748025767505169,
0.21586070954799652,
-0.3315262496471405,
-0.013345535844564438,
0.23748661577701569,
0.2848587930202484,
0.49884340167045593,
-0.5094782710075378,
0.07079793512821198,
-0.15669681131839752,
-0.2109988033771515,
0.07478437572717667,
0.2802239656448364,
-0.0794980525970459,
0.1898345649242401,
0.24559064209461212,
-0.06529588252305984,
0.027807798236608505,
0.0181733388453722,
-0.10215547680854797,
0.06672659516334534,
-0.059886541217565536,
0.5153330564498901,
-0.08774979412555695,
-0.17590530216693878,
0.16021372377872467,
-0.170684814453125,
0.0261426642537117,
-0.40667736530303955,
0.2906060218811035,
-0.0021203728392720222,
0.09424692392349243,
-0.023694071918725967,
-0.0037807654589414597,
0.0042157527059316635,
0.270651251077652,
0.020558815449476242,
0.1779009997844696,
-0.16110430657863617,
0.3495274782180786,
-0.4689396619796753,
0.15801134705543518,
0.1319713592529297,
-0.2817530632019043,
0.4813888370990753,
0.2688390612602234,
0.06086146831512451,
0.39411312341690063,
0.28880730271339417,
0.1314837783575058,
0.09360823035240173,
0.4270614683628082,
0.0922655314207077,
-0.07046973705291748,
0.03360549733042717,
0.0413302406668663,
-0.10111639648675919,
-0.3493729829788208,
0.611733615398407,
0.1700659990310669,
-0.09659275412559509,
-0.12304189801216125,
0.029964663088321686,
0.35402801632881165,
-0.05689898133277893,
0.18597471714019775,
0.3587225079536438,
0.2307998239994049,
0.07904686033725739,
0.004006505012512207,
-0.06611713767051697,
-0.2571456730365753,
-0.5300302505493164,
0.4403582811355591,
-0.32179179787635803,
0.003551911562681198,
-0.19439713656902313,
0.0009371787309646606,
-0.20649906992912292,
-0.11848520487546921,
0.03852279484272003,
0.051352955400943756,
-0.5619804263114929,
0.30111196637153625,
-0.3102346956729889,
0.024811746552586555,
0.03491462394595146,
0.10210401564836502,
0.08559344708919525,
0.28276294469833374,
-0.25189322233200073,
-0.7251488566398621,
0.32851386070251465,
-0.2293851375579834,
-0.25900501012802124,
0.19816985726356506,
0.05380943790078163,
0.2407495379447937,
-0.16849385201931,
-0.28630173206329346,
-0.2519228160381317,
0.31533122062683105,
0.017704911530017853,
-0.04806772619485855,
-0.13347555696964264,
0.09746775031089783,
0.16337868571281433,
-0.2201423943042755,
0.6513060331344604,
-0.14597377181053162,
0.19833843410015106,
0.045170556753873825,
-0.36665022373199463
] |
https://github.com/huggingface/datasets/issues/6320
|
Dataset slice splits can't load training and validation at the same time
|
The expression "train+test" concatenates the splits.
The individual splits as separate datasets can be obtained as follows:
```python
train_ds, test_ds = load_dataset("<dataset_name>", split=["train", "test"])
train_10pct_ds, test_10pct_ds = load_dataset("<dataset_name>", split=["train[:10%]", "test[:%10]"])
```
|
### Describe the bug
According to the [documentation](https://huggingface.co/docs/datasets/v2.14.5/loading#slice-splits) is should be possible to run the following command:
`train_test_ds = datasets.load_dataset("bookcorpus", split="train+test")`
to load the train and test sets from the dataset.
However executing the equivalent code:
`speech_commands_v1 = load_dataset("superb", "ks", split="train+test")`
only yields the following output:
> Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 54175
> })
Where loading the dataset without the split argument yields:
> DatasetDict({
> train: Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 51094
> })
> validation: Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 6798
> })
> test: Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 3081
> })
> })
Thus, the API seems to be broken in this regard.
This is a bit annoying since I want to be able to use the split argument with `split="train[:10%]+test[:10%]"` to have smaller dataset to work with when validating my model is working correctly.
### Steps to reproduce the bug
`speech_commands_v1 = load_dataset("superb", "ks", split="train+test")`
### Expected behavior
> DatasetDict({
> train: Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 51094
> })
> test: Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 3081
> })
> })
### Environment info
```
import datasets
print(datasets.__version__)
```
> 2.14.5
```
import sys
print(sys.version)
```
> 3.9.17 (main, Jul 5 2023, 20:41:20)
> [GCC 11.2.0]
| 31
|
Dataset slice splits can't load training and validation at the same time
### Describe the bug
According to the [documentation](https://huggingface.co/docs/datasets/v2.14.5/loading#slice-splits) is should be possible to run the following command:
`train_test_ds = datasets.load_dataset("bookcorpus", split="train+test")`
to load the train and test sets from the dataset.
However executing the equivalent code:
`speech_commands_v1 = load_dataset("superb", "ks", split="train+test")`
only yields the following output:
> Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 54175
> })
Where loading the dataset without the split argument yields:
> DatasetDict({
> train: Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 51094
> })
> validation: Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 6798
> })
> test: Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 3081
> })
> })
Thus, the API seems to be broken in this regard.
This is a bit annoying since I want to be able to use the split argument with `split="train[:10%]+test[:10%]"` to have smaller dataset to work with when validating my model is working correctly.
### Steps to reproduce the bug
`speech_commands_v1 = load_dataset("superb", "ks", split="train+test")`
### Expected behavior
> DatasetDict({
> train: Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 51094
> })
> test: Dataset({
> features: ['file', 'audio', 'label'],
> num_rows: 3081
> })
> })
### Environment info
```
import datasets
print(datasets.__version__)
```
> 2.14.5
```
import sys
print(sys.version)
```
> 3.9.17 (main, Jul 5 2023, 20:41:20)
> [GCC 11.2.0]
The expression "train+test" concatenates the splits.
The individual splits as separate datasets can be obtained as follows:
```python
train_ds, test_ds = load_dataset("<dataset_name>", split=["train", "test"])
train_10pct_ds, test_10pct_ds = load_dataset("<dataset_name>", split=["train[:10%]", "test[:%10]"])
```
|
[
-0.1274546980857849,
-0.10093508660793304,
-0.006819600239396095,
0.2601417899131775,
0.14704042673110962,
0.0743088349699974,
0.36141279339790344,
0.2438858300447464,
-0.18307751417160034,
-0.059660643339157104,
-0.34035390615463257,
0.15651771426200867,
-0.009768162854015827,
0.5907856225967407,
-0.05675670504570007,
-0.3507024049758911,
0.11486963927745819,
-0.02028524875640869,
0.07787420600652695,
0.14903414249420166,
0.12198905646800995,
0.27952295541763306,
-0.1794678270816803,
-0.04181399941444397,
-0.37561389803886414,
-0.2336774468421936,
0.05094043165445328,
0.1268763691186905,
-0.08094281703233719,
-0.25154560804367065,
0.33195704221725464,
0.06000085175037384,
-0.013920125551521778,
0.46385955810546875,
-0.0001273098459932953,
0.29228872060775757,
0.32540786266326904,
-0.005736321210861206,
-0.4287683367729187,
-0.2551136016845703,
-0.030318012461066246,
-0.11416449397802353,
0.22389838099479675,
0.03270230442285538,
-0.23144438862800598,
-0.15109336376190186,
-0.2077498733997345,
0.0631648451089859,
0.8177504539489746,
0.03887150436639786,
0.07689711451530457,
0.2995113134384155,
-0.12078949809074402,
-0.12254752963781357,
-0.34706589579582214,
0.49767327308654785,
-0.19259391725063324,
-0.19728407263755798,
-0.10820063948631287,
0.10313577950000763,
0.034268662333488464,
0.19094069302082062,
0.025267237797379494,
0.03884617239236832,
-0.06720710545778275,
0.08172057569026947,
-0.527494490146637,
-0.22331172227859497,
-0.04413170367479324,
0.27885204553604126,
0.2233886420726776,
-0.02867523580789566,
-0.4688448905944824,
-0.41123804450035095,
-0.20246605575084686,
-0.24230752885341644,
0.15316520631313324,
0.3382496237754822,
-0.002390235662460327,
0.1418384313583374,
-0.4450788199901581,
-0.031232979148626328,
0.025952473282814026,
0.07316859811544418,
0.07250456511974335,
0.1258545219898224,
-0.16106106340885162,
0.09060557186603546,
0.40699928998947144,
-0.07154171168804169,
-0.20195558667182922,
-0.11536288261413574,
-0.18665429949760437,
0.4159157872200012,
-0.4116904139518738,
0.07238005101680756,
-0.14167949557304382,
0.11595982313156128,
0.2533486783504486,
0.16306984424591064,
-0.12522390484809875,
0.047408901154994965,
-0.2505963146686554,
0.013766836374998093,
0.593222975730896,
0.21184207499027252,
0.37866896390914917,
0.36353152990341187,
0.028364384546875954,
0.26305681467056274,
0.14848628640174866,
-0.01682601124048233,
0.08023849874734879,
-0.10673247277736664,
-0.528188169002533,
-0.1441422402858734,
0.17089304327964783,
-0.0783771350979805,
-0.17506791651248932,
-0.20475994050502777,
-0.28740015625953674,
-0.13491728901863098,
0.14679904282093048,
0.3160484731197357,
0.005014711059629917,
0.11967893689870834,
-0.12523868680000305,
0.2554623484611511,
-0.3173356056213379,
-0.1933189481496811,
-0.20023266971111298,
0.1141246110200882,
-0.12063699960708618,
0.03336195647716522,
0.3163481652736664,
-0.31866455078125,
0.17612715065479279,
0.30741408467292786,
0.06193670257925987,
-0.11739885807037354,
-0.310601145029068,
-0.22955331206321716,
0.04347752779722214,
0.3854721784591675,
0.21923181414604187,
0.14557717740535736,
0.0051857903599739075,
0.0029997192323207855,
-0.010015897452831268,
0.0952100157737732,
-0.18749842047691345,
-0.032005347311496735,
0.15504160523414612,
0.06578917801380157,
-0.21424314379692078,
0.23619303107261658,
-0.36358463764190674,
0.5389570593833923,
0.21092358231544495,
-0.29675671458244324,
-0.21388006210327148,
-0.12736347317695618,
-0.3859544098377228,
-0.04742324724793434,
0.5461989045143127,
0.40277940034866333,
-0.27905595302581787,
-0.34558796882629395,
-0.08126925677061081,
-0.11465053260326385,
-0.056710995733737946,
0.581394612789154,
-0.2650083899497986,
0.29119861125946045,
-0.3183826804161072,
0.4046916961669922,
0.37634027004241943,
-0.14747710525989532,
-0.17114311456680298,
0.32102829217910767,
-0.08984322845935822,
0.3360477089881897,
-0.09865065664052963,
-0.2914377748966217,
0.2835239768028259,
-0.08273991197347641,
0.042679041624069214,
0.32085418701171875,
-0.11867684125900269,
-0.05277937650680542,
-0.10606331378221512,
-0.26695898175239563,
0.3243134021759033,
0.2462170273065567,
0.14903295040130615,
-0.2049003541469574,
-0.144402414560318,
0.0451841838657856,
0.5354740023612976,
-0.022170569747686386,
0.004912564530968666,
0.02254115790128708,
-0.18595249950885773,
0.012135222554206848,
0.0525418184697628,
-0.2927453815937042,
-0.4995260238647461,
0.1736619770526886,
0.11219410598278046,
0.05323227867484093,
0.16691601276397705,
-0.056867942214012146,
-0.222639799118042,
-0.14398053288459778,
-0.3288554847240448,
-0.2315698266029358,
-0.08307094126939774,
-0.16193555295467377,
0.22969865798950195,
0.16694289445877075,
-0.32988274097442627,
0.3933577239513397,
-0.22082063555717468,
0.2531033158302307,
-0.33891016244888306,
0.25140348076820374,
0.12429975718259811,
-0.06679895520210266,
-0.29623207449913025,
0.1638314127922058,
0.07542518526315689,
-0.26716917753219604,
-0.0425579808652401,
0.32233646512031555,
0.3357525169849396,
0.03107970952987671,
-0.5862512588500977,
-0.10153259336948395,
0.28793850541114807,
0.03162373974919319,
-0.12393578141927719,
-0.11770819127559662,
0.05904120206832886,
-0.25527307391166687,
-0.34796780347824097,
0.26206016540527344,
-0.46327289938926697,
0.3208806812763214,
0.0491224080324173,
-0.031070606783032417,
0.19185462594032288,
-0.09514641761779785,
-0.19791662693023682,
-0.2087819129228592,
0.24843044579029083,
-0.3000902533531189,
0.171251118183136,
-0.0761009156703949,
-0.0732017382979393,
-0.16373956203460693,
0.34440508484840393,
-0.06307739019393921,
-0.09051496535539627,
-0.0612001046538353,
-0.0024597570300102234,
0.13590770959854126,
-0.023302404209971428,
0.05843232199549675,
0.2809014320373535,
0.062331460416316986,
0.08996087312698364,
0.00901070237159729,
0.0704350546002388,
-0.0983862355351448,
0.16166222095489502,
0.2461411952972412,
-0.2821570634841919,
0.12392064183950424,
-0.11615440249443054,
-0.053440045565366745,
-0.3095778524875641,
0.459570974111557,
0.15739525854587555,
-0.20823553204536438,
-0.5082926750183105,
0.05039149522781372,
-0.3732444941997528,
0.17995625734329224,
-0.26799654960632324,
-0.4194243252277374,
-0.06330937147140503,
-0.28976112604141235,
0.017374133691191673,
0.1936950385570526,
-0.12753914296627045,
0.2826482951641083,
-0.07960852980613708,
0.10225474834442139,
-0.3430529832839966,
-0.02063402347266674,
0.004570182412862778,
0.04894275218248367,
-0.08413086086511612,
0.05424948409199715,
0.3795659840106964,
0.4554072618484497,
0.11473838984966278,
-0.1137436032295227,
-0.42942363023757935,
0.279070645570755,
-0.21221879124641418,
0.2454521358013153,
-0.24862392246723175,
0.3771626353263855,
0.07232078909873962,
-0.010793931782245636,
0.02971748262643814,
-0.3447452783584595,
0.323292076587677,
-0.09664855897426605,
-0.13330762088298798,
-0.11819328367710114,
0.26381927728652954,
-0.11512109637260437,
-0.3542521893978119,
-0.25497129559516907,
-0.3937731683254242,
-0.236822709441185,
0.26928460597991943,
-0.22406046092510223,
-0.12903301417827606,
0.07352291792631149,
-0.15183405578136444,
-0.08718976378440857,
-0.1352454274892807,
-0.01731347106397152,
-0.34308579564094543,
-0.009209424257278442,
0.14015540480613708,
-0.1880740523338318,
-0.21679048240184784,
-0.059544533491134644,
0.08374301344156265,
-0.0644659698009491,
-0.13294216990470886,
-0.09864436089992523,
0.22495895624160767,
-0.23773621022701263,
0.195231094956398,
0.008532281965017319,
0.07261209934949875,
0.3043743968009949,
-0.20174171030521393,
0.21088232100009918,
-0.04551132023334503,
-0.3318314254283905,
0.21622315049171448,
0.06919831037521362,
-0.13563483953475952,
0.08231085538864136,
0.31998059153556824,
-0.0319613441824913,
0.8726682066917419,
0.39813727140426636,
-0.03447496518492699,
0.1965118795633316,
0.08446980267763138,
0.3257448077201843,
-0.22463169693946838,
-0.6712901592254639,
0.141705721616745,
-0.07194335758686066,
-0.11950334906578064,
0.20168732106685638,
0.12671661376953125,
0.05133820325136185,
-0.20830290019512177,
0.05834968760609627,
-0.23937928676605225,
-0.2839917242527008,
0.11466338485479355,
-0.10744701325893402,
0.007793396711349487,
0.04005816951394081,
0.4057462513446808,
0.1816403716802597,
0.09276565164327621,
0.03205738589167595,
0.16105917096138,
0.40057438611984253,
-0.05366615578532219,
-0.6295244693756104,
-0.12845154106616974,
-0.23677748441696167,
0.040474288165569305,
0.27251750230789185,
0.07371290773153305,
-0.24510955810546875,
-0.19534432888031006,
0.20391862094402313,
0.08450601994991302,
0.9985632300376892,
0.1792439967393875,
0.1405053436756134,
0.05293654277920723,
-0.29347172379493713,
-0.007756778970360756,
-0.18654309213161469,
0.10160692036151886,
0.14598248898983002,
0.3710319697856903,
0.4729357361793518,
-0.4324330985546112,
-0.1923256516456604,
0.3012283444404602,
0.07498475909233093,
-0.07214722782373428,
-0.06682149320840836,
-0.1582154631614685,
0.035642944276332855,
-0.03004726581275463,
0.23912137746810913,
0.28510749340057373,
0.2829510569572449,
-0.22585049271583557,
0.0003720894455909729,
0.05343636870384216,
-0.35809218883514404,
0.03149153292179108,
0.18372100591659546,
0.2866728603839874,
-0.018559928983449936,
0.2006969451904297,
0.39232662320137024,
-0.03462667018175125,
-0.003557451069355011,
0.6287500262260437,
-0.2392052412033081,
-0.3481096625328064,
-0.16730931401252747,
0.08180717378854752,
0.32768717408180237,
0.3292052149772644,
0.11994060128927231,
-0.04067818075418472,
0.19375422596931458,
0.12020303308963776,
-0.27435001730918884,
0.041545141488313675,
0.1793881058692932,
-0.021939991042017937,
-0.40109607577323914,
-0.24048130214214325,
0.2066570520401001,
0.17709045112133026,
0.11749225854873657,
0.3250426650047302,
0.27717965841293335,
-0.33386746048927307,
0.10014614462852478,
-0.3440338373184204,
0.6669539213180542,
0.18688219785690308,
0.05852162465453148,
0.19704225659370422,
0.13977304100990295,
0.43685629963874817,
-0.19229212403297424,
0.07661662995815277,
-0.25609228014945984,
-0.3505558669567108,
-0.10651632398366928,
-0.04912919923663139,
-0.08253154903650284,
0.01722561940550804,
-0.06913973391056061,
0.3222741186618805,
-0.20465441048145294,
0.5149247050285339,
-0.15201380848884583,
0.18781280517578125,
0.07341756671667099,
-0.146779403090477,
-0.34532323479652405,
0.0353083536028862,
-0.09816874563694,
0.13564731180667877,
0.060451120138168335,
-0.04896487295627594,
0.07871606945991516,
-0.32463592290878296,
-0.2775251269340515,
0.29860374331474304,
-0.24504801630973816,
0.25332286953926086,
0.07967538386583328,
-0.26014047861099243,
0.31041720509529114,
0.398811012506485,
0.13951164484024048,
-0.1867060512304306,
-0.00840492732822895,
0.22224774956703186,
-0.1955873966217041,
0.156657412648201,
-0.2654418647289276,
-0.10672208666801453,
0.2427244931459427,
0.14057040214538574,
-0.13790898025035858,
-0.22687232494354248,
-0.21315409243106842,
-0.10479134321212769,
-0.2356102466583252,
0.3552297353744507,
-0.04227752238512039,
-0.5765798091888428,
-0.2637054920196533,
0.0002356991171836853,
0.5366557240486145,
-0.2176913172006607,
-0.03852514177560806,
-0.02962232381105423,
-0.18255650997161865,
0.17089205980300903,
0.17263644933700562,
0.08964155614376068,
-0.10763545334339142,
0.3193591237068176,
-0.1920062005519867,
0.09191426634788513,
0.46050047874450684,
0.3649115264415741,
-0.023114509880542755,
-0.1472415179014206,
-0.02473697066307068,
0.3101300597190857,
-0.24588406085968018,
0.20483924448490143,
0.13424916565418243,
-0.1011926606297493,
-0.07705576717853546,
0.42009028792381287,
0.06277667731046677,
-0.1361508071422577,
-0.06476729363203049,
-0.31107157468795776,
0.10026594996452332,
0.2916777729988098,
-0.0897364467382431,
0.03189250826835632,
0.1359795331954956,
0.4358314573764801,
-0.026384979486465454,
0.3901765048503876,
-0.13733609020709991,
0.1664530485868454,
0.15492451190948486,
0.080998994410038,
-0.00045162253081798553,
-0.2692475914955139,
0.42589953541755676,
-0.10214079916477203,
-0.03783447667956352,
0.03926100581884384,
-0.015692461282014847,
-0.08173204958438873,
-0.12990407645702362,
0.14603321254253387,
0.0343555212020874,
0.03870123624801636,
-0.20241500437259674,
0.07447106391191483,
-0.05446496233344078,
-0.2138034850358963,
0.4333679676055908,
0.07417462766170502,
0.1036481261253357,
0.1722300946712494,
0.38380929827690125,
0.2585102617740631,
-0.05993775650858879,
0.38185957074165344,
-0.12186561524868011,
-0.03994901478290558,
0.040184129029512405,
0.07445607334375381,
0.1291826069355011,
0.04812683165073395,
-0.18833409249782562,
0.02694118767976761,
0.5638365745544434,
-0.05639681965112686,
0.04070982336997986,
-0.21416617929935455,
-0.135480135679245,
-0.10248541086912155,
0.4875040352344513,
0.7037375569343567,
0.15702413022518158,
0.16214486956596375,
-0.0010797316208481789,
0.09115084260702133,
-0.002921527251601219,
-0.20594777166843414,
0.36897599697113037,
0.15184973180294037,
-0.04823486506938934,
0.21030248701572418,
-0.14410105347633362,
0.3027004897594452,
-0.14048084616661072,
0.27590277791023254,
0.402962863445282,
-0.09086897224187851,
0.6087848544120789,
0.6013622879981995,
-0.24901117384433746,
0.11842797696590424,
-0.00630122609436512,
-0.4280511140823364,
0.03313036262989044,
-0.03157979995012283,
-0.35461926460266113,
0.3496270477771759,
-0.005091492086648941,
0.2232762575149536,
0.2347986400127411,
-0.39159712195396423,
-0.326678991317749,
0.1682473123073578,
-0.0873548686504364,
0.1287950575351715,
-0.1106165200471878,
0.7223206162452698,
-0.43460988998413086,
-0.48589691519737244,
-0.549042820930481,
0.22825568914413452,
-0.15549838542938232,
-0.032421331852674484,
-0.08884608745574951,
-0.20180034637451172,
-0.05355492979288101,
0.09379060566425323,
0.04664478451013565,
-0.14500677585601807,
0.5614275336265564,
-0.11496742069721222,
-0.1927477866411209,
-0.2379576712846756,
-0.37064889073371887,
0.24199634790420532,
0.043880123645067215,
-0.24611762166023254,
0.26964232325553894,
0.10748729854822159,
-0.16267821192741394,
0.12117838859558105,
0.05425545200705528,
0.2989809513092041,
0.1110081896185875,
-0.05197730287909508,
-0.2532482147216797,
-0.017619431018829346,
0.03980384021997452,
0.05692073702812195,
0.4995781183242798,
-0.06720410287380219,
0.1580175757408142,
0.28220731019973755,
0.07952530682086945,
-0.06448233872652054,
0.10695941746234894,
-0.13332362473011017,
0.26778900623321533,
-0.6542134284973145,
0.513658881187439,
-0.36222943663597107,
0.01489187777042389,
-0.27181994915008545,
-0.040183283388614655,
-0.07909196615219116,
0.1432332843542099,
-0.0288693867623806,
-0.13032308220863342,
0.06824105978012085,
-0.06547410786151886,
0.01745627447962761,
0.11167159676551819,
0.39009836316108704,
0.2884913980960846,
-0.20782092213630676,
-0.17337940633296967,
0.03126104921102524,
-0.26797425746917725,
-0.18357864022254944,
-0.03761623427271843,
0.20965459942817688,
-0.09137485176324844,
-0.0836508721113205,
0.1618185043334961,
0.18466618657112122,
0.010170809924602509,
-0.07520025968551636,
0.08200118690729141,
0.0375329852104187,
-0.2298591434955597,
0.2522415220737457,
-0.1690247505903244,
0.03900463134050369,
-0.014181597158312798,
-0.25077447295188904,
0.14097316563129425,
-0.08584467321634293,
-0.24924159049987793,
0.2620171308517456,
-0.0002693682909011841,
0.17860758304595947,
-0.2671770751476288,
0.19920937716960907,
0.3826392590999603,
0.4265230894088745,
0.008231304585933685,
0.10055696219205856,
-0.29686957597732544,
-0.08354037255048752,
-0.37298065423965454,
0.35447967052459717,
-0.12584033608436584,
0.6449705362319946,
-0.38033998012542725,
0.019960926845669746,
-0.2276567816734314,
-0.11569084972143173,
-0.08183133602142334,
0.04555476829409599,
-0.09682663530111313,
0.05771736800670624,
-0.10064084827899933,
0.13875505328178406,
0.38489830493927,
0.3877500295639038,
-0.30597254633903503,
0.07166434079408646,
-0.06996332854032516,
-0.30338695645332336,
0.39930015802383423,
-0.4947029650211334,
-0.1426279991865158,
-0.14892306923866272,
0.012884385883808136,
0.34721171855926514,
-0.4017864763736725,
-0.5746936798095703,
-0.23795968294143677,
0.04301708564162254,
-0.06293851882219315,
0.09098230302333832,
0.3412662744522095,
0.2536899149417877,
-0.2605762779712677,
-0.07585743814706802,
0.2451934814453125,
0.2719499170780182,
-0.3164398670196533,
0.2805817425251007,
-0.15911996364593506
] |
https://github.com/huggingface/datasets/issues/6319
|
Datasets.map is severely broken
|
Hi! Instead of processing a single example at a time, you should use the batched `map` for the best performance (with `num_proc=1`) - the fast tokenizers can process a batch's samples in parallel in that scenario.
E.g., the following code in Colab takes an hour to complete:
```python
# !pip install datasets transformers
from datasets import load_dataset
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"])
```
|
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
| 73
|
Datasets.map is severely broken
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
Hi! Instead of processing a single example at a time, you should use the batched `map` for the best performance (with `num_proc=1`) - the fast tokenizers can process a batch's samples in parallel in that scenario.
E.g., the following code in Colab takes an hour to complete:
```python
# !pip install datasets transformers
from datasets import load_dataset
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"])
```
|
[
-0.6239004135131836,
0.08061408996582031,
0.04081982001662254,
0.1330556571483612,
0.13826404511928558,
0.09867329150438309,
0.29760390520095825,
0.24050724506378174,
-0.13583961129188538,
-0.11661165952682495,
-0.06945446133613586,
0.7371477484703064,
-0.0846540704369545,
-0.3263972997665405,
-0.3692828118801117,
0.198139026761055,
0.2144690901041031,
0.22920531034469604,
0.39801427721977234,
-0.01538175716996193,
0.005768924951553345,
0.10013947635889053,
-0.34159958362579346,
0.04825646057724953,
-0.641080915927887,
-0.20964878797531128,
-0.0524616464972496,
-0.31286150217056274,
-0.18543793261051178,
-0.45066094398498535,
0.08366063982248306,
0.23183664679527283,
-0.1712309569120407,
0.743010938167572,
-0.0001205612497869879,
-0.09630930423736572,
0.030756751075387,
0.3238403797149658,
0.07781930267810822,
-0.028792083263397217,
-0.2773902118206024,
-0.04088008403778076,
-0.04530421644449234,
-0.02245303988456726,
0.2921803891658783,
0.09039910137653351,
0.10917436331510544,
-0.25919973850250244,
0.3834534287452698,
0.10681020468473434,
0.08609428256750107,
0.25626200437545776,
-0.1580687165260315,
-0.036563046276569366,
0.09324701130390167,
-0.06544226408004761,
-0.1301957368850708,
0.0668688714504242,
0.39085111021995544,
-0.36296066641807556,
-0.2225835621356964,
-0.026320377364754677,
-0.33857688307762146,
-0.09071458876132965,
-0.1748834252357483,
-0.21970413625240326,
-0.004162639379501343,
-0.5528354644775391,
0.39707645773887634,
0.23290646076202393,
0.1805519461631775,
-0.03873954713344574,
-0.03310433775186539,
-0.18776504695415497,
-0.22892984747886658,
-0.12930801510810852,
0.21542799472808838,
-0.02803555317223072,
-0.1284371316432953,
0.17875508964061737,
-0.3641083538532257,
0.2206859439611435,
0.1089012622833252,
0.16373521089553833,
-0.13814540207386017,
0.5340912342071533,
0.07386162877082825,
0.23249748349189758,
0.08527560532093048,
-0.04646201431751251,
0.010076582431793213,
-0.013450674712657928,
0.0835866928100586,
0.24941398203372955,
-0.40172508358955383,
-0.12318747490644455,
0.11970330774784088,
-0.3122234344482422,
0.2648656964302063,
-0.1843225657939911,
-0.31399330496788025,
0.26505985856056213,
-0.16896815598011017,
0.2523396611213684,
0.322195440530777,
0.024700157344341278,
-0.043657951056957245,
0.27112877368927,
0.40711545944213867,
-0.29758116602897644,
-0.4045742452144623,
0.20162856578826904,
-0.19321438670158386,
-0.18654657900333405,
0.10122351348400116,
-0.01855408027768135,
-0.15281887352466583,
-0.08720271289348602,
-0.18611077964305878,
0.19150406122207642,
-0.4549948275089264,
0.1929475963115692,
0.1258316934108734,
0.27933159470558167,
-0.19587825238704681,
0.1575615406036377,
-0.24086637794971466,
-0.26847875118255615,
-0.2402941733598709,
-0.18228885531425476,
-0.010667610913515091,
-0.3399876654148102,
-0.2335713505744934,
0.10369770973920822,
-0.04169256240129471,
0.04772888123989105,
0.2173241525888443,
0.09588466584682465,
-0.07143497467041016,
-0.034780193120241165,
0.15586897730827332,
-0.4090800881385803,
0.15200194716453552,
0.09840693324804306,
-0.17998863756656647,
0.5779923796653748,
-0.028769854456186295,
-0.1437859833240509,
-0.15474939346313477,
0.12058085203170776,
-0.31880858540534973,
-0.04316141828894615,
0.024211140349507332,
0.044122256338596344,
-0.1652560979127884,
-0.060003139078617096,
-0.32808277010917664,
0.183710515499115,
0.2915712296962738,
-0.0005622245371341705,
0.01098756492137909,
-0.14300772547721863,
-0.19643984735012054,
-0.14048834145069122,
0.04904959350824356,
0.20405972003936768,
-0.204116091132164,
-0.0557265467941761,
0.08685990422964096,
0.29901057481765747,
0.2757154703140259,
0.4254915118217468,
-0.010417747311294079,
0.36634665727615356,
-0.29580578207969666,
0.20751647651195526,
0.15225981175899506,
0.22549867630004883,
-0.5076003670692444,
0.16693900525569916,
-0.04684734344482422,
-0.0399518758058548,
-0.43422842025756836,
-0.1060992032289505,
0.6525614261627197,
-0.12666010856628418,
0.4852185845375061,
0.17407266795635223,
-0.09310148656368256,
0.11729658395051956,
-0.2869259715080261,
-0.2705433964729309,
0.05135542154312134,
0.10721749067306519,
0.18551629781723022,
-0.1714952290058136,
-0.21765631437301636,
-0.060991834849119186,
0.19300450384616852,
0.1679975539445877,
-0.017536787316203117,
0.2284795194864273,
0.27006930112838745,
-0.100502610206604,
0.11359638720750809,
-0.30391836166381836,
0.016414176672697067,
0.31467345356941223,
0.2868238389492035,
-0.05332672595977783,
-0.0060541704297065735,
0.0011685341596603394,
0.02456173300743103,
0.19467653334140778,
-0.14224368333816528,
0.12287755310535431,
-0.012990845367312431,
-0.11468473076820374,
-0.19623136520385742,
0.1565524935722351,
-0.16810086369514465,
-0.01296115294098854,
0.112776979804039,
0.12933067977428436,
0.18946677446365356,
0.13341528177261353,
-0.039799973368644714,
-0.18131369352340698,
-0.10745425522327423,
0.02560107782483101,
0.23054438829421997,
-0.11227450519800186,
-0.29352009296417236,
0.19294098019599915,
0.24763010442256927,
0.05788864940404892,
-0.19636625051498413,
0.21533939242362976,
0.18473036587238312,
-0.06868373602628708,
-0.17752067744731903,
0.19308163225650787,
-0.07706256210803986,
-0.21225881576538086,
0.09338437765836716,
0.16136740148067474,
0.026977019384503365,
0.3525635302066803,
-0.19066323339939117,
0.22559519112110138,
0.17603129148483276,
0.023609992116689682,
-0.10972370952367783,
0.23657870292663574,
0.37524640560150146,
-0.01212509348988533,
0.26328393816947937,
0.19452230632305145,
0.07731138169765472,
0.1364896297454834,
0.5704361200332642,
0.09514583647251129,
-0.036711424589157104,
0.178429514169693,
-0.30115580558776855,
0.005028489977121353,
0.09375842660665512,
0.09897194802761078,
0.3055444657802582,
-0.037214163690805435,
0.08605404198169708,
-0.11271806806325912,
-0.11545845121145248,
0.010756051167845726,
0.014103807508945465,
0.23436293005943298,
0.2627612352371216,
0.19457432627677917,
0.19669215381145477,
0.23555153608322144,
-0.2842167019844055,
-0.5270472168922424,
0.10943087935447693,
0.44651997089385986,
-0.069912850856781,
0.1267542988061905,
-0.16593343019485474,
0.10586153715848923,
0.035354629158973694,
-0.06204173341393471,
-0.13545776903629303,
-0.35624533891677856,
-0.13130101561546326,
0.03388369083404541,
0.11715495586395264,
0.40896424651145935,
0.034409284591674805,
0.0925290435552597,
0.07708525657653809,
-0.03349015861749649,
-0.2077009528875351,
-0.36968863010406494,
-0.2303173542022705,
-0.07830050587654114,
0.4178122580051422,
-0.21094942092895508,
0.10537857562303543,
0.1875869184732437,
-0.2642211318016052,
0.05172654241323471,
-0.35785242915153503,
0.05301734805107117,
-0.152694433927536,
0.035345934331417084,
0.12585057318210602,
0.3085562586784363,
-0.4487191438674927,
-0.15052323043346405,
0.3146513104438782,
-0.5668462514877319,
0.14345374703407288,
-0.16058863699436188,
-0.027355611324310303,
-0.27986741065979004,
0.09642787277698517,
0.0592837780714035,
-0.07578570395708084,
-0.21496549248695374,
0.3077678084373474,
-0.152382493019104,
-0.02803874760866165,
0.1799980103969574,
0.2684118151664734,
0.174947589635849,
0.09398560971021652,
-0.2713649868965149,
-0.11564953625202179,
-0.14403237402439117,
0.47532686591148376,
-0.057456884533166885,
-0.13453538715839386,
-0.0430452898144722,
-0.02279619686305523,
0.14097309112548828,
0.07534152269363403,
-0.3798813819885254,
0.45350050926208496,
-0.35271111130714417,
0.06776200234889984,
-0.02311268448829651,
-0.06720608472824097,
0.2536959946155548,
0.11049836874008179,
0.050132520496845245,
0.060590073466300964,
-0.27401021122932434,
-0.06387325376272202,
0.051806993782520294,
0.11922942101955414,
0.0756819099187851,
0.4097788333892822,
0.24828287959098816,
0.6680770516395569,
0.3356929123401642,
-0.18275046348571777,
-0.026361621916294098,
0.06630681455135345,
0.013759098947048187,
-0.19657188653945923,
-0.43152332305908203,
0.03325597941875458,
-0.12066209316253662,
-0.37830328941345215,
0.2522188425064087,
0.04189564287662506,
-0.5728872418403625,
0.057426802814006805,
-0.13434024155139923,
0.17579233646392822,
-0.2968437075614929,
0.22627364099025726,
-0.2203095257282257,
-0.021286673843860626,
0.07606974244117737,
0.15308049321174622,
-0.3416513502597809,
-0.20205903053283691,
0.1924104243516922,
-0.14459681510925293,
-0.027179427444934845,
-0.2704959809780121,
-0.638114869594574,
0.2250453233718872,
-0.5046971440315247,
0.18416330218315125,
-0.03344232216477394,
0.5498708486557007,
-0.04047585278749466,
0.24477818608283997,
0.11960126459598541,
-0.15690308809280396,
0.5084611177444458,
-0.09306865930557251,
-0.10716491937637329,
0.20824399590492249,
0.11473105847835541,
-0.2758978605270386,
-0.0845336988568306,
0.08118824660778046,
0.4390673041343689,
0.506264328956604,
0.3405373990535736,
-0.11899138987064362,
-0.2164471298456192,
0.018081655725836754,
0.09434748440980911,
-0.06361976265907288,
-0.2007731944322586,
-0.11028894782066345,
-0.03647720068693161,
-0.1722792685031891,
0.1885928064584732,
0.1928548812866211,
-0.16226862370967865,
0.15213294327259064,
-0.38232502341270447,
-0.1366264671087265,
-0.2742961347103119,
0.14506550133228302,
0.12731905281543732,
0.1420172154903412,
-0.03167557343840599,
0.4579574167728424,
0.35245659947395325,
-0.05592792481184006,
0.10731260478496552,
0.06686991453170776,
-0.16211114823818207,
-0.17329290509223938,
0.08292199671268463,
0.007372201420366764,
0.5508001446723938,
0.4660654366016388,
-0.10971134901046753,
0.06334883719682693,
-0.27071812748908997,
0.3523339629173279,
-0.05429474636912346,
0.39817482233047485,
0.39306747913360596,
0.21150320768356323,
-0.7208508849143982,
-0.3005293309688568,
0.1293438971042633,
0.37375012040138245,
-0.22990041971206665,
0.6225209832191467,
-0.30169910192489624,
-0.15287186205387115,
0.8075836300849915,
0.20268304646015167,
1.068561315536499,
-0.32027000188827515,
0.009564507752656937,
-0.2652449607849121,
0.20265109837055206,
0.21163246035575867,
-0.5638330578804016,
0.13295018672943115,
-0.3408251404762268,
-0.25780752301216125,
-0.04317124933004379,
-0.10080363601446152,
0.046211082488298416,
0.29456520080566406,
-0.1207491010427475,
0.06463954597711563,
0.11950680613517761,
0.5645155310630798,
0.10288733243942261,
0.06814835220575333,
0.33344244956970215,
-0.31362202763557434,
-0.05953618884086609,
0.06829054653644562,
0.062035657465457916,
0.06535076349973679,
0.0076994504779577255,
0.019096560776233673,
-0.04923749342560768,
0.0029210634529590607,
-0.5500169396400452,
-0.12607116997241974,
-0.5061055421829224,
0.12936684489250183,
0.09840613603591919,
0.2606644630432129,
0.23632866144180298,
0.13483412563800812,
0.03864225745201111,
0.37621068954467773,
0.025852952152490616,
0.5010573267936707,
0.1823064237833023,
-0.016903437674045563,
0.3515392541885376,
-0.39662954211235046,
0.040198590606451035,
0.018342457711696625,
-0.011797122657299042,
0.10761959850788116,
-0.034371908754110336,
-0.3453616499900818,
-0.15229378640651703,
0.22185179591178894,
0.6251702308654785,
-0.12785585224628448,
-0.022741232067346573,
0.03326244652271271,
0.03273984417319298,
-0.24113190174102783,
0.052671752870082855,
0.24239696562290192,
0.0904400497674942,
0.6536056995391846,
-0.2526324391365051,
-0.16408279538154602,
-0.06600135564804077,
0.33140984177589417,
-0.13236665725708008,
-0.12359476834535599,
0.32288920879364014,
0.09550793468952179,
-0.23383519053459167,
-0.11505322903394699,
0.3508397936820984,
-0.018391476944088936,
-0.29311105608940125,
-0.044924307614564896,
-0.664992094039917,
-0.02912212908267975,
0.16142123937606812,
0.23127350211143494,
-0.07263275235891342,
-0.06871166080236435,
-0.06230229139328003,
-0.44634008407592773,
-0.44426706433296204,
-0.18192847073078156,
-0.00528494268655777,
0.20922552049160004,
-0.10175435245037079,
-0.10489314794540405,
-0.20308613777160645,
0.27375099062919617,
-0.16337434947490692,
0.14817723631858826,
-0.19255025684833527,
-0.024989325553178787,
-0.22134079039096832,
-0.16109144687652588,
0.2169789969921112,
-0.2624775171279907,
-0.06510887295007706,
0.5157902240753174,
0.18807540833950043,
-0.09814171493053436,
-0.2721620202064514,
0.19156616926193237,
0.20641377568244934,
-0.24889184534549713,
0.11679818481206894,
-0.0455377958714962,
-0.024358008056879044,
-0.3861905634403229,
-0.10902255773544312,
0.09117374569177628,
-0.03092942386865616,
-0.18794026970863342,
0.3712227940559387,
-0.005243167281150818,
-0.13146093487739563,
0.0700775533914566,
0.1406293362379074,
0.20810353755950928,
0.24206551909446716,
0.25544506311416626,
0.09238673001527786,
-0.07389111816883087,
-0.09373299032449722,
0.16003236174583435,
0.2528436779975891,
-0.02771296352148056,
0.4765888452529907,
-0.4545333981513977,
-0.041837889701128006,
0.31278374791145325,
0.24602365493774414,
0.6082336902618408,
-0.15866895020008087,
-0.36287721991539,
0.5781959295272827,
0.06812431663274765,
0.018182314932346344,
-0.1590859740972519,
0.6619240045547485,
0.09429032355546951,
0.042257729917764664,
0.1447204053401947,
0.020180102437734604,
-0.15941664576530457,
-0.2024564892053604,
0.2063044011592865,
0.4838177561759949,
-0.13945607841014862,
0.16153402626514435,
0.05077439174056053,
0.14318367838859558,
0.062073346227407455,
0.15249009430408478,
0.10698138177394867,
0.30406346917152405,
0.2573595643043518,
0.09900463372468948,
0.13987697660923004,
0.2978944182395935,
0.18412385880947113,
0.19573497772216797,
-0.29673048853874207,
-0.05908394977450371,
0.4026254117488861,
-0.11540447175502777,
0.12910738587379456,
0.10616859048604965,
0.2663751244544983,
-0.1596880555152893,
-0.5033320784568787,
-0.06801367551088333,
0.22649261355400085,
-0.2446211576461792,
-0.11971873044967651,
0.2210606336593628,
-0.081683449447155,
-0.1572788804769516,
0.23661178350448608,
-0.06576575338840485,
-0.0045926496386528015,
0.2795925736427307,
0.12181460857391357,
0.05030941590666771,
-0.25172820687294006,
-0.24339935183525085,
-0.04245883226394653,
0.437021940946579,
-0.2858279049396515,
0.0805574283003807,
-0.4755503535270691,
-0.13800418376922607,
-0.5134360194206238,
0.24320293962955475,
0.3637971580028534,
0.2800135910511017,
-0.3446342647075653,
0.12792564928531647,
-0.21827350556850433,
0.08390416204929352,
0.015714507550001144,
0.43258926272392273,
-0.12262120842933655,
-0.3408704698085785,
0.08932065963745117,
-0.04635852575302124,
-0.16576622426509857,
-0.1809503138065338,
0.07153674960136414,
0.3439907729625702,
0.2386433184146881,
-0.017053604125976562,
0.04260089620947838,
-0.2048662006855011,
-0.03811994940042496,
-0.20135322213172913,
0.00010708719491958618,
-0.20830222964286804,
0.37362632155418396,
-0.34395158290863037,
0.11864616721868515,
-0.1875869780778885,
0.03984159976243973,
-0.06314411759376526,
0.3389504551887512,
0.46054965257644653,
-0.0007137060165405273,
-0.5053994059562683,
-0.26999831199645996,
-0.3347843885421753,
0.1030677780508995,
-0.29586508870124817,
0.18561463057994843,
-0.034475140273571014,
-0.01986226998269558,
-0.042035676538944244,
0.28741902112960815,
-0.026002302765846252,
0.07260000705718994,
-0.09580676257610321,
0.4975893497467041,
-0.2112858146429062,
0.26260608434677124,
-0.164065882563591,
-0.02498040907084942,
0.012875914573669434,
-0.3582947850227356,
0.4150431454181671,
-0.2405521124601364,
-0.01878904365003109,
-0.06876484304666519,
-0.21347247064113617,
0.003419484943151474,
-0.3421378433704376,
0.3436260521411896,
0.09693101793527603,
0.09856221079826355,
0.09007362276315689,
-0.01126948744058609,
-0.2334476113319397,
-0.10325852036476135,
-0.045411061495542526,
0.12173306941986084,
0.16928577423095703,
0.2658049166202545,
-0.2209106981754303,
0.182664692401886,
-0.25659987330436707,
-0.31604790687561035,
-0.04670848697423935,
-0.29151058197021484,
-0.16779932379722595,
0.111341692507267,
-0.12000733613967896,
0.41390204429626465,
-0.08818483352661133,
0.5169765949249268,
-0.10534113645553589,
0.29697367548942566,
-0.4442870020866394,
-0.13069184124469757,
0.36494535207748413,
-0.7250999808311462,
-0.5077704191207886,
-0.14778205752372742,
-0.04397295415401459,
0.30970919132232666,
0.12189777940511703,
-0.11667664349079132,
-0.3089672029018402,
0.24109384417533875,
-0.12516137957572937,
-0.6288142204284668,
0.022741500288248062,
0.20505191385746002,
0.03588157519698143,
-0.199659526348114,
0.46472805738449097,
0.025883033871650696,
-0.3623941242694855,
0.33971714973449707,
0.0018796436488628387
] |
https://github.com/huggingface/datasets/issues/6319
|
Datasets.map is severely broken
|
Batched is far worse. A single batch of 1000 took hours and that was only 1%
On Thu, Oct 19, 2023, 2:26 PM Mario Šaško ***@***.***> wrote:
> Hi! You should use the batched map for the best performance (with
> num_proc=1) - the fast tokenizers can process a batch's samples in
> parallel.
>
> E.g., the following code in Colab takes an hour to complete:
>
> # !pip install datasets transformersfrom datasets import load_datasetfrom transformers import AutoTokenizertokenizer = AutoTokenizer.from_pretrained("bert-base-cased")dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"])
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771503757>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABDD3ZJHPSRVDEXFNMXR2N3YAFWFZAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDGNZVG4>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
| 125
|
Datasets.map is severely broken
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
Batched is far worse. A single batch of 1000 took hours and that was only 1%
On Thu, Oct 19, 2023, 2:26 PM Mario Šaško ***@***.***> wrote:
> Hi! You should use the batched map for the best performance (with
> num_proc=1) - the fast tokenizers can process a batch's samples in
> parallel.
>
> E.g., the following code in Colab takes an hour to complete:
>
> # !pip install datasets transformersfrom datasets import load_datasetfrom transformers import AutoTokenizertokenizer = AutoTokenizer.from_pretrained("bert-base-cased")dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"])
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771503757>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABDD3ZJHPSRVDEXFNMXR2N3YAFWFZAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDGNZVG4>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
[
-0.6426339745521545,
0.04849672317504883,
0.04157610610127449,
0.15280389785766602,
0.1293145716190338,
0.12522852420806885,
0.2616434097290039,
0.26831841468811035,
-0.0994161069393158,
-0.12657509744167328,
-0.08454816043376923,
0.7016134262084961,
-0.09337522089481354,
-0.370699405670166,
-0.3324892222881317,
0.1804511994123459,
0.237285315990448,
0.22640961408615112,
0.2983468174934387,
-0.04651705175638199,
-0.033568449318408966,
0.09759757667779922,
-0.37525475025177,
0.014406874775886536,
-0.5900877118110657,
-0.23279857635498047,
-0.04140552505850792,
-0.2689363658428192,
-0.21978537738323212,
-0.45404163002967834,
0.133602574467659,
0.17769302427768707,
-0.14307132363319397,
0.7698661088943481,
-0.00011993577209068462,
-0.09614746272563934,
0.05633850023150444,
0.32182741165161133,
0.07360376417636871,
0.03164161741733551,
-0.3295805752277374,
-0.06581952422857285,
-0.07008913159370422,
-0.02971666306257248,
0.26650500297546387,
0.10411453247070312,
0.13150043785572052,
-0.3102654814720154,
0.38329821825027466,
0.12362315505743027,
0.08966990560293198,
0.30025196075439453,
-0.14405888319015503,
-0.04353049397468567,
0.09972216933965683,
-0.028017424046993256,
-0.14052005112171173,
0.13030585646629333,
0.4132023751735687,
-0.4063795804977417,
-0.23245137929916382,
-0.04678500443696976,
-0.3474113643169403,
-0.08449308574199677,
-0.13317352533340454,
-0.19799841940402985,
-0.01669146865606308,
-0.5472991466522217,
0.3705317974090576,
0.26692771911621094,
0.08987176418304443,
-0.0012654289603233337,
-0.0578814372420311,
-0.20911690592765808,
-0.26804447174072266,
-0.11895376443862915,
0.21158912777900696,
0.0017189756035804749,
-0.14731502532958984,
0.1676095873117447,
-0.39741775393486023,
0.20329493284225464,
0.10199661552906036,
0.1459449678659439,
-0.09542505443096161,
0.5607545971870422,
0.08650869876146317,
0.2265947163105011,
0.11951771378517151,
-0.04918985813856125,
0.050099264830350876,
-0.03912617638707161,
0.05278361961245537,
0.2409229576587677,
-0.4216615855693817,
-0.09672053158283234,
0.11368786543607712,
-0.24001458287239075,
0.2768186032772064,
-0.2676818370819092,
-0.316876083612442,
0.2516312599182129,
-0.11556650698184967,
0.23630860447883606,
0.3054457902908325,
0.04877334088087082,
-0.05012115091085434,
0.35864782333374023,
0.3894450068473816,
-0.3060685098171234,
-0.35379737615585327,
0.2172907590866089,
-0.17114035785198212,
-0.20107154548168182,
0.0719393789768219,
-0.0030796490609645844,
-0.18527786433696747,
-0.06645166128873825,
-0.1854001134634018,
0.14956936240196228,
-0.36438050866127014,
0.15773293375968933,
0.11050040274858475,
0.26071396470069885,
-0.22599467635154724,
0.1405320167541504,
-0.29386478662490845,
-0.27775055170059204,
-0.21388716995716095,
-0.16780884563922882,
-0.010059348307549953,
-0.3334588408470154,
-0.2810972034931183,
0.08269442617893219,
-0.0327703133225441,
-0.027296733111143112,
0.20395268499851227,
0.08794473856687546,
-0.07198479771614075,
0.004618193954229355,
0.12488992512226105,
-0.40595683455467224,
0.1795961558818817,
0.12514732778072357,
-0.19302885234355927,
0.5750647783279419,
-0.0037713460624217987,
-0.11152578890323639,
-0.15661266446113586,
0.1431775838136673,
-0.3294278681278229,
-0.06101715564727783,
0.015703564509749413,
0.05144960805773735,
-0.19038978219032288,
-0.058991022408008575,
-0.39058029651641846,
0.172562837600708,
0.28080305457115173,
-0.001901324838399887,
0.016983941197395325,
-0.1462039053440094,
-0.2057507336139679,
-0.1715417504310608,
0.045926108956336975,
0.2126483917236328,
-0.25785398483276367,
-0.043068405240774155,
0.08602674305438995,
0.2773505449295044,
0.3139100968837738,
0.47921279072761536,
-0.03713537007570267,
0.34241873025894165,
-0.29747703671455383,
0.22413690388202667,
0.13480240106582642,
0.1751023232936859,
-0.48946985602378845,
0.215651273727417,
-0.04017063230276108,
-0.03499829024076462,
-0.4090358018875122,
-0.08574226498603821,
0.7049323320388794,
-0.12747932970523834,
0.49915409088134766,
0.19005495309829712,
-0.10608816146850586,
0.11416298896074295,
-0.3092305660247803,
-0.28948453068733215,
0.05246391519904137,
0.09145209193229675,
0.16823451220989227,
-0.13631078600883484,
-0.18883830308914185,
-0.15694297850131989,
0.21587446331977844,
0.1800430417060852,
0.0038153959903866053,
0.20821906626224518,
0.29166755080223083,
-0.14875198900699615,
0.074458047747612,
-0.28090253472328186,
-0.03835524618625641,
0.3386187255382538,
0.2629692256450653,
-0.07590870559215546,
0.013393394649028778,
0.011103980243206024,
0.02187506854534149,
0.1809714436531067,
-0.12409840524196625,
0.08337220549583435,
-0.024635178968310356,
-0.11637167632579803,
-0.15913771092891693,
0.10864180326461792,
-0.1873428374528885,
-0.04453768581151962,
0.15027780830860138,
0.12641191482543945,
0.13875481486320496,
0.11463327705860138,
-0.02738422341644764,
-0.1762218326330185,
-0.0823032483458519,
0.026573218405246735,
0.2372819185256958,
-0.1436329483985901,
-0.26993030309677124,
0.2271329164505005,
0.20504778623580933,
0.08187472075223923,
-0.17086803913116455,
0.1741744726896286,
0.18375974893569946,
-0.07385062426328659,
-0.1762923002243042,
0.1779133379459381,
-0.07475493848323822,
-0.22654089331626892,
0.07135357707738876,
0.17473667860031128,
0.03154618293046951,
0.3380994498729706,
-0.21436306834220886,
0.21808728575706482,
0.15312087535858154,
0.019896451383829117,
-0.09005878120660782,
0.2040891945362091,
0.3642391562461853,
0.01756395772099495,
0.27461689710617065,
0.1970440000295639,
0.08025071024894714,
0.12557177245616913,
0.5776039361953735,
0.08050978183746338,
-0.047926291823387146,
0.18310955166816711,
-0.30807244777679443,
-0.016921918839216232,
0.1250678151845932,
0.13913482427597046,
0.33759239315986633,
-0.029863975942134857,
0.13892406225204468,
-0.09186428785324097,
-0.08731736242771149,
-0.011239715851843357,
0.02514003962278366,
0.1927180141210556,
0.2788349390029907,
0.17674317955970764,
0.15430258214473724,
0.23573468625545502,
-0.2448582649230957,
-0.4732135534286499,
0.06355290859937668,
0.4302960932254791,
-0.09523453563451767,
0.10441949218511581,
-0.14489533007144928,
0.0997435674071312,
-0.00316623505204916,
-0.07742974162101746,
-0.14365243911743164,
-0.38070717453956604,
-0.1440146565437317,
-0.010194811969995499,
0.13870838284492493,
0.38767093420028687,
0.06429071724414825,
0.10080932080745697,
0.035269759595394135,
-0.05490700900554657,
-0.23487205803394318,
-0.3767639398574829,
-0.2511839270591736,
-0.06373913586139679,
0.39967602491378784,
-0.21173648536205292,
0.11511767655611038,
0.16245195269584656,
-0.25913718342781067,
0.0727887824177742,
-0.3240421414375305,
0.022448891773819923,
-0.16241838037967682,
0.07491667568683624,
0.1504289209842682,
0.32448965311050415,
-0.4365629553794861,
-0.12193312495946884,
0.30987417697906494,
-0.5850248336791992,
0.12263591587543488,
-0.1896553337574005,
-0.07031503319740295,
-0.2786443531513214,
0.09247472882270813,
0.06602823734283447,
-0.11730100959539413,
-0.2226693034172058,
0.3167877793312073,
-0.19687055051326752,
-0.029393360018730164,
0.1833382546901703,
0.25737863779067993,
0.17235741019248962,
0.038031693547964096,
-0.31457942724227905,
-0.09539484232664108,
-0.21172994375228882,
0.4808410406112671,
-0.05968380346894264,
-0.1311907023191452,
-0.027543935924768448,
-0.0029330849647521973,
0.14982637763023376,
0.11131265014410019,
-0.40601128339767456,
0.4802446663379669,
-0.359047532081604,
0.0992460697889328,
-0.0026438161730766296,
-0.02609941177070141,
0.23420532047748566,
0.07849721610546112,
0.04304789751768112,
0.03732052445411682,
-0.28738221526145935,
-0.09804714471101761,
0.03262561559677124,
0.14953872561454773,
0.07249292731285095,
0.43632760643959045,
0.24967476725578308,
0.7069785594940186,
0.379555881023407,
-0.17753444612026215,
-0.06709374487400055,
0.05666438490152359,
0.06094319745898247,
-0.18501263856887817,
-0.4361913800239563,
0.07509661465883255,
-0.12759384512901306,
-0.4099850058555603,
0.1931818127632141,
0.05781087279319763,
-0.5735378861427307,
0.04487574100494385,
-0.11891435086727142,
0.16032147407531738,
-0.266305536031723,
0.23097461462020874,
-0.17388582229614258,
0.0019688382744789124,
0.08425214886665344,
0.1689746081829071,
-0.2849331498146057,
-0.24414131045341492,
0.1905510127544403,
-0.15705205500125885,
-0.03257512301206589,
-0.26161935925483704,
-0.6087354421615601,
0.2119346708059311,
-0.542290210723877,
0.19721662998199463,
-0.027930989861488342,
0.5766943693161011,
-0.01219630241394043,
0.25356897711753845,
0.09246339648962021,
-0.09291412681341171,
0.555048942565918,
-0.09196101129055023,
-0.04475190490484238,
0.1712975800037384,
0.1408199667930603,
-0.28816792368888855,
-0.06840087473392487,
0.0787244588136673,
0.4341457784175873,
0.5187476873397827,
0.37200939655303955,
-0.09353980422019958,
-0.17935055494308472,
0.017381256446242332,
0.1131625548005104,
-0.03305165097117424,
-0.22530537843704224,
-0.11466355621814728,
-0.013642264530062675,
-0.08292392641305923,
0.15847280621528625,
0.2049059122800827,
-0.19816184043884277,
0.1914108246564865,
-0.3808801472187042,
-0.11661656200885773,
-0.2340961992740631,
0.12124459445476532,
0.11758022010326385,
0.12275005131959915,
-0.0027792195323854685,
0.4393712878227234,
0.3650742173194885,
-0.10460333526134491,
0.13375131785869598,
0.13258351385593414,
-0.24059295654296875,
-0.12306848168373108,
0.03425472974777222,
0.04098019376397133,
0.5121027827262878,
0.45951831340789795,
-0.12771807610988617,
0.04621978476643562,
-0.19159796833992004,
0.32194554805755615,
-0.07087510079145432,
0.35959288477897644,
0.3768444061279297,
0.23107019066810608,
-0.7637559771537781,
-0.33517423272132874,
0.124463751912117,
0.38683396577835083,
-0.22253134846687317,
0.605758786201477,
-0.3425005078315735,
-0.1612454056739807,
0.7563073039054871,
0.23172178864479065,
1.0129047632217407,
-0.3359854817390442,
0.041797615587711334,
-0.24439579248428345,
0.1415148377418518,
0.210551917552948,
-0.4533313512802124,
0.13482601940631866,
-0.3374863862991333,
-0.24585150182247162,
-0.05683813616633415,
-0.09766949713230133,
0.07586172968149185,
0.30386173725128174,
-0.10399489104747772,
0.0865708589553833,
0.1417980194091797,
0.5927175283432007,
0.10342434048652649,
0.017981678247451782,
0.3890356123447418,
-0.31674519181251526,
-0.09323105216026306,
0.06552392989397049,
0.044846467673778534,
0.03268752619624138,
0.023173153400421143,
-0.006728144362568855,
-0.046175699681043625,
0.00600593164563179,
-0.5501017570495605,
-0.10626451671123505,
-0.5179226994514465,
0.12524345517158508,
0.14635418355464935,
0.22929541766643524,
0.2226136177778244,
0.10622475296258926,
-0.0016299113631248474,
0.36227869987487793,
0.01405678503215313,
0.49295172095298767,
0.19866827130317688,
0.013376021757721901,
0.3823747932910919,
-0.3970080614089966,
0.04022051393985748,
0.03350691497325897,
0.02528131753206253,
0.10001823306083679,
-0.06471424549818039,
-0.3237733244895935,
-0.1599196344614029,
0.26030659675598145,
0.5518629550933838,
-0.13924741744995117,
-0.039055220782756805,
0.00446009635925293,
0.05193721130490303,
-0.22786769270896912,
0.0470978319644928,
0.23191002011299133,
0.11919502168893814,
0.6925250291824341,
-0.21810705959796906,
-0.19055315852165222,
-0.06892907619476318,
0.36345797777175903,
-0.13317427039146423,
-0.1488664150238037,
0.268441379070282,
0.11408062279224396,
-0.23806172609329224,
-0.12007567286491394,
0.36355647444725037,
0.019015470519661903,
-0.27261847257614136,
-0.03835102543234825,
-0.6462541818618774,
-0.0010516941547393799,
0.20183949172496796,
0.21608908474445343,
0.0026969648897647858,
-0.10066349059343338,
-0.06302395462989807,
-0.42872875928878784,
-0.42950597405433655,
-0.17580042779445648,
0.015249967575073242,
0.1846887618303299,
-0.1049066111445427,
-0.1381116509437561,
-0.1663636416196823,
0.28741252422332764,
-0.16920244693756104,
0.12704983353614807,
-0.14927981793880463,
-0.034751154482364655,
-0.2325529158115387,
-0.11963101476430893,
0.2566291093826294,
-0.26737019419670105,
-0.07276381552219391,
0.4968112111091614,
0.14472314715385437,
-0.10069913417100906,
-0.22836163640022278,
0.19181230664253235,
0.19369715452194214,
-0.27628087997436523,
0.11591839045286179,
-0.08784740418195724,
-0.02691134437918663,
-0.3959713876247406,
-0.131556436419487,
0.12524384260177612,
-0.04182463139295578,
-0.17396701872348785,
0.3606916069984436,
0.0033664554357528687,
-0.08873751014471054,
0.090934157371521,
0.08966554701328278,
0.18263155221939087,
0.23108530044555664,
0.26078367233276367,
0.11375956237316132,
-0.09434201568365097,
-0.09289480000734329,
0.12908034026622772,
0.25259047746658325,
-0.004867110401391983,
0.48579347133636475,
-0.463265061378479,
-0.04571496322751045,
0.32378140091896057,
0.2838422954082489,
0.5899597406387329,
-0.16761942207813263,
-0.3510514497756958,
0.5371622443199158,
0.06736546754837036,
0.006569754332304001,
-0.16134989261627197,
0.664460301399231,
0.1582537442445755,
0.045457880944013596,
0.1627568155527115,
0.019580256193876266,
-0.18562328815460205,
-0.21710599958896637,
0.19562968611717224,
0.5061205625534058,
-0.15999749302864075,
0.16687777638435364,
0.0328763946890831,
0.14943568408489227,
0.040351055562496185,
0.1710018366575241,
0.12627345323562622,
0.2947356700897217,
0.340106725692749,
0.10460139065980911,
0.17778295278549194,
0.31316155195236206,
0.18757982552051544,
0.16685450077056885,
-0.3085002303123474,
-0.013605937361717224,
0.415934294462204,
-0.16031357645988464,
0.12949787080287933,
0.1480455994606018,
0.31575581431388855,
-0.22701086103916168,
-0.4776388704776764,
-0.023226497694849968,
0.16784074902534485,
-0.23261535167694092,
-0.09588298201560974,
0.21363884210586548,
-0.07067424803972244,
-0.13469335436820984,
0.23730140924453735,
-0.09236663579940796,
0.0021160468459129333,
0.3363385498523712,
0.10476906597614288,
0.03195265680551529,
-0.22255821526050568,
-0.256237268447876,
-0.05821932852268219,
0.42859339714050293,
-0.28695744276046753,
0.09003949910402298,
-0.5049150586128235,
-0.13174816966056824,
-0.489157110452652,
0.26655569672584534,
0.39992162585258484,
0.3227159082889557,
-0.2885713279247284,
0.1290998011827469,
-0.19684849679470062,
0.06420064717531204,
-0.016287026926875114,
0.4500058591365814,
-0.13117849826812744,
-0.29018568992614746,
0.09720934927463531,
-0.030321815982460976,
-0.1576000601053238,
-0.11697171628475189,
0.037925198674201965,
0.32260629534721375,
0.2488667368888855,
-0.07942616194486618,
0.02402857318520546,
-0.22516760230064392,
-0.03762824088335037,
-0.19122815132141113,
-0.0004062354564666748,
-0.20598602294921875,
0.4021197259426117,
-0.3745822310447693,
0.11384966224431992,
-0.17959031462669373,
0.040262918919324875,
-0.038131631910800934,
0.410754531621933,
0.4783186912536621,
0.01849880814552307,
-0.49002647399902344,
-0.27582743763923645,
-0.3414624333381653,
0.07316143065690994,
-0.3298451006412506,
0.19487769901752472,
-0.0458153560757637,
-0.03547926992177963,
-0.05245401710271835,
0.29638129472732544,
-0.02793675661087036,
0.06914619356393814,
-0.09725946187973022,
0.46850746870040894,
-0.20026235282421112,
0.22742222249507904,
-0.16667017340660095,
-0.00923544354736805,
0.04470442980527878,
-0.378783643245697,
0.4236389398574829,
-0.219517782330513,
-0.035414908081293106,
-0.1036839485168457,
-0.20757083594799042,
0.026214037090539932,
-0.3193550705909729,
0.3301353454589844,
0.13529498875141144,
0.1354333907365799,
0.1041758731007576,
-0.03811132535338402,
-0.24816876649856567,
-0.10952676087617874,
-0.04016335681080818,
0.10813923925161362,
0.16105949878692627,
0.22940358519554138,
-0.22767625749111176,
0.10798601806163788,
-0.26678040623664856,
-0.3036101162433624,
-0.04617324844002724,
-0.22441528737545013,
-0.16964247822761536,
0.11762196570634842,
-0.10686620324850082,
0.3668746054172516,
-0.07057186216115952,
0.5256284475326538,
-0.09072166681289673,
0.27207258343696594,
-0.41877156496047974,
-0.13784874975681305,
0.3545069694519043,
-0.7848485112190247,
-0.4807850420475006,
-0.14990092813968658,
-0.06791079044342041,
0.2985430061817169,
0.09567570686340332,
-0.15959656238555908,
-0.31561312079429626,
0.2574634850025177,
-0.11390780657529831,
-0.5589104890823364,
0.03010970540344715,
0.15597209334373474,
0.07535719871520996,
-0.17388051748275757,
0.46529385447502136,
0.04085161164402962,
-0.4072340428829193,
0.3534643352031708,
-0.026865288615226746
] |
https://github.com/huggingface/datasets/issues/6319
|
Datasets.map is severely broken
|
Which specific version of datasets are you using?
What is the architecture of your colab setup? Ram? Cores? OS?
On Thu, Oct 19, 2023, 2:27 PM pensive introvert ***@***.***>
wrote:
> Batched is far worse. A single batch of 1000 took hours and that was only
> 1%
>
>
> On Thu, Oct 19, 2023, 2:26 PM Mario Šaško ***@***.***>
> wrote:
>
>> Hi! You should use the batched map for the best performance (with
>> num_proc=1) - the fast tokenizers can process a batch's samples in
>> parallel.
>>
>> E.g., the following code in Colab takes an hour to complete:
>>
>> # !pip install datasets transformersfrom datasets import load_datasetfrom transformers import AutoTokenizertokenizer = AutoTokenizer.from_pretrained("bert-base-cased")dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"])
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771503757>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/ABDD3ZJHPSRVDEXFNMXR2N3YAFWFZAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDGNZVG4>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> ***@***.***>
>>
>
|
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
| 163
|
Datasets.map is severely broken
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
Which specific version of datasets are you using?
What is the architecture of your colab setup? Ram? Cores? OS?
On Thu, Oct 19, 2023, 2:27 PM pensive introvert ***@***.***>
wrote:
> Batched is far worse. A single batch of 1000 took hours and that was only
> 1%
>
>
> On Thu, Oct 19, 2023, 2:26 PM Mario Šaško ***@***.***>
> wrote:
>
>> Hi! You should use the batched map for the best performance (with
>> num_proc=1) - the fast tokenizers can process a batch's samples in
>> parallel.
>>
>> E.g., the following code in Colab takes an hour to complete:
>>
>> # !pip install datasets transformersfrom datasets import load_datasetfrom transformers import AutoTokenizertokenizer = AutoTokenizer.from_pretrained("bert-base-cased")dataset = dataset.map(lambda ex: tokenizer(ex["text"]), batched=True, remove_columns=["text", "meta"])
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771503757>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/ABDD3ZJHPSRVDEXFNMXR2N3YAFWFZAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDGNZVG4>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> ***@***.***>
>>
>
|
[
-0.6481049656867981,
0.1093885749578476,
0.024797633290290833,
0.10106495022773743,
0.08798329532146454,
0.12319757789373398,
0.27200227975845337,
0.2651054859161377,
-0.12835367023944855,
-0.05704154074192047,
-0.05525711178779602,
0.6183359026908875,
-0.12706321477890015,
-0.23674333095550537,
-0.363272488117218,
0.20084801316261292,
0.23262298107147217,
0.1797543317079544,
0.37825796008110046,
0.013601422309875488,
-0.052899740636348724,
0.09430872648954391,
-0.36176198720932007,
-0.025873929262161255,
-0.7112903594970703,
-0.21808280050754547,
-0.11002262681722641,
-0.2199593484401703,
-0.29478195309638977,
-0.3993639349937439,
0.1278086006641388,
0.2376059591770172,
-0.1613273322582245,
0.7184574007987976,
-0.00011953662033192813,
-0.13348554074764252,
-0.03314311057329178,
0.27080440521240234,
-0.008889665827155113,
-0.06065869331359863,
-0.28119996190071106,
-0.14450737833976746,
-0.0028613561298698187,
-0.04065854102373123,
0.2107219696044922,
0.08170375972986221,
0.1340469866991043,
-0.2201232761144638,
0.37017905712127686,
0.09365203231573105,
0.097460076212883,
0.15446709096431732,
-0.20553258061408997,
-0.0396338552236557,
0.1613098680973053,
-0.04221425950527191,
-0.20239229500293732,
0.2584404945373535,
0.36120739579200745,
-0.33944737911224365,
-0.17306530475616455,
-0.03736994042992592,
-0.33595016598701477,
-0.036666736006736755,
-0.20316535234451294,
-0.17046129703521729,
-0.016550615429878235,
-0.5492026805877686,
0.3932770788669586,
0.18781882524490356,
0.17964231967926025,
-0.020679526031017303,
0.031198086217045784,
-0.23228207230567932,
-0.24234023690223694,
-0.23059949278831482,
0.23213765025138855,
0.003983338829129934,
-0.17780734598636627,
0.20701029896736145,
-0.3555927574634552,
0.23631548881530762,
0.20193573832511902,
0.1780623197555542,
-0.0678161010146141,
0.47790777683258057,
0.050012655556201935,
0.2336556315422058,
0.103456050157547,
0.009233389049768448,
0.0532328300178051,
0.0229642353951931,
0.03990248218178749,
0.2350071668624878,
-0.379911869764328,
-0.03367655724287033,
0.07641344517469406,
-0.2330988049507141,
0.253926157951355,
-0.1775495857000351,
-0.21936722099781036,
0.22301378846168518,
-0.15550662577152252,
0.2967340350151062,
0.27917829155921936,
0.032827939838171005,
0.004706159234046936,
0.24400316178798676,
0.4044795036315918,
-0.25446638464927673,
-0.4511118233203888,
0.19864138960838318,
-0.1399330347776413,
-0.2281860113143921,
0.0543777160346508,
0.018793147057294846,
-0.07650665938854218,
-0.13344815373420715,
-0.2537572979927063,
0.15834686160087585,
-0.508926272392273,
0.15456335246562958,
0.1107141450047493,
0.28930673003196716,
-0.21875035762786865,
0.13858896493911743,
-0.20837350189685822,
-0.3218749165534973,
-0.2039058655500412,
-0.20519700646400452,
-0.019380828365683556,
-0.2677910029888153,
-0.3134208917617798,
0.15066272020339966,
-0.014867087826132774,
0.05040784925222397,
0.2106422632932663,
0.09294739365577698,
-0.07842983305454254,
-0.02704896777868271,
0.11389695107936859,
-0.4364427924156189,
0.18611961603164673,
0.07762913405895233,
-0.16588109731674194,
0.5256989002227783,
-0.016150496900081635,
-0.13045760989189148,
-0.10497381538152695,
0.09834875911474228,
-0.34606310725212097,
-0.04537435993552208,
0.06370007246732712,
0.05026955157518387,
-0.07494039088487625,
0.010141711682081223,
-0.3666917383670807,
0.22877024114131927,
0.23333245515823364,
-0.021959573030471802,
0.034342579543590546,
-0.10816287994384766,
-0.2684415578842163,
-0.22084058821201324,
0.07148882001638412,
0.1964990198612213,
-0.3046652376651764,
-0.011511765420436859,
0.18337637186050415,
0.32313835620880127,
0.35724785923957825,
0.4397028684616089,
0.006939599756151438,
0.29570773243904114,
-0.3554767370223999,
0.1583380252122879,
0.2293286919593811,
0.2821940779685974,
-0.45181941986083984,
0.18411745131015778,
-0.025103185325860977,
-0.048695143312215805,
-0.39383548498153687,
-0.12697643041610718,
0.7035006284713745,
-0.11915554106235504,
0.5945042371749878,
0.16479352116584778,
-0.10989481210708618,
0.1181252971291542,
-0.35366079211235046,
-0.20701396465301514,
0.007559327408671379,
0.056700851768255234,
0.08707856386899948,
-0.14078745245933533,
-0.1703505516052246,
-0.23310020565986633,
0.22469326853752136,
0.1597864180803299,
-0.03193763643503189,
0.18990084528923035,
0.30591484904289246,
-0.1591096967458725,
0.05647033825516701,
-0.2723989188671112,
0.002713732421398163,
0.34440115094184875,
0.28118863701820374,
-0.07817478477954865,
0.01797609031200409,
-0.05375824123620987,
0.011128799989819527,
0.195688396692276,
-0.1143786609172821,
0.08478507399559021,
-0.022861436009407043,
-0.12933121621608734,
-0.17057295143604279,
0.16878372430801392,
-0.19209407269954681,
0.07749719172716141,
0.031994566321372986,
0.1562572717666626,
0.2899264097213745,
0.1575624793767929,
-0.03129421919584274,
-0.2478432059288025,
-0.04338774085044861,
0.06615836918354034,
0.2575832009315491,
-0.18378059566020966,
-0.3242570161819458,
0.2608477771282196,
0.24667988717556,
-0.05069202184677124,
-0.166937917470932,
0.2071632444858551,
0.14903275668621063,
0.06771175563335419,
-0.1487177163362503,
0.07977017760276794,
-0.0887436494231224,
-0.2200830578804016,
0.14045801758766174,
0.24404031038284302,
0.037741608917713165,
0.301108717918396,
-0.22905194759368896,
0.22219350934028625,
0.13352295756340027,
0.03682441636919975,
-0.03155133128166199,
0.20387232303619385,
0.39804205298423767,
-0.02215481922030449,
0.1984434276819229,
0.22025345265865326,
0.029502876102924347,
0.21081072092056274,
0.6137743592262268,
0.12781397998332977,
-0.05224638432264328,
0.1323518455028534,
-0.2383609414100647,
-0.022367654368281364,
0.19658492505550385,
0.14943577349185944,
0.35132431983947754,
-0.02001955732703209,
0.08193980902433395,
-0.05571073293685913,
-0.0887472927570343,
-0.01825471967458725,
0.03489428013563156,
0.1282956302165985,
0.3304087519645691,
0.1308971494436264,
0.17928926646709442,
0.20296664535999298,
-0.2921208441257477,
-0.4408505856990814,
0.06846856325864792,
0.4527522921562195,
-0.0485733263194561,
0.10390055924654007,
-0.22291740775108337,
-0.02798522636294365,
0.03144203871488571,
0.00016747508198022842,
-0.1532488912343979,
-0.415529727935791,
-0.13795025646686554,
0.09470309317111969,
0.13380159437656403,
0.36018040776252747,
0.046779293566942215,
0.12069956958293915,
0.04651526361703873,
-0.019295169040560722,
-0.18015392124652863,
-0.3491237163543701,
-0.26664984226226807,
-0.04676300287246704,
0.43423599004745483,
-0.1400720328092575,
0.1804061383008957,
0.1430400013923645,
-0.27957969903945923,
0.08164593577384949,
-0.2559552788734436,
0.020223036408424377,
-0.1693734973669052,
0.05160234123468399,
0.15375351905822754,
0.33399951457977295,
-0.5256466865539551,
-0.11066722124814987,
0.3145737946033478,
-0.5778430700302124,
0.07489758729934692,
-0.2517401874065399,
-0.04024013504385948,
-0.32739976048469543,
0.062816321849823,
0.07604622095823288,
-0.11224176734685898,
-0.27605950832366943,
0.31355375051498413,
-0.14011572301387787,
-0.01754344254732132,
0.13528695702552795,
0.2382124364376068,
0.13469521701335907,
0.16147692501544952,
-0.26271483302116394,
-0.16339898109436035,
-0.2513221204280853,
0.38535749912261963,
-0.06651587039232254,
-0.13268686830997467,
0.06363452970981598,
-0.0024780556559562683,
0.09702812135219574,
0.10265018790960312,
-0.35660600662231445,
0.4193674623966217,
-0.30361226201057434,
0.1524021178483963,
0.0527004599571228,
-0.08894725143909454,
0.1936289221048355,
0.06801081448793411,
0.024202393367886543,
0.07387414574623108,
-0.37695547938346863,
-0.05749741941690445,
0.12297077476978302,
0.19432398676872253,
0.12959474325180054,
0.4220525026321411,
0.2751162052154541,
0.6927206516265869,
0.2844466269016266,
-0.174463152885437,
0.032181266695261,
0.06734799593687057,
0.052265383303165436,
-0.223341703414917,
-0.482626348733902,
0.1592029184103012,
-0.15014594793319702,
-0.43122875690460205,
0.22327330708503723,
0.036427803337574005,
-0.576260507106781,
-0.018924832344055176,
-0.10693243145942688,
0.14245441555976868,
-0.29830703139305115,
0.21224623918533325,
-0.23027485609054565,
-0.02217300981283188,
0.09026236832141876,
0.11689058691263199,
-0.2797991633415222,
-0.21642613410949707,
0.12145677208900452,
-0.12770532071590424,
-0.05678487569093704,
-0.2586371898651123,
-0.5778338313102722,
0.2660601735115051,
-0.6081475615501404,
0.24704678356647491,
0.03619573265314102,
0.48204323649406433,
-0.032321177423000336,
0.2615041136741638,
0.1375572681427002,
-0.07947295159101486,
0.6044260859489441,
-0.08086398243904114,
-0.17709362506866455,
0.1861870139837265,
0.15726825594902039,
-0.26052820682525635,
-0.16900187730789185,
0.11690673232078552,
0.5971510410308838,
0.5342687368392944,
0.20047268271446228,
-0.08353693783283234,
-0.20558589696884155,
0.09150921553373337,
0.10442375391721725,
-0.06876108050346375,
-0.209058478474617,
-0.09839867800474167,
-0.031157169491052628,
-0.14713844656944275,
0.19001343846321106,
0.17196154594421387,
-0.1781531274318695,
0.1306096613407135,
-0.40117114782333374,
-0.0662345290184021,
-0.28157809376716614,
0.11982288956642151,
0.08733518421649933,
0.11967366188764572,
0.016207119449973106,
0.39988619089126587,
0.287945955991745,
0.09124927222728729,
0.17865534126758575,
0.1512623429298401,
-0.19730278849601746,
-0.06724764406681061,
0.03953494131565094,
0.004909755662083626,
0.5502797961235046,
0.5047962665557861,
-0.1418447494506836,
0.06367488950490952,
-0.3657243847846985,
0.3157120943069458,
0.03859773278236389,
0.36697304248809814,
0.34610074758529663,
0.2356923222541809,
-0.7321019768714905,
-0.34830087423324585,
0.10078271478414536,
0.4169156551361084,
-0.2156914472579956,
0.5845950841903687,
-0.4292116165161133,
-0.1473798006772995,
0.7821944952011108,
0.21189656853675842,
1.079116940498352,
-0.3165300488471985,
0.02726196125149727,
-0.20671775937080383,
0.23641209304332733,
0.22293531894683838,
-0.5704312920570374,
0.10527897626161575,
-0.3390599489212036,
-0.321112722158432,
-0.06756473332643509,
-0.08390267193317413,
0.037075355648994446,
0.24833649396896362,
-0.11498700082302094,
0.13454191386699677,
0.16375920176506042,
0.5302236676216125,
0.07468471676111221,
-0.08076835423707962,
0.32819750905036926,
-0.2511671483516693,
-0.15899626910686493,
0.05837123095989227,
0.03181951493024826,
0.004869911819696426,
-0.028995472937822342,
0.028839055448770523,
-0.07247970253229141,
0.02105015516281128,
-0.5203348994255066,
-0.14207693934440613,
-0.6143736839294434,
0.12645384669303894,
0.07865498960018158,
0.25773870944976807,
0.10753779113292694,
0.09509534388780594,
0.012420333921909332,
0.3220805525779724,
0.08504188060760498,
0.43603652715682983,
0.23250404000282288,
-0.02064615674316883,
0.2989741265773773,
-0.4110008180141449,
0.15394921600818634,
-0.015237284824252129,
0.01804663985967636,
0.09285037219524384,
-0.03195609524846077,
-0.37671810388565063,
-0.12764732539653778,
0.2602900266647339,
0.5899376273155212,
-0.15470245480537415,
-0.16517943143844604,
0.002280719578266144,
0.0164489783346653,
-0.2686968743801117,
0.050702113658189774,
0.22729520499706268,
0.11738280206918716,
0.654552161693573,
-0.1863788366317749,
-0.17165935039520264,
-0.08200840651988983,
0.33122649788856506,
-0.1189490482211113,
-0.09385249763727188,
0.26382702589035034,
0.09240280091762543,
-0.22749516367912292,
-0.11097557842731476,
0.3524700999259949,
-0.015759702771902084,
-0.2257782220840454,
0.03642048314213753,
-0.5557698011398315,
0.06692644953727722,
0.18658636510372162,
0.2964290380477905,
0.012457985430955887,
-0.020125560462474823,
-0.04751436412334442,
-0.46200883388519287,
-0.39930203557014465,
-0.17901714146137238,
-0.03674928471446037,
0.21167398989200592,
-0.05650665611028671,
-0.0620490200817585,
-0.15123333036899567,
0.23766791820526123,
-0.17705963551998138,
0.14732606709003448,
-0.202507883310318,
-0.052671246230602264,
-0.11607712507247925,
-0.09736787527799606,
0.23457619547843933,
-0.2141277939081192,
-0.0686577707529068,
0.5469417572021484,
0.14225012063980103,
-0.1206880435347557,
-0.17631188035011292,
0.19033153355121613,
0.17669346928596497,
-0.23802998661994934,
0.0892539694905281,
-0.06024911627173424,
-0.019090555608272552,
-0.40119248628616333,
-0.14474338293075562,
0.12777045369148254,
-0.04911167919635773,
-0.21279361844062805,
0.3304814398288727,
0.007126808166503906,
-0.1045600026845932,
0.12808452546596527,
0.09307064116001129,
0.17773987352848053,
0.23302671313285828,
0.26028162240982056,
0.04146817326545715,
-0.09406884014606476,
-0.030821310356259346,
0.10008607804775238,
0.0876016914844513,
-0.08101846277713776,
0.45393118262290955,
-0.4422544240951538,
-0.11308243870735168,
0.26890313625335693,
0.29808470606803894,
0.5592206716537476,
-0.12409577518701553,
-0.31382933259010315,
0.5371643900871277,
0.05498557537794113,
-0.005183985456824303,
-0.05662831291556358,
0.7641733884811401,
0.19658927619457245,
0.07213521003723145,
0.1765223890542984,
0.09263323247432709,
-0.1700000762939453,
-0.25130659341812134,
0.1738067865371704,
0.3088838756084442,
-0.14163222908973694,
0.14197953045368195,
-0.05041647329926491,
0.21265240013599396,
0.10274682939052582,
0.1594759076833725,
0.12116596102714539,
0.32506126165390015,
0.29655689001083374,
0.08358956128358841,
0.18757511675357819,
0.33088719844818115,
0.18038132786750793,
0.14691726863384247,
-0.36164891719818115,
0.07632038742303848,
0.4559898376464844,
-0.17871105670928955,
0.14497733116149902,
0.1252124011516571,
0.31272804737091064,
-0.2192983627319336,
-0.5628403425216675,
-0.04018465429544449,
0.24543708562850952,
-0.252142071723938,
-0.04623289033770561,
0.17521989345550537,
-0.08298985660076141,
-0.23770791292190552,
0.24452462792396545,
-0.09586569666862488,
-0.012570582330226898,
0.28575456142425537,
0.08799286186695099,
0.069969043135643,
-0.2305869311094284,
-0.23688983917236328,
-0.05992309749126434,
0.48545241355895996,
-0.2421797215938568,
0.07685428857803345,
-0.5623549818992615,
-0.12336471676826477,
-0.48247024416923523,
0.19323275983333588,
0.4065394699573517,
0.30466964840888977,
-0.3283345699310303,
0.09849858283996582,
-0.22727029025554657,
0.056951530277729034,
-0.028758684173226357,
0.41522130370140076,
-0.09861281514167786,
-0.36428147554397583,
0.1509222388267517,
-0.021442145109176636,
-0.16171342134475708,
-0.09645281732082367,
0.07969999313354492,
0.32057803869247437,
0.20144082605838776,
-0.14483043551445007,
0.039033230394124985,
-0.19544392824172974,
-0.12781298160552979,
-0.14925998449325562,
0.020353607833385468,
-0.32582220435142517,
0.30104827880859375,
-0.4256770610809326,
0.14776229858398438,
-0.2033098042011261,
0.05255548655986786,
-0.10131913423538208,
0.35604965686798096,
0.5401063561439514,
0.06910347193479538,
-0.46800780296325684,
-0.30179718136787415,
-0.30032724142074585,
0.04684834182262421,
-0.28778523206710815,
0.1850903034210205,
-0.08938513696193695,
-0.035176947712898254,
-0.015543952584266663,
0.30033326148986816,
-0.05499619245529175,
0.17273466289043427,
-0.015105238184332848,
0.4287450909614563,
-0.2786809206008911,
0.21463516354560852,
-0.15319116413593292,
-0.07263581454753876,
0.023330628871917725,
-0.3884909451007843,
0.38860440254211426,
-0.3436078429222107,
-0.03704054653644562,
-0.08397813141345978,
-0.24674934148788452,
0.034139543771743774,
-0.3119896352291107,
0.34203365445137024,
0.15159228444099426,
0.11042843759059906,
0.10696949809789658,
-0.007115375250577927,
-0.19368880987167358,
-0.10615944117307663,
-0.029549911618232727,
0.15237990021705627,
0.19703544676303864,
0.3216106593608856,
-0.2001722902059555,
0.1749788522720337,
-0.20188283920288086,
-0.14689236879348755,
-0.008839275687932968,
-0.21436239778995514,
-0.07885593175888062,
0.08545525372028351,
-0.10145118087530136,
0.39438021183013916,
-0.049578357487916946,
0.5207115411758423,
-0.1494353711605072,
0.2924225330352783,
-0.3971356153488159,
-0.13129399716854095,
0.37042438983917236,
-0.6660059690475464,
-0.3974866569042206,
-0.13980834186077118,
-0.0375838577747345,
0.35061943531036377,
0.09347505867481232,
-0.10723546147346497,
-0.3865259289741516,
0.23416894674301147,
-0.12630820274353027,
-0.5711507797241211,
0.1141958087682724,
0.128749281167984,
0.08261813223361969,
-0.19980363547801971,
0.4128374457359314,
-0.01075815036892891,
-0.40004295110702515,
0.350986123085022,
-0.02009672299027443
] |
https://github.com/huggingface/datasets/issues/6319
|
Datasets.map is severely broken
|
from functools import partial
import transformers
from datasets import load_dataset, concatenate_datasets, load_from_disk
model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf"
output_dir="/opt/data/data/LongLoRA/checkpoints"
cache_dir="/opt/data/data/LongLoRA/cache"
model_max_length=16384
IGNORE_INDEX = -100
DEFAULT_PAD_TOKEN = "[PAD]"
DEFAULT_EOS_TOKEN = "</s>"
DEFAULT_BOS_TOKEN = "<s>"
DEFAULT_UNK_TOKEN = "<unk>"
tokenizer = transformers.LlamaTokenizerFast.from_pretrained(
model_name_or_path,
cache_dir=cache_dir,
model_max_length=model_max_length,
padding_side="right",
use_fast=True,
#use_fast=False
)
special_tokens_dict = dict()
if tokenizer.pad_token is None:
special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN
if tokenizer.eos_token is None:
special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN
if tokenizer.bos_token is None:
special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN
if tokenizer.unk_token is None:
special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN
tokenizer.add_special_tokens(special_tokens_dict)
def tokenize_fn(tokenizer, example):
context_length = tokenizer.model_max_length
outputs = tokenizer(
tokenizer.eos_token.join(example["text"]),
#truncation=False,
truncation=True,
return_tensors="pt",
#return_tensors="np",
pad_to_multiple_of=context_length,
padding=True,
)
return {"input_ids": outputs["input_ids"].view(-1, context_length)}
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample",
cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False,
num_proc=16, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***>
wrote:
> Can you please provide a self-contained reproducer?
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
| 170
|
Datasets.map is severely broken
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
from functools import partial
import transformers
from datasets import load_dataset, concatenate_datasets, load_from_disk
model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf"
output_dir="/opt/data/data/LongLoRA/checkpoints"
cache_dir="/opt/data/data/LongLoRA/cache"
model_max_length=16384
IGNORE_INDEX = -100
DEFAULT_PAD_TOKEN = "[PAD]"
DEFAULT_EOS_TOKEN = "</s>"
DEFAULT_BOS_TOKEN = "<s>"
DEFAULT_UNK_TOKEN = "<unk>"
tokenizer = transformers.LlamaTokenizerFast.from_pretrained(
model_name_or_path,
cache_dir=cache_dir,
model_max_length=model_max_length,
padding_side="right",
use_fast=True,
#use_fast=False
)
special_tokens_dict = dict()
if tokenizer.pad_token is None:
special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN
if tokenizer.eos_token is None:
special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN
if tokenizer.bos_token is None:
special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN
if tokenizer.unk_token is None:
special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN
tokenizer.add_special_tokens(special_tokens_dict)
def tokenize_fn(tokenizer, example):
context_length = tokenizer.model_max_length
outputs = tokenizer(
tokenizer.eos_token.join(example["text"]),
#truncation=False,
truncation=True,
return_tensors="pt",
#return_tensors="np",
pad_to_multiple_of=context_length,
padding=True,
)
return {"input_ids": outputs["input_ids"].view(-1, context_length)}
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample",
cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False,
num_proc=16, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***>
wrote:
> Can you please provide a self-contained reproducer?
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
[
-0.616814374923706,
0.08000026643276215,
0.05563323572278023,
0.20444926619529724,
0.2958586812019348,
0.12437405437231064,
0.24875850975513458,
0.32366257905960083,
-0.1093851774930954,
-0.13184751570224762,
-0.1938907504081726,
0.6695700883865356,
-0.06927613914012909,
-0.41678550839424133,
-0.276354044675827,
0.165674090385437,
0.2088633030653,
0.12861692905426025,
0.2902128994464874,
-0.062228430062532425,
-0.0657946914434433,
0.042704179883003235,
-0.28154903650283813,
-0.00872010737657547,
-0.5759645104408264,
-0.07758870720863342,
-0.00902862660586834,
-0.19113337993621826,
-0.12882256507873535,
-0.4930381178855896,
0.07235286384820938,
0.10570931434631348,
-0.19647468626499176,
0.7518899440765381,
-0.00011996035027550533,
-0.10678552836179733,
0.01053769513964653,
0.24811094999313354,
0.05239027366042137,
0.09757807850837708,
-0.15889579057693481,
-0.02581723965704441,
-0.11429624259471893,
-0.01662071794271469,
0.25475138425827026,
0.061197713017463684,
0.1070471704006195,
-0.27669233083724976,
0.3450189530849457,
0.16862672567367554,
0.09592150896787643,
0.252114862203598,
-0.12805978953838348,
-0.0023861797526478767,
0.19014832377433777,
-0.08689641952514648,
-0.13683070242404938,
0.10668386518955231,
0.36105313897132874,
-0.32709673047065735,
-0.2342468500137329,
-0.05921780318021774,
-0.41952216625213623,
-0.15363390743732452,
-0.11509249359369278,
-0.24274973571300507,
0.007102414965629578,
-0.4677814543247223,
0.470647931098938,
0.32330232858657837,
0.17813611030578613,
-0.09361905604600906,
-0.026854295283555984,
-0.16406650841236115,
-0.2835404872894287,
-0.16327476501464844,
0.24338969588279724,
0.010133341886103153,
-0.06759761273860931,
0.15907983481884003,
-0.3311150372028351,
0.1733904629945755,
0.11590211093425751,
0.21101070940494537,
-0.1652853637933731,
0.5369913578033447,
0.15987585484981537,
0.2247004508972168,
0.025907963514328003,
-0.07226038724184036,
-0.060242462903261185,
-0.020961187779903412,
0.019052570685744286,
0.296097993850708,
-0.4717772603034973,
-0.06661926209926605,
0.16019675135612488,
-0.3164939880371094,
0.35857534408569336,
-0.24814678728580475,
-0.34909719228744507,
0.312636137008667,
-0.1958339363336563,
0.2189428210258484,
0.2664528489112854,
0.01815074495971203,
-0.0606049969792366,
0.3600237965583801,
0.4140612483024597,
-0.33829084038734436,
-0.3260994553565979,
0.19594037532806396,
-0.11728175729513168,
-0.20850957930088043,
0.09567032754421234,
-0.011113021522760391,
-0.13806438446044922,
-0.09063830971717834,
-0.1586078256368637,
0.22117267549037933,
-0.5713101625442505,
0.12568017840385437,
0.13670244812965393,
0.34684184193611145,
-0.2597532570362091,
0.15703973174095154,
-0.18379069864749908,
-0.20866788923740387,
-0.2224864363670349,
-0.14890582859516144,
-0.062058139592409134,
-0.33809924125671387,
-0.25397536158561707,
0.11192739009857178,
0.02821485325694084,
0.0611240454018116,
0.16429802775382996,
0.07250934839248657,
-0.1423441469669342,
-0.08864409476518631,
0.13018079102039337,
-0.32133445143699646,
0.18155518174171448,
0.07901716232299805,
-0.24473102390766144,
0.5588845014572144,
-0.0038946084678173065,
-0.13662880659103394,
-0.15396597981452942,
0.12643907964229584,
-0.2386661171913147,
-0.056005582213401794,
0.04910273849964142,
0.06083286553621292,
-0.12220099568367004,
0.005944829434156418,
-0.24423211812973022,
0.1285707801580429,
0.32633525133132935,
0.06452994048595428,
0.07860217988491058,
-0.1345958262681961,
-0.2607274055480957,
-0.20554141700267792,
0.08316781371831894,
0.20716336369514465,
-0.145552858710289,
-0.05879143998026848,
0.15553976595401764,
0.20645038783550262,
0.23156136274337769,
0.424953818321228,
0.03230661526322365,
0.32157567143440247,
-0.3179838955402374,
0.2403399497270584,
0.24490979313850403,
0.16956008970737457,
-0.5884498357772827,
0.2657736837863922,
0.012402117252349854,
-0.07488355785608292,
-0.44187015295028687,
0.006216071080416441,
0.6111196279525757,
-0.14858680963516235,
0.39809557795524597,
0.2775617241859436,
-0.03188537806272507,
0.04047635197639465,
-0.3191893398761749,
-0.2840903699398041,
0.0605623833835125,
0.13702963292598724,
0.16037246584892273,
-0.13387930393218994,
-0.16394945979118347,
-0.11029097437858582,
0.286905974149704,
0.15638698637485504,
0.02310127578675747,
0.24482959508895874,
0.35085904598236084,
-0.06960536539554596,
0.14520372450351715,
-0.3277866542339325,
-0.17324671149253845,
0.3360317349433899,
0.22019833326339722,
-0.13123519718647003,
-0.024487502872943878,
-0.0264170840382576,
0.021595366299152374,
0.20541273057460785,
-0.17363901436328888,
0.1241014152765274,
-0.007917333394289017,
-0.11236850917339325,
-0.15659219026565552,
0.20869092643260956,
-0.169766366481781,
-0.017357492819428444,
0.09216140955686569,
0.11468802392482758,
0.15591903030872345,
0.13354025781154633,
-0.05047360807657242,
-0.1745731383562088,
-0.09554581344127655,
0.05205642431974411,
0.29849177598953247,
-0.13648654520511627,
-0.25329574942588806,
0.23193711042404175,
0.19100047647953033,
0.024270743131637573,
-0.27149689197540283,
0.3152312934398651,
0.15424677729606628,
-0.048134930431842804,
-0.11185315996408463,
0.16362632811069489,
-0.120502769947052,
-0.30597564578056335,
0.058959878981113434,
0.10074049234390259,
0.025293249636888504,
0.30667322874069214,
-0.17845475673675537,
0.2159663736820221,
0.20815958082675934,
-0.07270564138889313,
-0.08314505964517593,
0.21582430601119995,
0.4141397774219513,
-0.0011841431260108948,
0.30650457739830017,
0.20591171085834503,
0.02377977967262268,
0.07679327577352524,
0.6414348483085632,
0.045905765146017075,
0.044679466634988785,
0.14963778853416443,
-0.24510633945465088,
0.027388080954551697,
0.017351314425468445,
0.11118718981742859,
0.30456554889678955,
-0.06754239648580551,
0.14706456661224365,
-0.011614730581641197,
-0.0939764678478241,
-0.05441814288496971,
-0.008679650723934174,
0.11619343608617783,
0.2654479742050171,
0.3240393400192261,
0.15115967392921448,
0.2323579490184784,
-0.30719655752182007,
-0.42349982261657715,
0.12526655197143555,
0.4467296898365021,
-0.07605095952749252,
0.09446393698453903,
-0.20889973640441895,
0.11177083104848862,
-0.008496013469994068,
-0.058171045035123825,
-0.24672752618789673,
-0.4202786684036255,
-0.1608547419309616,
-0.03734959289431572,
0.12111665308475494,
0.5053715705871582,
0.03294584900140762,
0.018523454666137695,
0.09149202704429626,
-0.07392799109220505,
-0.20164360105991364,
-0.37729358673095703,
-0.2759159207344055,
-0.11264641582965851,
0.5043506026268005,
-0.25724831223487854,
0.06304115802049637,
0.21349991858005524,
-0.33884376287460327,
-0.0027037207037210464,
-0.3208344280719757,
0.006387263536453247,
-0.07087475061416626,
0.0019037183374166489,
0.17139101028442383,
0.2958170175552368,
-0.29580366611480713,
-0.05052671581506729,
0.388241171836853,
-0.5811421275138855,
0.14242558181285858,
-0.07958000898361206,
-0.011754892766475677,
-0.25493907928466797,
0.06367269158363342,
0.08328191936016083,
0.012166970409452915,
-0.28198060393333435,
0.23690660297870636,
-0.23437319695949554,
0.027319669723510742,
0.1877899169921875,
0.2311946600675583,
0.16220054030418396,
0.019658993929624557,
-0.2750840187072754,
-0.17341960966587067,
-0.013010002672672272,
0.46207067370414734,
-0.06702755391597748,
-0.18442918360233307,
-0.03486649692058563,
-0.050969354808330536,
0.15849407017230988,
0.15202021598815918,
-0.4738195538520813,
0.5096520781517029,
-0.42824259400367737,
0.10403229296207428,
-0.13717909157276154,
-0.03199699521064758,
0.2059212476015091,
0.08196663111448288,
0.09074216336011887,
0.03252045810222626,
-0.24748949706554413,
-0.07106529921293259,
0.055501651018857956,
0.1478527933359146,
0.052018240094184875,
0.4880213439464569,
0.2769896984100342,
0.5939270257949829,
0.2949954867362976,
-0.14929728209972382,
0.011347126215696335,
0.03066348470747471,
0.02163061499595642,
-0.2045539915561676,
-0.42501896619796753,
0.10864672064781189,
-0.1602710783481598,
-0.31704312562942505,
0.17805582284927368,
0.02404651790857315,
-0.5851530432701111,
0.05229058116674423,
-0.10479439795017242,
0.24585044384002686,
-0.24849238991737366,
0.26353219151496887,
-0.22068586945533752,
-0.041676416993141174,
0.05957954749464989,
0.16642004251480103,
-0.2641787528991699,
-0.19730553030967712,
0.28405141830444336,
-0.11418284475803375,
0.014312975108623505,
-0.2693760097026825,
-0.6374514698982239,
0.33070114254951477,
-0.5238848328590393,
0.1699071228504181,
-0.0800720751285553,
0.5527870655059814,
-0.06339721381664276,
0.21744206547737122,
0.09265117347240448,
-0.14481908082962036,
0.6487614512443542,
-0.0916505753993988,
-0.003963489085435867,
0.22298237681388855,
0.2052542269229889,
-0.35910218954086304,
-0.079168401658535,
0.13148683309555054,
0.3432057499885559,
0.5246336460113525,
0.3554156422615051,
-0.18031954765319824,
-0.19491179287433624,
-0.037088774144649506,
0.15005315840244293,
-0.04975150153040886,
-0.25842246413230896,
-0.09252282977104187,
-0.012108918279409409,
-0.08129279315471649,
0.1442030966281891,
0.1351371854543686,
-0.15743950009346008,
0.2191271036863327,
-0.35747838020324707,
-0.1372755467891693,
-0.27331262826919556,
0.0939362496137619,
0.03192713111639023,
0.10864587128162384,
-0.01475367322564125,
0.4380013644695282,
0.2552780508995056,
-0.00551953911781311,
0.06710942089557648,
0.17048494517803192,
-0.20006877183914185,
-0.09484194219112396,
0.018522240221500397,
0.012430797331035137,
0.5113219618797302,
0.4752671718597412,
-0.06733854860067368,
0.08036486059427261,
-0.18620379269123077,
0.2709263563156128,
-0.11119579523801804,
0.28086796402931213,
0.36770880222320557,
0.24228179454803467,
-0.6435726881027222,
-0.30865028500556946,
0.25118589401245117,
0.31807395815849304,
-0.18234610557556152,
0.6205851435661316,
-0.4530166983604431,
-0.1764489710330963,
0.7457550764083862,
0.2656371295452118,
1.032869815826416,
-0.36472809314727783,
0.022991035133600235,
-0.18689215183258057,
0.0902225524187088,
0.19002404808998108,
-0.5564001202583313,
0.14025020599365234,
-0.4010232388973236,
-0.21118278801441193,
-0.05693334341049194,
-0.11017197370529175,
0.028275929391384125,
0.29257509112358093,
-0.09050621092319489,
0.01664067432284355,
0.05786232650279999,
0.5956671833992004,
0.09439793229103088,
0.11252185702323914,
0.2544465661048889,
-0.2477605640888214,
-0.17659953236579895,
0.062371306121349335,
0.024617154151201248,
0.011851193383336067,
0.0139948520809412,
0.00548467505723238,
-0.12297797203063965,
0.0073110125958919525,
-0.4904564619064331,
-0.04411790892481804,
-0.4843136966228485,
0.1307867467403412,
0.14467668533325195,
0.1731412559747696,
0.23282283544540405,
0.18481746315956116,
-0.08854830265045166,
0.32864847779273987,
0.025249989703297615,
0.5039051175117493,
0.18264156579971313,
0.023073963820934296,
0.44266802072525024,
-0.36475223302841187,
-0.010485010221600533,
0.035812005400657654,
-0.03812680393457413,
0.1099524199962616,
0.02199918031692505,
-0.30324846506118774,
-0.17966477572917938,
0.18813756108283997,
0.5631729364395142,
-0.12868095934391022,
-0.10199759900569916,
0.016850650310516357,
0.037178125232458115,
-0.16554990410804749,
0.05395989492535591,
0.2590922713279724,
0.07571791857481003,
0.5859752893447876,
-0.226191446185112,
-0.1822778582572937,
-0.08082833886146545,
0.3726530075073242,
-0.1798405945301056,
-0.10338104516267776,
0.2958916425704956,
0.22212053835391998,
-0.1924920678138733,
-0.10318924486637115,
0.3007524609565735,
0.12329941242933273,
-0.30543333292007446,
-0.1355406641960144,
-0.6642511487007141,
-0.021582722663879395,
0.09587683528661728,
0.1475522518157959,
-0.06997250765562057,
-0.08639021962881088,
-0.06312228739261627,
-0.46870890259742737,
-0.4176167845726013,
-0.1678590476512909,
0.026376185938715935,
0.22567476332187653,
-0.3167600929737091,
-0.10671313107013702,
-0.23674677312374115,
0.3384926915168762,
-0.16410696506500244,
0.1333899050951004,
-0.19647306203842163,
-0.03263948857784271,
-0.21720603108406067,
-0.1982971429824829,
0.18792824447155,
-0.2311391979455948,
-0.05422770231962204,
0.43217331171035767,
0.08526397496461868,
-0.08760297298431396,
-0.27824243903160095,
0.20317457616329193,
0.1667506992816925,
-0.2549310326576233,
0.12957122921943665,
-0.19201944768428802,
-0.05178263410925865,
-0.4012451171875,
-0.0954042375087738,
0.17265647649765015,
-0.11853981018066406,
-0.054054100066423416,
0.2995111644268036,
0.01182546466588974,
-0.12649935483932495,
0.023990290239453316,
0.06547269225120544,
0.12434207648038864,
0.2601693868637085,
0.19782131910324097,
0.10367145389318466,
-0.03559451550245285,
-0.20413874089717865,
0.14049549400806427,
0.12611839175224304,
-0.10855811089277267,
0.5290716290473938,
-0.42054247856140137,
-0.05591554567217827,
0.39706966280937195,
0.2872833013534546,
0.6435371041297913,
-0.21181711554527283,
-0.32690906524658203,
0.5285835266113281,
0.08430781215429306,
0.025218237191438675,
-0.19254299998283386,
0.7998387813568115,
0.07478287816047668,
0.02707519754767418,
0.09411861002445221,
-0.010983429849147797,
-0.21420195698738098,
-0.20248670876026154,
0.1939382553100586,
0.48197904229164124,
-0.26210129261016846,
0.07719670236110687,
0.05822864919900894,
0.15087327361106873,
0.05175955593585968,
0.22833271324634552,
0.1155993640422821,
0.33402547240257263,
0.3403816223144531,
0.21565300226211548,
0.05000212788581848,
0.2274145781993866,
0.23295386135578156,
0.2321634292602539,
-0.33042967319488525,
-0.10231082141399384,
0.43993711471557617,
-0.2447439730167389,
0.08318330347537994,
0.04967628791928291,
0.20393401384353638,
-0.10613442957401276,
-0.4935516119003296,
-0.026909852400422096,
0.18127544224262238,
-0.2621292173862457,
-0.06796328723430634,
0.24204450845718384,
-0.07042429596185684,
-0.111093670129776,
0.20937500894069672,
-0.06247850880026817,
0.018614262342453003,
0.29441380500793457,
0.1307673305273056,
0.04204147681593895,
-0.17881537973880768,
-0.2331761121749878,
-0.09015131741762161,
0.4245566725730896,
-0.2948299050331116,
0.05550079792737961,
-0.39357906579971313,
-0.13252946734428406,
-0.534201443195343,
0.13930732011795044,
0.30815571546554565,
0.3234032392501831,
-0.33300116658210754,
0.22496671974658966,
-0.18098287284374237,
0.07697950303554535,
-0.0014098118990659714,
0.4706984758377075,
-0.10699416697025299,
-0.3058147132396698,
0.10601021349430084,
-0.05894170701503754,
-0.16146525740623474,
-0.1877385526895523,
0.07341435551643372,
0.4239213168621063,
0.24036188423633575,
-0.02535281330347061,
-0.03914985805749893,
-0.253852516412735,
-0.0688617005944252,
-0.15773054957389832,
-0.010563649237155914,
-0.22807753086090088,
0.36206987500190735,
-0.27894067764282227,
0.164626806974411,
-0.20167146623134613,
0.036123644560575485,
-0.1005433052778244,
0.31599026918411255,
0.5411359071731567,
0.16468986868858337,
-0.462119996547699,
-0.20170167088508606,
-0.36445266008377075,
0.17330606281757355,
-0.35454267263412476,
0.17724435031414032,
0.027389120310544968,
0.03731510043144226,
-0.05293066054582596,
0.24101799726486206,
0.00888565182685852,
0.04159998148679733,
0.03416910767555237,
0.4730861186981201,
-0.17446650564670563,
0.12474212050437927,
-0.12806102633476257,
-0.012294290587306023,
-0.009564671665430069,
-0.40652933716773987,
0.41180893778800964,
-0.27692878246307373,
-0.011134117841720581,
-0.10548938810825348,
-0.22121216356754303,
0.06033859774470329,
-0.1588456779718399,
0.3053275942802429,
0.16141733527183533,
0.14377251267433167,
0.11040269583463669,
-0.09028788655996323,
-0.23813197016716003,
-0.06716911494731903,
0.013294470496475697,
0.06022607535123825,
0.11646044254302979,
0.24848699569702148,
-0.2799023389816284,
0.09433192014694214,
-0.2893567681312561,
-0.14023630321025848,
-0.11419493705034256,
-0.21808815002441406,
-0.11041232943534851,
0.13550986349582672,
-0.07764632254838943,
0.3419780433177948,
0.023680634796619415,
0.5284770727157593,
-0.07786861062049866,
0.29412180185317993,
-0.4212615489959717,
-0.05294771492481232,
0.3651861548423767,
-0.7131102681159973,
-0.45592764019966125,
-0.10567773133516312,
-0.06388065218925476,
0.25161033868789673,
0.15776225924491882,
-0.16250863671302795,
-0.3133077919483185,
0.294231116771698,
-0.06973453611135483,
-0.6543227434158325,
0.012442382052540779,
0.19096258282661438,
0.006817307323217392,
-0.16421066224575043,
0.4605734050273895,
0.030285196378827095,
-0.3609089255332947,
0.32602453231811523,
-0.030311398208141327
] |
https://github.com/huggingface/datasets/issues/6319
|
Datasets.map is severely broken
|
I changed the tokenizer to one without "Fast suffix, and something changed.
The fraction, although still slowed a lot at 80% was able to get over the
finish line of 100%
I have to do more testng, see if the whole set can be processed
On Thu, Oct 19, 2023 at 3:03 PM pensive introvert <
***@***.***> wrote:
> from functools import partial
> import transformers
> from datasets import load_dataset, concatenate_datasets, load_from_disk
>
> model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf"
> output_dir="/opt/data/data/LongLoRA/checkpoints"
> cache_dir="/opt/data/data/LongLoRA/cache"
> model_max_length=16384
>
> IGNORE_INDEX = -100
> DEFAULT_PAD_TOKEN = "[PAD]"
> DEFAULT_EOS_TOKEN = "</s>"
> DEFAULT_BOS_TOKEN = "<s>"
> DEFAULT_UNK_TOKEN = "<unk>"
>
>
> tokenizer = transformers.LlamaTokenizerFast.from_pretrained(
> model_name_or_path,
> cache_dir=cache_dir,
> model_max_length=model_max_length,
> padding_side="right",
> use_fast=True,
> #use_fast=False
> )
>
> special_tokens_dict = dict()
> if tokenizer.pad_token is None:
> special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN
> if tokenizer.eos_token is None:
> special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN
> if tokenizer.bos_token is None:
> special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN
> if tokenizer.unk_token is None:
> special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN
>
> tokenizer.add_special_tokens(special_tokens_dict)
>
> def tokenize_fn(tokenizer, example):
> context_length = tokenizer.model_max_length
> outputs = tokenizer(
> tokenizer.eos_token.join(example["text"]),
> #truncation=False,
> truncation=True,
> return_tensors="pt",
> #return_tensors="np",
> pad_to_multiple_of=context_length,
> padding=True,
> )
> return {"input_ids": outputs["input_ids"].view(-1, context_length)}
>
> for idx in range(100):
> dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample",
> cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
> dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False,
> num_proc=16, remove_columns=["text", "meta"])
> dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
>
>
> On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***>
> wrote:
>
>> Can you please provide a self-contained reproducer?
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> ***@***.***>
>>
>
|
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
| 290
|
Datasets.map is severely broken
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
I changed the tokenizer to one without "Fast suffix, and something changed.
The fraction, although still slowed a lot at 80% was able to get over the
finish line of 100%
I have to do more testng, see if the whole set can be processed
On Thu, Oct 19, 2023 at 3:03 PM pensive introvert <
***@***.***> wrote:
> from functools import partial
> import transformers
> from datasets import load_dataset, concatenate_datasets, load_from_disk
>
> model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf"
> output_dir="/opt/data/data/LongLoRA/checkpoints"
> cache_dir="/opt/data/data/LongLoRA/cache"
> model_max_length=16384
>
> IGNORE_INDEX = -100
> DEFAULT_PAD_TOKEN = "[PAD]"
> DEFAULT_EOS_TOKEN = "</s>"
> DEFAULT_BOS_TOKEN = "<s>"
> DEFAULT_UNK_TOKEN = "<unk>"
>
>
> tokenizer = transformers.LlamaTokenizerFast.from_pretrained(
> model_name_or_path,
> cache_dir=cache_dir,
> model_max_length=model_max_length,
> padding_side="right",
> use_fast=True,
> #use_fast=False
> )
>
> special_tokens_dict = dict()
> if tokenizer.pad_token is None:
> special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN
> if tokenizer.eos_token is None:
> special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN
> if tokenizer.bos_token is None:
> special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN
> if tokenizer.unk_token is None:
> special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN
>
> tokenizer.add_special_tokens(special_tokens_dict)
>
> def tokenize_fn(tokenizer, example):
> context_length = tokenizer.model_max_length
> outputs = tokenizer(
> tokenizer.eos_token.join(example["text"]),
> #truncation=False,
> truncation=True,
> return_tensors="pt",
> #return_tensors="np",
> pad_to_multiple_of=context_length,
> padding=True,
> )
> return {"input_ids": outputs["input_ids"].view(-1, context_length)}
>
> for idx in range(100):
> dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample",
> cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
> dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False,
> num_proc=16, remove_columns=["text", "meta"])
> dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
>
>
> On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***>
> wrote:
>
>> Can you please provide a self-contained reproducer?
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> ***@***.***>
>>
>
|
[
-0.5819020867347717,
0.1289406716823578,
0.0338994599878788,
0.1653226912021637,
0.20738402009010315,
0.16037055850028992,
0.23931463062763214,
0.2981029748916626,
-0.0631772056221962,
-0.18398551642894745,
-0.10214296728372574,
0.6148467063903809,
-0.09060708433389664,
-0.36094164848327637,
-0.2855617105960846,
0.16798794269561768,
0.1937834918498993,
0.1745770275592804,
0.2924362123012543,
-0.04504816606640816,
-0.03850743547081947,
0.07113968580961227,
-0.30697351694107056,
0.03173161298036575,
-0.5628754496574402,
-0.20296399295330048,
0.015881678089499474,
-0.19237491488456726,
-0.24015338718891144,
-0.46761804819107056,
0.09065239131450653,
0.11187957227230072,
-0.16877534985542297,
0.804125189781189,
-0.00011883651313837618,
-0.06896334886550903,
0.01579779013991356,
0.2677844762802124,
0.03773048147559166,
0.00018550455570220947,
-0.20237931609153748,
-0.06982927024364471,
-0.10953818261623383,
-0.05122045800089836,
0.26643773913383484,
0.02832210808992386,
0.06604237854480743,
-0.31286320090293884,
0.38228851556777954,
0.20191560685634613,
0.10527573525905609,
0.2743864357471466,
-0.09982908517122269,
0.022821074351668358,
0.13657251000404358,
-0.058659911155700684,
-0.12504102289676666,
0.18069085478782654,
0.3104790449142456,
-0.3577699363231659,
-0.2253204882144928,
-0.05280162766575813,
-0.36359885334968567,
-0.12026579678058624,
-0.07138814777135849,
-0.23333069682121277,
0.04844110459089279,
-0.5176188945770264,
0.3753763735294342,
0.2900069057941437,
0.09839075058698654,
-0.033611372113227844,
-0.05763847380876541,
-0.2389349639415741,
-0.30329152941703796,
-0.11573923379182816,
0.23484256863594055,
0.011790777556598186,
-0.08901180326938629,
0.19613595306873322,
-0.44511309266090393,
0.1486877053976059,
0.12318472564220428,
0.20910626649856567,
-0.17024220526218414,
0.4430621266365051,
0.0667916089296341,
0.21945339441299438,
0.07254856824874878,
-0.07037787139415741,
-0.09063275158405304,
-0.1124340295791626,
0.023999404162168503,
0.2687967121601105,
-0.42784571647644043,
-0.0784250795841217,
0.16364246606826782,
-0.2558237314224243,
0.32481518387794495,
-0.22364206612110138,
-0.3265604078769684,
0.28836584091186523,
-0.1750570386648178,
0.22595396637916565,
0.3320886194705963,
0.05396636947989464,
-0.055138908326625824,
0.3200059235095978,
0.38212424516677856,
-0.2971529960632324,
-0.3252303898334503,
0.18813759088516235,
-0.13363321125507355,
-0.18833111226558685,
0.051013510674238205,
-0.034022822976112366,
-0.14297029376029968,
-0.07371479272842407,
-0.1766052395105362,
0.2725468873977661,
-0.481833279132843,
0.15953440964221954,
0.1378469318151474,
0.29245826601982117,
-0.19969160854816437,
0.17033949494361877,
-0.19714787602424622,
-0.22181452810764313,
-0.1775890737771988,
-0.12988218665122986,
-0.02448267489671707,
-0.3218812644481659,
-0.2707037329673767,
0.08116164803504944,
-0.015135658904910088,
0.02190208248794079,
0.1328500509262085,
0.10496792942285538,
-0.10588511824607849,
-0.06530681252479553,
0.17386707663536072,
-0.3668239414691925,
0.21390539407730103,
0.09475119411945343,
-0.22791454195976257,
0.5854104161262512,
0.03172808885574341,
-0.16898688673973083,
-0.1312415897846222,
0.09871231019496918,
-0.28451621532440186,
-0.08914690464735031,
-0.014187457039952278,
0.08625026047229767,
-0.1893952488899231,
0.006436087191104889,
-0.28428080677986145,
0.19272683560848236,
0.2834338843822479,
0.027478676289319992,
0.05768892168998718,
-0.12390485405921936,
-0.2761487066745758,
-0.18499788641929626,
0.09562203288078308,
0.2042989581823349,
-0.19946737587451935,
-0.06626260280609131,
0.11348888278007507,
0.24676504731178284,
0.22208324074745178,
0.442216157913208,
-0.030835231766104698,
0.3200109004974365,
-0.33930283784866333,
0.25967317819595337,
0.22098912298679352,
0.257057249546051,
-0.49455228447914124,
0.3110728859901428,
-0.04777316376566887,
-0.019540615379810333,
-0.4624703526496887,
-0.12952376902103424,
0.6507397890090942,
-0.13542839884757996,
0.47697508335113525,
0.23436109721660614,
-0.05705069750547409,
0.048192963004112244,
-0.3305348753929138,
-0.26092976331710815,
0.13458208739757538,
0.061899732798337936,
0.16744664311408997,
-0.11532694846391678,
-0.18196862936019897,
-0.16814684867858887,
0.27102401852607727,
0.1913631558418274,
0.014370414428412914,
0.24441008269786835,
0.3066866397857666,
-0.024250134825706482,
0.11095460504293442,
-0.3940728008747101,
-0.06694941967725754,
0.3335056006908417,
0.2709610164165497,
-0.15230315923690796,
0.03083706647157669,
0.03450329601764679,
-0.036362409591674805,
0.19290843605995178,
-0.16566912829875946,
0.1324579417705536,
0.010834190994501114,
-0.19404149055480957,
-0.19129551947116852,
0.1977761685848236,
-0.2008504867553711,
-0.10900326073169708,
0.04632297903299332,
0.1097099557518959,
0.13975192606449127,
0.1690520942211151,
-0.024609671905636787,
-0.18369463086128235,
-0.12993201613426208,
0.04126345366239548,
0.24829763174057007,
-0.1351473182439804,
-0.2562630772590637,
0.25887539982795715,
0.17424476146697998,
0.05022147297859192,
-0.23453345894813538,
0.28601497411727905,
0.14933231472969055,
-0.020875856280326843,
-0.1506309062242508,
0.12293289601802826,
-0.06174631789326668,
-0.24113252758979797,
0.07281443476676941,
0.11807992309331894,
0.02300788089632988,
0.33205676078796387,
-0.20072336494922638,
0.23018169403076172,
0.11486978828907013,
-0.04737311601638794,
-0.05580257624387741,
0.18255315721035004,
0.41817164421081543,
-0.03441798686981201,
0.2839599847793579,
0.20986761152744293,
0.06876040995121002,
0.0729900449514389,
0.5790439248085022,
0.02056499570608139,
0.023782197386026382,
0.1725848913192749,
-0.28694218397140503,
-0.024282261729240417,
0.06636501848697662,
0.12173342704772949,
0.3165377378463745,
-0.049486901611089706,
0.16950386762619019,
-0.0829421654343605,
-0.04725554585456848,
-0.007921306416392326,
0.07152804732322693,
0.14891304075717926,
0.29191774129867554,
0.30426013469696045,
0.1521957963705063,
0.2218572348356247,
-0.28082481026649475,
-0.40084075927734375,
0.11247288435697556,
0.3947431147098541,
-0.14893287420272827,
0.10780683904886246,
-0.20561616122722626,
0.18428626656532288,
0.0008514262735843658,
-0.0724479928612709,
-0.2097753882408142,
-0.4309208393096924,
-0.1663316935300827,
-0.034914154559373856,
0.11299385130405426,
0.40444037318229675,
-0.04738087207078934,
-0.019851908087730408,
0.04594600945711136,
-0.02430524118244648,
-0.2587989568710327,
-0.3624989092350006,
-0.27372363209724426,
-0.09243063628673553,
0.4469130337238312,
-0.22797086834907532,
0.1050746962428093,
0.1772010177373886,
-0.3502885103225708,
0.005301224067807198,
-0.33338233828544617,
0.016149166971445084,
-0.1100565493106842,
0.08062142878770828,
0.213504821062088,
0.3240090608596802,
-0.31440281867980957,
-0.07437354326248169,
0.3777652680873871,
-0.585087239742279,
0.13863810896873474,
-0.07526936382055283,
-0.027970917522907257,
-0.2338244467973709,
0.09334519505500793,
0.07926160842180252,
-0.10011889785528183,
-0.2712867259979248,
0.30113184452056885,
-0.27756431698799133,
-0.03829833120107651,
0.1982726901769638,
0.18525654077529907,
0.1585264652967453,
-0.0019752602092921734,
-0.26871955394744873,
-0.1665271371603012,
-0.12343543022871017,
0.4757367968559265,
-0.0601949505507946,
-0.1448500156402588,
0.014312829822301865,
-0.01952609419822693,
0.07553485035896301,
0.13640210032463074,
-0.40853410959243774,
0.530481219291687,
-0.4104917347431183,
0.10269337892532349,
-0.1123763918876648,
-0.048752084374427795,
0.1959884762763977,
0.03451171889901161,
0.06014566868543625,
0.012541018426418304,
-0.27021968364715576,
-0.07652752846479416,
0.07851029932498932,
0.11127695441246033,
0.09522424638271332,
0.5319133400917053,
0.34704992175102234,
0.6758767366409302,
0.30856263637542725,
-0.17432811856269836,
-0.04560956358909607,
0.04053935781121254,
0.09082081913948059,
-0.17722845077514648,
-0.4386383593082428,
0.09893490374088287,
-0.13840043544769287,
-0.4009321331977844,
0.12489140778779984,
0.013780537992715836,
-0.5286064147949219,
0.07609278708696365,
-0.11014938354492188,
0.20002076029777527,
-0.27077290415763855,
0.21801961958408356,
-0.25362154841423035,
-0.014982752501964569,
0.07771925628185272,
0.19416677951812744,
-0.2611164152622223,
-0.2199794054031372,
0.22246408462524414,
-0.11380340158939362,
0.021373800933361053,
-0.23780640959739685,
-0.6910423636436462,
0.26144930720329285,
-0.4857388734817505,
0.1611011028289795,
-0.05554236099123955,
0.6028923392295837,
-0.06223436817526817,
0.21555674076080322,
0.06972654908895493,
-0.07640993595123291,
0.6276155710220337,
-0.10294530540704727,
-0.010408837348222733,
0.16817516088485718,
0.11913639307022095,
-0.3707961142063141,
-0.07393895834684372,
0.15818846225738525,
0.42494067549705505,
0.5452250242233276,
0.340420126914978,
-0.16227185726165771,
-0.1942983865737915,
0.007955340668559074,
0.1534402072429657,
-0.030734876170754433,
-0.28014183044433594,
-0.06690450012683868,
0.04887621849775314,
-0.10408824682235718,
0.11669266223907471,
0.2118881791830063,
-0.18466034531593323,
0.22955787181854248,
-0.41362351179122925,
-0.12075105309486389,
-0.21193745732307434,
0.14920081198215485,
-0.0041259946301579475,
0.11709436774253845,
-0.022263653576374054,
0.4089313745498657,
0.33450254797935486,
-0.03847454488277435,
0.10271918028593063,
0.13779081404209137,
-0.19223444163799286,
-0.08865034580230713,
0.06169445067644119,
0.04459839686751366,
0.4964437782764435,
0.47207844257354736,
-0.10904025286436081,
0.02327151596546173,
-0.12796451151371002,
0.3310803771018982,
-0.15374384820461273,
0.3151170611381531,
0.38690513372421265,
0.20518836379051208,
-0.7090891599655151,
-0.34192222356796265,
0.1728004813194275,
0.3349727988243103,
-0.20127034187316895,
0.6024563312530518,
-0.4093496799468994,
-0.17112469673156738,
0.7261367440223694,
0.1983218789100647,
1.011897325515747,
-0.35676348209381104,
0.006164476275444031,
-0.2397000789642334,
0.09963463246822357,
0.22148573398590088,
-0.5885787010192871,
0.05508246272802353,
-0.371342271566391,
-0.25439658761024475,
-0.07689375430345535,
-0.1097891628742218,
0.03116520121693611,
0.3034534752368927,
-0.027294743806123734,
0.09747747331857681,
0.07352471351623535,
0.6357160210609436,
0.0759032666683197,
0.09413868188858032,
0.29103097319602966,
-0.21440747380256653,
-0.17621949315071106,
0.08405234664678574,
0.07280350476503372,
-0.0025475285947322845,
0.054867178201675415,
-0.0031507080420851707,
-0.10855364799499512,
0.02181728184223175,
-0.549153208732605,
-0.09394341707229614,
-0.5250600576400757,
0.15044839680194855,
0.10831049084663391,
0.15268574655056,
0.24687498807907104,
0.14852038025856018,
-0.12170855700969696,
0.3399856984615326,
0.02263876236975193,
0.4930282533168793,
0.1332935094833374,
0.028530137613415718,
0.4291352331638336,
-0.35956287384033203,
0.024125054478645325,
0.03081260621547699,
-0.0017049089074134827,
0.1011127457022667,
-0.0777154415845871,
-0.262317955493927,
-0.24043047428131104,
0.1957550048828125,
0.5655145645141602,
-0.20304590463638306,
-0.11627398431301117,
-0.03724893927574158,
0.08666111528873444,
-0.1625717431306839,
0.06626376509666443,
0.23894299566745758,
0.12340912967920303,
0.5680584907531738,
-0.2758549749851227,
-0.1956215649843216,
-0.0762416273355484,
0.37351423501968384,
-0.2206636369228363,
-0.09081961214542389,
0.3017643690109253,
0.1953449696302414,
-0.22415851056575775,
-0.12844941020011902,
0.3618170917034149,
0.1613079160451889,
-0.24622929096221924,
-0.0927114486694336,
-0.5917590856552124,
0.02879287302494049,
0.0831693485379219,
0.14471855759620667,
-0.01586855947971344,
-0.1203993633389473,
-0.050671909004449844,
-0.49359560012817383,
-0.36299630999565125,
-0.18337874114513397,
0.012753887102007866,
0.23004882037639618,
-0.20478802919387817,
-0.11597326397895813,
-0.22365549206733704,
0.2731233835220337,
-0.1812775731086731,
0.17443619668483734,
-0.17888085544109344,
-0.08723407983779907,
-0.2320677638053894,
-0.13923344016075134,
0.2018253654241562,
-0.2908035218715668,
-0.033497489988803864,
0.44495588541030884,
0.13350382447242737,
-0.10712040215730667,
-0.2358281910419464,
0.19587017595767975,
0.18538686633110046,
-0.26078420877456665,
0.1500226855278015,
-0.1276228427886963,
-0.07631620764732361,
-0.37644660472869873,
-0.13922737538814545,
0.18837004899978638,
-0.03498769551515579,
-0.048829395323991776,
0.3005809783935547,
-0.023383766412734985,
-0.12160483747720718,
0.04587507247924805,
0.04727693274617195,
0.21301521360874176,
0.22430051863193512,
0.24290455877780914,
0.1301734745502472,
-0.04280915856361389,
-0.249501034617424,
0.13451752066612244,
0.15282616019248962,
-0.059002265334129333,
0.5459546446800232,
-0.4298722743988037,
-0.05635346472263336,
0.4088274836540222,
0.30079615116119385,
0.6906484365463257,
-0.24459132552146912,
-0.31302058696746826,
0.48831459879875183,
0.10487105697393417,
0.06936494261026382,
-0.13661116361618042,
0.7465851306915283,
0.10752370208501816,
-0.0014983750879764557,
0.09238125383853912,
-0.003743216395378113,
-0.20166702568531036,
-0.23387067019939423,
0.18822872638702393,
0.4785829782485962,
-0.2234927862882614,
0.1489633321762085,
0.05694006010890007,
0.19009552896022797,
0.01073811948299408,
0.1736830621957779,
0.10513357818126678,
0.34472331404685974,
0.3429993987083435,
0.1853894591331482,
0.09947570413351059,
0.30049633979797363,
0.24549555778503418,
0.17811137437820435,
-0.3319312632083893,
-0.058684248477220535,
0.4640538692474365,
-0.2089439332485199,
0.12463056296110153,
0.07369378209114075,
0.2930467426776886,
-0.16128647327423096,
-0.4755869209766388,
-0.004098325967788696,
0.1830998659133911,
-0.21326139569282532,
-0.02983153983950615,
0.1893976330757141,
-0.10953426361083984,
-0.16410696506500244,
0.1720658838748932,
-0.08203333616256714,
0.013543318957090378,
0.3131915330886841,
0.15334759652614594,
0.06285026669502258,
-0.25754398107528687,
-0.24670198559761047,
-0.055988289415836334,
0.4349656403064728,
-0.32887062430381775,
0.045305635780096054,
-0.4192960262298584,
-0.13484930992126465,
-0.4369449019432068,
0.16618214547634125,
0.38070088624954224,
0.32663610577583313,
-0.30245983600616455,
0.18666066229343414,
-0.1429746448993683,
0.025586022064089775,
0.0070845987647771835,
0.5008958578109741,
-0.14154767990112305,
-0.26662489771842957,
0.11745309829711914,
-0.012740110047161579,
-0.17139117419719696,
-0.2179940789937973,
0.03972122445702553,
0.3578575849533081,
0.16057638823986053,
0.01017492264509201,
0.009957881644368172,
-0.21153941750526428,
-0.06735306233167648,
-0.22785735130310059,
0.022529475390911102,
-0.2508455216884613,
0.3639639616012573,
-0.27936190366744995,
0.16239485144615173,
-0.17787028849124908,
0.04546897113323212,
-0.05379977449774742,
0.30464524030685425,
0.49485135078430176,
0.0798158049583435,
-0.4851326644420624,
-0.22053103148937225,
-0.33624210953712463,
0.09518920630216599,
-0.3033529818058014,
0.14870412647724152,
0.04410041868686676,
-0.023393414914608,
-0.0327906608581543,
0.2633819282054901,
-0.011823713779449463,
0.08309101313352585,
-0.06381851434707642,
0.4713069498538971,
-0.17644917964935303,
0.17040355503559113,
-0.21296389400959015,
0.014954181388020515,
0.028573524206876755,
-0.3551250994205475,
0.41507112979888916,
-0.2291986346244812,
-0.029311837628483772,
-0.12805737555027008,
-0.19486913084983826,
0.046388838440179825,
-0.24315723776817322,
0.3588394820690155,
0.18529357016086578,
0.15661443769931793,
0.07628551125526428,
-0.05288190394639969,
-0.20553407073020935,
-0.07107798010110855,
-0.05939030647277832,
0.1468760073184967,
0.048734694719314575,
0.20843084156513214,
-0.2734891176223755,
0.05045006051659584,
-0.2929766774177551,
-0.2197692096233368,
-0.08899448812007904,
-0.19924373924732208,
-0.17948321998119354,
0.13242314755916595,
-0.07648046314716339,
0.3840756416320801,
0.03163241222500801,
0.5407710075378418,
-0.08410502970218658,
0.37055420875549316,
-0.3824482560157776,
-0.10275343805551529,
0.3411791920661926,
-0.7015348076820374,
-0.4551902413368225,
-0.06506001949310303,
-0.04703110456466675,
0.27693167328834534,
0.11780882626771927,
-0.1778116524219513,
-0.3522056043148041,
0.34640440344810486,
-0.0667748749256134,
-0.5600629448890686,
0.01651199720799923,
0.17273861169815063,
0.05830128863453865,
-0.15121041238307953,
0.4786585867404938,
0.02246512845158577,
-0.41087937355041504,
0.35853680968284607,
-0.007581258192658424
] |
https://github.com/huggingface/datasets/issues/6319
|
Datasets.map is severely broken
|
So, using LlamaTokenizerFast was the problem. Changing it to LlamaTokenizer
fixed things,
On Thu, Oct 19, 2023 at 4:04 PM pensive introvert <
***@***.***> wrote:
> I changed the tokenizer to one without "Fast suffix, and something
> changed. The fraction, although still slowed a lot at 80% was able to get
> over the finish line of 100%
>
> I have to do more testng, see if the whole set can be processed
>
>
>
> On Thu, Oct 19, 2023 at 3:03 PM pensive introvert <
> ***@***.***> wrote:
>
>> from functools import partial
>> import transformers
>> from datasets import load_dataset, concatenate_datasets, load_from_disk
>>
>> model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf"
>> output_dir="/opt/data/data/LongLoRA/checkpoints"
>> cache_dir="/opt/data/data/LongLoRA/cache"
>> model_max_length=16384
>>
>> IGNORE_INDEX = -100
>> DEFAULT_PAD_TOKEN = "[PAD]"
>> DEFAULT_EOS_TOKEN = "</s>"
>> DEFAULT_BOS_TOKEN = "<s>"
>> DEFAULT_UNK_TOKEN = "<unk>"
>>
>>
>> tokenizer = transformers.LlamaTokenizerFast.from_pretrained(
>> model_name_or_path,
>> cache_dir=cache_dir,
>> model_max_length=model_max_length,
>> padding_side="right",
>> use_fast=True,
>> #use_fast=False
>> )
>>
>> special_tokens_dict = dict()
>> if tokenizer.pad_token is None:
>> special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN
>> if tokenizer.eos_token is None:
>> special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN
>> if tokenizer.bos_token is None:
>> special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN
>> if tokenizer.unk_token is None:
>> special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN
>>
>> tokenizer.add_special_tokens(special_tokens_dict)
>>
>> def tokenize_fn(tokenizer, example):
>> context_length = tokenizer.model_max_length
>> outputs = tokenizer(
>> tokenizer.eos_token.join(example["text"]),
>> #truncation=False,
>> truncation=True,
>> return_tensors="pt",
>> #return_tensors="np",
>> pad_to_multiple_of=context_length,
>> padding=True,
>> )
>> return {"input_ids": outputs["input_ids"].view(-1, context_length)}
>>
>> for idx in range(100):
>> dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample",
>> cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
>> dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False,
>> num_proc=16, remove_columns=["text", "meta"])
>> dataset.save_to_disk(training_args.cache_dir +
>> f"/training_data_{idx}")
>>
>>
>> On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***>
>> wrote:
>>
>>> Can you please provide a self-contained reproducer?
>>>
>>> —
>>> Reply to this email directly, view it on GitHub
>>> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>,
>>> or unsubscribe
>>> <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE>
>>> .
>>> You are receiving this because you authored the thread.Message ID:
>>> ***@***.***>
>>>
>>
|
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
| 327
|
Datasets.map is severely broken
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
So, using LlamaTokenizerFast was the problem. Changing it to LlamaTokenizer
fixed things,
On Thu, Oct 19, 2023 at 4:04 PM pensive introvert <
***@***.***> wrote:
> I changed the tokenizer to one without "Fast suffix, and something
> changed. The fraction, although still slowed a lot at 80% was able to get
> over the finish line of 100%
>
> I have to do more testng, see if the whole set can be processed
>
>
>
> On Thu, Oct 19, 2023 at 3:03 PM pensive introvert <
> ***@***.***> wrote:
>
>> from functools import partial
>> import transformers
>> from datasets import load_dataset, concatenate_datasets, load_from_disk
>>
>> model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf"
>> output_dir="/opt/data/data/LongLoRA/checkpoints"
>> cache_dir="/opt/data/data/LongLoRA/cache"
>> model_max_length=16384
>>
>> IGNORE_INDEX = -100
>> DEFAULT_PAD_TOKEN = "[PAD]"
>> DEFAULT_EOS_TOKEN = "</s>"
>> DEFAULT_BOS_TOKEN = "<s>"
>> DEFAULT_UNK_TOKEN = "<unk>"
>>
>>
>> tokenizer = transformers.LlamaTokenizerFast.from_pretrained(
>> model_name_or_path,
>> cache_dir=cache_dir,
>> model_max_length=model_max_length,
>> padding_side="right",
>> use_fast=True,
>> #use_fast=False
>> )
>>
>> special_tokens_dict = dict()
>> if tokenizer.pad_token is None:
>> special_tokens_dict["pad_token"] = DEFAULT_PAD_TOKEN
>> if tokenizer.eos_token is None:
>> special_tokens_dict["eos_token"] = DEFAULT_EOS_TOKEN
>> if tokenizer.bos_token is None:
>> special_tokens_dict["bos_token"] = DEFAULT_BOS_TOKEN
>> if tokenizer.unk_token is None:
>> special_tokens_dict["unk_token"] = DEFAULT_UNK_TOKEN
>>
>> tokenizer.add_special_tokens(special_tokens_dict)
>>
>> def tokenize_fn(tokenizer, example):
>> context_length = tokenizer.model_max_length
>> outputs = tokenizer(
>> tokenizer.eos_token.join(example["text"]),
>> #truncation=False,
>> truncation=True,
>> return_tensors="pt",
>> #return_tensors="np",
>> pad_to_multiple_of=context_length,
>> padding=True,
>> )
>> return {"input_ids": outputs["input_ids"].view(-1, context_length)}
>>
>> for idx in range(100):
>> dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample",
>> cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
>> dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False,
>> num_proc=16, remove_columns=["text", "meta"])
>> dataset.save_to_disk(training_args.cache_dir +
>> f"/training_data_{idx}")
>>
>>
>> On Thu, Oct 19, 2023 at 2:30 PM Mario Šaško ***@***.***>
>> wrote:
>>
>>> Can you please provide a self-contained reproducer?
>>>
>>> —
>>> Reply to this email directly, view it on GitHub
>>> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1771509229>,
>>> or unsubscribe
>>> <https://github.com/notifications/unsubscribe-auth/ABDD3ZNBZ3BE7Q4EQZZK6MLYAFWURAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGUYDSMRSHE>
>>> .
>>> You are receiving this because you authored the thread.Message ID:
>>> ***@***.***>
>>>
>>
|
[
-0.5650827884674072,
0.09585903584957123,
0.027538016438484192,
0.1539459228515625,
0.2159012407064438,
0.12963399291038513,
0.1675928235054016,
0.3100391626358032,
-0.058931659907102585,
-0.16628910601139069,
-0.0986693724989891,
0.6297377943992615,
-0.07801163196563721,
-0.3661547601222992,
-0.3116917908191681,
0.2085285782814026,
0.18836136162281036,
0.18826892971992493,
0.32481977343559265,
-0.05372411012649536,
-0.06065590679645538,
0.048298224806785583,
-0.29673027992248535,
0.05245945602655411,
-0.5544130206108093,
-0.17729498445987701,
-0.0059947967529296875,
-0.23379939794540405,
-0.2552952766418457,
-0.5086045861244202,
0.06909111887216568,
0.10712608695030212,
-0.18442465364933014,
0.7518384456634521,
-0.00012007215264020488,
-0.10215771943330765,
0.02045290172100067,
0.27146556973457336,
0.10046941041946411,
0.03657049685716629,
-0.21655219793319702,
-0.06678692251443863,
-0.08654477447271347,
-0.025764100253582,
0.2364538013935089,
0.0265534408390522,
0.07370355725288391,
-0.303891122341156,
0.370139479637146,
0.16343280673027039,
0.09973043203353882,
0.19272200763225555,
-0.09605514258146286,
0.010588944889605045,
0.1818334311246872,
-0.10538516938686371,
-0.13448785245418549,
0.16018947958946228,
0.3475094139575958,
-0.4086189866065979,
-0.2562447190284729,
-0.07419785857200623,
-0.3486821949481964,
-0.11887161433696747,
-0.100178562104702,
-0.2455446571111679,
0.05278249830007553,
-0.5286213159561157,
0.42310982942581177,
0.30591881275177,
0.13512015342712402,
-0.020884111523628235,
-0.010880514048039913,
-0.20301491022109985,
-0.25329291820526123,
-0.13895560801029205,
0.24856922030448914,
0.0071937814354896545,
-0.09316498041152954,
0.19276052713394165,
-0.3754065930843353,
0.15232151746749878,
0.14236003160476685,
0.22107620537281036,
-0.1279793679714203,
0.45660603046417236,
0.0877719596028328,
0.2469947636127472,
0.08927075564861298,
-0.04385156184434891,
-0.09906954318284988,
-0.03085312619805336,
0.023668929934501648,
0.27921628952026367,
-0.40835922956466675,
-0.049328479915857315,
0.14400193095207214,
-0.27067941427230835,
0.32063865661621094,
-0.19679759442806244,
-0.2866923213005066,
0.2858966588973999,
-0.16902142763137817,
0.23899826407432556,
0.31890740990638733,
0.03754662722349167,
-0.024951159954071045,
0.2826140820980072,
0.39744120836257935,
-0.3151450455188751,
-0.3407335579395294,
0.22731801867485046,
-0.1171284168958664,
-0.2010837197303772,
0.03967485949397087,
-0.022059954702854156,
-0.15467774868011475,
-0.12229414284229279,
-0.17784367501735687,
0.26647889614105225,
-0.4902898669242859,
0.15448525547981262,
0.0980430468916893,
0.26328420639038086,
-0.22859014570713043,
0.1354704052209854,
-0.19731982052326202,
-0.22449259459972382,
-0.16645723581314087,
-0.13850127160549164,
-0.005144327413290739,
-0.3349411189556122,
-0.3106228709220886,
0.06682387739419937,
-0.026915352791547775,
-0.0010066553950309753,
0.16924448311328888,
0.12978015840053558,
-0.12077796459197998,
-0.08787381649017334,
0.17508745193481445,
-0.39563998579978943,
0.22520267963409424,
0.07617545872926712,
-0.2212909609079361,
0.5536158084869385,
0.021606292575597763,
-0.14986151456832886,
-0.14449314773082733,
0.08143562078475952,
-0.2555547058582306,
-0.02597964182496071,
0.05546635389328003,
0.06600487232208252,
-0.17003591358661652,
0.0354190468788147,
-0.24131610989570618,
0.1887797862291336,
0.29179897904396057,
0.044303011149168015,
0.07193366438150406,
-0.13109438121318817,
-0.25325632095336914,
-0.21444585919380188,
0.09228896349668503,
0.1671205461025238,
-0.2073090523481369,
-0.0294424369931221,
0.11440355330705643,
0.23781967163085938,
0.20982658863067627,
0.4211309552192688,
0.00976202916353941,
0.33917948603630066,
-0.37291383743286133,
0.3118547797203064,
0.18220894038677216,
0.2639283537864685,
-0.4749678075313568,
0.2564152777194977,
-0.0347667932510376,
-0.03409774601459503,
-0.48534852266311646,
-0.12366924434900284,
0.6645863056182861,
-0.09075845032930374,
0.4891786277294159,
0.2502647340297699,
-0.06349453330039978,
0.023358048871159554,
-0.3283037841320038,
-0.266339510679245,
0.09982360899448395,
0.08915625512599945,
0.15872415900230408,
-0.16744115948677063,
-0.1549530029296875,
-0.2306276112794876,
0.2653229832649231,
0.19719359278678894,
0.026447227224707603,
0.2456437200307846,
0.31180229783058167,
-0.04250646382570267,
0.10766850411891937,
-0.39257803559303284,
0.00021355599164962769,
0.3280920386314392,
0.24933499097824097,
-0.14033396542072296,
0.02390691637992859,
0.032177895307540894,
-0.04131738841533661,
0.17890731990337372,
-0.14812308549880981,
0.12219502031803131,
0.004752293229103088,
-0.1387670934200287,
-0.16412080824375153,
0.23376311361789703,
-0.19068604707717896,
-0.1091802716255188,
0.08914723247289658,
0.12043184041976929,
0.17597100138664246,
0.14981235563755035,
0.001216227188706398,
-0.20116060972213745,
-0.08460870385169983,
0.08362769335508347,
0.2852363586425781,
-0.12614595890045166,
-0.24213850498199463,
0.23653644323349,
0.19767865538597107,
0.051248401403427124,
-0.16781297326087952,
0.23555390536785126,
0.10944507271051407,
-0.04871289059519768,
-0.14840029180049896,
0.15821416676044464,
-0.08204182237386703,
-0.28289613127708435,
0.1246577650308609,
0.1587143838405609,
0.04950566962361336,
0.3433006703853607,
-0.22167402505874634,
0.25189128518104553,
0.11992742121219635,
-0.07023678719997406,
-0.060529209673404694,
0.20774909853935242,
0.4560092091560364,
-0.015667624771595,
0.2450927048921585,
0.16610854864120483,
0.07912276685237885,
0.08623810112476349,
0.5798001885414124,
0.03473963961005211,
0.032706622034311295,
0.16880986094474792,
-0.30805227160453796,
0.006018832325935364,
0.0673186182975769,
0.12129981815814972,
0.3235326409339905,
-0.0522456020116806,
0.14417290687561035,
-0.0715128481388092,
-0.08688707649707794,
-0.04042265564203262,
0.05441274866461754,
0.15167948603630066,
0.3059619665145874,
0.31850120425224304,
0.1221817284822464,
0.18445803225040436,
-0.30364805459976196,
-0.367266446352005,
0.11213456839323044,
0.4000599980354309,
-0.09794992208480835,
0.05025598406791687,
-0.2259196639060974,
0.15299510955810547,
0.04924147203564644,
-0.03501942381262779,
-0.2304251790046692,
-0.4509052336215973,
-0.1361575722694397,
-0.03270195797085762,
0.10690785944461823,
0.3910405933856964,
-0.055664315819740295,
0.004965290427207947,
0.007010156288743019,
-0.02306821383535862,
-0.24884068965911865,
-0.43016451597213745,
-0.2712497115135193,
-0.09018198400735855,
0.4938814640045166,
-0.19508805871009827,
0.14345642924308777,
0.1682686060667038,
-0.35956770181655884,
0.029837142676115036,
-0.34284260869026184,
-0.013193182647228241,
-0.1101851761341095,
0.04480589181184769,
0.20444150269031525,
0.3308466672897339,
-0.33993834257125854,
-0.041578296571969986,
0.35889068245887756,
-0.5934413075447083,
0.10537365078926086,
-0.11479398608207703,
-0.018876446411013603,
-0.22702595591545105,
0.07958376407623291,
0.060885339975357056,
-0.08190244436264038,
-0.26894667744636536,
0.34992045164108276,
-0.2428760975599289,
-0.050372570753097534,
0.1272629052400589,
0.2064928412437439,
0.1797420084476471,
-0.004467289429157972,
-0.2995072901248932,
-0.19021472334861755,
-0.035111285746097565,
0.46591898798942566,
-0.06678754836320877,
-0.156626895070076,
0.042407017201185226,
-0.000783948227763176,
0.11724622547626495,
0.1357906460762024,
-0.44283604621887207,
0.5364555716514587,
-0.3940202593803406,
0.11913037300109863,
-0.10393774509429932,
-0.05272733420133591,
0.16654092073440552,
0.07430092245340347,
0.04897148907184601,
0.024064406752586365,
-0.2905569076538086,
-0.06954406946897507,
0.059740133583545685,
0.145201176404953,
0.11797556281089783,
0.5271639823913574,
0.3202987015247345,
0.6126996278762817,
0.2942853569984436,
-0.09641951322555542,
-0.039596036076545715,
0.039658188819885254,
0.04736700281500816,
-0.15215209126472473,
-0.4220879375934601,
0.17227715253829956,
-0.17235147953033447,
-0.3611794114112854,
0.14191828668117523,
0.039842136204242706,
-0.5176067352294922,
0.07271383702754974,
-0.1012832373380661,
0.18466222286224365,
-0.24324509501457214,
0.2557867169380188,
-0.2197730839252472,
-0.023000754415988922,
0.06945045292377472,
0.1662725806236267,
-0.2526071071624756,
-0.24817708134651184,
0.21650025248527527,
-0.1115027517080307,
0.016444645822048187,
-0.2528499960899353,
-0.7145125269889832,
0.3346411883831024,
-0.48640966415405273,
0.19195911288261414,
-0.058802660554647446,
0.5936537981033325,
-0.07523279637098312,
0.2312527894973755,
0.08815871924161911,
-0.0948389396071434,
0.5696457624435425,
-0.0880965143442154,
-0.04104902595281601,
0.1826494187116623,
0.08447027206420898,
-0.3680391311645508,
-0.06656574457883835,
0.14694884419441223,
0.43775779008865356,
0.5494771003723145,
0.31101667881011963,
-0.17718559503555298,
-0.19747141003608704,
-0.06278464198112488,
0.15267571806907654,
-0.034579530358314514,
-0.22674602270126343,
-0.06875608116388321,
-0.012836471199989319,
-0.11762602627277374,
0.18557116389274597,
0.2000487595796585,
-0.1867765486240387,
0.20397920906543732,
-0.39485523104667664,
-0.13796254992485046,
-0.28718310594558716,
0.13588397204875946,
0.0002087131142616272,
0.15052536129951477,
-0.06637361645698547,
0.40460625290870667,
0.34658941626548767,
-0.026391103863716125,
0.11036516726016998,
0.11752165853977203,
-0.22034665942192078,
-0.05470883846282959,
0.05308223515748978,
-0.00566356536000967,
0.5395796895027161,
0.5011261701583862,
-0.11381597816944122,
0.09764333069324493,
-0.20839056372642517,
0.2980881929397583,
-0.12479383498430252,
0.29338765144348145,
0.35701003670692444,
0.2512614130973816,
-0.6714469790458679,
-0.3012838363647461,
0.1568973958492279,
0.3504321873188019,
-0.22154898941516876,
0.6025170683860779,
-0.42649102210998535,
-0.19503775238990784,
0.7009867429733276,
0.2328786551952362,
1.0583291053771973,
-0.35339975357055664,
0.023402880877256393,
-0.21295353770256042,
0.07732677459716797,
0.1896468997001648,
-0.5906334519386292,
0.06822127848863602,
-0.3836618661880493,
-0.23842938244342804,
-0.07687824964523315,
-0.10935082286596298,
0.06868579238653183,
0.2852121591567993,
-0.03487328439950943,
0.09076987951993942,
0.07229985296726227,
0.628403902053833,
0.10780131816864014,
0.05799759179353714,
0.2855464220046997,
-0.19363948702812195,
-0.14696311950683594,
0.06987366825342178,
0.036220110952854156,
0.026567190885543823,
0.06969025731086731,
-0.029459014534950256,
-0.11333777755498886,
0.03290337324142456,
-0.5189846754074097,
-0.08852353692054749,
-0.5582777261734009,
0.12624871730804443,
0.09320496767759323,
0.18980614840984344,
0.24619072675704956,
0.12140817940235138,
-0.07690265774726868,
0.34037265181541443,
0.018194545060396194,
0.5083090662956238,
0.18078723549842834,
-0.0017391219735145569,
0.4315461814403534,
-0.338284969329834,
0.007870106026530266,
-0.00817500427365303,
0.006588511168956757,
0.1304822862148285,
-0.05123721808195114,
-0.30606746673583984,
-0.24391628801822662,
0.22063161432743073,
0.5698962807655334,
-0.17256006598472595,
-0.14239366352558136,
-0.0422745943069458,
0.05070165917277336,
-0.20000450313091278,
0.05476568266749382,
0.2907058596611023,
0.1155293881893158,
0.590900182723999,
-0.2007959485054016,
-0.1902984231710434,
-0.06828536093235016,
0.36139115691185,
-0.188960999250412,
-0.1297064572572708,
0.31593021750450134,
0.17894253134727478,
-0.23180769383907318,
-0.12290608882904053,
0.33648431301116943,
0.19224409759044647,
-0.2423247992992401,
-0.0858529657125473,
-0.611691951751709,
0.008302465081214905,
0.11691679805517197,
0.13737407326698303,
-0.025485418736934662,
-0.09084508568048477,
-0.0636039674282074,
-0.5170304775238037,
-0.3648490905761719,
-0.14285042881965637,
0.02202303148806095,
0.22488808631896973,
-0.219564288854599,
-0.11150473356246948,
-0.20482002198696136,
0.3279743790626526,
-0.16312673687934875,
0.17604446411132812,
-0.1914474070072174,
-0.07094706594944,
-0.19774702191352844,
-0.15942147374153137,
0.21300259232521057,
-0.2501277029514313,
-0.049923986196517944,
0.5053452253341675,
0.11379211395978928,
-0.08602456748485565,
-0.23663784563541412,
0.20073580741882324,
0.194814532995224,
-0.2653792202472687,
0.1655092090368271,
-0.16156622767448425,
-0.023483306169509888,
-0.3526916205883026,
-0.2053539752960205,
0.11366700381040573,
-0.07331468164920807,
-0.09159407764673233,
0.3159414827823639,
-0.034032389521598816,
-0.09888169914484024,
0.05763813108205795,
0.02531137317419052,
0.1751246303319931,
0.21864630281925201,
0.25049546360969543,
0.0986882820725441,
-0.03572018817067146,
-0.20941627025604248,
0.11928205192089081,
0.1483035683631897,
-0.07976436614990234,
0.516488254070282,
-0.4237014651298523,
-0.06758899241685867,
0.3636830449104309,
0.2820297181606293,
0.6675161123275757,
-0.22841766476631165,
-0.34512919187545776,
0.5271521210670471,
0.08489232510328293,
0.021914232522249222,
-0.12041985243558884,
0.7508559226989746,
0.11627641320228577,
-0.004362970590591431,
0.06527534127235413,
0.02265552058815956,
-0.22904451191425323,
-0.2828674912452698,
0.195368230342865,
0.3934154808521271,
-0.25215524435043335,
0.09754803776741028,
0.06102805957198143,
0.17301031947135925,
0.0010003633797168732,
0.16837875545024872,
0.08226904273033142,
0.30015671253204346,
0.3591655492782593,
0.15927711129188538,
0.0946621373295784,
0.31351321935653687,
0.24401195347309113,
0.1795213222503662,
-0.31425750255584717,
-0.0510253868997097,
0.5352990627288818,
-0.1840517818927765,
0.1391066610813141,
0.08449727296829224,
0.34585025906562805,
-0.14515671133995056,
-0.5301117300987244,
0.009759193286299706,
0.21817436814308167,
-0.22917354106903076,
-0.015061892569065094,
0.18678058683872223,
-0.11058001220226288,
-0.19236616790294647,
0.20907290279865265,
-0.0915699452161789,
0.039811041206121445,
0.3304295241832733,
0.13234469294548035,
0.03848141431808472,
-0.28041982650756836,
-0.291067510843277,
-0.08195661008358002,
0.4594160318374634,
-0.33553749322891235,
0.013340575620532036,
-0.4478271007537842,
-0.1278132200241089,
-0.47361305356025696,
0.16653400659561157,
0.34634456038475037,
0.3175024092197418,
-0.33158570528030396,
0.17683880031108856,
-0.16402660310268402,
0.0496111735701561,
-0.0014416240155696869,
0.5051851272583008,
-0.07173243165016174,
-0.28797537088394165,
0.12904256582260132,
-0.028540119528770447,
-0.16754616796970367,
-0.20565800368785858,
0.060984376817941666,
0.35801419615745544,
0.1938609927892685,
-0.045535437762737274,
0.06631004810333252,
-0.2225017249584198,
-0.07123862206935883,
-0.22160720825195312,
0.044299669563770294,
-0.27344924211502075,
0.35495248436927795,
-0.2974787652492523,
0.13588693737983704,
-0.2139262557029724,
0.03843841329216957,
-0.09445618093013763,
0.29556941986083984,
0.5162907838821411,
0.04090949892997742,
-0.5048336982727051,
-0.2696894109249115,
-0.3525954782962799,
0.10556180775165558,
-0.33214664459228516,
0.1073480099439621,
0.05951924994587898,
-0.053041331470012665,
-0.03141837567090988,
0.26050710678100586,
-0.0349888950586319,
0.14318636059761047,
-0.016218489035964012,
0.44934093952178955,
-0.21560408174991608,
0.2106708586215973,
-0.17273740470409393,
0.03321051597595215,
0.04345469921827316,
-0.3634542226791382,
0.4173729419708252,
-0.2258014976978302,
-0.014913808554410934,
-0.10834610462188721,
-0.18780159950256348,
0.030481435358524323,
-0.22004234790802002,
0.34816688299179077,
0.17324666678905487,
0.14838187396526337,
0.07526636123657227,
-0.07338690012693405,
-0.20027759671211243,
-0.08072511851787567,
-0.041191644966602325,
0.18922486901283264,
0.1066688597202301,
0.2211206555366516,
-0.2682857811450958,
0.07670183479785919,
-0.27106353640556335,
-0.17101970314979553,
-0.11153297871351242,
-0.19527557492256165,
-0.12680412828922272,
0.12641248106956482,
-0.046019330620765686,
0.3776959478855133,
0.012879692949354649,
0.5794788002967834,
-0.09122377634048462,
0.3272220492362976,
-0.4109763503074646,
-0.08952276408672333,
0.31781765818595886,
-0.7012709975242615,
-0.44835227727890015,
-0.03529740497469902,
-0.04857082664966583,
0.32904037833213806,
0.10315059870481491,
-0.1658143550157547,
-0.3645923137664795,
0.29491758346557617,
-0.04908447712659836,
-0.5789856314659119,
-0.006864085793495178,
0.17556846141815186,
0.048277344554662704,
-0.16143809258937836,
0.44263383746147156,
0.06326699256896973,
-0.42165282368659973,
0.37062081694602966,
-0.017922088503837585
] |
https://github.com/huggingface/datasets/issues/6319
|
Datasets.map is severely broken
|
Indeed, the tokenizer is super slow. Perhaps @ArthurZucker knows the reason why.
([This](https://colab.research.google.com/drive/1VgeurX-4Fl2X6aBQTwh_X4kuQKZ6K9L1?usp=sharing) simplified Colab can be used to reproduce the behavior)
|
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
| 22
|
Datasets.map is severely broken
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
Indeed, the tokenizer is super slow. Perhaps @ArthurZucker knows the reason why.
([This](https://colab.research.google.com/drive/1VgeurX-4Fl2X6aBQTwh_X4kuQKZ6K9L1?usp=sharing) simplified Colab can be used to reproduce the behavior)
|
[
-0.5410917401313782,
0.13085025548934937,
0.02908456325531006,
0.10091862082481384,
0.17967469990253448,
0.05452760308980942,
0.20677468180656433,
0.29399803280830383,
-0.11034286022186279,
-0.12849880754947662,
-0.007839667610824108,
0.5993678569793701,
-0.07884654402732849,
-0.3236668109893799,
-0.31910279393196106,
0.15609851479530334,
0.2511376738548279,
0.20983806252479553,
0.407157838344574,
-0.01906057819724083,
-0.0028221383690834045,
0.08169975131750107,
-0.32195448875427246,
0.10455793887376785,
-0.5848073363304138,
-0.19118985533714294,
-0.057251185178756714,
-0.2059941589832306,
-0.2712860703468323,
-0.4881424605846405,
-0.020141571760177612,
0.2398989498615265,
-0.24166379868984222,
0.7306163311004639,
-0.00012098339357180521,
-0.0608510822057724,
-0.06618355214595795,
0.29534536600112915,
0.15960827469825745,
-0.03746651113033295,
-0.10777660459280014,
-0.1464885175228119,
-0.08471237123012543,
0.011538513004779816,
0.2210223376750946,
-0.130181223154068,
0.02668818272650242,
-0.18332426249980927,
0.3862849473953247,
0.13964001834392548,
0.0914703905582428,
0.24593034386634827,
-0.11612018942832947,
-0.0017449833685532212,
0.13958802819252014,
-0.06387525796890259,
-0.13203032314777374,
0.13763390481472015,
0.2714753746986389,
-0.3287237882614136,
-0.2295932173728943,
-0.10095417499542236,
-0.3573000133037567,
-0.1442803591489792,
-0.11277545243501663,
-0.2479175180196762,
-0.0018027275800704956,
-0.4933708608150482,
0.39275673031806946,
0.2590658664703369,
0.160467267036438,
-0.01820503920316696,
0.017286038026213646,
-0.18113797903060913,
-0.2839154899120331,
-0.1488817185163498,
0.2680305540561676,
-0.05534985661506653,
-0.12378731369972229,
0.20549346506595612,
-0.352882444858551,
0.16024455428123474,
0.17867113649845123,
0.17208214104175568,
-0.14197681844234467,
0.4280363619327545,
0.11274737119674683,
0.26342305541038513,
0.10123428702354431,
-0.08854973316192627,
-0.1488124430179596,
0.03520064428448677,
0.015480177477002144,
0.2404351532459259,
-0.45862942934036255,
-0.10569919645786285,
0.15970194339752197,
-0.3757314383983612,
0.22117754817008972,
-0.020692065358161926,
-0.310268759727478,
0.34544432163238525,
-0.07736513018608093,
0.2502947449684143,
0.28967562317848206,
0.08951939642429352,
-0.04019693285226822,
0.2884218394756317,
0.3554529547691345,
-0.3937225937843323,
-0.429792582988739,
0.18855568766593933,
-0.15143133699893951,
-0.2086842656135559,
0.09524424374103546,
-0.024797238409519196,
-0.1682128757238388,
-0.07241733372211456,
-0.19032829999923706,
0.28258681297302246,
-0.5319061875343323,
0.16048701107501984,
0.1347811073064804,
0.3154843747615814,
-0.1820095181465149,
0.14622566103935242,
-0.23766912519931793,
-0.2681143879890442,
-0.14848197996616364,
-0.14409932494163513,
-0.022074442356824875,
-0.3172799050807953,
-0.23895850777626038,
0.03883672505617142,
-0.0841478705406189,
0.05167722702026367,
0.16337840259075165,
0.13945932686328888,
-0.10034328699111938,
-0.06527446955442429,
0.24986350536346436,
-0.3523651957511902,
0.24355703592300415,
0.05527152121067047,
-0.21467341482639313,
0.5078145861625671,
0.024679915979504585,
-0.15960320830345154,
-0.14635688066482544,
0.01972874253988266,
-0.30329349637031555,
-0.0721844732761383,
0.009294616058468819,
0.05703406408429146,
-0.08427497744560242,
0.03639426454901695,
-0.20107412338256836,
0.22977203130722046,
0.1417292058467865,
0.010716784745454788,
-0.013315960764884949,
-0.10691742599010468,
-0.21324756741523743,
-0.1935473084449768,
0.1007997915148735,
0.1477016657590866,
-0.21145448088645935,
-0.05313138663768768,
0.27618661522865295,
0.22296233475208282,
0.29987210035324097,
0.42199721932411194,
0.028146514669060707,
0.4033743441104889,
-0.34820684790611267,
0.27415645122528076,
0.3037737011909485,
0.2538105249404907,
-0.49398908019065857,
0.25260400772094727,
-0.14251291751861572,
-0.04313352704048157,
-0.4032938480377197,
-0.17389015853405,
0.7243168354034424,
-0.07474825531244278,
0.5371662974357605,
0.20653289556503296,
-0.025321057066321373,
0.087631955742836,
-0.28065162897109985,
-0.16784192621707916,
0.14167891442775726,
0.028360873460769653,
0.07428444921970367,
-0.15143203735351562,
-0.20128783583641052,
-0.19515375792980194,
0.18756017088890076,
0.15980558097362518,
-0.03504600375890732,
0.22719423472881317,
0.2459237277507782,
-0.04164642095565796,
0.15318013727664948,
-0.28295138478279114,
0.12127283215522766,
0.2983926832675934,
0.22607293725013733,
-0.10802997648715973,
0.06554863601922989,
-0.0029459670186042786,
-0.02181939221918583,
0.19868506491184235,
-0.14365153014659882,
0.13450880348682404,
0.0028233788907527924,
-0.12207350134849548,
-0.13678693771362305,
0.23543758690357208,
-0.2031961977481842,
-0.152739480137825,
0.039704494178295135,
0.19677910208702087,
0.36976829171180725,
0.029411299154162407,
-0.03785417228937149,
-0.18290069699287415,
-0.11379792541265488,
0.08577150106430054,
0.276406466960907,
-0.20906835794448853,
-0.24687185883522034,
0.27113890647888184,
0.20369142293930054,
0.008036412298679352,
-0.1824093759059906,
0.20697903633117676,
0.12236013263463974,
0.05515243485569954,
-0.14445054531097412,
0.20594149827957153,
-0.1504625529050827,
-0.2533135712146759,
0.17589688301086426,
0.23222438991069794,
0.13031911849975586,
0.3443230390548706,
-0.22543847560882568,
0.3050817549228668,
0.20485082268714905,
0.040784914046525955,
-0.04604046791791916,
0.20224353671073914,
0.4357697665691376,
-0.04950178787112236,
0.1992490589618683,
0.19158053398132324,
0.05666618049144745,
0.10893385112285614,
0.557732105255127,
0.05217025801539421,
0.005059763789176941,
0.1667875200510025,
-0.2720990777015686,
-0.019392019137740135,
0.08621706813573837,
0.01465504989027977,
0.28511056303977966,
-0.06384754925966263,
0.11749203503131866,
-0.05038788169622421,
-0.10265643894672394,
0.02145984396338463,
0.057636961340904236,
0.14172780513763428,
0.1856050193309784,
0.2734929621219635,
0.11507661640644073,
0.1821746528148651,
-0.36098501086235046,
-0.4220527112483978,
0.10877639800310135,
0.424194872379303,
-0.05960332229733467,
0.11148004978895187,
-0.260152667760849,
0.10597757250070572,
0.08454012870788574,
0.000951012596487999,
-0.19469641149044037,
-0.40858620405197144,
-0.09060808271169662,
-0.0010592639446258545,
0.09274087846279144,
0.4194301664829254,
-0.019983753561973572,
0.07110637426376343,
0.08242630213499069,
0.009440526366233826,
-0.16513970494270325,
-0.2873149812221527,
-0.28675127029418945,
-0.09011045098304749,
0.4607962667942047,
-0.23580580949783325,
0.1809179186820984,
0.18689949810504913,
-0.2852296829223633,
-0.02575552649796009,
-0.4131939113140106,
0.05253521725535393,
-0.11154845356941223,
-0.010862287133932114,
0.1763768494129181,
0.23695077002048492,
-0.4032753109931946,
-0.04316280409693718,
0.32824617624282837,
-0.6075961589813232,
0.028887135908007622,
-0.06603273749351501,
-0.05775723606348038,
-0.288128137588501,
0.10126693546772003,
0.07526636868715286,
-0.05651368200778961,
-0.22258080542087555,
0.41642022132873535,
-0.15498436987400055,
-0.012625157833099365,
0.04813576117157936,
0.18246161937713623,
0.12797756493091583,
-0.01652691140770912,
-0.17764246463775635,
-0.20158421993255615,
-0.1914118230342865,
0.389360249042511,
-0.024510614573955536,
-0.16943217813968658,
0.0647701621055603,
0.00921662151813507,
0.12980766594409943,
0.15251275897026062,
-0.31696730852127075,
0.4677788317203522,
-0.31563448905944824,
0.11133617162704468,
-0.050312332808971405,
-0.1093057245016098,
0.25027602910995483,
0.08863390982151031,
0.017854096367955208,
0.09861462563276291,
-0.29607924818992615,
0.010363608598709106,
0.05408376082777977,
0.07295264303684235,
0.14128810167312622,
0.545547604560852,
0.33382344245910645,
0.6369093060493469,
0.24822703003883362,
-0.09563557803630829,
-0.009286783635616302,
0.0021612513810396194,
0.0625166967511177,
-0.1770939826965332,
-0.46768954396247864,
0.12997421622276306,
-0.12805277109146118,
-0.2977856993675232,
0.17817354202270508,
0.030456088483333588,
-0.5236749053001404,
0.04834596812725067,
-0.12684489786624908,
0.22487106919288635,
-0.268158495426178,
0.24493183195590973,
-0.3420667052268982,
-0.03983756899833679,
0.054459232836961746,
0.1706227958202362,
-0.33360686898231506,
-0.1999092400074005,
0.19159382581710815,
-0.16957108676433563,
0.02619171142578125,
-0.251591295003891,
-0.80534428358078,
0.30294281244277954,
-0.5477199554443359,
0.16119086742401123,
-0.08217150717973709,
0.5743150115013123,
-0.03579842671751976,
0.1938081681728363,
0.12454478442668915,
-0.12982675433158875,
0.5906928777694702,
-0.04475328326225281,
-0.1329382210969925,
0.18207572400569916,
0.045397303998470306,
-0.33951568603515625,
-0.12853726744651794,
0.15689651668071747,
0.5579169392585754,
0.5481714606285095,
0.33377665281295776,
-0.14859004318714142,
-0.28421056270599365,
-0.014915183186531067,
0.11354216188192368,
-0.044260140508413315,
-0.19548827409744263,
-0.08911257982254028,
0.036949172616004944,
-0.2098717987537384,
0.2416306734085083,
0.17503102123737335,
-0.13154153525829315,
0.21240882575511932,
-0.4098643958568573,
-0.130876362323761,
-0.25726136565208435,
0.1568554788827896,
0.006839927285909653,
0.16251686215400696,
-0.15481944382190704,
0.37576529383659363,
0.4147236943244934,
0.07461559772491455,
0.020888086408376694,
0.061530303210020065,
-0.005837500095367432,
-0.1761343777179718,
0.05745701491832733,
0.034742292016744614,
0.579921543598175,
0.49091169238090515,
-0.12133530527353287,
0.16087475419044495,
-0.39076539874076843,
0.3629903793334961,
-0.10329072922468185,
0.37823542952537537,
0.45475849509239197,
0.19038476049900055,
-0.6624376773834229,
-0.24408964812755585,
0.011569954454898834,
0.3823932409286499,
-0.24456728994846344,
0.6024035215377808,
-0.36633580923080444,
-0.1279572695493698,
0.776211142539978,
0.17750684916973114,
1.085429072380066,
-0.3092162609100342,
0.058529291301965714,
-0.23538854718208313,
0.17100191116333008,
0.16797052323818207,
-0.7376625537872314,
0.07258482277393341,
-0.38480767607688904,
-0.20658442378044128,
-0.09966494888067245,
-0.11097380518913269,
0.04282622039318085,
0.2550097107887268,
-0.042291149497032166,
0.07419745624065399,
0.12382698059082031,
0.7099236845970154,
0.08187085390090942,
0.03045329451560974,
0.3054024279117584,
-0.22040916979312897,
0.016634467989206314,
0.05609218776226044,
0.12913775444030762,
-0.00997374951839447,
0.03596380352973938,
0.01840120553970337,
-0.058585867285728455,
-0.0499984435737133,
-0.48852455615997314,
-0.18062403798103333,
-0.46352919936180115,
0.18056070804595947,
0.13196174800395966,
0.26721733808517456,
0.1184864491224289,
0.0678076222538948,
-0.0745459794998169,
0.39136803150177,
0.07606169581413269,
0.45310646295547485,
0.2045990526676178,
-0.03275978937745094,
0.3878290355205536,
-0.3912639319896698,
0.048186033964157104,
-0.022150838747620583,
-0.01295556128025055,
0.1652030348777771,
-0.024005241692066193,
-0.4111174941062927,
-0.35186129808425903,
0.20758982002735138,
0.6740373969078064,
-0.13261377811431885,
-0.06130900979042053,
-0.050654858350753784,
-0.0005666464567184448,
-0.224373921751976,
0.051264744251966476,
0.24950191378593445,
0.07493952661752701,
0.574330747127533,
-0.20799143612384796,
-0.1817958652973175,
-0.0718914270401001,
0.3452078402042389,
-0.1920889914035797,
-0.18383508920669556,
0.347031831741333,
0.03755952790379524,
-0.22264982759952545,
-0.12327294796705246,
0.3802719712257385,
0.09968037903308868,
-0.19264569878578186,
-0.03603723645210266,
-0.5757480263710022,
-0.04450918734073639,
0.1284124255180359,
0.1656712293624878,
-0.04245472699403763,
-0.06223426014184952,
-0.07410264760255814,
-0.4555189609527588,
-0.38218966126441956,
-0.20688863098621368,
-0.029413100332021713,
0.18917477130889893,
-0.17630234360694885,
-0.10025204718112946,
-0.2756827473640442,
0.24586328864097595,
-0.15679362416267395,
0.13689911365509033,
-0.15237294137477875,
-0.10157208144664764,
-0.23533880710601807,
-0.15781384706497192,
0.0970393717288971,
-0.212144136428833,
-0.04626857861876488,
0.47169286012649536,
0.1523503214120865,
-0.09045378863811493,
-0.211842343211174,
0.20306067168712616,
0.21695643663406372,
-0.2590683698654175,
0.16741228103637695,
-0.02650778368115425,
-0.07278084754943848,
-0.3872199058532715,
-0.17300477623939514,
0.09442097693681717,
-0.054533302783966064,
-0.20367950201034546,
0.36261501908302307,
-0.05055824667215347,
-0.09437170624732971,
0.009904272854328156,
0.14660924673080444,
0.1637251377105713,
0.18926122784614563,
0.21170644462108612,
0.033492423593997955,
-0.08116788417100906,
-0.13705866038799286,
0.24973437190055847,
0.18238553404808044,
-0.1227087453007698,
0.5208710432052612,
-0.3852013945579529,
-0.09120424091815948,
0.31933051347732544,
0.296485036611557,
0.6411601305007935,
-0.16730168461799622,
-0.34632304310798645,
0.5493077039718628,
0.06689700484275818,
0.0489535927772522,
-0.20253463089466095,
0.7441787123680115,
0.1142553761601448,
0.0013106688857078552,
0.02398648113012314,
0.07975742220878601,
-0.20422472059726715,
-0.25461143255233765,
0.1670304536819458,
0.3793715834617615,
-0.27773070335388184,
0.1054520308971405,
-0.022087398916482925,
0.17259186506271362,
0.005128592252731323,
0.23319697380065918,
0.10384704172611237,
0.3263959586620331,
0.3252728581428528,
0.18450000882148743,
0.1460259109735489,
0.30498993396759033,
0.24872750043869019,
0.11573204398155212,
-0.3463834226131439,
-0.040182191878557205,
0.45900389552116394,
-0.12472432851791382,
0.08071771264076233,
0.06567245721817017,
0.27315521240234375,
-0.1301852911710739,
-0.5751645565032959,
-0.09836088865995407,
0.27031800150871277,
-0.27953270077705383,
-0.061634909361600876,
0.13577717542648315,
-0.10413578152656555,
-0.19667232036590576,
0.24783721566200256,
-0.06746049225330353,
0.03151390329003334,
0.13027310371398926,
0.06365439295768738,
0.07609795778989792,
-0.2675027847290039,
-0.24887588620185852,
-0.16865074634552002,
0.42827877402305603,
-0.27948227524757385,
0.03847844898700714,
-0.4485212564468384,
-0.08334527909755707,
-0.38673174381256104,
0.13057586550712585,
0.38604360818862915,
0.3322038948535919,
-0.35756224393844604,
0.1324610412120819,
-0.3035556375980377,
0.058733753859996796,
-0.014701316133141518,
0.550122857093811,
-0.14343960583209991,
-0.3998543322086334,
0.08947040140628815,
-0.06932763010263443,
-0.17927247285842896,
-0.23579125106334686,
0.1071096658706665,
0.3662973642349243,
0.22792088985443115,
-0.03521095961332321,
0.06289643049240112,
-0.20174580812454224,
-0.0747690349817276,
-0.15896350145339966,
0.04752882570028305,
-0.33190417289733887,
0.31525081396102905,
-0.1991516798734665,
0.14657163619995117,
-0.25384268164634705,
0.04053301364183426,
-0.06885573267936707,
0.26659467816352844,
0.47746697068214417,
0.0026580728590488434,
-0.4600188136100769,
-0.2874538004398346,
-0.31988224387168884,
0.1325932741165161,
-0.25244471430778503,
0.15772496163845062,
0.03230985254049301,
0.0031326916068792343,
0.014052316546440125,
0.2739686369895935,
-0.0254984050989151,
0.19034825265407562,
-0.08703959733247757,
0.3324122130870819,
-0.22171363234519958,
0.32899782061576843,
-0.11982794106006622,
0.0018244050443172455,
-0.009376561269164085,
-0.32787325978279114,
0.47665852308273315,
-0.2806282937526703,
-0.013793133199214935,
-0.08546296507120132,
-0.19903601706027985,
-0.036071568727493286,
-0.2993163764476776,
0.3547040820121765,
0.1346016675233841,
0.09862835705280304,
0.10874021798372269,
0.033650316298007965,
-0.19828277826309204,
-0.04094590246677399,
-0.09965410083532333,
0.1638059914112091,
0.08863890171051025,
0.21055665612220764,
-0.1900913566350937,
0.11149656772613525,
-0.19283774495124817,
-0.2151934802532196,
-0.07278220355510712,
-0.2603040933609009,
-0.14583104848861694,
0.17441663146018982,
-0.0652632936835289,
0.4091724753379822,
-0.057864729315042496,
0.5032033920288086,
-0.0767206996679306,
0.3331761956214905,
-0.3716691732406616,
-0.10823655128479004,
0.3395451307296753,
-0.6198598146438599,
-0.3754951059818268,
-0.11457238346338272,
-0.04930374026298523,
0.3244779109954834,
0.15608519315719604,
-0.04555070400238037,
-0.3533230125904083,
0.2848418951034546,
-0.09638858586549759,
-0.5365844368934631,
0.08161430060863495,
0.09297546744346619,
0.04586699977517128,
-0.17923091351985931,
0.4245985746383667,
-0.03139161318540573,
-0.343986839056015,
0.36884090304374695,
0.03753553330898285
] |
https://github.com/huggingface/datasets/issues/6319
|
Datasets.map is severely broken
|
same issue here
sample to reproduce: https://github.com/philschmid/document-ai-transformers/blob/main/training/donut_sroie.ipynb
with following map line
https://github.com/philschmid/document-ai-transformers/blob/main/training/donut_sroie.ipynb
If I directly iterate over the dataset and call the mapping method, it is very fast
```py
for sample in dataset:
def preprocess_documents_for_donut(sample):
```
if i removed `.convert('RGB')` It can run to completion without getting stuck. I suspect it has something to do with the Image.
If I use batch, it's even slower.
|
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
| 65
|
Datasets.map is severely broken
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
same issue here
sample to reproduce: https://github.com/philschmid/document-ai-transformers/blob/main/training/donut_sroie.ipynb
with following map line
https://github.com/philschmid/document-ai-transformers/blob/main/training/donut_sroie.ipynb
If I directly iterate over the dataset and call the mapping method, it is very fast
```py
for sample in dataset:
def preprocess_documents_for_donut(sample):
```
if i removed `.convert('RGB')` It can run to completion without getting stuck. I suspect it has something to do with the Image.
If I use batch, it's even slower.
|
[
-0.5472962260246277,
0.10284571349620819,
0.048736561089754105,
0.10942547023296356,
0.15640124678611755,
0.11435630172491074,
0.3405648171901703,
0.3313934803009033,
-0.005229780450463295,
-0.20240150392055511,
-0.09187207370996475,
0.5996779203414917,
0.029872702434659004,
-0.3681776821613312,
-0.3283045291900635,
0.18705716729164124,
0.26795896887779236,
0.22360572218894958,
0.31232959032058716,
-0.11800564080476761,
-0.08430348336696625,
0.05285889282822609,
-0.3279159665107727,
0.0024765655398368835,
-0.6185134649276733,
-0.25440314412117004,
-0.07109129428863525,
-0.15536537766456604,
-0.2102092057466507,
-0.33403918147087097,
0.11478331685066223,
0.20873764157295227,
-0.23280365765094757,
0.7293699979782104,
-0.00012279758811928332,
-0.08719268441200256,
-0.040213875472545624,
0.28515270352363586,
0.06628413498401642,
-0.001649409532546997,
-0.21080756187438965,
0.031010428443551064,
-0.1511557251214981,
-0.08753636479377747,
0.20480060577392578,
0.04914777725934982,
0.13302843272686005,
-0.257107675075531,
0.27993136644363403,
0.22600044310092926,
0.05729338526725769,
0.3495982885360718,
-0.09852570295333862,
0.010740402154624462,
0.17565256357192993,
0.0754423439502716,
-0.17496128380298615,
0.13962939381599426,
0.4377504587173462,
-0.4677940607070923,
-0.24951201677322388,
-0.018416034057736397,
-0.3549453020095825,
-0.08740247786045074,
-0.06463612616062164,
-0.10480377823114395,
0.0039033815264701843,
-0.5910452604293823,
0.4309544563293457,
0.25102904438972473,
0.0954006165266037,
0.029953595250844955,
-0.11656348407268524,
-0.2297573983669281,
-0.22586363554000854,
-0.15618160367012024,
0.22293761372566223,
0.06193961203098297,
-0.12427778542041779,
0.10743802785873413,
-0.39486074447631836,
0.1313244253396988,
0.0198293998837471,
0.26464033126831055,
-0.07575873285531998,
0.41966280341148376,
0.12862494587898254,
0.21812161803245544,
0.19727268815040588,
-0.08089656382799149,
-0.0750536099076271,
-0.10723121464252472,
0.10315324366092682,
0.2314666360616684,
-0.47340595722198486,
-0.07104524224996567,
0.09743885695934296,
-0.2080552577972412,
0.2171458601951599,
-0.14025607705116272,
-0.289448082447052,
0.24438902735710144,
-0.07636162638664246,
0.26212814450263977,
0.26696574687957764,
0.11957888305187225,
-0.06387756019830704,
0.4712938964366913,
0.4251553416252136,
-0.27595847845077515,
-0.382869154214859,
0.19304898381233215,
-0.12163124978542328,
-0.18558409810066223,
0.0943136066198349,
-0.1303514540195465,
-0.0753704309463501,
-0.023450300097465515,
-0.2708694040775299,
0.20190013945102692,
-0.36140450835227966,
0.21529467403888702,
0.06809175759553909,
0.27421796321868896,
-0.09228456765413284,
0.10148385912179947,
-0.11601202189922333,
-0.1989312320947647,
-0.3014489412307739,
-0.05355159565806389,
0.04352818801999092,
-0.2915937304496765,
-0.26686638593673706,
0.1242365911602974,
-0.02306361310184002,
-0.009694220498204231,
0.15555500984191895,
0.04045231267809868,
-0.04341099411249161,
-0.10656242072582245,
0.27363768219947815,
-0.39085736870765686,
0.30560749769210815,
0.15458695590496063,
-0.27625444531440735,
0.5137184858322144,
0.04685303196310997,
-0.1789349615573883,
-0.1458558887243271,
0.09280412644147873,
-0.3187258541584015,
-0.06102321296930313,
-0.004123067483305931,
0.039387717843055725,
-0.12839576601982117,
0.0014995858073234558,
-0.2486869990825653,
0.1502460390329361,
0.32657209038734436,
0.030872035771608353,
0.06219615042209625,
-0.15704859793186188,
-0.29430902004241943,
-0.12252811342477798,
0.08540214598178864,
0.2815881371498108,
-0.04168873280286789,
-0.04756816104054451,
0.15831582248210907,
0.28543296456336975,
0.20290198922157288,
0.5702815055847168,
0.020478790625929832,
0.3342130482196808,
-0.32610049843788147,
0.22430123388767242,
0.19295455515384674,
0.2179034948348999,
-0.5396507382392883,
0.34163549542427063,
-0.09245945513248444,
-0.016758281737565994,
-0.3592122495174408,
-0.0023284570779651403,
0.6955512762069702,
-0.12966257333755493,
0.4667407274246216,
0.18650692701339722,
-0.0651446282863617,
0.10475323349237442,
-0.28687161207199097,
-0.25252020359039307,
0.07577858865261078,
0.10412958264350891,
0.15391214191913605,
-0.07040619105100632,
-0.1728450357913971,
-0.18008406460285187,
0.2500327229499817,
0.09438532590866089,
-0.010473883710801601,
0.2349412739276886,
0.23310637474060059,
-0.09813761711120605,
0.13475845754146576,
-0.3287956118583679,
-0.08663208037614822,
0.3540046811103821,
0.2591134011745453,
-0.034273117780685425,
0.014312587678432465,
-0.01313905231654644,
0.018265683203935623,
0.14522060751914978,
-0.23603413999080658,
0.05380232632160187,
-0.0490727424621582,
-0.12333835661411285,
-0.1743539571762085,
0.15693782269954681,
-0.14463776350021362,
-0.15760551393032074,
0.04991011321544647,
0.13869136571884155,
0.017331942915916443,
0.055093638598918915,
-0.05478455126285553,
-0.12013886868953705,
-0.1449965387582779,
-0.004113055765628815,
0.14102686941623688,
-0.17517141997814178,
-0.2294929325580597,
0.23860955238342285,
0.12019900232553482,
0.19664587080478668,
-0.07857870310544968,
0.33384209871292114,
0.24370621144771576,
-0.08280973136425018,
-0.1316395401954651,
0.31788042187690735,
-0.06003526598215103,
-0.3241063952445984,
0.008246403187513351,
0.14642302691936493,
0.09166331589221954,
0.450751930475235,
-0.1827022284269333,
0.1983519345521927,
0.07885745167732239,
-0.01647215336561203,
-0.12248251587152481,
0.18419212102890015,
0.45655643939971924,
-0.027474097907543182,
0.33948761224746704,
0.2240922451019287,
0.07899013161659241,
0.08404449373483658,
0.6741202473640442,
0.024788841605186462,
0.03657729923725128,
0.24389860033988953,
-0.183739572763443,
0.03609294444322586,
0.014429830014705658,
-0.030955318361520767,
0.34679505228996277,
-0.07446976751089096,
0.16515237092971802,
-0.07875953614711761,
-0.06600217521190643,
-0.0758245661854744,
0.06493610143661499,
0.18436753749847412,
0.24073314666748047,
0.2551172077655792,
0.16779138147830963,
0.18295584619045258,
-0.3799893856048584,
-0.45167407393455505,
0.07509810477495193,
0.37278467416763306,
-0.050360117107629776,
0.1793525367975235,
-0.05677741765975952,
0.1756211519241333,
0.019941331818699837,
-0.018674347549676895,
-0.17124326527118683,
-0.3136095106601715,
-0.15208613872528076,
0.1077515184879303,
0.14099062979221344,
0.3911449611186981,
0.0047101303935050964,
0.041775867342948914,
0.1178809255361557,
-0.06446707248687744,
-0.23544739186763763,
-0.34474122524261475,
-0.2397662103176117,
-0.13071678578853607,
0.4910135865211487,
-0.25507959723472595,
0.15933763980865479,
0.128691166639328,
-0.30432450771331787,
-0.04299328476190567,
-0.38401031494140625,
-0.007678046822547913,
-0.09162229299545288,
0.03718627244234085,
0.09563583880662918,
0.3512043356895447,
-0.2359602153301239,
-0.07545231282711029,
0.3353135883808136,
-0.577414333820343,
0.11651118099689484,
-0.11150724440813065,
-0.06340398639440536,
-0.29052168130874634,
0.09028151631355286,
-0.06598890572786331,
-0.017471423372626305,
-0.22143661975860596,
0.4119676351547241,
-0.30157673358917236,
-0.027506329119205475,
0.20005635917186737,
0.28708702325820923,
0.12761043012142181,
0.043661314994096756,
-0.2134217768907547,
-0.07434134930372238,
-0.19964855909347534,
0.48469847440719604,
0.018757766112685204,
-0.20009338855743408,
-0.02800689823925495,
0.00008845515549182892,
0.021728649735450745,
0.23895837366580963,
-0.4027482271194458,
0.5325843095779419,
-0.4206249713897705,
0.06747166812419891,
-0.020264416933059692,
-0.05476028472185135,
0.2637802064418793,
-0.04317781329154968,
0.0883706584572792,
0.0638602152466774,
-0.2429267019033432,
0.004376225173473358,
0.09134925901889801,
0.11186092346906662,
0.16867130994796753,
0.49566465616226196,
0.30670976638793945,
0.676106870174408,
0.4034806787967682,
-0.17592503130435944,
-0.04953169822692871,
0.08160816878080368,
0.1176731288433075,
-0.25664442777633667,
-0.5035580396652222,
0.07042049616575241,
-0.17870616912841797,
-0.4586068391799927,
0.16122791171073914,
0.05751143768429756,
-0.6511264443397522,
0.023727446794509888,
-0.09584762156009674,
0.19974291324615479,
-0.32136693596839905,
0.2923682630062103,
-0.22479099035263062,
0.04606379568576813,
0.04628913477063179,
0.23365166783332825,
-0.21450108289718628,
-0.24339449405670166,
0.20017926394939423,
-0.11656063795089722,
0.09287414699792862,
-0.2258795201778412,
-0.6267590522766113,
0.11821286380290985,
-0.5528825521469116,
0.12699837982654572,
-0.06139617785811424,
0.5350052714347839,
-0.11681697517633438,
0.19814056158065796,
0.16777276992797852,
-0.0997815653681755,
0.6493231058120728,
-0.08314179629087448,
-0.0617716908454895,
0.14583618938922882,
0.11667650938034058,
-0.2668065130710602,
-0.051315538585186005,
0.09623755514621735,
0.4636403024196625,
0.5832167863845825,
0.4935152232646942,
-0.1536259800195694,
-0.17655929923057556,
0.03720186650753021,
0.009944497607648373,
-0.02225648984313011,
-0.24026553332805634,
-0.12985333800315857,
0.0062017738819122314,
-0.19856786727905273,
0.22595179080963135,
0.1704399287700653,
-0.2657322287559509,
0.1043766513466835,
-0.3500373959541321,
-0.031062616035342216,
-0.14892156422138214,
0.15184378623962402,
0.03585400804877281,
0.07748790830373764,
-0.05772298946976662,
0.39483052492141724,
0.4161466360092163,
-0.12320394814014435,
0.15990906953811646,
0.22666992247104645,
-0.21066641807556152,
-0.177362859249115,
0.04184754937887192,
-0.11010275036096573,
0.4511827826499939,
0.561754584312439,
-0.048265840858221054,
-0.004168055951595306,
-0.14808380603790283,
0.32209187746047974,
-0.23042143881320953,
0.28976771235466003,
0.5284997820854187,
0.1945706307888031,
-0.6263088583946228,
-0.27205705642700195,
0.12695208191871643,
0.24399395287036896,
-0.23118597269058228,
0.6022678017616272,
-0.40923482179641724,
-0.17047762870788574,
0.7279780507087708,
0.1779571771621704,
1.0124986171722412,
-0.34634774923324585,
0.15436427295207977,
-0.2624356746673584,
0.09579648077487946,
0.11676685512065887,
-0.46125340461730957,
0.1277570128440857,
-0.3353652358055115,
-0.30441489815711975,
-0.043451763689517975,
-0.08407541364431381,
0.06782730668783188,
0.33966052532196045,
0.01648104563355446,
0.10361079126596451,
0.13872802257537842,
0.6633105874061584,
0.1355414092540741,
0.08123141527175903,
0.23225241899490356,
-0.29962074756622314,
-0.08662717789411545,
0.0389745831489563,
0.05548777058720589,
0.01872255466878414,
0.047252923250198364,
-0.013729242607951164,
-0.06329458951950073,
0.013385329395532608,
-0.5156526565551758,
-0.05664772912859917,
-0.4684363007545471,
0.1573418229818344,
0.07022835314273834,
0.13610908389091492,
0.17261704802513123,
0.19081710278987885,
-0.10088658332824707,
0.24846884608268738,
-0.005457684397697449,
0.3979221284389496,
0.2088286578655243,
-0.003475684905424714,
0.40578407049179077,
-0.4646347463130951,
0.09727819263935089,
0.07709888368844986,
-0.03193599730730057,
0.02788163721561432,
-0.07326063513755798,
-0.3310320973396301,
-0.3104814291000366,
0.20197367668151855,
0.5462757349014282,
-0.027327144518494606,
-0.05638602375984192,
-0.08112454414367676,
-0.12436270713806152,
-0.17067831754684448,
0.03418970853090286,
0.15719346702098846,
0.13627998530864716,
0.6130106449127197,
-0.33191633224487305,
-0.21824496984481812,
-0.020288411527872086,
0.45908060669898987,
-0.16203418374061584,
-0.11005999147891998,
0.3641109764575958,
0.12520036101341248,
-0.21551203727722168,
-0.14916327595710754,
0.37172919511795044,
0.04296069219708443,
-0.2152610421180725,
-0.04079468920826912,
-0.5710654258728027,
-0.012756437063217163,
0.11751950532197952,
0.06029166653752327,
-0.049088940024375916,
-0.12558773159980774,
-0.0983075499534607,
-0.47326144576072693,
-0.35183724761009216,
-0.21724145114421844,
0.028009936213493347,
0.22375668585300446,
-0.19001799821853638,
-0.2317901998758316,
-0.12544149160385132,
0.24366921186447144,
-0.13652798533439636,
0.08511292189359665,
-0.13160400092601776,
-0.0272100567817688,
-0.1295827031135559,
-0.12368693202733994,
0.2861517667770386,
-0.25867170095443726,
-0.11296465247869492,
0.4566574692726135,
0.17155103385448456,
-0.06793518364429474,
-0.214847132563591,
0.20722320675849915,
0.16034334897994995,
-0.23106278479099274,
0.15907277166843414,
-0.1955556720495224,
-0.07544681429862976,
-0.46891912817955017,
-0.0902935117483139,
0.13763800263404846,
-0.08721233904361725,
-0.1785672903060913,
0.2513677179813385,
0.025160837918519974,
-0.005522787570953369,
0.06514641642570496,
-0.007977165281772614,
0.11622947454452515,
0.20169179141521454,
0.18129341304302216,
0.07075763493776321,
-0.05200745910406113,
-0.06603553146123886,
0.15507861971855164,
0.15454767644405365,
-0.03798682987689972,
0.6093011498451233,
-0.4863765835762024,
-0.015795858576893806,
0.3187372088432312,
0.30650290846824646,
0.6488592028617859,
-0.1929231584072113,
-0.3036273717880249,
0.34846481680870056,
0.05967757850885391,
0.06948653608560562,
-0.2335655391216278,
0.6681628227233887,
0.00918637216091156,
0.033302005380392075,
0.10066071897745132,
0.017991874366998672,
-0.23404644429683685,
-0.18570156395435333,
0.16618302464485168,
0.43576669692993164,
-0.35098475217819214,
0.062448807060718536,
-0.0703197568655014,
0.16264058649539948,
0.036568623036146164,
0.14358681440353394,
0.08707642555236816,
0.2984946668148041,
0.2888467013835907,
0.2413530945777893,
0.19045457243919373,
0.32145509123802185,
0.32620906829833984,
0.1458776742219925,
-0.28291425108909607,
-0.14773553609848022,
0.3415665626525879,
-0.1657027304172516,
0.25137031078338623,
0.08732372522354126,
0.2309010922908783,
-0.1721535325050354,
-0.437811940908432,
-0.06020788103342056,
0.13786712288856506,
-0.230595201253891,
-0.06167434900999069,
0.0652422234416008,
-0.07263769954442978,
-0.07044284045696259,
0.21544593572616577,
-0.08369730412960052,
0.011439885944128036,
0.38170531392097473,
0.1290537416934967,
0.05314048007130623,
-0.20502884685993195,
-0.21845626831054688,
-0.16356152296066284,
0.48608896136283875,
-0.2994568645954132,
0.09441068768501282,
-0.34773391485214233,
-0.1392698585987091,
-0.4000767469406128,
0.24788950383663177,
0.4127313792705536,
0.3563867211341858,
-0.3428746163845062,
0.20196092128753662,
-0.16090571880340576,
-0.01216597855091095,
-0.0015309173613786697,
0.4603349268436432,
-0.14681656658649445,
-0.30152374505996704,
0.06003158912062645,
-0.07718824595212936,
-0.1262294203042984,
-0.148086279630661,
0.041421305388212204,
0.41940298676490784,
0.21317636966705322,
-0.10902459174394608,
-0.04691396653652191,
-0.27632519602775574,
-0.07835787534713745,
-0.17234119772911072,
-0.055316757410764694,
-0.2608378827571869,
0.47247955203056335,
-0.38157427310943604,
0.11959367245435715,
-0.14245976507663727,
0.01948586478829384,
-0.06054934486746788,
0.3941565454006195,
0.4939386546611786,
-0.03481070697307587,
-0.53659588098526,
-0.19399631023406982,
-0.32826361060142517,
0.06770534813404083,
-0.30914416909217834,
0.2633848488330841,
0.018708523362874985,
0.06698457151651382,
-0.01627768576145172,
0.17003899812698364,
0.03633452206850052,
-0.07948220521211624,
-0.05511214956641197,
0.5143707990646362,
-0.1827326864004135,
0.14296087622642517,
-0.22819630801677704,
-0.011958638206124306,
0.024839796125888824,
-0.3878651559352875,
0.44512149691581726,
-0.21676072478294373,
-0.0774277001619339,
-0.12713941931724548,
-0.07975655794143677,
-0.07064832746982574,
-0.17495322227478027,
0.2276831567287445,
0.19594599306583405,
0.1477750688791275,
0.10902052372694016,
-0.07482697069644928,
-0.24487140774726868,
-0.01891634427011013,
-0.11478117853403091,
0.16772910952568054,
0.11030341684818268,
0.26503485441207886,
-0.2792513966560364,
-0.04164038971066475,
-0.2555619478225708,
-0.26765239238739014,
-0.06957876682281494,
-0.37059590220451355,
-0.18839392066001892,
0.12527111172676086,
-0.07669790834188461,
0.40038540959358215,
-0.049922212958335876,
0.6121196746826172,
-0.040095262229442596,
0.18008893728256226,
-0.39448463916778564,
-0.13597968220710754,
0.3293059468269348,
-0.6971391439437866,
-0.48672449588775635,
-0.054888587445020676,
-0.015860527753829956,
0.24972406029701233,
0.21380528807640076,
-0.1781681627035141,
-0.3134446144104004,
0.24891513586044312,
-0.13448232412338257,
-0.5855763554573059,
0.01957121305167675,
0.15297946333885193,
0.11633652448654175,
-0.1821448653936386,
0.5165903568267822,
0.002473536878824234,
-0.40729930996894836,
0.3194647431373596,
-0.05431200936436653
] |
https://github.com/huggingface/datasets/issues/6319
|
Datasets.map is severely broken
|
@ewfian
> If I directly iterate over the dataset and call the mapping method, it is very fast
`Dataset.map` must also convert the images into bytes to write them to an Arrow file (the write itself takes some time, too).
You can make the `map` faster by manually converting the images into an "arrow-compatible" representation. Otherwise, the Pillow defaults are used when saving an image, which seems particularly slow for the notebook's case.
```python
def preprocess_documents_for_donut(sample):
text = json.loads(sample["text"])
d_doc = task_start_token + json2token(text) + eos_token
image = sample["image"].convert('RGB')
# convert image to bytes
buffer = io.BytesIO()
image.save(buffer, format="PNG", compress_level=1)
return {"image": {"bytes": buffer.getvalue()}, "text": d_doc}
proc_dataset = dataset.map(preprocess_documents_for_donut, writer_batch_size=50)
```
|
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
| 111
|
Datasets.map is severely broken
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
@ewfian
> If I directly iterate over the dataset and call the mapping method, it is very fast
`Dataset.map` must also convert the images into bytes to write them to an Arrow file (the write itself takes some time, too).
You can make the `map` faster by manually converting the images into an "arrow-compatible" representation. Otherwise, the Pillow defaults are used when saving an image, which seems particularly slow for the notebook's case.
```python
def preprocess_documents_for_donut(sample):
text = json.loads(sample["text"])
d_doc = task_start_token + json2token(text) + eos_token
image = sample["image"].convert('RGB')
# convert image to bytes
buffer = io.BytesIO()
image.save(buffer, format="PNG", compress_level=1)
return {"image": {"bytes": buffer.getvalue()}, "text": d_doc}
proc_dataset = dataset.map(preprocess_documents_for_donut, writer_batch_size=50)
```
|
[
-0.5075655579566956,
0.08682601153850555,
0.024711739271879196,
0.1470145881175995,
0.13376808166503906,
0.17092403769493103,
0.23593094944953918,
0.40974125266075134,
-0.07565194368362427,
-0.19754506647586823,
-0.0014710905961692333,
0.6998307704925537,
-0.0015345802530646324,
-0.3838915526866913,
-0.3182939887046814,
0.19333694875240326,
0.2605297863483429,
0.17601731419563293,
0.3204510807991028,
-0.06243088096380234,
-0.10871105641126633,
0.09832719713449478,
-0.2821747660636902,
0.012483879923820496,
-0.5822429656982422,
-0.27809181809425354,
-0.049076832830905914,
-0.14702987670898438,
-0.2981160283088684,
-0.3755805790424347,
0.012453710660338402,
0.22794973850250244,
-0.22196826338768005,
0.6493622660636902,
-0.00012085841444786638,
-0.07277680188417435,
-0.11596840620040894,
0.20802170038223267,
0.05340007320046425,
-0.02876560389995575,
-0.15714532136917114,
-0.13511253893375397,
-0.1533123254776001,
-0.15911853313446045,
0.31287360191345215,
-0.17362923920154572,
0.10560131072998047,
-0.26249897480010986,
0.4005647301673889,
0.24894553422927856,
0.08210925757884979,
0.23518851399421692,
-0.06494677811861038,
0.016081886366009712,
0.22180840373039246,
0.06180516257882118,
-0.18472817540168762,
0.19578729569911957,
0.3787843585014343,
-0.4498777687549591,
-0.2515081763267517,
0.03140278160572052,
-0.37439146637916565,
-0.01515866443514824,
-0.06904216855764389,
-0.14024536311626434,
-0.01659061759710312,
-0.49102410674095154,
0.40072640776634216,
0.21825316548347473,
0.17442354559898376,
-0.005510363727807999,
-0.017803333699703217,
-0.22786134481430054,
-0.2825008034706116,
-0.12769129872322083,
0.30351749062538147,
0.09701245278120041,
-0.09204962849617004,
0.13069401681423187,
-0.3457564413547516,
0.12352621555328369,
0.054960720241069794,
0.25515061616897583,
-0.003243539482355118,
0.26231127977371216,
0.09652767330408096,
0.263733834028244,
0.1799355298280716,
-0.008442040532827377,
-0.1084110289812088,
-0.04749802500009537,
0.03854314610362053,
0.2051125168800354,
-0.3412356972694397,
-0.056582532823085785,
0.14646846055984497,
-0.378047376871109,
0.3033434748649597,
-0.13454607129096985,
-0.1131376177072525,
0.19756174087524414,
-0.04634265601634979,
0.2864300012588501,
0.31268325448036194,
0.03715447708964348,
-0.08309578150510788,
0.28631699085235596,
0.3500503897666931,
-0.24292784929275513,
-0.37075918912887573,
0.19181004166603088,
-0.08273676782846451,
-0.30340486764907837,
0.08091941475868225,
-0.1608891487121582,
-0.0003263503313064575,
-0.04141591861844063,
-0.1815725713968277,
0.24722875654697418,
-0.4996739327907562,
0.14338955283164978,
-0.0124427555128932,
0.21178358793258667,
-0.1486838459968567,
0.07708137482404709,
-0.01674330048263073,
-0.21357381343841553,
-0.23230010271072388,
-0.040783967822790146,
0.036924876272678375,
-0.284946084022522,
-0.2567654848098755,
0.12981390953063965,
-0.015429215505719185,
0.07593916356563568,
0.18639704585075378,
0.07103987038135529,
-0.1196807324886322,
-0.10667550563812256,
0.2855345606803894,
-0.3580878674983978,
0.29598093032836914,
0.07261159271001816,
-0.27496668696403503,
0.5064480900764465,
0.02263365499675274,
-0.11941403150558472,
-0.19765138626098633,
0.07689496129751205,
-0.32712677121162415,
0.006367582827806473,
-0.004629315808415413,
0.024806518107652664,
-0.043506890535354614,
-0.003385443240404129,
-0.37372878193855286,
0.16749371588230133,
0.2291717529296875,
0.052275609225034714,
0.11707368493080139,
-0.07083122432231903,
-0.22116206586360931,
-0.16649679839611053,
-0.002234242856502533,
0.1484171450138092,
-0.17391929030418396,
-0.026110850274562836,
0.20181602239608765,
0.25924938917160034,
0.13292577862739563,
0.4543642997741699,
0.061868585646152496,
0.418732225894928,
-0.34811222553253174,
0.20441530644893646,
0.21036362648010254,
0.17053332924842834,
-0.5550928711891174,
0.25370028614997864,
-0.06503501534461975,
0.006587175652384758,
-0.37955835461616516,
-0.0767141729593277,
0.6598848104476929,
-0.03503045067191124,
0.510208785533905,
0.20402446389198303,
0.005257796496152878,
0.12389559298753738,
-0.2835441529750824,
-0.20538420975208282,
-0.014655184000730515,
0.07517360150814056,
0.0801577940583229,
-0.17307806015014648,
-0.1917005479335785,
-0.2292996346950531,
0.2244110405445099,
0.05313454940915108,
0.02897457405924797,
0.3371109366416931,
0.2677246928215027,
-0.07081298530101776,
0.15583299100399017,
-0.22260087728500366,
-0.07927270978689194,
0.34446123242378235,
0.34488481283187866,
-0.0905064195394516,
-0.07645483314990997,
0.028248555958271027,
0.03489835560321808,
0.14019514620304108,
-0.16701513528823853,
0.060284871608018875,
-0.023239437490701675,
-0.16509759426116943,
-0.16206662356853485,
0.290731817483902,
-0.1395152509212494,
-0.03720597177743912,
0.02729557640850544,
0.2047157883644104,
0.13772810995578766,
0.12319739162921906,
0.005263675004243851,
-0.17081649601459503,
-0.09175212681293488,
-0.006495483219623566,
0.12906639277935028,
-0.1729690283536911,
-0.26481539011001587,
0.24637940526008606,
0.22822119295597076,
0.07374350726604462,
-0.14940190315246582,
0.23859208822250366,
0.10993931442499161,
-0.14332130551338196,
-0.18100236356258392,
0.24834170937538147,
-0.05282079800963402,
-0.20766156911849976,
-0.05437055230140686,
0.17781127989292145,
0.004093937575817108,
0.3762780725955963,
-0.2221047580242157,
0.2688513994216919,
0.08498712629079819,
0.01122753694653511,
-0.16252823173999786,
0.20024731755256653,
0.4069060683250427,
-0.003566224128007889,
0.27913743257522583,
0.16502118110656738,
0.08175532519817352,
0.020182982087135315,
0.6379000544548035,
0.0908714234828949,
0.049455367028713226,
0.24441149830818176,
-0.18874454498291016,
0.04401116073131561,
0.093913733959198,
0.07849743962287903,
0.39348679780960083,
-0.04497484117746353,
0.07802989333868027,
-0.057955287396907806,
-0.15591618418693542,
0.01795462891459465,
0.053635187447071075,
0.13630223274230957,
0.33468949794769287,
0.22082757949829102,
0.14080049097537994,
0.13181786239147186,
-0.4274009168148041,
-0.3667651414871216,
0.07778292894363403,
0.4168686270713806,
-0.0667634978890419,
0.10832459479570389,
-0.13691818714141846,
0.12154308706521988,
0.0498548187315464,
0.10494779795408249,
-0.18422290682792664,
-0.2754844129085541,
-0.07690321654081345,
0.07698697596788406,
0.08101370930671692,
0.36709603667259216,
0.05231758579611778,
0.1135852113366127,
0.08745153993368149,
-0.13035118579864502,
-0.25257426500320435,
-0.36745551228523254,
-0.18244871497154236,
-0.1203031986951828,
0.4859386086463928,
-0.21882987022399902,
0.2433812916278839,
0.08092629909515381,
-0.3085021376609802,
-0.14504317939281464,
-0.4059164524078369,
-0.014945320785045624,
-0.19343028962612152,
0.02645697072148323,
0.15382733941078186,
0.409038245677948,
-0.34413719177246094,
-0.01717229187488556,
0.3449356257915497,
-0.4833146631717682,
-0.02391134575009346,
-0.12422586232423782,
-0.005003610625863075,
-0.2616213262081146,
0.08866645395755768,
-0.02120574563741684,
0.07433104515075684,
-0.23032185435295105,
0.49844032526016235,
-0.16248266398906708,
-0.04244718700647354,
0.09503552317619324,
0.41056954860687256,
0.12140808999538422,
0.05303814634680748,
-0.15434181690216064,
-0.1132822334766388,
-0.1528605967760086,
0.46798160672187805,
-0.04726293310523033,
-0.2021956592798233,
0.05414455756545067,
0.07552210986614227,
0.11881624162197113,
0.1839592456817627,
-0.5130054354667664,
0.3822813332080841,
-0.35662341117858887,
0.137842059135437,
-0.06222698092460632,
-0.07664342224597931,
0.29566067457199097,
0.09721225500106812,
0.024736663326621056,
0.0009625591337680817,
-0.2748114764690399,
-0.00683603435754776,
0.0895874947309494,
0.13204212486743927,
0.15542137622833252,
0.4776337444782257,
0.3338729739189148,
0.5709341168403625,
0.3427393138408661,
-0.10145449638366699,
0.08140770345926285,
0.03977016732096672,
0.11529628932476044,
-0.20690441131591797,
-0.5167697668075562,
0.06521042436361313,
-0.2182391881942749,
-0.29213422536849976,
0.11219456046819687,
0.03451748192310333,
-0.6047579646110535,
-0.04568811506032944,
-0.07861335575580597,
0.0306006520986557,
-0.276206910610199,
0.2793909013271332,
-0.21503368020057678,
-0.00952107459306717,
0.060963500291109085,
0.16495433449745178,
-0.2693592309951782,
-0.1650606095790863,
0.18264727294445038,
-0.1575527936220169,
0.09180768579244614,
-0.2548660933971405,
-0.7257886528968811,
0.3235985338687897,
-0.507440447807312,
0.18288907408714294,
-0.08836603909730911,
0.42084142565727234,
-0.0597807951271534,
0.22333750128746033,
0.13534268736839294,
-0.21946507692337036,
0.6231108903884888,
-0.0936933159828186,
-0.11934053897857666,
0.1820836067199707,
0.12649647891521454,
-0.4220271110534668,
-0.04346156120300293,
0.12772561609745026,
0.39205026626586914,
0.46120771765708923,
0.4103185534477234,
-0.15044410526752472,
-0.24585270881652832,
0.017605934292078018,
0.026352977380156517,
-0.03574738651514053,
-0.17670726776123047,
-0.09529184550046921,
-0.07962647080421448,
-0.2095385044813156,
0.17499421536922455,
0.20255963504314423,
-0.20263300836086273,
0.2080092579126358,
-0.3311787247657776,
-0.12186355888843536,
-0.2238268256187439,
0.051525283604860306,
-0.022376444190740585,
0.1436605155467987,
-0.1151478961110115,
0.39343950152397156,
0.41767287254333496,
0.11652172356843948,
0.2598271071910858,
0.21531324088573456,
-0.22763153910636902,
-0.20584529638290405,
-0.07271228730678558,
-0.045483607798814774,
0.5163480043411255,
0.5832308530807495,
-0.0783364325761795,
-0.008022010326385498,
-0.24966362118721008,
0.3074273467063904,
-0.235750213265419,
0.2811826765537262,
0.598003625869751,
0.21799735724925995,
-0.5778691172599792,
-0.2718541622161865,
0.14431717991828918,
0.4135245978832245,
-0.21949802339076996,
0.628337025642395,
-0.35373175144195557,
-0.21560120582580566,
0.7289199233055115,
0.2547054886817932,
1.0226908922195435,
-0.32010531425476074,
0.23384875059127808,
-0.20396411418914795,
-0.0027929209172725677,
0.14999252557754517,
-0.5508257746696472,
0.07484917342662811,
-0.3086143136024475,
-0.23537856340408325,
-0.06472381204366684,
-0.10566209256649017,
0.1371324360370636,
0.31708914041519165,
-0.07664582133293152,
0.02977713756263256,
0.15108846127986908,
0.47301676869392395,
0.004154626280069351,
-0.01573636382818222,
0.21685883402824402,
-0.2936873435974121,
-0.10355821996927261,
0.05174757540225983,
0.0566524975001812,
-0.07569396495819092,
0.053637996315956116,
0.01040571928024292,
-0.15404479205608368,
-0.09367938339710236,
-0.49523937702178955,
-0.17942073941230774,
-0.5077295899391174,
0.14814013242721558,
0.04850097745656967,
0.17584367096424103,
0.078609898686409,
0.20744101703166962,
-0.0926731526851654,
0.2728096842765808,
0.013880888931453228,
0.4302695691585541,
0.16058313846588135,
-0.043009061366319656,
0.3870868980884552,
-0.48683685064315796,
0.1482810378074646,
0.028271712362766266,
0.01265338808298111,
0.0860031396150589,
-0.06834293901920319,
-0.3716329336166382,
-0.2499331831932068,
0.2360115796327591,
0.4849936366081238,
-0.0708528384566307,
-0.18558405339717865,
0.0194806307554245,
-0.08152137696743011,
-0.2382706105709076,
0.04755634069442749,
0.20258130133152008,
0.1448850929737091,
0.6844809055328369,
-0.31469160318374634,
-0.2664377689361572,
-0.02220260351896286,
0.5059653520584106,
-0.22540807723999023,
-0.19104747474193573,
0.3024121820926666,
0.10226434469223022,
-0.2070818543434143,
-0.14228281378746033,
0.4949514865875244,
0.11372765898704529,
-0.31477949023246765,
0.03760305792093277,
-0.5364389419555664,
0.036196768283843994,
0.023292532190680504,
0.22583183646202087,
0.0053916797041893005,
-0.14181992411613464,
0.021181780844926834,
-0.401491641998291,
-0.38757020235061646,
-0.09596851468086243,
0.03433685749769211,
0.2592339813709259,
-0.19000649452209473,
-0.33181291818618774,
-0.1406596451997757,
0.2327042520046234,
-0.15833599865436554,
0.26858431100845337,
-0.12958002090454102,
-0.08433810621500015,
-0.055268801748752594,
-0.03182291239500046,
0.26909181475639343,
-0.2442498803138733,
-0.04889410734176636,
0.506822943687439,
0.14166459441184998,
-0.09050804376602173,
-0.2882007360458374,
0.1969771534204483,
0.14413364231586456,
-0.2989667057991028,
0.2190684676170349,
-0.25068604946136475,
-0.11442647874355316,
-0.41237515211105347,
-0.22850222885608673,
0.12230884283781052,
-0.08448496460914612,
-0.17689505219459534,
0.18422189354896545,
-0.01963898539543152,
0.054679423570632935,
0.015728753060102463,
0.025306496769189835,
0.2713221311569214,
0.2064327895641327,
0.18284772336483002,
0.033885739743709564,
-0.06144930049777031,
-0.10911999642848969,
0.19654887914657593,
0.11119496822357178,
-0.08224218338727951,
0.5620989203453064,
-0.4743589758872986,
-0.045661501586437225,
0.2655652165412903,
0.3560487627983093,
0.6480020880699158,
-0.23408320546150208,
-0.3205137848854065,
0.4762214124202728,
0.07911384850740433,
0.027199361473321915,
-0.2233458012342453,
0.746711790561676,
0.04739295691251755,
0.01838499680161476,
0.062607541680336,
-0.014894500374794006,
-0.17481037974357605,
-0.34904712438583374,
0.13122773170471191,
0.339768648147583,
-0.2657786011695862,
0.05808556079864502,
-0.025113437324762344,
0.16160961985588074,
0.002404306083917618,
0.11736660450696945,
0.16912738978862762,
0.4358363151550293,
0.2886412739753723,
0.2429618239402771,
0.06210341304540634,
0.34893158078193665,
0.3394525945186615,
0.08499743789434433,
-0.23603317141532898,
-0.007542215287685394,
0.4115016758441925,
-0.10271118581295013,
0.2458728551864624,
0.06407316774129868,
0.2253672182559967,
-0.08563206344842911,
-0.4891933798789978,
-0.09425044059753418,
0.20131611824035645,
-0.21940240263938904,
-0.03968615457415581,
0.07592396438121796,
-0.12502527236938477,
-0.1789637804031372,
0.2654304504394531,
-0.1126902848482132,
-0.1271381378173828,
0.33384984731674194,
0.1575545370578766,
0.10208796709775925,
-0.2377697378396988,
-0.23500984907150269,
-0.15599748492240906,
0.4438077211380005,
-0.2941957116127014,
0.021860435605049133,
-0.4608287811279297,
-0.14434216916561127,
-0.41492265462875366,
0.3454633951187134,
0.42214563488960266,
0.2751607596874237,
-0.3103886544704437,
0.16489756107330322,
-0.21433405578136444,
0.04804538935422897,
0.004178674891591072,
0.4871492385864258,
-0.1020963191986084,
-0.42230942845344543,
0.1625964343547821,
-0.06346295028924942,
-0.1411917805671692,
-0.14500880241394043,
0.07102828472852707,
0.3174302875995636,
0.2217615693807602,
-0.17342650890350342,
-0.07414763420820236,
-0.27188625931739807,
-0.08605588972568512,
-0.20106026530265808,
-0.017277710139751434,
-0.36273568868637085,
0.4055587947368622,
-0.27289697527885437,
0.139154314994812,
-0.14564812183380127,
0.034250326454639435,
-0.11868934333324432,
0.35512587428092957,
0.5028983354568481,
0.03609910234808922,
-0.49482595920562744,
-0.2848890721797943,
-0.31882619857788086,
0.06156669184565544,
-0.371852844953537,
0.15125077962875366,
0.04246474802494049,
0.05034671723842621,
0.0916225016117096,
0.246352419257164,
0.10726579278707504,
0.01691751554608345,
-0.026253392919898033,
0.5599775314331055,
-0.2660430669784546,
0.1790686994791031,
0.02455771341919899,
0.011126391589641571,
0.005860418081283569,
-0.3805561065673828,
0.36805009841918945,
-0.27253401279449463,
-0.03517552837729454,
-0.16333842277526855,
-0.1060473769903183,
-0.0747549906373024,
-0.22732430696487427,
0.4275379180908203,
0.10586872696876526,
0.0605812668800354,
0.07994681596755981,
-0.15962451696395874,
-0.17184916138648987,
-0.006580783519893885,
-0.04909293353557587,
0.2242467999458313,
0.1652412861585617,
0.34378913044929504,
-0.3248610198497772,
0.08184704184532166,
-0.19920510053634644,
-0.18474893271923065,
-0.09626750648021698,
-0.39144790172576904,
-0.14450950920581818,
0.1815340369939804,
-0.02514757215976715,
0.30657875537872314,
-0.0844179317355156,
0.56246018409729,
-0.09749016165733337,
0.27833566069602966,
-0.41081589460372925,
-0.13116666674613953,
0.33814287185668945,
-0.6247522830963135,
-0.39634448289871216,
0.09484977275133133,
-0.0499739795923233,
0.2772999405860901,
0.20966675877571106,
-0.10322777181863785,
-0.3426819145679474,
0.28720271587371826,
-0.049354664981365204,
-0.6569121479988098,
0.0952383279800415,
0.16205617785453796,
0.08067335188388824,
-0.1520017385482788,
0.46467000246047974,
-0.05436691641807556,
-0.38420575857162476,
0.3308122456073761,
-0.09607832133769989
] |
https://github.com/huggingface/datasets/issues/6319
|
Datasets.map is severely broken
|
The problem I had was to do with map using fork and copying locks from the
parent process in acquired state. I ended up changing the context to use
forkserver instead.
On Wed, Nov 29, 2023, 10:04 PM Mario Šaško ***@***.***> wrote:
> @ewfian <https://github.com/ewfian>
>
> If I directly iterate over the dataset and call the mapping method, it is
> very fast
>
> Dataset.map must also convert the images into bytes to write them to an
> Arrow file (the write itself takes some time, too).
>
> You can make the map faster by manually converting the images into an
> "arrow-compatible" representation. Otherwise, the Pillow defaults are used
> when saving an image, which seems particularly slow for the notebook's case.
>
> def preprocess_documents_for_donut(sample):
> text = json.loads(sample["text"])
> d_doc = task_start_token + json2token(text) + eos_token
> image = sample["image"].convert('RGB')
> # convert image to bytes
> buffer = io.BytesIO()
> image.save(buffer, format="PNG", compress_level=1)
> return {"image": {"bytes": buffer.getvalue()}, "text": d_doc}
> proc_dataset = dataset.map(preprocess_documents_for_donut, writer_batch_size=50)
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1833033973>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABDD3ZKKEKJVWBFH7QHLRJ3YG7ZUJAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZTGAZTGOJXGM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
| 208
|
Datasets.map is severely broken
### Describe the bug
Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs.
After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing something, but it never ends.
I saw some comments about fast tokenizers using Rust and all and tried different variations. NOTHING works.
### Steps to reproduce the bug
Running it without breaking the dataset into parts results in the same behavior. The loop was an attempt to see if this was a RAM issue.
for idx in range(100):
dataset = load_dataset("togethercomputer/RedPajama-Data-1T-Sample", cache_dir=cache_dir, split=f'train[{idx}%:{idx+1}%]')
dataset = dataset.map(partial(tokenize_fn, tokenizer), batched=False, num_proc=1, remove_columns=["text", "meta"])
dataset.save_to_disk(training_args.cache_dir + f"/training_data_{idx}")
### Expected behavior
I expect map to run at more or less the same speed it starts with and FINISH its processing.
### Environment info
Python 3.8, same with 3.10 makes no difference.
Ubuntu 20.04,
The problem I had was to do with map using fork and copying locks from the
parent process in acquired state. I ended up changing the context to use
forkserver instead.
On Wed, Nov 29, 2023, 10:04 PM Mario Šaško ***@***.***> wrote:
> @ewfian <https://github.com/ewfian>
>
> If I directly iterate over the dataset and call the mapping method, it is
> very fast
>
> Dataset.map must also convert the images into bytes to write them to an
> Arrow file (the write itself takes some time, too).
>
> You can make the map faster by manually converting the images into an
> "arrow-compatible" representation. Otherwise, the Pillow defaults are used
> when saving an image, which seems particularly slow for the notebook's case.
>
> def preprocess_documents_for_donut(sample):
> text = json.loads(sample["text"])
> d_doc = task_start_token + json2token(text) + eos_token
> image = sample["image"].convert('RGB')
> # convert image to bytes
> buffer = io.BytesIO()
> image.save(buffer, format="PNG", compress_level=1)
> return {"image": {"bytes": buffer.getvalue()}, "text": d_doc}
> proc_dataset = dataset.map(preprocess_documents_for_donut, writer_batch_size=50)
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/6319#issuecomment-1833033973>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABDD3ZKKEKJVWBFH7QHLRJ3YG7ZUJAVCNFSM6AAAAAA6HDKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZTGAZTGOJXGM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
[
-0.5738915801048279,
0.08227013051509857,
0.013978973031044006,
0.1817040741443634,
0.16029150784015656,
0.1183599904179573,
0.19462908804416656,
0.38573363423347473,
-0.019563358277082443,
-0.21568922698497772,
-0.020148243755102158,
0.6655285358428955,
-0.05103825777769089,
-0.41035276651382446,
-0.33359411358833313,
0.10413282364606857,
0.24660587310791016,
0.13931146264076233,
0.3368476331233978,
0.0055098757147789,
-0.031553514301776886,
0.08391016721725464,
-0.2502424716949463,
0.02743334323167801,
-0.6058304309844971,
-0.21016588807106018,
-0.053840041160583496,
-0.09069336205720901,
-0.2325405776500702,
-0.466582328081131,
0.052539825439453125,
0.19705669581890106,
-0.2935437858104706,
0.7503532767295837,
-0.00011928153980989009,
-0.02283211424946785,
-0.05550406873226166,
0.26686230301856995,
0.08538937568664551,
0.057198673486709595,
-0.22860944271087646,
-0.15301424264907837,
-0.1252814382314682,
-0.025396764278411865,
0.26633015275001526,
-0.10886265337467194,
0.09439591318368912,
-0.3222413659095764,
0.40526312589645386,
0.11359122395515442,
0.08105058968067169,
0.20065055787563324,
-0.0383898951113224,
-0.02883019857108593,
0.12652438879013062,
-0.011478118598461151,
-0.1624358594417572,
0.27086225152015686,
0.33635038137435913,
-0.3326655924320221,
-0.2835450768470764,
-0.04015112668275833,
-0.3899010717868805,
-0.06414593756198883,
-0.15637126564979553,
-0.2488880306482315,
0.07549113035202026,
-0.5193042755126953,
0.3892093002796173,
0.3036591410636902,
0.09980697929859161,
-0.034951403737068176,
-0.03672684729099274,
-0.26679113507270813,
-0.3189493417739868,
-0.1540190577507019,
0.2642885744571686,
0.019629478454589844,
-0.13305912911891937,
0.25886669754981995,
-0.31722521781921387,
0.13266924023628235,
0.16430330276489258,
0.16840693354606628,
-0.04576463997364044,
0.34646737575531006,
0.11879436671733856,
0.28488367795944214,
0.16841669380664825,
0.01821901835501194,
-0.09805285930633545,
0.04977229982614517,
0.005572527647018433,
0.18373924493789673,
-0.4605357050895691,
-0.05088019743561745,
0.10604903101921082,
-0.35580602288246155,
0.24555906653404236,
-0.08524803072214127,
-0.24094878137111664,
0.2530752122402191,
-0.17989669740200043,
0.24386656284332275,
0.30435678362846375,
-0.036897022277116776,
-0.11751457303762436,
0.36065006256103516,
0.36461472511291504,
-0.3290826380252838,
-0.4163643419742584,
0.21546676754951477,
-0.1314421445131302,
-0.25976797938346863,
0.08034650981426239,
-0.05206306278705597,
-0.032637909054756165,
-0.05656811222434044,
-0.10317312180995941,
0.23369930684566498,
-0.46812349557876587,
0.15858964622020721,
0.10529666393995285,
0.2954384386539459,
-0.10851290822029114,
0.22075971961021423,
-0.13384968042373657,
-0.2618970274925232,
-0.1842489391565323,
-0.08483441919088364,
-0.00579276867210865,
-0.3523508608341217,
-0.2864120304584503,
0.07739068567752838,
-0.018775181844830513,
-0.0056643858551979065,
0.14701177179813385,
0.0870525911450386,
-0.1843133419752121,
-0.07021679729223251,
0.22660329937934875,
-0.38852402567863464,
0.28603750467300415,
0.08488906919956207,
-0.2997628450393677,
0.4777992367744446,
0.02710523083806038,
-0.04897577315568924,
-0.1221693903207779,
0.10252551734447479,
-0.32399868965148926,
-0.05408060923218727,
0.032970745116472244,
0.0369691476225853,
-0.07311379909515381,
0.05456249415874481,
-0.1491907238960266,
0.17314203083515167,
0.2636048197746277,
-0.02991120144724846,
0.06538008153438568,
-0.09236624836921692,
-0.26024290919303894,
-0.19771772623062134,
0.06351499259471893,
0.21473735570907593,
-0.28932198882102966,
-0.019039995968341827,
0.14142923057079315,
0.19986523687839508,
0.20726214349269867,
0.5030771493911743,
0.03896714374423027,
0.2763713598251343,
-0.3412018418312073,
0.1939803808927536,
0.14184816181659698,
0.25546902418136597,
-0.4926460087299347,
0.2539195716381073,
-0.11637458205223083,
-0.0329856276512146,
-0.41276925802230835,
-0.07516351342201233,
0.7361830472946167,
-0.0492229126393795,
0.4304574131965637,
0.16936999559402466,
-0.010420231148600578,
0.09380233287811279,
-0.2888219356536865,
-0.18072311580181122,
0.019685016945004463,
0.045010972768068314,
0.07853254675865173,
-0.16826745867729187,
-0.17572012543678284,
-0.15864813327789307,
0.1896330714225769,
0.1531127393245697,
0.07204637676477432,
0.26119428873062134,
0.2086062729358673,
-0.035014644265174866,
0.12395143508911133,
-0.23853370547294617,
-0.008764557540416718,
0.3937397003173828,
0.27066442370414734,
-0.14950421452522278,
-0.03743073344230652,
0.09219814836978912,
0.08194863051176071,
0.2484511286020279,
-0.1197163462638855,
0.10640133917331696,
-0.005492366850376129,
-0.16192105412483215,
-0.12776890397071838,
0.15433679521083832,
-0.18714208900928497,
-0.02717425860464573,
-0.010813957080245018,
0.13997845351696014,
0.27080830931663513,
0.13298945128917694,
-0.013202251866459846,
-0.19940023124217987,
-0.15645132958889008,
0.01886548101902008,
0.1869279444217682,
-0.13845320045948029,
-0.27739471197128296,
0.31001016497612,
0.21066737174987793,
0.06581498682498932,
-0.11161396652460098,
0.17449608445167542,
0.12290120869874954,
-0.10041932761669159,
-0.05698791891336441,
0.197280615568161,
-0.09613842517137527,
-0.26557523012161255,
0.061049215495586395,
0.10458418726921082,
0.05092913657426834,
0.39119794964790344,
-0.21728043258190155,
0.275787889957428,
0.11180320382118225,
0.02978607639670372,
-0.08104310929775238,
0.21830934286117554,
0.3721652925014496,
-0.1335349977016449,
0.3467072546482086,
0.17755889892578125,
0.09436218440532684,
0.08065113425254822,
0.6190302968025208,
0.05900522693991661,
0.026387643069028854,
0.17551571130752563,
-0.2375248670578003,
0.028999339789152145,
0.11260756105184555,
0.15676967799663544,
0.3079572916030884,
-0.03154170513153076,
0.13698117434978485,
-0.08690355718135834,
-0.10340715944766998,
-0.005858739838004112,
0.08462581783533096,
0.15291042625904083,
0.35314643383026123,
0.20296332240104675,
0.10372792184352875,
0.11300786584615707,
-0.3660772740840912,
-0.4338744282722473,
0.10470693558454514,
0.3959519565105438,
-0.09760721772909164,
0.09855064749717712,
-0.25042229890823364,
0.11587745696306229,
0.02821291610598564,
0.051494088023900986,
-0.23510122299194336,
-0.38477039337158203,
-0.1394907683134079,
-0.004532929509878159,
0.0602770633995533,
0.4017270803451538,
-0.05974398925900459,
-0.01833285391330719,
0.040868282318115234,
-0.07412830740213394,
-0.18612153828144073,
-0.3944248855113983,
-0.14059704542160034,
-0.0847541019320488,
0.4750818908214569,
-0.22104471921920776,
0.1920730322599411,
0.19344456493854523,
-0.3644302487373352,
-0.04145272076129913,
-0.30763721466064453,
0.028438588604331017,
-0.18673786520957947,
-0.08284333348274231,
0.2016323208808899,
0.4073903560638428,
-0.3579888939857483,
-0.0356033556163311,
0.32491615414619446,
-0.6396764516830444,
0.04264397174119949,
-0.1552204191684723,
-0.04231053963303566,
-0.2782319188117981,
0.028006065636873245,
0.0804421678185463,
-0.04750903695821762,
-0.32234159111976624,
0.48954278230667114,
-0.10689340531826019,
0.0004404336214065552,
0.1196221187710762,
0.3195411264896393,
0.19420024752616882,
0.03566384315490723,
-0.1511445790529251,
-0.12508173286914825,
-0.17153044044971466,
0.39436301589012146,
0.020300721749663353,
-0.11431735754013062,
0.03742986544966698,
0.011355672031641006,
0.12089240550994873,
0.1658066362142563,
-0.36563771963119507,
0.5242170691490173,
-0.35711032152175903,
0.18345293402671814,
0.0007229894399642944,
-0.06398078054189682,
0.23530294001102448,
0.09467659890651703,
0.00959053821861744,
0.02288765460252762,
-0.2475930005311966,
0.03178783506155014,
0.06803743541240692,
0.0834362730383873,
0.2127859890460968,
0.4387354850769043,
0.34698033332824707,
0.7067512273788452,
0.3156193792819977,
-0.08249373733997345,
0.005035966634750366,
0.06661631911993027,
0.11536401510238647,
-0.19508031010627747,
-0.43654778599739075,
0.05453091487288475,
-0.17162686586380005,
-0.32386457920074463,
0.040620096027851105,
0.09344859421253204,
-0.549301028251648,
0.0325360968708992,
-0.05367375165224075,
0.2056969404220581,
-0.2675971984863281,
0.25041964650154114,
-0.2930450737476349,
-0.003077171742916107,
0.0032697077840566635,
0.18865787982940674,
-0.2671791613101959,
-0.14729619026184082,
0.21010425686836243,
-0.18935315310955048,
0.09597666561603546,
-0.27266019582748413,
-0.7234363555908203,
0.4324914515018463,
-0.5312408804893494,
0.17594438791275024,
-0.08280181884765625,
0.4683894217014313,
-0.04185440391302109,
0.1756923794746399,
0.10576441884040833,
-0.1251790076494217,
0.6663769483566284,
-0.05348614603281021,
-0.11624293029308319,
0.17978700995445251,
0.10620161890983582,
-0.3642061650753021,
-0.061793938279151917,
0.16891224682331085,
0.5089846253395081,
0.5167471766471863,
0.20111629366874695,
-0.18459761142730713,
-0.2377331256866455,
-0.052195824682712555,
0.1114516407251358,
-0.04400302842259407,
-0.22658713161945343,
-0.05078604444861412,
0.0888248160481453,
-0.2883753478527069,
0.17572861909866333,
0.21324332058429718,
-0.25148746371269226,
0.18900880217552185,
-0.36568108201026917,
-0.11088758707046509,
-0.22179284691810608,
0.07054439932107925,
-0.019130762666463852,
0.22006353735923767,
-0.13141675293445587,
0.4307020306587219,
0.40029004216194153,
0.04570910334587097,
0.07609447836875916,
0.23993074893951416,
-0.14530880749225616,
-0.08913739025592804,
-0.003258846700191498,
0.03598059341311455,
0.4546355903148651,
0.5640870332717896,
-0.057121552526950836,
0.04088744521141052,
-0.13927963376045227,
0.30444130301475525,
-0.14671748876571655,
0.270567923784256,
0.3690304160118103,
0.17944785952568054,
-0.5853387713432312,
-0.3417264223098755,
0.1148855984210968,
0.39587411284446716,
-0.1963464766740799,
0.6613269448280334,
-0.3645397424697876,
-0.1385449767112732,
0.7611132264137268,
0.2353316843509674,
1.0305489301681519,
-0.35367780923843384,
0.06070950999855995,
-0.21746152639389038,
0.08609195053577423,
0.14737826585769653,
-0.5306864976882935,
0.03227180242538452,
-0.3623126447200775,
-0.2560822665691376,
-0.07028305530548096,
-0.12497641146183014,
0.04390762373805046,
0.2853047847747803,
-0.044221557676792145,
0.074590303003788,
0.1692056506872177,
0.478750079870224,
0.046716414391994476,
0.012509509921073914,
0.3558346927165985,
-0.3102731704711914,
-0.05548207461833954,
0.06182178854942322,
0.08916086703538895,
-0.040030885487794876,
0.08054675906896591,
-0.04340488091111183,
-0.13671664893627167,
0.018485363572835922,
-0.5084419846534729,
-0.13702154159545898,
-0.49841251969337463,
0.19852891564369202,
0.07187788188457489,
0.2918168902397156,
0.091606006026268,
0.059596896171569824,
-0.15332777798175812,
0.30413109064102173,
0.02364153042435646,
0.448747843503952,
0.31899672746658325,
0.008352991193532944,
0.4362015128135681,
-0.37364131212234497,
0.1248638704419136,
0.01936894655227661,
-0.014065325260162354,
0.10595758259296417,
-0.09163988381624222,
-0.4075671434402466,
-0.2495274841785431,
0.19724620878696442,
0.5153176188468933,
-0.024192962795495987,
-0.19590696692466736,
0.009609885513782501,
-0.1134527325630188,
-0.2063397765159607,
0.05404224619269371,
0.30598142743110657,
0.09423156827688217,
0.5416879057884216,
-0.25250810384750366,
-0.21043676137924194,
-0.06790351867675781,
0.39828234910964966,
-0.20579048991203308,
-0.04839833080768585,
0.2605081796646118,
0.17544104158878326,
-0.2221723347902298,
-0.10720837116241455,
0.27645066380500793,
0.03588131442666054,
-0.3662054240703583,
-0.0064888009801507,
-0.5936528444290161,
-0.03190968930721283,
0.06649354100227356,
-0.06844823062419891,
-0.008746717125177383,
-0.010235138237476349,
-0.10219913721084595,
-0.3927837014198303,
-0.43347427248954773,
-0.14515048265457153,
-0.06654638051986694,
0.23218320310115814,
-0.22902733087539673,
-0.20328903198242188,
-0.19897869229316711,
0.26796165108680725,
-0.16581830382347107,
0.161878764629364,
-0.1387014091014862,
-0.08062268048524857,
-0.11361022293567657,
-0.12712141871452332,
0.17332690954208374,
-0.2990853488445282,
-0.05098576843738556,
0.5119988322257996,
0.08528158068656921,
-0.09457773715257645,
-0.20772650837898254,
0.19685067236423492,
0.15876656770706177,
-0.3084698021411896,
0.12591366469860077,
-0.17154735326766968,
-0.0669349879026413,
-0.40984877943992615,
-0.2246929556131363,
0.09950675815343857,
-0.10759031772613525,
-0.19115610420703888,
0.31616026163101196,
-0.0037292763590812683,
-0.07325810194015503,
0.0749409943819046,
0.10113893449306488,
0.16781559586524963,
0.15418343245983124,
0.23318363726139069,
0.04948877543210983,
-0.08716043084859848,
-0.18153002858161926,
0.19920504093170166,
0.0642840564250946,
-0.09072031825780869,
0.599269449710846,
-0.390402615070343,
-0.1199825257062912,
0.31970810890197754,
0.4042355418205261,
0.6252769231796265,
-0.15387210249900818,
-0.29653429985046387,
0.45091280341148376,
0.06078415364027023,
0.06526688486337662,
-0.14136485755443573,
0.8041799664497375,
0.08881901949644089,
0.018874648958444595,
0.07264550030231476,
0.05081712082028389,
-0.17259585857391357,
-0.3495592474937439,
0.23220616579055786,
0.25144585967063904,
-0.2863078713417053,
0.10206808149814606,
0.11970026791095734,
0.1956949383020401,
0.02072279155254364,
0.1657748520374298,
0.09355377405881882,
0.3548784852027893,
0.3597099184989929,
0.1537691056728363,
0.1265815794467926,
0.32357847690582275,
0.2515345513820648,
0.22120410203933716,
-0.2576848864555359,
-0.01665811613202095,
0.393466591835022,
-0.18171778321266174,
0.17541947960853577,
0.08913349360227585,
0.24829131364822388,
-0.13478752970695496,
-0.5844733119010925,
-0.02094854973256588,
0.24653735756874084,
-0.2684185802936554,
-0.03795959800481796,
0.13226108253002167,
-0.08350645750761032,
-0.19524754583835602,
0.21744683384895325,
-0.08445312082767487,
-0.04793042689561844,
0.32200270891189575,
0.14786672592163086,
0.1463179588317871,
-0.2496538907289505,
-0.2696094214916229,
-0.1397394835948944,
0.4574494957923889,
-0.3125251829624176,
-0.007810210809111595,
-0.32601267099380493,
-0.15505488216876984,
-0.40610232949256897,
0.1418249011039734,
0.4145733118057251,
0.26975977420806885,
-0.3446071445941925,
0.1953904628753662,
-0.14464256167411804,
0.01845673657953739,
-0.02527473121881485,
0.507662296295166,
-0.18095523118972778,
-0.3754914104938507,
0.1614847630262375,
-0.06099876016378403,
-0.15900830924510956,
-0.28188392519950867,
0.10718288272619247,
0.4232200086116791,
0.2393752485513687,
-0.0012256577610969543,
0.009959958493709564,
-0.2681424915790558,
-0.05455666780471802,
-0.16236251592636108,
0.06215515732765198,
-0.31755706667900085,
0.4100925624370575,
-0.3623289167881012,
0.09874013066291809,
-0.21557281911373138,
0.0422816276550293,
-0.11461187899112701,
0.37864062190055847,
0.46894192695617676,
-0.006127193570137024,
-0.44872093200683594,
-0.17586608231067657,
-0.3617383539676666,
0.0768975093960762,
-0.3646140992641449,
0.16801896691322327,
0.031042354181408882,
-0.015147368423640728,
0.09475390613079071,
0.301832914352417,
0.051585033535957336,
0.03806217014789581,
0.0418594628572464,
0.47190359234809875,
-0.19349847733974457,
0.18463224172592163,
-0.07132132351398468,
0.016775529831647873,
0.055927760899066925,
-0.3771657943725586,
0.42786747217178345,
-0.2710844576358795,
-0.03375650942325592,
-0.05556647479534149,
-0.20955626666545868,
0.0035881102085113525,
-0.2699055075645447,
0.35127565264701843,
0.13066846132278442,
0.0408012792468071,
0.07284088432788849,
-0.10494529455900192,
-0.24234992265701294,
-0.03742246329784393,
-0.06676298379898071,
0.20133629441261292,
0.11651191115379333,
0.372235506772995,
-0.253378301858902,
-0.023649785667657852,
-0.22550155222415924,
-0.24611033499240875,
-0.11145906150341034,
-0.191339373588562,
-0.15734916925430298,
0.13178253173828125,
-0.07233836501836777,
0.4094781279563904,
-0.037879280745983124,
0.5018711090087891,
-0.05881616473197937,
0.2738252878189087,
-0.4176029562950134,
-0.14665073156356812,
0.3374287784099579,
-0.6067400574684143,
-0.3432121276855469,
-0.020582400262355804,
-0.11533913016319275,
0.35423487424850464,
0.1845213770866394,
-0.11764506250619888,
-0.33117350935935974,
0.24339190125465393,
-0.1269790530204773,
-0.6004998683929443,
0.01873045787215233,
0.09505815804004669,
0.10730060935020447,
-0.13713231682777405,
0.41002359986305237,
-0.014692623168230057,
-0.44037193059921265,
0.3859352171421051,
0.016580715775489807
] |
https://github.com/huggingface/datasets/issues/6317
|
sentiment140 dataset unavailable
|
We have opened an issue in the corresponding Hub dataset: https://huggingface.co/datasets/sentiment140/discussions/3
Let's continue the discussion there.
|
### Describe the bug
loading the dataset using load_dataset("sentiment140") returns the following error
ConnectionError: Couldn't reach http://cs.stanford.edu/people/alecmgo/trainingandtestdata.zip (error 403)
### Steps to reproduce the bug
Run the following code (version should not matter).
```
from datasets import load_dataset
data = load_dataset("sentiment140")
```
### Expected behavior
The dataset should be loaded just like any other.
The main issue is that it is no longer hosted by stanford. It is still available from a [Google Drive Link](https://docs.google.com/file/d/0B04GJPshIjmPRnZManQwWEdTZjg/edit).
### Environment info
- `datasets` version: 2.14.5
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.10.8
- Huggingface_hub version: 0.17.3
- PyArrow version: 13.0.0
- Pandas version: 2.1.1
| 16
|
sentiment140 dataset unavailable
### Describe the bug
loading the dataset using load_dataset("sentiment140") returns the following error
ConnectionError: Couldn't reach http://cs.stanford.edu/people/alecmgo/trainingandtestdata.zip (error 403)
### Steps to reproduce the bug
Run the following code (version should not matter).
```
from datasets import load_dataset
data = load_dataset("sentiment140")
```
### Expected behavior
The dataset should be loaded just like any other.
The main issue is that it is no longer hosted by stanford. It is still available from a [Google Drive Link](https://docs.google.com/file/d/0B04GJPshIjmPRnZManQwWEdTZjg/edit).
### Environment info
- `datasets` version: 2.14.5
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.10.8
- Huggingface_hub version: 0.17.3
- PyArrow version: 13.0.0
- Pandas version: 2.1.1
We have opened an issue in the corresponding Hub dataset: https://huggingface.co/datasets/sentiment140/discussions/3
Let's continue the discussion there.
|
[
-0.36286142468452454,
0.09124588966369629,
-0.06191832944750786,
0.33838099241256714,
0.03561168909072876,
0.05036896467208862,
0.032025910913944244,
0.3190338909626007,
0.07944399118423462,
0.15020957589149475,
-0.22294215857982635,
-0.07228591293096542,
0.09144505858421326,
0.263120174407959,
0.016931792721152306,
-0.09626057744026184,
-0.11660955101251602,
-0.04026980698108673,
0.1128750666975975,
0.0519215390086174,
-0.09575684368610382,
0.25895676016807556,
-0.2397778034210205,
-0.05664518475532532,
-0.22460059821605682,
-0.1060548797249794,
-0.10081494599580765,
-0.025393269956111908,
-0.12752342224121094,
-0.3272082507610321,
0.63336580991745,
-0.028667408972978592,
0.21052078902721405,
0.15239156782627106,
-0.0001143178524216637,
0.0558738112449646,
0.20515942573547363,
0.09546422958374023,
-0.1724686324596405,
-0.399506151676178,
0.05003280192613602,
-0.3708729147911072,
-0.014409784227609634,
0.09844688326120377,
-0.39852702617645264,
-0.08754761517047882,
0.007255466654896736,
-0.08997297286987305,
0.2662612497806549,
0.37891149520874023,
0.14715828001499176,
0.2955797016620636,
0.11335097253322601,
-0.3231077194213867,
-0.05274298042058945,
0.13614246249198914,
-0.0791497454047203,
0.2254452407360077,
0.17561158537864685,
-0.04185289889574051,
-0.052776746451854706,
0.10946938395500183,
0.11957758665084839,
-0.038761649280786514,
0.12366364151239395,
-0.09314113110303879,
0.028808031231164932,
-0.2419012486934662,
0.17121854424476624,
0.25182849168777466,
0.7748064994812012,
-0.0355922132730484,
-0.29651933908462524,
-0.15711238980293274,
0.1514202356338501,
-0.19659267365932465,
0.2875804007053375,
0.07144248485565186,
-0.07203155010938644,
0.25774097442626953,
-0.2716042995452881,
-0.1216195672750473,
-0.3403860330581665,
0.3256887197494507,
-0.2789047956466675,
0.24044132232666016,
-0.16354162991046906,
0.10617070645093918,
-0.2906876802444458,
0.04076937213540077,
0.3007707893848419,
0.051879771053791046,
0.07757381349802017,
0.1840512901544571,
-0.268176794052124,
-0.05348377674818039,
-0.016458332538604736,
0.4134507179260254,
0.03828013688325882,
0.37785500288009644,
0.007527577690780163,
0.045869555324316025,
-0.015045806765556335,
-0.12527495622634888,
0.3085324764251709,
0.18244031071662903,
0.02647741511464119,
-0.29633796215057373,
0.520727813243866,
0.26567980647087097,
0.016593147069215775,
0.03915634751319885,
0.015496714971959591,
-0.14236581325531006,
-0.20267850160598755,
-0.1744067370891571,
0.2784583568572998,
-0.2653997242450714,
-0.6386969089508057,
0.297567218542099,
-0.2858155369758606,
-0.09551685303449631,
0.04515836760401726,
0.4663532078266144,
-0.3622850179672241,
0.10476015508174896,
0.1904306262731552,
0.035255853086709976,
-0.06077946722507477,
-0.2941249907016754,
-0.24600960314273834,
-0.013410273939371109,
-0.2012375295162201,
-0.044671401381492615,
0.3453437089920044,
-0.041730016469955444,
0.4041614532470703,
0.05010055750608444,
0.17880859971046448,
-0.15370002388954163,
-0.0962359756231308,
-0.01603948511183262,
0.09862340241670609,
0.3241378962993622,
0.1703699827194214,
-0.00897318683564663,
0.2006106972694397,
0.07171142101287842,
0.09545107930898666,
-0.23349511623382568,
-0.2950599193572998,
-0.22790445387363434,
-0.025588272139430046,
0.14116595685482025,
-0.3779534697532654,
-0.0031422823667526245,
-0.32966184616088867,
0.09579052031040192,
-0.41012224555015564,
-0.0022348426282405853,
0.035236895084381104,
-0.115587517619133,
-0.029383257031440735,
-0.16523297131061554,
0.33803093433380127,
0.5197159647941589,
-0.2686431407928467,
-0.2298641800880432,
-0.02891068160533905,
-0.04325198754668236,
-0.0029405802488327026,
0.24445703625679016,
-0.3385242819786072,
0.2870137393474579,
-0.3189559280872345,
0.10944685339927673,
0.1538359671831131,
-0.3566739559173584,
-0.6594950556755066,
0.24387484788894653,
-0.36330974102020264,
0.2779729664325714,
-0.18319672346115112,
0.05953049287199974,
0.1465841382741928,
0.12192700058221817,
0.5414937734603882,
0.36248230934143066,
0.20207712054252625,
-0.30229389667510986,
-0.2006714940071106,
-0.17095613479614258,
-0.06574856489896774,
0.05493387207388878,
0.3360535502433777,
0.07096216827630997,
0.13097812235355377,
0.014805997721850872,
0.4777225852012634,
0.07258492708206177,
0.13542643189430237,
0.22375527024269104,
0.37870824337005615,
0.3582572937011719,
-0.09440800547599792,
-0.15173137187957764,
-0.18260854482650757,
0.2763824462890625,
-0.164616197347641,
0.17700912058353424,
0.052361052483320236,
-0.07368408888578415,
-0.32989728450775146,
0.0025123879313468933,
-0.13737577199935913,
-0.04507748410105705,
0.09782855212688446,
0.13258661329746246,
0.19913680851459503,
0.20951545238494873,
-0.1731402426958084,
0.5640650391578674,
-0.3345423638820648,
0.24296560883522034,
-0.2701079249382019,
0.6016668677330017,
0.039377618581056595,
-0.27259624004364014,
0.10592195391654968,
0.25609999895095825,
0.22480431199073792,
-0.12835609912872314,
0.05794264003634453,
0.2711743414402008,
-0.383675217628479,
0.19663652777671814,
0.15917421877384186,
0.022696509957313538,
0.36834290623664856,
-0.5663368701934814,
0.10538731515407562,
0.14383342862129211,
-0.04435813054442406,
0.22507238388061523,
0.139536514878273,
0.541987419128418,
0.20231865346431732,
-0.05825606733560562,
0.0524311289191246,
0.2646710276603699,
0.28868594765663147,
0.05339017137885094,
-0.16144949197769165,
-0.07364173978567123,
0.4065200686454773,
-0.39680251479148865,
0.2448403686285019,
-0.19295842945575714,
-0.171468585729599,
0.13141140341758728,
-0.10448645055294037,
-0.24227991700172424,
-0.009370729327201843,
0.08203370869159698,
-0.33689576387405396,
-0.2708425521850586,
0.17630252242088318,
0.10486488044261932,
0.3648110032081604,
0.10460247099399567,
-0.06307891011238098,
0.056055713444948196,
-0.22036506235599518,
-0.2464243471622467,
0.20323413610458374,
0.14545616507530212,
-0.005710285156965256,
0.036614514887332916,
0.24875429272651672,
0.10831962525844574,
-0.3465740978717804,
-0.0566386878490448,
-0.0169641375541687,
0.10333569347858429,
-0.29185986518859863,
-0.04194767028093338,
0.02128146030008793,
-0.08061622828245163,
0.01690874621272087,
0.006852103862911463,
-0.16772492229938507,
-0.2607538402080536,
-0.07239102572202682,
0.1663084775209427,
0.050538722425699234,
-0.09645628929138184,
-0.15523101389408112,
0.36990904808044434,
-0.15589909255504608,
-0.024513477459549904,
-0.03493975102901459,
0.09404158592224121,
-0.1969086229801178,
0.02791941538453102,
-0.12923282384872437,
0.06875720620155334,
0.19141826033592224,
-0.2293444573879242,
0.040543559938669205,
-0.5553827881813049,
-0.3984251916408539,
0.08156394958496094,
-0.166945219039917,
0.3672933876514435,
0.10661469399929047,
0.3412085175514221,
-0.054854631423950195,
-0.024866558611392975,
0.19164463877677917,
-0.38584741950035095,
0.07316183298826218,
0.003994638100266457,
-0.14013291895389557,
0.03320290520787239,
0.21039411425590515,
-0.4490760266780853,
-0.46729639172554016,
-0.13078677654266357,
0.2568439841270447,
0.027179043740034103,
-0.17569251358509064,
0.11273161321878433,
0.061340074986219406,
0.14862211048603058,
0.0944633036851883,
-0.1318066567182541,
-0.4224078357219696,
-0.38103288412094116,
0.2302827090024948,
-0.2814338505268097,
-0.4579941928386688,
0.20436686277389526,
0.23232458531856537,
0.3030546009540558,
-0.08058715611696243,
-0.6924928426742554,
0.12494521588087082,
-0.27786076068878174,
0.5235806107521057,
0.011526107788085938,
-0.19260530173778534,
0.297510027885437,
-0.18867067992687225,
-0.14727619290351868,
0.004971422255039215,
-0.15105848014354706,
-0.04993421584367752,
0.03566158562898636,
0.2897418439388275,
-0.07101098448038101,
0.043407075107097626,
0.08405642211437225,
0.5147777199745178,
0.24011185765266418,
0.08547104895114899,
0.37882447242736816,
0.060199886560440063,
0.4149758517742157,
-0.01886647194623947,
-0.23065561056137085,
0.11558698117733002,
-0.18785807490348816,
-0.09013151377439499,
0.25784486532211304,
0.17602351307868958,
-0.11992881447076797,
-0.3398069143295288,
-0.396027147769928,
-0.11210162192583084,
-0.2171134054660797,
-0.029998091980814934,
-0.032324016094207764,
0.22412723302841187,
0.13638214766979218,
0.09852351993322372,
-0.2886154353618622,
-0.3184501528739929,
0.18183614313602448,
0.1292249709367752,
0.2109144926071167,
0.05873221531510353,
-0.39387059211730957,
-0.14895230531692505,
-0.6528440117835999,
0.26776599884033203,
-0.10404494404792786,
0.35511091351509094,
-0.38724860548973083,
0.18227067589759827,
0.2110251784324646,
-0.0006719711236655712,
0.6153846383094788,
-0.24805758893489838,
0.3344179391860962,
-0.08055981993675232,
-0.01681724190711975,
-0.23945587873458862,
-0.06319692730903625,
-0.11475609242916107,
-0.0611879788339138,
0.29253309965133667,
0.809265673160553,
-0.023205384612083435,
-0.17365387082099915,
0.12595465779304504,
-0.0065570189617574215,
-0.2260376513004303,
-0.017026811838150024,
-0.08061680197715759,
-0.3175697326660156,
-0.028973354026675224,
0.014453917741775513,
0.2262413054704666,
0.3087998628616333,
-0.12976674735546112,
-0.14712302386760712,
0.039612554013729095,
0.004672087728977203,
0.22826538980007172,
-0.003899089992046356,
0.05288373678922653,
0.14617063105106354,
0.04651529714465141,
0.5153845548629761,
0.1554500013589859,
0.31028106808662415,
0.5204176902770996,
-0.06286919116973877,
-0.3297445774078369,
0.08955971151590347,
0.11134228110313416,
0.11349933594465256,
0.6291379928588867,
-0.10319198668003082,
0.05151702091097832,
0.08019939064979553,
0.02571047842502594,
-0.538642406463623,
0.1184629276394844,
0.2993905246257782,
0.057825036346912384,
-0.31660327315330505,
-0.3706819415092468,
0.5563946962356567,
0.06484934687614441,
-0.12746191024780273,
0.09010522812604904,
0.6486007571220398,
-0.2151532620191574,
0.24297568202018738,
0.048837292939424515,
0.8651018738746643,
-0.043509602546691895,
0.1301976591348648,
0.35481658577919006,
0.06326205283403397,
0.48710212111473083,
-0.32062816619873047,
0.17935216426849365,
0.1452552229166031,
-0.11330090463161469,
-0.14980213344097137,
-0.12856067717075348,
0.1457332819700241,
-0.11519844830036163,
0.1922876536846161,
0.23460756242275238,
-0.11274927109479904,
0.30354002118110657,
0.1875150203704834,
-0.025768516585230827,
-0.11798267811536789,
0.248271182179451,
-0.3823876678943634,
0.19255277514457703,
-0.10753834247589111,
0.5168449282646179,
-0.10154715180397034,
-0.07309786975383759,
-0.3221951425075531,
-0.1272963285446167,
-0.41773587465286255,
0.033706437796354294,
-0.14255815744400024,
0.007780773565173149,
-0.03704695776104927,
-0.3297867178916931,
0.176160991191864,
0.3931306302547455,
0.34928596019744873,
0.1316719949245453,
-0.5363703966140747,
0.2174316793680191,
-0.39092835783958435,
-0.14868150651454926,
0.20536388456821442,
0.06344352662563324,
0.3060579001903534,
-0.058654092252254486,
-0.3910312354564667,
0.4810396432876587,
-0.1515517681837082,
-0.25676143169403076,
-0.030528515577316284,
-0.01652374118566513,
-0.2524474263191223,
-0.3557566702365875,
0.05194953456521034,
-0.1888273060321808,
0.23513680696487427,
-0.33809220790863037,
0.0875038355588913,
0.014979109168052673,
-0.17854690551757812,
-0.19658783078193665,
0.28899651765823364,
-0.22397851943969727,
-0.20209205150604248,
0.4865429699420929,
-0.14465326070785522,
-0.2098851501941681,
0.3584566116333008,
0.3448319435119629,
-0.025712735950946808,
-0.1743623912334442,
-0.1537407785654068,
0.5323382019996643,
-0.427799254655838,
0.08550136536359787,
-0.037476636469364166,
0.12558375298976898,
-0.1730709671974182,
0.4757019281387329,
0.266445517539978,
-0.22534748911857605,
-0.13331404328346252,
-0.5041255950927734,
-0.14080996811389923,
0.2059278041124344,
0.09423389285802841,
0.0788751095533371,
0.17541271448135376,
0.03514549881219864,
0.008796876296401024,
-0.21824558079242706,
-0.28888803720474243,
0.1847904920578003,
-0.35853955149650574,
-0.08667166531085968,
-0.2846514582633972,
-0.16631463170051575,
0.194821298122406,
0.07565811276435852,
0.06855320185422897,
-0.15184062719345093,
-0.09030534327030182,
-0.07759518176317215,
-0.06600415706634521,
0.15644420683383942,
0.11050484329462051,
-0.14584483206272125,
-0.040126413106918335,
-0.28161126375198364,
0.06576555222272873,
-0.08364107459783554,
0.3215566873550415,
0.3597005009651184,
0.1607137769460678,
-0.1666201502084732,
-0.08255583047866821,
0.07678945362567902,
-0.07417482137680054,
0.16903573274612427,
0.08845415711402893,
0.15003299713134766,
0.020541517063975334,
0.09097704291343689,
-0.05460930988192558,
-0.0385369248688221,
-0.3148081600666046,
0.069623664021492,
0.09192091226577759,
0.2306174337863922,
0.38300830125808716,
-0.33349281549453735,
-0.1908031851053238,
0.26576462388038635,
0.2982211709022522,
0.01847168803215027,
-0.2108209729194641,
0.17272526025772095,
-0.030365798622369766,
0.17268811166286469,
-0.4489869177341461,
-0.20254191756248474,
-0.08886328339576721,
0.11531376838684082,
0.021278519183397293,
0.041458286345005035,
0.5167614817619324,
-0.20059597492218018,
-0.27090150117874146,
0.1615491807460785,
0.7338075041770935,
0.011953404173254967,
0.11205768585205078,
0.3908837139606476,
0.13436844944953918,
0.1292295604944229,
0.2804622948169708,
0.19726432859897614,
0.042636558413505554,
0.3130705952644348,
-0.1932125687599182,
0.2559964656829834,
-0.11314726620912552,
0.22946490347385406,
-0.016336791217327118,
-0.28656429052352905,
0.1518656313419342,
0.07990298420190811,
-0.26983538269996643,
-0.03419487923383713,
-0.19331151247024536,
0.3579634428024292,
-0.5477888584136963,
-0.09295323491096497,
-0.43297311663627625,
0.09427075833082199,
-0.292064368724823,
-0.03301507607102394,
-0.15847350656986237,
-0.4311518371105194,
0.11917096376419067,
0.06267154216766357,
-0.03542128577828407,
-0.32331961393356323,
0.08912833780050278,
-0.018764406442642212,
-0.2547428607940674,
-0.37523406744003296,
0.01500668190419674,
0.05388322100043297,
0.17965835332870483,
-0.1447295844554901,
0.23650258779525757,
-0.059239715337753296,
-0.2674615681171417,
0.019615838304162025,
0.2784712612628937,
0.3880670964717865,
-0.011010546237230301,
0.024265732616186142,
0.11791197210550308,
0.10166047513484955,
-0.13780109584331512,
-0.06991070508956909,
0.34831660985946655,
0.2687857747077942,
0.03437843918800354,
0.14518308639526367,
0.19420547783374786,
-0.12312914431095123,
0.16424472630023956,
0.06113282963633537,
0.6781326532363892,
-0.45323020219802856,
0.4703749716281891,
-0.463687539100647,
-0.18617597222328186,
-0.24339666962623596,
-0.18144148588180542,
-0.1979571282863617,
0.33704784512519836,
0.2550531029701233,
-0.07210074365139008,
0.1102060005068779,
-0.16155414283275604,
0.08202020078897476,
-0.2664050757884979,
0.22609476745128632,
0.4856904447078705,
-0.046909213066101074,
-0.38096559047698975,
-0.15312926471233368,
-0.4751111567020416,
0.2596355378627777,
-0.11306822299957275,
0.08587480336427689,
-0.06271002441644669,
0.0019191727042198181,
-0.012308143079280853,
-0.11804705858230591,
0.0008420646190643311,
-0.1446203738451004,
0.2457161545753479,
-0.04532570391893387,
-0.36955004930496216,
0.018230587244033813,
0.22411401569843292,
0.3635003864765167,
-0.0857475996017456,
0.017548829317092896,
0.2587461769580841,
0.009050297550857067,
-0.030924195423722267,
-0.12457436323165894,
-0.029058121144771576,
0.0015756972134113312,
-0.5395448207855225,
0.45353907346725464,
0.026482878252863884,
0.3071702718734741,
0.09757440537214279,
-0.07625260949134827,
-0.54099041223526,
-0.12549687922000885,
0.16977514326572418,
-0.027896925806999207,
-0.06354524195194244,
0.45305582880973816,
-0.013377700932323933,
0.04917256161570549,
-0.04236941784620285,
0.057308368384838104,
0.25025373697280884,
-0.009017234668135643,
-0.41637367010116577,
0.031147295609116554,
-0.4205540716648102,
0.03118644654750824,
0.22321587800979614,
0.20446360111236572,
-0.04726885259151459,
-0.10274654626846313,
0.015372678637504578,
-0.38602542877197266,
0.4715423882007599,
-0.8593254685401917,
-0.11861541867256165,
-0.13935139775276184,
0.3970184028148651,
0.271602988243103,
-0.1305287629365921,
-0.31175822019577026,
0.15766224265098572,
0.27557146549224854,
0.10298468917608261,
-0.30564644932746887,
0.1167241781949997,
-0.06693536043167114,
-0.00491691380739212,
0.0751878023147583,
0.29542669653892517,
0.12035410106182098,
-0.1312413513660431,
0.2398495078086853,
-0.07202685624361038
] |
https://github.com/huggingface/datasets/issues/6311
|
cast_column to Sequence with length=4 occur exception raise in datasets/table.py:2146
|
Thanks for reporting! We've spotted the bugs with the `array.values` handling and are fixing them in https://github.com/huggingface/datasets/pull/6283 (should be part of the next release).
|
### Describe the bug
i load a dataset from local csv file which has 187383612 examples, then use `map` to generate new columns for test.
here is my code :
```
import os
from datasets import load_dataset
from datasets.features import Sequence, Value
def add_new_path(example):
example["ais_bbox"] = [100,100,200,200]
example["ais_image_path"] = os.path.join("images", example["image_path"]) if example["image_path"] else ""
return example
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1749/")
hf_ds = ais_dataset.map(add_new_path, batched=False, num_proc=32)
ds = hf_ds.cast_column("ais_bbox", Sequence(Value("int32"), length=4))
```
and the `cast_column` raise an exception
```
Casting the dataset: 3%|███▉
...
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2110, in cast_column
return self.cast(features)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2055, in cast
dataset = dataset.map(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3097, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3474, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3353, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2329, in table_cast
return cast_table_to_schema(table, schema)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2145, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
list<item: int64>
to
Sequence(feature=Value(dtype='int32', id=None), length=4, id=None)
```
i check the source code and make debug info:
in datasets/table.py:2092
```
2091 if feature.length > -1:
2092 if feature.length * len(array) == len(array.values):
2093 return pa.FixedSizeListArray.from_arrays(_c(array.values, feature.feature), feature.length)
2094 print(len(array))
2095 print(len(array.values))
```
my feature.length is 4. but feature.length * len(array) == len(array.values) is false.
print(len(array)) is 262
print(len(array.values)) is 4000
then I use "for item in array" to print each item then get 262 * [100,100,200,200]
and use "for item in array.values" to print each item and get 4000 int32 which are 1000 * [100,100,200,200]
i'm wondering the `chunk` in each `array.chunks`, the "chunk.values" may get all the chunks's value rather than single chunk? but i check the pyarrow's doc seems chunk.values is chunk's value not all.
### Steps to reproduce the bug
code provided above.
### Expected behavior
feature.length * len(array) == len(array.values) should be true. and there should not has Exception.
### Environment info
python3.9
x86_64
datasets: 2.14.4
pyarrow: 13.0.0 or 10.0.0
| 24
|
cast_column to Sequence with length=4 occur exception raise in datasets/table.py:2146
### Describe the bug
i load a dataset from local csv file which has 187383612 examples, then use `map` to generate new columns for test.
here is my code :
```
import os
from datasets import load_dataset
from datasets.features import Sequence, Value
def add_new_path(example):
example["ais_bbox"] = [100,100,200,200]
example["ais_image_path"] = os.path.join("images", example["image_path"]) if example["image_path"] else ""
return example
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1749/")
hf_ds = ais_dataset.map(add_new_path, batched=False, num_proc=32)
ds = hf_ds.cast_column("ais_bbox", Sequence(Value("int32"), length=4))
```
and the `cast_column` raise an exception
```
Casting the dataset: 3%|███▉
...
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2110, in cast_column
return self.cast(features)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2055, in cast
dataset = dataset.map(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3097, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3474, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3353, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2329, in table_cast
return cast_table_to_schema(table, schema)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2145, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
list<item: int64>
to
Sequence(feature=Value(dtype='int32', id=None), length=4, id=None)
```
i check the source code and make debug info:
in datasets/table.py:2092
```
2091 if feature.length > -1:
2092 if feature.length * len(array) == len(array.values):
2093 return pa.FixedSizeListArray.from_arrays(_c(array.values, feature.feature), feature.length)
2094 print(len(array))
2095 print(len(array.values))
```
my feature.length is 4. but feature.length * len(array) == len(array.values) is false.
print(len(array)) is 262
print(len(array.values)) is 4000
then I use "for item in array" to print each item then get 262 * [100,100,200,200]
and use "for item in array.values" to print each item and get 4000 int32 which are 1000 * [100,100,200,200]
i'm wondering the `chunk` in each `array.chunks`, the "chunk.values" may get all the chunks's value rather than single chunk? but i check the pyarrow's doc seems chunk.values is chunk's value not all.
### Steps to reproduce the bug
code provided above.
### Expected behavior
feature.length * len(array) == len(array.values) should be true. and there should not has Exception.
### Environment info
python3.9
x86_64
datasets: 2.14.4
pyarrow: 13.0.0 or 10.0.0
Thanks for reporting! We've spotted the bugs with the `array.values` handling and are fixing them in https://github.com/huggingface/datasets/pull/6283 (should be part of the next release).
|
[
-0.2292919158935547,
-0.11489831656217575,
-0.023203877732157707,
0.2161572426557541,
0.52309250831604,
0.17112043499946594,
0.4404307007789612,
0.480095773935318,
0.3566000461578369,
0.00043483078479766846,
0.3617156744003296,
0.27310362458229065,
-0.14019718766212463,
-0.05468857288360596,
-0.15532317757606506,
-0.23779171705245972,
0.14036063849925995,
0.1790710687637329,
-0.12250201404094696,
0.17659012973308563,
-0.6017120480537415,
-0.022230247035622597,
-0.29264822602272034,
0.11850228905677795,
-0.03601841628551483,
-0.09288367629051208,
-0.17189349234104156,
-0.10042513161897659,
0.05457587540149689,
-0.4979938864707947,
0.06749030202627182,
-0.36459970474243164,
0.2019665688276291,
0.5927485227584839,
-0.00011433733743615448,
-0.055045776069164276,
0.25506672263145447,
0.06531652808189392,
0.04782604053616524,
0.0698883980512619,
-0.5054458379745483,
-0.1633991152048111,
-0.17036032676696777,
-0.49253442883491516,
0.00916757807135582,
-0.04321666061878204,
-0.3550854027271271,
-0.35526716709136963,
0.12257412075996399,
0.5797803997993469,
0.1884218156337738,
0.21055498719215393,
-0.1003338098526001,
-0.16828607022762299,
0.2906600534915924,
-0.06987905502319336,
-0.0866963267326355,
0.09136506915092468,
0.24263553321361542,
0.06502590328454971,
0.0788099616765976,
0.21785710752010345,
-0.16679170727729797,
0.04538532346487045,
-0.04330872744321823,
0.07806113362312317,
0.19012877345085144,
-0.10533633828163147,
0.11030721664428711,
0.16660231351852417,
0.3587820827960968,
-0.21757230162620544,
-0.2507912218570709,
-0.10257528722286224,
0.055873483419418335,
-0.2895868420600891,
0.10333371162414551,
0.034665465354919434,
0.023151129484176636,
0.1112583577632904,
-0.4519941210746765,
0.2900080978870392,
-0.1392362266778946,
0.15380467474460602,
-0.06919783353805542,
0.07946842163801193,
0.0370982363820076,
0.20616483688354492,
0.032072506844997406,
-0.26909470558166504,
0.10779011249542236,
-0.1677500456571579,
-0.025613021105527878,
0.20803262293338776,
-0.3950221836566925,
-0.1643475890159607,
0.11413770914077759,
0.07945238798856735,
0.12134378403425217,
-0.18909518420696259,
0.03032388910651207,
0.05066841095685959,
0.2587844431400299,
-0.025957711040973663,
-0.009968668222427368,
-0.007999163120985031,
-0.24855375289916992,
0.280760794878006,
0.1073274314403534,
0.25218889117240906,
-0.09001397341489792,
-0.05010686814785004,
0.18084874749183655,
-0.3330141603946686,
0.19541144371032715,
0.4226154386997223,
0.27505820989608765,
-0.006417777389287949,
-0.03369896858930588,
0.2199152559041977,
-0.04321657121181488,
0.07399819046258926,
0.21079866588115692,
0.40428000688552856,
0.0854763463139534,
0.045051075518131256,
0.07742418348789215,
0.19202427566051483,
-0.1069817990064621,
0.049819767475128174,
-0.23686780035495758,
0.23731034994125366,
-0.017547741532325745,
-0.1416601538658142,
-0.13741137087345123,
0.07704424113035202,
-0.01985801011323929,
0.04127337411046028,
-0.20109416544437408,
-0.05506819486618042,
0.006564037874341011,
-0.2948131859302521,
0.17541390657424927,
0.3642987310886383,
-0.26446980237960815,
0.09270896762609482,
0.08352959901094437,
-0.006006296724081039,
-0.12376347184181213,
0.26681703329086304,
-0.2503463625907898,
-0.3875173032283783,
-0.20235198736190796,
0.2267369031906128,
0.03169582411646843,
0.2374463975429535,
-0.09985264390707016,
-0.24266032874584198,
0.5225322842597961,
-0.26729005575180054,
0.36586794257164,
-0.3501460552215576,
-0.33019548654556274,
-0.28617939352989197,
0.04621906578540802,
0.44217538833618164,
-0.017094584181904793,
0.2633611261844635,
-0.2291376143693924,
0.15521752834320068,
0.06998120248317719,
0.2384219765663147,
-0.0021125199273228645,
0.208812415599823,
-0.44165486097335815,
0.22298036515712738,
0.514351487159729,
-0.1629798859357834,
-0.2935340702533722,
0.3101194202899933,
-0.3240569829940796,
-0.13690321147441864,
0.1706356555223465,
0.09749000519514084,
0.263433039188385,
-0.22971142828464508,
0.14393694698810577,
0.10867128521203995,
-0.2496565580368042,
0.28388968110084534,
-0.12440930306911469,
-0.12295100092887878,
0.14438551664352417,
-0.1892107129096985,
-0.09708361327648163,
0.09817223250865936,
0.2900688052177429,
-0.15073630213737488,
0.1416768878698349,
-0.28879424929618835,
0.08303703367710114,
0.2963504195213318,
0.15935078263282776,
-0.12146244943141937,
0.005884221289306879,
-0.15556961297988892,
-0.2694768011569977,
0.239542156457901,
0.3720287084579468,
-0.1266932487487793,
-0.3021007776260376,
-0.25541257858276367,
-0.3354111611843109,
0.29121455550193787,
-0.17743061482906342,
0.2745823264122009,
0.06319420039653778,
-0.06849570572376251,
0.22236588597297668,
-0.05709688365459442,
0.06703150272369385,
0.007765495218336582,
-0.3104984164237976,
-0.044801026582717896,
-0.32755419611930847,
0.20785368978977203,
-0.23246563971042633,
-0.153274804353714,
-0.11824993789196014,
0.20953574776649475,
0.24143028259277344,
-0.1765192449092865,
-0.11736830323934555,
0.3307511508464813,
0.08915802836418152,
0.09214234352111816,
-0.49597468972206116,
0.08496509492397308,
0.1037415936589241,
-0.3436177372932434,
0.028100239112973213,
0.1417067050933838,
0.25619304180145264,
-0.02711740881204605,
-0.15689221024513245,
0.3208720088005066,
-0.09006854891777039,
0.2439403235912323,
-0.036737456917762756,
-0.021541306748986244,
0.14709170162677765,
-0.07866206765174866,
0.20982949435710907,
-0.2362738698720932,
0.05694793909788132,
0.10777097940444946,
0.005729656666517258,
-0.03168860822916031,
-0.07585952430963516,
0.15863744914531708,
0.5668787956237793,
-0.07930339872837067,
0.11287043988704681,
0.26591476798057556,
0.12772440910339355,
-0.0009563229978084564,
0.14388972520828247,
0.2525887191295624,
0.5420507192611694,
0.14554819464683533,
0.05391010269522667,
0.03837268054485321,
-0.10785330832004547,
-0.08979377895593643,
0.15662354230880737,
0.14471057057380676,
0.050339225679636,
0.3169183135032654,
0.29274699091911316,
0.007316586561501026,
-0.06725248694419861,
-0.28030145168304443,
0.16769134998321533,
0.3199092745780945,
-0.4981814920902252,
0.12733425199985504,
-0.1428547501564026,
-0.062336646020412445,
-0.27760887145996094,
0.04565558582544327,
0.3051230311393738,
-0.28579461574554443,
-0.3146103024482727,
0.11909358203411102,
-0.24003617465496063,
0.24817036092281342,
-0.4054655432701111,
-0.2669481039047241,
0.3770153820514679,
-0.21413183212280273,
-0.08536501228809357,
-0.044359393417835236,
0.07167040556669235,
0.005333416163921356,
0.09867657721042633,
-0.05998455360531807,
0.277892529964447,
0.07493823021650314,
-0.03903821110725403,
-0.3241850733757019,
-0.38823339343070984,
-0.02278764545917511,
-0.14840833842754364,
-0.10947923362255096,
0.4319029748439789,
0.1980956494808197,
0.04447949677705765,
-0.2522137463092804,
0.23219376802444458,
-0.05485697090625763,
-0.0705394446849823,
0.47808295488357544,
0.03697765991091728,
0.07042091339826584,
-0.20229539275169373,
-0.35451120138168335,
-0.05537094920873642,
-0.41177135705947876,
0.01673971489071846,
0.0029614903032779694,
0.10031578689813614,
0.00288647273555398,
0.4022837281227112,
0.306816041469574,
0.2171047329902649,
-0.17178943753242493,
-0.12168919295072556,
0.328171044588089,
0.24345743656158447,
-0.06401768326759338,
-0.24227093160152435,
-0.07512453198432922,
-0.5806818008422852,
-0.14628636837005615,
0.23472775518894196,
-0.4040241837501526,
-0.22145803272724152,
-0.24602530896663666,
0.3231995105743408,
-0.08623369038105011,
-0.0277679655700922,
0.4781101942062378,
-0.01860596425831318,
-0.07854682952165604,
-0.20678025484085083,
-0.05744102969765663,
-0.005256399512290955,
0.20375362038612366,
-0.12911567091941833,
0.14995786547660828,
0.8351048827171326,
-0.027632899582386017,
0.08933659642934799,
0.23984935879707336,
-0.25405049324035645,
0.44250714778900146,
-0.3932557702064514,
0.09763975441455841,
-0.2537851333618164,
-0.16086456179618835,
-0.10394494980573654,
-0.021060258150100708,
-0.07964795082807541,
0.04729517176747322,
-0.12065400928258896,
-0.1643638014793396,
0.16702739894390106,
0.006507113575935364,
-0.10928548127412796,
-0.18626722693443298,
0.12627802789211273,
-0.15882720053195953,
0.2969192862510681,
-0.16427789628505707,
-0.06368013471364975,
-0.32136428356170654,
-0.04512612894177437,
0.039893101900815964,
-0.1930665522813797,
-0.06262444704771042,
-0.3104419410228729,
-0.3375839591026306,
-0.37143474817276,
-0.2986243963241577,
0.44351452589035034,
0.5915877819061279,
0.6055489182472229,
-0.024098001420497894,
-0.12014126032590866,
0.05199628695845604,
-0.28393661975860596,
0.848260223865509,
-0.5643451809883118,
0.0727338194847107,
0.13987092673778534,
0.21876657009124756,
-0.3186623156070709,
0.11023183166980743,
-0.006735827773809433,
0.007071363274008036,
-0.004786878824234009,
0.5303606986999512,
-0.03930458799004555,
0.06239459663629532,
0.5120469927787781,
0.4089621305465698,
-0.04802447184920311,
-0.08920030295848846,
-0.09926368296146393,
-0.4339066445827484,
-0.22811824083328247,
0.1886834055185318,
0.21737127006053925,
0.10342767089605331,
0.07699720561504364,
-0.2933277189731598,
-0.027758056297898293,
-0.18571674823760986,
-0.19632871448993683,
0.04382539913058281,
0.2553839385509491,
0.11993205547332764,
0.41530463099479675,
-0.21210888028144836,
-0.4198072850704193,
0.006894824095070362,
0.5965350270271301,
-0.36610323190689087,
-0.14497479796409607,
-0.045629359781742096,
-0.26337483525276184,
0.19565729796886444,
0.23498156666755676,
-0.07238750159740448,
0.11907882988452911,
-0.04062921553850174,
0.31206896901130676,
-0.30035120248794556,
-0.12298266589641571,
0.3931964635848999,
0.016125455498695374,
-0.3105051815509796,
-0.38868585228919983,
0.3532566726207733,
0.024454116821289062,
-0.11431299149990082,
0.11581771820783615,
0.16157415509223938,
-0.3584110736846924,
0.5608789324760437,
0.025489255785942078,
0.7237346172332764,
-0.09851515293121338,
-0.08624465763568878,
0.4808209240436554,
-0.13880155980587006,
0.4092831313610077,
0.2660045623779297,
-0.0071931276470422745,
-0.5069201588630676,
-0.3590472936630249,
-0.13096298277378082,
-0.17018526792526245,
0.17314770817756653,
0.14107084274291992,
-0.19820554554462433,
0.15885992348194122,
-0.25811946392059326,
0.34868499636650085,
-0.1284911036491394,
0.029428958892822266,
-0.03600424528121948,
-0.17727765440940857,
-0.31577613949775696,
0.1389245092868805,
0.12158519774675369,
-0.3496864438056946,
0.05336913466453552,
0.1731448918581009,
-0.009825058281421661,
-0.6655282378196716,
-0.15302279591560364,
0.06533470004796982,
0.0002974863164126873,
0.20461499691009521,
-0.06161854788661003,
-0.1819610893726349,
0.1303960084915161,
0.2055640071630478,
0.2274698168039322,
0.04112283140420914,
-0.0126784797757864,
0.048277027904987335,
0.3744538426399231,
0.18860283493995667,
0.20341965556144714,
-0.07963845133781433,
0.20177409052848816,
0.12382624298334122,
-0.11924009025096893,
0.109227254986763,
-0.20082931220531464,
-0.12851473689079285,
0.20312228798866272,
0.2883830964565277,
0.17036399245262146,
-0.373577743768692,
-0.4153997004032135,
-0.24990686774253845,
-0.007863914594054222,
-0.22196216881275177,
0.09940029680728912,
-0.26148760318756104,
-0.08028781414031982,
0.2765539884567261,
-0.26227572560310364,
-0.2347564548254013,
-0.1517157256603241,
0.4439071714878082,
-0.0005798935890197754,
0.24806010723114014,
0.41989779472351074,
0.281282901763916,
-0.1447446346282959,
-0.21312934160232544,
0.05572877079248428,
0.2531059980392456,
-0.7087972164154053,
-0.008557303808629513,
-0.2113022655248642,
-0.002305537462234497,
0.18896599113941193,
0.23429803550243378,
-0.009048178791999817,
-0.14256703853607178,
-0.057110078632831573,
-0.321877121925354,
-0.4657486379146576,
0.1881064772605896,
0.12097752094268799,
0.11424100399017334,
0.019785482436418533,
0.1655997484922409,
-0.20321820676326752,
-0.13091731071472168,
-0.2664720416069031,
0.08170730620622635,
-0.24727553129196167,
0.41713812947273254,
0.3054589629173279,
0.08089862763881683,
0.032187774777412415,
-0.1367304027080536,
0.17897655069828033,
0.3172721266746521,
-0.16328276693820953,
-0.20447686314582825,
-0.07514430582523346,
0.09489411115646362,
0.020178359001874924,
-0.12266231328248978,
-0.1639280915260315,
-0.32128775119781494,
-0.08347928524017334,
-0.2622206509113312,
0.05060698464512825,
0.10101256519556046,
-0.1502920389175415,
-0.10386095196008682,
0.25691741704940796,
-0.18093496561050415,
-0.01198926568031311,
0.2589695453643799,
-0.39710429310798645,
0.01854678988456726,
-0.11673616617918015,
0.3122935891151428,
-0.04824720323085785,
-0.0315326526761055,
-0.006308481562882662,
0.038905948400497437,
-0.10027505457401276,
-0.12614700198173523,
0.5141873359680176,
-0.09177327156066895,
0.08521352708339691,
0.28048941493034363,
0.25216779112815857,
-0.02609587460756302,
-0.446429580450058,
-0.19719433784484863,
0.053858496248722076,
0.20028215646743774,
-0.32313039898872375,
-0.23417234420776367,
0.10364347696304321,
-0.11791067570447922,
0.12456142902374268,
0.35611456632614136,
0.01890142634510994,
-0.23921842873096466,
0.044570546597242355,
0.21073469519615173,
0.5816618800163269,
-0.26109445095062256,
-0.033301763236522675,
0.6071076393127441,
-0.04962566867470741,
-0.07491114735603333,
0.1562720388174057,
0.19794991612434387,
0.4231134057044983,
0.30810046195983887,
0.022688474506139755,
-0.12030407786369324,
0.19396823644638062,
0.04261316731572151,
-0.19092440605163574,
-0.5539610385894775,
0.5139065980911255,
0.1723923683166504,
-0.14615848660469055,
-0.021199092268943787,
0.3571545481681824,
-0.013183146715164185,
-0.1681123524904251,
-0.04159296676516533,
-0.12619875371456146,
0.08895596116781235,
-0.09663943201303482,
0.024722803384065628,
0.16504260897636414,
0.12172629684209824,
-0.17644630372524261,
-0.2167065143585205,
-0.01513151079416275,
0.14301851391792297,
0.6012574434280396,
0.12547791004180908,
0.22881746292114258,
-0.01642012782394886,
-0.06100671738386154,
0.07741361856460571,
-0.04536599665880203,
-0.47074174880981445,
0.3198690712451935,
0.3416723608970642,
0.013816136866807938,
0.13934001326560974,
-0.02512705884873867,
0.542805016040802,
0.18721523880958557,
-0.02503719925880432,
0.06656379997730255,
0.07583598792552948,
-0.10376876592636108,
0.09295926988124847,
0.1268615424633026,
-0.1300223469734192,
0.3169969320297241,
0.20407718420028687,
0.15463465452194214,
-0.1504940539598465,
0.22378326952457428,
0.11448799073696136,
0.3509487509727478,
-0.20492562651634216,
0.47840240597724915,
-0.06889045983552933,
-0.4049164950847626,
-0.0538150891661644,
0.11732429265975952,
-0.25864458084106445,
0.28956276178359985,
0.30080366134643555,
-0.4495638608932495,
0.31683212518692017,
0.15405383706092834,
0.0719347670674324,
0.0012912657111883163,
0.19898420572280884,
0.1440204232931137,
-0.035518474876880646,
-0.3142017424106598,
-0.09087379276752472,
-0.46379971504211426,
-0.124521903693676,
-0.25648295879364014,
-0.011379295960068703,
0.24349771440029144,
-0.11427619308233261,
-0.020121313631534576,
-0.12764954566955566,
0.1630445420742035,
-0.17262721061706543,
-0.11571940034627914,
0.34214332699775696,
-0.017865080386400223,
-0.5266844034194946,
-0.02159912884235382,
-0.10978579521179199,
-0.11822069436311722,
-0.5985739231109619,
0.35050487518310547,
-0.13325102627277374,
0.10409889370203018,
-0.10524994134902954,
-0.06480905413627625,
-0.02178226225078106,
-0.3342931866645813,
0.23624005913734436,
0.19174620509147644,
0.4066137969493866,
-0.20216655731201172,
0.11565864831209183,
-0.15102532505989075,
-0.31231778860092163,
0.0028546182438731194,
0.42791125178337097,
0.017585618421435356,
0.4884948432445526,
-0.11321431398391724,
0.039407845586538315,
-0.12033974379301071,
-0.05290862172842026,
-0.010313533246517181,
0.09840349107980728,
-0.212485671043396,
0.48037999868392944,
-0.5130469799041748,
0.21608680486679077,
0.1373877376317978,
0.00970347598195076,
0.2349112629890442,
0.37298980355262756,
0.08563661575317383,
-0.7212563753128052,
0.5360860824584961,
-0.3975192606449127,
-0.259246826171875,
0.12980489432811737,
0.3594261407852173,
-0.16014066338539124,
-0.10496088117361069,
-0.4210330545902252,
0.005724020302295685,
0.4678092300891876,
-0.027640696614980698,
-0.30604615807533264,
0.12533007562160492,
-0.022934217005968094,
0.07178176939487457,
-0.011120250448584557,
0.2849685549736023,
-0.1236347034573555,
-0.19545766711235046,
0.20541268587112427,
-0.14836955070495605
] |
https://github.com/huggingface/datasets/issues/6311
|
cast_column to Sequence with length=4 occur exception raise in datasets/table.py:2146
|
> Thanks for reporting! We've spotted the bugs with the `array.values` handling and are fixing them in #6283 (should be part of the next release).
i encounter another exception while cast_column to type `Sequence(feature={"points": Array2D(shape=(-1, 2), dtype="int64"), "label": ClassLabel(num_classes=num_classes, names=names)})`
while my data like this: '{"points": [[0.6,0.6], [0.7,0.7], [0.8,0.8]], "label": "A1"}'
here is the backtrace info:
```
out = func(dataset, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2110, in cast_column
return self.cast(features)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2055, in cast
dataset = dataset.map(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3097, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3474, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3353, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2329, in table_cast
return cast_table_to_schema(table, schema)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2073, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2073, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2095, in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2144, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1967, in array_cast
return pa_type.wrap_array(array)
File "pyarrow/types.pxi", line 1369, in pyarrow.lib.BaseExtensionType.wrap_array
TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: double>>, got list<item: double>
```
and i print(array) in datasets/table.py:1967 indeed get 2D list. is that same issue in #6283 ?
besides this, hugging face datasets seems don't naturally support multi-labels which means `Sequence(ClassLabel)` illegal if data is ["label1", "label2"]. so i have to define a class derived from `ClassLabel`, like this:
```
class AisClassLabels(ClassLabel):
def encode_example(self, example_data):
if self.num_classes is None:
raise ValueError(
"Trying to use ClassLabel feature with undefined number of class. "
"Please set ClassLabel.names or num_classes."
)
if not isinstance(example_data, list):
example_data = [example_data]
for i in range(len(example_data)):
if isinstance(example_data[i], str):
example_data[i] = self.str2int(example_data[i])
if not -1 <= example_data[i] < self.num_classes:
raise ValueError(f"Class label {example_data:d} greater than configured num_classes {self.num_classes}")
return example_data
```
and it works well in my case. but is there any recommend way to implement multi-labels?
|
### Describe the bug
i load a dataset from local csv file which has 187383612 examples, then use `map` to generate new columns for test.
here is my code :
```
import os
from datasets import load_dataset
from datasets.features import Sequence, Value
def add_new_path(example):
example["ais_bbox"] = [100,100,200,200]
example["ais_image_path"] = os.path.join("images", example["image_path"]) if example["image_path"] else ""
return example
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1749/")
hf_ds = ais_dataset.map(add_new_path, batched=False, num_proc=32)
ds = hf_ds.cast_column("ais_bbox", Sequence(Value("int32"), length=4))
```
and the `cast_column` raise an exception
```
Casting the dataset: 3%|███▉
...
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2110, in cast_column
return self.cast(features)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2055, in cast
dataset = dataset.map(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3097, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3474, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3353, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2329, in table_cast
return cast_table_to_schema(table, schema)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2145, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
list<item: int64>
to
Sequence(feature=Value(dtype='int32', id=None), length=4, id=None)
```
i check the source code and make debug info:
in datasets/table.py:2092
```
2091 if feature.length > -1:
2092 if feature.length * len(array) == len(array.values):
2093 return pa.FixedSizeListArray.from_arrays(_c(array.values, feature.feature), feature.length)
2094 print(len(array))
2095 print(len(array.values))
```
my feature.length is 4. but feature.length * len(array) == len(array.values) is false.
print(len(array)) is 262
print(len(array.values)) is 4000
then I use "for item in array" to print each item then get 262 * [100,100,200,200]
and use "for item in array.values" to print each item and get 4000 int32 which are 1000 * [100,100,200,200]
i'm wondering the `chunk` in each `array.chunks`, the "chunk.values" may get all the chunks's value rather than single chunk? but i check the pyarrow's doc seems chunk.values is chunk's value not all.
### Steps to reproduce the bug
code provided above.
### Expected behavior
feature.length * len(array) == len(array.values) should be true. and there should not has Exception.
### Environment info
python3.9
x86_64
datasets: 2.14.4
pyarrow: 13.0.0 or 10.0.0
| 440
|
cast_column to Sequence with length=4 occur exception raise in datasets/table.py:2146
### Describe the bug
i load a dataset from local csv file which has 187383612 examples, then use `map` to generate new columns for test.
here is my code :
```
import os
from datasets import load_dataset
from datasets.features import Sequence, Value
def add_new_path(example):
example["ais_bbox"] = [100,100,200,200]
example["ais_image_path"] = os.path.join("images", example["image_path"]) if example["image_path"] else ""
return example
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1749/")
hf_ds = ais_dataset.map(add_new_path, batched=False, num_proc=32)
ds = hf_ds.cast_column("ais_bbox", Sequence(Value("int32"), length=4))
```
and the `cast_column` raise an exception
```
Casting the dataset: 3%|███▉
...
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2110, in cast_column
return self.cast(features)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2055, in cast
dataset = dataset.map(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3097, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3474, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3353, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2329, in table_cast
return cast_table_to_schema(table, schema)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2145, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
list<item: int64>
to
Sequence(feature=Value(dtype='int32', id=None), length=4, id=None)
```
i check the source code and make debug info:
in datasets/table.py:2092
```
2091 if feature.length > -1:
2092 if feature.length * len(array) == len(array.values):
2093 return pa.FixedSizeListArray.from_arrays(_c(array.values, feature.feature), feature.length)
2094 print(len(array))
2095 print(len(array.values))
```
my feature.length is 4. but feature.length * len(array) == len(array.values) is false.
print(len(array)) is 262
print(len(array.values)) is 4000
then I use "for item in array" to print each item then get 262 * [100,100,200,200]
and use "for item in array.values" to print each item and get 4000 int32 which are 1000 * [100,100,200,200]
i'm wondering the `chunk` in each `array.chunks`, the "chunk.values" may get all the chunks's value rather than single chunk? but i check the pyarrow's doc seems chunk.values is chunk's value not all.
### Steps to reproduce the bug
code provided above.
### Expected behavior
feature.length * len(array) == len(array.values) should be true. and there should not has Exception.
### Environment info
python3.9
x86_64
datasets: 2.14.4
pyarrow: 13.0.0 or 10.0.0
> Thanks for reporting! We've spotted the bugs with the `array.values` handling and are fixing them in #6283 (should be part of the next release).
i encounter another exception while cast_column to type `Sequence(feature={"points": Array2D(shape=(-1, 2), dtype="int64"), "label": ClassLabel(num_classes=num_classes, names=names)})`
while my data like this: '{"points": [[0.6,0.6], [0.7,0.7], [0.8,0.8]], "label": "A1"}'
here is the backtrace info:
```
out = func(dataset, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2110, in cast_column
return self.cast(features)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2055, in cast
dataset = dataset.map(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3097, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3474, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3353, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2329, in table_cast
return cast_table_to_schema(table, schema)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2073, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2073, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2095, in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2144, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1833, in wrapper
return func(array, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1967, in array_cast
return pa_type.wrap_array(array)
File "pyarrow/types.pxi", line 1369, in pyarrow.lib.BaseExtensionType.wrap_array
TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: double>>, got list<item: double>
```
and i print(array) in datasets/table.py:1967 indeed get 2D list. is that same issue in #6283 ?
besides this, hugging face datasets seems don't naturally support multi-labels which means `Sequence(ClassLabel)` illegal if data is ["label1", "label2"]. so i have to define a class derived from `ClassLabel`, like this:
```
class AisClassLabels(ClassLabel):
def encode_example(self, example_data):
if self.num_classes is None:
raise ValueError(
"Trying to use ClassLabel feature with undefined number of class. "
"Please set ClassLabel.names or num_classes."
)
if not isinstance(example_data, list):
example_data = [example_data]
for i in range(len(example_data)):
if isinstance(example_data[i], str):
example_data[i] = self.str2int(example_data[i])
if not -1 <= example_data[i] < self.num_classes:
raise ValueError(f"Class label {example_data:d} greater than configured num_classes {self.num_classes}")
return example_data
```
and it works well in my case. but is there any recommend way to implement multi-labels?
|
[
-0.2292919158935547,
-0.11489831656217575,
-0.023203877732157707,
0.2161572426557541,
0.52309250831604,
0.17112043499946594,
0.4404307007789612,
0.480095773935318,
0.3566000461578369,
0.00043483078479766846,
0.3617156744003296,
0.27310362458229065,
-0.14019718766212463,
-0.05468857288360596,
-0.15532317757606506,
-0.23779171705245972,
0.14036063849925995,
0.1790710687637329,
-0.12250201404094696,
0.17659012973308563,
-0.6017120480537415,
-0.022230247035622597,
-0.29264822602272034,
0.11850228905677795,
-0.03601841628551483,
-0.09288367629051208,
-0.17189349234104156,
-0.10042513161897659,
0.05457587540149689,
-0.4979938864707947,
0.06749030202627182,
-0.36459970474243164,
0.2019665688276291,
0.5927485227584839,
-0.00011433733743615448,
-0.055045776069164276,
0.25506672263145447,
0.06531652808189392,
0.04782604053616524,
0.0698883980512619,
-0.5054458379745483,
-0.1633991152048111,
-0.17036032676696777,
-0.49253442883491516,
0.00916757807135582,
-0.04321666061878204,
-0.3550854027271271,
-0.35526716709136963,
0.12257412075996399,
0.5797803997993469,
0.1884218156337738,
0.21055498719215393,
-0.1003338098526001,
-0.16828607022762299,
0.2906600534915924,
-0.06987905502319336,
-0.0866963267326355,
0.09136506915092468,
0.24263553321361542,
0.06502590328454971,
0.0788099616765976,
0.21785710752010345,
-0.16679170727729797,
0.04538532346487045,
-0.04330872744321823,
0.07806113362312317,
0.19012877345085144,
-0.10533633828163147,
0.11030721664428711,
0.16660231351852417,
0.3587820827960968,
-0.21757230162620544,
-0.2507912218570709,
-0.10257528722286224,
0.055873483419418335,
-0.2895868420600891,
0.10333371162414551,
0.034665465354919434,
0.023151129484176636,
0.1112583577632904,
-0.4519941210746765,
0.2900080978870392,
-0.1392362266778946,
0.15380467474460602,
-0.06919783353805542,
0.07946842163801193,
0.0370982363820076,
0.20616483688354492,
0.032072506844997406,
-0.26909470558166504,
0.10779011249542236,
-0.1677500456571579,
-0.025613021105527878,
0.20803262293338776,
-0.3950221836566925,
-0.1643475890159607,
0.11413770914077759,
0.07945238798856735,
0.12134378403425217,
-0.18909518420696259,
0.03032388910651207,
0.05066841095685959,
0.2587844431400299,
-0.025957711040973663,
-0.009968668222427368,
-0.007999163120985031,
-0.24855375289916992,
0.280760794878006,
0.1073274314403534,
0.25218889117240906,
-0.09001397341489792,
-0.05010686814785004,
0.18084874749183655,
-0.3330141603946686,
0.19541144371032715,
0.4226154386997223,
0.27505820989608765,
-0.006417777389287949,
-0.03369896858930588,
0.2199152559041977,
-0.04321657121181488,
0.07399819046258926,
0.21079866588115692,
0.40428000688552856,
0.0854763463139534,
0.045051075518131256,
0.07742418348789215,
0.19202427566051483,
-0.1069817990064621,
0.049819767475128174,
-0.23686780035495758,
0.23731034994125366,
-0.017547741532325745,
-0.1416601538658142,
-0.13741137087345123,
0.07704424113035202,
-0.01985801011323929,
0.04127337411046028,
-0.20109416544437408,
-0.05506819486618042,
0.006564037874341011,
-0.2948131859302521,
0.17541390657424927,
0.3642987310886383,
-0.26446980237960815,
0.09270896762609482,
0.08352959901094437,
-0.006006296724081039,
-0.12376347184181213,
0.26681703329086304,
-0.2503463625907898,
-0.3875173032283783,
-0.20235198736190796,
0.2267369031906128,
0.03169582411646843,
0.2374463975429535,
-0.09985264390707016,
-0.24266032874584198,
0.5225322842597961,
-0.26729005575180054,
0.36586794257164,
-0.3501460552215576,
-0.33019548654556274,
-0.28617939352989197,
0.04621906578540802,
0.44217538833618164,
-0.017094584181904793,
0.2633611261844635,
-0.2291376143693924,
0.15521752834320068,
0.06998120248317719,
0.2384219765663147,
-0.0021125199273228645,
0.208812415599823,
-0.44165486097335815,
0.22298036515712738,
0.514351487159729,
-0.1629798859357834,
-0.2935340702533722,
0.3101194202899933,
-0.3240569829940796,
-0.13690321147441864,
0.1706356555223465,
0.09749000519514084,
0.263433039188385,
-0.22971142828464508,
0.14393694698810577,
0.10867128521203995,
-0.2496565580368042,
0.28388968110084534,
-0.12440930306911469,
-0.12295100092887878,
0.14438551664352417,
-0.1892107129096985,
-0.09708361327648163,
0.09817223250865936,
0.2900688052177429,
-0.15073630213737488,
0.1416768878698349,
-0.28879424929618835,
0.08303703367710114,
0.2963504195213318,
0.15935078263282776,
-0.12146244943141937,
0.005884221289306879,
-0.15556961297988892,
-0.2694768011569977,
0.239542156457901,
0.3720287084579468,
-0.1266932487487793,
-0.3021007776260376,
-0.25541257858276367,
-0.3354111611843109,
0.29121455550193787,
-0.17743061482906342,
0.2745823264122009,
0.06319420039653778,
-0.06849570572376251,
0.22236588597297668,
-0.05709688365459442,
0.06703150272369385,
0.007765495218336582,
-0.3104984164237976,
-0.044801026582717896,
-0.32755419611930847,
0.20785368978977203,
-0.23246563971042633,
-0.153274804353714,
-0.11824993789196014,
0.20953574776649475,
0.24143028259277344,
-0.1765192449092865,
-0.11736830323934555,
0.3307511508464813,
0.08915802836418152,
0.09214234352111816,
-0.49597468972206116,
0.08496509492397308,
0.1037415936589241,
-0.3436177372932434,
0.028100239112973213,
0.1417067050933838,
0.25619304180145264,
-0.02711740881204605,
-0.15689221024513245,
0.3208720088005066,
-0.09006854891777039,
0.2439403235912323,
-0.036737456917762756,
-0.021541306748986244,
0.14709170162677765,
-0.07866206765174866,
0.20982949435710907,
-0.2362738698720932,
0.05694793909788132,
0.10777097940444946,
0.005729656666517258,
-0.03168860822916031,
-0.07585952430963516,
0.15863744914531708,
0.5668787956237793,
-0.07930339872837067,
0.11287043988704681,
0.26591476798057556,
0.12772440910339355,
-0.0009563229978084564,
0.14388972520828247,
0.2525887191295624,
0.5420507192611694,
0.14554819464683533,
0.05391010269522667,
0.03837268054485321,
-0.10785330832004547,
-0.08979377895593643,
0.15662354230880737,
0.14471057057380676,
0.050339225679636,
0.3169183135032654,
0.29274699091911316,
0.007316586561501026,
-0.06725248694419861,
-0.28030145168304443,
0.16769134998321533,
0.3199092745780945,
-0.4981814920902252,
0.12733425199985504,
-0.1428547501564026,
-0.062336646020412445,
-0.27760887145996094,
0.04565558582544327,
0.3051230311393738,
-0.28579461574554443,
-0.3146103024482727,
0.11909358203411102,
-0.24003617465496063,
0.24817036092281342,
-0.4054655432701111,
-0.2669481039047241,
0.3770153820514679,
-0.21413183212280273,
-0.08536501228809357,
-0.044359393417835236,
0.07167040556669235,
0.005333416163921356,
0.09867657721042633,
-0.05998455360531807,
0.277892529964447,
0.07493823021650314,
-0.03903821110725403,
-0.3241850733757019,
-0.38823339343070984,
-0.02278764545917511,
-0.14840833842754364,
-0.10947923362255096,
0.4319029748439789,
0.1980956494808197,
0.04447949677705765,
-0.2522137463092804,
0.23219376802444458,
-0.05485697090625763,
-0.0705394446849823,
0.47808295488357544,
0.03697765991091728,
0.07042091339826584,
-0.20229539275169373,
-0.35451120138168335,
-0.05537094920873642,
-0.41177135705947876,
0.01673971489071846,
0.0029614903032779694,
0.10031578689813614,
0.00288647273555398,
0.4022837281227112,
0.306816041469574,
0.2171047329902649,
-0.17178943753242493,
-0.12168919295072556,
0.328171044588089,
0.24345743656158447,
-0.06401768326759338,
-0.24227093160152435,
-0.07512453198432922,
-0.5806818008422852,
-0.14628636837005615,
0.23472775518894196,
-0.4040241837501526,
-0.22145803272724152,
-0.24602530896663666,
0.3231995105743408,
-0.08623369038105011,
-0.0277679655700922,
0.4781101942062378,
-0.01860596425831318,
-0.07854682952165604,
-0.20678025484085083,
-0.05744102969765663,
-0.005256399512290955,
0.20375362038612366,
-0.12911567091941833,
0.14995786547660828,
0.8351048827171326,
-0.027632899582386017,
0.08933659642934799,
0.23984935879707336,
-0.25405049324035645,
0.44250714778900146,
-0.3932557702064514,
0.09763975441455841,
-0.2537851333618164,
-0.16086456179618835,
-0.10394494980573654,
-0.021060258150100708,
-0.07964795082807541,
0.04729517176747322,
-0.12065400928258896,
-0.1643638014793396,
0.16702739894390106,
0.006507113575935364,
-0.10928548127412796,
-0.18626722693443298,
0.12627802789211273,
-0.15882720053195953,
0.2969192862510681,
-0.16427789628505707,
-0.06368013471364975,
-0.32136428356170654,
-0.04512612894177437,
0.039893101900815964,
-0.1930665522813797,
-0.06262444704771042,
-0.3104419410228729,
-0.3375839591026306,
-0.37143474817276,
-0.2986243963241577,
0.44351452589035034,
0.5915877819061279,
0.6055489182472229,
-0.024098001420497894,
-0.12014126032590866,
0.05199628695845604,
-0.28393661975860596,
0.848260223865509,
-0.5643451809883118,
0.0727338194847107,
0.13987092673778534,
0.21876657009124756,
-0.3186623156070709,
0.11023183166980743,
-0.006735827773809433,
0.007071363274008036,
-0.004786878824234009,
0.5303606986999512,
-0.03930458799004555,
0.06239459663629532,
0.5120469927787781,
0.4089621305465698,
-0.04802447184920311,
-0.08920030295848846,
-0.09926368296146393,
-0.4339066445827484,
-0.22811824083328247,
0.1886834055185318,
0.21737127006053925,
0.10342767089605331,
0.07699720561504364,
-0.2933277189731598,
-0.027758056297898293,
-0.18571674823760986,
-0.19632871448993683,
0.04382539913058281,
0.2553839385509491,
0.11993205547332764,
0.41530463099479675,
-0.21210888028144836,
-0.4198072850704193,
0.006894824095070362,
0.5965350270271301,
-0.36610323190689087,
-0.14497479796409607,
-0.045629359781742096,
-0.26337483525276184,
0.19565729796886444,
0.23498156666755676,
-0.07238750159740448,
0.11907882988452911,
-0.04062921553850174,
0.31206896901130676,
-0.30035120248794556,
-0.12298266589641571,
0.3931964635848999,
0.016125455498695374,
-0.3105051815509796,
-0.38868585228919983,
0.3532566726207733,
0.024454116821289062,
-0.11431299149990082,
0.11581771820783615,
0.16157415509223938,
-0.3584110736846924,
0.5608789324760437,
0.025489255785942078,
0.7237346172332764,
-0.09851515293121338,
-0.08624465763568878,
0.4808209240436554,
-0.13880155980587006,
0.4092831313610077,
0.2660045623779297,
-0.0071931276470422745,
-0.5069201588630676,
-0.3590472936630249,
-0.13096298277378082,
-0.17018526792526245,
0.17314770817756653,
0.14107084274291992,
-0.19820554554462433,
0.15885992348194122,
-0.25811946392059326,
0.34868499636650085,
-0.1284911036491394,
0.029428958892822266,
-0.03600424528121948,
-0.17727765440940857,
-0.31577613949775696,
0.1389245092868805,
0.12158519774675369,
-0.3496864438056946,
0.05336913466453552,
0.1731448918581009,
-0.009825058281421661,
-0.6655282378196716,
-0.15302279591560364,
0.06533470004796982,
0.0002974863164126873,
0.20461499691009521,
-0.06161854788661003,
-0.1819610893726349,
0.1303960084915161,
0.2055640071630478,
0.2274698168039322,
0.04112283140420914,
-0.0126784797757864,
0.048277027904987335,
0.3744538426399231,
0.18860283493995667,
0.20341965556144714,
-0.07963845133781433,
0.20177409052848816,
0.12382624298334122,
-0.11924009025096893,
0.109227254986763,
-0.20082931220531464,
-0.12851473689079285,
0.20312228798866272,
0.2883830964565277,
0.17036399245262146,
-0.373577743768692,
-0.4153997004032135,
-0.24990686774253845,
-0.007863914594054222,
-0.22196216881275177,
0.09940029680728912,
-0.26148760318756104,
-0.08028781414031982,
0.2765539884567261,
-0.26227572560310364,
-0.2347564548254013,
-0.1517157256603241,
0.4439071714878082,
-0.0005798935890197754,
0.24806010723114014,
0.41989779472351074,
0.281282901763916,
-0.1447446346282959,
-0.21312934160232544,
0.05572877079248428,
0.2531059980392456,
-0.7087972164154053,
-0.008557303808629513,
-0.2113022655248642,
-0.002305537462234497,
0.18896599113941193,
0.23429803550243378,
-0.009048178791999817,
-0.14256703853607178,
-0.057110078632831573,
-0.321877121925354,
-0.4657486379146576,
0.1881064772605896,
0.12097752094268799,
0.11424100399017334,
0.019785482436418533,
0.1655997484922409,
-0.20321820676326752,
-0.13091731071472168,
-0.2664720416069031,
0.08170730620622635,
-0.24727553129196167,
0.41713812947273254,
0.3054589629173279,
0.08089862763881683,
0.032187774777412415,
-0.1367304027080536,
0.17897655069828033,
0.3172721266746521,
-0.16328276693820953,
-0.20447686314582825,
-0.07514430582523346,
0.09489411115646362,
0.020178359001874924,
-0.12266231328248978,
-0.1639280915260315,
-0.32128775119781494,
-0.08347928524017334,
-0.2622206509113312,
0.05060698464512825,
0.10101256519556046,
-0.1502920389175415,
-0.10386095196008682,
0.25691741704940796,
-0.18093496561050415,
-0.01198926568031311,
0.2589695453643799,
-0.39710429310798645,
0.01854678988456726,
-0.11673616617918015,
0.3122935891151428,
-0.04824720323085785,
-0.0315326526761055,
-0.006308481562882662,
0.038905948400497437,
-0.10027505457401276,
-0.12614700198173523,
0.5141873359680176,
-0.09177327156066895,
0.08521352708339691,
0.28048941493034363,
0.25216779112815857,
-0.02609587460756302,
-0.446429580450058,
-0.19719433784484863,
0.053858496248722076,
0.20028215646743774,
-0.32313039898872375,
-0.23417234420776367,
0.10364347696304321,
-0.11791067570447922,
0.12456142902374268,
0.35611456632614136,
0.01890142634510994,
-0.23921842873096466,
0.044570546597242355,
0.21073469519615173,
0.5816618800163269,
-0.26109445095062256,
-0.033301763236522675,
0.6071076393127441,
-0.04962566867470741,
-0.07491114735603333,
0.1562720388174057,
0.19794991612434387,
0.4231134057044983,
0.30810046195983887,
0.022688474506139755,
-0.12030407786369324,
0.19396823644638062,
0.04261316731572151,
-0.19092440605163574,
-0.5539610385894775,
0.5139065980911255,
0.1723923683166504,
-0.14615848660469055,
-0.021199092268943787,
0.3571545481681824,
-0.013183146715164185,
-0.1681123524904251,
-0.04159296676516533,
-0.12619875371456146,
0.08895596116781235,
-0.09663943201303482,
0.024722803384065628,
0.16504260897636414,
0.12172629684209824,
-0.17644630372524261,
-0.2167065143585205,
-0.01513151079416275,
0.14301851391792297,
0.6012574434280396,
0.12547791004180908,
0.22881746292114258,
-0.01642012782394886,
-0.06100671738386154,
0.07741361856460571,
-0.04536599665880203,
-0.47074174880981445,
0.3198690712451935,
0.3416723608970642,
0.013816136866807938,
0.13934001326560974,
-0.02512705884873867,
0.542805016040802,
0.18721523880958557,
-0.02503719925880432,
0.06656379997730255,
0.07583598792552948,
-0.10376876592636108,
0.09295926988124847,
0.1268615424633026,
-0.1300223469734192,
0.3169969320297241,
0.20407718420028687,
0.15463465452194214,
-0.1504940539598465,
0.22378326952457428,
0.11448799073696136,
0.3509487509727478,
-0.20492562651634216,
0.47840240597724915,
-0.06889045983552933,
-0.4049164950847626,
-0.0538150891661644,
0.11732429265975952,
-0.25864458084106445,
0.28956276178359985,
0.30080366134643555,
-0.4495638608932495,
0.31683212518692017,
0.15405383706092834,
0.0719347670674324,
0.0012912657111883163,
0.19898420572280884,
0.1440204232931137,
-0.035518474876880646,
-0.3142017424106598,
-0.09087379276752472,
-0.46379971504211426,
-0.124521903693676,
-0.25648295879364014,
-0.011379295960068703,
0.24349771440029144,
-0.11427619308233261,
-0.020121313631534576,
-0.12764954566955566,
0.1630445420742035,
-0.17262721061706543,
-0.11571940034627914,
0.34214332699775696,
-0.017865080386400223,
-0.5266844034194946,
-0.02159912884235382,
-0.10978579521179199,
-0.11822069436311722,
-0.5985739231109619,
0.35050487518310547,
-0.13325102627277374,
0.10409889370203018,
-0.10524994134902954,
-0.06480905413627625,
-0.02178226225078106,
-0.3342931866645813,
0.23624005913734436,
0.19174620509147644,
0.4066137969493866,
-0.20216655731201172,
0.11565864831209183,
-0.15102532505989075,
-0.31231778860092163,
0.0028546182438731194,
0.42791125178337097,
0.017585618421435356,
0.4884948432445526,
-0.11321431398391724,
0.039407845586538315,
-0.12033974379301071,
-0.05290862172842026,
-0.010313533246517181,
0.09840349107980728,
-0.212485671043396,
0.48037999868392944,
-0.5130469799041748,
0.21608680486679077,
0.1373877376317978,
0.00970347598195076,
0.2349112629890442,
0.37298980355262756,
0.08563661575317383,
-0.7212563753128052,
0.5360860824584961,
-0.3975192606449127,
-0.259246826171875,
0.12980489432811737,
0.3594261407852173,
-0.16014066338539124,
-0.10496088117361069,
-0.4210330545902252,
0.005724020302295685,
0.4678092300891876,
-0.027640696614980698,
-0.30604615807533264,
0.12533007562160492,
-0.022934217005968094,
0.07178176939487457,
-0.011120250448584557,
0.2849685549736023,
-0.1236347034573555,
-0.19545766711235046,
0.20541268587112427,
-0.14836955070495605
] |
https://github.com/huggingface/datasets/issues/6311
|
cast_column to Sequence with length=4 occur exception raise in datasets/table.py:2146
|
`Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: double>>, got list<item: double>`
if i change `Array2D(shape=(-1, 2), dtype="int64")` to `Sequence(Value("int64"))` , every thing goes well. but my data is 2D int list
|
### Describe the bug
i load a dataset from local csv file which has 187383612 examples, then use `map` to generate new columns for test.
here is my code :
```
import os
from datasets import load_dataset
from datasets.features import Sequence, Value
def add_new_path(example):
example["ais_bbox"] = [100,100,200,200]
example["ais_image_path"] = os.path.join("images", example["image_path"]) if example["image_path"] else ""
return example
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1749/")
hf_ds = ais_dataset.map(add_new_path, batched=False, num_proc=32)
ds = hf_ds.cast_column("ais_bbox", Sequence(Value("int32"), length=4))
```
and the `cast_column` raise an exception
```
Casting the dataset: 3%|███▉
...
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2110, in cast_column
return self.cast(features)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2055, in cast
dataset = dataset.map(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3097, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3474, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3353, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2329, in table_cast
return cast_table_to_schema(table, schema)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2145, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
list<item: int64>
to
Sequence(feature=Value(dtype='int32', id=None), length=4, id=None)
```
i check the source code and make debug info:
in datasets/table.py:2092
```
2091 if feature.length > -1:
2092 if feature.length * len(array) == len(array.values):
2093 return pa.FixedSizeListArray.from_arrays(_c(array.values, feature.feature), feature.length)
2094 print(len(array))
2095 print(len(array.values))
```
my feature.length is 4. but feature.length * len(array) == len(array.values) is false.
print(len(array)) is 262
print(len(array.values)) is 4000
then I use "for item in array" to print each item then get 262 * [100,100,200,200]
and use "for item in array.values" to print each item and get 4000 int32 which are 1000 * [100,100,200,200]
i'm wondering the `chunk` in each `array.chunks`, the "chunk.values" may get all the chunks's value rather than single chunk? but i check the pyarrow's doc seems chunk.values is chunk's value not all.
### Steps to reproduce the bug
code provided above.
### Expected behavior
feature.length * len(array) == len(array.values) should be true. and there should not has Exception.
### Environment info
python3.9
x86_64
datasets: 2.14.4
pyarrow: 13.0.0 or 10.0.0
| 32
|
cast_column to Sequence with length=4 occur exception raise in datasets/table.py:2146
### Describe the bug
i load a dataset from local csv file which has 187383612 examples, then use `map` to generate new columns for test.
here is my code :
```
import os
from datasets import load_dataset
from datasets.features import Sequence, Value
def add_new_path(example):
example["ais_bbox"] = [100,100,200,200]
example["ais_image_path"] = os.path.join("images", example["image_path"]) if example["image_path"] else ""
return example
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1749/")
hf_ds = ais_dataset.map(add_new_path, batched=False, num_proc=32)
ds = hf_ds.cast_column("ais_bbox", Sequence(Value("int32"), length=4))
```
and the `cast_column` raise an exception
```
Casting the dataset: 3%|███▉
...
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2110, in cast_column
return self.cast(features)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2055, in cast
dataset = dataset.map(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3097, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3474, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3353, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2329, in table_cast
return cast_table_to_schema(table, schema)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2145, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
list<item: int64>
to
Sequence(feature=Value(dtype='int32', id=None), length=4, id=None)
```
i check the source code and make debug info:
in datasets/table.py:2092
```
2091 if feature.length > -1:
2092 if feature.length * len(array) == len(array.values):
2093 return pa.FixedSizeListArray.from_arrays(_c(array.values, feature.feature), feature.length)
2094 print(len(array))
2095 print(len(array.values))
```
my feature.length is 4. but feature.length * len(array) == len(array.values) is false.
print(len(array)) is 262
print(len(array.values)) is 4000
then I use "for item in array" to print each item then get 262 * [100,100,200,200]
and use "for item in array.values" to print each item and get 4000 int32 which are 1000 * [100,100,200,200]
i'm wondering the `chunk` in each `array.chunks`, the "chunk.values" may get all the chunks's value rather than single chunk? but i check the pyarrow's doc seems chunk.values is chunk's value not all.
### Steps to reproduce the bug
code provided above.
### Expected behavior
feature.length * len(array) == len(array.values) should be true. and there should not has Exception.
### Environment info
python3.9
x86_64
datasets: 2.14.4
pyarrow: 13.0.0 or 10.0.0
`Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: double>>, got list<item: double>`
if i change `Array2D(shape=(-1, 2), dtype="int64")` to `Sequence(Value("int64"))` , every thing goes well. but my data is 2D int list
|
[
-0.2292919158935547,
-0.11489831656217575,
-0.023203877732157707,
0.2161572426557541,
0.52309250831604,
0.17112043499946594,
0.4404307007789612,
0.480095773935318,
0.3566000461578369,
0.00043483078479766846,
0.3617156744003296,
0.27310362458229065,
-0.14019718766212463,
-0.05468857288360596,
-0.15532317757606506,
-0.23779171705245972,
0.14036063849925995,
0.1790710687637329,
-0.12250201404094696,
0.17659012973308563,
-0.6017120480537415,
-0.022230247035622597,
-0.29264822602272034,
0.11850228905677795,
-0.03601841628551483,
-0.09288367629051208,
-0.17189349234104156,
-0.10042513161897659,
0.05457587540149689,
-0.4979938864707947,
0.06749030202627182,
-0.36459970474243164,
0.2019665688276291,
0.5927485227584839,
-0.00011433733743615448,
-0.055045776069164276,
0.25506672263145447,
0.06531652808189392,
0.04782604053616524,
0.0698883980512619,
-0.5054458379745483,
-0.1633991152048111,
-0.17036032676696777,
-0.49253442883491516,
0.00916757807135582,
-0.04321666061878204,
-0.3550854027271271,
-0.35526716709136963,
0.12257412075996399,
0.5797803997993469,
0.1884218156337738,
0.21055498719215393,
-0.1003338098526001,
-0.16828607022762299,
0.2906600534915924,
-0.06987905502319336,
-0.0866963267326355,
0.09136506915092468,
0.24263553321361542,
0.06502590328454971,
0.0788099616765976,
0.21785710752010345,
-0.16679170727729797,
0.04538532346487045,
-0.04330872744321823,
0.07806113362312317,
0.19012877345085144,
-0.10533633828163147,
0.11030721664428711,
0.16660231351852417,
0.3587820827960968,
-0.21757230162620544,
-0.2507912218570709,
-0.10257528722286224,
0.055873483419418335,
-0.2895868420600891,
0.10333371162414551,
0.034665465354919434,
0.023151129484176636,
0.1112583577632904,
-0.4519941210746765,
0.2900080978870392,
-0.1392362266778946,
0.15380467474460602,
-0.06919783353805542,
0.07946842163801193,
0.0370982363820076,
0.20616483688354492,
0.032072506844997406,
-0.26909470558166504,
0.10779011249542236,
-0.1677500456571579,
-0.025613021105527878,
0.20803262293338776,
-0.3950221836566925,
-0.1643475890159607,
0.11413770914077759,
0.07945238798856735,
0.12134378403425217,
-0.18909518420696259,
0.03032388910651207,
0.05066841095685959,
0.2587844431400299,
-0.025957711040973663,
-0.009968668222427368,
-0.007999163120985031,
-0.24855375289916992,
0.280760794878006,
0.1073274314403534,
0.25218889117240906,
-0.09001397341489792,
-0.05010686814785004,
0.18084874749183655,
-0.3330141603946686,
0.19541144371032715,
0.4226154386997223,
0.27505820989608765,
-0.006417777389287949,
-0.03369896858930588,
0.2199152559041977,
-0.04321657121181488,
0.07399819046258926,
0.21079866588115692,
0.40428000688552856,
0.0854763463139534,
0.045051075518131256,
0.07742418348789215,
0.19202427566051483,
-0.1069817990064621,
0.049819767475128174,
-0.23686780035495758,
0.23731034994125366,
-0.017547741532325745,
-0.1416601538658142,
-0.13741137087345123,
0.07704424113035202,
-0.01985801011323929,
0.04127337411046028,
-0.20109416544437408,
-0.05506819486618042,
0.006564037874341011,
-0.2948131859302521,
0.17541390657424927,
0.3642987310886383,
-0.26446980237960815,
0.09270896762609482,
0.08352959901094437,
-0.006006296724081039,
-0.12376347184181213,
0.26681703329086304,
-0.2503463625907898,
-0.3875173032283783,
-0.20235198736190796,
0.2267369031906128,
0.03169582411646843,
0.2374463975429535,
-0.09985264390707016,
-0.24266032874584198,
0.5225322842597961,
-0.26729005575180054,
0.36586794257164,
-0.3501460552215576,
-0.33019548654556274,
-0.28617939352989197,
0.04621906578540802,
0.44217538833618164,
-0.017094584181904793,
0.2633611261844635,
-0.2291376143693924,
0.15521752834320068,
0.06998120248317719,
0.2384219765663147,
-0.0021125199273228645,
0.208812415599823,
-0.44165486097335815,
0.22298036515712738,
0.514351487159729,
-0.1629798859357834,
-0.2935340702533722,
0.3101194202899933,
-0.3240569829940796,
-0.13690321147441864,
0.1706356555223465,
0.09749000519514084,
0.263433039188385,
-0.22971142828464508,
0.14393694698810577,
0.10867128521203995,
-0.2496565580368042,
0.28388968110084534,
-0.12440930306911469,
-0.12295100092887878,
0.14438551664352417,
-0.1892107129096985,
-0.09708361327648163,
0.09817223250865936,
0.2900688052177429,
-0.15073630213737488,
0.1416768878698349,
-0.28879424929618835,
0.08303703367710114,
0.2963504195213318,
0.15935078263282776,
-0.12146244943141937,
0.005884221289306879,
-0.15556961297988892,
-0.2694768011569977,
0.239542156457901,
0.3720287084579468,
-0.1266932487487793,
-0.3021007776260376,
-0.25541257858276367,
-0.3354111611843109,
0.29121455550193787,
-0.17743061482906342,
0.2745823264122009,
0.06319420039653778,
-0.06849570572376251,
0.22236588597297668,
-0.05709688365459442,
0.06703150272369385,
0.007765495218336582,
-0.3104984164237976,
-0.044801026582717896,
-0.32755419611930847,
0.20785368978977203,
-0.23246563971042633,
-0.153274804353714,
-0.11824993789196014,
0.20953574776649475,
0.24143028259277344,
-0.1765192449092865,
-0.11736830323934555,
0.3307511508464813,
0.08915802836418152,
0.09214234352111816,
-0.49597468972206116,
0.08496509492397308,
0.1037415936589241,
-0.3436177372932434,
0.028100239112973213,
0.1417067050933838,
0.25619304180145264,
-0.02711740881204605,
-0.15689221024513245,
0.3208720088005066,
-0.09006854891777039,
0.2439403235912323,
-0.036737456917762756,
-0.021541306748986244,
0.14709170162677765,
-0.07866206765174866,
0.20982949435710907,
-0.2362738698720932,
0.05694793909788132,
0.10777097940444946,
0.005729656666517258,
-0.03168860822916031,
-0.07585952430963516,
0.15863744914531708,
0.5668787956237793,
-0.07930339872837067,
0.11287043988704681,
0.26591476798057556,
0.12772440910339355,
-0.0009563229978084564,
0.14388972520828247,
0.2525887191295624,
0.5420507192611694,
0.14554819464683533,
0.05391010269522667,
0.03837268054485321,
-0.10785330832004547,
-0.08979377895593643,
0.15662354230880737,
0.14471057057380676,
0.050339225679636,
0.3169183135032654,
0.29274699091911316,
0.007316586561501026,
-0.06725248694419861,
-0.28030145168304443,
0.16769134998321533,
0.3199092745780945,
-0.4981814920902252,
0.12733425199985504,
-0.1428547501564026,
-0.062336646020412445,
-0.27760887145996094,
0.04565558582544327,
0.3051230311393738,
-0.28579461574554443,
-0.3146103024482727,
0.11909358203411102,
-0.24003617465496063,
0.24817036092281342,
-0.4054655432701111,
-0.2669481039047241,
0.3770153820514679,
-0.21413183212280273,
-0.08536501228809357,
-0.044359393417835236,
0.07167040556669235,
0.005333416163921356,
0.09867657721042633,
-0.05998455360531807,
0.277892529964447,
0.07493823021650314,
-0.03903821110725403,
-0.3241850733757019,
-0.38823339343070984,
-0.02278764545917511,
-0.14840833842754364,
-0.10947923362255096,
0.4319029748439789,
0.1980956494808197,
0.04447949677705765,
-0.2522137463092804,
0.23219376802444458,
-0.05485697090625763,
-0.0705394446849823,
0.47808295488357544,
0.03697765991091728,
0.07042091339826584,
-0.20229539275169373,
-0.35451120138168335,
-0.05537094920873642,
-0.41177135705947876,
0.01673971489071846,
0.0029614903032779694,
0.10031578689813614,
0.00288647273555398,
0.4022837281227112,
0.306816041469574,
0.2171047329902649,
-0.17178943753242493,
-0.12168919295072556,
0.328171044588089,
0.24345743656158447,
-0.06401768326759338,
-0.24227093160152435,
-0.07512453198432922,
-0.5806818008422852,
-0.14628636837005615,
0.23472775518894196,
-0.4040241837501526,
-0.22145803272724152,
-0.24602530896663666,
0.3231995105743408,
-0.08623369038105011,
-0.0277679655700922,
0.4781101942062378,
-0.01860596425831318,
-0.07854682952165604,
-0.20678025484085083,
-0.05744102969765663,
-0.005256399512290955,
0.20375362038612366,
-0.12911567091941833,
0.14995786547660828,
0.8351048827171326,
-0.027632899582386017,
0.08933659642934799,
0.23984935879707336,
-0.25405049324035645,
0.44250714778900146,
-0.3932557702064514,
0.09763975441455841,
-0.2537851333618164,
-0.16086456179618835,
-0.10394494980573654,
-0.021060258150100708,
-0.07964795082807541,
0.04729517176747322,
-0.12065400928258896,
-0.1643638014793396,
0.16702739894390106,
0.006507113575935364,
-0.10928548127412796,
-0.18626722693443298,
0.12627802789211273,
-0.15882720053195953,
0.2969192862510681,
-0.16427789628505707,
-0.06368013471364975,
-0.32136428356170654,
-0.04512612894177437,
0.039893101900815964,
-0.1930665522813797,
-0.06262444704771042,
-0.3104419410228729,
-0.3375839591026306,
-0.37143474817276,
-0.2986243963241577,
0.44351452589035034,
0.5915877819061279,
0.6055489182472229,
-0.024098001420497894,
-0.12014126032590866,
0.05199628695845604,
-0.28393661975860596,
0.848260223865509,
-0.5643451809883118,
0.0727338194847107,
0.13987092673778534,
0.21876657009124756,
-0.3186623156070709,
0.11023183166980743,
-0.006735827773809433,
0.007071363274008036,
-0.004786878824234009,
0.5303606986999512,
-0.03930458799004555,
0.06239459663629532,
0.5120469927787781,
0.4089621305465698,
-0.04802447184920311,
-0.08920030295848846,
-0.09926368296146393,
-0.4339066445827484,
-0.22811824083328247,
0.1886834055185318,
0.21737127006053925,
0.10342767089605331,
0.07699720561504364,
-0.2933277189731598,
-0.027758056297898293,
-0.18571674823760986,
-0.19632871448993683,
0.04382539913058281,
0.2553839385509491,
0.11993205547332764,
0.41530463099479675,
-0.21210888028144836,
-0.4198072850704193,
0.006894824095070362,
0.5965350270271301,
-0.36610323190689087,
-0.14497479796409607,
-0.045629359781742096,
-0.26337483525276184,
0.19565729796886444,
0.23498156666755676,
-0.07238750159740448,
0.11907882988452911,
-0.04062921553850174,
0.31206896901130676,
-0.30035120248794556,
-0.12298266589641571,
0.3931964635848999,
0.016125455498695374,
-0.3105051815509796,
-0.38868585228919983,
0.3532566726207733,
0.024454116821289062,
-0.11431299149990082,
0.11581771820783615,
0.16157415509223938,
-0.3584110736846924,
0.5608789324760437,
0.025489255785942078,
0.7237346172332764,
-0.09851515293121338,
-0.08624465763568878,
0.4808209240436554,
-0.13880155980587006,
0.4092831313610077,
0.2660045623779297,
-0.0071931276470422745,
-0.5069201588630676,
-0.3590472936630249,
-0.13096298277378082,
-0.17018526792526245,
0.17314770817756653,
0.14107084274291992,
-0.19820554554462433,
0.15885992348194122,
-0.25811946392059326,
0.34868499636650085,
-0.1284911036491394,
0.029428958892822266,
-0.03600424528121948,
-0.17727765440940857,
-0.31577613949775696,
0.1389245092868805,
0.12158519774675369,
-0.3496864438056946,
0.05336913466453552,
0.1731448918581009,
-0.009825058281421661,
-0.6655282378196716,
-0.15302279591560364,
0.06533470004796982,
0.0002974863164126873,
0.20461499691009521,
-0.06161854788661003,
-0.1819610893726349,
0.1303960084915161,
0.2055640071630478,
0.2274698168039322,
0.04112283140420914,
-0.0126784797757864,
0.048277027904987335,
0.3744538426399231,
0.18860283493995667,
0.20341965556144714,
-0.07963845133781433,
0.20177409052848816,
0.12382624298334122,
-0.11924009025096893,
0.109227254986763,
-0.20082931220531464,
-0.12851473689079285,
0.20312228798866272,
0.2883830964565277,
0.17036399245262146,
-0.373577743768692,
-0.4153997004032135,
-0.24990686774253845,
-0.007863914594054222,
-0.22196216881275177,
0.09940029680728912,
-0.26148760318756104,
-0.08028781414031982,
0.2765539884567261,
-0.26227572560310364,
-0.2347564548254013,
-0.1517157256603241,
0.4439071714878082,
-0.0005798935890197754,
0.24806010723114014,
0.41989779472351074,
0.281282901763916,
-0.1447446346282959,
-0.21312934160232544,
0.05572877079248428,
0.2531059980392456,
-0.7087972164154053,
-0.008557303808629513,
-0.2113022655248642,
-0.002305537462234497,
0.18896599113941193,
0.23429803550243378,
-0.009048178791999817,
-0.14256703853607178,
-0.057110078632831573,
-0.321877121925354,
-0.4657486379146576,
0.1881064772605896,
0.12097752094268799,
0.11424100399017334,
0.019785482436418533,
0.1655997484922409,
-0.20321820676326752,
-0.13091731071472168,
-0.2664720416069031,
0.08170730620622635,
-0.24727553129196167,
0.41713812947273254,
0.3054589629173279,
0.08089862763881683,
0.032187774777412415,
-0.1367304027080536,
0.17897655069828033,
0.3172721266746521,
-0.16328276693820953,
-0.20447686314582825,
-0.07514430582523346,
0.09489411115646362,
0.020178359001874924,
-0.12266231328248978,
-0.1639280915260315,
-0.32128775119781494,
-0.08347928524017334,
-0.2622206509113312,
0.05060698464512825,
0.10101256519556046,
-0.1502920389175415,
-0.10386095196008682,
0.25691741704940796,
-0.18093496561050415,
-0.01198926568031311,
0.2589695453643799,
-0.39710429310798645,
0.01854678988456726,
-0.11673616617918015,
0.3122935891151428,
-0.04824720323085785,
-0.0315326526761055,
-0.006308481562882662,
0.038905948400497437,
-0.10027505457401276,
-0.12614700198173523,
0.5141873359680176,
-0.09177327156066895,
0.08521352708339691,
0.28048941493034363,
0.25216779112815857,
-0.02609587460756302,
-0.446429580450058,
-0.19719433784484863,
0.053858496248722076,
0.20028215646743774,
-0.32313039898872375,
-0.23417234420776367,
0.10364347696304321,
-0.11791067570447922,
0.12456142902374268,
0.35611456632614136,
0.01890142634510994,
-0.23921842873096466,
0.044570546597242355,
0.21073469519615173,
0.5816618800163269,
-0.26109445095062256,
-0.033301763236522675,
0.6071076393127441,
-0.04962566867470741,
-0.07491114735603333,
0.1562720388174057,
0.19794991612434387,
0.4231134057044983,
0.30810046195983887,
0.022688474506139755,
-0.12030407786369324,
0.19396823644638062,
0.04261316731572151,
-0.19092440605163574,
-0.5539610385894775,
0.5139065980911255,
0.1723923683166504,
-0.14615848660469055,
-0.021199092268943787,
0.3571545481681824,
-0.013183146715164185,
-0.1681123524904251,
-0.04159296676516533,
-0.12619875371456146,
0.08895596116781235,
-0.09663943201303482,
0.024722803384065628,
0.16504260897636414,
0.12172629684209824,
-0.17644630372524261,
-0.2167065143585205,
-0.01513151079416275,
0.14301851391792297,
0.6012574434280396,
0.12547791004180908,
0.22881746292114258,
-0.01642012782394886,
-0.06100671738386154,
0.07741361856460571,
-0.04536599665880203,
-0.47074174880981445,
0.3198690712451935,
0.3416723608970642,
0.013816136866807938,
0.13934001326560974,
-0.02512705884873867,
0.542805016040802,
0.18721523880958557,
-0.02503719925880432,
0.06656379997730255,
0.07583598792552948,
-0.10376876592636108,
0.09295926988124847,
0.1268615424633026,
-0.1300223469734192,
0.3169969320297241,
0.20407718420028687,
0.15463465452194214,
-0.1504940539598465,
0.22378326952457428,
0.11448799073696136,
0.3509487509727478,
-0.20492562651634216,
0.47840240597724915,
-0.06889045983552933,
-0.4049164950847626,
-0.0538150891661644,
0.11732429265975952,
-0.25864458084106445,
0.28956276178359985,
0.30080366134643555,
-0.4495638608932495,
0.31683212518692017,
0.15405383706092834,
0.0719347670674324,
0.0012912657111883163,
0.19898420572280884,
0.1440204232931137,
-0.035518474876880646,
-0.3142017424106598,
-0.09087379276752472,
-0.46379971504211426,
-0.124521903693676,
-0.25648295879364014,
-0.011379295960068703,
0.24349771440029144,
-0.11427619308233261,
-0.020121313631534576,
-0.12764954566955566,
0.1630445420742035,
-0.17262721061706543,
-0.11571940034627914,
0.34214332699775696,
-0.017865080386400223,
-0.5266844034194946,
-0.02159912884235382,
-0.10978579521179199,
-0.11822069436311722,
-0.5985739231109619,
0.35050487518310547,
-0.13325102627277374,
0.10409889370203018,
-0.10524994134902954,
-0.06480905413627625,
-0.02178226225078106,
-0.3342931866645813,
0.23624005913734436,
0.19174620509147644,
0.4066137969493866,
-0.20216655731201172,
0.11565864831209183,
-0.15102532505989075,
-0.31231778860092163,
0.0028546182438731194,
0.42791125178337097,
0.017585618421435356,
0.4884948432445526,
-0.11321431398391724,
0.039407845586538315,
-0.12033974379301071,
-0.05290862172842026,
-0.010313533246517181,
0.09840349107980728,
-0.212485671043396,
0.48037999868392944,
-0.5130469799041748,
0.21608680486679077,
0.1373877376317978,
0.00970347598195076,
0.2349112629890442,
0.37298980355262756,
0.08563661575317383,
-0.7212563753128052,
0.5360860824584961,
-0.3975192606449127,
-0.259246826171875,
0.12980489432811737,
0.3594261407852173,
-0.16014066338539124,
-0.10496088117361069,
-0.4210330545902252,
0.005724020302295685,
0.4678092300891876,
-0.027640696614980698,
-0.30604615807533264,
0.12533007562160492,
-0.022934217005968094,
0.07178176939487457,
-0.011120250448584557,
0.2849685549736023,
-0.1236347034573555,
-0.19545766711235046,
0.20541268587112427,
-0.14836955070495605
] |
https://github.com/huggingface/datasets/issues/6311
|
cast_column to Sequence with length=4 occur exception raise in datasets/table.py:2146
|
i test Sequence(ClassLabel) is ok if one column is label list. but it is not ok in nested column such as `Sequence(feature= {"points": Sequence(Value("int32")), "label": Sequence(ClassLabel(num_classes....)))`. in this case i need override ClassLabels. encode_example as i given above.
|
### Describe the bug
i load a dataset from local csv file which has 187383612 examples, then use `map` to generate new columns for test.
here is my code :
```
import os
from datasets import load_dataset
from datasets.features import Sequence, Value
def add_new_path(example):
example["ais_bbox"] = [100,100,200,200]
example["ais_image_path"] = os.path.join("images", example["image_path"]) if example["image_path"] else ""
return example
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1749/")
hf_ds = ais_dataset.map(add_new_path, batched=False, num_proc=32)
ds = hf_ds.cast_column("ais_bbox", Sequence(Value("int32"), length=4))
```
and the `cast_column` raise an exception
```
Casting the dataset: 3%|███▉
...
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2110, in cast_column
return self.cast(features)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2055, in cast
dataset = dataset.map(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3097, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3474, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3353, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2329, in table_cast
return cast_table_to_schema(table, schema)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2145, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
list<item: int64>
to
Sequence(feature=Value(dtype='int32', id=None), length=4, id=None)
```
i check the source code and make debug info:
in datasets/table.py:2092
```
2091 if feature.length > -1:
2092 if feature.length * len(array) == len(array.values):
2093 return pa.FixedSizeListArray.from_arrays(_c(array.values, feature.feature), feature.length)
2094 print(len(array))
2095 print(len(array.values))
```
my feature.length is 4. but feature.length * len(array) == len(array.values) is false.
print(len(array)) is 262
print(len(array.values)) is 4000
then I use "for item in array" to print each item then get 262 * [100,100,200,200]
and use "for item in array.values" to print each item and get 4000 int32 which are 1000 * [100,100,200,200]
i'm wondering the `chunk` in each `array.chunks`, the "chunk.values" may get all the chunks's value rather than single chunk? but i check the pyarrow's doc seems chunk.values is chunk's value not all.
### Steps to reproduce the bug
code provided above.
### Expected behavior
feature.length * len(array) == len(array.values) should be true. and there should not has Exception.
### Environment info
python3.9
x86_64
datasets: 2.14.4
pyarrow: 13.0.0 or 10.0.0
| 38
|
cast_column to Sequence with length=4 occur exception raise in datasets/table.py:2146
### Describe the bug
i load a dataset from local csv file which has 187383612 examples, then use `map` to generate new columns for test.
here is my code :
```
import os
from datasets import load_dataset
from datasets.features import Sequence, Value
def add_new_path(example):
example["ais_bbox"] = [100,100,200,200]
example["ais_image_path"] = os.path.join("images", example["image_path"]) if example["image_path"] else ""
return example
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1749/")
hf_ds = ais_dataset.map(add_new_path, batched=False, num_proc=32)
ds = hf_ds.cast_column("ais_bbox", Sequence(Value("int32"), length=4))
```
and the `cast_column` raise an exception
```
Casting the dataset: 3%|███▉
...
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2110, in cast_column
return self.cast(features)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2055, in cast
dataset = dataset.map(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3097, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3474, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3353, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2329, in table_cast
return cast_table_to_schema(table, schema)
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2288, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2145, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
list<item: int64>
to
Sequence(feature=Value(dtype='int32', id=None), length=4, id=None)
```
i check the source code and make debug info:
in datasets/table.py:2092
```
2091 if feature.length > -1:
2092 if feature.length * len(array) == len(array.values):
2093 return pa.FixedSizeListArray.from_arrays(_c(array.values, feature.feature), feature.length)
2094 print(len(array))
2095 print(len(array.values))
```
my feature.length is 4. but feature.length * len(array) == len(array.values) is false.
print(len(array)) is 262
print(len(array.values)) is 4000
then I use "for item in array" to print each item then get 262 * [100,100,200,200]
and use "for item in array.values" to print each item and get 4000 int32 which are 1000 * [100,100,200,200]
i'm wondering the `chunk` in each `array.chunks`, the "chunk.values" may get all the chunks's value rather than single chunk? but i check the pyarrow's doc seems chunk.values is chunk's value not all.
### Steps to reproduce the bug
code provided above.
### Expected behavior
feature.length * len(array) == len(array.values) should be true. and there should not has Exception.
### Environment info
python3.9
x86_64
datasets: 2.14.4
pyarrow: 13.0.0 or 10.0.0
i test Sequence(ClassLabel) is ok if one column is label list. but it is not ok in nested column such as `Sequence(feature= {"points": Sequence(Value("int32")), "label": Sequence(ClassLabel(num_classes....)))`. in this case i need override ClassLabels. encode_example as i given above.
|
[
-0.2292919158935547,
-0.11489831656217575,
-0.023203877732157707,
0.2161572426557541,
0.52309250831604,
0.17112043499946594,
0.4404307007789612,
0.480095773935318,
0.3566000461578369,
0.00043483078479766846,
0.3617156744003296,
0.27310362458229065,
-0.14019718766212463,
-0.05468857288360596,
-0.15532317757606506,
-0.23779171705245972,
0.14036063849925995,
0.1790710687637329,
-0.12250201404094696,
0.17659012973308563,
-0.6017120480537415,
-0.022230247035622597,
-0.29264822602272034,
0.11850228905677795,
-0.03601841628551483,
-0.09288367629051208,
-0.17189349234104156,
-0.10042513161897659,
0.05457587540149689,
-0.4979938864707947,
0.06749030202627182,
-0.36459970474243164,
0.2019665688276291,
0.5927485227584839,
-0.00011433733743615448,
-0.055045776069164276,
0.25506672263145447,
0.06531652808189392,
0.04782604053616524,
0.0698883980512619,
-0.5054458379745483,
-0.1633991152048111,
-0.17036032676696777,
-0.49253442883491516,
0.00916757807135582,
-0.04321666061878204,
-0.3550854027271271,
-0.35526716709136963,
0.12257412075996399,
0.5797803997993469,
0.1884218156337738,
0.21055498719215393,
-0.1003338098526001,
-0.16828607022762299,
0.2906600534915924,
-0.06987905502319336,
-0.0866963267326355,
0.09136506915092468,
0.24263553321361542,
0.06502590328454971,
0.0788099616765976,
0.21785710752010345,
-0.16679170727729797,
0.04538532346487045,
-0.04330872744321823,
0.07806113362312317,
0.19012877345085144,
-0.10533633828163147,
0.11030721664428711,
0.16660231351852417,
0.3587820827960968,
-0.21757230162620544,
-0.2507912218570709,
-0.10257528722286224,
0.055873483419418335,
-0.2895868420600891,
0.10333371162414551,
0.034665465354919434,
0.023151129484176636,
0.1112583577632904,
-0.4519941210746765,
0.2900080978870392,
-0.1392362266778946,
0.15380467474460602,
-0.06919783353805542,
0.07946842163801193,
0.0370982363820076,
0.20616483688354492,
0.032072506844997406,
-0.26909470558166504,
0.10779011249542236,
-0.1677500456571579,
-0.025613021105527878,
0.20803262293338776,
-0.3950221836566925,
-0.1643475890159607,
0.11413770914077759,
0.07945238798856735,
0.12134378403425217,
-0.18909518420696259,
0.03032388910651207,
0.05066841095685959,
0.2587844431400299,
-0.025957711040973663,
-0.009968668222427368,
-0.007999163120985031,
-0.24855375289916992,
0.280760794878006,
0.1073274314403534,
0.25218889117240906,
-0.09001397341489792,
-0.05010686814785004,
0.18084874749183655,
-0.3330141603946686,
0.19541144371032715,
0.4226154386997223,
0.27505820989608765,
-0.006417777389287949,
-0.03369896858930588,
0.2199152559041977,
-0.04321657121181488,
0.07399819046258926,
0.21079866588115692,
0.40428000688552856,
0.0854763463139534,
0.045051075518131256,
0.07742418348789215,
0.19202427566051483,
-0.1069817990064621,
0.049819767475128174,
-0.23686780035495758,
0.23731034994125366,
-0.017547741532325745,
-0.1416601538658142,
-0.13741137087345123,
0.07704424113035202,
-0.01985801011323929,
0.04127337411046028,
-0.20109416544437408,
-0.05506819486618042,
0.006564037874341011,
-0.2948131859302521,
0.17541390657424927,
0.3642987310886383,
-0.26446980237960815,
0.09270896762609482,
0.08352959901094437,
-0.006006296724081039,
-0.12376347184181213,
0.26681703329086304,
-0.2503463625907898,
-0.3875173032283783,
-0.20235198736190796,
0.2267369031906128,
0.03169582411646843,
0.2374463975429535,
-0.09985264390707016,
-0.24266032874584198,
0.5225322842597961,
-0.26729005575180054,
0.36586794257164,
-0.3501460552215576,
-0.33019548654556274,
-0.28617939352989197,
0.04621906578540802,
0.44217538833618164,
-0.017094584181904793,
0.2633611261844635,
-0.2291376143693924,
0.15521752834320068,
0.06998120248317719,
0.2384219765663147,
-0.0021125199273228645,
0.208812415599823,
-0.44165486097335815,
0.22298036515712738,
0.514351487159729,
-0.1629798859357834,
-0.2935340702533722,
0.3101194202899933,
-0.3240569829940796,
-0.13690321147441864,
0.1706356555223465,
0.09749000519514084,
0.263433039188385,
-0.22971142828464508,
0.14393694698810577,
0.10867128521203995,
-0.2496565580368042,
0.28388968110084534,
-0.12440930306911469,
-0.12295100092887878,
0.14438551664352417,
-0.1892107129096985,
-0.09708361327648163,
0.09817223250865936,
0.2900688052177429,
-0.15073630213737488,
0.1416768878698349,
-0.28879424929618835,
0.08303703367710114,
0.2963504195213318,
0.15935078263282776,
-0.12146244943141937,
0.005884221289306879,
-0.15556961297988892,
-0.2694768011569977,
0.239542156457901,
0.3720287084579468,
-0.1266932487487793,
-0.3021007776260376,
-0.25541257858276367,
-0.3354111611843109,
0.29121455550193787,
-0.17743061482906342,
0.2745823264122009,
0.06319420039653778,
-0.06849570572376251,
0.22236588597297668,
-0.05709688365459442,
0.06703150272369385,
0.007765495218336582,
-0.3104984164237976,
-0.044801026582717896,
-0.32755419611930847,
0.20785368978977203,
-0.23246563971042633,
-0.153274804353714,
-0.11824993789196014,
0.20953574776649475,
0.24143028259277344,
-0.1765192449092865,
-0.11736830323934555,
0.3307511508464813,
0.08915802836418152,
0.09214234352111816,
-0.49597468972206116,
0.08496509492397308,
0.1037415936589241,
-0.3436177372932434,
0.028100239112973213,
0.1417067050933838,
0.25619304180145264,
-0.02711740881204605,
-0.15689221024513245,
0.3208720088005066,
-0.09006854891777039,
0.2439403235912323,
-0.036737456917762756,
-0.021541306748986244,
0.14709170162677765,
-0.07866206765174866,
0.20982949435710907,
-0.2362738698720932,
0.05694793909788132,
0.10777097940444946,
0.005729656666517258,
-0.03168860822916031,
-0.07585952430963516,
0.15863744914531708,
0.5668787956237793,
-0.07930339872837067,
0.11287043988704681,
0.26591476798057556,
0.12772440910339355,
-0.0009563229978084564,
0.14388972520828247,
0.2525887191295624,
0.5420507192611694,
0.14554819464683533,
0.05391010269522667,
0.03837268054485321,
-0.10785330832004547,
-0.08979377895593643,
0.15662354230880737,
0.14471057057380676,
0.050339225679636,
0.3169183135032654,
0.29274699091911316,
0.007316586561501026,
-0.06725248694419861,
-0.28030145168304443,
0.16769134998321533,
0.3199092745780945,
-0.4981814920902252,
0.12733425199985504,
-0.1428547501564026,
-0.062336646020412445,
-0.27760887145996094,
0.04565558582544327,
0.3051230311393738,
-0.28579461574554443,
-0.3146103024482727,
0.11909358203411102,
-0.24003617465496063,
0.24817036092281342,
-0.4054655432701111,
-0.2669481039047241,
0.3770153820514679,
-0.21413183212280273,
-0.08536501228809357,
-0.044359393417835236,
0.07167040556669235,
0.005333416163921356,
0.09867657721042633,
-0.05998455360531807,
0.277892529964447,
0.07493823021650314,
-0.03903821110725403,
-0.3241850733757019,
-0.38823339343070984,
-0.02278764545917511,
-0.14840833842754364,
-0.10947923362255096,
0.4319029748439789,
0.1980956494808197,
0.04447949677705765,
-0.2522137463092804,
0.23219376802444458,
-0.05485697090625763,
-0.0705394446849823,
0.47808295488357544,
0.03697765991091728,
0.07042091339826584,
-0.20229539275169373,
-0.35451120138168335,
-0.05537094920873642,
-0.41177135705947876,
0.01673971489071846,
0.0029614903032779694,
0.10031578689813614,
0.00288647273555398,
0.4022837281227112,
0.306816041469574,
0.2171047329902649,
-0.17178943753242493,
-0.12168919295072556,
0.328171044588089,
0.24345743656158447,
-0.06401768326759338,
-0.24227093160152435,
-0.07512453198432922,
-0.5806818008422852,
-0.14628636837005615,
0.23472775518894196,
-0.4040241837501526,
-0.22145803272724152,
-0.24602530896663666,
0.3231995105743408,
-0.08623369038105011,
-0.0277679655700922,
0.4781101942062378,
-0.01860596425831318,
-0.07854682952165604,
-0.20678025484085083,
-0.05744102969765663,
-0.005256399512290955,
0.20375362038612366,
-0.12911567091941833,
0.14995786547660828,
0.8351048827171326,
-0.027632899582386017,
0.08933659642934799,
0.23984935879707336,
-0.25405049324035645,
0.44250714778900146,
-0.3932557702064514,
0.09763975441455841,
-0.2537851333618164,
-0.16086456179618835,
-0.10394494980573654,
-0.021060258150100708,
-0.07964795082807541,
0.04729517176747322,
-0.12065400928258896,
-0.1643638014793396,
0.16702739894390106,
0.006507113575935364,
-0.10928548127412796,
-0.18626722693443298,
0.12627802789211273,
-0.15882720053195953,
0.2969192862510681,
-0.16427789628505707,
-0.06368013471364975,
-0.32136428356170654,
-0.04512612894177437,
0.039893101900815964,
-0.1930665522813797,
-0.06262444704771042,
-0.3104419410228729,
-0.3375839591026306,
-0.37143474817276,
-0.2986243963241577,
0.44351452589035034,
0.5915877819061279,
0.6055489182472229,
-0.024098001420497894,
-0.12014126032590866,
0.05199628695845604,
-0.28393661975860596,
0.848260223865509,
-0.5643451809883118,
0.0727338194847107,
0.13987092673778534,
0.21876657009124756,
-0.3186623156070709,
0.11023183166980743,
-0.006735827773809433,
0.007071363274008036,
-0.004786878824234009,
0.5303606986999512,
-0.03930458799004555,
0.06239459663629532,
0.5120469927787781,
0.4089621305465698,
-0.04802447184920311,
-0.08920030295848846,
-0.09926368296146393,
-0.4339066445827484,
-0.22811824083328247,
0.1886834055185318,
0.21737127006053925,
0.10342767089605331,
0.07699720561504364,
-0.2933277189731598,
-0.027758056297898293,
-0.18571674823760986,
-0.19632871448993683,
0.04382539913058281,
0.2553839385509491,
0.11993205547332764,
0.41530463099479675,
-0.21210888028144836,
-0.4198072850704193,
0.006894824095070362,
0.5965350270271301,
-0.36610323190689087,
-0.14497479796409607,
-0.045629359781742096,
-0.26337483525276184,
0.19565729796886444,
0.23498156666755676,
-0.07238750159740448,
0.11907882988452911,
-0.04062921553850174,
0.31206896901130676,
-0.30035120248794556,
-0.12298266589641571,
0.3931964635848999,
0.016125455498695374,
-0.3105051815509796,
-0.38868585228919983,
0.3532566726207733,
0.024454116821289062,
-0.11431299149990082,
0.11581771820783615,
0.16157415509223938,
-0.3584110736846924,
0.5608789324760437,
0.025489255785942078,
0.7237346172332764,
-0.09851515293121338,
-0.08624465763568878,
0.4808209240436554,
-0.13880155980587006,
0.4092831313610077,
0.2660045623779297,
-0.0071931276470422745,
-0.5069201588630676,
-0.3590472936630249,
-0.13096298277378082,
-0.17018526792526245,
0.17314770817756653,
0.14107084274291992,
-0.19820554554462433,
0.15885992348194122,
-0.25811946392059326,
0.34868499636650085,
-0.1284911036491394,
0.029428958892822266,
-0.03600424528121948,
-0.17727765440940857,
-0.31577613949775696,
0.1389245092868805,
0.12158519774675369,
-0.3496864438056946,
0.05336913466453552,
0.1731448918581009,
-0.009825058281421661,
-0.6655282378196716,
-0.15302279591560364,
0.06533470004796982,
0.0002974863164126873,
0.20461499691009521,
-0.06161854788661003,
-0.1819610893726349,
0.1303960084915161,
0.2055640071630478,
0.2274698168039322,
0.04112283140420914,
-0.0126784797757864,
0.048277027904987335,
0.3744538426399231,
0.18860283493995667,
0.20341965556144714,
-0.07963845133781433,
0.20177409052848816,
0.12382624298334122,
-0.11924009025096893,
0.109227254986763,
-0.20082931220531464,
-0.12851473689079285,
0.20312228798866272,
0.2883830964565277,
0.17036399245262146,
-0.373577743768692,
-0.4153997004032135,
-0.24990686774253845,
-0.007863914594054222,
-0.22196216881275177,
0.09940029680728912,
-0.26148760318756104,
-0.08028781414031982,
0.2765539884567261,
-0.26227572560310364,
-0.2347564548254013,
-0.1517157256603241,
0.4439071714878082,
-0.0005798935890197754,
0.24806010723114014,
0.41989779472351074,
0.281282901763916,
-0.1447446346282959,
-0.21312934160232544,
0.05572877079248428,
0.2531059980392456,
-0.7087972164154053,
-0.008557303808629513,
-0.2113022655248642,
-0.002305537462234497,
0.18896599113941193,
0.23429803550243378,
-0.009048178791999817,
-0.14256703853607178,
-0.057110078632831573,
-0.321877121925354,
-0.4657486379146576,
0.1881064772605896,
0.12097752094268799,
0.11424100399017334,
0.019785482436418533,
0.1655997484922409,
-0.20321820676326752,
-0.13091731071472168,
-0.2664720416069031,
0.08170730620622635,
-0.24727553129196167,
0.41713812947273254,
0.3054589629173279,
0.08089862763881683,
0.032187774777412415,
-0.1367304027080536,
0.17897655069828033,
0.3172721266746521,
-0.16328276693820953,
-0.20447686314582825,
-0.07514430582523346,
0.09489411115646362,
0.020178359001874924,
-0.12266231328248978,
-0.1639280915260315,
-0.32128775119781494,
-0.08347928524017334,
-0.2622206509113312,
0.05060698464512825,
0.10101256519556046,
-0.1502920389175415,
-0.10386095196008682,
0.25691741704940796,
-0.18093496561050415,
-0.01198926568031311,
0.2589695453643799,
-0.39710429310798645,
0.01854678988456726,
-0.11673616617918015,
0.3122935891151428,
-0.04824720323085785,
-0.0315326526761055,
-0.006308481562882662,
0.038905948400497437,
-0.10027505457401276,
-0.12614700198173523,
0.5141873359680176,
-0.09177327156066895,
0.08521352708339691,
0.28048941493034363,
0.25216779112815857,
-0.02609587460756302,
-0.446429580450058,
-0.19719433784484863,
0.053858496248722076,
0.20028215646743774,
-0.32313039898872375,
-0.23417234420776367,
0.10364347696304321,
-0.11791067570447922,
0.12456142902374268,
0.35611456632614136,
0.01890142634510994,
-0.23921842873096466,
0.044570546597242355,
0.21073469519615173,
0.5816618800163269,
-0.26109445095062256,
-0.033301763236522675,
0.6071076393127441,
-0.04962566867470741,
-0.07491114735603333,
0.1562720388174057,
0.19794991612434387,
0.4231134057044983,
0.30810046195983887,
0.022688474506139755,
-0.12030407786369324,
0.19396823644638062,
0.04261316731572151,
-0.19092440605163574,
-0.5539610385894775,
0.5139065980911255,
0.1723923683166504,
-0.14615848660469055,
-0.021199092268943787,
0.3571545481681824,
-0.013183146715164185,
-0.1681123524904251,
-0.04159296676516533,
-0.12619875371456146,
0.08895596116781235,
-0.09663943201303482,
0.024722803384065628,
0.16504260897636414,
0.12172629684209824,
-0.17644630372524261,
-0.2167065143585205,
-0.01513151079416275,
0.14301851391792297,
0.6012574434280396,
0.12547791004180908,
0.22881746292114258,
-0.01642012782394886,
-0.06100671738386154,
0.07741361856460571,
-0.04536599665880203,
-0.47074174880981445,
0.3198690712451935,
0.3416723608970642,
0.013816136866807938,
0.13934001326560974,
-0.02512705884873867,
0.542805016040802,
0.18721523880958557,
-0.02503719925880432,
0.06656379997730255,
0.07583598792552948,
-0.10376876592636108,
0.09295926988124847,
0.1268615424633026,
-0.1300223469734192,
0.3169969320297241,
0.20407718420028687,
0.15463465452194214,
-0.1504940539598465,
0.22378326952457428,
0.11448799073696136,
0.3509487509727478,
-0.20492562651634216,
0.47840240597724915,
-0.06889045983552933,
-0.4049164950847626,
-0.0538150891661644,
0.11732429265975952,
-0.25864458084106445,
0.28956276178359985,
0.30080366134643555,
-0.4495638608932495,
0.31683212518692017,
0.15405383706092834,
0.0719347670674324,
0.0012912657111883163,
0.19898420572280884,
0.1440204232931137,
-0.035518474876880646,
-0.3142017424106598,
-0.09087379276752472,
-0.46379971504211426,
-0.124521903693676,
-0.25648295879364014,
-0.011379295960068703,
0.24349771440029144,
-0.11427619308233261,
-0.020121313631534576,
-0.12764954566955566,
0.1630445420742035,
-0.17262721061706543,
-0.11571940034627914,
0.34214332699775696,
-0.017865080386400223,
-0.5266844034194946,
-0.02159912884235382,
-0.10978579521179199,
-0.11822069436311722,
-0.5985739231109619,
0.35050487518310547,
-0.13325102627277374,
0.10409889370203018,
-0.10524994134902954,
-0.06480905413627625,
-0.02178226225078106,
-0.3342931866645813,
0.23624005913734436,
0.19174620509147644,
0.4066137969493866,
-0.20216655731201172,
0.11565864831209183,
-0.15102532505989075,
-0.31231778860092163,
0.0028546182438731194,
0.42791125178337097,
0.017585618421435356,
0.4884948432445526,
-0.11321431398391724,
0.039407845586538315,
-0.12033974379301071,
-0.05290862172842026,
-0.010313533246517181,
0.09840349107980728,
-0.212485671043396,
0.48037999868392944,
-0.5130469799041748,
0.21608680486679077,
0.1373877376317978,
0.00970347598195076,
0.2349112629890442,
0.37298980355262756,
0.08563661575317383,
-0.7212563753128052,
0.5360860824584961,
-0.3975192606449127,
-0.259246826171875,
0.12980489432811737,
0.3594261407852173,
-0.16014066338539124,
-0.10496088117361069,
-0.4210330545902252,
0.005724020302295685,
0.4678092300891876,
-0.027640696614980698,
-0.30604615807533264,
0.12533007562160492,
-0.022934217005968094,
0.07178176939487457,
-0.011120250448584557,
0.2849685549736023,
-0.1236347034573555,
-0.19545766711235046,
0.20541268587112427,
-0.14836955070495605
] |
https://github.com/huggingface/datasets/issues/6308
|
module 'resource' has no attribute 'error'
|
This (Windows) issue was fixed in `fsspec` in https://github.com/fsspec/filesystem_spec/pull/1275. So, to avoid the error, update the `fsspec` installation with `pip install -U fsspec`.
|
### Describe the bug
just run import:
`from datasets import load_dataset`
and then:
```
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\__init__.py", line 10, in <module>
from .streaming_download_manager import StreamingDownloadManager
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\streaming_download_manager.py", line 21, in <module>
from ..filesystems import COMPRESSION_FILESYSTEMS
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\filesystems\__init__.py", line 8, in <module>
import fsspec.asyn
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\fsspec\asyn.py", line 157, in <module>
ResourceEror = resource.error
AttributeError: module 'resource' has no attribute 'error'
Process finished with exit code 1
```
and the error codes are:
```
try:
import resource
except ImportError:
resource = None
ResourceError = OSError
else:
ResourceEror = resource.error
```
1. miss spelling : "ResourceEror " should be "ResourceErorr"
2. module 'resource' has no attribute 'error'
### Steps to reproduce the bug
only one step:
`from datasets import load_dataset`
### Expected behavior
slove error: module 'resource' has no attribute 'error'
### Environment info
python=3.10
datasets==2.14.5
| 23
|
module 'resource' has no attribute 'error'
### Describe the bug
just run import:
`from datasets import load_dataset`
and then:
```
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\__init__.py", line 10, in <module>
from .streaming_download_manager import StreamingDownloadManager
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\streaming_download_manager.py", line 21, in <module>
from ..filesystems import COMPRESSION_FILESYSTEMS
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\filesystems\__init__.py", line 8, in <module>
import fsspec.asyn
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\fsspec\asyn.py", line 157, in <module>
ResourceEror = resource.error
AttributeError: module 'resource' has no attribute 'error'
Process finished with exit code 1
```
and the error codes are:
```
try:
import resource
except ImportError:
resource = None
ResourceError = OSError
else:
ResourceEror = resource.error
```
1. miss spelling : "ResourceEror " should be "ResourceErorr"
2. module 'resource' has no attribute 'error'
### Steps to reproduce the bug
only one step:
`from datasets import load_dataset`
### Expected behavior
slove error: module 'resource' has no attribute 'error'
### Environment info
python=3.10
datasets==2.14.5
This (Windows) issue was fixed in `fsspec` in https://github.com/fsspec/filesystem_spec/pull/1275. So, to avoid the error, update the `fsspec` installation with `pip install -U fsspec`.
|
[
-0.3986870348453522,
-0.19148093461990356,
-0.1268882006406784,
0.32005441188812256,
0.6016739010810852,
-0.017334021627902985,
0.11214491724967957,
0.3475210964679718,
-0.19669869542121887,
0.06287278980016708,
0.03923971951007843,
0.44196373224258423,
-0.10753018409013748,
-0.14714841544628143,
-0.1401032656431198,
-0.1144743263721466,
0.06480216234922409,
0.2609623074531555,
-0.08809159696102142,
-0.03188540041446686,
-0.3673919439315796,
0.20218582451343536,
-0.1020108163356781,
0.04775267466902733,
-0.21952463686466217,
-0.04417978227138519,
0.10654717683792114,
0.1511106938123703,
-0.20454421639442444,
-0.6687842011451721,
0.14584724605083466,
-0.23429924249649048,
0.02891584485769272,
0.26385459303855896,
-0.00010483679216122255,
-0.09192073345184326,
0.5043992400169373,
0.008852427825331688,
-0.45194289088249207,
-0.00706055760383606,
-0.1131063774228096,
-0.2080155909061432,
0.12791264057159424,
-0.21501630544662476,
-0.04482603445649147,
-0.4287726879119873,
-0.16066822409629822,
-0.4050109386444092,
0.23424819111824036,
0.4217059314250946,
0.3483620882034302,
0.24183568358421326,
0.1448751986026764,
-0.2604691982269287,
0.16497787833213806,
-0.053380370140075684,
0.039019860327243805,
0.16846518218517303,
0.1297599971294403,
0.01574677601456642,
0.1131121814250946,
0.3147301971912384,
-0.08487815409898758,
0.13144613802433014,
0.302755206823349,
-0.15515363216400146,
0.1486257016658783,
-0.2968238294124603,
0.05527525395154953,
-0.05779058486223221,
0.5392398238182068,
-0.03413606435060501,
-0.3678927421569824,
0.0674334391951561,
0.017345363274216652,
-0.23995643854141235,
0.19696441292762756,
0.300487220287323,
-0.1930183321237564,
0.08963558077812195,
0.28643831610679626,
-0.051690470427274704,
-0.06290005892515182,
0.09892624616622925,
0.08745133876800537,
0.1200893372297287,
-0.2241750806570053,
0.046342045068740845,
0.13342925906181335,
-0.12949541211128235,
0.23500889539718628,
0.020241525024175644,
-0.29285529255867004,
0.13306504487991333,
-0.44092464447021484,
0.024414606392383575,
0.05100470036268234,
0.01213129237294197,
0.018604908138513565,
0.37889325618743896,
-0.03765178844332695,
0.00023210421204566956,
0.17601843178272247,
0.1840895712375641,
0.1895536482334137,
0.10283291339874268,
0.07154075801372528,
0.003506191074848175,
0.1263796091079712,
0.2101261466741562,
-0.049790527671575546,
-0.13064497709274292,
-0.17664320766925812,
-0.34133318066596985,
0.07800786197185516,
0.1213727667927742,
0.3286728262901306,
-0.05898553133010864,
-0.427051305770874,
0.023949528113007545,
0.1723538339138031,
0.06902819126844406,
-0.08004416525363922,
0.48058807849884033,
-0.1553463637828827,
0.329429030418396,
0.1783151775598526,
0.22648988664150238,
-0.17851252853870392,
-0.3005303144454956,
-0.21591539680957794,
0.14063066244125366,
-0.27959129214286804,
-0.14538908004760742,
0.02933831885457039,
0.024688245728611946,
0.4568537771701813,
-0.11171744018793106,
-0.22273509204387665,
-0.14897489547729492,
0.22611120343208313,
-0.27641192078590393,
-0.12802386283874512,
0.38554033637046814,
-0.014411898329854012,
0.17193977534770966,
0.17336805164813995,
0.011521004140377045,
0.07462555915117264,
-0.002746783196926117,
-0.2583906352519989,
-0.31842541694641113,
-0.22839127480983734,
0.3683522939682007,
0.07826793938875198,
0.10561858117580414,
-0.09796082228422165,
-0.04842812940478325,
0.11204193532466888,
-0.1931559145450592,
-0.034561626613140106,
-0.04156927019357681,
-0.1715950220823288,
-0.32062962651252747,
0.2160150557756424,
0.5213677287101746,
-0.13734041154384613,
-0.1682896614074707,
-0.24254775047302246,
-0.18697714805603027,
0.28441035747528076,
-0.030206594616174698,
-0.22740666568279266,
0.09019234776496887,
-0.25047287344932556,
0.046258941292762756,
0.5648530125617981,
-0.33318430185317993,
-0.4129413068294525,
0.2338256686925888,
-0.18880082666873932,
-0.26704883575439453,
0.2404821813106537,
0.01998133584856987,
0.2917976379394531,
-0.053338076919317245,
0.36682164669036865,
0.3035517930984497,
0.11220048367977142,
0.09092236310243607,
-0.28905797004699707,
-0.16056697070598602,
-0.05511634796857834,
0.03651620075106621,
-0.01535050943493843,
0.08678196370601654,
0.379863977432251,
0.01484664250165224,
0.12530513107776642,
0.036346711218357086,
0.1794193983078003,
0.32283520698547363,
0.2983786463737488,
-0.041851021349430084,
-0.029103996232151985,
-0.17905539274215698,
-0.10141915827989578,
0.09706909209489822,
-0.14870873093605042,
-0.13952811062335968,
-0.192727193236351,
-0.06654681265354156,
-0.2962523102760315,
-0.10102632641792297,
-0.3379625082015991,
-0.40390273928642273,
0.2607390582561493,
0.2557606101036072,
0.01029154658317566,
0.1903301328420639,
-0.15872837603092194,
0.2990477681159973,
-0.12815028429031372,
0.09859713912010193,
-0.04442655295133591,
0.13323093950748444,
-0.20837639272212982,
-0.19715845584869385,
0.04790883511304855,
-0.04191511124372482,
0.20967760682106018,
0.05132124945521355,
-0.2213071584701538,
0.3515276610851288,
0.13364870846271515,
0.35264670848846436,
0.01318228617310524,
-0.29880309104919434,
0.27251937985420227,
-0.47287389636039734,
0.00040135346353054047,
0.13062070310115814,
0.28479963541030884,
-0.027202382683753967,
0.21377095580101013,
-0.0649523138999939,
0.09433408826589584,
0.1363692581653595,
0.22236059606075287,
0.31259411573410034,
0.35975420475006104,
0.006679486483335495,
0.019774528220295906,
-0.15489672124385834,
0.19767406582832336,
0.09712938964366913,
0.12405700981616974,
-0.08774762600660324,
-0.14016874134540558,
0.046381790190935135,
0.4538850784301758,
0.17620237171649933,
0.03485335409641266,
0.06898172944784164,
-0.4656679630279541,
0.06784309446811676,
0.23514510691165924,
0.5774685144424438,
0.573540985584259,
0.19620808959007263,
-0.09667350351810455,
0.11954749375581741,
0.262653648853302,
-0.011760457418859005,
0.39103963971138,
0.05885463207960129,
0.2973281741142273,
0.3018837869167328,
0.0695720687508583,
0.06555873900651932,
-0.24741804599761963,
-0.347367525100708,
-0.017745763063430786,
0.20810486376285553,
-0.21015974879264832,
0.042241260409355164,
-0.18250378966331482,
0.037986911833286285,
-0.19277483224868774,
-0.06389939039945602,
0.1623087227344513,
-0.13721781969070435,
-0.09366482496261597,
0.20348578691482544,
-0.125227153301239,
0.26980704069137573,
-0.25998008251190186,
-0.07745932042598724,
0.17376795411109924,
-0.045702092349529266,
-0.07025475800037384,
-0.1407497376203537,
-0.017585434019565582,
0.05963745340704918,
0.12874867022037506,
0.04418832063674927,
0.3856377601623535,
-0.10879828780889511,
0.13949771225452423,
-0.2698420584201813,
0.01900293678045273,
0.0959816575050354,
0.053802087903022766,
0.1312890648841858,
0.13820171356201172,
0.1123892068862915,
0.07462974637746811,
-0.22016948461532593,
0.4283675253391266,
-0.19458554685115814,
-0.2052067518234253,
0.18634602427482605,
0.02353879064321518,
-0.13801608979701996,
-0.26377934217453003,
-0.4884738624095917,
-0.41247880458831787,
-0.6430259943008423,
-0.03672429919242859,
0.047506872564554214,
0.09605048596858978,
0.2298559993505478,
0.3069297671318054,
0.22885358333587646,
0.06383603066205978,
0.26500123739242554,
-0.1501462161540985,
-0.11194658279418945,
0.31920477747917175,
-0.3666781783103943,
-0.4397985339164734,
0.055533517152071,
-0.10016582161188126,
0.2044408768415451,
0.30616605281829834,
-0.16956166923046112,
0.05344022437930107,
-0.13546742498874664,
-0.11284802854061127,
-0.19283349812030792,
0.2147255539894104,
0.32813572883605957,
0.281632661819458,
-0.2832147479057312,
-0.19891351461410522,
0.1755066066980362,
-0.10355626791715622,
-0.02508620172739029,
0.21830421686172485,
0.031109318137168884,
0.2725067436695099,
-0.1527249664068222,
0.47176826000213623,
0.23120993375778198,
-0.004758365452289581,
0.5463311672210693,
-0.1618594378232956,
0.23490795493125916,
-0.09197080880403519,
-0.3276529610157013,
-0.1128205806016922,
-0.12778523564338684,
0.12687504291534424,
0.09309869259595871,
-0.06647688895463943,
-0.15356728434562683,
-0.22587014734745026,
-0.02762259915471077,
-0.3517998456954956,
0.024523865431547165,
-0.14036573469638824,
-0.15533439815044403,
0.2582378089427948,
-0.13418886065483093,
0.09026508778333664,
0.054387081414461136,
0.21625831723213196,
0.18864019215106964,
0.09134566783905029,
-0.15935537219047546,
0.02245405688881874,
-0.11565597355365753,
-0.10236456245183945,
-0.24347209930419922,
0.13453775644302368,
-0.10242905467748642,
0.3395049273967743,
0.0594177283346653,
-0.106879323720932,
0.04164737090468407,
-0.12437469512224197,
0.484149694442749,
-0.16428571939468384,
0.08949718624353409,
0.019013281911611557,
0.2163313627243042,
-0.4239472448825836,
-0.011654909700155258,
-0.06094861030578613,
0.05012170225381851,
-0.2389344424009323,
0.14439839124679565,
-0.20573662221431732,
-0.07361958920955658,
-0.10077875852584839,
0.05520884320139885,
-0.15522652864456177,
0.1514739841222763,
-0.3370690643787384,
-0.291354775428772,
-0.5706390738487244,
-0.07889419049024582,
-0.060409270226955414,
0.17670653760433197,
0.16742751002311707,
-0.11410698294639587,
-0.1990918070077896,
0.059666261076927185,
-0.0975426733493805,
0.0100229661911726,
0.5705116987228394,
-0.3383443057537079,
0.1523473709821701,
0.03892124816775322,
0.05544833093881607,
0.5304328799247742,
0.8282782435417175,
-0.012919124215841293,
-0.4016418159008026,
-0.042788006365299225,
-0.14498217403888702,
0.1748020052909851,
0.003446057438850403,
-0.23071861267089844,
-0.023126281797885895,
-0.1804942488670349,
0.20934411883354187,
-0.08178816735744476,
0.016674527898430824,
0.47755804657936096,
-0.01712074875831604,
-0.04097871482372284,
-0.3274293839931488,
0.25784388184547424,
-0.06416192650794983,
0.054179757833480835,
0.348702996969223,
0.2043723315000534,
-0.06108789145946503,
0.1980815976858139,
-0.026907354593276978,
0.775759756565094,
0.3213707208633423,
-0.015628818422555923,
0.301547110080719,
-0.19606424868106842,
0.3399156928062439,
-0.31315064430236816,
0.1797804832458496,
-0.29715368151664734,
-0.02366000786423683,
0.008242746815085411,
-0.1804743856191635,
0.2441745400428772,
-0.05351940542459488,
-0.3407014012336731,
0.1377052664756775,
-0.37235182523727417,
-0.06400682032108307,
-0.11289800703525543,
0.0679829865694046,
-0.2030247449874878,
-0.17434044182300568,
-0.23164132237434387,
0.28527843952178955,
-0.0730958878993988,
0.31959155201911926,
-0.09175611287355423,
-0.09823883324861526,
-0.05971621721982956,
-0.3925483822822571,
-0.16108399629592896,
0.23592162132263184,
-0.2569897174835205,
0.22441329061985016,
-0.21450892090797424,
-0.11362452805042267,
0.07831001281738281,
0.20930513739585876,
-0.11662602424621582,
-0.0725332498550415,
-0.16346940398216248,
0.1483350694179535,
0.014172155410051346,
-0.009479164145886898,
-0.20777589082717896,
0.012999358586966991,
0.40800634026527405,
-0.23594388365745544,
-0.22264838218688965,
0.255758136510849,
-0.22250866889953613,
0.01425451785326004,
0.45749086141586304,
0.01079639047384262,
0.052721086889505386,
-0.061547573655843735,
-0.28134188055992126,
-0.07201714813709259,
-0.18000788986682892,
-0.19125835597515106,
0.24518240988254547,
-0.054095640778541565,
-0.3488394320011139,
0.1523236334323883,
0.17695851624011993,
-0.07935274392366409,
-0.05688001587986946,
0.2850613296031952,
-0.006674859672784805,
0.24185392260551453,
0.47649574279785156,
-0.2127920240163803,
-0.23220610618591309,
-0.4195190668106079,
-0.10709045827388763,
-0.0551505871117115,
-0.5111703276634216,
0.21138693392276764,
0.016424478963017464,
-0.03846804052591324,
-0.019038202241063118,
0.016614049673080444,
0.025331752374768257,
0.17236578464508057,
-0.09741061925888062,
-0.49797192215919495,
-0.39595291018486023,
0.05148945748806,
-0.24005188047885895,
0.06177543103694916,
-0.24976029992103577,
-0.09798753261566162,
0.07313722372055054,
-0.06971564143896103,
-0.40405023097991943,
0.18282917141914368,
-0.20531657338142395,
0.19961127638816833,
-0.05159575492143631,
0.01826944202184677,
0.15882866084575653,
-0.0011292253620922565,
0.2210649996995926,
0.1975691318511963,
-0.15879766643047333,
-0.28636613488197327,
-0.19783824682235718,
0.11419713497161865,
-0.015985984355211258,
-0.08139631897211075,
0.06513099372386932,
-0.12826129794120789,
-0.10456448793411255,
-0.05071409046649933,
-0.07161617279052734,
0.040860794484615326,
-0.16875489056110382,
0.1697949916124344,
0.41683143377304077,
0.08637827634811401,
-0.05679536610841751,
0.15386229753494263,
-0.10148634016513824,
0.2444983422756195,
-0.06678976118564606,
-0.040747374296188354,
0.07250770181417465,
-0.08124633878469467,
-0.25585848093032837,
0.05029645562171936,
-0.1135038435459137,
-0.031821250915527344,
0.31958451867103577,
-0.23722489178180695,
0.054882314056158066,
-0.10961346328258514,
0.19361166656017303,
0.47635015845298767,
-0.1447422057390213,
0.115644171833992,
0.1384303867816925,
0.38824671506881714,
-0.38369402289390564,
-0.0495142936706543,
-0.18392236530780792,
-0.10167402029037476,
0.014708805829286575,
-0.02025742083787918,
0.05832669511437416,
-0.3617452085018158,
0.15030184388160706,
0.12647181749343872,
0.20074716210365295,
-0.15592050552368164,
0.30289268493652344,
0.1605338454246521,
0.09336341917514801,
0.10178176313638687,
0.20252938568592072,
0.06529086083173752,
0.23944202065467834,
0.35326695442199707,
-0.44169801473617554,
0.2656025290489197,
0.1704549491405487,
-0.1458304226398468,
-0.21623659133911133,
-0.3706554174423218,
0.2523478865623474,
-0.028181850910186768,
-0.10303176939487457,
0.03558872640132904,
0.03874227777123451,
0.4932484030723572,
-0.04774263873696327,
-0.12798869609832764,
0.033909671008586884,
0.21631057560443878,
-0.1289176642894745,
0.035222116857767105,
0.03889764845371246,
-0.10548096895217896,
-0.08193938434123993,
-0.0017209239304065704,
0.20333857834339142,
-0.1286195069551468,
0.3866729140281677,
0.1883268654346466,
-0.10856522619724274,
-0.3419506549835205,
0.1644071340560913,
0.25837385654449463,
0.11169616878032684,
-0.3154618442058563,
0.10632392019033432,
0.33058205246925354,
0.054124865680933,
-0.02564932033419609,
0.3148108720779419,
0.4991253912448883,
0.4961867034435272,
-0.17068330943584442,
-0.029441189020872116,
0.052151527255773544,
-0.11963870376348495,
-0.06625528633594513,
0.16697272658348083,
0.17284923791885376,
0.02556617558002472,
0.24974144995212555,
0.26764634251594543,
-0.3052578568458557,
-0.05631174519658089,
0.006862502545118332,
-0.050776053220033646,
0.011802060529589653,
0.38508346676826477,
-0.1430981308221817,
-0.1285332292318344,
-0.35023248195648193,
0.020117171108722687,
-0.5803687572479248,
0.06397167593240738,
0.4262367784976959,
0.03036985918879509,
0.12909838557243347,
-0.1708763688802719,
0.12501125037670135,
-0.04311095550656319,
0.2816132605075836,
0.2715853750705719,
0.12326648086309433,
-0.15495169162750244,
-0.27960488200187683,
-0.5030547380447388,
0.208878755569458,
-0.08747181296348572,
-0.01095544546842575,
-0.13077165186405182,
0.14621831476688385,
-0.18884682655334473,
0.15534138679504395,
0.2775542736053467,
0.02944674901664257,
0.23801034688949585,
0.1368386596441269,
-0.3771362006664276,
-0.20440354943275452,
0.03957882523536682,
0.14735610783100128,
-0.00509357824921608,
-0.5665703415870667,
-0.05419242009520531,
-0.4041847884654999,
0.24957051873207092,
-0.12916110455989838,
-0.17399989068508148,
-0.027819937095046043,
-0.11597846448421478,
0.6239941716194153,
-0.04086248576641083,
0.33994823694229126,
-0.20085665583610535,
-0.183844193816185,
-0.11076299846172333,
-0.19156759977340698,
-0.01585034281015396,
-0.1025775596499443,
0.28779277205467224,
0.36566847562789917,
-0.048136137425899506,
-0.10172758996486664,
-0.46547749638557434,
0.34430280327796936,
0.010303836315870285,
-0.009595749899744987,
-0.25939103960990906,
0.326904296875,
-0.04156570881605148,
0.0227622352540493,
-0.019455749541521072,
0.07358980923891068,
-0.16258497536182404,
0.18728648126125336,
-0.5148113369941711,
-0.535101592540741,
0.5774756669998169,
-0.19221225380897522,
-0.252755731344223,
0.11978308856487274,
0.38513779640197754,
0.04100840538740158,
0.02160828188061714,
-0.4395598769187927,
0.1292080581188202,
0.31914910674095154,
-0.10070887953042984,
-0.2627984583377838,
0.24097344279289246,
-0.23580510914325714,
0.04525526985526085,
0.05255884304642677,
0.27060842514038086,
0.03627469390630722,
0.1353696584701538,
0.051550861448049545,
-0.18516217172145844
] |
https://github.com/huggingface/datasets/issues/6308
|
module 'resource' has no attribute 'error'
|
> This (Windows) issue was fixed in `fsspec` in [fsspec/filesystem_spec#1275](https://github.com/fsspec/filesystem_spec/pull/1275). So, to avoid the error, update the `fsspec` installation with `pip install -U fsspec`.
after I run `pip install -U fsspec`
it occurs a new error:
```
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflict
s.
datasets 2.14.5 requires fsspec[http]<2023.9.0,>=2023.1.0, but you have fsspec 2023.9.2 which is incompatible.
```
|
### Describe the bug
just run import:
`from datasets import load_dataset`
and then:
```
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\__init__.py", line 10, in <module>
from .streaming_download_manager import StreamingDownloadManager
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\streaming_download_manager.py", line 21, in <module>
from ..filesystems import COMPRESSION_FILESYSTEMS
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\filesystems\__init__.py", line 8, in <module>
import fsspec.asyn
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\fsspec\asyn.py", line 157, in <module>
ResourceEror = resource.error
AttributeError: module 'resource' has no attribute 'error'
Process finished with exit code 1
```
and the error codes are:
```
try:
import resource
except ImportError:
resource = None
ResourceError = OSError
else:
ResourceEror = resource.error
```
1. miss spelling : "ResourceEror " should be "ResourceErorr"
2. module 'resource' has no attribute 'error'
### Steps to reproduce the bug
only one step:
`from datasets import load_dataset`
### Expected behavior
slove error: module 'resource' has no attribute 'error'
### Environment info
python=3.10
datasets==2.14.5
| 77
|
module 'resource' has no attribute 'error'
### Describe the bug
just run import:
`from datasets import load_dataset`
and then:
```
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\__init__.py", line 10, in <module>
from .streaming_download_manager import StreamingDownloadManager
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\streaming_download_manager.py", line 21, in <module>
from ..filesystems import COMPRESSION_FILESYSTEMS
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\filesystems\__init__.py", line 8, in <module>
import fsspec.asyn
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\fsspec\asyn.py", line 157, in <module>
ResourceEror = resource.error
AttributeError: module 'resource' has no attribute 'error'
Process finished with exit code 1
```
and the error codes are:
```
try:
import resource
except ImportError:
resource = None
ResourceError = OSError
else:
ResourceEror = resource.error
```
1. miss spelling : "ResourceEror " should be "ResourceErorr"
2. module 'resource' has no attribute 'error'
### Steps to reproduce the bug
only one step:
`from datasets import load_dataset`
### Expected behavior
slove error: module 'resource' has no attribute 'error'
### Environment info
python=3.10
datasets==2.14.5
> This (Windows) issue was fixed in `fsspec` in [fsspec/filesystem_spec#1275](https://github.com/fsspec/filesystem_spec/pull/1275). So, to avoid the error, update the `fsspec` installation with `pip install -U fsspec`.
after I run `pip install -U fsspec`
it occurs a new error:
```
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflict
s.
datasets 2.14.5 requires fsspec[http]<2023.9.0,>=2023.1.0, but you have fsspec 2023.9.2 which is incompatible.
```
|
[
-0.3986870348453522,
-0.19148093461990356,
-0.1268882006406784,
0.32005441188812256,
0.6016739010810852,
-0.017334021627902985,
0.11214491724967957,
0.3475210964679718,
-0.19669869542121887,
0.06287278980016708,
0.03923971951007843,
0.44196373224258423,
-0.10753018409013748,
-0.14714841544628143,
-0.1401032656431198,
-0.1144743263721466,
0.06480216234922409,
0.2609623074531555,
-0.08809159696102142,
-0.03188540041446686,
-0.3673919439315796,
0.20218582451343536,
-0.1020108163356781,
0.04775267466902733,
-0.21952463686466217,
-0.04417978227138519,
0.10654717683792114,
0.1511106938123703,
-0.20454421639442444,
-0.6687842011451721,
0.14584724605083466,
-0.23429924249649048,
0.02891584485769272,
0.26385459303855896,
-0.00010483679216122255,
-0.09192073345184326,
0.5043992400169373,
0.008852427825331688,
-0.45194289088249207,
-0.00706055760383606,
-0.1131063774228096,
-0.2080155909061432,
0.12791264057159424,
-0.21501630544662476,
-0.04482603445649147,
-0.4287726879119873,
-0.16066822409629822,
-0.4050109386444092,
0.23424819111824036,
0.4217059314250946,
0.3483620882034302,
0.24183568358421326,
0.1448751986026764,
-0.2604691982269287,
0.16497787833213806,
-0.053380370140075684,
0.039019860327243805,
0.16846518218517303,
0.1297599971294403,
0.01574677601456642,
0.1131121814250946,
0.3147301971912384,
-0.08487815409898758,
0.13144613802433014,
0.302755206823349,
-0.15515363216400146,
0.1486257016658783,
-0.2968238294124603,
0.05527525395154953,
-0.05779058486223221,
0.5392398238182068,
-0.03413606435060501,
-0.3678927421569824,
0.0674334391951561,
0.017345363274216652,
-0.23995643854141235,
0.19696441292762756,
0.300487220287323,
-0.1930183321237564,
0.08963558077812195,
0.28643831610679626,
-0.051690470427274704,
-0.06290005892515182,
0.09892624616622925,
0.08745133876800537,
0.1200893372297287,
-0.2241750806570053,
0.046342045068740845,
0.13342925906181335,
-0.12949541211128235,
0.23500889539718628,
0.020241525024175644,
-0.29285529255867004,
0.13306504487991333,
-0.44092464447021484,
0.024414606392383575,
0.05100470036268234,
0.01213129237294197,
0.018604908138513565,
0.37889325618743896,
-0.03765178844332695,
0.00023210421204566956,
0.17601843178272247,
0.1840895712375641,
0.1895536482334137,
0.10283291339874268,
0.07154075801372528,
0.003506191074848175,
0.1263796091079712,
0.2101261466741562,
-0.049790527671575546,
-0.13064497709274292,
-0.17664320766925812,
-0.34133318066596985,
0.07800786197185516,
0.1213727667927742,
0.3286728262901306,
-0.05898553133010864,
-0.427051305770874,
0.023949528113007545,
0.1723538339138031,
0.06902819126844406,
-0.08004416525363922,
0.48058807849884033,
-0.1553463637828827,
0.329429030418396,
0.1783151775598526,
0.22648988664150238,
-0.17851252853870392,
-0.3005303144454956,
-0.21591539680957794,
0.14063066244125366,
-0.27959129214286804,
-0.14538908004760742,
0.02933831885457039,
0.024688245728611946,
0.4568537771701813,
-0.11171744018793106,
-0.22273509204387665,
-0.14897489547729492,
0.22611120343208313,
-0.27641192078590393,
-0.12802386283874512,
0.38554033637046814,
-0.014411898329854012,
0.17193977534770966,
0.17336805164813995,
0.011521004140377045,
0.07462555915117264,
-0.002746783196926117,
-0.2583906352519989,
-0.31842541694641113,
-0.22839127480983734,
0.3683522939682007,
0.07826793938875198,
0.10561858117580414,
-0.09796082228422165,
-0.04842812940478325,
0.11204193532466888,
-0.1931559145450592,
-0.034561626613140106,
-0.04156927019357681,
-0.1715950220823288,
-0.32062962651252747,
0.2160150557756424,
0.5213677287101746,
-0.13734041154384613,
-0.1682896614074707,
-0.24254775047302246,
-0.18697714805603027,
0.28441035747528076,
-0.030206594616174698,
-0.22740666568279266,
0.09019234776496887,
-0.25047287344932556,
0.046258941292762756,
0.5648530125617981,
-0.33318430185317993,
-0.4129413068294525,
0.2338256686925888,
-0.18880082666873932,
-0.26704883575439453,
0.2404821813106537,
0.01998133584856987,
0.2917976379394531,
-0.053338076919317245,
0.36682164669036865,
0.3035517930984497,
0.11220048367977142,
0.09092236310243607,
-0.28905797004699707,
-0.16056697070598602,
-0.05511634796857834,
0.03651620075106621,
-0.01535050943493843,
0.08678196370601654,
0.379863977432251,
0.01484664250165224,
0.12530513107776642,
0.036346711218357086,
0.1794193983078003,
0.32283520698547363,
0.2983786463737488,
-0.041851021349430084,
-0.029103996232151985,
-0.17905539274215698,
-0.10141915827989578,
0.09706909209489822,
-0.14870873093605042,
-0.13952811062335968,
-0.192727193236351,
-0.06654681265354156,
-0.2962523102760315,
-0.10102632641792297,
-0.3379625082015991,
-0.40390273928642273,
0.2607390582561493,
0.2557606101036072,
0.01029154658317566,
0.1903301328420639,
-0.15872837603092194,
0.2990477681159973,
-0.12815028429031372,
0.09859713912010193,
-0.04442655295133591,
0.13323093950748444,
-0.20837639272212982,
-0.19715845584869385,
0.04790883511304855,
-0.04191511124372482,
0.20967760682106018,
0.05132124945521355,
-0.2213071584701538,
0.3515276610851288,
0.13364870846271515,
0.35264670848846436,
0.01318228617310524,
-0.29880309104919434,
0.27251937985420227,
-0.47287389636039734,
0.00040135346353054047,
0.13062070310115814,
0.28479963541030884,
-0.027202382683753967,
0.21377095580101013,
-0.0649523138999939,
0.09433408826589584,
0.1363692581653595,
0.22236059606075287,
0.31259411573410034,
0.35975420475006104,
0.006679486483335495,
0.019774528220295906,
-0.15489672124385834,
0.19767406582832336,
0.09712938964366913,
0.12405700981616974,
-0.08774762600660324,
-0.14016874134540558,
0.046381790190935135,
0.4538850784301758,
0.17620237171649933,
0.03485335409641266,
0.06898172944784164,
-0.4656679630279541,
0.06784309446811676,
0.23514510691165924,
0.5774685144424438,
0.573540985584259,
0.19620808959007263,
-0.09667350351810455,
0.11954749375581741,
0.262653648853302,
-0.011760457418859005,
0.39103963971138,
0.05885463207960129,
0.2973281741142273,
0.3018837869167328,
0.0695720687508583,
0.06555873900651932,
-0.24741804599761963,
-0.347367525100708,
-0.017745763063430786,
0.20810486376285553,
-0.21015974879264832,
0.042241260409355164,
-0.18250378966331482,
0.037986911833286285,
-0.19277483224868774,
-0.06389939039945602,
0.1623087227344513,
-0.13721781969070435,
-0.09366482496261597,
0.20348578691482544,
-0.125227153301239,
0.26980704069137573,
-0.25998008251190186,
-0.07745932042598724,
0.17376795411109924,
-0.045702092349529266,
-0.07025475800037384,
-0.1407497376203537,
-0.017585434019565582,
0.05963745340704918,
0.12874867022037506,
0.04418832063674927,
0.3856377601623535,
-0.10879828780889511,
0.13949771225452423,
-0.2698420584201813,
0.01900293678045273,
0.0959816575050354,
0.053802087903022766,
0.1312890648841858,
0.13820171356201172,
0.1123892068862915,
0.07462974637746811,
-0.22016948461532593,
0.4283675253391266,
-0.19458554685115814,
-0.2052067518234253,
0.18634602427482605,
0.02353879064321518,
-0.13801608979701996,
-0.26377934217453003,
-0.4884738624095917,
-0.41247880458831787,
-0.6430259943008423,
-0.03672429919242859,
0.047506872564554214,
0.09605048596858978,
0.2298559993505478,
0.3069297671318054,
0.22885358333587646,
0.06383603066205978,
0.26500123739242554,
-0.1501462161540985,
-0.11194658279418945,
0.31920477747917175,
-0.3666781783103943,
-0.4397985339164734,
0.055533517152071,
-0.10016582161188126,
0.2044408768415451,
0.30616605281829834,
-0.16956166923046112,
0.05344022437930107,
-0.13546742498874664,
-0.11284802854061127,
-0.19283349812030792,
0.2147255539894104,
0.32813572883605957,
0.281632661819458,
-0.2832147479057312,
-0.19891351461410522,
0.1755066066980362,
-0.10355626791715622,
-0.02508620172739029,
0.21830421686172485,
0.031109318137168884,
0.2725067436695099,
-0.1527249664068222,
0.47176826000213623,
0.23120993375778198,
-0.004758365452289581,
0.5463311672210693,
-0.1618594378232956,
0.23490795493125916,
-0.09197080880403519,
-0.3276529610157013,
-0.1128205806016922,
-0.12778523564338684,
0.12687504291534424,
0.09309869259595871,
-0.06647688895463943,
-0.15356728434562683,
-0.22587014734745026,
-0.02762259915471077,
-0.3517998456954956,
0.024523865431547165,
-0.14036573469638824,
-0.15533439815044403,
0.2582378089427948,
-0.13418886065483093,
0.09026508778333664,
0.054387081414461136,
0.21625831723213196,
0.18864019215106964,
0.09134566783905029,
-0.15935537219047546,
0.02245405688881874,
-0.11565597355365753,
-0.10236456245183945,
-0.24347209930419922,
0.13453775644302368,
-0.10242905467748642,
0.3395049273967743,
0.0594177283346653,
-0.106879323720932,
0.04164737090468407,
-0.12437469512224197,
0.484149694442749,
-0.16428571939468384,
0.08949718624353409,
0.019013281911611557,
0.2163313627243042,
-0.4239472448825836,
-0.011654909700155258,
-0.06094861030578613,
0.05012170225381851,
-0.2389344424009323,
0.14439839124679565,
-0.20573662221431732,
-0.07361958920955658,
-0.10077875852584839,
0.05520884320139885,
-0.15522652864456177,
0.1514739841222763,
-0.3370690643787384,
-0.291354775428772,
-0.5706390738487244,
-0.07889419049024582,
-0.060409270226955414,
0.17670653760433197,
0.16742751002311707,
-0.11410698294639587,
-0.1990918070077896,
0.059666261076927185,
-0.0975426733493805,
0.0100229661911726,
0.5705116987228394,
-0.3383443057537079,
0.1523473709821701,
0.03892124816775322,
0.05544833093881607,
0.5304328799247742,
0.8282782435417175,
-0.012919124215841293,
-0.4016418159008026,
-0.042788006365299225,
-0.14498217403888702,
0.1748020052909851,
0.003446057438850403,
-0.23071861267089844,
-0.023126281797885895,
-0.1804942488670349,
0.20934411883354187,
-0.08178816735744476,
0.016674527898430824,
0.47755804657936096,
-0.01712074875831604,
-0.04097871482372284,
-0.3274293839931488,
0.25784388184547424,
-0.06416192650794983,
0.054179757833480835,
0.348702996969223,
0.2043723315000534,
-0.06108789145946503,
0.1980815976858139,
-0.026907354593276978,
0.775759756565094,
0.3213707208633423,
-0.015628818422555923,
0.301547110080719,
-0.19606424868106842,
0.3399156928062439,
-0.31315064430236816,
0.1797804832458496,
-0.29715368151664734,
-0.02366000786423683,
0.008242746815085411,
-0.1804743856191635,
0.2441745400428772,
-0.05351940542459488,
-0.3407014012336731,
0.1377052664756775,
-0.37235182523727417,
-0.06400682032108307,
-0.11289800703525543,
0.0679829865694046,
-0.2030247449874878,
-0.17434044182300568,
-0.23164132237434387,
0.28527843952178955,
-0.0730958878993988,
0.31959155201911926,
-0.09175611287355423,
-0.09823883324861526,
-0.05971621721982956,
-0.3925483822822571,
-0.16108399629592896,
0.23592162132263184,
-0.2569897174835205,
0.22441329061985016,
-0.21450892090797424,
-0.11362452805042267,
0.07831001281738281,
0.20930513739585876,
-0.11662602424621582,
-0.0725332498550415,
-0.16346940398216248,
0.1483350694179535,
0.014172155410051346,
-0.009479164145886898,
-0.20777589082717896,
0.012999358586966991,
0.40800634026527405,
-0.23594388365745544,
-0.22264838218688965,
0.255758136510849,
-0.22250866889953613,
0.01425451785326004,
0.45749086141586304,
0.01079639047384262,
0.052721086889505386,
-0.061547573655843735,
-0.28134188055992126,
-0.07201714813709259,
-0.18000788986682892,
-0.19125835597515106,
0.24518240988254547,
-0.054095640778541565,
-0.3488394320011139,
0.1523236334323883,
0.17695851624011993,
-0.07935274392366409,
-0.05688001587986946,
0.2850613296031952,
-0.006674859672784805,
0.24185392260551453,
0.47649574279785156,
-0.2127920240163803,
-0.23220610618591309,
-0.4195190668106079,
-0.10709045827388763,
-0.0551505871117115,
-0.5111703276634216,
0.21138693392276764,
0.016424478963017464,
-0.03846804052591324,
-0.019038202241063118,
0.016614049673080444,
0.025331752374768257,
0.17236578464508057,
-0.09741061925888062,
-0.49797192215919495,
-0.39595291018486023,
0.05148945748806,
-0.24005188047885895,
0.06177543103694916,
-0.24976029992103577,
-0.09798753261566162,
0.07313722372055054,
-0.06971564143896103,
-0.40405023097991943,
0.18282917141914368,
-0.20531657338142395,
0.19961127638816833,
-0.05159575492143631,
0.01826944202184677,
0.15882866084575653,
-0.0011292253620922565,
0.2210649996995926,
0.1975691318511963,
-0.15879766643047333,
-0.28636613488197327,
-0.19783824682235718,
0.11419713497161865,
-0.015985984355211258,
-0.08139631897211075,
0.06513099372386932,
-0.12826129794120789,
-0.10456448793411255,
-0.05071409046649933,
-0.07161617279052734,
0.040860794484615326,
-0.16875489056110382,
0.1697949916124344,
0.41683143377304077,
0.08637827634811401,
-0.05679536610841751,
0.15386229753494263,
-0.10148634016513824,
0.2444983422756195,
-0.06678976118564606,
-0.040747374296188354,
0.07250770181417465,
-0.08124633878469467,
-0.25585848093032837,
0.05029645562171936,
-0.1135038435459137,
-0.031821250915527344,
0.31958451867103577,
-0.23722489178180695,
0.054882314056158066,
-0.10961346328258514,
0.19361166656017303,
0.47635015845298767,
-0.1447422057390213,
0.115644171833992,
0.1384303867816925,
0.38824671506881714,
-0.38369402289390564,
-0.0495142936706543,
-0.18392236530780792,
-0.10167402029037476,
0.014708805829286575,
-0.02025742083787918,
0.05832669511437416,
-0.3617452085018158,
0.15030184388160706,
0.12647181749343872,
0.20074716210365295,
-0.15592050552368164,
0.30289268493652344,
0.1605338454246521,
0.09336341917514801,
0.10178176313638687,
0.20252938568592072,
0.06529086083173752,
0.23944202065467834,
0.35326695442199707,
-0.44169801473617554,
0.2656025290489197,
0.1704549491405487,
-0.1458304226398468,
-0.21623659133911133,
-0.3706554174423218,
0.2523478865623474,
-0.028181850910186768,
-0.10303176939487457,
0.03558872640132904,
0.03874227777123451,
0.4932484030723572,
-0.04774263873696327,
-0.12798869609832764,
0.033909671008586884,
0.21631057560443878,
-0.1289176642894745,
0.035222116857767105,
0.03889764845371246,
-0.10548096895217896,
-0.08193938434123993,
-0.0017209239304065704,
0.20333857834339142,
-0.1286195069551468,
0.3866729140281677,
0.1883268654346466,
-0.10856522619724274,
-0.3419506549835205,
0.1644071340560913,
0.25837385654449463,
0.11169616878032684,
-0.3154618442058563,
0.10632392019033432,
0.33058205246925354,
0.054124865680933,
-0.02564932033419609,
0.3148108720779419,
0.4991253912448883,
0.4961867034435272,
-0.17068330943584442,
-0.029441189020872116,
0.052151527255773544,
-0.11963870376348495,
-0.06625528633594513,
0.16697272658348083,
0.17284923791885376,
0.02556617558002472,
0.24974144995212555,
0.26764634251594543,
-0.3052578568458557,
-0.05631174519658089,
0.006862502545118332,
-0.050776053220033646,
0.011802060529589653,
0.38508346676826477,
-0.1430981308221817,
-0.1285332292318344,
-0.35023248195648193,
0.020117171108722687,
-0.5803687572479248,
0.06397167593240738,
0.4262367784976959,
0.03036985918879509,
0.12909838557243347,
-0.1708763688802719,
0.12501125037670135,
-0.04311095550656319,
0.2816132605075836,
0.2715853750705719,
0.12326648086309433,
-0.15495169162750244,
-0.27960488200187683,
-0.5030547380447388,
0.208878755569458,
-0.08747181296348572,
-0.01095544546842575,
-0.13077165186405182,
0.14621831476688385,
-0.18884682655334473,
0.15534138679504395,
0.2775542736053467,
0.02944674901664257,
0.23801034688949585,
0.1368386596441269,
-0.3771362006664276,
-0.20440354943275452,
0.03957882523536682,
0.14735610783100128,
-0.00509357824921608,
-0.5665703415870667,
-0.05419242009520531,
-0.4041847884654999,
0.24957051873207092,
-0.12916110455989838,
-0.17399989068508148,
-0.027819937095046043,
-0.11597846448421478,
0.6239941716194153,
-0.04086248576641083,
0.33994823694229126,
-0.20085665583610535,
-0.183844193816185,
-0.11076299846172333,
-0.19156759977340698,
-0.01585034281015396,
-0.1025775596499443,
0.28779277205467224,
0.36566847562789917,
-0.048136137425899506,
-0.10172758996486664,
-0.46547749638557434,
0.34430280327796936,
0.010303836315870285,
-0.009595749899744987,
-0.25939103960990906,
0.326904296875,
-0.04156570881605148,
0.0227622352540493,
-0.019455749541521072,
0.07358980923891068,
-0.16258497536182404,
0.18728648126125336,
-0.5148113369941711,
-0.535101592540741,
0.5774756669998169,
-0.19221225380897522,
-0.252755731344223,
0.11978308856487274,
0.38513779640197754,
0.04100840538740158,
0.02160828188061714,
-0.4395598769187927,
0.1292080581188202,
0.31914910674095154,
-0.10070887953042984,
-0.2627984583377838,
0.24097344279289246,
-0.23580510914325714,
0.04525526985526085,
0.05255884304642677,
0.27060842514038086,
0.03627469390630722,
0.1353696584701538,
0.051550861448049545,
-0.18516217172145844
] |
https://github.com/huggingface/datasets/issues/6308
|
module 'resource' has no attribute 'error'
|
The `fsspec<2023.9.0` upper bound will be removed in the next release. The `ResourceError` fix is also present in version 2023.6.0, so use that version in the meantime (`pip install fsspec==2023.6.0`).
|
### Describe the bug
just run import:
`from datasets import load_dataset`
and then:
```
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\__init__.py", line 10, in <module>
from .streaming_download_manager import StreamingDownloadManager
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\streaming_download_manager.py", line 21, in <module>
from ..filesystems import COMPRESSION_FILESYSTEMS
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\filesystems\__init__.py", line 8, in <module>
import fsspec.asyn
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\fsspec\asyn.py", line 157, in <module>
ResourceEror = resource.error
AttributeError: module 'resource' has no attribute 'error'
Process finished with exit code 1
```
and the error codes are:
```
try:
import resource
except ImportError:
resource = None
ResourceError = OSError
else:
ResourceEror = resource.error
```
1. miss spelling : "ResourceEror " should be "ResourceErorr"
2. module 'resource' has no attribute 'error'
### Steps to reproduce the bug
only one step:
`from datasets import load_dataset`
### Expected behavior
slove error: module 'resource' has no attribute 'error'
### Environment info
python=3.10
datasets==2.14.5
| 30
|
module 'resource' has no attribute 'error'
### Describe the bug
just run import:
`from datasets import load_dataset`
and then:
```
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\__init__.py", line 10, in <module>
from .streaming_download_manager import StreamingDownloadManager
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\streaming_download_manager.py", line 21, in <module>
from ..filesystems import COMPRESSION_FILESYSTEMS
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\filesystems\__init__.py", line 8, in <module>
import fsspec.asyn
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\fsspec\asyn.py", line 157, in <module>
ResourceEror = resource.error
AttributeError: module 'resource' has no attribute 'error'
Process finished with exit code 1
```
and the error codes are:
```
try:
import resource
except ImportError:
resource = None
ResourceError = OSError
else:
ResourceEror = resource.error
```
1. miss spelling : "ResourceEror " should be "ResourceErorr"
2. module 'resource' has no attribute 'error'
### Steps to reproduce the bug
only one step:
`from datasets import load_dataset`
### Expected behavior
slove error: module 'resource' has no attribute 'error'
### Environment info
python=3.10
datasets==2.14.5
The `fsspec<2023.9.0` upper bound will be removed in the next release. The `ResourceError` fix is also present in version 2023.6.0, so use that version in the meantime (`pip install fsspec==2023.6.0`).
|
[
-0.3986870348453522,
-0.19148093461990356,
-0.1268882006406784,
0.32005441188812256,
0.6016739010810852,
-0.017334021627902985,
0.11214491724967957,
0.3475210964679718,
-0.19669869542121887,
0.06287278980016708,
0.03923971951007843,
0.44196373224258423,
-0.10753018409013748,
-0.14714841544628143,
-0.1401032656431198,
-0.1144743263721466,
0.06480216234922409,
0.2609623074531555,
-0.08809159696102142,
-0.03188540041446686,
-0.3673919439315796,
0.20218582451343536,
-0.1020108163356781,
0.04775267466902733,
-0.21952463686466217,
-0.04417978227138519,
0.10654717683792114,
0.1511106938123703,
-0.20454421639442444,
-0.6687842011451721,
0.14584724605083466,
-0.23429924249649048,
0.02891584485769272,
0.26385459303855896,
-0.00010483679216122255,
-0.09192073345184326,
0.5043992400169373,
0.008852427825331688,
-0.45194289088249207,
-0.00706055760383606,
-0.1131063774228096,
-0.2080155909061432,
0.12791264057159424,
-0.21501630544662476,
-0.04482603445649147,
-0.4287726879119873,
-0.16066822409629822,
-0.4050109386444092,
0.23424819111824036,
0.4217059314250946,
0.3483620882034302,
0.24183568358421326,
0.1448751986026764,
-0.2604691982269287,
0.16497787833213806,
-0.053380370140075684,
0.039019860327243805,
0.16846518218517303,
0.1297599971294403,
0.01574677601456642,
0.1131121814250946,
0.3147301971912384,
-0.08487815409898758,
0.13144613802433014,
0.302755206823349,
-0.15515363216400146,
0.1486257016658783,
-0.2968238294124603,
0.05527525395154953,
-0.05779058486223221,
0.5392398238182068,
-0.03413606435060501,
-0.3678927421569824,
0.0674334391951561,
0.017345363274216652,
-0.23995643854141235,
0.19696441292762756,
0.300487220287323,
-0.1930183321237564,
0.08963558077812195,
0.28643831610679626,
-0.051690470427274704,
-0.06290005892515182,
0.09892624616622925,
0.08745133876800537,
0.1200893372297287,
-0.2241750806570053,
0.046342045068740845,
0.13342925906181335,
-0.12949541211128235,
0.23500889539718628,
0.020241525024175644,
-0.29285529255867004,
0.13306504487991333,
-0.44092464447021484,
0.024414606392383575,
0.05100470036268234,
0.01213129237294197,
0.018604908138513565,
0.37889325618743896,
-0.03765178844332695,
0.00023210421204566956,
0.17601843178272247,
0.1840895712375641,
0.1895536482334137,
0.10283291339874268,
0.07154075801372528,
0.003506191074848175,
0.1263796091079712,
0.2101261466741562,
-0.049790527671575546,
-0.13064497709274292,
-0.17664320766925812,
-0.34133318066596985,
0.07800786197185516,
0.1213727667927742,
0.3286728262901306,
-0.05898553133010864,
-0.427051305770874,
0.023949528113007545,
0.1723538339138031,
0.06902819126844406,
-0.08004416525363922,
0.48058807849884033,
-0.1553463637828827,
0.329429030418396,
0.1783151775598526,
0.22648988664150238,
-0.17851252853870392,
-0.3005303144454956,
-0.21591539680957794,
0.14063066244125366,
-0.27959129214286804,
-0.14538908004760742,
0.02933831885457039,
0.024688245728611946,
0.4568537771701813,
-0.11171744018793106,
-0.22273509204387665,
-0.14897489547729492,
0.22611120343208313,
-0.27641192078590393,
-0.12802386283874512,
0.38554033637046814,
-0.014411898329854012,
0.17193977534770966,
0.17336805164813995,
0.011521004140377045,
0.07462555915117264,
-0.002746783196926117,
-0.2583906352519989,
-0.31842541694641113,
-0.22839127480983734,
0.3683522939682007,
0.07826793938875198,
0.10561858117580414,
-0.09796082228422165,
-0.04842812940478325,
0.11204193532466888,
-0.1931559145450592,
-0.034561626613140106,
-0.04156927019357681,
-0.1715950220823288,
-0.32062962651252747,
0.2160150557756424,
0.5213677287101746,
-0.13734041154384613,
-0.1682896614074707,
-0.24254775047302246,
-0.18697714805603027,
0.28441035747528076,
-0.030206594616174698,
-0.22740666568279266,
0.09019234776496887,
-0.25047287344932556,
0.046258941292762756,
0.5648530125617981,
-0.33318430185317993,
-0.4129413068294525,
0.2338256686925888,
-0.18880082666873932,
-0.26704883575439453,
0.2404821813106537,
0.01998133584856987,
0.2917976379394531,
-0.053338076919317245,
0.36682164669036865,
0.3035517930984497,
0.11220048367977142,
0.09092236310243607,
-0.28905797004699707,
-0.16056697070598602,
-0.05511634796857834,
0.03651620075106621,
-0.01535050943493843,
0.08678196370601654,
0.379863977432251,
0.01484664250165224,
0.12530513107776642,
0.036346711218357086,
0.1794193983078003,
0.32283520698547363,
0.2983786463737488,
-0.041851021349430084,
-0.029103996232151985,
-0.17905539274215698,
-0.10141915827989578,
0.09706909209489822,
-0.14870873093605042,
-0.13952811062335968,
-0.192727193236351,
-0.06654681265354156,
-0.2962523102760315,
-0.10102632641792297,
-0.3379625082015991,
-0.40390273928642273,
0.2607390582561493,
0.2557606101036072,
0.01029154658317566,
0.1903301328420639,
-0.15872837603092194,
0.2990477681159973,
-0.12815028429031372,
0.09859713912010193,
-0.04442655295133591,
0.13323093950748444,
-0.20837639272212982,
-0.19715845584869385,
0.04790883511304855,
-0.04191511124372482,
0.20967760682106018,
0.05132124945521355,
-0.2213071584701538,
0.3515276610851288,
0.13364870846271515,
0.35264670848846436,
0.01318228617310524,
-0.29880309104919434,
0.27251937985420227,
-0.47287389636039734,
0.00040135346353054047,
0.13062070310115814,
0.28479963541030884,
-0.027202382683753967,
0.21377095580101013,
-0.0649523138999939,
0.09433408826589584,
0.1363692581653595,
0.22236059606075287,
0.31259411573410034,
0.35975420475006104,
0.006679486483335495,
0.019774528220295906,
-0.15489672124385834,
0.19767406582832336,
0.09712938964366913,
0.12405700981616974,
-0.08774762600660324,
-0.14016874134540558,
0.046381790190935135,
0.4538850784301758,
0.17620237171649933,
0.03485335409641266,
0.06898172944784164,
-0.4656679630279541,
0.06784309446811676,
0.23514510691165924,
0.5774685144424438,
0.573540985584259,
0.19620808959007263,
-0.09667350351810455,
0.11954749375581741,
0.262653648853302,
-0.011760457418859005,
0.39103963971138,
0.05885463207960129,
0.2973281741142273,
0.3018837869167328,
0.0695720687508583,
0.06555873900651932,
-0.24741804599761963,
-0.347367525100708,
-0.017745763063430786,
0.20810486376285553,
-0.21015974879264832,
0.042241260409355164,
-0.18250378966331482,
0.037986911833286285,
-0.19277483224868774,
-0.06389939039945602,
0.1623087227344513,
-0.13721781969070435,
-0.09366482496261597,
0.20348578691482544,
-0.125227153301239,
0.26980704069137573,
-0.25998008251190186,
-0.07745932042598724,
0.17376795411109924,
-0.045702092349529266,
-0.07025475800037384,
-0.1407497376203537,
-0.017585434019565582,
0.05963745340704918,
0.12874867022037506,
0.04418832063674927,
0.3856377601623535,
-0.10879828780889511,
0.13949771225452423,
-0.2698420584201813,
0.01900293678045273,
0.0959816575050354,
0.053802087903022766,
0.1312890648841858,
0.13820171356201172,
0.1123892068862915,
0.07462974637746811,
-0.22016948461532593,
0.4283675253391266,
-0.19458554685115814,
-0.2052067518234253,
0.18634602427482605,
0.02353879064321518,
-0.13801608979701996,
-0.26377934217453003,
-0.4884738624095917,
-0.41247880458831787,
-0.6430259943008423,
-0.03672429919242859,
0.047506872564554214,
0.09605048596858978,
0.2298559993505478,
0.3069297671318054,
0.22885358333587646,
0.06383603066205978,
0.26500123739242554,
-0.1501462161540985,
-0.11194658279418945,
0.31920477747917175,
-0.3666781783103943,
-0.4397985339164734,
0.055533517152071,
-0.10016582161188126,
0.2044408768415451,
0.30616605281829834,
-0.16956166923046112,
0.05344022437930107,
-0.13546742498874664,
-0.11284802854061127,
-0.19283349812030792,
0.2147255539894104,
0.32813572883605957,
0.281632661819458,
-0.2832147479057312,
-0.19891351461410522,
0.1755066066980362,
-0.10355626791715622,
-0.02508620172739029,
0.21830421686172485,
0.031109318137168884,
0.2725067436695099,
-0.1527249664068222,
0.47176826000213623,
0.23120993375778198,
-0.004758365452289581,
0.5463311672210693,
-0.1618594378232956,
0.23490795493125916,
-0.09197080880403519,
-0.3276529610157013,
-0.1128205806016922,
-0.12778523564338684,
0.12687504291534424,
0.09309869259595871,
-0.06647688895463943,
-0.15356728434562683,
-0.22587014734745026,
-0.02762259915471077,
-0.3517998456954956,
0.024523865431547165,
-0.14036573469638824,
-0.15533439815044403,
0.2582378089427948,
-0.13418886065483093,
0.09026508778333664,
0.054387081414461136,
0.21625831723213196,
0.18864019215106964,
0.09134566783905029,
-0.15935537219047546,
0.02245405688881874,
-0.11565597355365753,
-0.10236456245183945,
-0.24347209930419922,
0.13453775644302368,
-0.10242905467748642,
0.3395049273967743,
0.0594177283346653,
-0.106879323720932,
0.04164737090468407,
-0.12437469512224197,
0.484149694442749,
-0.16428571939468384,
0.08949718624353409,
0.019013281911611557,
0.2163313627243042,
-0.4239472448825836,
-0.011654909700155258,
-0.06094861030578613,
0.05012170225381851,
-0.2389344424009323,
0.14439839124679565,
-0.20573662221431732,
-0.07361958920955658,
-0.10077875852584839,
0.05520884320139885,
-0.15522652864456177,
0.1514739841222763,
-0.3370690643787384,
-0.291354775428772,
-0.5706390738487244,
-0.07889419049024582,
-0.060409270226955414,
0.17670653760433197,
0.16742751002311707,
-0.11410698294639587,
-0.1990918070077896,
0.059666261076927185,
-0.0975426733493805,
0.0100229661911726,
0.5705116987228394,
-0.3383443057537079,
0.1523473709821701,
0.03892124816775322,
0.05544833093881607,
0.5304328799247742,
0.8282782435417175,
-0.012919124215841293,
-0.4016418159008026,
-0.042788006365299225,
-0.14498217403888702,
0.1748020052909851,
0.003446057438850403,
-0.23071861267089844,
-0.023126281797885895,
-0.1804942488670349,
0.20934411883354187,
-0.08178816735744476,
0.016674527898430824,
0.47755804657936096,
-0.01712074875831604,
-0.04097871482372284,
-0.3274293839931488,
0.25784388184547424,
-0.06416192650794983,
0.054179757833480835,
0.348702996969223,
0.2043723315000534,
-0.06108789145946503,
0.1980815976858139,
-0.026907354593276978,
0.775759756565094,
0.3213707208633423,
-0.015628818422555923,
0.301547110080719,
-0.19606424868106842,
0.3399156928062439,
-0.31315064430236816,
0.1797804832458496,
-0.29715368151664734,
-0.02366000786423683,
0.008242746815085411,
-0.1804743856191635,
0.2441745400428772,
-0.05351940542459488,
-0.3407014012336731,
0.1377052664756775,
-0.37235182523727417,
-0.06400682032108307,
-0.11289800703525543,
0.0679829865694046,
-0.2030247449874878,
-0.17434044182300568,
-0.23164132237434387,
0.28527843952178955,
-0.0730958878993988,
0.31959155201911926,
-0.09175611287355423,
-0.09823883324861526,
-0.05971621721982956,
-0.3925483822822571,
-0.16108399629592896,
0.23592162132263184,
-0.2569897174835205,
0.22441329061985016,
-0.21450892090797424,
-0.11362452805042267,
0.07831001281738281,
0.20930513739585876,
-0.11662602424621582,
-0.0725332498550415,
-0.16346940398216248,
0.1483350694179535,
0.014172155410051346,
-0.009479164145886898,
-0.20777589082717896,
0.012999358586966991,
0.40800634026527405,
-0.23594388365745544,
-0.22264838218688965,
0.255758136510849,
-0.22250866889953613,
0.01425451785326004,
0.45749086141586304,
0.01079639047384262,
0.052721086889505386,
-0.061547573655843735,
-0.28134188055992126,
-0.07201714813709259,
-0.18000788986682892,
-0.19125835597515106,
0.24518240988254547,
-0.054095640778541565,
-0.3488394320011139,
0.1523236334323883,
0.17695851624011993,
-0.07935274392366409,
-0.05688001587986946,
0.2850613296031952,
-0.006674859672784805,
0.24185392260551453,
0.47649574279785156,
-0.2127920240163803,
-0.23220610618591309,
-0.4195190668106079,
-0.10709045827388763,
-0.0551505871117115,
-0.5111703276634216,
0.21138693392276764,
0.016424478963017464,
-0.03846804052591324,
-0.019038202241063118,
0.016614049673080444,
0.025331752374768257,
0.17236578464508057,
-0.09741061925888062,
-0.49797192215919495,
-0.39595291018486023,
0.05148945748806,
-0.24005188047885895,
0.06177543103694916,
-0.24976029992103577,
-0.09798753261566162,
0.07313722372055054,
-0.06971564143896103,
-0.40405023097991943,
0.18282917141914368,
-0.20531657338142395,
0.19961127638816833,
-0.05159575492143631,
0.01826944202184677,
0.15882866084575653,
-0.0011292253620922565,
0.2210649996995926,
0.1975691318511963,
-0.15879766643047333,
-0.28636613488197327,
-0.19783824682235718,
0.11419713497161865,
-0.015985984355211258,
-0.08139631897211075,
0.06513099372386932,
-0.12826129794120789,
-0.10456448793411255,
-0.05071409046649933,
-0.07161617279052734,
0.040860794484615326,
-0.16875489056110382,
0.1697949916124344,
0.41683143377304077,
0.08637827634811401,
-0.05679536610841751,
0.15386229753494263,
-0.10148634016513824,
0.2444983422756195,
-0.06678976118564606,
-0.040747374296188354,
0.07250770181417465,
-0.08124633878469467,
-0.25585848093032837,
0.05029645562171936,
-0.1135038435459137,
-0.031821250915527344,
0.31958451867103577,
-0.23722489178180695,
0.054882314056158066,
-0.10961346328258514,
0.19361166656017303,
0.47635015845298767,
-0.1447422057390213,
0.115644171833992,
0.1384303867816925,
0.38824671506881714,
-0.38369402289390564,
-0.0495142936706543,
-0.18392236530780792,
-0.10167402029037476,
0.014708805829286575,
-0.02025742083787918,
0.05832669511437416,
-0.3617452085018158,
0.15030184388160706,
0.12647181749343872,
0.20074716210365295,
-0.15592050552368164,
0.30289268493652344,
0.1605338454246521,
0.09336341917514801,
0.10178176313638687,
0.20252938568592072,
0.06529086083173752,
0.23944202065467834,
0.35326695442199707,
-0.44169801473617554,
0.2656025290489197,
0.1704549491405487,
-0.1458304226398468,
-0.21623659133911133,
-0.3706554174423218,
0.2523478865623474,
-0.028181850910186768,
-0.10303176939487457,
0.03558872640132904,
0.03874227777123451,
0.4932484030723572,
-0.04774263873696327,
-0.12798869609832764,
0.033909671008586884,
0.21631057560443878,
-0.1289176642894745,
0.035222116857767105,
0.03889764845371246,
-0.10548096895217896,
-0.08193938434123993,
-0.0017209239304065704,
0.20333857834339142,
-0.1286195069551468,
0.3866729140281677,
0.1883268654346466,
-0.10856522619724274,
-0.3419506549835205,
0.1644071340560913,
0.25837385654449463,
0.11169616878032684,
-0.3154618442058563,
0.10632392019033432,
0.33058205246925354,
0.054124865680933,
-0.02564932033419609,
0.3148108720779419,
0.4991253912448883,
0.4961867034435272,
-0.17068330943584442,
-0.029441189020872116,
0.052151527255773544,
-0.11963870376348495,
-0.06625528633594513,
0.16697272658348083,
0.17284923791885376,
0.02556617558002472,
0.24974144995212555,
0.26764634251594543,
-0.3052578568458557,
-0.05631174519658089,
0.006862502545118332,
-0.050776053220033646,
0.011802060529589653,
0.38508346676826477,
-0.1430981308221817,
-0.1285332292318344,
-0.35023248195648193,
0.020117171108722687,
-0.5803687572479248,
0.06397167593240738,
0.4262367784976959,
0.03036985918879509,
0.12909838557243347,
-0.1708763688802719,
0.12501125037670135,
-0.04311095550656319,
0.2816132605075836,
0.2715853750705719,
0.12326648086309433,
-0.15495169162750244,
-0.27960488200187683,
-0.5030547380447388,
0.208878755569458,
-0.08747181296348572,
-0.01095544546842575,
-0.13077165186405182,
0.14621831476688385,
-0.18884682655334473,
0.15534138679504395,
0.2775542736053467,
0.02944674901664257,
0.23801034688949585,
0.1368386596441269,
-0.3771362006664276,
-0.20440354943275452,
0.03957882523536682,
0.14735610783100128,
-0.00509357824921608,
-0.5665703415870667,
-0.05419242009520531,
-0.4041847884654999,
0.24957051873207092,
-0.12916110455989838,
-0.17399989068508148,
-0.027819937095046043,
-0.11597846448421478,
0.6239941716194153,
-0.04086248576641083,
0.33994823694229126,
-0.20085665583610535,
-0.183844193816185,
-0.11076299846172333,
-0.19156759977340698,
-0.01585034281015396,
-0.1025775596499443,
0.28779277205467224,
0.36566847562789917,
-0.048136137425899506,
-0.10172758996486664,
-0.46547749638557434,
0.34430280327796936,
0.010303836315870285,
-0.009595749899744987,
-0.25939103960990906,
0.326904296875,
-0.04156570881605148,
0.0227622352540493,
-0.019455749541521072,
0.07358980923891068,
-0.16258497536182404,
0.18728648126125336,
-0.5148113369941711,
-0.535101592540741,
0.5774756669998169,
-0.19221225380897522,
-0.252755731344223,
0.11978308856487274,
0.38513779640197754,
0.04100840538740158,
0.02160828188061714,
-0.4395598769187927,
0.1292080581188202,
0.31914910674095154,
-0.10070887953042984,
-0.2627984583377838,
0.24097344279289246,
-0.23580510914325714,
0.04525526985526085,
0.05255884304642677,
0.27060842514038086,
0.03627469390630722,
0.1353696584701538,
0.051550861448049545,
-0.18516217172145844
] |
https://github.com/huggingface/datasets/issues/6308
|
module 'resource' has no attribute 'error'
|
> The `fsspec<2023.9.0` upper bound will be removed in the next release. The `ResourceError` fix is also present in version 2023.6.0, so use that version in the meantime (`pip install fsspec==2023.6.0`).
thanks for reply!
|
### Describe the bug
just run import:
`from datasets import load_dataset`
and then:
```
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\__init__.py", line 10, in <module>
from .streaming_download_manager import StreamingDownloadManager
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\streaming_download_manager.py", line 21, in <module>
from ..filesystems import COMPRESSION_FILESYSTEMS
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\filesystems\__init__.py", line 8, in <module>
import fsspec.asyn
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\fsspec\asyn.py", line 157, in <module>
ResourceEror = resource.error
AttributeError: module 'resource' has no attribute 'error'
Process finished with exit code 1
```
and the error codes are:
```
try:
import resource
except ImportError:
resource = None
ResourceError = OSError
else:
ResourceEror = resource.error
```
1. miss spelling : "ResourceEror " should be "ResourceErorr"
2. module 'resource' has no attribute 'error'
### Steps to reproduce the bug
only one step:
`from datasets import load_dataset`
### Expected behavior
slove error: module 'resource' has no attribute 'error'
### Environment info
python=3.10
datasets==2.14.5
| 34
|
module 'resource' has no attribute 'error'
### Describe the bug
just run import:
`from datasets import load_dataset`
and then:
```
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\__init__.py", line 10, in <module>
from .streaming_download_manager import StreamingDownloadManager
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\download\streaming_download_manager.py", line 21, in <module>
from ..filesystems import COMPRESSION_FILESYSTEMS
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\datasets\filesystems\__init__.py", line 8, in <module>
import fsspec.asyn
File "C:\ProgramData\anaconda3\envs\py310\lib\site-packages\fsspec\asyn.py", line 157, in <module>
ResourceEror = resource.error
AttributeError: module 'resource' has no attribute 'error'
Process finished with exit code 1
```
and the error codes are:
```
try:
import resource
except ImportError:
resource = None
ResourceError = OSError
else:
ResourceEror = resource.error
```
1. miss spelling : "ResourceEror " should be "ResourceErorr"
2. module 'resource' has no attribute 'error'
### Steps to reproduce the bug
only one step:
`from datasets import load_dataset`
### Expected behavior
slove error: module 'resource' has no attribute 'error'
### Environment info
python=3.10
datasets==2.14.5
> The `fsspec<2023.9.0` upper bound will be removed in the next release. The `ResourceError` fix is also present in version 2023.6.0, so use that version in the meantime (`pip install fsspec==2023.6.0`).
thanks for reply!
|
[
-0.3986870348453522,
-0.19148093461990356,
-0.1268882006406784,
0.32005441188812256,
0.6016739010810852,
-0.017334021627902985,
0.11214491724967957,
0.3475210964679718,
-0.19669869542121887,
0.06287278980016708,
0.03923971951007843,
0.44196373224258423,
-0.10753018409013748,
-0.14714841544628143,
-0.1401032656431198,
-0.1144743263721466,
0.06480216234922409,
0.2609623074531555,
-0.08809159696102142,
-0.03188540041446686,
-0.3673919439315796,
0.20218582451343536,
-0.1020108163356781,
0.04775267466902733,
-0.21952463686466217,
-0.04417978227138519,
0.10654717683792114,
0.1511106938123703,
-0.20454421639442444,
-0.6687842011451721,
0.14584724605083466,
-0.23429924249649048,
0.02891584485769272,
0.26385459303855896,
-0.00010483679216122255,
-0.09192073345184326,
0.5043992400169373,
0.008852427825331688,
-0.45194289088249207,
-0.00706055760383606,
-0.1131063774228096,
-0.2080155909061432,
0.12791264057159424,
-0.21501630544662476,
-0.04482603445649147,
-0.4287726879119873,
-0.16066822409629822,
-0.4050109386444092,
0.23424819111824036,
0.4217059314250946,
0.3483620882034302,
0.24183568358421326,
0.1448751986026764,
-0.2604691982269287,
0.16497787833213806,
-0.053380370140075684,
0.039019860327243805,
0.16846518218517303,
0.1297599971294403,
0.01574677601456642,
0.1131121814250946,
0.3147301971912384,
-0.08487815409898758,
0.13144613802433014,
0.302755206823349,
-0.15515363216400146,
0.1486257016658783,
-0.2968238294124603,
0.05527525395154953,
-0.05779058486223221,
0.5392398238182068,
-0.03413606435060501,
-0.3678927421569824,
0.0674334391951561,
0.017345363274216652,
-0.23995643854141235,
0.19696441292762756,
0.300487220287323,
-0.1930183321237564,
0.08963558077812195,
0.28643831610679626,
-0.051690470427274704,
-0.06290005892515182,
0.09892624616622925,
0.08745133876800537,
0.1200893372297287,
-0.2241750806570053,
0.046342045068740845,
0.13342925906181335,
-0.12949541211128235,
0.23500889539718628,
0.020241525024175644,
-0.29285529255867004,
0.13306504487991333,
-0.44092464447021484,
0.024414606392383575,
0.05100470036268234,
0.01213129237294197,
0.018604908138513565,
0.37889325618743896,
-0.03765178844332695,
0.00023210421204566956,
0.17601843178272247,
0.1840895712375641,
0.1895536482334137,
0.10283291339874268,
0.07154075801372528,
0.003506191074848175,
0.1263796091079712,
0.2101261466741562,
-0.049790527671575546,
-0.13064497709274292,
-0.17664320766925812,
-0.34133318066596985,
0.07800786197185516,
0.1213727667927742,
0.3286728262901306,
-0.05898553133010864,
-0.427051305770874,
0.023949528113007545,
0.1723538339138031,
0.06902819126844406,
-0.08004416525363922,
0.48058807849884033,
-0.1553463637828827,
0.329429030418396,
0.1783151775598526,
0.22648988664150238,
-0.17851252853870392,
-0.3005303144454956,
-0.21591539680957794,
0.14063066244125366,
-0.27959129214286804,
-0.14538908004760742,
0.02933831885457039,
0.024688245728611946,
0.4568537771701813,
-0.11171744018793106,
-0.22273509204387665,
-0.14897489547729492,
0.22611120343208313,
-0.27641192078590393,
-0.12802386283874512,
0.38554033637046814,
-0.014411898329854012,
0.17193977534770966,
0.17336805164813995,
0.011521004140377045,
0.07462555915117264,
-0.002746783196926117,
-0.2583906352519989,
-0.31842541694641113,
-0.22839127480983734,
0.3683522939682007,
0.07826793938875198,
0.10561858117580414,
-0.09796082228422165,
-0.04842812940478325,
0.11204193532466888,
-0.1931559145450592,
-0.034561626613140106,
-0.04156927019357681,
-0.1715950220823288,
-0.32062962651252747,
0.2160150557756424,
0.5213677287101746,
-0.13734041154384613,
-0.1682896614074707,
-0.24254775047302246,
-0.18697714805603027,
0.28441035747528076,
-0.030206594616174698,
-0.22740666568279266,
0.09019234776496887,
-0.25047287344932556,
0.046258941292762756,
0.5648530125617981,
-0.33318430185317993,
-0.4129413068294525,
0.2338256686925888,
-0.18880082666873932,
-0.26704883575439453,
0.2404821813106537,
0.01998133584856987,
0.2917976379394531,
-0.053338076919317245,
0.36682164669036865,
0.3035517930984497,
0.11220048367977142,
0.09092236310243607,
-0.28905797004699707,
-0.16056697070598602,
-0.05511634796857834,
0.03651620075106621,
-0.01535050943493843,
0.08678196370601654,
0.379863977432251,
0.01484664250165224,
0.12530513107776642,
0.036346711218357086,
0.1794193983078003,
0.32283520698547363,
0.2983786463737488,
-0.041851021349430084,
-0.029103996232151985,
-0.17905539274215698,
-0.10141915827989578,
0.09706909209489822,
-0.14870873093605042,
-0.13952811062335968,
-0.192727193236351,
-0.06654681265354156,
-0.2962523102760315,
-0.10102632641792297,
-0.3379625082015991,
-0.40390273928642273,
0.2607390582561493,
0.2557606101036072,
0.01029154658317566,
0.1903301328420639,
-0.15872837603092194,
0.2990477681159973,
-0.12815028429031372,
0.09859713912010193,
-0.04442655295133591,
0.13323093950748444,
-0.20837639272212982,
-0.19715845584869385,
0.04790883511304855,
-0.04191511124372482,
0.20967760682106018,
0.05132124945521355,
-0.2213071584701538,
0.3515276610851288,
0.13364870846271515,
0.35264670848846436,
0.01318228617310524,
-0.29880309104919434,
0.27251937985420227,
-0.47287389636039734,
0.00040135346353054047,
0.13062070310115814,
0.28479963541030884,
-0.027202382683753967,
0.21377095580101013,
-0.0649523138999939,
0.09433408826589584,
0.1363692581653595,
0.22236059606075287,
0.31259411573410034,
0.35975420475006104,
0.006679486483335495,
0.019774528220295906,
-0.15489672124385834,
0.19767406582832336,
0.09712938964366913,
0.12405700981616974,
-0.08774762600660324,
-0.14016874134540558,
0.046381790190935135,
0.4538850784301758,
0.17620237171649933,
0.03485335409641266,
0.06898172944784164,
-0.4656679630279541,
0.06784309446811676,
0.23514510691165924,
0.5774685144424438,
0.573540985584259,
0.19620808959007263,
-0.09667350351810455,
0.11954749375581741,
0.262653648853302,
-0.011760457418859005,
0.39103963971138,
0.05885463207960129,
0.2973281741142273,
0.3018837869167328,
0.0695720687508583,
0.06555873900651932,
-0.24741804599761963,
-0.347367525100708,
-0.017745763063430786,
0.20810486376285553,
-0.21015974879264832,
0.042241260409355164,
-0.18250378966331482,
0.037986911833286285,
-0.19277483224868774,
-0.06389939039945602,
0.1623087227344513,
-0.13721781969070435,
-0.09366482496261597,
0.20348578691482544,
-0.125227153301239,
0.26980704069137573,
-0.25998008251190186,
-0.07745932042598724,
0.17376795411109924,
-0.045702092349529266,
-0.07025475800037384,
-0.1407497376203537,
-0.017585434019565582,
0.05963745340704918,
0.12874867022037506,
0.04418832063674927,
0.3856377601623535,
-0.10879828780889511,
0.13949771225452423,
-0.2698420584201813,
0.01900293678045273,
0.0959816575050354,
0.053802087903022766,
0.1312890648841858,
0.13820171356201172,
0.1123892068862915,
0.07462974637746811,
-0.22016948461532593,
0.4283675253391266,
-0.19458554685115814,
-0.2052067518234253,
0.18634602427482605,
0.02353879064321518,
-0.13801608979701996,
-0.26377934217453003,
-0.4884738624095917,
-0.41247880458831787,
-0.6430259943008423,
-0.03672429919242859,
0.047506872564554214,
0.09605048596858978,
0.2298559993505478,
0.3069297671318054,
0.22885358333587646,
0.06383603066205978,
0.26500123739242554,
-0.1501462161540985,
-0.11194658279418945,
0.31920477747917175,
-0.3666781783103943,
-0.4397985339164734,
0.055533517152071,
-0.10016582161188126,
0.2044408768415451,
0.30616605281829834,
-0.16956166923046112,
0.05344022437930107,
-0.13546742498874664,
-0.11284802854061127,
-0.19283349812030792,
0.2147255539894104,
0.32813572883605957,
0.281632661819458,
-0.2832147479057312,
-0.19891351461410522,
0.1755066066980362,
-0.10355626791715622,
-0.02508620172739029,
0.21830421686172485,
0.031109318137168884,
0.2725067436695099,
-0.1527249664068222,
0.47176826000213623,
0.23120993375778198,
-0.004758365452289581,
0.5463311672210693,
-0.1618594378232956,
0.23490795493125916,
-0.09197080880403519,
-0.3276529610157013,
-0.1128205806016922,
-0.12778523564338684,
0.12687504291534424,
0.09309869259595871,
-0.06647688895463943,
-0.15356728434562683,
-0.22587014734745026,
-0.02762259915471077,
-0.3517998456954956,
0.024523865431547165,
-0.14036573469638824,
-0.15533439815044403,
0.2582378089427948,
-0.13418886065483093,
0.09026508778333664,
0.054387081414461136,
0.21625831723213196,
0.18864019215106964,
0.09134566783905029,
-0.15935537219047546,
0.02245405688881874,
-0.11565597355365753,
-0.10236456245183945,
-0.24347209930419922,
0.13453775644302368,
-0.10242905467748642,
0.3395049273967743,
0.0594177283346653,
-0.106879323720932,
0.04164737090468407,
-0.12437469512224197,
0.484149694442749,
-0.16428571939468384,
0.08949718624353409,
0.019013281911611557,
0.2163313627243042,
-0.4239472448825836,
-0.011654909700155258,
-0.06094861030578613,
0.05012170225381851,
-0.2389344424009323,
0.14439839124679565,
-0.20573662221431732,
-0.07361958920955658,
-0.10077875852584839,
0.05520884320139885,
-0.15522652864456177,
0.1514739841222763,
-0.3370690643787384,
-0.291354775428772,
-0.5706390738487244,
-0.07889419049024582,
-0.060409270226955414,
0.17670653760433197,
0.16742751002311707,
-0.11410698294639587,
-0.1990918070077896,
0.059666261076927185,
-0.0975426733493805,
0.0100229661911726,
0.5705116987228394,
-0.3383443057537079,
0.1523473709821701,
0.03892124816775322,
0.05544833093881607,
0.5304328799247742,
0.8282782435417175,
-0.012919124215841293,
-0.4016418159008026,
-0.042788006365299225,
-0.14498217403888702,
0.1748020052909851,
0.003446057438850403,
-0.23071861267089844,
-0.023126281797885895,
-0.1804942488670349,
0.20934411883354187,
-0.08178816735744476,
0.016674527898430824,
0.47755804657936096,
-0.01712074875831604,
-0.04097871482372284,
-0.3274293839931488,
0.25784388184547424,
-0.06416192650794983,
0.054179757833480835,
0.348702996969223,
0.2043723315000534,
-0.06108789145946503,
0.1980815976858139,
-0.026907354593276978,
0.775759756565094,
0.3213707208633423,
-0.015628818422555923,
0.301547110080719,
-0.19606424868106842,
0.3399156928062439,
-0.31315064430236816,
0.1797804832458496,
-0.29715368151664734,
-0.02366000786423683,
0.008242746815085411,
-0.1804743856191635,
0.2441745400428772,
-0.05351940542459488,
-0.3407014012336731,
0.1377052664756775,
-0.37235182523727417,
-0.06400682032108307,
-0.11289800703525543,
0.0679829865694046,
-0.2030247449874878,
-0.17434044182300568,
-0.23164132237434387,
0.28527843952178955,
-0.0730958878993988,
0.31959155201911926,
-0.09175611287355423,
-0.09823883324861526,
-0.05971621721982956,
-0.3925483822822571,
-0.16108399629592896,
0.23592162132263184,
-0.2569897174835205,
0.22441329061985016,
-0.21450892090797424,
-0.11362452805042267,
0.07831001281738281,
0.20930513739585876,
-0.11662602424621582,
-0.0725332498550415,
-0.16346940398216248,
0.1483350694179535,
0.014172155410051346,
-0.009479164145886898,
-0.20777589082717896,
0.012999358586966991,
0.40800634026527405,
-0.23594388365745544,
-0.22264838218688965,
0.255758136510849,
-0.22250866889953613,
0.01425451785326004,
0.45749086141586304,
0.01079639047384262,
0.052721086889505386,
-0.061547573655843735,
-0.28134188055992126,
-0.07201714813709259,
-0.18000788986682892,
-0.19125835597515106,
0.24518240988254547,
-0.054095640778541565,
-0.3488394320011139,
0.1523236334323883,
0.17695851624011993,
-0.07935274392366409,
-0.05688001587986946,
0.2850613296031952,
-0.006674859672784805,
0.24185392260551453,
0.47649574279785156,
-0.2127920240163803,
-0.23220610618591309,
-0.4195190668106079,
-0.10709045827388763,
-0.0551505871117115,
-0.5111703276634216,
0.21138693392276764,
0.016424478963017464,
-0.03846804052591324,
-0.019038202241063118,
0.016614049673080444,
0.025331752374768257,
0.17236578464508057,
-0.09741061925888062,
-0.49797192215919495,
-0.39595291018486023,
0.05148945748806,
-0.24005188047885895,
0.06177543103694916,
-0.24976029992103577,
-0.09798753261566162,
0.07313722372055054,
-0.06971564143896103,
-0.40405023097991943,
0.18282917141914368,
-0.20531657338142395,
0.19961127638816833,
-0.05159575492143631,
0.01826944202184677,
0.15882866084575653,
-0.0011292253620922565,
0.2210649996995926,
0.1975691318511963,
-0.15879766643047333,
-0.28636613488197327,
-0.19783824682235718,
0.11419713497161865,
-0.015985984355211258,
-0.08139631897211075,
0.06513099372386932,
-0.12826129794120789,
-0.10456448793411255,
-0.05071409046649933,
-0.07161617279052734,
0.040860794484615326,
-0.16875489056110382,
0.1697949916124344,
0.41683143377304077,
0.08637827634811401,
-0.05679536610841751,
0.15386229753494263,
-0.10148634016513824,
0.2444983422756195,
-0.06678976118564606,
-0.040747374296188354,
0.07250770181417465,
-0.08124633878469467,
-0.25585848093032837,
0.05029645562171936,
-0.1135038435459137,
-0.031821250915527344,
0.31958451867103577,
-0.23722489178180695,
0.054882314056158066,
-0.10961346328258514,
0.19361166656017303,
0.47635015845298767,
-0.1447422057390213,
0.115644171833992,
0.1384303867816925,
0.38824671506881714,
-0.38369402289390564,
-0.0495142936706543,
-0.18392236530780792,
-0.10167402029037476,
0.014708805829286575,
-0.02025742083787918,
0.05832669511437416,
-0.3617452085018158,
0.15030184388160706,
0.12647181749343872,
0.20074716210365295,
-0.15592050552368164,
0.30289268493652344,
0.1605338454246521,
0.09336341917514801,
0.10178176313638687,
0.20252938568592072,
0.06529086083173752,
0.23944202065467834,
0.35326695442199707,
-0.44169801473617554,
0.2656025290489197,
0.1704549491405487,
-0.1458304226398468,
-0.21623659133911133,
-0.3706554174423218,
0.2523478865623474,
-0.028181850910186768,
-0.10303176939487457,
0.03558872640132904,
0.03874227777123451,
0.4932484030723572,
-0.04774263873696327,
-0.12798869609832764,
0.033909671008586884,
0.21631057560443878,
-0.1289176642894745,
0.035222116857767105,
0.03889764845371246,
-0.10548096895217896,
-0.08193938434123993,
-0.0017209239304065704,
0.20333857834339142,
-0.1286195069551468,
0.3866729140281677,
0.1883268654346466,
-0.10856522619724274,
-0.3419506549835205,
0.1644071340560913,
0.25837385654449463,
0.11169616878032684,
-0.3154618442058563,
0.10632392019033432,
0.33058205246925354,
0.054124865680933,
-0.02564932033419609,
0.3148108720779419,
0.4991253912448883,
0.4961867034435272,
-0.17068330943584442,
-0.029441189020872116,
0.052151527255773544,
-0.11963870376348495,
-0.06625528633594513,
0.16697272658348083,
0.17284923791885376,
0.02556617558002472,
0.24974144995212555,
0.26764634251594543,
-0.3052578568458557,
-0.05631174519658089,
0.006862502545118332,
-0.050776053220033646,
0.011802060529589653,
0.38508346676826477,
-0.1430981308221817,
-0.1285332292318344,
-0.35023248195648193,
0.020117171108722687,
-0.5803687572479248,
0.06397167593240738,
0.4262367784976959,
0.03036985918879509,
0.12909838557243347,
-0.1708763688802719,
0.12501125037670135,
-0.04311095550656319,
0.2816132605075836,
0.2715853750705719,
0.12326648086309433,
-0.15495169162750244,
-0.27960488200187683,
-0.5030547380447388,
0.208878755569458,
-0.08747181296348572,
-0.01095544546842575,
-0.13077165186405182,
0.14621831476688385,
-0.18884682655334473,
0.15534138679504395,
0.2775542736053467,
0.02944674901664257,
0.23801034688949585,
0.1368386596441269,
-0.3771362006664276,
-0.20440354943275452,
0.03957882523536682,
0.14735610783100128,
-0.00509357824921608,
-0.5665703415870667,
-0.05419242009520531,
-0.4041847884654999,
0.24957051873207092,
-0.12916110455989838,
-0.17399989068508148,
-0.027819937095046043,
-0.11597846448421478,
0.6239941716194153,
-0.04086248576641083,
0.33994823694229126,
-0.20085665583610535,
-0.183844193816185,
-0.11076299846172333,
-0.19156759977340698,
-0.01585034281015396,
-0.1025775596499443,
0.28779277205467224,
0.36566847562789917,
-0.048136137425899506,
-0.10172758996486664,
-0.46547749638557434,
0.34430280327796936,
0.010303836315870285,
-0.009595749899744987,
-0.25939103960990906,
0.326904296875,
-0.04156570881605148,
0.0227622352540493,
-0.019455749541521072,
0.07358980923891068,
-0.16258497536182404,
0.18728648126125336,
-0.5148113369941711,
-0.535101592540741,
0.5774756669998169,
-0.19221225380897522,
-0.252755731344223,
0.11978308856487274,
0.38513779640197754,
0.04100840538740158,
0.02160828188061714,
-0.4395598769187927,
0.1292080581188202,
0.31914910674095154,
-0.10070887953042984,
-0.2627984583377838,
0.24097344279289246,
-0.23580510914325714,
0.04525526985526085,
0.05255884304642677,
0.27060842514038086,
0.03627469390630722,
0.1353696584701538,
0.051550861448049545,
-0.18516217172145844
] |
https://github.com/huggingface/datasets/issues/6306
|
pyinstaller : OSError: could not get source code
|
more information:
```
File "text2vec\__init__.py", line 8, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "text2vec\bertmatching_model.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "text2vec\bertmatching_dataset.py", line 7, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\__init__.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\inspect.py", line 30, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\load.py", line 58, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\packaged_modules\__init__.py", line 31, in <module>
File "inspect.py", line 1147, in getsource
File "inspect.py", line 1129, in getsourcelines
File "inspect.py", line 958, in findsource
OSError: could not get source code
```
|
### Describe the bug
I ran a package with pyinstaller and got the following error:
### Steps to reproduce the bug
```
...
File "datasets\__init__.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\inspect.py", line 30, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\load.py", line 58, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\packaged_modules\__init__.py", line 31, in <module>
File "inspect.py", line 1147, in getsource
File "inspect.py", line 1129, in getsourcelines
File "inspect.py", line 958, in findsource
OSError: could not get source code
```
### Expected behavior
I have looked up the relevant information, but I can't find a suitable reason
### Environment info
```python
python 3.10
datasets 2.14.4
pyinstaller 5.6.2
```
| 232
|
pyinstaller : OSError: could not get source code
### Describe the bug
I ran a package with pyinstaller and got the following error:
### Steps to reproduce the bug
```
...
File "datasets\__init__.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\inspect.py", line 30, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\load.py", line 58, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\packaged_modules\__init__.py", line 31, in <module>
File "inspect.py", line 1147, in getsource
File "inspect.py", line 1129, in getsourcelines
File "inspect.py", line 958, in findsource
OSError: could not get source code
```
### Expected behavior
I have looked up the relevant information, but I can't find a suitable reason
### Environment info
```python
python 3.10
datasets 2.14.4
pyinstaller 5.6.2
```
more information:
```
File "text2vec\__init__.py", line 8, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "text2vec\bertmatching_model.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "text2vec\bertmatching_dataset.py", line 7, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\__init__.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\inspect.py", line 30, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\load.py", line 58, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\packaged_modules\__init__.py", line 31, in <module>
File "inspect.py", line 1147, in getsource
File "inspect.py", line 1129, in getsourcelines
File "inspect.py", line 958, in findsource
OSError: could not get source code
```
|
[
-0.3243013620376587,
0.07443602383136749,
-0.07170708477497101,
0.27683454751968384,
0.45608454942703247,
-0.2089208960533142,
0.5486599802970886,
0.31559062004089355,
-0.38898351788520813,
0.24571013450622559,
0.06605983525514603,
0.40918031334877014,
-0.2875104546546936,
0.16560865938663483,
-0.0016394099220633507,
0.1100219339132309,
0.06560418009757996,
0.1123637929558754,
-0.20939448475837708,
0.08640606701374054,
-0.22910243272781372,
0.38692837953567505,
-0.2835204005241394,
0.16589590907096863,
-0.25073468685150146,
0.13338880240917206,
0.012818915769457817,
0.19139954447746277,
-0.4052446484565735,
-0.5468623042106628,
0.14368146657943726,
-0.10238289833068848,
-0.07451602816581726,
0.19417926669120789,
-0.00010314751853002235,
0.14266681671142578,
0.24656489491462708,
-0.02388022094964981,
-0.09377934038639069,
-0.1554848700761795,
0.18691447377204895,
-0.4118407964706421,
-0.025995459407567978,
-0.2176857590675354,
-0.043039947748184204,
-0.05683734640479088,
-0.1110018938779831,
-0.037965960800647736,
0.24040120840072632,
0.30571720004081726,
0.3500744700431824,
0.2720361053943634,
0.4450552463531494,
0.05330244451761246,
0.27232247591018677,
-0.3637581467628479,
-0.014067810028791428,
0.3770344853401184,
0.13425326347351074,
-0.10353854298591614,
0.0631389319896698,
0.10244345664978027,
-0.12029831856489182,
-0.1548665165901184,
-0.08755651861429214,
0.005059070885181427,
0.11893978714942932,
-0.25795477628707886,
-0.020164761692285538,
-0.01774878054857254,
-0.0722070261836052,
-0.20010370016098022,
-0.18508495390415192,
-0.044504351913928986,
0.010337420739233494,
-0.3441544473171234,
0.29176801443099976,
0.00706095015630126,
-0.275936484336853,
0.12424495816230774,
0.2747909128665924,
-0.0058071608655154705,
-0.03429155424237251,
0.01670161262154579,
-0.12222136557102203,
0.29567408561706543,
-0.047228407114744186,
-0.03298664093017578,
0.03641850873827934,
0.005447672680020332,
0.2690792381763458,
0.12136050313711166,
-0.02892167493700981,
0.11753498762845993,
-0.25717252492904663,
0.03844489902257919,
0.18672314286231995,
-0.15428650379180908,
-0.03754667937755585,
-0.025849875062704086,
-0.5250484347343445,
-0.23481914401054382,
-0.0455036498606205,
0.16556349396705627,
-0.04533478990197182,
0.12449382245540619,
-0.13188248872756958,
0.39920109510421753,
0.2205205261707306,
0.48275139927864075,
-0.024036254733800888,
0.12460756301879883,
-0.24480339884757996,
-0.5155587196350098,
-0.023848745971918106,
0.22081723809242249,
0.5077926516532898,
-0.19549623131752014,
-0.21759319305419922,
-0.0693371370434761,
-0.12264152616262436,
0.08764228969812393,
0.13194634020328522,
0.3788928687572479,
0.08301295340061188,
0.20361515879631042,
0.2592201828956604,
-0.08295822143554688,
-0.2307136505842209,
-0.1459636092185974,
-0.20309869945049286,
0.2600802183151245,
-0.12050199508666992,
-0.043486587703228,
0.06421151757240295,
-0.4730110466480255,
0.31769585609436035,
0.08702415972948074,
0.02636689320206642,
-0.1841837614774704,
0.20489652454853058,
-0.04183999076485634,
-0.13200819492340088,
0.12569186091423035,
-0.26008719205856323,
0.043413542211055756,
0.260691374540329,
-0.08447146415710449,
-0.005875594913959503,
0.19609248638153076,
-0.33699607849121094,
-0.4965853989124298,
0.14358508586883545,
0.3331425189971924,
-0.16656577587127686,
0.14472614228725433,
0.39977046847343445,
-0.17858588695526123,
0.29452016949653625,
-0.18891537189483643,
0.25547048449516296,
-0.38170093297958374,
0.21999850869178772,
-0.23929472267627716,
0.45032036304473877,
0.44059234857559204,
-0.20322297513484955,
-0.01997184008359909,
0.10073616355657578,
-0.4410446584224701,
0.24397945404052734,
-0.07232332229614258,
-0.09560012072324753,
0.22465947270393372,
-0.3667697310447693,
0.0059158578515052795,
0.3718416690826416,
-0.1842067390680313,
-0.32782644033432007,
-0.33824872970581055,
-0.4393720030784607,
-0.08359766006469727,
0.32902395725250244,
-0.13285240530967712,
0.31472688913345337,
0.001049079466611147,
0.21199071407318115,
0.12133889645338058,
0.0673823431134224,
0.019183708354830742,
-0.23750072717666626,
-0.24745340645313263,
-0.0028475411236286163,
0.1954691857099533,
0.1926688253879547,
-0.1327914297580719,
0.03659120574593544,
0.15822884440422058,
0.2177722454071045,
0.0040329620242118835,
-0.15541596710681915,
0.2607259750366211,
0.42488566040992737,
0.2097969949245453,
0.08863776177167892,
-0.132859468460083,
0.2938786447048187,
0.18988081812858582,
-0.34649068117141724,
-0.06621300429105759,
-0.22137247025966644,
-0.10224355012178421,
0.10006827861070633,
0.2292860597372055,
-0.16312137246131897,
-0.4015815556049347,
0.28341659903526306,
0.15909762680530548,
-0.14912550151348114,
0.028842639178037643,
-0.1156567931175232,
-0.0038137342780828476,
-0.05662247911095619,
0.09940776973962784,
-0.30942004919052124,
0.2396657019853592,
-0.3032701313495636,
-0.28635409474372864,
0.01607546955347061,
0.21635642647743225,
0.13847903907299042,
-0.1486167162656784,
-0.11615676432847977,
0.2133234143257141,
0.20285823941230774,
0.1222437173128128,
-0.3483869135379791,
-0.20362193882465363,
-0.015532469376921654,
0.043703678995370865,
-0.04386115074157715,
0.07751285284757614,
0.0652361735701561,
-0.004882335662841797,
0.6902897357940674,
0.1542268842458725,
-0.14534208178520203,
0.145758256316185,
0.019876673817634583,
0.17900565266609192,
0.16030587255954742,
-0.05939183011651039,
0.06205351650714874,
-0.13622164726257324,
0.44852200150489807,
0.13693097233772278,
0.22492243349552155,
0.0134901637211442,
-0.22675397992134094,
0.14332500100135803,
0.7327595949172974,
0.07919180393218994,
0.006651978939771652,
-0.16350021958351135,
-0.14733153581619263,
0.12355997413396835,
0.1539401113986969,
0.04248415306210518,
0.16418737173080444,
0.07962515950202942,
-0.4493848383426666,
0.11983901262283325,
0.21304066479206085,
-0.18237939476966858,
0.35075435042381287,
0.07915136963129044,
0.1019180491566658,
0.33579036593437195,
-0.0319305919110775,
-0.04439477622509003,
0.030950374901294708,
-0.35559195280075073,
-0.340897798538208,
0.20256522297859192,
-0.3488287627696991,
-0.02975647896528244,
-0.33885446190834045,
0.3194297254085541,
-0.4481990337371826,
-0.07803931832313538,
0.030197013169527054,
-0.09380117803812027,
0.005883149802684784,
0.18583467602729797,
-0.018518351018428802,
0.27764827013015747,
-0.013939685188233852,
0.1204906478524208,
-0.08486528694629669,
0.03620487079024315,
0.13493020832538605,
-0.1779690384864807,
-0.13772591948509216,
0.09542448818683624,
0.13737066090106964,
-0.11681509763002396,
0.2553018629550934,
-0.19864600896835327,
-0.20486673712730408,
-0.1284664124250412,
-0.18162447214126587,
0.12032091617584229,
-0.11752097308635712,
0.13098159432411194,
0.18839812278747559,
0.1809673011302948,
0.13999608159065247,
-0.06361132115125656,
0.1663379669189453,
-0.021943576633930206,
-0.3390641510486603,
0.19225665926933289,
-0.06864556670188904,
0.07367976009845734,
-0.27322375774383545,
-0.29664620757102966,
-0.37903669476509094,
-0.4424513578414917,
0.02156997099518776,
-0.11547616124153137,
-0.035008154809474945,
0.10076088458299637,
0.25610145926475525,
0.40303608775138855,
0.103350929915905,
0.1280049830675125,
0.07322190701961517,
-0.18368321657180786,
0.2988794147968292,
-0.2228468358516693,
-0.25767505168914795,
-0.06563536822795868,
-0.08907213807106018,
0.033191800117492676,
-0.19123609364032745,
-0.27413541078567505,
-0.14844422042369843,
0.09554464370012283,
0.26078829169273376,
-0.0839204490184784,
0.023212293162941933,
0.5352563858032227,
0.3543834388256073,
-0.07253626734018326,
-0.21231886744499207,
-0.08299235999584198,
0.02418709546327591,
-0.42137327790260315,
0.16251018643379211,
0.0006605908274650574,
0.53120356798172,
-0.10938477516174316,
0.8353713154792786,
0.10520415008068085,
0.05875397101044655,
0.12234318256378174,
0.004305686801671982,
0.34709101915359497,
-0.03623824566602707,
-0.35114097595214844,
-0.04386354237794876,
0.0036989152431488037,
-0.2926079034805298,
-0.07297484576702118,
-0.23844468593597412,
0.34187689423561096,
-0.0008066855370998383,
0.07721784710884094,
-0.16502603888511658,
-0.0060491375625133514,
-0.0042779333889484406,
0.09489905834197998,
0.24022269248962402,
-0.16542573273181915,
0.22997236251831055,
0.05085192993283272,
0.0789322629570961,
0.2573481798171997,
0.25523674488067627,
-0.16482800245285034,
-0.06370559334754944,
0.04044630751013756,
-0.31804218888282776,
-0.3201494812965393,
0.09146756678819656,
0.023640528321266174,
-0.01626615598797798,
0.171188622713089,
-0.034766945987939835,
0.12297928333282471,
-0.34943774342536926,
0.4060208201408386,
0.29782718420028687,
0.14236322045326233,
0.33949366211891174,
-0.16898854076862335,
-0.14744645357131958,
-0.29387909173965454,
-0.2639337182044983,
-0.002611884381622076,
0.2310529202222824,
0.13283413648605347,
-0.3426123857498169,
0.11080443114042282,
0.3284096419811249,
0.31056931614875793,
-0.1651555597782135,
-0.004224996082484722,
-0.23594723641872406,
-0.38812777400016785,
-0.3437032103538513,
-0.21905872225761414,
-0.20115604996681213,
0.3355744183063507,
-0.17648650705814362,
-0.10137616842985153,
0.1168622374534607,
-0.09971751272678375,
-0.2561272382736206,
0.06611986458301544,
0.3663386404514313,
-0.31100308895111084,
0.38910821080207825,
0.15084141492843628,
-0.06507061421871185,
0.4069737195968628,
0.3796193599700928,
-0.03239681199193001,
-0.4434574246406555,
-0.10903603583574295,
0.12199155986309052,
0.012248314917087555,
0.0621526762843132,
-0.5525787472724915,
0.21530979871749878,
-0.23321321606636047,
0.02956739068031311,
0.23458904027938843,
0.01096426509320736,
0.4475078880786896,
0.318541556596756,
-0.010671167634427547,
-0.22725065052509308,
-0.10412050038576126,
-0.15805397927761078,
-0.05535724386572838,
0.5084090232849121,
-0.08738940954208374,
-0.14060604572296143,
0.2713339328765869,
-0.007027730345726013,
0.6449005007743835,
0.1834363043308258,
0.05676538497209549,
0.6014683842658997,
0.012419484555721283,
0.1820303499698639,
0.008456304669380188,
0.15614232420921326,
-0.4229661226272583,
0.04282888025045395,
0.18630897998809814,
-0.3018719255924225,
0.09282407909631729,
-0.27832943201065063,
-0.19596943259239197,
-0.02401631511747837,
-0.2951645255088806,
0.2139231264591217,
-0.07635370641946793,
-0.047325145453214645,
0.3501788079738617,
0.03644729405641556,
-0.09482280164957047,
0.21650664508342743,
-0.09149995446205139,
0.21235567331314087,
-0.17115747928619385,
-0.0412478931248188,
-0.08892647176980972,
-0.29986947774887085,
-0.28811484575271606,
0.1286209225654602,
-0.20903609693050385,
0.419555127620697,
0.24352042376995087,
-0.13366007804870605,
-0.1176508367061615,
0.049245357513427734,
0.05316650867462158,
0.17282725870609283,
0.05941120535135269,
-0.007182065397500992,
0.23533546924591064,
-0.3131258487701416,
0.21636077761650085,
0.15232700109481812,
0.15470077097415924,
-0.2857498228549957,
-0.09071208536624908,
0.3479086458683014,
-0.16339653730392456,
-0.25029802322387695,
0.1765744984149933,
0.03197199106216431,
0.2122008204460144,
-0.01847057417035103,
0.07508072257041931,
0.018585704267024994,
0.22575905919075012,
-0.27570244669914246,
0.23501089215278625,
0.17074742913246155,
-0.1777166724205017,
-0.06438659876585007,
-0.22821132838726044,
-0.11497312784194946,
-0.02366524562239647,
0.1009371429681778,
0.10142603516578674,
0.15470975637435913,
0.667202353477478,
-0.07510139048099518,
-0.14315176010131836,
-0.19970658421516418,
0.35270923376083374,
-0.30767184495925903,
-0.319572389125824,
0.1913371980190277,
0.056015193462371826,
-0.03969429433345795,
-0.09980747103691101,
0.08161084353923798,
0.14924302697181702,
0.10256606340408325,
-0.2858104109764099,
-0.45524707436561584,
-0.3846086263656616,
-0.01986738294363022,
-0.16526536643505096,
-0.00916600227355957,
-0.11600559204816818,
0.20625795423984528,
-0.24924853444099426,
-0.1939876675605774,
-0.37272581458091736,
0.01284329779446125,
-0.32538509368896484,
-0.06742808222770691,
0.006558366119861603,
-0.08062668889760971,
-0.16604182124137878,
0.027720902115106583,
0.2846660017967224,
0.15391087532043457,
-0.06782004237174988,
-0.2848059833049774,
-0.18506231904029846,
0.06466440856456757,
-0.22513526678085327,
-0.06340385973453522,
0.09618944674730301,
0.009701762348413467,
-0.12553249299526215,
0.13689345121383667,
-0.002555685117840767,
0.2534758746623993,
0.0040726810693740845,
-0.08929452300071716,
0.12109693139791489,
0.2217313051223755,
-0.2486506998538971,
0.21535180509090424,
-0.11088789999485016,
0.21695896983146667,
0.010636845603585243,
0.27974745631217957,
0.010742614045739174,
-0.04351894557476044,
0.0053726425394415855,
0.060609765350818634,
-0.06499965488910675,
0.2851200997829437,
0.2899002730846405,
-0.1075296401977539,
0.15725469589233398,
-0.001584020908921957,
0.010785790160298347,
0.4028274416923523,
-0.3170400559902191,
0.18846479058265686,
0.27420955896377563,
0.28433936834335327,
-0.27129465341567993,
0.18282173573970795,
-0.23595044016838074,
-0.21087144315242767,
-0.025944817811250687,
0.11953386664390564,
-0.1814766228199005,
-0.1610635221004486,
0.5355715155601501,
0.194484680891037,
-0.007474564015865326,
0.558165967464447,
0.2145201414823532,
0.12806977331638336,
-0.20752958953380585,
0.11800545454025269,
0.2623467445373535,
-0.022604964673519135,
0.1760183870792389,
-0.030662722885608673,
-0.23571759462356567,
0.03088979236781597,
-0.3209124505519867,
-0.07949593663215637,
0.2083953469991684,
-0.24435293674468994,
-0.013545326888561249,
-0.24095603823661804,
-0.11134649813175201,
-0.1332336664199829,
-0.32268813252449036,
0.2091318666934967,
-0.22605210542678833,
-0.10962853580713272,
0.10322704166173935,
0.332242876291275,
-0.24939072132110596,
0.06324417889118195,
0.04295540601015091,
0.007848843932151794,
-0.07193658500909805,
0.08187620341777802,
0.2028755247592926,
-0.029492303729057312,
0.06295166909694672,
0.06715232133865356,
-0.6053085923194885,
-0.15448415279388428,
0.1272192746400833,
0.13368898630142212,
0.0014190301299095154,
-0.154532328248024,
0.05475417524576187,
0.047595150768756866,
0.1089736670255661,
0.060053709894418716,
0.34870779514312744,
0.44919997453689575,
0.401650607585907,
0.05466758832335472,
-0.2669094204902649,
-0.19880108535289764,
0.06832980364561081,
-0.09321639686822891,
-0.022408604621887207,
-0.041710883378982544,
0.030086316168308258,
0.3155391216278076,
0.22340981662273407,
-0.37076905369758606,
-0.14002811908721924,
0.21473334729671478,
-0.09290914237499237,
-0.1724923700094223,
0.22746211290359497,
0.04581500217318535,
-0.1826608031988144,
-0.21166016161441803,
0.03068174421787262,
-0.41848284006118774,
-0.0477258674800396,
0.4215486943721771,
0.28535017371177673,
-0.19029563665390015,
-0.17906086146831512,
0.16713126003742218,
0.09616446495056152,
0.17048300802707672,
0.24149282276630402,
0.2120431661605835,
-0.12380384653806686,
-0.23315420746803284,
-0.5129255056381226,
0.3650982081890106,
-0.10049563646316528,
-0.2847561836242676,
-0.21064859628677368,
-0.1675208956003189,
-0.06896521896123886,
0.1890314519405365,
0.4470609426498413,
0.3906753659248352,
0.08342459052801132,
0.05314352363348007,
-0.18167045712471008,
-0.26010701060295105,
0.20572996139526367,
-0.29425546526908875,
-0.0027663446962833405,
-0.3888453245162964,
0.09775488078594208,
-0.4129137694835663,
0.23933979868888855,
0.09090367704629898,
-0.14052589237689972,
0.042993586510419846,
-0.29184630513191223,
0.4961647689342499,
0.08349775522947311,
0.10612645000219345,
-0.09993517398834229,
-0.010689504444599152,
-0.17805001139640808,
-0.29127731919288635,
-0.05297451838850975,
0.027503442019224167,
0.022360889241099358,
0.0997493639588356,
-0.02692786231637001,
-0.609829843044281,
-0.45117443799972534,
0.3692108392715454,
-0.050721585750579834,
-0.16692474484443665,
-0.12322499603033066,
0.2561628818511963,
-0.06347598880529404,
0.07878581434488297,
0.13651172816753387,
0.18690800666809082,
-0.04542992264032364,
-0.008248097263276577,
-0.47615379095077515,
-0.23595060408115387,
0.33653175830841064,
-0.4489365518093109,
-0.1049347072839737,
-0.24163185060024261,
0.3690055012702942,
-0.1650753617286682,
0.058331362903118134,
-0.20032085478305817,
0.05391440540552139,
0.3151436746120453,
0.03700971603393555,
-0.2227320373058319,
0.15905791521072388,
-0.023300211876630783,
0.29268181324005127,
-0.0773763656616211,
0.12577611207962036,
0.16055893898010254,
0.2136918157339096,
0.29819411039352417,
-0.08626597374677658
] |
https://github.com/huggingface/datasets/issues/6306
|
pyinstaller : OSError: could not get source code
|
> > '
>
> thanks,I solve it.it's about pyinstaller.
I encountered the same error, how to solve it?
|
### Describe the bug
I ran a package with pyinstaller and got the following error:
### Steps to reproduce the bug
```
...
File "datasets\__init__.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\inspect.py", line 30, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\load.py", line 58, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\packaged_modules\__init__.py", line 31, in <module>
File "inspect.py", line 1147, in getsource
File "inspect.py", line 1129, in getsourcelines
File "inspect.py", line 958, in findsource
OSError: could not get source code
```
### Expected behavior
I have looked up the relevant information, but I can't find a suitable reason
### Environment info
```python
python 3.10
datasets 2.14.4
pyinstaller 5.6.2
```
| 19
|
pyinstaller : OSError: could not get source code
### Describe the bug
I ran a package with pyinstaller and got the following error:
### Steps to reproduce the bug
```
...
File "datasets\__init__.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\inspect.py", line 30, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\load.py", line 58, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "datasets\packaged_modules\__init__.py", line 31, in <module>
File "inspect.py", line 1147, in getsource
File "inspect.py", line 1129, in getsourcelines
File "inspect.py", line 958, in findsource
OSError: could not get source code
```
### Expected behavior
I have looked up the relevant information, but I can't find a suitable reason
### Environment info
```python
python 3.10
datasets 2.14.4
pyinstaller 5.6.2
```
> > '
>
> thanks,I solve it.it's about pyinstaller.
I encountered the same error, how to solve it?
|
[
-0.3243013620376587,
0.07443602383136749,
-0.07170708477497101,
0.27683454751968384,
0.45608454942703247,
-0.2089208960533142,
0.5486599802970886,
0.31559062004089355,
-0.38898351788520813,
0.24571013450622559,
0.06605983525514603,
0.40918031334877014,
-0.2875104546546936,
0.16560865938663483,
-0.0016394099220633507,
0.1100219339132309,
0.06560418009757996,
0.1123637929558754,
-0.20939448475837708,
0.08640606701374054,
-0.22910243272781372,
0.38692837953567505,
-0.2835204005241394,
0.16589590907096863,
-0.25073468685150146,
0.13338880240917206,
0.012818915769457817,
0.19139954447746277,
-0.4052446484565735,
-0.5468623042106628,
0.14368146657943726,
-0.10238289833068848,
-0.07451602816581726,
0.19417926669120789,
-0.00010314751853002235,
0.14266681671142578,
0.24656489491462708,
-0.02388022094964981,
-0.09377934038639069,
-0.1554848700761795,
0.18691447377204895,
-0.4118407964706421,
-0.025995459407567978,
-0.2176857590675354,
-0.043039947748184204,
-0.05683734640479088,
-0.1110018938779831,
-0.037965960800647736,
0.24040120840072632,
0.30571720004081726,
0.3500744700431824,
0.2720361053943634,
0.4450552463531494,
0.05330244451761246,
0.27232247591018677,
-0.3637581467628479,
-0.014067810028791428,
0.3770344853401184,
0.13425326347351074,
-0.10353854298591614,
0.0631389319896698,
0.10244345664978027,
-0.12029831856489182,
-0.1548665165901184,
-0.08755651861429214,
0.005059070885181427,
0.11893978714942932,
-0.25795477628707886,
-0.020164761692285538,
-0.01774878054857254,
-0.0722070261836052,
-0.20010370016098022,
-0.18508495390415192,
-0.044504351913928986,
0.010337420739233494,
-0.3441544473171234,
0.29176801443099976,
0.00706095015630126,
-0.275936484336853,
0.12424495816230774,
0.2747909128665924,
-0.0058071608655154705,
-0.03429155424237251,
0.01670161262154579,
-0.12222136557102203,
0.29567408561706543,
-0.047228407114744186,
-0.03298664093017578,
0.03641850873827934,
0.005447672680020332,
0.2690792381763458,
0.12136050313711166,
-0.02892167493700981,
0.11753498762845993,
-0.25717252492904663,
0.03844489902257919,
0.18672314286231995,
-0.15428650379180908,
-0.03754667937755585,
-0.025849875062704086,
-0.5250484347343445,
-0.23481914401054382,
-0.0455036498606205,
0.16556349396705627,
-0.04533478990197182,
0.12449382245540619,
-0.13188248872756958,
0.39920109510421753,
0.2205205261707306,
0.48275139927864075,
-0.024036254733800888,
0.12460756301879883,
-0.24480339884757996,
-0.5155587196350098,
-0.023848745971918106,
0.22081723809242249,
0.5077926516532898,
-0.19549623131752014,
-0.21759319305419922,
-0.0693371370434761,
-0.12264152616262436,
0.08764228969812393,
0.13194634020328522,
0.3788928687572479,
0.08301295340061188,
0.20361515879631042,
0.2592201828956604,
-0.08295822143554688,
-0.2307136505842209,
-0.1459636092185974,
-0.20309869945049286,
0.2600802183151245,
-0.12050199508666992,
-0.043486587703228,
0.06421151757240295,
-0.4730110466480255,
0.31769585609436035,
0.08702415972948074,
0.02636689320206642,
-0.1841837614774704,
0.20489652454853058,
-0.04183999076485634,
-0.13200819492340088,
0.12569186091423035,
-0.26008719205856323,
0.043413542211055756,
0.260691374540329,
-0.08447146415710449,
-0.005875594913959503,
0.19609248638153076,
-0.33699607849121094,
-0.4965853989124298,
0.14358508586883545,
0.3331425189971924,
-0.16656577587127686,
0.14472614228725433,
0.39977046847343445,
-0.17858588695526123,
0.29452016949653625,
-0.18891537189483643,
0.25547048449516296,
-0.38170093297958374,
0.21999850869178772,
-0.23929472267627716,
0.45032036304473877,
0.44059234857559204,
-0.20322297513484955,
-0.01997184008359909,
0.10073616355657578,
-0.4410446584224701,
0.24397945404052734,
-0.07232332229614258,
-0.09560012072324753,
0.22465947270393372,
-0.3667697310447693,
0.0059158578515052795,
0.3718416690826416,
-0.1842067390680313,
-0.32782644033432007,
-0.33824872970581055,
-0.4393720030784607,
-0.08359766006469727,
0.32902395725250244,
-0.13285240530967712,
0.31472688913345337,
0.001049079466611147,
0.21199071407318115,
0.12133889645338058,
0.0673823431134224,
0.019183708354830742,
-0.23750072717666626,
-0.24745340645313263,
-0.0028475411236286163,
0.1954691857099533,
0.1926688253879547,
-0.1327914297580719,
0.03659120574593544,
0.15822884440422058,
0.2177722454071045,
0.0040329620242118835,
-0.15541596710681915,
0.2607259750366211,
0.42488566040992737,
0.2097969949245453,
0.08863776177167892,
-0.132859468460083,
0.2938786447048187,
0.18988081812858582,
-0.34649068117141724,
-0.06621300429105759,
-0.22137247025966644,
-0.10224355012178421,
0.10006827861070633,
0.2292860597372055,
-0.16312137246131897,
-0.4015815556049347,
0.28341659903526306,
0.15909762680530548,
-0.14912550151348114,
0.028842639178037643,
-0.1156567931175232,
-0.0038137342780828476,
-0.05662247911095619,
0.09940776973962784,
-0.30942004919052124,
0.2396657019853592,
-0.3032701313495636,
-0.28635409474372864,
0.01607546955347061,
0.21635642647743225,
0.13847903907299042,
-0.1486167162656784,
-0.11615676432847977,
0.2133234143257141,
0.20285823941230774,
0.1222437173128128,
-0.3483869135379791,
-0.20362193882465363,
-0.015532469376921654,
0.043703678995370865,
-0.04386115074157715,
0.07751285284757614,
0.0652361735701561,
-0.004882335662841797,
0.6902897357940674,
0.1542268842458725,
-0.14534208178520203,
0.145758256316185,
0.019876673817634583,
0.17900565266609192,
0.16030587255954742,
-0.05939183011651039,
0.06205351650714874,
-0.13622164726257324,
0.44852200150489807,
0.13693097233772278,
0.22492243349552155,
0.0134901637211442,
-0.22675397992134094,
0.14332500100135803,
0.7327595949172974,
0.07919180393218994,
0.006651978939771652,
-0.16350021958351135,
-0.14733153581619263,
0.12355997413396835,
0.1539401113986969,
0.04248415306210518,
0.16418737173080444,
0.07962515950202942,
-0.4493848383426666,
0.11983901262283325,
0.21304066479206085,
-0.18237939476966858,
0.35075435042381287,
0.07915136963129044,
0.1019180491566658,
0.33579036593437195,
-0.0319305919110775,
-0.04439477622509003,
0.030950374901294708,
-0.35559195280075073,
-0.340897798538208,
0.20256522297859192,
-0.3488287627696991,
-0.02975647896528244,
-0.33885446190834045,
0.3194297254085541,
-0.4481990337371826,
-0.07803931832313538,
0.030197013169527054,
-0.09380117803812027,
0.005883149802684784,
0.18583467602729797,
-0.018518351018428802,
0.27764827013015747,
-0.013939685188233852,
0.1204906478524208,
-0.08486528694629669,
0.03620487079024315,
0.13493020832538605,
-0.1779690384864807,
-0.13772591948509216,
0.09542448818683624,
0.13737066090106964,
-0.11681509763002396,
0.2553018629550934,
-0.19864600896835327,
-0.20486673712730408,
-0.1284664124250412,
-0.18162447214126587,
0.12032091617584229,
-0.11752097308635712,
0.13098159432411194,
0.18839812278747559,
0.1809673011302948,
0.13999608159065247,
-0.06361132115125656,
0.1663379669189453,
-0.021943576633930206,
-0.3390641510486603,
0.19225665926933289,
-0.06864556670188904,
0.07367976009845734,
-0.27322375774383545,
-0.29664620757102966,
-0.37903669476509094,
-0.4424513578414917,
0.02156997099518776,
-0.11547616124153137,
-0.035008154809474945,
0.10076088458299637,
0.25610145926475525,
0.40303608775138855,
0.103350929915905,
0.1280049830675125,
0.07322190701961517,
-0.18368321657180786,
0.2988794147968292,
-0.2228468358516693,
-0.25767505168914795,
-0.06563536822795868,
-0.08907213807106018,
0.033191800117492676,
-0.19123609364032745,
-0.27413541078567505,
-0.14844422042369843,
0.09554464370012283,
0.26078829169273376,
-0.0839204490184784,
0.023212293162941933,
0.5352563858032227,
0.3543834388256073,
-0.07253626734018326,
-0.21231886744499207,
-0.08299235999584198,
0.02418709546327591,
-0.42137327790260315,
0.16251018643379211,
0.0006605908274650574,
0.53120356798172,
-0.10938477516174316,
0.8353713154792786,
0.10520415008068085,
0.05875397101044655,
0.12234318256378174,
0.004305686801671982,
0.34709101915359497,
-0.03623824566602707,
-0.35114097595214844,
-0.04386354237794876,
0.0036989152431488037,
-0.2926079034805298,
-0.07297484576702118,
-0.23844468593597412,
0.34187689423561096,
-0.0008066855370998383,
0.07721784710884094,
-0.16502603888511658,
-0.0060491375625133514,
-0.0042779333889484406,
0.09489905834197998,
0.24022269248962402,
-0.16542573273181915,
0.22997236251831055,
0.05085192993283272,
0.0789322629570961,
0.2573481798171997,
0.25523674488067627,
-0.16482800245285034,
-0.06370559334754944,
0.04044630751013756,
-0.31804218888282776,
-0.3201494812965393,
0.09146756678819656,
0.023640528321266174,
-0.01626615598797798,
0.171188622713089,
-0.034766945987939835,
0.12297928333282471,
-0.34943774342536926,
0.4060208201408386,
0.29782718420028687,
0.14236322045326233,
0.33949366211891174,
-0.16898854076862335,
-0.14744645357131958,
-0.29387909173965454,
-0.2639337182044983,
-0.002611884381622076,
0.2310529202222824,
0.13283413648605347,
-0.3426123857498169,
0.11080443114042282,
0.3284096419811249,
0.31056931614875793,
-0.1651555597782135,
-0.004224996082484722,
-0.23594723641872406,
-0.38812777400016785,
-0.3437032103538513,
-0.21905872225761414,
-0.20115604996681213,
0.3355744183063507,
-0.17648650705814362,
-0.10137616842985153,
0.1168622374534607,
-0.09971751272678375,
-0.2561272382736206,
0.06611986458301544,
0.3663386404514313,
-0.31100308895111084,
0.38910821080207825,
0.15084141492843628,
-0.06507061421871185,
0.4069737195968628,
0.3796193599700928,
-0.03239681199193001,
-0.4434574246406555,
-0.10903603583574295,
0.12199155986309052,
0.012248314917087555,
0.0621526762843132,
-0.5525787472724915,
0.21530979871749878,
-0.23321321606636047,
0.02956739068031311,
0.23458904027938843,
0.01096426509320736,
0.4475078880786896,
0.318541556596756,
-0.010671167634427547,
-0.22725065052509308,
-0.10412050038576126,
-0.15805397927761078,
-0.05535724386572838,
0.5084090232849121,
-0.08738940954208374,
-0.14060604572296143,
0.2713339328765869,
-0.007027730345726013,
0.6449005007743835,
0.1834363043308258,
0.05676538497209549,
0.6014683842658997,
0.012419484555721283,
0.1820303499698639,
0.008456304669380188,
0.15614232420921326,
-0.4229661226272583,
0.04282888025045395,
0.18630897998809814,
-0.3018719255924225,
0.09282407909631729,
-0.27832943201065063,
-0.19596943259239197,
-0.02401631511747837,
-0.2951645255088806,
0.2139231264591217,
-0.07635370641946793,
-0.047325145453214645,
0.3501788079738617,
0.03644729405641556,
-0.09482280164957047,
0.21650664508342743,
-0.09149995446205139,
0.21235567331314087,
-0.17115747928619385,
-0.0412478931248188,
-0.08892647176980972,
-0.29986947774887085,
-0.28811484575271606,
0.1286209225654602,
-0.20903609693050385,
0.419555127620697,
0.24352042376995087,
-0.13366007804870605,
-0.1176508367061615,
0.049245357513427734,
0.05316650867462158,
0.17282725870609283,
0.05941120535135269,
-0.007182065397500992,
0.23533546924591064,
-0.3131258487701416,
0.21636077761650085,
0.15232700109481812,
0.15470077097415924,
-0.2857498228549957,
-0.09071208536624908,
0.3479086458683014,
-0.16339653730392456,
-0.25029802322387695,
0.1765744984149933,
0.03197199106216431,
0.2122008204460144,
-0.01847057417035103,
0.07508072257041931,
0.018585704267024994,
0.22575905919075012,
-0.27570244669914246,
0.23501089215278625,
0.17074742913246155,
-0.1777166724205017,
-0.06438659876585007,
-0.22821132838726044,
-0.11497312784194946,
-0.02366524562239647,
0.1009371429681778,
0.10142603516578674,
0.15470975637435913,
0.667202353477478,
-0.07510139048099518,
-0.14315176010131836,
-0.19970658421516418,
0.35270923376083374,
-0.30767184495925903,
-0.319572389125824,
0.1913371980190277,
0.056015193462371826,
-0.03969429433345795,
-0.09980747103691101,
0.08161084353923798,
0.14924302697181702,
0.10256606340408325,
-0.2858104109764099,
-0.45524707436561584,
-0.3846086263656616,
-0.01986738294363022,
-0.16526536643505096,
-0.00916600227355957,
-0.11600559204816818,
0.20625795423984528,
-0.24924853444099426,
-0.1939876675605774,
-0.37272581458091736,
0.01284329779446125,
-0.32538509368896484,
-0.06742808222770691,
0.006558366119861603,
-0.08062668889760971,
-0.16604182124137878,
0.027720902115106583,
0.2846660017967224,
0.15391087532043457,
-0.06782004237174988,
-0.2848059833049774,
-0.18506231904029846,
0.06466440856456757,
-0.22513526678085327,
-0.06340385973453522,
0.09618944674730301,
0.009701762348413467,
-0.12553249299526215,
0.13689345121383667,
-0.002555685117840767,
0.2534758746623993,
0.0040726810693740845,
-0.08929452300071716,
0.12109693139791489,
0.2217313051223755,
-0.2486506998538971,
0.21535180509090424,
-0.11088789999485016,
0.21695896983146667,
0.010636845603585243,
0.27974745631217957,
0.010742614045739174,
-0.04351894557476044,
0.0053726425394415855,
0.060609765350818634,
-0.06499965488910675,
0.2851200997829437,
0.2899002730846405,
-0.1075296401977539,
0.15725469589233398,
-0.001584020908921957,
0.010785790160298347,
0.4028274416923523,
-0.3170400559902191,
0.18846479058265686,
0.27420955896377563,
0.28433936834335327,
-0.27129465341567993,
0.18282173573970795,
-0.23595044016838074,
-0.21087144315242767,
-0.025944817811250687,
0.11953386664390564,
-0.1814766228199005,
-0.1610635221004486,
0.5355715155601501,
0.194484680891037,
-0.007474564015865326,
0.558165967464447,
0.2145201414823532,
0.12806977331638336,
-0.20752958953380585,
0.11800545454025269,
0.2623467445373535,
-0.022604964673519135,
0.1760183870792389,
-0.030662722885608673,
-0.23571759462356567,
0.03088979236781597,
-0.3209124505519867,
-0.07949593663215637,
0.2083953469991684,
-0.24435293674468994,
-0.013545326888561249,
-0.24095603823661804,
-0.11134649813175201,
-0.1332336664199829,
-0.32268813252449036,
0.2091318666934967,
-0.22605210542678833,
-0.10962853580713272,
0.10322704166173935,
0.332242876291275,
-0.24939072132110596,
0.06324417889118195,
0.04295540601015091,
0.007848843932151794,
-0.07193658500909805,
0.08187620341777802,
0.2028755247592926,
-0.029492303729057312,
0.06295166909694672,
0.06715232133865356,
-0.6053085923194885,
-0.15448415279388428,
0.1272192746400833,
0.13368898630142212,
0.0014190301299095154,
-0.154532328248024,
0.05475417524576187,
0.047595150768756866,
0.1089736670255661,
0.060053709894418716,
0.34870779514312744,
0.44919997453689575,
0.401650607585907,
0.05466758832335472,
-0.2669094204902649,
-0.19880108535289764,
0.06832980364561081,
-0.09321639686822891,
-0.022408604621887207,
-0.041710883378982544,
0.030086316168308258,
0.3155391216278076,
0.22340981662273407,
-0.37076905369758606,
-0.14002811908721924,
0.21473334729671478,
-0.09290914237499237,
-0.1724923700094223,
0.22746211290359497,
0.04581500217318535,
-0.1826608031988144,
-0.21166016161441803,
0.03068174421787262,
-0.41848284006118774,
-0.0477258674800396,
0.4215486943721771,
0.28535017371177673,
-0.19029563665390015,
-0.17906086146831512,
0.16713126003742218,
0.09616446495056152,
0.17048300802707672,
0.24149282276630402,
0.2120431661605835,
-0.12380384653806686,
-0.23315420746803284,
-0.5129255056381226,
0.3650982081890106,
-0.10049563646316528,
-0.2847561836242676,
-0.21064859628677368,
-0.1675208956003189,
-0.06896521896123886,
0.1890314519405365,
0.4470609426498413,
0.3906753659248352,
0.08342459052801132,
0.05314352363348007,
-0.18167045712471008,
-0.26010701060295105,
0.20572996139526367,
-0.29425546526908875,
-0.0027663446962833405,
-0.3888453245162964,
0.09775488078594208,
-0.4129137694835663,
0.23933979868888855,
0.09090367704629898,
-0.14052589237689972,
0.042993586510419846,
-0.29184630513191223,
0.4961647689342499,
0.08349775522947311,
0.10612645000219345,
-0.09993517398834229,
-0.010689504444599152,
-0.17805001139640808,
-0.29127731919288635,
-0.05297451838850975,
0.027503442019224167,
0.022360889241099358,
0.0997493639588356,
-0.02692786231637001,
-0.609829843044281,
-0.45117443799972534,
0.3692108392715454,
-0.050721585750579834,
-0.16692474484443665,
-0.12322499603033066,
0.2561628818511963,
-0.06347598880529404,
0.07878581434488297,
0.13651172816753387,
0.18690800666809082,
-0.04542992264032364,
-0.008248097263276577,
-0.47615379095077515,
-0.23595060408115387,
0.33653175830841064,
-0.4489365518093109,
-0.1049347072839737,
-0.24163185060024261,
0.3690055012702942,
-0.1650753617286682,
0.058331362903118134,
-0.20032085478305817,
0.05391440540552139,
0.3151436746120453,
0.03700971603393555,
-0.2227320373058319,
0.15905791521072388,
-0.023300211876630783,
0.29268181324005127,
-0.0773763656616211,
0.12577611207962036,
0.16055893898010254,
0.2136918157339096,
0.29819411039352417,
-0.08626597374677658
] |
https://github.com/huggingface/datasets/issues/6303
|
Parquet uploads off-by-one naming scheme
|
You can find the reasoning behind this naming scheme [here](https://github.com/huggingface/transformers/pull/16343#discussion_r931182168).
This point has been raised several times, so I'd be okay with starting with `00001-` (also to be consistent with the `transformers` sharding), but I'm not sure @lhoestq agrees.
|
### Describe the bug
I noticed this numbering scheme not matching up in a different project and wanted to raise it as an issue for discussion, what is the actual proper way to have these stored?
<img width="425" alt="image" src="https://github.com/huggingface/datasets/assets/1981179/3ffa2144-7c9a-446f-b521-a5e9db71e7ce">
The `-SSSSS-of-NNNNN` seems to be used widely across the codebase. The section that creates the part in my screenshot is here https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L5287
There are also some edits to this section in the single commit branch.
### Steps to reproduce the bug
1. Upload a dataset that requires at least two parquet files in it
2. Observe the naming scheme
### Expected behavior
The couple options here are of course **1. keeping it as is**
**2. Starting the index at 1:**
train-00001-of-00002-{hash}.parquet
train-00002-of-00002-{hash}.parquet
**3. My preferred option** (which would solve my specific issue), dropping the total entirely:
train-00000-{hash}.parquet
train-00001-{hash}.parquet
This also solves an issue that will occur with an `append` variable for `push_to_hub` (see https://github.com/huggingface/datasets/issues/6290) where as you add a new parquet file, you need to rename everything in the repo as well.
However, I know there are parts of the repo that use 0 as the starting file or may require the total, so raising the question for discussion.
### Environment info
- `datasets` version: 2.14.6.dev0
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.18.0
- PyArrow version: 12.0.1
- Pandas version: 1.5.3
| 39
|
Parquet uploads off-by-one naming scheme
### Describe the bug
I noticed this numbering scheme not matching up in a different project and wanted to raise it as an issue for discussion, what is the actual proper way to have these stored?
<img width="425" alt="image" src="https://github.com/huggingface/datasets/assets/1981179/3ffa2144-7c9a-446f-b521-a5e9db71e7ce">
The `-SSSSS-of-NNNNN` seems to be used widely across the codebase. The section that creates the part in my screenshot is here https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L5287
There are also some edits to this section in the single commit branch.
### Steps to reproduce the bug
1. Upload a dataset that requires at least two parquet files in it
2. Observe the naming scheme
### Expected behavior
The couple options here are of course **1. keeping it as is**
**2. Starting the index at 1:**
train-00001-of-00002-{hash}.parquet
train-00002-of-00002-{hash}.parquet
**3. My preferred option** (which would solve my specific issue), dropping the total entirely:
train-00000-{hash}.parquet
train-00001-{hash}.parquet
This also solves an issue that will occur with an `append` variable for `push_to_hub` (see https://github.com/huggingface/datasets/issues/6290) where as you add a new parquet file, you need to rename everything in the repo as well.
However, I know there are parts of the repo that use 0 as the starting file or may require the total, so raising the question for discussion.
### Environment info
- `datasets` version: 2.14.6.dev0
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.18.0
- PyArrow version: 12.0.1
- Pandas version: 1.5.3
You can find the reasoning behind this naming scheme [here](https://github.com/huggingface/transformers/pull/16343#discussion_r931182168).
This point has been raised several times, so I'd be okay with starting with `00001-` (also to be consistent with the `transformers` sharding), but I'm not sure @lhoestq agrees.
|
[
0.2461010068655014,
-0.06340612471103668,
0.08091813325881958,
0.5036107301712036,
0.0656275749206543,
-0.12215182185173035,
0.30422115325927734,
-0.0827028900384903,
-0.20878209173679352,
0.15902912616729736,
0.3500998020172119,
0.2090575397014618,
0.11546854674816132,
0.28047600388526917,
0.20605699717998505,
0.04387945681810379,
0.2959124445915222,
-0.12454409897327423,
0.22797797620296478,
-0.02627451717853546,
-0.1517850160598755,
0.19171999394893646,
0.042020656168460846,
-0.047432467341423035,
-0.16429083049297333,
0.1066712737083435,
-0.2331256866455078,
0.09522493183612823,
0.04840222746133804,
-0.482241690158844,
0.02250724472105503,
0.04625072330236435,
-0.22419807314872742,
0.5083218812942505,
-0.00012444239109754562,
-0.2929535508155823,
0.1260194629430771,
-0.29206347465515137,
-0.19847550988197327,
-0.1187620609998703,
-0.08398693799972534,
-0.28448522090911865,
0.05866391956806183,
-0.36518433690071106,
0.01210566982626915,
-0.15713189542293549,
0.20160411298274994,
-0.2717970609664917,
0.0036449581384658813,
-0.0446687750518322,
0.08755914866924286,
-0.1632450968027115,
0.218291237950325,
0.0491439625620842,
0.3528144955635071,
0.0810704156756401,
-0.1528315544128418,
0.15573526918888092,
0.030451364815235138,
0.1126079261302948,
0.04868975654244423,
0.18330679833889008,
0.29638856649398804,
-0.2749285101890564,
0.3264439105987549,
0.26462069153785706,
0.1689361333847046,
-0.055259086191654205,
0.07506118714809418,
0.05881672725081444,
-0.014943018555641174,
-0.1486615538597107,
-0.3887081444263458,
-0.5963142514228821,
-0.14939682185649872,
-0.23811742663383484,
0.3475702404975891,
0.37313276529312134,
0.26946917176246643,
0.11410151422023773,
-0.017021290957927704,
0.07300720363855362,
-0.07940934598445892,
0.35445457696914673,
0.0735168606042862,
-0.15327592194080353,
-0.23376525938510895,
0.18019771575927734,
-0.2954401969909668,
-0.4835842251777649,
-0.3016692101955414,
-0.38050636649131775,
0.17247053980827332,
0.02425556629896164,
-0.16435426473617554,
0.10695366561412811,
0.1580790877342224,
0.1262025386095047,
0.1555817425251007,
0.025358397513628006,
0.0013671088963747025,
-0.06339126825332642,
0.0427507720887661,
0.0020463205873966217,
0.40918344259262085,
0.16983111202716827,
0.2852060794830322,
-0.26093626022338867,
0.06044001132249832,
0.40177664160728455,
0.32674717903137207,
-0.12080516666173935,
-0.06812412291765213,
0.11498629301786423,
-0.30480286478996277,
-0.45635083317756653,
0.08795206993818283,
-0.1527959108352661,
-0.020127419382333755,
0.15487051010131836,
0.11394823342561722,
0.1231454461812973,
0.31967297196388245,
0.14519986510276794,
0.13410894572734833,
0.14976829290390015,
-0.17331115901470184,
0.06084146350622177,
-0.023434212431311607,
-0.36572426557540894,
-0.21130475401878357,
-0.09156104922294617,
-0.34943464398384094,
0.10771548748016357,
0.09195290505886078,
-0.40445980429649353,
0.1644883155822754,
0.23977972567081451,
0.16828075051307678,
-0.1854449063539505,
0.13124504685401917,
-0.1154184341430664,
0.20054835081100464,
0.08710025250911713,
-0.3086095154285431,
0.16425754129886627,
0.12592889368534088,
-0.19527842104434967,
-0.1315443366765976,
0.046553827822208405,
-0.6727333664894104,
-0.2869769334793091,
-0.0037086214870214462,
0.04547566547989845,
-0.193184033036232,
-0.10604919493198395,
-0.5483251810073853,
0.34265220165252686,
0.4568098485469818,
-0.07105229049921036,
0.04844960942864418,
0.11084569990634918,
-0.13153581321239471,
-0.2330608367919922,
0.0011466071009635925,
0.4239223003387451,
-0.19985909759998322,
-0.14607001841068268,
0.026231734082102776,
0.03203520551323891,
0.3785471022129059,
0.27864283323287964,
-0.22044917941093445,
-0.22509753704071045,
-0.1880887746810913,
0.39055901765823364,
0.34903010725975037,
-0.13922332227230072,
-0.15330232679843903,
-0.030846979469060898,
-0.13166314363479614,
-0.14482492208480835,
0.339091032743454,
0.012131871655583382,
0.2825886011123657,
-0.21344240009784698,
0.21331635117530823,
-0.25068938732147217,
-0.07520968466997147,
0.13810552656650543,
-0.2798801064491272,
-0.20227620005607605,
-0.14543657004833221,
-0.007609467953443527,
-0.18893606960773468,
-0.3656623959541321,
0.14011751115322113,
-0.2571517825126648,
0.03848867490887642,
-0.11182248592376709,
0.22083963453769684,
0.15488207340240479,
0.16914790868759155,
0.38243669271469116,
0.1417696475982666,
0.14201799035072327,
-0.5726288557052612,
0.31063762307167053,
0.21984022855758667,
-0.3028438091278076,
-0.13810524344444275,
-0.23555457592010498,
-0.11558306962251663,
-0.26294106245040894,
-0.049443673342466354,
0.01825680024921894,
-0.027460474520921707,
0.2595286965370178,
-0.2090483009815216,
-0.24779725074768066,
-0.4321824908256531,
0.2695562243461609,
-0.3110347390174866,
0.1130695566534996,
-0.48580408096313477,
0.3299214243888855,
0.0689082220196724,
-0.38538244366645813,
-0.08111359924077988,
0.22172126173973083,
0.3095560669898987,
-0.19349436461925507,
0.3194837272167206,
0.5939047336578369,
0.3903365135192871,
0.06031172350049019,
0.30307093262672424,
0.24501720070838928,
0.08377217501401901,
0.03380164876580238,
-0.047302812337875366,
-0.08997231721878052,
-0.047575026750564575,
0.020718231797218323,
-0.6829323172569275,
0.3604966402053833,
-0.1628008782863617,
0.09897405654191971,
-0.06390979886054993,
-0.275892049074173,
0.07256883382797241,
0.26688069105148315,
-0.364471971988678,
-0.31821346282958984,
0.16308173537254333,
0.1934853196144104,
0.21940173208713531,
0.20388758182525635,
-0.41610440611839294,
0.22097428143024445,
0.5856571197509766,
0.23451146483421326,
-0.12488732486963272,
-0.003679320216178894,
0.17759305238723755,
-0.2696247100830078,
0.1054307296872139,
0.08194440603256226,
0.14358454942703247,
0.09316198527812958,
0.011546969413757324,
-0.18430086970329285,
0.2220771312713623,
-0.14280706644058228,
0.1623559147119522,
0.24507462978363037,
-0.2093600034713745,
0.08861175179481506,
0.48325714468955994,
-0.05852806195616722,
-0.4408136308193207,
0.03907255455851555,
0.11796169728040695,
0.020772144198417664,
-0.4629938006401062,
0.22083565592765808,
-0.11130774021148682,
0.08302706480026245,
-0.6106058359146118,
0.10380962491035461,
-0.6282735466957092,
-0.12077273428440094,
0.08762748539447784,
0.05444490537047386,
-0.29571858048439026,
0.1470295786857605,
-0.03397751227021217,
0.35266685485839844,
-0.340549111366272,
-0.15077733993530273,
-0.11698904633522034,
-0.04756489768624306,
-0.1360381543636322,
-0.13284294307231903,
0.139919251203537,
-0.2051311731338501,
0.3838436007499695,
-0.173969566822052,
-0.36659371852874756,
-0.4288146495819092,
-0.5426888465881348,
0.08378616720438004,
-0.0689905658364296,
-0.07660939544439316,
0.27298441529273987,
-0.058411166071891785,
-0.3174753189086914,
-0.11839987337589264,
0.20343630015850067,
0.0324058011174202,
-0.22963117063045502,
0.17890098690986633,
0.0851452574133873,
0.15354880690574646,
-0.3781468868255615,
-0.22352352738380432,
0.2596721053123474,
-0.07806297391653061,
0.5481627583503723,
0.26803192496299744,
0.3189324736595154,
-0.07389876991510391,
-0.32210442423820496,
0.07049578428268433,
-0.3558964729309082,
0.16621924936771393,
-0.26420652866363525,
-0.5592426657676697,
0.29115012288093567,
0.10185825824737549,
-0.1304251104593277,
0.252519816160202,
0.0470353439450264,
-0.1054912656545639,
0.029019994661211967,
-0.06542955338954926,
-0.47895947098731995,
0.1462436318397522,
0.013528276234865189,
0.26037871837615967,
0.2430037409067154,
0.2752419114112854,
-0.09281910955905914,
0.006324028596282005,
-0.297258198261261,
-0.020031465217471123,
0.3908569812774658,
0.23665517568588257,
0.31095537543296814,
0.19525006413459778,
0.2913704812526703,
0.3111209273338318,
0.7338733077049255,
0.4331395626068115,
0.1257842630147934,
0.30778056383132935,
-0.005306603386998177,
0.2447405457496643,
-0.12800166010856628,
0.23557627201080322,
0.08641329407691956,
0.20851939916610718,
0.0841032862663269,
0.45696061849594116,
0.16923800110816956,
0.17930597066879272,
-0.0074446238577365875,
0.27412956953048706,
-0.16259221732616425,
-0.08632829785346985,
-0.21150760352611542,
0.22058741748332977,
0.25442731380462646,
-0.11184646189212799,
-0.21847259998321533,
-0.22741082310676575,
-0.09295199066400528,
-0.009699850343167782,
0.3107975125312805,
-0.1397612988948822,
0.15987782180309296,
-0.2789706289768219,
0.30871832370758057,
-0.24222436547279358,
0.19733783602714539,
-0.09416436403989792,
0.04097844287753105,
0.15679197013378143,
-0.1282639503479004,
0.2823030650615692,
-0.2063969224691391,
0.669715940952301,
0.4235340356826782,
-0.0861145555973053,
-0.19567953050136566,
0.03797423094511032,
-0.1961796134710312,
-0.08284415304660797,
-0.08411073684692383,
-0.38073551654815674,
0.35079246759414673,
0.5730159878730774,
-0.8922197222709656,
-0.23553335666656494,
0.14992083609104156,
-0.09494306147098541,
-0.0956510677933693,
0.07840538024902344,
-0.4922603368759155,
-0.11103444546461105,
-0.11835547536611557,
-0.05615251511335373,
0.2861706018447876,
0.11929503828287125,
0.42484232783317566,
0.3039594292640686,
-0.09976454824209213,
-0.14444302022457123,
-0.09374777972698212,
-0.002277807332575321,
0.3680146038532257,
0.2249593734741211,
0.19602757692337036,
0.3923816978931427,
0.3997933864593506,
0.6628229022026062,
0.5268456935882568,
-0.1874062567949295,
-0.5031529664993286,
0.2006138563156128,
-0.19192394614219666,
0.32493695616722107,
0.5626311898231506,
-0.11825311928987503,
-0.15760275721549988,
-0.06210031360387802,
0.23030412197113037,
-0.13864904642105103,
-0.014684874564409256,
0.31099122762680054,
-0.24539972841739655,
0.045638248324394226,
-0.2749635577201843,
0.6521437764167786,
0.09665267169475555,
-0.1135997474193573,
-0.1819949448108673,
0.8432456254959106,
-0.3678223192691803,
0.18073469400405884,
0.07526739686727524,
1.1919642686843872,
-0.13601189851760864,
0.4098844528198242,
0.2010786235332489,
-0.3874257206916809,
0.4156358540058136,
-0.10298971831798553,
-0.08100743591785431,
-0.3189086318016052,
0.042312897741794586,
-0.023849813267588615,
-0.10528509318828583,
0.1340624988079071,
0.44418787956237793,
-0.03184136003255844,
0.43463099002838135,
-0.1730128526687622,
0.5200035572052002,
-0.27627840638160706,
-0.0603942945599556,
0.25524044036865234,
-0.190066397190094,
-0.4981265664100647,
0.007370263338088989,
-0.009709432721138,
-0.21099308133125305,
-0.16492736339569092,
0.0474860817193985,
-0.04048365727066994,
-0.08044995367527008,
0.11161839962005615,
-0.09437380731105804,
0.08044339716434479,
-0.07217526435852051,
0.3820318281650543,
-0.2312115579843521,
-0.15431804955005646,
0.12127004563808441,
0.3989732265472412,
-0.15909743309020996,
-0.060281313955783844,
0.09017714858055115,
0.1523456871509552,
0.025922385975718498,
0.0069250259548425674,
-0.032455746084451675,
0.2035449743270874,
0.026897042989730835,
0.42648863792419434,
-0.32125166058540344,
0.01978769153356552,
0.23646755516529083,
-0.29272085428237915,
0.19810011982917786,
0.08817936480045319,
-0.30328598618507385,
0.12636618316173553,
0.14094117283821106,
0.2373638153076172,
-0.10874402523040771,
0.03091556951403618,
0.2722175717353821,
0.0038428392726927996,
-0.162740558385849,
-0.31321197748184204,
-0.03611431270837784,
-0.06920669972896576,
0.2784641981124878,
-0.1932981014251709,
-0.21842914819717407,
0.2178863286972046,
-0.1130397841334343,
-0.2921774387359619,
0.1335929036140442,
0.04997531324625015,
0.02904488891363144,
-0.31255170702934265,
0.07988391071557999,
0.06992553174495697,
-0.08051024377346039,
-0.017688389867544174,
0.08301296830177307,
0.25900113582611084,
0.06703731417655945,
0.09501577913761139,
0.15070520341396332,
-0.0732627734541893,
0.2136080414056778,
0.20887866616249084,
0.2724874019622803,
-0.15106719732284546,
-0.22033081948757172,
-0.18771345913410187,
-0.326743483543396,
-0.21971014142036438,
0.29986506700515747,
-0.022875510156154633,
0.3675296902656555,
0.3975273370742798,
-0.059444330632686615,
-0.0007724675815552473,
-0.13773733377456665,
0.033367663621902466,
-0.15733405947685242,
-0.25509172677993774,
-0.04879327118396759,
-0.286732017993927,
0.15512321889400482,
0.2372521460056305,
0.11665927618741989,
0.005455794744193554,
-0.20904940366744995,
-0.3299773633480072,
-0.3086725175380707,
0.23403418064117432,
0.3257363736629486,
0.07106351107358932,
0.03579706698656082,
0.686094343662262,
0.15121987462043762,
-0.0833507850766182,
0.02587663009762764,
0.1558646857738495,
0.36772334575653076,
-0.1809450387954712,
0.16884398460388184,
-0.5383611917495728,
-0.07998990267515182,
0.0752444937825203,
0.5386030077934265,
0.15309210121631622,
0.2390587329864502,
-0.018570758402347565,
-0.1302441507577896,
-0.10508312284946442,
0.432241827249527,
0.3449057936668396,
0.4988391697406769,
-0.12265654653310776,
-0.2916272282600403,
0.07029499858617783,
0.0715157613158226,
-0.028718585148453712,
-0.15565040707588196,
0.19953037798404694,
0.21022285521030426,
-0.03221417963504791,
0.31629320979118347,
0.16983292996883392,
0.08936011791229248,
-0.37584632635116577,
0.11392226070165634,
0.3235377073287964,
0.042780548334121704,
0.22207149863243103,
-0.008939627557992935,
-0.10369804501533508,
0.1719748079776764,
0.27575114369392395,
0.1971362829208374,
0.051293354481458664,
0.32121938467025757,
0.0448281466960907,
0.0445002056658268,
0.5407052040100098,
-0.0052426718175411224,
-0.03937121480703354,
0.10944324731826782,
-0.1083240956068039,
0.5963362455368042,
0.20982757210731506,
-0.09245111793279648,
0.06625653058290482,
0.2836814820766449,
0.37317413091659546,
-0.14369545876979828,
-0.0057569947093725204,
0.16861486434936523,
-0.020341522991657257,
-0.34630653262138367,
-0.10143951326608658,
-0.29051917791366577,
-0.4267820119857788,
0.08827705681324005,
-0.1780971735715866,
-0.11815567314624786,
0.22226552665233612,
0.2646867036819458,
0.2997865080833435,
-0.3979048430919647,
-0.2510610818862915,
0.23412936925888062,
0.7418280243873596,
-0.3752467930316925,
0.28961414098739624,
0.11117756366729736,
-0.2908642590045929,
0.16579978168010712,
0.06775554269552231,
0.21520669758319855,
-0.21945971250534058,
0.398116797208786,
-0.13588425517082214,
0.06459210067987442,
0.12382656335830688,
-0.1100475937128067,
-0.05575236678123474,
-0.23413792252540588,
0.14114610850811005,
0.0660032331943512,
-0.03351467102766037,
-0.04415367171168327,
-0.334550142288208,
-0.09378217160701752,
-0.19096648693084717,
-0.6413637399673462,
0.31857359409332275,
-0.41464167833328247,
-0.14153456687927246,
0.04513714835047722,
-0.025628753006458282,
-0.1024809181690216,
-0.5221216678619385,
0.12210436165332794,
0.26879093050956726,
0.11622754484415054,
0.21317653357982635,
0.030793670564889908,
-0.026259060949087143,
0.27025172114372253,
0.05156495049595833,
-0.38442304730415344,
-0.23829317092895508,
-0.37256699800491333,
-0.47561904788017273,
0.21359971165657043,
-0.04245627298951149,
-0.10297392308712006,
0.012406188063323498,
0.38665327429771423,
0.04991887882351875,
-0.028026461601257324,
0.013037756085395813,
-0.22594110667705536,
-0.19890260696411133,
0.19324786961078644,
-0.0677335262298584,
-0.020612027496099472,
-0.11394226551055908,
-0.27856096625328064,
0.13279777765274048,
-0.052045974880456924,
-0.021656129509210587,
0.025860875844955444,
-0.1629599928855896,
0.23149366676807404,
0.07607428729534149,
-0.09094439446926117,
-0.4071446359157562,
-0.037783026695251465,
-0.07786262035369873,
-0.018649302423000336,
0.1044476106762886,
-0.16687367856502533,
-0.0559871532022953,
-0.27133995294570923,
-0.25628557801246643,
0.5123072266578674,
-0.5094337463378906,
0.1665980964899063,
-0.20370419323444366,
-0.16999699175357819,
-0.183370441198349,
0.05480896681547165,
0.08778338134288788,
-0.17837627232074738,
-0.26356449723243713,
0.23363840579986572,
0.14302387833595276,
0.04433324933052063,
-0.011456836014986038,
0.276019424200058,
0.02986884117126465,
0.09171628952026367,
-0.08038501441478729,
-0.4297025799751282,
0.3459043502807617,
-0.3056495189666748,
-0.09018370509147644,
-0.3465611934661865,
0.359244167804718,
0.37476545572280884,
-0.042151667177677155,
-0.26379427313804626,
-0.08040833473205566,
0.44094356894493103,
-0.09588862210512161,
-0.5779604315757751,
-0.020502634346485138,
-0.28208550810813904,
-0.277965784072876,
-0.11163653433322906,
0.15149499475955963,
0.09319356083869934,
-0.023755991831421852,
0.2695954442024231,
-0.21719133853912354
] |
https://github.com/huggingface/datasets/issues/6303
|
Parquet uploads off-by-one naming scheme
|
We start at 0 in `datasets` for consistency with Apache Spark, Apache Beam, Dask and others.
Also note `transformers` isn't a good reference on this topic. I talked with the maintainers when they added shards but it was already released this way. Though we found that there is a backward-compatible way in `transformers` to start at 0, but no request from `transformers` users to changes this AFAIK.
|
### Describe the bug
I noticed this numbering scheme not matching up in a different project and wanted to raise it as an issue for discussion, what is the actual proper way to have these stored?
<img width="425" alt="image" src="https://github.com/huggingface/datasets/assets/1981179/3ffa2144-7c9a-446f-b521-a5e9db71e7ce">
The `-SSSSS-of-NNNNN` seems to be used widely across the codebase. The section that creates the part in my screenshot is here https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L5287
There are also some edits to this section in the single commit branch.
### Steps to reproduce the bug
1. Upload a dataset that requires at least two parquet files in it
2. Observe the naming scheme
### Expected behavior
The couple options here are of course **1. keeping it as is**
**2. Starting the index at 1:**
train-00001-of-00002-{hash}.parquet
train-00002-of-00002-{hash}.parquet
**3. My preferred option** (which would solve my specific issue), dropping the total entirely:
train-00000-{hash}.parquet
train-00001-{hash}.parquet
This also solves an issue that will occur with an `append` variable for `push_to_hub` (see https://github.com/huggingface/datasets/issues/6290) where as you add a new parquet file, you need to rename everything in the repo as well.
However, I know there are parts of the repo that use 0 as the starting file or may require the total, so raising the question for discussion.
### Environment info
- `datasets` version: 2.14.6.dev0
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.18.0
- PyArrow version: 12.0.1
- Pandas version: 1.5.3
| 67
|
Parquet uploads off-by-one naming scheme
### Describe the bug
I noticed this numbering scheme not matching up in a different project and wanted to raise it as an issue for discussion, what is the actual proper way to have these stored?
<img width="425" alt="image" src="https://github.com/huggingface/datasets/assets/1981179/3ffa2144-7c9a-446f-b521-a5e9db71e7ce">
The `-SSSSS-of-NNNNN` seems to be used widely across the codebase. The section that creates the part in my screenshot is here https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L5287
There are also some edits to this section in the single commit branch.
### Steps to reproduce the bug
1. Upload a dataset that requires at least two parquet files in it
2. Observe the naming scheme
### Expected behavior
The couple options here are of course **1. keeping it as is**
**2. Starting the index at 1:**
train-00001-of-00002-{hash}.parquet
train-00002-of-00002-{hash}.parquet
**3. My preferred option** (which would solve my specific issue), dropping the total entirely:
train-00000-{hash}.parquet
train-00001-{hash}.parquet
This also solves an issue that will occur with an `append` variable for `push_to_hub` (see https://github.com/huggingface/datasets/issues/6290) where as you add a new parquet file, you need to rename everything in the repo as well.
However, I know there are parts of the repo that use 0 as the starting file or may require the total, so raising the question for discussion.
### Environment info
- `datasets` version: 2.14.6.dev0
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.18.0
- PyArrow version: 12.0.1
- Pandas version: 1.5.3
We start at 0 in `datasets` for consistency with Apache Spark, Apache Beam, Dask and others.
Also note `transformers` isn't a good reference on this topic. I talked with the maintainers when they added shards but it was already released this way. Though we found that there is a backward-compatible way in `transformers` to start at 0, but no request from `transformers` users to changes this AFAIK.
|
[
0.2461010068655014,
-0.06340612471103668,
0.08091813325881958,
0.5036107301712036,
0.0656275749206543,
-0.12215182185173035,
0.30422115325927734,
-0.0827028900384903,
-0.20878209173679352,
0.15902912616729736,
0.3500998020172119,
0.2090575397014618,
0.11546854674816132,
0.28047600388526917,
0.20605699717998505,
0.04387945681810379,
0.2959124445915222,
-0.12454409897327423,
0.22797797620296478,
-0.02627451717853546,
-0.1517850160598755,
0.19171999394893646,
0.042020656168460846,
-0.047432467341423035,
-0.16429083049297333,
0.1066712737083435,
-0.2331256866455078,
0.09522493183612823,
0.04840222746133804,
-0.482241690158844,
0.02250724472105503,
0.04625072330236435,
-0.22419807314872742,
0.5083218812942505,
-0.00012444239109754562,
-0.2929535508155823,
0.1260194629430771,
-0.29206347465515137,
-0.19847550988197327,
-0.1187620609998703,
-0.08398693799972534,
-0.28448522090911865,
0.05866391956806183,
-0.36518433690071106,
0.01210566982626915,
-0.15713189542293549,
0.20160411298274994,
-0.2717970609664917,
0.0036449581384658813,
-0.0446687750518322,
0.08755914866924286,
-0.1632450968027115,
0.218291237950325,
0.0491439625620842,
0.3528144955635071,
0.0810704156756401,
-0.1528315544128418,
0.15573526918888092,
0.030451364815235138,
0.1126079261302948,
0.04868975654244423,
0.18330679833889008,
0.29638856649398804,
-0.2749285101890564,
0.3264439105987549,
0.26462069153785706,
0.1689361333847046,
-0.055259086191654205,
0.07506118714809418,
0.05881672725081444,
-0.014943018555641174,
-0.1486615538597107,
-0.3887081444263458,
-0.5963142514228821,
-0.14939682185649872,
-0.23811742663383484,
0.3475702404975891,
0.37313276529312134,
0.26946917176246643,
0.11410151422023773,
-0.017021290957927704,
0.07300720363855362,
-0.07940934598445892,
0.35445457696914673,
0.0735168606042862,
-0.15327592194080353,
-0.23376525938510895,
0.18019771575927734,
-0.2954401969909668,
-0.4835842251777649,
-0.3016692101955414,
-0.38050636649131775,
0.17247053980827332,
0.02425556629896164,
-0.16435426473617554,
0.10695366561412811,
0.1580790877342224,
0.1262025386095047,
0.1555817425251007,
0.025358397513628006,
0.0013671088963747025,
-0.06339126825332642,
0.0427507720887661,
0.0020463205873966217,
0.40918344259262085,
0.16983111202716827,
0.2852060794830322,
-0.26093626022338867,
0.06044001132249832,
0.40177664160728455,
0.32674717903137207,
-0.12080516666173935,
-0.06812412291765213,
0.11498629301786423,
-0.30480286478996277,
-0.45635083317756653,
0.08795206993818283,
-0.1527959108352661,
-0.020127419382333755,
0.15487051010131836,
0.11394823342561722,
0.1231454461812973,
0.31967297196388245,
0.14519986510276794,
0.13410894572734833,
0.14976829290390015,
-0.17331115901470184,
0.06084146350622177,
-0.023434212431311607,
-0.36572426557540894,
-0.21130475401878357,
-0.09156104922294617,
-0.34943464398384094,
0.10771548748016357,
0.09195290505886078,
-0.40445980429649353,
0.1644883155822754,
0.23977972567081451,
0.16828075051307678,
-0.1854449063539505,
0.13124504685401917,
-0.1154184341430664,
0.20054835081100464,
0.08710025250911713,
-0.3086095154285431,
0.16425754129886627,
0.12592889368534088,
-0.19527842104434967,
-0.1315443366765976,
0.046553827822208405,
-0.6727333664894104,
-0.2869769334793091,
-0.0037086214870214462,
0.04547566547989845,
-0.193184033036232,
-0.10604919493198395,
-0.5483251810073853,
0.34265220165252686,
0.4568098485469818,
-0.07105229049921036,
0.04844960942864418,
0.11084569990634918,
-0.13153581321239471,
-0.2330608367919922,
0.0011466071009635925,
0.4239223003387451,
-0.19985909759998322,
-0.14607001841068268,
0.026231734082102776,
0.03203520551323891,
0.3785471022129059,
0.27864283323287964,
-0.22044917941093445,
-0.22509753704071045,
-0.1880887746810913,
0.39055901765823364,
0.34903010725975037,
-0.13922332227230072,
-0.15330232679843903,
-0.030846979469060898,
-0.13166314363479614,
-0.14482492208480835,
0.339091032743454,
0.012131871655583382,
0.2825886011123657,
-0.21344240009784698,
0.21331635117530823,
-0.25068938732147217,
-0.07520968466997147,
0.13810552656650543,
-0.2798801064491272,
-0.20227620005607605,
-0.14543657004833221,
-0.007609467953443527,
-0.18893606960773468,
-0.3656623959541321,
0.14011751115322113,
-0.2571517825126648,
0.03848867490887642,
-0.11182248592376709,
0.22083963453769684,
0.15488207340240479,
0.16914790868759155,
0.38243669271469116,
0.1417696475982666,
0.14201799035072327,
-0.5726288557052612,
0.31063762307167053,
0.21984022855758667,
-0.3028438091278076,
-0.13810524344444275,
-0.23555457592010498,
-0.11558306962251663,
-0.26294106245040894,
-0.049443673342466354,
0.01825680024921894,
-0.027460474520921707,
0.2595286965370178,
-0.2090483009815216,
-0.24779725074768066,
-0.4321824908256531,
0.2695562243461609,
-0.3110347390174866,
0.1130695566534996,
-0.48580408096313477,
0.3299214243888855,
0.0689082220196724,
-0.38538244366645813,
-0.08111359924077988,
0.22172126173973083,
0.3095560669898987,
-0.19349436461925507,
0.3194837272167206,
0.5939047336578369,
0.3903365135192871,
0.06031172350049019,
0.30307093262672424,
0.24501720070838928,
0.08377217501401901,
0.03380164876580238,
-0.047302812337875366,
-0.08997231721878052,
-0.047575026750564575,
0.020718231797218323,
-0.6829323172569275,
0.3604966402053833,
-0.1628008782863617,
0.09897405654191971,
-0.06390979886054993,
-0.275892049074173,
0.07256883382797241,
0.26688069105148315,
-0.364471971988678,
-0.31821346282958984,
0.16308173537254333,
0.1934853196144104,
0.21940173208713531,
0.20388758182525635,
-0.41610440611839294,
0.22097428143024445,
0.5856571197509766,
0.23451146483421326,
-0.12488732486963272,
-0.003679320216178894,
0.17759305238723755,
-0.2696247100830078,
0.1054307296872139,
0.08194440603256226,
0.14358454942703247,
0.09316198527812958,
0.011546969413757324,
-0.18430086970329285,
0.2220771312713623,
-0.14280706644058228,
0.1623559147119522,
0.24507462978363037,
-0.2093600034713745,
0.08861175179481506,
0.48325714468955994,
-0.05852806195616722,
-0.4408136308193207,
0.03907255455851555,
0.11796169728040695,
0.020772144198417664,
-0.4629938006401062,
0.22083565592765808,
-0.11130774021148682,
0.08302706480026245,
-0.6106058359146118,
0.10380962491035461,
-0.6282735466957092,
-0.12077273428440094,
0.08762748539447784,
0.05444490537047386,
-0.29571858048439026,
0.1470295786857605,
-0.03397751227021217,
0.35266685485839844,
-0.340549111366272,
-0.15077733993530273,
-0.11698904633522034,
-0.04756489768624306,
-0.1360381543636322,
-0.13284294307231903,
0.139919251203537,
-0.2051311731338501,
0.3838436007499695,
-0.173969566822052,
-0.36659371852874756,
-0.4288146495819092,
-0.5426888465881348,
0.08378616720438004,
-0.0689905658364296,
-0.07660939544439316,
0.27298441529273987,
-0.058411166071891785,
-0.3174753189086914,
-0.11839987337589264,
0.20343630015850067,
0.0324058011174202,
-0.22963117063045502,
0.17890098690986633,
0.0851452574133873,
0.15354880690574646,
-0.3781468868255615,
-0.22352352738380432,
0.2596721053123474,
-0.07806297391653061,
0.5481627583503723,
0.26803192496299744,
0.3189324736595154,
-0.07389876991510391,
-0.32210442423820496,
0.07049578428268433,
-0.3558964729309082,
0.16621924936771393,
-0.26420652866363525,
-0.5592426657676697,
0.29115012288093567,
0.10185825824737549,
-0.1304251104593277,
0.252519816160202,
0.0470353439450264,
-0.1054912656545639,
0.029019994661211967,
-0.06542955338954926,
-0.47895947098731995,
0.1462436318397522,
0.013528276234865189,
0.26037871837615967,
0.2430037409067154,
0.2752419114112854,
-0.09281910955905914,
0.006324028596282005,
-0.297258198261261,
-0.020031465217471123,
0.3908569812774658,
0.23665517568588257,
0.31095537543296814,
0.19525006413459778,
0.2913704812526703,
0.3111209273338318,
0.7338733077049255,
0.4331395626068115,
0.1257842630147934,
0.30778056383132935,
-0.005306603386998177,
0.2447405457496643,
-0.12800166010856628,
0.23557627201080322,
0.08641329407691956,
0.20851939916610718,
0.0841032862663269,
0.45696061849594116,
0.16923800110816956,
0.17930597066879272,
-0.0074446238577365875,
0.27412956953048706,
-0.16259221732616425,
-0.08632829785346985,
-0.21150760352611542,
0.22058741748332977,
0.25442731380462646,
-0.11184646189212799,
-0.21847259998321533,
-0.22741082310676575,
-0.09295199066400528,
-0.009699850343167782,
0.3107975125312805,
-0.1397612988948822,
0.15987782180309296,
-0.2789706289768219,
0.30871832370758057,
-0.24222436547279358,
0.19733783602714539,
-0.09416436403989792,
0.04097844287753105,
0.15679197013378143,
-0.1282639503479004,
0.2823030650615692,
-0.2063969224691391,
0.669715940952301,
0.4235340356826782,
-0.0861145555973053,
-0.19567953050136566,
0.03797423094511032,
-0.1961796134710312,
-0.08284415304660797,
-0.08411073684692383,
-0.38073551654815674,
0.35079246759414673,
0.5730159878730774,
-0.8922197222709656,
-0.23553335666656494,
0.14992083609104156,
-0.09494306147098541,
-0.0956510677933693,
0.07840538024902344,
-0.4922603368759155,
-0.11103444546461105,
-0.11835547536611557,
-0.05615251511335373,
0.2861706018447876,
0.11929503828287125,
0.42484232783317566,
0.3039594292640686,
-0.09976454824209213,
-0.14444302022457123,
-0.09374777972698212,
-0.002277807332575321,
0.3680146038532257,
0.2249593734741211,
0.19602757692337036,
0.3923816978931427,
0.3997933864593506,
0.6628229022026062,
0.5268456935882568,
-0.1874062567949295,
-0.5031529664993286,
0.2006138563156128,
-0.19192394614219666,
0.32493695616722107,
0.5626311898231506,
-0.11825311928987503,
-0.15760275721549988,
-0.06210031360387802,
0.23030412197113037,
-0.13864904642105103,
-0.014684874564409256,
0.31099122762680054,
-0.24539972841739655,
0.045638248324394226,
-0.2749635577201843,
0.6521437764167786,
0.09665267169475555,
-0.1135997474193573,
-0.1819949448108673,
0.8432456254959106,
-0.3678223192691803,
0.18073469400405884,
0.07526739686727524,
1.1919642686843872,
-0.13601189851760864,
0.4098844528198242,
0.2010786235332489,
-0.3874257206916809,
0.4156358540058136,
-0.10298971831798553,
-0.08100743591785431,
-0.3189086318016052,
0.042312897741794586,
-0.023849813267588615,
-0.10528509318828583,
0.1340624988079071,
0.44418787956237793,
-0.03184136003255844,
0.43463099002838135,
-0.1730128526687622,
0.5200035572052002,
-0.27627840638160706,
-0.0603942945599556,
0.25524044036865234,
-0.190066397190094,
-0.4981265664100647,
0.007370263338088989,
-0.009709432721138,
-0.21099308133125305,
-0.16492736339569092,
0.0474860817193985,
-0.04048365727066994,
-0.08044995367527008,
0.11161839962005615,
-0.09437380731105804,
0.08044339716434479,
-0.07217526435852051,
0.3820318281650543,
-0.2312115579843521,
-0.15431804955005646,
0.12127004563808441,
0.3989732265472412,
-0.15909743309020996,
-0.060281313955783844,
0.09017714858055115,
0.1523456871509552,
0.025922385975718498,
0.0069250259548425674,
-0.032455746084451675,
0.2035449743270874,
0.026897042989730835,
0.42648863792419434,
-0.32125166058540344,
0.01978769153356552,
0.23646755516529083,
-0.29272085428237915,
0.19810011982917786,
0.08817936480045319,
-0.30328598618507385,
0.12636618316173553,
0.14094117283821106,
0.2373638153076172,
-0.10874402523040771,
0.03091556951403618,
0.2722175717353821,
0.0038428392726927996,
-0.162740558385849,
-0.31321197748184204,
-0.03611431270837784,
-0.06920669972896576,
0.2784641981124878,
-0.1932981014251709,
-0.21842914819717407,
0.2178863286972046,
-0.1130397841334343,
-0.2921774387359619,
0.1335929036140442,
0.04997531324625015,
0.02904488891363144,
-0.31255170702934265,
0.07988391071557999,
0.06992553174495697,
-0.08051024377346039,
-0.017688389867544174,
0.08301296830177307,
0.25900113582611084,
0.06703731417655945,
0.09501577913761139,
0.15070520341396332,
-0.0732627734541893,
0.2136080414056778,
0.20887866616249084,
0.2724874019622803,
-0.15106719732284546,
-0.22033081948757172,
-0.18771345913410187,
-0.326743483543396,
-0.21971014142036438,
0.29986506700515747,
-0.022875510156154633,
0.3675296902656555,
0.3975273370742798,
-0.059444330632686615,
-0.0007724675815552473,
-0.13773733377456665,
0.033367663621902466,
-0.15733405947685242,
-0.25509172677993774,
-0.04879327118396759,
-0.286732017993927,
0.15512321889400482,
0.2372521460056305,
0.11665927618741989,
0.005455794744193554,
-0.20904940366744995,
-0.3299773633480072,
-0.3086725175380707,
0.23403418064117432,
0.3257363736629486,
0.07106351107358932,
0.03579706698656082,
0.686094343662262,
0.15121987462043762,
-0.0833507850766182,
0.02587663009762764,
0.1558646857738495,
0.36772334575653076,
-0.1809450387954712,
0.16884398460388184,
-0.5383611917495728,
-0.07998990267515182,
0.0752444937825203,
0.5386030077934265,
0.15309210121631622,
0.2390587329864502,
-0.018570758402347565,
-0.1302441507577896,
-0.10508312284946442,
0.432241827249527,
0.3449057936668396,
0.4988391697406769,
-0.12265654653310776,
-0.2916272282600403,
0.07029499858617783,
0.0715157613158226,
-0.028718585148453712,
-0.15565040707588196,
0.19953037798404694,
0.21022285521030426,
-0.03221417963504791,
0.31629320979118347,
0.16983292996883392,
0.08936011791229248,
-0.37584632635116577,
0.11392226070165634,
0.3235377073287964,
0.042780548334121704,
0.22207149863243103,
-0.008939627557992935,
-0.10369804501533508,
0.1719748079776764,
0.27575114369392395,
0.1971362829208374,
0.051293354481458664,
0.32121938467025757,
0.0448281466960907,
0.0445002056658268,
0.5407052040100098,
-0.0052426718175411224,
-0.03937121480703354,
0.10944324731826782,
-0.1083240956068039,
0.5963362455368042,
0.20982757210731506,
-0.09245111793279648,
0.06625653058290482,
0.2836814820766449,
0.37317413091659546,
-0.14369545876979828,
-0.0057569947093725204,
0.16861486434936523,
-0.020341522991657257,
-0.34630653262138367,
-0.10143951326608658,
-0.29051917791366577,
-0.4267820119857788,
0.08827705681324005,
-0.1780971735715866,
-0.11815567314624786,
0.22226552665233612,
0.2646867036819458,
0.2997865080833435,
-0.3979048430919647,
-0.2510610818862915,
0.23412936925888062,
0.7418280243873596,
-0.3752467930316925,
0.28961414098739624,
0.11117756366729736,
-0.2908642590045929,
0.16579978168010712,
0.06775554269552231,
0.21520669758319855,
-0.21945971250534058,
0.398116797208786,
-0.13588425517082214,
0.06459210067987442,
0.12382656335830688,
-0.1100475937128067,
-0.05575236678123474,
-0.23413792252540588,
0.14114610850811005,
0.0660032331943512,
-0.03351467102766037,
-0.04415367171168327,
-0.334550142288208,
-0.09378217160701752,
-0.19096648693084717,
-0.6413637399673462,
0.31857359409332275,
-0.41464167833328247,
-0.14153456687927246,
0.04513714835047722,
-0.025628753006458282,
-0.1024809181690216,
-0.5221216678619385,
0.12210436165332794,
0.26879093050956726,
0.11622754484415054,
0.21317653357982635,
0.030793670564889908,
-0.026259060949087143,
0.27025172114372253,
0.05156495049595833,
-0.38442304730415344,
-0.23829317092895508,
-0.37256699800491333,
-0.47561904788017273,
0.21359971165657043,
-0.04245627298951149,
-0.10297392308712006,
0.012406188063323498,
0.38665327429771423,
0.04991887882351875,
-0.028026461601257324,
0.013037756085395813,
-0.22594110667705536,
-0.19890260696411133,
0.19324786961078644,
-0.0677335262298584,
-0.020612027496099472,
-0.11394226551055908,
-0.27856096625328064,
0.13279777765274048,
-0.052045974880456924,
-0.021656129509210587,
0.025860875844955444,
-0.1629599928855896,
0.23149366676807404,
0.07607428729534149,
-0.09094439446926117,
-0.4071446359157562,
-0.037783026695251465,
-0.07786262035369873,
-0.018649302423000336,
0.1044476106762886,
-0.16687367856502533,
-0.0559871532022953,
-0.27133995294570923,
-0.25628557801246643,
0.5123072266578674,
-0.5094337463378906,
0.1665980964899063,
-0.20370419323444366,
-0.16999699175357819,
-0.183370441198349,
0.05480896681547165,
0.08778338134288788,
-0.17837627232074738,
-0.26356449723243713,
0.23363840579986572,
0.14302387833595276,
0.04433324933052063,
-0.011456836014986038,
0.276019424200058,
0.02986884117126465,
0.09171628952026367,
-0.08038501441478729,
-0.4297025799751282,
0.3459043502807617,
-0.3056495189666748,
-0.09018370509147644,
-0.3465611934661865,
0.359244167804718,
0.37476545572280884,
-0.042151667177677155,
-0.26379427313804626,
-0.08040833473205566,
0.44094356894493103,
-0.09588862210512161,
-0.5779604315757751,
-0.020502634346485138,
-0.28208550810813904,
-0.277965784072876,
-0.11163653433322906,
0.15149499475955963,
0.09319356083869934,
-0.023755991831421852,
0.2695954442024231,
-0.21719133853912354
] |
https://github.com/huggingface/datasets/issues/6303
|
Parquet uploads off-by-one naming scheme
|
Makes sense to start at 0 for plenty of good reasons so I'm on board.
What about the second part `-of-0000X`? With single commit PR #6269 just getting merged, there was a note about issues with 100+ file edits https://github.com/huggingface/datasets/pull/6269#issuecomment-1755428581.
That would be my last remaining concern in the context of the `push_to_hub(..., append=True)` work to be done, where appending a single file to the full dataset will require renaming every other existing file in the dataset. If it doesn't seem like a big issue for this work then all the better 👍
|
### Describe the bug
I noticed this numbering scheme not matching up in a different project and wanted to raise it as an issue for discussion, what is the actual proper way to have these stored?
<img width="425" alt="image" src="https://github.com/huggingface/datasets/assets/1981179/3ffa2144-7c9a-446f-b521-a5e9db71e7ce">
The `-SSSSS-of-NNNNN` seems to be used widely across the codebase. The section that creates the part in my screenshot is here https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L5287
There are also some edits to this section in the single commit branch.
### Steps to reproduce the bug
1. Upload a dataset that requires at least two parquet files in it
2. Observe the naming scheme
### Expected behavior
The couple options here are of course **1. keeping it as is**
**2. Starting the index at 1:**
train-00001-of-00002-{hash}.parquet
train-00002-of-00002-{hash}.parquet
**3. My preferred option** (which would solve my specific issue), dropping the total entirely:
train-00000-{hash}.parquet
train-00001-{hash}.parquet
This also solves an issue that will occur with an `append` variable for `push_to_hub` (see https://github.com/huggingface/datasets/issues/6290) where as you add a new parquet file, you need to rename everything in the repo as well.
However, I know there are parts of the repo that use 0 as the starting file or may require the total, so raising the question for discussion.
### Environment info
- `datasets` version: 2.14.6.dev0
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.18.0
- PyArrow version: 12.0.1
- Pandas version: 1.5.3
| 93
|
Parquet uploads off-by-one naming scheme
### Describe the bug
I noticed this numbering scheme not matching up in a different project and wanted to raise it as an issue for discussion, what is the actual proper way to have these stored?
<img width="425" alt="image" src="https://github.com/huggingface/datasets/assets/1981179/3ffa2144-7c9a-446f-b521-a5e9db71e7ce">
The `-SSSSS-of-NNNNN` seems to be used widely across the codebase. The section that creates the part in my screenshot is here https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L5287
There are also some edits to this section in the single commit branch.
### Steps to reproduce the bug
1. Upload a dataset that requires at least two parquet files in it
2. Observe the naming scheme
### Expected behavior
The couple options here are of course **1. keeping it as is**
**2. Starting the index at 1:**
train-00001-of-00002-{hash}.parquet
train-00002-of-00002-{hash}.parquet
**3. My preferred option** (which would solve my specific issue), dropping the total entirely:
train-00000-{hash}.parquet
train-00001-{hash}.parquet
This also solves an issue that will occur with an `append` variable for `push_to_hub` (see https://github.com/huggingface/datasets/issues/6290) where as you add a new parquet file, you need to rename everything in the repo as well.
However, I know there are parts of the repo that use 0 as the starting file or may require the total, so raising the question for discussion.
### Environment info
- `datasets` version: 2.14.6.dev0
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.18.0
- PyArrow version: 12.0.1
- Pandas version: 1.5.3
Makes sense to start at 0 for plenty of good reasons so I'm on board.
What about the second part `-of-0000X`? With single commit PR #6269 just getting merged, there was a note about issues with 100+ file edits https://github.com/huggingface/datasets/pull/6269#issuecomment-1755428581.
That would be my last remaining concern in the context of the `push_to_hub(..., append=True)` work to be done, where appending a single file to the full dataset will require renaming every other existing file in the dataset. If it doesn't seem like a big issue for this work then all the better 👍
|
[
0.2461010068655014,
-0.06340612471103668,
0.08091813325881958,
0.5036107301712036,
0.0656275749206543,
-0.12215182185173035,
0.30422115325927734,
-0.0827028900384903,
-0.20878209173679352,
0.15902912616729736,
0.3500998020172119,
0.2090575397014618,
0.11546854674816132,
0.28047600388526917,
0.20605699717998505,
0.04387945681810379,
0.2959124445915222,
-0.12454409897327423,
0.22797797620296478,
-0.02627451717853546,
-0.1517850160598755,
0.19171999394893646,
0.042020656168460846,
-0.047432467341423035,
-0.16429083049297333,
0.1066712737083435,
-0.2331256866455078,
0.09522493183612823,
0.04840222746133804,
-0.482241690158844,
0.02250724472105503,
0.04625072330236435,
-0.22419807314872742,
0.5083218812942505,
-0.00012444239109754562,
-0.2929535508155823,
0.1260194629430771,
-0.29206347465515137,
-0.19847550988197327,
-0.1187620609998703,
-0.08398693799972534,
-0.28448522090911865,
0.05866391956806183,
-0.36518433690071106,
0.01210566982626915,
-0.15713189542293549,
0.20160411298274994,
-0.2717970609664917,
0.0036449581384658813,
-0.0446687750518322,
0.08755914866924286,
-0.1632450968027115,
0.218291237950325,
0.0491439625620842,
0.3528144955635071,
0.0810704156756401,
-0.1528315544128418,
0.15573526918888092,
0.030451364815235138,
0.1126079261302948,
0.04868975654244423,
0.18330679833889008,
0.29638856649398804,
-0.2749285101890564,
0.3264439105987549,
0.26462069153785706,
0.1689361333847046,
-0.055259086191654205,
0.07506118714809418,
0.05881672725081444,
-0.014943018555641174,
-0.1486615538597107,
-0.3887081444263458,
-0.5963142514228821,
-0.14939682185649872,
-0.23811742663383484,
0.3475702404975891,
0.37313276529312134,
0.26946917176246643,
0.11410151422023773,
-0.017021290957927704,
0.07300720363855362,
-0.07940934598445892,
0.35445457696914673,
0.0735168606042862,
-0.15327592194080353,
-0.23376525938510895,
0.18019771575927734,
-0.2954401969909668,
-0.4835842251777649,
-0.3016692101955414,
-0.38050636649131775,
0.17247053980827332,
0.02425556629896164,
-0.16435426473617554,
0.10695366561412811,
0.1580790877342224,
0.1262025386095047,
0.1555817425251007,
0.025358397513628006,
0.0013671088963747025,
-0.06339126825332642,
0.0427507720887661,
0.0020463205873966217,
0.40918344259262085,
0.16983111202716827,
0.2852060794830322,
-0.26093626022338867,
0.06044001132249832,
0.40177664160728455,
0.32674717903137207,
-0.12080516666173935,
-0.06812412291765213,
0.11498629301786423,
-0.30480286478996277,
-0.45635083317756653,
0.08795206993818283,
-0.1527959108352661,
-0.020127419382333755,
0.15487051010131836,
0.11394823342561722,
0.1231454461812973,
0.31967297196388245,
0.14519986510276794,
0.13410894572734833,
0.14976829290390015,
-0.17331115901470184,
0.06084146350622177,
-0.023434212431311607,
-0.36572426557540894,
-0.21130475401878357,
-0.09156104922294617,
-0.34943464398384094,
0.10771548748016357,
0.09195290505886078,
-0.40445980429649353,
0.1644883155822754,
0.23977972567081451,
0.16828075051307678,
-0.1854449063539505,
0.13124504685401917,
-0.1154184341430664,
0.20054835081100464,
0.08710025250911713,
-0.3086095154285431,
0.16425754129886627,
0.12592889368534088,
-0.19527842104434967,
-0.1315443366765976,
0.046553827822208405,
-0.6727333664894104,
-0.2869769334793091,
-0.0037086214870214462,
0.04547566547989845,
-0.193184033036232,
-0.10604919493198395,
-0.5483251810073853,
0.34265220165252686,
0.4568098485469818,
-0.07105229049921036,
0.04844960942864418,
0.11084569990634918,
-0.13153581321239471,
-0.2330608367919922,
0.0011466071009635925,
0.4239223003387451,
-0.19985909759998322,
-0.14607001841068268,
0.026231734082102776,
0.03203520551323891,
0.3785471022129059,
0.27864283323287964,
-0.22044917941093445,
-0.22509753704071045,
-0.1880887746810913,
0.39055901765823364,
0.34903010725975037,
-0.13922332227230072,
-0.15330232679843903,
-0.030846979469060898,
-0.13166314363479614,
-0.14482492208480835,
0.339091032743454,
0.012131871655583382,
0.2825886011123657,
-0.21344240009784698,
0.21331635117530823,
-0.25068938732147217,
-0.07520968466997147,
0.13810552656650543,
-0.2798801064491272,
-0.20227620005607605,
-0.14543657004833221,
-0.007609467953443527,
-0.18893606960773468,
-0.3656623959541321,
0.14011751115322113,
-0.2571517825126648,
0.03848867490887642,
-0.11182248592376709,
0.22083963453769684,
0.15488207340240479,
0.16914790868759155,
0.38243669271469116,
0.1417696475982666,
0.14201799035072327,
-0.5726288557052612,
0.31063762307167053,
0.21984022855758667,
-0.3028438091278076,
-0.13810524344444275,
-0.23555457592010498,
-0.11558306962251663,
-0.26294106245040894,
-0.049443673342466354,
0.01825680024921894,
-0.027460474520921707,
0.2595286965370178,
-0.2090483009815216,
-0.24779725074768066,
-0.4321824908256531,
0.2695562243461609,
-0.3110347390174866,
0.1130695566534996,
-0.48580408096313477,
0.3299214243888855,
0.0689082220196724,
-0.38538244366645813,
-0.08111359924077988,
0.22172126173973083,
0.3095560669898987,
-0.19349436461925507,
0.3194837272167206,
0.5939047336578369,
0.3903365135192871,
0.06031172350049019,
0.30307093262672424,
0.24501720070838928,
0.08377217501401901,
0.03380164876580238,
-0.047302812337875366,
-0.08997231721878052,
-0.047575026750564575,
0.020718231797218323,
-0.6829323172569275,
0.3604966402053833,
-0.1628008782863617,
0.09897405654191971,
-0.06390979886054993,
-0.275892049074173,
0.07256883382797241,
0.26688069105148315,
-0.364471971988678,
-0.31821346282958984,
0.16308173537254333,
0.1934853196144104,
0.21940173208713531,
0.20388758182525635,
-0.41610440611839294,
0.22097428143024445,
0.5856571197509766,
0.23451146483421326,
-0.12488732486963272,
-0.003679320216178894,
0.17759305238723755,
-0.2696247100830078,
0.1054307296872139,
0.08194440603256226,
0.14358454942703247,
0.09316198527812958,
0.011546969413757324,
-0.18430086970329285,
0.2220771312713623,
-0.14280706644058228,
0.1623559147119522,
0.24507462978363037,
-0.2093600034713745,
0.08861175179481506,
0.48325714468955994,
-0.05852806195616722,
-0.4408136308193207,
0.03907255455851555,
0.11796169728040695,
0.020772144198417664,
-0.4629938006401062,
0.22083565592765808,
-0.11130774021148682,
0.08302706480026245,
-0.6106058359146118,
0.10380962491035461,
-0.6282735466957092,
-0.12077273428440094,
0.08762748539447784,
0.05444490537047386,
-0.29571858048439026,
0.1470295786857605,
-0.03397751227021217,
0.35266685485839844,
-0.340549111366272,
-0.15077733993530273,
-0.11698904633522034,
-0.04756489768624306,
-0.1360381543636322,
-0.13284294307231903,
0.139919251203537,
-0.2051311731338501,
0.3838436007499695,
-0.173969566822052,
-0.36659371852874756,
-0.4288146495819092,
-0.5426888465881348,
0.08378616720438004,
-0.0689905658364296,
-0.07660939544439316,
0.27298441529273987,
-0.058411166071891785,
-0.3174753189086914,
-0.11839987337589264,
0.20343630015850067,
0.0324058011174202,
-0.22963117063045502,
0.17890098690986633,
0.0851452574133873,
0.15354880690574646,
-0.3781468868255615,
-0.22352352738380432,
0.2596721053123474,
-0.07806297391653061,
0.5481627583503723,
0.26803192496299744,
0.3189324736595154,
-0.07389876991510391,
-0.32210442423820496,
0.07049578428268433,
-0.3558964729309082,
0.16621924936771393,
-0.26420652866363525,
-0.5592426657676697,
0.29115012288093567,
0.10185825824737549,
-0.1304251104593277,
0.252519816160202,
0.0470353439450264,
-0.1054912656545639,
0.029019994661211967,
-0.06542955338954926,
-0.47895947098731995,
0.1462436318397522,
0.013528276234865189,
0.26037871837615967,
0.2430037409067154,
0.2752419114112854,
-0.09281910955905914,
0.006324028596282005,
-0.297258198261261,
-0.020031465217471123,
0.3908569812774658,
0.23665517568588257,
0.31095537543296814,
0.19525006413459778,
0.2913704812526703,
0.3111209273338318,
0.7338733077049255,
0.4331395626068115,
0.1257842630147934,
0.30778056383132935,
-0.005306603386998177,
0.2447405457496643,
-0.12800166010856628,
0.23557627201080322,
0.08641329407691956,
0.20851939916610718,
0.0841032862663269,
0.45696061849594116,
0.16923800110816956,
0.17930597066879272,
-0.0074446238577365875,
0.27412956953048706,
-0.16259221732616425,
-0.08632829785346985,
-0.21150760352611542,
0.22058741748332977,
0.25442731380462646,
-0.11184646189212799,
-0.21847259998321533,
-0.22741082310676575,
-0.09295199066400528,
-0.009699850343167782,
0.3107975125312805,
-0.1397612988948822,
0.15987782180309296,
-0.2789706289768219,
0.30871832370758057,
-0.24222436547279358,
0.19733783602714539,
-0.09416436403989792,
0.04097844287753105,
0.15679197013378143,
-0.1282639503479004,
0.2823030650615692,
-0.2063969224691391,
0.669715940952301,
0.4235340356826782,
-0.0861145555973053,
-0.19567953050136566,
0.03797423094511032,
-0.1961796134710312,
-0.08284415304660797,
-0.08411073684692383,
-0.38073551654815674,
0.35079246759414673,
0.5730159878730774,
-0.8922197222709656,
-0.23553335666656494,
0.14992083609104156,
-0.09494306147098541,
-0.0956510677933693,
0.07840538024902344,
-0.4922603368759155,
-0.11103444546461105,
-0.11835547536611557,
-0.05615251511335373,
0.2861706018447876,
0.11929503828287125,
0.42484232783317566,
0.3039594292640686,
-0.09976454824209213,
-0.14444302022457123,
-0.09374777972698212,
-0.002277807332575321,
0.3680146038532257,
0.2249593734741211,
0.19602757692337036,
0.3923816978931427,
0.3997933864593506,
0.6628229022026062,
0.5268456935882568,
-0.1874062567949295,
-0.5031529664993286,
0.2006138563156128,
-0.19192394614219666,
0.32493695616722107,
0.5626311898231506,
-0.11825311928987503,
-0.15760275721549988,
-0.06210031360387802,
0.23030412197113037,
-0.13864904642105103,
-0.014684874564409256,
0.31099122762680054,
-0.24539972841739655,
0.045638248324394226,
-0.2749635577201843,
0.6521437764167786,
0.09665267169475555,
-0.1135997474193573,
-0.1819949448108673,
0.8432456254959106,
-0.3678223192691803,
0.18073469400405884,
0.07526739686727524,
1.1919642686843872,
-0.13601189851760864,
0.4098844528198242,
0.2010786235332489,
-0.3874257206916809,
0.4156358540058136,
-0.10298971831798553,
-0.08100743591785431,
-0.3189086318016052,
0.042312897741794586,
-0.023849813267588615,
-0.10528509318828583,
0.1340624988079071,
0.44418787956237793,
-0.03184136003255844,
0.43463099002838135,
-0.1730128526687622,
0.5200035572052002,
-0.27627840638160706,
-0.0603942945599556,
0.25524044036865234,
-0.190066397190094,
-0.4981265664100647,
0.007370263338088989,
-0.009709432721138,
-0.21099308133125305,
-0.16492736339569092,
0.0474860817193985,
-0.04048365727066994,
-0.08044995367527008,
0.11161839962005615,
-0.09437380731105804,
0.08044339716434479,
-0.07217526435852051,
0.3820318281650543,
-0.2312115579843521,
-0.15431804955005646,
0.12127004563808441,
0.3989732265472412,
-0.15909743309020996,
-0.060281313955783844,
0.09017714858055115,
0.1523456871509552,
0.025922385975718498,
0.0069250259548425674,
-0.032455746084451675,
0.2035449743270874,
0.026897042989730835,
0.42648863792419434,
-0.32125166058540344,
0.01978769153356552,
0.23646755516529083,
-0.29272085428237915,
0.19810011982917786,
0.08817936480045319,
-0.30328598618507385,
0.12636618316173553,
0.14094117283821106,
0.2373638153076172,
-0.10874402523040771,
0.03091556951403618,
0.2722175717353821,
0.0038428392726927996,
-0.162740558385849,
-0.31321197748184204,
-0.03611431270837784,
-0.06920669972896576,
0.2784641981124878,
-0.1932981014251709,
-0.21842914819717407,
0.2178863286972046,
-0.1130397841334343,
-0.2921774387359619,
0.1335929036140442,
0.04997531324625015,
0.02904488891363144,
-0.31255170702934265,
0.07988391071557999,
0.06992553174495697,
-0.08051024377346039,
-0.017688389867544174,
0.08301296830177307,
0.25900113582611084,
0.06703731417655945,
0.09501577913761139,
0.15070520341396332,
-0.0732627734541893,
0.2136080414056778,
0.20887866616249084,
0.2724874019622803,
-0.15106719732284546,
-0.22033081948757172,
-0.18771345913410187,
-0.326743483543396,
-0.21971014142036438,
0.29986506700515747,
-0.022875510156154633,
0.3675296902656555,
0.3975273370742798,
-0.059444330632686615,
-0.0007724675815552473,
-0.13773733377456665,
0.033367663621902466,
-0.15733405947685242,
-0.25509172677993774,
-0.04879327118396759,
-0.286732017993927,
0.15512321889400482,
0.2372521460056305,
0.11665927618741989,
0.005455794744193554,
-0.20904940366744995,
-0.3299773633480072,
-0.3086725175380707,
0.23403418064117432,
0.3257363736629486,
0.07106351107358932,
0.03579706698656082,
0.686094343662262,
0.15121987462043762,
-0.0833507850766182,
0.02587663009762764,
0.1558646857738495,
0.36772334575653076,
-0.1809450387954712,
0.16884398460388184,
-0.5383611917495728,
-0.07998990267515182,
0.0752444937825203,
0.5386030077934265,
0.15309210121631622,
0.2390587329864502,
-0.018570758402347565,
-0.1302441507577896,
-0.10508312284946442,
0.432241827249527,
0.3449057936668396,
0.4988391697406769,
-0.12265654653310776,
-0.2916272282600403,
0.07029499858617783,
0.0715157613158226,
-0.028718585148453712,
-0.15565040707588196,
0.19953037798404694,
0.21022285521030426,
-0.03221417963504791,
0.31629320979118347,
0.16983292996883392,
0.08936011791229248,
-0.37584632635116577,
0.11392226070165634,
0.3235377073287964,
0.042780548334121704,
0.22207149863243103,
-0.008939627557992935,
-0.10369804501533508,
0.1719748079776764,
0.27575114369392395,
0.1971362829208374,
0.051293354481458664,
0.32121938467025757,
0.0448281466960907,
0.0445002056658268,
0.5407052040100098,
-0.0052426718175411224,
-0.03937121480703354,
0.10944324731826782,
-0.1083240956068039,
0.5963362455368042,
0.20982757210731506,
-0.09245111793279648,
0.06625653058290482,
0.2836814820766449,
0.37317413091659546,
-0.14369545876979828,
-0.0057569947093725204,
0.16861486434936523,
-0.020341522991657257,
-0.34630653262138367,
-0.10143951326608658,
-0.29051917791366577,
-0.4267820119857788,
0.08827705681324005,
-0.1780971735715866,
-0.11815567314624786,
0.22226552665233612,
0.2646867036819458,
0.2997865080833435,
-0.3979048430919647,
-0.2510610818862915,
0.23412936925888062,
0.7418280243873596,
-0.3752467930316925,
0.28961414098739624,
0.11117756366729736,
-0.2908642590045929,
0.16579978168010712,
0.06775554269552231,
0.21520669758319855,
-0.21945971250534058,
0.398116797208786,
-0.13588425517082214,
0.06459210067987442,
0.12382656335830688,
-0.1100475937128067,
-0.05575236678123474,
-0.23413792252540588,
0.14114610850811005,
0.0660032331943512,
-0.03351467102766037,
-0.04415367171168327,
-0.334550142288208,
-0.09378217160701752,
-0.19096648693084717,
-0.6413637399673462,
0.31857359409332275,
-0.41464167833328247,
-0.14153456687927246,
0.04513714835047722,
-0.025628753006458282,
-0.1024809181690216,
-0.5221216678619385,
0.12210436165332794,
0.26879093050956726,
0.11622754484415054,
0.21317653357982635,
0.030793670564889908,
-0.026259060949087143,
0.27025172114372253,
0.05156495049595833,
-0.38442304730415344,
-0.23829317092895508,
-0.37256699800491333,
-0.47561904788017273,
0.21359971165657043,
-0.04245627298951149,
-0.10297392308712006,
0.012406188063323498,
0.38665327429771423,
0.04991887882351875,
-0.028026461601257324,
0.013037756085395813,
-0.22594110667705536,
-0.19890260696411133,
0.19324786961078644,
-0.0677335262298584,
-0.020612027496099472,
-0.11394226551055908,
-0.27856096625328064,
0.13279777765274048,
-0.052045974880456924,
-0.021656129509210587,
0.025860875844955444,
-0.1629599928855896,
0.23149366676807404,
0.07607428729534149,
-0.09094439446926117,
-0.4071446359157562,
-0.037783026695251465,
-0.07786262035369873,
-0.018649302423000336,
0.1044476106762886,
-0.16687367856502533,
-0.0559871532022953,
-0.27133995294570923,
-0.25628557801246643,
0.5123072266578674,
-0.5094337463378906,
0.1665980964899063,
-0.20370419323444366,
-0.16999699175357819,
-0.183370441198349,
0.05480896681547165,
0.08778338134288788,
-0.17837627232074738,
-0.26356449723243713,
0.23363840579986572,
0.14302387833595276,
0.04433324933052063,
-0.011456836014986038,
0.276019424200058,
0.02986884117126465,
0.09171628952026367,
-0.08038501441478729,
-0.4297025799751282,
0.3459043502807617,
-0.3056495189666748,
-0.09018370509147644,
-0.3465611934661865,
0.359244167804718,
0.37476545572280884,
-0.042151667177677155,
-0.26379427313804626,
-0.08040833473205566,
0.44094356894493103,
-0.09588862210512161,
-0.5779604315757751,
-0.020502634346485138,
-0.28208550810813904,
-0.277965784072876,
-0.11163653433322906,
0.15149499475955963,
0.09319356083869934,
-0.023755991831421852,
0.2695954442024231,
-0.21719133853912354
] |
https://github.com/huggingface/datasets/issues/6302
|
ArrowWriter/ParquetWriter `write` method does not increase `_num_bytes` and hence datasets not sharding at `max_shard_size`
|
`writer._num_bytes` is updated every `writer_batch_size`-th call to the `write` method (default `writer_batch_size` is 1000 (examples)). You should be able to see the update by passing a smaller `writer_batch_size` to the `load_dataset_builder`.
We could improve this by supporting the string `writer_batch_size` version as we do with `max_shard_size`, and capping `writer_batch_size` to `max_shard_size` in scenarios where the default `writer_batch_size` > `max_shard_size`.
|
### Describe the bug
An example from [1], does not work when limiting shards with `max_shard_size`.
Try the following example with low `max_shard_size`, such as:
```python
builder.download_and_prepare(output_dir, storage_options=storage_options, file_format="parquet", max_shard_size="10MB")
```
The reason for this is that, in line [2] `writer._num_bytes > max_shard_size` is never true, because the `write` method of `ArrowWriter` [3] does not increase `self._num_bytes`.
Such that respective Arrow/Parquet shards are only written to file based on the `writer_batch_size` or `config.DEFAULT_MAX_BATCH_SIZE`, but not based on `max_shard_size`.
[1] https://huggingface.co/docs/datasets/filesystems#download-and-prepare-a-dataset-into-a-cloud-storage
[2] https://github.com/huggingface/datasets/blob/3e8d420808718c9a1453a2e7ee3484ca12c9c70d/src/datasets/builder.py#L1677
[3] https://github.com/huggingface/datasets/blob/3e8d420808718c9a1453a2e7ee3484ca12c9c70d/src/datasets/arrow_writer.py#L459
### Steps to reproduce the bug
Get example from: https://huggingface.co/docs/datasets/filesystems#download-and-prepare-a-dataset-into-a-cloud-storage
Call `builder.download_and_prepare` with low `max_shard_size` such as `10MB`, e.g.:
```python
builder.download_and_prepare(output_dir, storage_options=storage_options, file_format="parquet", max_shard_size="10MB")
```
### Expected behavior
Shards should be written based on `max_shard_size` instead of batch size.
### Environment info
```
>>> import datasets
>>> datasets.__version__
'2.14.6.dev0
```
| 59
|
ArrowWriter/ParquetWriter `write` method does not increase `_num_bytes` and hence datasets not sharding at `max_shard_size`
### Describe the bug
An example from [1], does not work when limiting shards with `max_shard_size`.
Try the following example with low `max_shard_size`, such as:
```python
builder.download_and_prepare(output_dir, storage_options=storage_options, file_format="parquet", max_shard_size="10MB")
```
The reason for this is that, in line [2] `writer._num_bytes > max_shard_size` is never true, because the `write` method of `ArrowWriter` [3] does not increase `self._num_bytes`.
Such that respective Arrow/Parquet shards are only written to file based on the `writer_batch_size` or `config.DEFAULT_MAX_BATCH_SIZE`, but not based on `max_shard_size`.
[1] https://huggingface.co/docs/datasets/filesystems#download-and-prepare-a-dataset-into-a-cloud-storage
[2] https://github.com/huggingface/datasets/blob/3e8d420808718c9a1453a2e7ee3484ca12c9c70d/src/datasets/builder.py#L1677
[3] https://github.com/huggingface/datasets/blob/3e8d420808718c9a1453a2e7ee3484ca12c9c70d/src/datasets/arrow_writer.py#L459
### Steps to reproduce the bug
Get example from: https://huggingface.co/docs/datasets/filesystems#download-and-prepare-a-dataset-into-a-cloud-storage
Call `builder.download_and_prepare` with low `max_shard_size` such as `10MB`, e.g.:
```python
builder.download_and_prepare(output_dir, storage_options=storage_options, file_format="parquet", max_shard_size="10MB")
```
### Expected behavior
Shards should be written based on `max_shard_size` instead of batch size.
### Environment info
```
>>> import datasets
>>> datasets.__version__
'2.14.6.dev0
```
`writer._num_bytes` is updated every `writer_batch_size`-th call to the `write` method (default `writer_batch_size` is 1000 (examples)). You should be able to see the update by passing a smaller `writer_batch_size` to the `load_dataset_builder`.
We could improve this by supporting the string `writer_batch_size` version as we do with `max_shard_size`, and capping `writer_batch_size` to `max_shard_size` in scenarios where the default `writer_batch_size` > `max_shard_size`.
|
[
-0.21688030660152435,
-0.3292511999607086,
0.040966447442770004,
0.35702747106552124,
-0.010449700057506561,
-0.27933287620544434,
0.17836816608905792,
-0.0648273378610611,
-0.11833849549293518,
0.050891727209091187,
0.21760523319244385,
0.06464846432209015,
-0.09433761984109879,
0.3187028765678406,
0.12382619827985764,
0.01695239543914795,
0.026139788329601288,
-0.0983356386423111,
-0.05397777259349823,
-0.02741793543100357,
-0.007186509668827057,
0.19015245139598846,
-0.11206436157226562,
-0.27921831607818604,
-0.37074074149131775,
0.18335510790348053,
0.014924949035048485,
0.31804150342941284,
-0.32027557492256165,
-0.14656662940979004,
0.0948731079697609,
-0.11340206861495972,
-0.036156438291072845,
0.18609370291233063,
-0.00012676983897108585,
0.0050707533955574036,
0.5412498116493225,
-0.13530351221561432,
-0.2189403474330902,
-0.13968436419963837,
-0.20067983865737915,
-0.3437432646751404,
0.07239920645952225,
-0.1980496644973755,
0.1696629822254181,
0.11236611753702164,
0.05387277528643608,
0.06432601809501648,
0.43130189180374146,
0.3158800005912781,
0.08105004578828812,
0.21689805388450623,
0.6099497079849243,
0.10146888345479965,
0.4170560836791992,
0.3841785192489624,
-0.3191133141517639,
0.08536392450332642,
0.0872809961438179,
0.45391711592674255,
-0.18393340706825256,
-0.01656002551317215,
0.20416992902755737,
-0.03844039514660835,
0.3078960180282593,
0.26376959681510925,
-0.04709785431623459,
-0.08206112682819366,
0.18601074814796448,
-0.004085775464773178,
0.11731137335300446,
-0.4547100365161896,
-0.3826605975627899,
-0.3497680127620697,
-0.11976888030767441,
-0.3749167025089264,
0.44886401295661926,
0.3270583152770996,
-0.2035260796546936,
-0.020056672394275665,
-0.28031644225120544,
-0.2664371430873871,
-0.15031316876411438,
0.007003992795944214,
0.15968337655067444,
0.06585380434989929,
-0.34970971941947937,
0.0054232291877269745,
0.0014160312712192535,
-0.3056338429450989,
-0.00018053129315376282,
-0.2246783971786499,
-0.21271687746047974,
0.1353471428155899,
-0.393541157245636,
-0.04141312837600708,
-0.11975889652967453,
0.3713589906692505,
0.21947667002677917,
0.1859363615512848,
0.30107447504997253,
0.17719367146492004,
0.41297996044158936,
0.12762168049812317,
0.06082702428102493,
-0.13516435027122498,
0.38300129771232605,
0.198958158493042,
-0.12676897644996643,
0.4406002461910248,
0.13056476414203644,
-0.14140000939369202,
0.2886444628238678,
-0.394010066986084,
-0.03028280846774578,
-0.4424714148044586,
0.3088092803955078,
-0.20666080713272095,
0.2747684121131897,
0.20374973118305206,
0.21156719326972961,
0.09962842613458633,
0.028624199330806732,
0.24222716689109802,
0.16221167147159576,
-0.3990958631038666,
-0.35282522439956665,
0.22706174850463867,
-0.16450805962085724,
-0.20872461795806885,
-0.1404026746749878,
-0.07472690939903259,
-0.04787546023726463,
0.08515665680170059,
0.2202884703874588,
-0.0318751260638237,
0.15860934555530548,
0.25776207447052,
0.21564657986164093,
-0.27076297998428345,
-0.05035259574651718,
-0.18260112404823303,
0.12286590784788132,
0.32189229130744934,
-0.18409094214439392,
0.03879653662443161,
-0.16986900568008423,
-0.23858173191547394,
-0.07057882845401764,
0.005972437560558319,
-0.44212985038757324,
-0.25631198287010193,
0.040332335978746414,
0.07027869671583176,
-0.1333838254213333,
-0.0069154612720012665,
-0.6820184588432312,
-0.03819291666150093,
0.4581751525402069,
-0.04477084428071976,
0.05033886432647705,
-0.13318201899528503,
-0.26388442516326904,
-0.2854529023170471,
0.28913769125938416,
0.306327760219574,
-0.03590766340494156,
-0.08039805293083191,
-0.1572735607624054,
0.02580830827355385,
0.4069421589374542,
0.2889835834503174,
0.06523852795362473,
-0.34650179743766785,
-0.1533113420009613,
0.2808570861816406,
0.5679256916046143,
0.20357723534107208,
-0.4128599464893341,
0.19680841267108917,
-0.029809139668941498,
0.037431880831718445,
0.4323674142360687,
-0.34251198172569275,
0.39311283826828003,
-0.02684139832854271,
-0.14514441788196564,
0.15333473682403564,
0.2758985757827759,
-0.1256115436553955,
-0.47928309440612793,
-0.1973167508840561,
-0.42454981803894043,
-0.00674453005194664,
-0.05922484025359154,
-0.19067227840423584,
0.35664379596710205,
-0.10940878093242645,
0.20722150802612305,
-0.0607411228120327,
0.4717194437980652,
0.33216971158981323,
0.09183862805366516,
-0.1033649742603302,
0.05821043998003006,
-0.10030807554721832,
-0.41613927483558655,
0.15605342388153076,
-0.452898770570755,
-0.2620176672935486,
-0.22187064588069916,
-0.07779938727617264,
-0.021524354815483093,
0.10291390866041183,
0.01165420189499855,
-0.15729863941669464,
-0.032786596566438675,
-0.06336461007595062,
0.296823114156723,
0.04532165452837944,
-0.09904652833938599,
-0.08639803528785706,
-0.5120316743850708,
0.3238842189311981,
-0.34322071075439453,
0.23504789173603058,
0.08432949334383011,
-0.5704692602157593,
-0.20503588020801544,
0.07510257512331009,
-0.03202854096889496,
-0.13780346512794495,
0.038851797580718994,
0.4068397879600525,
0.06582919508218765,
0.46394938230514526,
-0.28570374846458435,
0.1004144474864006,
0.20540489256381989,
0.13937075436115265,
0.06866727769374847,
-0.015691913664340973,
0.02304999902844429,
0.1001356914639473,
-0.33193743228912354,
0.3081624507904053,
0.04690133035182953,
0.3658549189567566,
0.09501905739307404,
-0.15772341191768646,
-0.1812720149755478,
0.024957548826932907,
0.19466938078403473,
-0.34046539664268494,
0.14022354781627655,
-0.019225504249334335,
0.07423293590545654,
0.043879564851522446,
-0.021265380084514618,
0.033655233681201935,
0.5092039108276367,
0.11173054575920105,
0.021296802908182144,
0.2420402467250824,
-0.029552146792411804,
-0.20655882358551025,
0.13315296173095703,
0.5798848271369934,
0.33548542857170105,
0.1731073260307312,
0.11327341198921204,
-0.12290390580892563,
0.09048294275999069,
-0.33243313431739807,
0.3217886686325073,
0.08703748136758804,
-0.1764436513185501,
0.3590916693210602,
0.2018541842699051,
-0.23324579000473022,
-0.32143545150756836,
0.13047923147678375,
0.10837538540363312,
-0.05828800052404404,
-0.35414624214172363,
-0.0933869332075119,
-0.1442400962114334,
0.24826687574386597,
-0.4178508222103119,
0.3290892243385315,
-0.3975580036640167,
-0.21832673251628876,
-0.09770569205284119,
0.19246044754981995,
-0.1966504007577896,
-0.24169917404651642,
0.08027765154838562,
0.0077874064445495605,
-0.05013981834053993,
-0.005906423553824425,
-0.32216677069664,
0.22836557030677795,
-0.040608398616313934,
-0.0029915273189544678,
0.2949133515357971,
0.01415092870593071,
-0.026161519810557365,
-0.1080886721611023,
-0.12453892081975937,
-0.45713430643081665,
-0.21598103642463684,
0.09428303688764572,
-0.029813379049301147,
0.34153467416763306,
0.09091979265213013,
-0.15094798803329468,
-0.07113915681838989,
0.06437423080205917,
0.16920648515224457,
-0.09657340496778488,
-0.08791416883468628,
0.18149569630622864,
0.2431640326976776,
0.1254737675189972,
-0.1351328045129776,
0.16614577174186707,
0.011121289804577827,
-0.4129752516746521,
0.541786789894104,
0.4729280173778534,
0.3399369716644287,
-0.06117984652519226,
0.1684444397687912,
0.02457679808139801,
-0.3999609649181366,
0.32037535309791565,
0.226434588432312,
-0.3420456051826477,
0.4483382999897003,
-0.20827196538448334,
-0.45129725337028503,
-0.04081983119249344,
0.16163745522499084,
0.12163259088993073,
0.33935225009918213,
-0.1418384611606598,
0.0804661437869072,
-0.4764077067375183,
-0.06619364768266678,
-0.022679254412651062,
0.3168894648551941,
0.280271053314209,
-0.1603720635175705,
0.043852247297763824,
-0.06681805849075317,
0.15738072991371155,
0.19587190449237823,
0.10216725617647171,
0.044756725430488586,
0.23816311359405518,
0.44506993889808655,
0.011189460754394531,
0.7618280649185181,
0.3869333267211914,
0.05500093474984169,
0.40539824962615967,
-0.07548820972442627,
0.15746471285820007,
-0.28359028697013855,
0.06204301863908768,
0.2654063403606415,
0.030972614884376526,
0.11099639534950256,
0.09110088646411896,
0.07465707510709763,
0.3637460470199585,
0.21775954961776733,
-0.3305545151233673,
-0.008652221411466599,
-0.3447543680667877,
0.24297700822353363,
0.015345215797424316,
0.23319944739341736,
-0.16755250096321106,
0.1300252079963684,
0.04229871556162834,
-0.18473851680755615,
-0.16769763827323914,
0.26916658878326416,
0.198530912399292,
0.15581683814525604,
0.09139835834503174,
0.3423828184604645,
-0.5503029823303223,
0.23610806465148926,
-0.1299164891242981,
0.15966066718101501,
0.030730511993169785,
-0.3354030251502991,
0.2582031488418579,
-0.2225140780210495,
0.3931785821914673,
-0.11950858682394028,
0.006138138473033905,
-0.12850944697856903,
-0.09090066701173782,
-0.5463987588882446,
0.08564324676990509,
-0.16132816672325134,
0.22621604800224304,
-0.016092609614133835,
0.473429411649704,
-0.27951499819755554,
-0.10932976752519608,
0.04552758112549782,
-0.07512431591749191,
0.0510372556746006,
-0.08603431284427643,
-0.1858275979757309,
0.24570420384407043,
-0.5228109955787659,
0.027901075780391693,
0.08915728330612183,
0.45657050609588623,
-0.07165120542049408,
0.06024851277470589,
-0.3234131932258606,
-0.20018717646598816,
0.0075544267892837524,
-0.12033669650554657,
0.44757115840911865,
-0.3800508975982666,
0.013430744409561157,
-0.09363892674446106,
0.020095285028219223,
0.26763463020324707,
0.41322264075279236,
0.24051913619041443,
-0.038154780864715576,
0.10380696505308151,
-0.11427125334739685,
0.27286845445632935,
0.20991618931293488,
-0.12273252755403519,
0.3175315260887146,
-0.03976885974407196,
0.336347758769989,
-0.31250280141830444,
-0.2847367227077484,
0.13006755709648132,
-0.021715018898248672,
0.017252670601010323,
0.027073262259364128,
0.7212400436401367,
0.08997057378292084,
0.17766200006008148,
-0.004186980426311493,
0.7801341414451599,
-0.3578813076019287,
0.3465222120285034,
0.416851669549942,
0.8265669941902161,
0.10566547513008118,
0.3137461841106415,
-0.2604808807373047,
-0.301849901676178,
0.17228738963603973,
-0.13217543065547943,
0.13140267133712769,
-0.27374783158302307,
-0.01818452775478363,
0.006540270522236824,
-0.26393041014671326,
0.3067499101161957,
0.013338759541511536,
-0.18275533616542816,
0.11410102248191833,
-0.02289104089140892,
0.12635421752929688,
-0.17836633324623108,
0.1867118626832962,
-0.7650609612464905,
-0.3009188771247864,
-0.21626780927181244,
0.02198917046189308,
0.180311918258667,
-0.057288896292448044,
0.08168787509202957,
-0.13017846643924713,
-0.08069991320371628,
-0.24968333542346954,
-0.22740484774112701,
0.05438866466283798,
-0.13745392858982086,
-0.036811020225286484,
0.2885768413543701,
-0.5619326233863831,
0.42216065526008606,
0.009154438972473145,
0.01195981353521347,
0.23072804510593414,
-0.13409358263015747,
-0.067807137966156,
-0.020818598568439484,
-0.015606336295604706,
-0.015535076148808002,
-0.19745035469532013,
-0.04408872127532959,
0.0279272198677063,
0.14356756210327148,
-0.2850092649459839,
-0.022612622007727623,
-0.06824862957000732,
-0.14240063726902008,
0.17584098875522614,
-0.05189947038888931,
-0.31586867570877075,
-0.20086264610290527,
-0.3564152717590332,
-0.28017643094062805,
-0.14979560673236847,
0.018558679148554802,
0.12571153044700623,
-0.06647150963544846,
-0.07393113523721695,
-0.2724653482437134,
-0.1292954981327057,
-0.13664177060127258,
0.5402883887290955,
-0.08328641206026077,
0.26802244782447815,
0.5874524116516113,
-0.02296391688287258,
-0.03635077178478241,
-0.1667969822883606,
-0.008432019501924515,
0.21904492378234863,
-0.5152044296264648,
0.3351530134677887,
-0.2543897032737732,
0.07538054883480072,
-0.03752731904387474,
0.2773352563381195,
0.06889079511165619,
-0.026925869286060333,
-0.4188908040523529,
-0.3011854588985443,
-0.326456218957901,
0.1692483127117157,
-0.10295780003070831,
0.08167637139558792,
-0.25043779611587524,
-0.19071589410305023,
0.1018146276473999,
0.11585117131471634,
-0.19506311416625977,
0.08391891419887543,
0.09922269731760025,
0.033113736659288406,
0.5006805658340454,
-0.11141955107450485,
0.04265635833144188,
-0.07055766880512238,
-0.08012215048074722,
0.12215644121170044,
-0.2183644026517868,
-0.08602075278759003,
-0.14829863607883453,
0.132325679063797,
0.16018933057785034,
0.06277108937501907,
-0.3639759421348572,
0.132341206073761,
-0.18890415132045746,
-0.20825326442718506,
0.2164812982082367,
-0.166711688041687,
-0.11674071848392487,
-0.11378862708806992,
0.6676090359687805,
0.1798604279756546,
-0.33300554752349854,
-0.09737133979797363,
-0.08613516390323639,
0.1533842533826828,
-0.28207921981811523,
0.23494356870651245,
0.011712467297911644,
0.08239379525184631,
0.11205625534057617,
0.3019039034843445,
0.1288023591041565,
-0.1178552582859993,
0.30322015285491943,
-0.2163415402173996,
-0.2205006182193756,
-0.08493659645318985,
0.416482537984848,
0.5097812414169312,
0.11575553566217422,
-0.34369325637817383,
0.1287379264831543,
0.12372896075248718,
0.09502007067203522,
-0.07764725387096405,
0.1617223024368286,
0.021438829600811005,
0.034469764679670334,
0.2822107672691345,
0.18908658623695374,
-0.25319522619247437,
-0.35022008419036865,
0.3687250018119812,
-0.007502080872654915,
-0.39819449186325073,
-0.015312537550926208,
0.27349773049354553,
0.05064735189080238,
0.11449985951185226,
0.5238081216812134,
-0.0423601008951664,
0.35282787680625916,
0.36890465021133423,
-0.07487419992685318,
0.6654794216156006,
0.06708640605211258,
0.04746808111667633,
0.113375723361969,
-0.41274356842041016,
0.10965627431869507,
0.1233927384018898,
0.2851954698562622,
0.2974652051925659,
-0.027726173400878906,
0.5212584137916565,
0.2532062530517578,
-0.1251334846019745,
-0.3996722996234894,
0.18444949388504028,
-0.18795064091682434,
-0.45666173100471497,
-0.024376340210437775,
-0.30057618021965027,
-0.3505534529685974,
0.15003429353237152,
-0.09044235944747925,
-0.004813030362129211,
0.3867882490158081,
-0.03457621484994888,
0.09940642863512039,
-0.2240549772977829,
0.11071830987930298,
0.17273873090744019,
0.2526213228702545,
-0.35946124792099,
0.49317672848701477,
0.04628599062561989,
-0.04480420798063278,
-0.18785075843334198,
0.3155595660209656,
0.5722612142562866,
0.19394737482070923,
0.2858642637729645,
0.1478855311870575,
0.2665262520313263,
-0.047854822129011154,
-0.13805605471134186,
0.516319751739502,
0.013541944324970245,
0.20157209038734436,
0.2417518049478531,
0.06070784479379654,
-0.11844407021999359,
-0.3270435631275177,
0.0627656877040863,
0.016758939251303673,
-0.3203432559967041,
0.31435203552246094,
-0.1424570530653,
-0.3531624972820282,
0.010772705078125,
-0.007854975759983063,
-0.41079074144363403,
-0.12715968489646912,
0.30947113037109375,
-0.1753634661436081,
0.03377333655953407,
-0.19896124303340912,
-0.0067636389285326,
0.18595843017101288,
0.6357821822166443,
0.24969874322414398,
-0.17259663343429565,
-0.17303965985774994,
-0.10874393582344055,
-0.24447563290596008,
0.014397971332073212,
-0.11396732926368713,
-0.0037039797753095627,
-0.06284639984369278,
0.377716988325119,
-0.1319136619567871,
-0.10528947412967682,
0.1958053708076477,
0.18665041029453278,
-0.2189318686723709,
0.2789779305458069,
-0.09635160863399506,
0.005558621138334274,
0.14763855934143066,
-0.4651167392730713,
-0.03480929508805275,
-0.34724122285842896,
0.49443644285202026,
-0.26700934767723083,
-0.04709060117602348,
0.06613574177026749,
0.2663973867893219,
0.143571138381958,
-0.6494231224060059,
0.33506354689598083,
0.17213298380374908,
-0.07442714273929596,
-0.09130208194255829,
-0.20586766302585602,
-0.5846132040023804,
0.024577250704169273,
-0.23541182279586792,
0.21432772278785706,
-0.10922403633594513,
0.47055837512016296,
-0.18070226907730103,
-0.2272157520055771,
-0.151785209774971,
0.2090083211660385,
-0.06300632655620575,
-0.1983894556760788,
0.3276224732398987,
-0.01646016165614128,
-0.05199119821190834,
-0.0019448529928922653,
0.244902566075325,
0.3142436444759369,
0.013444241136312485,
0.019908776506781578,
-0.2168358564376831,
-0.4913472533226013,
0.24582374095916748,
-0.36401697993278503,
-0.10586486756801605,
-0.03728222846984863,
0.282947301864624,
0.2284751534461975,
-0.29008206725120544,
-0.663817822933197,
-0.07091069221496582,
0.22573673725128174,
-0.08757289499044418,
0.11944431066513062,
0.29471635818481445,
0.13071145117282867,
-0.1070319339632988,
-0.1561518907546997,
0.2915402054786682,
0.08021339774131775,
-0.2469555139541626,
0.007434189319610596,
-0.2945230007171631
] |
https://github.com/huggingface/datasets/issues/6294
|
IndexError: Invalid key is out of bounds for size 0 despite having a populated dataset
|
It looks to be the same issue as the one reported in https://discuss.huggingface.co/t/indexerror-invalid-key-16-is-out-of-bounds-for-size-0.
Can you check the length of `train_dataset` before the `train_sampler = self._get_train_sampler()` (and after `_remove_unused_columns`) line?
|
### Describe the bug
I am encountering an `IndexError` when trying to access data from a DataLoader which wraps around a dataset I've loaded using the `datasets` library. The error suggests that the dataset size is `0`, but when I check the length and print the dataset, it's clear that it has `1166` entries.
### Steps to reproduce the bug
1. Load a dataset with `1166` entries.
2. Create a DataLoader using this dataset.
3. Try iterating over the DataLoader.
code:
```python
def get_train_dataloader(self) -> DataLoader:
if self.train_dataset is None:
raise ValueError("Trainer: training requires a train_dataset.")
train_dataset = self.train_dataset
data_collator = self.data_collator
print(len(train_dataset))
print(train_dataset)
if is_datasets_available() and isinstance(train_dataset, datasets.Dataset):
train_dataset = self._remove_unused_columns(train_dataset, description="training")
else:
data_collator = self._get_collator_with_removed_columns(data_collator, description="training")
train_sampler = self._get_train_sampler()
dl = DataLoader(
train_dataset,
batch_size=self._train_batch_size,
sampler=train_sampler,
collate_fn=data_collator,
drop_last=self.args.dataloader_drop_last,
num_workers=self.args.dataloader_num_workers,
pin_memory=self.args.dataloader_pin_memory,
worker_init_fn=seed_worker,
)
print(dl)
print(len(dl))
for i in dl:
print(i)
break
return dl
```
output :
```
1166
Dataset({
features: ['input_ids', 'special_tokens_mask'],
num_rows: 1166
})
<torch.utils.data.dataloader.DataLoader object ...>
146
```
Error:
```
Traceback (most recent call last):
File "/home/dl/zym/llamaJP/TestUseContinuePretrainLlama.py", line 266, in <module>
train()
File "/home/dl/zym/llamaJP/TestUseContinuePretrainLlama.py", line 260, in train
trainer.train()
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/transformers/trainer.py", line 1506, in train
return inner_training_loop(
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/transformers/trainer.py", line 1520, in _inner_training_loop
train_dataloader = self.get_train_dataloader()
File "/home/dl/zym/llamaJP/TestUseContinuePretrainLlama.py", line 80, in get_train_dataloader
for i in dl:
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 630, in __next__
data = self._next_data()
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 674, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = self.dataset.__getitems__(possibly_batched_index)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2807, in __getitems__
batch = self.__getitem__(keys)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2803, in __getitem__
return self._getitem(key)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2787, in _getitem
pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 583, in query_table
_check_valid_index_key(key, size)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 536, in _check_valid_index_key
_check_valid_index_key(int(max(key)), size=size)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 526, in _check_valid_index_key
raise IndexError(f"Invalid key: {key} is out of bounds for size {size}")
IndexError: Invalid key: 1116 is out of bounds for size 0
```
### Expected behavior
I expect to be able to iterate over the DataLoader without encountering an IndexError since the dataset is populated.
### Environment info
- `datasets` library version: [2.14.5]
- Platform: [Linux]
- Python version: 3.10
- Other libraries involved: HuggingFace Transformers
| 29
|
IndexError: Invalid key is out of bounds for size 0 despite having a populated dataset
### Describe the bug
I am encountering an `IndexError` when trying to access data from a DataLoader which wraps around a dataset I've loaded using the `datasets` library. The error suggests that the dataset size is `0`, but when I check the length and print the dataset, it's clear that it has `1166` entries.
### Steps to reproduce the bug
1. Load a dataset with `1166` entries.
2. Create a DataLoader using this dataset.
3. Try iterating over the DataLoader.
code:
```python
def get_train_dataloader(self) -> DataLoader:
if self.train_dataset is None:
raise ValueError("Trainer: training requires a train_dataset.")
train_dataset = self.train_dataset
data_collator = self.data_collator
print(len(train_dataset))
print(train_dataset)
if is_datasets_available() and isinstance(train_dataset, datasets.Dataset):
train_dataset = self._remove_unused_columns(train_dataset, description="training")
else:
data_collator = self._get_collator_with_removed_columns(data_collator, description="training")
train_sampler = self._get_train_sampler()
dl = DataLoader(
train_dataset,
batch_size=self._train_batch_size,
sampler=train_sampler,
collate_fn=data_collator,
drop_last=self.args.dataloader_drop_last,
num_workers=self.args.dataloader_num_workers,
pin_memory=self.args.dataloader_pin_memory,
worker_init_fn=seed_worker,
)
print(dl)
print(len(dl))
for i in dl:
print(i)
break
return dl
```
output :
```
1166
Dataset({
features: ['input_ids', 'special_tokens_mask'],
num_rows: 1166
})
<torch.utils.data.dataloader.DataLoader object ...>
146
```
Error:
```
Traceback (most recent call last):
File "/home/dl/zym/llamaJP/TestUseContinuePretrainLlama.py", line 266, in <module>
train()
File "/home/dl/zym/llamaJP/TestUseContinuePretrainLlama.py", line 260, in train
trainer.train()
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/transformers/trainer.py", line 1506, in train
return inner_training_loop(
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/transformers/trainer.py", line 1520, in _inner_training_loop
train_dataloader = self.get_train_dataloader()
File "/home/dl/zym/llamaJP/TestUseContinuePretrainLlama.py", line 80, in get_train_dataloader
for i in dl:
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 630, in __next__
data = self._next_data()
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 674, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = self.dataset.__getitems__(possibly_batched_index)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2807, in __getitems__
batch = self.__getitem__(keys)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2803, in __getitem__
return self._getitem(key)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2787, in _getitem
pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 583, in query_table
_check_valid_index_key(key, size)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 536, in _check_valid_index_key
_check_valid_index_key(int(max(key)), size=size)
File "/root/miniconda3/envs/LLM/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 526, in _check_valid_index_key
raise IndexError(f"Invalid key: {key} is out of bounds for size {size}")
IndexError: Invalid key: 1116 is out of bounds for size 0
```
### Expected behavior
I expect to be able to iterate over the DataLoader without encountering an IndexError since the dataset is populated.
### Environment info
- `datasets` library version: [2.14.5]
- Platform: [Linux]
- Python version: 3.10
- Other libraries involved: HuggingFace Transformers
It looks to be the same issue as the one reported in https://discuss.huggingface.co/t/indexerror-invalid-key-16-is-out-of-bounds-for-size-0.
Can you check the length of `train_dataset` before the `train_sampler = self._get_train_sampler()` (and after `_remove_unused_columns`) line?
|
[
-0.18687252700328827,
0.07448828220367432,
-0.002622341737151146,
0.4387749433517456,
0.024677205830812454,
0.019086070358753204,
0.5693432092666626,
0.3245086371898651,
0.3602715730667114,
0.28707557916641235,
0.16168469190597534,
0.13154318928718567,
-0.33575332164764404,
0.14254382252693176,
-0.18681643903255463,
-0.01108182966709137,
-0.07687634974718094,
0.04905655235052109,
-0.014735989272594452,
0.209173783659935,
-0.2925032377243042,
-0.14679837226867676,
-0.4300651550292969,
0.08821863681077957,
-0.09142190217971802,
-0.14485812187194824,
-0.13359010219573975,
0.08983313292264938,
-0.1396150439977646,
-0.5051153302192688,
0.31996873021125793,
-0.41323980689048767,
0.2514435350894928,
0.7732954025268555,
-0.00011325813102303073,
0.22614894807338715,
0.20213763415813446,
0.02249550260603428,
-0.32498010993003845,
-0.11483336985111237,
-0.05523030459880829,
-0.46165046095848083,
0.07540463656187057,
-0.3649447560310364,
0.07779742777347565,
-0.2932063639163971,
-0.17306669056415558,
-0.1829286813735962,
-0.035733550786972046,
0.3804973065853119,
0.19387713074684143,
0.4721148908138275,
0.14429637789726257,
-0.04622742533683777,
0.16315598785877228,
-0.0038323700428009033,
-0.108800508081913,
0.09604325890541077,
0.23860150575637817,
-0.22936227917671204,
-0.29445889592170715,
0.2567169666290283,
0.06294480711221695,
-0.08480243384838104,
0.19004034996032715,
-0.10085195302963257,
0.0005291923880577087,
-0.19532465934753418,
0.10699751228094101,
0.22030144929885864,
0.37807339429855347,
-0.20322003960609436,
-0.458810955286026,
-0.5336993932723999,
0.08343912661075592,
-0.09287792444229126,
0.19482189416885376,
0.06901282072067261,
0.03537239134311676,
0.14279508590698242,
-0.1700754463672638,
0.14514882862567902,
-0.076069176197052,
0.04711863398551941,
-0.3798005282878876,
0.26294809579849243,
-0.02610817551612854,
0.21597439050674438,
0.1308344304561615,
-0.3401162624359131,
0.23406943678855896,
-0.0430430993437767,
0.013100095093250275,
0.2811015844345093,
-0.34748375415802,
0.039160341024398804,
0.278084933757782,
0.009274482727050781,
0.10023573786020279,
-0.041730038821697235,
-0.07804437726736069,
-0.26406821608543396,
0.06837639957666397,
-0.014686942100524902,
0.39238134026527405,
0.3147801160812378,
0.0016190633177757263,
0.32538294792175293,
0.10650303959846497,
0.12952449917793274,
-0.05549110099673271,
-0.12388672679662704,
0.009995648637413979,
-0.2430259883403778,
0.30788150429725647,
0.01546998880803585,
0.1709357500076294,
0.11397421360015869,
-0.21108627319335938,
0.29839402437210083,
-0.2711348235607147,
0.06254645437002182,
0.36800187826156616,
0.06950071454048157,
0.03035770356655121,
0.3222658932209015,
0.1860358864068985,
0.23054854571819305,
-0.2428448498249054,
-0.08640100806951523,
-0.36749181151390076,
0.18062934279441833,
-0.08628649264574051,
-0.20831742882728577,
-0.01660413295030594,
-0.33279481530189514,
0.13043612241744995,
0.0007103020325303078,
0.05211387947201729,
-0.18213936686515808,
0.05550301820039749,
-0.2077336609363556,
0.006473705172538757,
0.27851006388664246,
-0.029368307441473007,
0.13630172610282898,
0.4024326205253601,
-0.294059157371521,
-0.05932994931936264,
0.270865261554718,
-0.6874532699584961,
-0.3475149869918823,
-0.06287968903779984,
0.18067310750484467,
-0.3415365219116211,
0.28327077627182007,
-0.08974253386259079,
-0.07300959527492523,
0.23428082466125488,
-0.10035203397274017,
0.11418987810611725,
-0.28139638900756836,
-0.08673702925443649,
-0.22813516855239868,
0.008324256166815758,
0.3329336643218994,
-0.4994552433490753,
-0.04825626686215401,
-0.06461600959300995,
-0.023186098784208298,
-0.056863196194171906,
0.023342953994870186,
-0.37611010670661926,
0.41048237681388855,
-0.4133780002593994,
0.3193265199661255,
0.24183908104896545,
-0.19722650945186615,
-0.7955648303031921,
0.27270519733428955,
-0.2836220860481262,
0.1595519483089447,
0.018327176570892334,
0.12781789898872375,
0.10139067471027374,
0.058637525886297226,
0.4880589544773102,
-0.025262709707021713,
-0.08772490173578262,
-0.011572333052754402,
-0.16273199021816254,
-0.17053700983524323,
0.40921932458877563,
0.03202323615550995,
0.3662647008895874,
-0.04736671596765518,
-0.08393000811338425,
0.14731799066066742,
0.09815480560064316,
-0.0266634039580822,
0.06031182408332825,
0.2931109666824341,
0.014331400394439697,
-0.004411153495311737,
0.1426953673362732,
-0.08348070085048676,
-0.20651030540466309,
0.43039220571517944,
0.18824055790901184,
0.05320459231734276,
-0.1951526552438736,
-0.02872220240533352,
-0.25718992948532104,
0.3491080105304718,
-0.0795489102602005,
-0.05344138666987419,
0.11208972334861755,
0.002658061683177948,
-0.1828136295080185,
-0.07707065343856812,
-0.02891169674694538,
0.05188392102718353,
-0.33233752846717834,
0.062192920595407486,
-0.46733444929122925,
0.15742819011211395,
-0.050035469233989716,
0.0512431338429451,
-0.14742745459079742,
0.030970044434070587,
0.025565974414348602,
0.043325427919626236,
-0.05753517895936966,
0.31015294790267944,
0.1848682314157486,
-0.18686766922473907,
-0.1371331512928009,
0.10532614588737488,
0.1839664727449417,
-0.060177214443683624,
-0.0036360230296850204,
0.0719657614827156,
0.29001274704933167,
-0.06851617246866226,
0.06417816132307053,
0.5735936164855957,
-0.13216286897659302,
0.43788856267929077,
-0.24449561536312103,
-0.07781150192022324,
-0.009301498532295227,
0.04861672595143318,
-0.15044163167476654,
0.025854766368865967,
0.14201214909553528,
-0.15902778506278992,
0.13729381561279297,
0.03925653174519539,
-0.037406448274850845,
-0.1964680552482605,
-0.1263720542192459,
0.10523463785648346,
0.13488271832466125,
0.22887426614761353,
-0.20012030005455017,
0.13014745712280273,
-0.034487441182136536,
0.1896369606256485,
0.2325758934020996,
0.19326600432395935,
0.026471279561519623,
-0.12629537284374237,
0.14919881522655487,
-0.06197820231318474,
-0.011892825365066528,
0.20811952650547028,
-0.057543449103832245,
0.3049674928188324,
0.15849213302135468,
-0.01205992978066206,
0.11559046059846878,
-0.06634736806154251,
0.015495523810386658,
0.5577201247215271,
-0.5113663077354431,
0.2978222966194153,
-0.13155321776866913,
-0.14978837966918945,
0.060367997735738754,
-0.13042449951171875,
-0.27872416377067566,
-0.46475231647491455,
-0.2497081607580185,
-0.06381811201572418,
-0.15986424684524536,
-0.11031057685613632,
-0.6112940907478333,
-0.09757323563098907,
0.3348388671875,
-0.09749283641576767,
0.4901357889175415,
-0.037959024310112,
-0.1547655165195465,
0.045944105833768845,
0.15874122083187103,
-0.25805097818374634,
0.03916911035776138,
0.05027467757463455,
0.08295544236898422,
-0.16148699820041656,
-0.18124553561210632,
0.13472166657447815,
-0.10727806389331818,
0.21328085660934448,
0.29180967807769775,
0.33744382858276367,
-0.06616760790348053,
-0.14788013696670532,
0.24833878874778748,
0.03374120593070984,
-0.20221172273159027,
0.27017733454704285,
0.0822569876909256,
0.3313988447189331,
-0.037423718720674515,
-0.015206538140773773,
-0.06890851259231567,
-0.28772199153900146,
0.03269252926111221,
0.035590846091508865,
0.10482354462146759,
0.34966710209846497,
0.28211405873298645,
0.2265009880065918,
0.4842207729816437,
-0.1671818196773529,
-0.0791911780834198,
-0.22070837020874023,
0.325451523065567,
0.16983246803283691,
-0.12324066460132599,
0.0383688248693943,
-0.3285678029060364,
-0.035619188100099564,
0.24351492524147034,
-0.6582257151603699,
-0.13272780179977417,
-0.04047022759914398,
0.08580538630485535,
-0.0374937579035759,
0.25355029106140137,
0.25698328018188477,
-0.1630631387233734,
-0.041415657848119736,
-0.06448876857757568,
-0.18402567505836487,
-0.011510878801345825,
-0.12358637899160385,
0.37566766142845154,
0.12275136262178421,
0.45944079756736755,
0.13025163114070892,
0.4514063000679016,
0.038291774690151215,
0.0956268459558487,
0.12817233800888062,
-0.18129968643188477,
0.309844046831131,
-0.06996064633131027,
-0.3674757182598114,
-0.044072702527046204,
0.11428970098495483,
-0.356831431388855,
0.3056585192680359,
0.009826494380831718,
-0.06026624143123627,
-0.05105413496494293,
-0.3291384279727936,
-0.3416430950164795,
-0.2283327728509903,
0.35518091917037964,
-0.15485945343971252,
0.13102251291275024,
-0.18653008341789246,
0.26326674222946167,
-0.40317007899284363,
-0.1236940547823906,
-0.22502844035625458,
-0.2424672394990921,
0.14108061790466309,
-0.14776583015918732,
-0.13108409941196442,
-0.11712811887264252,
-0.39250412583351135,
0.15535491704940796,
0.1309676170349121,
0.5209395885467529,
0.2576964199542999,
-0.39168858528137207,
-0.03380975127220154,
0.021319307386875153,
0.7066932320594788,
-0.01727178879082203,
-0.06002834439277649,
0.21081459522247314,
-0.05437111482024193,
-0.5839640498161316,
-0.12151814997196198,
-0.17775146663188934,
0.43453216552734375,
0.017376864328980446,
0.5248048305511475,
-0.06697461009025574,
0.14541202783584595,
0.10805119574069977,
0.2655334174633026,
-0.1855574995279312,
-0.2843455672264099,
-0.20279675722122192,
-0.18862059712409973,
-0.08418101072311401,
0.20376832783222198,
0.028771961107850075,
0.3040604889392853,
0.16937823593616486,
0.3943617641925812,
-0.3857039213180542,
-0.2562985122203827,
0.19298908114433289,
0.07021486759185791,
0.3893570899963379,
-0.045029085129499435,
0.20552290976047516,
0.23981745541095734,
-0.0022617988288402557,
0.3886420428752899,
0.6283198595046997,
0.014605393633246422,
-0.09316973388195038,
0.2837076485157013,
-0.018014803528785706,
0.16216729581356049,
0.3140668272972107,
-0.037077367305755615,
0.2055840790271759,
-0.06868831813335419,
0.12241058051586151,
-0.33770740032196045,
-0.08901737630367279,
0.26621711254119873,
-0.1561216562986374,
-0.47528815269470215,
-0.3029636740684509,
0.40951037406921387,
0.10632435977458954,
0.09954434633255005,
0.29170137643814087,
0.4305127263069153,
-0.3039643466472626,
0.3240675926208496,
0.0010092481970787048,
0.7819790244102478,
-0.035688288509845734,
0.08948113024234772,
0.29531437158584595,
0.35603517293930054,
0.4696345925331116,
-0.09974239766597748,
0.033907778561115265,
-0.3073352575302124,
-0.49448928236961365,
-0.08575412631034851,
-0.14093361794948578,
-0.098039411008358,
-0.0035492703318595886,
0.06949847936630249,
0.1863781213760376,
-0.4967309832572937,
0.16421662271022797,
-0.20495565235614777,
0.025707140564918518,
-0.12639863789081573,
-0.15364518761634827,
-0.1163237988948822,
0.12126968801021576,
-0.1712336242198944,
0.1051965206861496,
-0.0628415197134018,
0.06613340228796005,
-0.17052105069160461,
-0.34665948152542114,
-0.2460063397884369,
-0.07227319478988647,
-0.09077783674001694,
0.12622997164726257,
0.24533861875534058,
-0.27979806065559387,
0.1485922783613205,
0.28308260440826416,
-0.007237568497657776,
0.27593177556991577,
-0.0027473196387290955,
0.10422918200492859,
-0.055080853402614594,
0.10140962898731232,
0.21160022914409637,
0.06747337430715561,
0.20996476709842682,
0.2436111569404602,
-0.10698879510164261,
0.22305241227149963,
-0.21189968287944794,
-0.35590243339538574,
0.1650879681110382,
0.4491060972213745,
0.0432344526052475,
-0.5335506200790405,
-0.23295453190803528,
-0.3431549668312073,
0.12418967485427856,
-0.09721232950687408,
0.1004154235124588,
0.23601368069648743,
-0.09894875437021255,
-0.07849232107400894,
0.022300830110907555,
-0.3823542892932892,
0.045112017542123795,
0.5498967170715332,
0.34641584753990173,
0.08653198182582855,
0.6820725202560425,
0.28584936261177063,
-0.18186448514461517,
-0.12367057800292969,
0.2836211621761322,
0.5991256833076477,
-0.03325309231877327,
-0.004337642341852188,
-0.19156356155872345,
0.18749283254146576,
0.03749646991491318,
-0.005139421671628952,
0.35191810131073,
0.10515264421701431,
-0.24631935358047485,
-0.4495783746242523,
-0.48350924253463745,
0.3535117506980896,
0.07417751103639603,
0.1425178349018097,
-0.07190019637346268,
-0.28244855999946594,
-0.08839870989322662,
-0.07420197129249573,
-0.28232744336128235,
0.08234201371669769,
-0.3831678628921509,
0.19598716497421265,
0.14367499947547913,
0.17607879638671875,
0.1498771756887436,
-0.13803282380104065,
0.0885099396109581,
0.14079980552196503,
0.011271740309894085,
-0.2110712230205536,
-0.14862214028835297,
0.08424890041351318,
0.0905960351228714,
-0.1468590795993805,
0.11040012538433075,
-0.40610456466674805,
-0.014023181051015854,
-0.2278216928243637,
-0.057625506073236465,
0.3493371307849884,
0.057700227946043015,
0.1389385461807251,
0.1954389065504074,
0.1365184783935547,
-0.13538703322410583,
0.2653617560863495,
-0.02882147580385208,
0.4005718231201172,
0.11459077149629593,
0.32646170258522034,
0.08187319338321686,
0.10392846167087555,
-0.37131166458129883,
0.16659314930438995,
-0.2773739695549011,
0.08628109097480774,
0.011011257767677307,
-0.3804171681404114,
0.2787525951862335,
0.42322248220443726,
0.3081497251987457,
0.28161677718162537,
-0.32969406247138977,
0.08307890594005585,
0.2005855143070221,
0.16701538860797882,
-0.18039046227931976,
-0.08047354966402054,
-0.0015287045389413834,
0.06398699432611465,
0.005964536219835281,
0.38377994298934937,
-0.0011352933943271637,
-0.015574619174003601,
-0.30844545364379883,
0.07118429988622665,
0.07941994816064835,
0.14091601967811584,
0.10587966442108154,
0.7587767839431763,
-0.19888091087341309,
-0.29007941484451294,
0.378812313079834,
0.10038463771343231,
0.31566229462623596,
0.472780704498291,
-0.07994822412729263,
0.056948088109493256,
0.08244794607162476,
-0.03908791020512581,
-0.2779660224914551,
-0.5398761630058289,
0.05500977858901024,
0.19622477889060974,
-0.004776857793331146,
-0.14841046929359436,
-0.12109287083148956,
0.22552916407585144,
-0.22776587307453156,
0.054874956607818604,
-0.2012803554534912,
0.02158176340162754,
-0.2777169942855835,
-0.04700612276792526,
-0.11263128370046616,
-0.337024450302124,
-0.12942719459533691,
-0.17104463279247284,
-0.04130428656935692,
-0.36746746301651,
-0.1487051099538803,
-0.05951961874961853,
-0.3113243579864502,
-0.28334519267082214,
-0.17889896035194397,
0.5068832635879517,
0.0010930895805358887,
-0.5319692492485046,
0.011890754103660583,
0.1695922613143921,
0.1580735743045807,
0.34464725852012634,
0.07827017456293106,
0.5605947375297546,
0.1859302669763565,
-0.1018570065498352,
-0.010529248975217342,
-0.0023143216967582703,
-0.1763574182987213,
-0.1927606612443924,
-0.023259237408638,
-0.17658087611198425,
0.09480002522468567,
0.4613663852214813,
0.10810762643814087,
-0.22688645124435425,
0.040154196321964264,
0.13817916810512543,
0.2869925796985626,
-0.18109576404094696,
0.001877911388874054,
-0.21780180931091309,
-0.08930225670337677,
-0.1839447170495987,
-0.11535560339689255,
-0.2537417709827423,
-0.14449746906757355,
0.40700554847717285,
0.0014181036967784166,
0.2892064154148102,
0.15013723075389862,
0.06528544425964355,
-0.17486891150474548,
0.3597871661186218,
0.6175991892814636,
-0.14050453901290894,
-0.2832837700843811,
0.021844737231731415,
-0.6244019865989685,
0.036609381437301636,
-0.6796611547470093,
-0.1346684694290161,
0.17401127517223358,
0.2826162576675415,
-0.010513409972190857,
0.019841723144054413,
0.07870014011859894,
-0.048787035048007965,
0.13019715249538422,
0.23103933036327362,
-0.1761920154094696,
-0.5360814929008484,
-0.012112066149711609,
-0.09824680536985397,
0.035785168409347534,
-0.23198240995407104,
-0.027311984449625015,
-0.28666508197784424,
0.08870527893304825,
0.04734077677130699,
0.07892446219921112,
-0.04837922006845474,
-0.0012079998850822449,
0.45466771721839905,
0.06685331463813782,
0.30509287118911743,
0.18355339765548706,
0.027462048456072807,
-0.3934330344200134,
-0.18370027840137482,
-0.20881865918636322,
0.22684040665626526,
0.12671376764774323,
0.5314158201217651,
-0.26297104358673096,
-0.1660604029893875,
-0.07032861560583115,
0.046840135008096695,
0.02974088490009308,
-0.07636827230453491,
-0.29589787125587463,
0.21598219871520996,
-0.3026759624481201,
0.04515942931175232,
0.05997538939118385,
0.0902089774608612,
0.11726022511720657,
0.18869934976100922,
0.13687506318092346,
-0.4810021221637726,
0.2822173833847046,
-0.6198758482933044,
-0.22944240272045135,
0.012968269176781178,
-0.032240718603134155,
0.13274787366390228,
0.08278301358222961,
-0.45768412947654724,
0.10102526098489761,
0.4067774713039398,
0.04037318378686905,
-0.2758498787879944,
-0.1922246813774109,
-0.1993076652288437,
0.2030862718820572,
-0.0772448480129242,
0.1794130504131317,
-0.12827247381210327,
-0.06738988310098648,
0.16217423975467682,
-0.1459634155035019
] |
https://github.com/huggingface/datasets/issues/6292
|
how to load the image of dtype float32 or float64
|
Hi! Can you provide a code that reproduces the issue?
Also, which version of `datasets` are you using? You can check this by running `python -c "import datasets; print(datasets.__version__)"` inside the env. We added support for "float images" in `datasets 2.9`.
|
_FEATURES = datasets.Features(
{
"image": datasets.Image(),
"text": datasets.Value("string"),
},
)
The datasets builder seems only support the unit8 data. How to load the float dtype data?
| 41
|
how to load the image of dtype float32 or float64
_FEATURES = datasets.Features(
{
"image": datasets.Image(),
"text": datasets.Value("string"),
},
)
The datasets builder seems only support the unit8 data. How to load the float dtype data?
Hi! Can you provide a code that reproduces the issue?
Also, which version of `datasets` are you using? You can check this by running `python -c "import datasets; print(datasets.__version__)"` inside the env. We added support for "float images" in `datasets 2.9`.
|
[
-0.3456231355667114,
-0.29850059747695923,
-0.10477250814437866,
0.6033201217651367,
0.5083119869232178,
0.19768941402435303,
0.3276609778404236,
0.18763965368270874,
0.057742077857255936,
0.025699377059936523,
-0.12851518392562866,
-0.02217003144323826,
-0.14426586031913757,
0.21751561760902405,
-0.09825167804956436,
-0.21880683302879333,
0.056802477687597275,
0.4344088137149811,
-0.23794347047805786,
-0.05542488023638725,
-0.2330135852098465,
-0.0429583415389061,
-0.10981900990009308,
-0.20495130121707916,
-0.21496164798736572,
0.18302582204341888,
0.03414590656757355,
0.28104841709136963,
-0.37807998061180115,
-0.4352124035358429,
0.25242137908935547,
0.1287362277507782,
0.683387279510498,
0.5604472160339355,
-0.00011310379341011867,
0.1619330793619156,
0.47780388593673706,
-0.10178686678409576,
-0.1698986142873764,
-0.1800076812505722,
0.025195874273777008,
-0.1801401674747467,
0.09613583236932755,
-0.1402759552001953,
-0.3223463296890259,
-0.3961179256439209,
0.04933849722146988,
-0.24452869594097137,
0.3292387127876282,
0.26509445905685425,
0.21960988640785217,
0.2575094401836395,
0.34316688776016235,
0.03438568115234375,
-0.1916811466217041,
0.06726082414388657,
-0.00029157474637031555,
0.3091605007648468,
0.24335046112537384,
0.3898649215698242,
0.15843264758586884,
0.18253114819526672,
-0.07790634036064148,
0.31813886761665344,
0.21121487021446228,
0.059928618371486664,
0.3858766555786133,
-0.4963211119174957,
0.35824698209762573,
0.3613603711128235,
0.6571469306945801,
0.24131375551223755,
-0.21570512652397156,
0.13456380367279053,
-0.3133983612060547,
0.017085814848542213,
0.13995230197906494,
0.13704606890678406,
0.08209143579006195,
-0.09156191349029541,
-0.27295050024986267,
-0.1533275991678238,
-0.31969010829925537,
0.3289303183555603,
-0.4251929819583893,
0.01954491436481476,
-0.37460532784461975,
0.25841033458709717,
0.10762839019298553,
-0.20457136631011963,
0.304354727268219,
-0.07069170475006104,
0.14622841775417328,
0.29441580176353455,
0.025397393852472305,
0.12143778800964355,
-0.08434108644723892,
-0.18858090043067932,
0.0007273200899362564,
-0.3996572494506836,
-0.2378777712583542,
0.09064549952745438,
-0.45893803238868713,
0.14116711914539337,
0.2650580108165741,
-0.11124788224697113,
0.020007148385047913,
0.2529318630695343,
0.10479496419429779,
0.27599990367889404,
-0.1182934045791626,
-0.16924557089805603,
-0.42531347274780273,
-0.16073064506053925,
0.12627141177654266,
-0.0961807444691658,
0.2558916211128235,
-0.26629015803337097,
-0.23373787105083466,
-0.0343838594853878,
0.1231309249997139,
0.1715744435787201,
0.25243449211120605,
0.39228031039237976,
-0.13839362561702728,
0.33541685342788696,
0.04575373977422714,
0.12438136339187622,
-0.0980595275759697,
-0.24011236429214478,
-0.2275175005197525,
-0.04453852400183678,
0.14351500570774078,
-0.3352400064468384,
0.20736046135425568,
-0.27885085344314575,
0.26403218507766724,
0.16316650807857513,
-0.039530642330646515,
-0.08126561343669891,
-0.05264134705066681,
-0.1522441953420639,
0.20452558994293213,
0.13727599382400513,
-0.038373712450265884,
-0.08830129355192184,
0.31159913539886475,
-0.326596736907959,
-0.026826757937669754,
0.33555981516838074,
-0.30502304434776306,
-0.0072559937834739685,
-0.4845072627067566,
0.12953472137451172,
-0.13367697596549988,
0.014472061768174171,
-0.1778239607810974,
0.3877614438533783,
-0.005738310515880585,
-0.10081358253955841,
-0.21639347076416016,
-0.2807575464248657,
-0.3231334388256073,
-0.13734909892082214,
0.3988587558269501,
0.0912693589925766,
-0.479271799325943,
0.02540004998445511,
-0.10063325613737106,
-0.1841968446969986,
0.14959225058555603,
-0.029047533869743347,
-0.06721507757902145,
-0.026948362588882446,
-0.2131367176771164,
-0.1799597442150116,
0.419243186712265,
-0.21968267858028412,
-0.10619284957647324,
0.06468802690505981,
0.34079301357269287,
-0.08820317685604095,
-0.2295384705066681,
0.23462854325771332,
0.1545437127351761,
0.016556449234485626,
-0.10748626291751862,
0.5183048844337463,
-0.2387857735157013,
0.1240246370434761,
0.08014363050460815,
-0.15591396391391754,
0.2937867045402527,
0.3947283923625946,
0.047175660729408264,
0.19083717465400696,
-0.02980726957321167,
-0.010203971527516842,
-0.08000507205724716,
-0.16458742320537567,
-0.1141849234700203,
0.05786629393696785,
0.20347918570041656,
0.1983102411031723,
0.08250992000102997,
-0.27840444445610046,
-0.4705467224121094,
0.24879682064056396,
0.02297789603471756,
-0.009157270193099976,
-0.019208207726478577,
0.18081670999526978,
-0.24630296230316162,
-0.013517169281840324,
-0.41367313265800476,
0.09988757967948914,
0.13808012008666992,
-0.010948538780212402,
0.04415193572640419,
-0.01160920038819313,
-0.08009830117225647,
-0.21245940029621124,
0.04830174893140793,
0.11345773190259933,
0.06646987795829773,
0.4254434406757355,
0.1367722600698471,
-0.14581692218780518,
0.1734343320131302,
0.1028769463300705,
0.14323094487190247,
-0.13855305314064026,
-0.28899985551834106,
0.3613935112953186,
0.20460109412670135,
0.0018478929996490479,
-0.1802281141281128,
0.18475496768951416,
0.3386860191822052,
-0.21005694568157196,
0.26252269744873047,
0.3238828480243683,
0.19181334972381592,
0.05911087989807129,
-0.25322338938713074,
0.48841583728790283,
-0.06692028045654297,
0.12160256505012512,
0.06813652068376541,
0.011106373742222786,
0.3011060953140259,
0.1998494565486908,
0.1271502822637558,
-0.1990726739168167,
-0.18161824345588684,
-0.03841707110404968,
0.28042978048324585,
0.029069509357213974,
-0.26928219199180603,
-0.07310069352388382,
0.1449049711227417,
-0.013366658240556717,
-0.10224425047636032,
0.02884179912507534,
-0.39262160658836365,
-0.09610731154680252,
0.2382136881351471,
-0.28582966327667236,
0.1878705769777298,
0.01007484644651413,
-0.09598423540592194,
-0.11128921061754227,
0.05386281758546829,
0.11246594786643982,
0.1702670305967331,
-0.09966254234313965,
0.19273267686367035,
0.019732560962438583,
0.11054081469774246,
-0.0813603401184082,
-0.39153847098350525,
0.20391418039798737,
-0.16651736199855804,
0.17177070677280426,
-0.17782163619995117,
-0.042110614478588104,
-0.30636435747146606,
-0.43390583992004395,
0.02266407199203968,
0.22982025146484375,
-0.23779085278511047,
0.003277301788330078,
-0.08762603253126144,
0.18852441012859344,
0.23584863543510437,
0.12928993999958038,
0.12336741387844086,
0.15458601713180542,
0.32766568660736084,
-0.0144010279327631,
0.1190563440322876,
0.13498163223266602,
-0.32259511947631836,
0.06329761445522308,
0.1680479496717453,
0.1737266629934311,
0.4347574710845947,
-0.11815917491912842,
0.13642822206020355,
-0.3801564872264862,
-0.6309900283813477,
0.07226760685443878,
0.010032277554273605,
0.5697411894798279,
0.09530885517597198,
0.3388358950614929,
0.04291331768035889,
0.3675481379032135,
0.4432696998119354,
-0.023455077782273293,
-0.03887280449271202,
0.12722134590148926,
-0.17293064296245575,
-0.1467413753271103,
-0.000633586198091507,
-0.05945112556219101,
-0.30821213126182556,
-0.18947947025299072,
-0.1450941562652588,
0.3536892533302307,
0.17411866784095764,
-0.025905348360538483,
0.3659519851207733,
-0.11030132323503494,
0.15168353915214539,
0.2268337607383728,
-0.30293217301368713,
-0.19828517735004425,
0.2660864591598511,
-0.21521934866905212,
-0.3411664068698883,
0.10210126638412476,
0.17203916609287262,
0.019178492948412895,
-0.13519255816936493,
-0.24840600788593292,
-0.40085798501968384,
-0.29814696311950684,
0.31211116909980774,
-0.03712253272533417,
0.1523488461971283,
-0.05726432800292969,
0.05937173590064049,
0.05322585254907608,
-0.18951058387756348,
0.02001423016190529,
-0.06853707879781723,
0.04544064402580261,
-0.013805851340293884,
0.3757913410663605,
0.3468296527862549,
-0.34625813364982605,
0.15738442540168762,
0.2143290787935257,
-0.46480438113212585,
0.39729878306388855,
-0.30181169509887695,
0.43820053339004517,
-0.3511814773082733,
-0.29106542468070984,
0.07456307858228683,
0.38924410939216614,
-0.028055734932422638,
0.2329482138156891,
0.17699870467185974,
0.06965546309947968,
-0.24310420453548431,
0.2732822597026825,
-0.12788695096969604,
0.023639772087335587,
0.02794313058257103,
0.03524526208639145,
0.05287201702594757,
-0.2426295131444931,
-0.07593967020511627,
-0.151396706700325,
-0.16295254230499268,
-0.1650487631559372,
0.34968674182891846,
0.17990735173225403,
0.16516143083572388,
-0.05593094229698181,
-0.03629613667726517,
-0.17824694514274597,
0.222804993391037,
-0.0570523664355278,
0.3331852853298187,
-0.11148695647716522,
0.2144167423248291,
0.18254956603050232,
0.16780948638916016,
0.21345612406730652,
-0.0568508505821228,
0.27466893196105957,
-0.0256931334733963,
-0.2954844534397125,
-0.17930828034877777,
-0.15154686570167542,
-0.18186067044734955,
0.5006848573684692,
-0.20636197924613953,
0.7343875169754028,
-0.3102174401283264,
-0.2806675136089325,
0.09500487893819809,
0.291879802942276,
-0.33297795057296753,
-0.16965265572071075,
-0.3142854571342468,
-0.08131526410579681,
-0.1453028917312622,
-0.506220817565918,
0.11606764048337936,
0.3898281455039978,
-0.10387048870325089,
-0.19556640088558197,
-0.290609747171402,
-0.10929254442453384,
0.03959503024816513,
0.13241484761238098,
0.28677308559417725,
-0.09844301640987396,
0.0006553605198860168,
0.22573524713516235,
0.023333769291639328,
0.06820344924926758,
0.5375946760177612,
0.18319177627563477,
-0.5097127556800842,
-0.012785188853740692,
0.01894272118806839,
-0.03163597732782364,
0.0028228014707565308,
-0.07253104448318481,
-0.24872994422912598,
0.045448895543813705,
0.1670788675546646,
-0.4664316475391388,
0.1903630793094635,
0.33834853768348694,
0.12161052972078323,
-0.1646960824728012,
-0.4115919768810272,
0.47865697741508484,
0.03472983464598656,
0.17748595774173737,
0.15346913039684296,
-0.0883554071187973,
-0.3221264183521271,
0.32283443212509155,
0.2389296591281891,
0.4017571806907654,
-0.3462637662887573,
0.05439615622162819,
0.311384379863739,
0.3719499707221985,
0.37315279245376587,
0.10605233907699585,
-0.3288946747779846,
-0.4449504315853119,
-0.11720409989356995,
-0.08495353162288666,
0.021505389362573624,
0.1353369951248169,
-0.08534987270832062,
-0.2908911108970642,
0.2034359574317932,
-0.165921151638031,
0.4258246123790741,
0.09030503779649734,
0.08427529036998749,
-0.10771679133176804,
-0.04912340268492699,
-0.07167050987482071,
0.20744121074676514,
-0.19068777561187744,
-0.0846259593963623,
-0.08288803696632385,
0.021622423082590103,
0.01904141530394554,
-0.030237305909395218,
-0.20877216756343842,
-0.12277856469154358,
-0.349831759929657,
0.2559298872947693,
0.16829505562782288,
-0.12181702256202698,
-0.0913676917552948,
0.310046523809433,
0.34482455253601074,
0.05371161550283432,
-0.3434019684791565,
0.151070237159729,
0.148196280002594,
-0.06694189459085464,
-0.09085486084222794,
0.052236463874578476,
0.24812348186969757,
-0.0010669752955436707,
-0.15648700296878815,
0.015462614595890045,
0.01701374724507332,
0.011174224317073822,
-0.22013550996780396,
-0.15591754019260406,
-0.04047359526157379,
-0.2093367874622345,
-0.5128770470619202,
-0.4867028594017029,
0.10141684114933014,
0.10805703699588776,
0.15130509436130524,
0.18889348208904266,
-0.020675964653491974,
-0.09271030873060226,
0.5713902115821838,
-0.19382858276367188,
0.09118536114692688,
0.032931406050920486,
-0.04853304475545883,
0.050806380808353424,
0.3068894147872925,
0.29822853207588196,
-0.1188015565276146,
-0.12703612446784973,
0.23169565200805664,
0.021733807399868965,
-0.24635067582130432,
0.30658191442489624,
0.2527591586112976,
-0.10798606276512146,
-0.10915585607290268,
0.22851984202861786,
0.06256505846977234,
-0.18073034286499023,
-0.08593225479125977,
-0.33432066440582275,
-0.15239016711711884,
-0.10490156710147858,
-0.27774396538734436,
0.37208667397499084,
-0.2162376046180725,
-0.27071377635002136,
-0.08393977582454681,
-0.1870380938053131,
-0.3041698932647705,
0.17382590472698212,
-0.09139958769083023,
0.16414594650268555,
-0.1301569938659668,
0.15438970923423767,
-0.17715661227703094,
0.01633373089134693,
0.15918776392936707,
-0.2189568430185318,
-0.18341051042079926,
-0.17753270268440247,
-0.07437507808208466,
0.15085619688034058,
0.19363120198249817,
-0.4266241490840912,
-0.054846178740262985,
-0.3172856569290161,
-0.4698396921157837,
-0.1064400002360344,
0.11046415567398071,
-0.06839373707771301,
-0.0919666588306427,
0.24497531354427338,
0.02781883254647255,
0.09225519746541977,
0.15332259237766266,
0.39831021428108215,
-0.09608989953994751,
0.6010334491729736,
-0.002799308393150568,
0.13247808814048767,
0.08965494483709335,
-0.1145944744348526,
-0.008434571325778961,
0.16683337092399597,
-0.09104473888874054,
-0.17295372486114502,
0.5351626873016357,
-0.15258075296878815,
0.39137643575668335,
0.09098900854587555,
0.22545109689235687,
0.29553547501564026,
-0.25275251269340515,
0.3437564969062805,
-0.005532592535018921,
0.21345558762550354,
-0.15823321044445038,
0.030554408207535744,
0.010914383456110954,
-0.08833833038806915,
0.006601572036743164,
0.2694713771343231,
0.061211396008729935,
0.4183616638183594,
-0.10927209258079529,
-0.045595355331897736,
0.3490481376647949,
-0.089688241481781,
0.16634361445903778,
0.3663577139377594,
-0.10648253560066223,
0.09463576972484589,
0.10023697465658188,
0.14582431316375732,
-0.11685261875391006,
0.31020891666412354,
-0.25603988766670227,
0.0016021281480789185,
0.07353782653808594,
0.01042565330862999,
0.3215273320674896,
-0.1773599237203598,
0.026272442191839218,
0.2336779087781906,
-0.22220030426979065,
0.22092407941818237,
-0.14837275445461273,
0.4179953932762146,
-0.379611998796463,
-0.17723295092582703,
-0.4576244652271271,
-0.005790207535028458,
-0.13560938835144043,
-0.21622005105018616,
-0.40657415986061096,
-0.1388169825077057,
-0.5726751089096069,
0.2852056622505188,
-0.2593870460987091,
-0.20254729688167572,
-0.1937982738018036,
0.19466480612754822,
-0.16804228723049164,
-0.39560502767562866,
-0.13111087679862976,
0.1965082585811615,
-0.19635722041130066,
0.06637559831142426,
0.33064642548561096,
0.3411366045475006,
0.09468149393796921,
0.5140663981437683,
0.371878981590271,
0.24298523366451263,
0.3584512174129486,
-0.2637876868247986,
-0.10743013769388199,
-0.035677485167980194,
-0.32091501355171204,
-0.10830402374267578,
0.0440886951982975,
-0.13642647862434387,
0.11914455890655518,
0.1181623786687851,
0.1771133691072464,
-0.052911169826984406,
0.029250307008624077,
-0.21692366898059845,
-0.04404468461871147,
-0.2412252426147461,
0.1384809911251068,
-0.1243085116147995,
0.0457160547375679,
-0.05165749788284302,
-0.29327937960624695,
-0.48505327105522156,
-0.20033781230449677,
0.4426936209201813,
-0.05549808591604233,
0.18285846710205078,
0.07179973274469376,
0.038500912487506866,
-0.2603257894515991,
0.3972988426685333,
0.28738054633140564,
0.23545661568641663,
-0.06434150785207748,
-0.05420215427875519,
-0.507693886756897,
-0.047467924654483795,
0.30466428399086,
-0.4225121736526489,
0.39227351546287537,
-0.018747499212622643,
0.07042109221220016,
0.22266678512096405,
0.3225468695163727,
-0.26770922541618347,
0.5789735317230225,
-0.03525266796350479,
-0.12222738564014435,
-0.32845988869667053,
0.07485891878604889,
0.30134889483451843,
-0.368166983127594,
-0.4182094931602478,
0.24280917644500732,
-0.2330375462770462,
0.04594358801841736,
-0.2318534404039383,
0.14577972888946533,
-0.12210416793823242,
-0.4773043096065521,
0.33274152874946594,
0.1790638417005539,
0.2777249813079834,
-0.1791801154613495,
0.22813254594802856,
-0.08232618868350983,
-0.051397424191236496,
-0.32699674367904663,
0.10660852491855621,
-0.060775455087423325,
0.47498512268066406,
-0.110821932554245,
-0.015867073088884354,
-0.31621667742729187,
0.12943817675113678,
-0.14460939168930054,
-0.13741491734981537,
-0.31002190709114075,
0.11814367026090622,
-0.2706676423549652,
-0.08726358413696289,
0.16830666363239288,
0.0386870801448822,
-0.003710120916366577,
0.10085822641849518,
-0.07285221666097641,
-0.2823506295681,
0.5126357078552246,
-0.3284268379211426,
-0.31424394249916077,
-0.005290783476084471,
-0.23175019025802612,
0.26934465765953064,
0.13309398293495178,
-0.42080458998680115,
0.17729729413986206,
0.2668033838272095,
-0.01888291910290718,
-0.24027949571609497,
0.37299561500549316,
0.22905388474464417,
0.06683492660522461,
-0.028072701767086983,
0.5038679838180542,
-0.023646418005228043,
-0.02155902236700058,
-0.1728280484676361,
-0.15361779928207397
] |
https://github.com/huggingface/datasets/issues/6290
|
Incremental dataset (e.g. `.push_to_hub(..., append=True)`)
|
Yea I think waiting for #6269 would be best, or branching from it. For reference, this [PR](https://github.com/LAION-AI/Discord-Scrapers/pull/2) is progressing pretty well which will do similar using the hf hub for our LAION dataset bot https://github.com/LAION-AI/Discord-Scrapers/pull/2.
|
### Feature request
Have the possibility to do `ds.push_to_hub(..., append=True)`.
### Motivation
Requested in this [comment](https://huggingface.co/datasets/laion/dalle-3-dataset/discussions/3#65252597c4edc168202a5eaa) and
this [comment](https://huggingface.co/datasets/laion/dalle-3-dataset/discussions/4#6524f675c9607bdffb208d8f). Discussed internally on [slack](https://huggingface.slack.com/archives/C02EMARJ65P/p1696950642610639?thread_ts=1690554266.830949&cid=C02EMARJ65P).
### Your contribution
What I suggest to do for parquet datasets is to use `CommitOperationCopy` + `CommitOperationDelete` from `huggingface_hub`:
1. list files
2. copy files from parquet-0001-of-0004 to parquet-0001-of-0005
3. delete files like parquet-0001-of-0004
4. generate + add last parquet file parquet-0005-of-0005
=> make a single commit with all commit operations at once
I think it should be quite straightforward to implement. Happy to review a PR (maybe conflicting with the ongoing "1 commit push_to_hub" PR https://github.com/huggingface/datasets/pull/6269)
| 35
|
Incremental dataset (e.g. `.push_to_hub(..., append=True)`)
### Feature request
Have the possibility to do `ds.push_to_hub(..., append=True)`.
### Motivation
Requested in this [comment](https://huggingface.co/datasets/laion/dalle-3-dataset/discussions/3#65252597c4edc168202a5eaa) and
this [comment](https://huggingface.co/datasets/laion/dalle-3-dataset/discussions/4#6524f675c9607bdffb208d8f). Discussed internally on [slack](https://huggingface.slack.com/archives/C02EMARJ65P/p1696950642610639?thread_ts=1690554266.830949&cid=C02EMARJ65P).
### Your contribution
What I suggest to do for parquet datasets is to use `CommitOperationCopy` + `CommitOperationDelete` from `huggingface_hub`:
1. list files
2. copy files from parquet-0001-of-0004 to parquet-0001-of-0005
3. delete files like parquet-0001-of-0004
4. generate + add last parquet file parquet-0005-of-0005
=> make a single commit with all commit operations at once
I think it should be quite straightforward to implement. Happy to review a PR (maybe conflicting with the ongoing "1 commit push_to_hub" PR https://github.com/huggingface/datasets/pull/6269)
Yea I think waiting for #6269 would be best, or branching from it. For reference, this [PR](https://github.com/LAION-AI/Discord-Scrapers/pull/2) is progressing pretty well which will do similar using the hf hub for our LAION dataset bot https://github.com/LAION-AI/Discord-Scrapers/pull/2.
|
[
-0.21518024802207947,
-0.2871015667915344,
0.014854181557893753,
-0.12502898275852203,
-0.19088557362556458,
-0.23461312055587769,
-0.04710112139582634,
0.16226696968078613,
0.1339527815580368,
0.12089086323976517,
-0.12534348666667938,
0.473788857460022,
-0.1289740651845932,
0.5491951107978821,
0.05004692077636719,
0.11659063398838043,
0.17310723662376404,
0.05889648571610451,
0.07219089567661285,
-0.21382223069667816,
-0.22502875328063965,
-0.14266760647296906,
0.15974491834640503,
-0.31458741426467896,
-0.024920962750911713,
-0.24183431267738342,
-0.5399262309074402,
0.16485920548439026,
-0.1910271793603897,
-0.2083112746477127,
0.07342037558555603,
0.42141592502593994,
0.1842297911643982,
0.17923255264759064,
-0.00011426302808104083,
-0.1313357949256897,
0.07827989012002945,
-0.0023000668734312057,
-0.35167884826660156,
-0.021391987800598145,
-0.17556115984916687,
-0.11925122886896133,
0.07147488743066788,
-0.3018202781677246,
0.12335389107465744,
0.36768537759780884,
0.1292695850133896,
-0.21267232298851013,
0.4312632083892822,
-0.008444382809102535,
0.1461922526359558,
0.20258831977844238,
0.07366719841957092,
-0.0934102013707161,
0.39983436465263367,
0.3623979091644287,
-0.11887957155704498,
0.19778716564178467,
0.3130062222480774,
0.025404224172234535,
-0.07986781746149063,
0.12897059321403503,
0.28580138087272644,
-0.2605782449245453,
0.3479853570461273,
-0.035641107708215714,
0.2521370053291321,
-0.2465515434741974,
0.0379563570022583,
0.04128432646393776,
0.06916821748018265,
-0.5066747665405273,
-0.6176975965499878,
-0.4081575572490692,
0.27569517493247986,
-0.5193467736244202,
-0.35297465324401855,
0.3487662374973297,
-0.062055736780166626,
0.013581816107034683,
0.10042817145586014,
-0.6706457734107971,
-0.21573075652122498,
-0.12054874002933502,
0.1600913107395172,
0.03930916264653206,
-0.0083825858309865,
-0.06642840057611465,
0.04931413754820824,
-0.09100590646266937,
0.0033133914694190025,
-0.03922393172979355,
0.07767906785011292,
0.04600828140974045,
-0.30276790261268616,
-0.2267616093158722,
-0.11063256114721298,
0.3134368658065796,
0.4251369535923004,
0.406410276889801,
0.0800306648015976,
-0.006635177880525589,
-0.1110978052020073,
0.043716706335544586,
0.29654940962791443,
0.0242995023727417,
0.12300856411457062,
-0.040873248130083084,
0.014152202755212784,
0.07309138029813766,
0.14797845482826233,
0.11748161166906357,
-0.009286864660680294,
0.28678205609321594,
-0.16765379905700684,
-0.23043736815452576,
0.047158919274806976,
0.03646288439631462,
-0.2840574085712433,
0.13974666595458984,
0.22434350848197937,
-0.028692737221717834,
-0.20401796698570251,
0.3443998098373413,
-0.037376519292593,
-0.12177333980798721,
-0.23141378164291382,
0.4181053042411804,
0.08350086957216263,
0.015552141703665257,
-0.23474793136119843,
0.29740816354751587,
0.10105478763580322,
0.05012558400630951,
0.06838126480579376,
-0.5086284875869751,
-0.08404546231031418,
0.28922611474990845,
0.1298108994960785,
0.14542093873023987,
0.056684546172618866,
-0.07282912731170654,
-0.08408466726541519,
-0.07309561967849731,
-0.023531705141067505,
-0.23494048416614532,
-0.019563738256692886,
-0.2920951843261719,
-0.2498624622821808,
-0.04681600630283356,
-0.1195162758231163,
0.0011638328433036804,
-0.3001689314842224,
0.15322761237621307,
-0.19421547651290894,
-0.23305025696754456,
-0.5407061576843262,
0.3883955180644989,
-0.15398237109184265,
0.23499184846878052,
-0.13529911637306213,
0.1430228054523468,
-0.19729278981685638,
-0.09142428636550903,
0.011395962908864021,
0.5631367564201355,
-0.08472243696451187,
-0.15478739142417908,
0.014397023245692253,
0.10631610453128815,
0.09318220615386963,
0.050811611115932465,
0.06845014542341232,
-0.08207494765520096,
-0.17580579221248627,
0.16810522973537445,
0.1316853016614914,
-0.4682728946208954,
-0.017424551770091057,
0.033148448914289474,
-0.23782165348529816,
-0.014952410943806171,
0.12149842083454132,
-0.030587617307901382,
0.4799974858760834,
-0.038730718195438385,
0.09148043394088745,
-0.04321654140949249,
0.04042990878224373,
-0.14394623041152954,
-0.370185911655426,
-0.2865956723690033,
-0.0476815328001976,
0.17129938304424286,
0.13552506268024445,
0.1471906453371048,
0.4276334047317505,
0.09883621335029602,
0.2900944948196411,
-0.21919596195220947,
0.41618144512176514,
-0.13326436281204224,
0.47498825192451477,
0.15967398881912231,
-0.16445542871952057,
-0.26438623666763306,
-0.6085697412490845,
0.011992011219263077,
0.13396905362606049,
0.009325597435235977,
0.000059954822063446045,
-0.3713514804840088,
-0.01571168564260006,
0.25476086139678955,
-0.05665804073214531,
0.08414240181446075,
0.15416570007801056,
0.1261506974697113,
0.07860603928565979,
-0.17808890342712402,
-0.48495206236839294,
0.4290465712547302,
-0.20175310969352722,
0.3858409523963928,
-0.34089183807373047,
0.5997834801673889,
0.024841126054525375,
-0.23940977454185486,
0.26992034912109375,
0.23126640915870667,
0.073235422372818,
-0.25137197971343994,
0.40499401092529297,
0.22074070572853088,
0.11267202347517014,
0.3413664996623993,
0.5384911298751831,
0.1251293420791626,
0.33851125836372375,
0.32001203298568726,
0.052322715520858765,
-0.479836106300354,
-0.17382559180259705,
-0.004952438175678253,
-0.3764808773994446,
0.4143911600112915,
0.0060484036803245544,
0.13753661513328552,
0.23351342976093292,
-0.06357591599225998,
-0.05206556245684624,
0.0671040415763855,
-0.15088848769664764,
-0.27657350897789,
0.15469951927661896,
0.24545389413833618,
0.22567199170589447,
-0.10139071941375732,
-0.42605060338974,
0.3986353278160095,
0.20384593307971954,
-0.05425690859556198,
0.088981494307518,
0.23776984214782715,
0.05551328510046005,
-0.04501644894480705,
0.13241012394428253,
0.18343837559223175,
0.09086763858795166,
0.23070739209651947,
0.16606108844280243,
0.09934070706367493,
0.0936063751578331,
-0.0011472124606370926,
-0.09606537967920303,
-0.04369223117828369,
0.12806622684001923,
0.3784063160419464,
0.4562453031539917,
0.015449900180101395,
-0.39206787943840027,
-0.23017650842666626,
0.03581257909536362,
0.2442149519920349,
0.05763997510075569,
-0.36216306686401367,
-0.03802718222141266,
0.1376347839832306,
-0.3088890016078949,
-0.04224219173192978,
-0.28376832604408264,
-0.3038468062877655,
0.19643659889698029,
0.13086624443531036,
-0.036533743143081665,
-0.033686719834804535,
-0.06869618594646454,
0.5216339826583862,
-0.2542213201522827,
0.04447132349014282,
-0.4072742164134979,
-0.18724431097507477,
0.29259952902793884,
0.06602326035499573,
0.0665753185749054,
0.027358202263712883,
0.5196309089660645,
0.019697075709700584,
0.04498591274023056,
-0.5452744960784912,
-0.34891262650489807,
0.17628604173660278,
-0.14652836322784424,
-0.06025862693786621,
0.34650465846061707,
-0.14876526594161987,
0.06147480010986328,
-0.2993239760398865,
-0.04020099341869354,
-0.12471288442611694,
-0.3523816168308258,
-0.2516772150993347,
0.03653053194284439,
0.18137896060943604,
-0.010006699711084366,
-0.06804611533880234,
-0.31520965695381165,
-0.46633943915367126,
0.8351719975471497,
0.4465973973274231,
0.1231129840016365,
-0.1906529664993286,
-0.32751134037971497,
0.1086326390504837,
0.07072355598211288,
0.05915835499763489,
-0.07933918386697769,
-0.16798289120197296,
0.10690584778785706,
-0.1692236065864563,
-0.10806968808174133,
0.04391738399863243,
-0.17714431881904602,
0.07398833334445953,
0.10208436101675034,
-0.19785377383232117,
-0.6613856554031372,
0.04721272736787796,
0.27697324752807617,
-0.2195204198360443,
0.09813693910837173,
0.2498077154159546,
-0.06491763144731522,
-0.031603604555130005,
-0.09460265934467316,
-0.00905594788491726,
0.27186164259910583,
0.44768020510673523,
-0.26774004101753235,
-0.017469372600317,
0.1164921298623085,
0.2737077474594116,
0.3887746334075928,
0.28319618105888367,
-0.022754017263650894,
0.32993581891059875,
-0.10324142128229141,
0.2975291609764099,
-0.07867423444986343,
0.01697309873998165,
0.15035343170166016,
-0.22323256731033325,
-0.09039565175771713,
0.22129586338996887,
-0.06567563116550446,
-0.03040694259107113,
-0.005435559898614883,
-0.23960566520690918,
0.20539528131484985,
-0.20430198311805725,
-0.24177534878253937,
-0.1637309491634369,
0.04886012524366379,
-0.08316808193922043,
-0.135405033826828,
-0.20421947538852692,
0.08405701071023941,
0.2517699599266052,
0.1662389039993286,
0.2133699357509613,
0.035292718559503555,
-0.22877347469329834,
-0.08718471229076385,
-0.8362804651260376,
0.194327712059021,
0.07091015577316284,
-0.0048777880147099495,
0.09812946617603302,
-0.31966617703437805,
0.022864051163196564,
-0.2867297828197479,
0.6257911324501038,
-0.1666216105222702,
-0.03956672549247742,
-0.28376686573028564,
-0.22058650851249695,
-0.39990708231925964,
0.14197130501270294,
-0.28823161125183105,
0.06590870022773743,
0.2528636157512665,
0.9697203040122986,
-0.6567044258117676,
-0.18179894983768463,
0.16825199127197266,
-0.20974867045879364,
-0.019390609115362167,
0.22862285375595093,
-0.052765022963285446,
-0.2553335130214691,
-0.32500550150871277,
0.21492882072925568,
0.13653996586799622,
0.17421308159828186,
0.02800147607922554,
-0.05138682574033737,
-0.17814423143863678,
0.06496606022119522,
-0.012756258249282837,
-0.22973334789276123,
-0.06705337017774582,
0.26843976974487305,
0.10814885795116425,
0.10383996367454529,
0.3679632544517517,
0.47352614998817444,
0.4055491089820862,
-0.2626851797103882,
-0.17080789804458618,
0.11802484840154648,
-0.209157332777977,
0.20078617334365845,
0.2850094139575958,
0.40685632824897766,
0.405234694480896,
-0.39306432008743286,
0.2603676915168762,
-0.3876321017742157,
0.038173940032720566,
0.06725762039422989,
-0.2160256803035736,
-0.22696734964847565,
-0.02452389895915985,
0.24977746605873108,
-0.04695313423871994,
-0.05438895896077156,
-0.22141918540000916,
0.4635475277900696,
-0.15260331332683563,
0.3170027732849121,
0.24154022336006165,
0.9805786609649658,
-0.10483244061470032,
0.25757670402526855,
0.15915769338607788,
-0.5599584579467773,
0.42753568291664124,
-0.22115294635295868,
-0.12476417422294617,
-0.36649268865585327,
-0.3424622416496277,
0.06431172788143158,
0.05514926835894585,
-0.08800364285707474,
-0.02733377367258072,
-0.25726592540740967,
0.12531378865242004,
0.18370167911052704,
0.3670139014720917,
-0.09293757379055023,
0.38891223073005676,
-0.3962191641330719,
-0.18860715627670288,
-0.17814281582832336,
0.14853689074516296,
0.0652078166604042,
0.011510869488120079,
-0.09768874943256378,
-0.19331756234169006,
0.06376679241657257,
0.03073166310787201,
-0.10384661704301834,
0.08139567077159882,
-0.10211870819330215,
-0.015017837285995483,
-0.09903708100318909,
-0.17707443237304688,
-0.03465652093291283,
0.06435124576091766,
0.586101233959198,
0.03270673006772995,
-0.02589748613536358,
-0.19508953392505646,
0.009363275021314621,
0.03949356824159622,
-0.023202136158943176,
-0.18752051889896393,
0.10015755146741867,
-0.05454108491539955,
0.08547789603471756,
0.04976200312376022,
0.08783666044473648,
-0.22278153896331787,
-0.13467220962047577,
0.012332051992416382,
-0.06808081269264221,
0.022832948714494705,
0.34478893876075745,
0.4456740915775299,
-0.23540060222148895,
-0.23679372668266296,
0.07935607433319092,
-0.09502251446247101,
-0.2515232264995575,
0.009041592478752136,
-0.1511664092540741,
-0.07061190158128738,
-0.17970441281795502,
0.3963061273097992,
0.02706661820411682,
0.14431071281433105,
0.07127361744642258,
0.044512707740068436,
-0.22701731324195862,
-0.2877543568611145,
-0.22718128561973572,
0.15563303232192993,
-0.1978389024734497,
0.2667761743068695,
-0.24204450845718384,
0.012739971280097961,
0.14598242938518524,
0.08524911105632782,
0.05827034264802933,
-0.0752425268292427,
-0.17917746305465698,
0.020962588489055634,
-0.1771780103445053,
0.2780854105949402,
0.15913932025432587,
0.5298102498054504,
0.1329103410243988,
0.05548281967639923,
-0.11637719720602036,
0.21925699710845947,
-0.35844048857688904,
0.0849592313170433,
-0.1668226420879364,
0.13227775692939758,
0.19333794713020325,
-0.2513324022293091,
0.004743024241179228,
-0.046705055981874466,
0.0925065129995346,
-0.0016388967633247375,
-0.13190723955631256,
-0.15390422940254211,
-0.021620402112603188,
0.06457550078630447,
0.0878269374370575,
0.49674391746520996,
-0.08528188616037369,
0.15329547226428986,
-0.06418778002262115,
-0.16592952609062195,
0.40526124835014343,
0.11458828300237656,
-0.12821517884731293,
-0.03558840602636337,
0.8602408170700073,
0.10427316278219223,
0.10198467969894409,
0.07556954026222229,
0.5672285556793213,
0.1356251835823059,
-0.38829317688941956,
0.33288881182670593,
-0.3198700547218323,
-0.0003070831298828125,
0.38784006237983704,
0.333564817905426,
0.4880218505859375,
0.07629519701004028,
0.09178268909454346,
-0.1092967540025711,
-0.35251912474632263,
0.08502281457185745,
0.5634262561798096,
0.15391448140144348,
0.07335168123245239,
-0.06592659652233124,
0.12898790836334229,
0.24790064990520477,
-0.23071496188640594,
-0.2228127121925354,
0.42802169919013977,
-0.32333120703697205,
0.27030280232429504,
0.4636784791946411,
0.31843578815460205,
0.07685390114784241,
-0.2213565856218338,
0.07388886064291,
0.2878943383693695,
-0.23804835975170135,
0.06472122669219971,
0.19844084978103638,
0.10689924657344818,
-0.050652485340833664,
0.100819893181324,
0.24469801783561707,
0.3172226846218109,
0.14566996693611145,
-0.020748384296894073,
0.4017995595932007,
0.3331782817840576,
0.06174667179584503,
0.5257803797721863,
0.005848053842782974,
-0.1123618632555008,
0.3649928569793701,
0.24158935248851776,
0.08384273946285248,
0.041765689849853516,
0.5894780158996582,
0.3212873041629791,
-0.37555861473083496,
-0.2575145661830902,
0.4382338225841522,
-0.044631123542785645,
-0.12848779559135437,
-0.03967191278934479,
-0.2834295332431793,
-0.400408536195755,
0.14267724752426147,
-0.12427054345607758,
-0.24904824793338776,
-0.055016204714775085,
0.019725549966096878,
0.5017213225364685,
-0.14756809175014496,
0.08329382538795471,
0.10784747451543808,
0.3196747303009033,
-0.25784769654273987,
0.0918266773223877,
-0.05225344002246857,
-0.27094486355781555,
-0.2591921389102936,
0.15019841492176056,
0.035319313406944275,
-0.013698689639568329,
-0.12571661174297333,
0.18251650035381317,
0.35590168833732605,
0.08461370319128036,
-0.10593238472938538,
-0.11779230833053589,
-0.16051913797855377,
-0.02910885214805603,
0.4388171434402466,
0.10360974073410034,
-0.16480785608291626,
0.09506915509700775,
-0.014866646379232407,
-0.16057632863521576,
-0.3517671227455139,
0.1694125533103943,
0.13549858331680298,
-0.14625683426856995,
0.09950385242700577,
0.02735201269388199,
-0.31373804807662964,
-0.07919837534427643,
-0.16728368401527405,
-0.3504222333431244,
0.09146823734045029,
0.024865716695785522,
0.09613682329654694,
-0.29417043924331665,
0.3561060130596161,
0.4054892957210541,
-0.3282206952571869,
-0.15971636772155762,
-0.3958044648170471,
-0.09614884853363037,
0.16760829091072083,
0.10627071559429169,
-0.1156470775604248,
0.053207192569971085,
0.23884473741054535,
0.010050781071186066,
-0.08896105736494064,
-0.23282717168331146,
-0.1349075436592102,
-0.3040563762187958,
0.3390965759754181,
-0.2617962956428528,
0.1615702360868454,
0.11753702908754349,
-0.21079640090465546,
0.2616201341152191,
-0.1792394518852234,
0.1633663773536682,
0.17641641199588776,
-0.058500826358795166,
0.14997728168964386,
0.2247946858406067,
0.09427905082702637,
-0.6095225811004639,
0.24153652787208557,
-0.08205810189247131,
-0.10980315506458282,
-0.2029877007007599,
-0.2285689413547516,
-0.11098028719425201,
-0.2801513969898224,
-0.48140886425971985,
0.09752514958381653,
-0.2934560775756836,
0.2365795075893402,
-0.05975450575351715,
-0.22445406019687653,
0.05601540952920914,
0.059903621673583984,
0.3988029956817627,
0.05864797160029411,
-0.07661605626344681,
0.21097539365291595,
-0.03764805197715759,
0.026141896843910217,
-0.02183672785758972,
0.231758713722229,
0.06843795627355576,
0.1881939172744751,
-0.14476118981838226,
-0.29693177342414856,
0.30704551935195923,
-0.2337157130241394,
-0.20604796707630157,
-0.22578315436840057,
0.3007790148258209,
0.4408782422542572,
-0.3469753563404083,
-0.12736016511917114,
-0.015666641294956207,
0.1392594873905182,
0.0037368647754192352,
-0.2707594037055969,
0.3456040918827057,
-0.10330888628959656,
-0.35883817076683044,
-0.08701484650373459,
0.09821727871894836,
0.16463962197303772,
-0.2181502729654312,
0.061238761991262436,
-0.42700207233428955
] |
https://github.com/huggingface/datasets/issues/6288
|
Dataset.from_pandas with a DataFrame of PIL.Images
|
A duplicate of https://github.com/huggingface/datasets/issues/4796.
We could get this for free by implementing the `Image` feature as an extension type, as shown in [this](https://colab.research.google.com/drive/1Uzm_tXVpGTwbzleDConWcNjacwO1yxE4?usp=sharing) Colab (example with UUIDs).
|
Currently type inference doesn't know what to do with a Pandas Series of PIL.Image objects, though it would be nice to get a Dataset with the Image type this way
| 27
|
Dataset.from_pandas with a DataFrame of PIL.Images
Currently type inference doesn't know what to do with a Pandas Series of PIL.Image objects, though it would be nice to get a Dataset with the Image type this way
A duplicate of https://github.com/huggingface/datasets/issues/4796.
We could get this for free by implementing the `Image` feature as an extension type, as shown in [this](https://colab.research.google.com/drive/1Uzm_tXVpGTwbzleDConWcNjacwO1yxE4?usp=sharing) Colab (example with UUIDs).
|
[
-0.4201357066631317,
-0.12456884235143661,
-0.008254965767264366,
0.2601349353790283,
0.02428399957716465,
0.02930574119091034,
0.4310658276081085,
0.14413626492023468,
0.020406007766723633,
0.05679570138454437,
-0.16976913809776306,
0.2837598919868469,
-0.09335252642631531,
0.357803076505661,
0.17620743811130524,
-0.45386359095573425,
0.11961643397808075,
0.006854496896266937,
-0.2845222055912018,
-0.1102835088968277,
-0.41039952635765076,
0.13809315860271454,
-0.09357912093400955,
0.14169786870479584,
-0.2899152338504791,
-0.4519021809101105,
-0.27080684900283813,
-0.0537547767162323,
-0.24880848824977875,
-0.17666968703269958,
0.1922009438276291,
0.06007711589336395,
0.4214744567871094,
0.12731824815273285,
-0.0001067579141817987,
-0.23394781351089478,
0.2193930447101593,
-0.04643043875694275,
0.23909646272659302,
-0.1224374920129776,
-0.26944082975387573,
0.057622022926807404,
0.2511492669582367,
-0.2665751576423645,
-0.1275375783443451,
-0.267835408449173,
0.37500789761543274,
0.1756661832332611,
0.1315118819475174,
0.1464669555425644,
0.2182747721672058,
0.09132035821676254,
0.024516869336366653,
-0.1771056205034256,
-0.2090972363948822,
0.40698379278182983,
0.07486414909362793,
-0.055220987647771835,
0.08116737008094788,
-0.004493908490985632,
0.21337467432022095,
0.296127051115036,
0.032432183623313904,
0.013728437945246696,
0.11056655645370483,
0.1344793438911438,
-0.0968574807047844,
-0.3499179184436798,
-0.058652520179748535,
0.3561111390590668,
0.12494803965091705,
0.0248003788292408,
-0.2403913289308548,
-0.24040594696998596,
0.08755289018154144,
0.14736925065517426,
0.05829360708594322,
0.026736494153738022,
-0.2669855058193207,
0.043186914175748825,
0.1400076448917389,
-0.02473115548491478,
-0.18896028399467468,
0.15065838396549225,
-0.38533976674079895,
-0.10690678656101227,
-0.03052806854248047,
0.11401741206645966,
0.10460804402828217,
-0.0037892982363700867,
0.04617573320865631,
-0.0416732057929039,
0.10459832847118378,
0.10097993910312653,
-0.018212396651506424,
-0.14972522854804993,
0.0916193425655365,
0.20899125933647156,
0.14326074719429016,
-0.2540217638015747,
-0.21746480464935303,
-0.06691081821918488,
-0.41043031215667725,
0.2619328200817108,
0.5066683888435364,
-0.19754281640052795,
-0.2760276198387146,
0.13506962358951569,
0.22865882515907288,
0.20551185309886932,
-0.041926249861717224,
-0.09082228690385818,
-0.28194549679756165,
0.02881835773587227,
-0.034414492547512054,
-0.18988659977912903,
0.186336949467659,
-0.08295480906963348,
-0.21784181892871857,
-0.21656005084514618,
-0.09587055444717407,
0.2609853148460388,
0.18036705255508423,
0.1813097894191742,
-0.09374736994504929,
0.4880844056606293,
0.42079514265060425,
0.15542052686214447,
0.05088275671005249,
-0.03411947935819626,
-0.15586437284946442,
0.14903666079044342,
-0.14789511263370514,
-0.1911207139492035,
-0.16242071986198425,
0.303378701210022,
-0.04486238956451416,
-0.1299261748790741,
0.043583936989307404,
0.39787477254867554,
0.08914907276630402,
-0.21468684077262878,
0.17632928490638733,
0.06797423958778381,
-0.1780085414648056,
-0.3106152415275574,
0.0982012003660202,
-0.13638198375701904,
-0.3476852774620056,
0.008124537765979767,
-0.11233767122030258,
0.014255788177251816,
-0.3509212136268616,
0.20702140033245087,
-0.4336005449295044,
-0.16041438281536102,
-0.7768356204032898,
0.515112042427063,
-0.14067807793617249,
0.17901049554347992,
0.08368456363677979,
-0.2508682608604431,
-0.05284925550222397,
-0.03995474800467491,
0.09428174793720245,
0.07022242993116379,
-0.2835759222507477,
-0.11872662603855133,
-0.35646679997444153,
-0.35458269715309143,
0.040259167551994324,
0.0903676301240921,
0.039406973868608475,
0.05481278896331787,
-0.19976510107517242,
0.1792922168970108,
-0.023605026304721832,
-0.0002849102020263672,
0.08529224991798401,
-0.0932072252035141,
0.17404359579086304,
0.059928104281425476,
0.062367167323827744,
0.3180929720401764,
0.018891168758273125,
0.03311093896627426,
-0.038258932530879974,
0.6344775557518005,
-0.29378098249435425,
0.02444828487932682,
0.04010365530848503,
-0.3032399117946625,
-0.25713735818862915,
0.1579238474369049,
0.30400535464286804,
0.23681581020355225,
0.0677783340215683,
0.01814134046435356,
-0.012104339897632599,
-0.14872068166732788,
-0.09312454611063004,
-0.3132626414299011,
0.7365121841430664,
-0.05663508176803589,
0.06758679449558258,
-0.4104034900665283,
-0.06854752451181412,
0.06089058518409729,
-0.0801616832613945,
0.28712931275367737,
-0.40828531980514526,
-0.3150363564491272,
0.08600278943777084,
0.07701604813337326,
0.1444404423236847,
0.018163837492465973,
0.18436990678310394,
0.07699933648109436,
-0.10767847299575806,
0.04022322967648506,
-0.09518735110759735,
0.1406928151845932,
-0.03245024383068085,
-0.03404485061764717,
-0.10210219025611877,
0.13799670338630676,
0.053988583385944366,
0.09472832083702087,
-0.0325489267706871,
-0.0001446157693862915,
-0.3445366621017456,
-0.036618370562791824,
0.1258551925420761,
0.05908292531967163,
0.1993858516216278,
0.26655468344688416,
0.17226001620292664,
0.12963441014289856,
0.022041337564587593,
-0.3929120600223541,
-0.2939299941062927,
-0.18840321898460388,
0.11381049454212189,
0.2470431625843048,
-0.061104513704776764,
0.3809241056442261,
-0.055728476494550705,
-0.02074788510799408,
-0.1465180516242981,
0.25361984968185425,
0.2568203806877136,
0.1660262495279312,
-0.012264600954949856,
-0.1090441346168518,
-0.27471429109573364,
0.350113183259964,
-0.162560373544693,
0.11652159690856934,
-0.5655737519264221,
-0.10210677236318588,
0.12012384831905365,
-0.009390892460942268,
0.31211093068122864,
-0.025567516684532166,
0.0011092647910118103,
0.20229533314704895,
0.43617668747901917,
0.2755083441734314,
0.22354978322982788,
0.19286786019802094,
0.0038388557732105255,
-0.04255884140729904,
-0.2518172264099121,
0.043269939720630646,
0.20412348210811615,
0.15795479714870453,
0.056066811084747314,
-0.4390513002872467,
0.07090926170349121,
0.13189423084259033,
-0.48742449283599854,
-0.1497996598482132,
-0.18221744894981384,
0.14001786708831787,
-0.03469673544168472,
0.018355438485741615,
-0.22403877973556519,
-0.5321934223175049,
0.06510812044143677,
0.31717362999916077,
-0.10225202143192291,
-0.158809095621109,
0.006790412589907646,
0.1221141368150711,
-0.08387884497642517,
0.06792789697647095,
-0.3009328544139862,
0.4311068058013916,
0.15579810738563538,
-0.3296336531639099,
-0.3511120676994324,
-0.09876050055027008,
-0.11684644967317581,
0.2606393098831177,
0.15972785651683807,
0.08256776630878448,
0.405465304851532,
-0.18938320875167847,
0.05181554704904556,
-0.23106737434864044,
-0.6174409985542297,
0.18600688874721527,
-0.16648772358894348,
0.4475904405117035,
0.565129816532135,
0.1279357224702835,
-0.21386407315731049,
-0.09986943006515503,
0.11338280886411667,
-0.26204007863998413,
-0.26784127950668335,
-0.2308451384305954,
-0.2776696979999542,
0.08612744510173798,
-0.04265357553958893,
0.07529677450656891,
-0.15803615748882294,
-0.2316385954618454,
0.37040919065475464,
0.1917261928319931,
-0.08227968215942383,
0.209276482462883,
0.2131470888853073,
0.16403742134571075,
0.16589845716953278,
-0.011068642139434814,
-0.1683206409215927,
-0.0962492823600769,
0.16678251326084137,
0.13341094553470612,
-0.22654159367084503,
-0.13000257313251495,
-0.4818190336227417,
0.16154414415359497,
0.18791772425174713,
-0.3068089187145233,
-0.9108003377914429,
-0.1238526999950409,
0.3963068723678589,
0.3362179100513458,
0.0060311853885650635,
-0.12334413826465607,
0.12265919148921967,
-0.08339865505695343,
-0.16525055468082428,
0.01557636633515358,
0.18058601021766663,
-0.05400299280881882,
0.22580383718013763,
0.17625132203102112,
0.06358519196510315,
0.2493828535079956,
0.11672373116016388,
-0.2586720883846283,
-0.38005030155181885,
0.4792170822620392,
-0.11010760813951492,
0.3243952691555023,
-0.03250477463006973,
-0.16888277232646942,
0.1031608134508133,
0.03267287462949753,
-0.030764255672693253,
-0.07743936777114868,
-0.042547568678855896,
-0.3097827434539795,
-0.17389482259750366,
0.2934132516384125,
-0.37724003195762634,
-0.21310611069202423,
0.11367850750684738,
-0.00346427783370018,
-0.01998285949230194,
-0.06658430397510529,
-0.19424524903297424,
-0.25851768255233765,
0.0021215882152318954,
0.05881306901574135,
0.23458658158779144,
0.14418143033981323,
0.008119940757751465,
-0.1731138825416565,
-0.22788161039352417,
-0.2604958713054657,
0.44685280323028564,
0.1732170432806015,
-0.011335385031998158,
-0.004514537751674652,
-0.034291788935661316,
0.04168706759810448,
0.03806376829743385,
0.7559905648231506,
-0.04472917318344116,
-0.3430980443954468,
-0.06646458059549332,
-0.4564377963542938,
-0.16444064676761627,
0.35819461941719055,
-0.35996076464653015,
-0.2756834626197815,
-0.20087499916553497,
0.28775754570961,
-0.2958093583583832,
-0.028793558478355408,
0.21816162765026093,
0.004725877661257982,
0.05243844911456108,
-0.038036737591028214,
0.03192652389407158,
-0.27555331587791443,
-0.07330172508955002,
0.16038042306900024,
0.34823358058929443,
0.20529168844223022,
0.07373784482479095,
-0.00011006370186805725,
-0.5286022424697876,
0.08011532574892044,
0.2679569721221924,
0.3028532564640045,
0.07437530159950256,
0.00987984612584114,
-0.018659275025129318,
-0.1019488126039505,
0.12092188000679016,
0.5745506882667542,
0.22456495463848114,
-0.2425786256790161,
-0.4952452778816223,
0.08386890590190887,
0.3647697865962982,
0.13906508684158325,
0.07550007104873657,
-0.1652238517999649,
-0.0027842968702316284,
0.07151345908641815,
-0.1303279548883438,
0.0472288504242897,
0.5446641445159912,
0.4082876741886139,
0.25820690393447876,
-0.015546614304184914,
-0.4396423101425171,
0.3730974793434143,
0.281857967376709,
-0.15508979558944702,
0.16257303953170776,
0.14895646274089813,
-0.34975430369377136,
0.2644945979118347,
0.49604544043540955,
0.6581728458404541,
-0.2739146947860718,
0.11036548018455505,
0.3202579915523529,
0.19682620465755463,
0.8101608157157898,
0.34878140687942505,
0.003461983986198902,
-0.07386630773544312,
-0.2247350662946701,
-0.09044709801673889,
-0.006776697933673859,
0.013356059789657593,
0.1693507730960846,
-0.1629275679588318,
-0.1628704071044922,
0.08334550261497498,
-0.1163182258605957,
0.1490013599395752,
0.11661256849765778,
-0.3823564648628235,
-0.14035718142986298,
-0.6304248571395874,
0.18097375333309174,
0.08909204602241516,
-0.11188384890556335,
-0.11415476351976395,
-0.09384013712406158,
-0.02803828753530979,
-0.00015423819422721863,
-0.21752344071865082,
0.08515631407499313,
-0.2757861614227295,
0.09873580932617188,
0.181621253490448,
-0.08624311536550522,
-0.09733663499355316,
0.4315986931324005,
0.27005335688591003,
-0.11019758880138397,
-0.13980232179164886,
0.33457157015800476,
0.09404082596302032,
-0.09161244332790375,
0.028311999514698982,
-0.2592991590499878,
0.5981630682945251,
0.1002436950802803,
-0.004979841411113739,
-0.148151695728302,
0.19226373732089996,
-0.22843368351459503,
0.05120334029197693,
0.15162405371665955,
0.2957676649093628,
0.17285865545272827,
-0.19433018565177917,
-0.1844685971736908,
0.005121156573295593,
-0.03567741811275482,
0.15645718574523926,
0.4097762703895569,
-0.005000000819563866,
0.23683568835258484,
0.15400072932243347,
-0.18600144982337952,
-0.04190714284777641,
0.03496478870511055,
0.06403690576553345,
0.13583223521709442,
0.11410469561815262,
0.05139470472931862,
-0.02470003068447113,
-0.2044123411178589,
0.2107694447040558,
0.25275102257728577,
-0.310749351978302,
0.3155826926231384,
0.2106744349002838,
-0.4729170799255371,
-0.34359487891197205,
0.33365824818611145,
0.19191864132881165,
-0.23316657543182373,
-0.0828099399805069,
-0.2917711138725281,
-0.33542391657829285,
0.5911595821380615,
-0.3452830910682678,
0.3964637815952301,
0.21537327766418457,
0.3666887879371643,
-0.1470353752374649,
-0.22784286737442017,
-0.3356550931930542,
0.15451769530773163,
-0.28705427050590515,
0.18744438886642456,
0.06874455511569977,
0.09663063287734985,
0.3484480679035187,
-0.08368687331676483,
0.17141851782798767,
0.0959780141711235,
-0.11917798221111298,
-0.1625853180885315,
-0.22663845121860504,
0.08560013025999069,
0.06580562889575958,
-0.06670387089252472,
0.30214723944664,
-0.012165253050625324,
-0.29264774918556213,
-0.06403130292892456,
-0.000009367242455482483,
0.13616377115249634,
-0.20574207603931427,
0.10117681324481964,
0.17251934111118317,
-0.140426903963089,
-0.09519994258880615,
0.17979547381401062,
-0.0769968032836914,
0.021276213228702545,
0.11718690395355225,
0.21695120632648468,
-0.24524293839931488,
-0.054835934191942215,
0.2576756179332733,
0.22923734784126282,
0.04547949880361557,
-0.015496551990509033,
0.23396891355514526,
0.37882786989212036,
-0.21074022352695465,
-0.03466940298676491,
0.403166264295578,
-0.11834168434143066,
0.20855757594108582,
0.12743903696537018,
0.19986644387245178,
0.22553372383117676,
-0.36463290452957153,
0.3618023693561554,
0.012628844939172268,
-0.03462761640548706,
0.36377981305122375,
0.4112118184566498,
-0.034669116139411926,
0.5060043931007385,
-0.01156490296125412,
-0.22578921914100647,
0.2925196588039398,
0.07930071651935577,
0.2751051187515259,
0.3884231746196747,
-0.27427709102630615,
0.2404002994298935,
0.28615620732307434,
0.40345272421836853,
0.25555747747421265,
0.0878986045718193,
-0.1163213774561882,
0.03346381336450577,
-0.3688526451587677,
0.0274672769010067,
0.7011367082595825,
-0.24628369510173798,
0.3234982490539551,
0.16198508441448212,
0.03542832285165787,
0.301223486661911,
0.05918549373745918,
0.5569712519645691,
-0.3877829909324646,
-0.11771750450134277,
-0.14619140326976776,
0.2502555847167969,
-0.016759522259235382,
-0.0826522558927536,
-0.40166813135147095,
-0.09816647320985794,
-0.2288874238729477,
-0.16426807641983032,
0.11260412633419037,
-0.32083314657211304,
0.18624670803546906,
-0.005496680736541748,
0.08162213116884232,
-0.2146802693605423,
-0.13006502389907837,
0.13729417324066162,
0.20728111267089844,
-0.046561092138290405,
0.18014173209667206,
-0.07155495882034302,
-0.08817300200462341,
0.40114617347717285,
0.7001858353614807,
0.1183704137802124,
0.09408700466156006,
0.23953354358673096,
-0.19645695388317108,
-0.09573313593864441,
-0.16679854691028595,
-0.3184840679168701,
-0.23913615942001343,
0.1798776090145111,
0.13447287678718567,
0.30970174074172974,
0.2120123654603958,
-0.13064049184322357,
-0.15635523200035095,
-0.07040718197822571,
0.20077098906040192,
-0.36473238468170166,
0.2968926429748535,
-0.23164770007133484,
0.06015954166650772,
-0.18864470720291138,
0.04427139833569527,
-0.1849336177110672,
0.003478716127574444,
-0.13089625537395477,
-0.49907201528549194,
0.08894721418619156,
0.15184557437896729,
0.10603362321853638,
-0.08315566182136536,
0.09032750874757767,
0.47786808013916016,
0.3196355700492859,
0.05366392806172371,
0.08635281026363373,
-0.5607409477233887,
0.1642773151397705,
0.17214640974998474,
-0.1665850430727005,
-0.016503693535923958,
0.16732563078403473,
0.03261808305978775,
0.10925142467021942,
0.04617295414209366,
0.0240792203694582,
0.07601091265678406,
0.2796396017074585,
-0.30602678656578064,
-0.2745372951030731,
-0.2372589260339737,
-0.03283195197582245,
0.019624147564172745,
-0.19879794120788574,
0.08711811155080795,
-0.046449121087789536,
0.11269167810678482,
-0.09382422268390656,
-0.2992870807647705,
-0.28930073976516724,
0.08278640359640121,
0.32913514971733093,
0.5089902877807617,
0.3533119857311249,
-0.21990984678268433,
0.003499893471598625,
0.21387727558612823,
-0.3985394835472107,
-0.5544436573982239,
0.08046054095029831,
-0.1491582840681076,
0.36863502860069275,
-0.0019315257668495178,
-0.09655727446079254,
0.11368998885154724,
0.29368069767951965,
0.11996352672576904,
-0.22819992899894714,
-0.6186214685440063,
0.3492276966571808,
-0.5830200910568237,
-0.14705704152584076,
-0.03471916541457176,
0.30465203523635864,
-0.10488788783550262,
-0.25243592262268066,
-0.0884813740849495,
-0.3108406960964203,
0.3684280514717102,
-0.5662702322006226,
-0.3001724183559418,
-0.17451180517673492,
-0.2070615589618683,
-0.13140922784805298,
-0.12694144248962402,
-0.1321399062871933,
-0.15817533433437347,
0.23197518289089203,
-0.013837624341249466,
-0.09587784111499786,
-0.04210774227976799,
0.10052081942558289,
0.07445092499256134,
-0.2933686375617981,
0.1884223222732544,
-0.013234224170446396,
-0.15429216623306274,
0.07007583975791931,
-0.20903700590133667
] |
https://github.com/huggingface/datasets/issues/6288
|
Dataset.from_pandas with a DataFrame of PIL.Images
|
+1 to this
Calling this line with a df that contains a PIL image (as they are returned from load_dataset)
`ds = Dataset.from_pandas(df)`
Results in this error:
`ArrowInvalid: ('Could not convert <PIL.PngImagePlugin.PngImageFile image mode=RGB size=1024x1024 at 0x2B41F2D70> with type PngImageFile: did not recognize Python value type when inferring an Arrow data type', 'Conversion failed for column image with type object')`
|
Currently type inference doesn't know what to do with a Pandas Series of PIL.Image objects, though it would be nice to get a Dataset with the Image type this way
| 60
|
Dataset.from_pandas with a DataFrame of PIL.Images
Currently type inference doesn't know what to do with a Pandas Series of PIL.Image objects, though it would be nice to get a Dataset with the Image type this way
+1 to this
Calling this line with a df that contains a PIL image (as they are returned from load_dataset)
`ds = Dataset.from_pandas(df)`
Results in this error:
`ArrowInvalid: ('Could not convert <PIL.PngImagePlugin.PngImageFile image mode=RGB size=1024x1024 at 0x2B41F2D70> with type PngImageFile: did not recognize Python value type when inferring an Arrow data type', 'Conversion failed for column image with type object')`
|
[
-0.39113590121269226,
-0.08419013023376465,
0.009003248065710068,
0.47536325454711914,
0.03804018348455429,
0.024845942854881287,
0.40055185556411743,
0.1446915566921234,
0.023611709475517273,
0.012867182493209839,
0.030200783163309097,
0.42527854442596436,
-0.026122398674488068,
0.3030453324317932,
-0.18405385315418243,
-0.4468320906162262,
0.06928049027919769,
-0.021016612648963928,
-0.2978225350379944,
-0.15752047300338745,
-0.4859030246734619,
0.02232840098440647,
-0.08050180971622467,
0.2807939052581787,
-0.3078864514827728,
-0.43264564871788025,
-0.12276876717805862,
-0.06373043358325958,
-0.10600822418928146,
-0.22117701172828674,
0.19003070890903473,
-0.1034577339887619,
0.6373915672302246,
0.08642922341823578,
-0.00011750103294616565,
-0.15354618430137634,
0.4569441080093384,
-0.042275652289390564,
0.23821377754211426,
-0.09435597062110901,
-0.28739872574806213,
-0.1075914204120636,
0.2667638063430786,
-0.30125194787979126,
0.10059278458356857,
-0.5683092474937439,
0.1905507743358612,
0.08915539085865021,
0.14361119270324707,
0.23180913925170898,
0.13828827440738678,
0.005357485264539719,
0.12625493109226227,
0.0831233412027359,
-0.20263448357582092,
0.21623308956623077,
0.20044054090976715,
-0.006651947274804115,
-0.058360353112220764,
-0.05959390848875046,
0.3622923195362091,
0.2542210817337036,
0.06499164551496506,
0.11844368278980255,
0.1632411777973175,
0.13909664750099182,
0.22006043791770935,
-0.3166865110397339,
-0.07844550907611847,
0.17823995649814606,
0.18944337964057922,
0.0875573605298996,
-0.3313896954059601,
-0.2459162473678589,
0.025789763778448105,
0.18154244124889374,
-0.0720854327082634,
-0.09865975379943848,
-0.30055955052375793,
0.045132268220186234,
0.20674659311771393,
-0.06864280998706818,
-0.3258220851421356,
0.1806173026561737,
-0.3755260407924652,
-0.1677546203136444,
0.002629477996379137,
0.26329341530799866,
0.02351544424891472,
-0.09519100189208984,
0.1596425473690033,
-0.047475047409534454,
0.24474367499351501,
0.10473322868347168,
-0.010992731899023056,
0.07642947137355804,
0.02820313349366188,
0.0953897014260292,
-0.2357155680656433,
-0.24616648256778717,
-0.11292257905006409,
-0.017577409744262695,
-0.2989327907562256,
0.3594491481781006,
0.6036710739135742,
-0.15552224218845367,
-0.30805590748786926,
0.3856247663497925,
0.013953685760498047,
0.0009535739081911743,
-0.06733429431915283,
-0.20772799849510193,
-0.36160650849342346,
-0.3174501955509186,
0.19595250487327576,
-0.2298276424407959,
0.31230998039245605,
-0.159540593624115,
-0.16027577221393585,
-0.16793274879455566,
-0.23128750920295715,
0.22516272962093353,
0.028640203177928925,
0.2686816155910492,
0.012379545718431473,
0.8412675261497498,
0.512261688709259,
0.35409754514694214,
0.07517512887716293,
0.09952744841575623,
0.005238148849457502,
0.05218232423067093,
-0.10838152468204498,
-0.23660729825496674,
-0.2522636353969574,
0.2907904088497162,
-0.1793488711118698,
-0.15074685215950012,
-0.046365246176719666,
0.1939065307378769,
0.16814063489437103,
-0.24037306010723114,
0.3332171142101288,
-0.03547563776373863,
-0.2480042427778244,
-0.15855459868907928,
0.20168499648571014,
-0.005612630397081375,
-0.2533961832523346,
0.2659000754356384,
-0.2390027642250061,
0.040574509650468826,
-0.43133649230003357,
0.1311403512954712,
-0.1675977110862732,
-0.23995253443717957,
-0.7702770233154297,
0.26452651619911194,
-0.03756085783243179,
0.004404120147228241,
0.07971459627151489,
-0.4574049115180969,
0.27103930711746216,
-0.054707031697034836,
-0.04998987168073654,
-0.0551925003528595,
-0.5464039444923401,
-0.017989762127399445,
-0.31053537130355835,
-0.2612093985080719,
0.2386752963066101,
0.16355891525745392,
-0.03771676868200302,
-0.07582079619169235,
-0.04035479947924614,
0.1426912099123001,
0.15754187107086182,
-0.16028842329978943,
0.14409174025058746,
0.11439760774374008,
0.3055591583251953,
-0.03518954664468765,
-0.013793997466564178,
0.29797324538230896,
0.06796131283044815,
0.09003207087516785,
-0.20400553941726685,
0.5405368208885193,
-0.24718865752220154,
0.1071314737200737,
-0.015095431357622147,
-0.16353397071361542,
-0.09833259880542755,
0.13786444067955017,
0.29426008462905884,
0.2675357460975647,
0.15792717039585114,
-0.041958559304475784,
0.034029554575681686,
-0.060516003519296646,
-0.04006562381982803,
-0.28999924659729004,
0.44620805978775024,
-0.043381355702877045,
0.1440114825963974,
-0.23789441585540771,
-0.0073889270424842834,
-0.04299505800008774,
-0.1032051295042038,
0.04515039175748825,
-0.5145827531814575,
-0.23951749503612518,
-0.06630261242389679,
0.2597027122974396,
0.08639711141586304,
0.1912156343460083,
0.12218302488327026,
0.030707284808158875,
-0.232392817735672,
-0.16520054638385773,
-0.1944371908903122,
0.09544449299573898,
-0.15542450547218323,
-0.0013596178032457829,
-0.04204290360212326,
0.13605381548404694,
0.010687747970223427,
0.031377267092466354,
-0.1742057353258133,
-0.09120403975248337,
-0.16177991032600403,
0.08172985911369324,
-0.01585179753601551,
0.2075795829296112,
0.21633659303188324,
0.3973262906074524,
0.06527063995599747,
-0.07625235617160797,
-0.06412641704082489,
-0.5744414925575256,
-0.1483299881219864,
-0.07761086523532867,
0.2375800460577011,
0.20989388227462769,
0.05112701281905174,
0.37300604581832886,
-0.15959258377552032,
0.24115437269210815,
-0.09541012346744537,
0.2662859261035919,
0.08825717121362686,
0.17941637337207794,
-0.0773489847779274,
-0.09529346972703934,
-0.4136738181114197,
0.34101274609565735,
-0.1647709459066391,
0.07388709485530853,
-0.5030012130737305,
-0.18106484413146973,
0.04030345380306244,
-0.0946589857339859,
0.13834090530872345,
0.0025354623794555664,
0.01856987178325653,
0.21819517016410828,
0.6130250692367554,
0.33381253480911255,
0.15978315472602844,
0.17852596938610077,
0.10417899489402771,
-0.09999997168779373,
-0.3403516411781311,
0.11185161769390106,
0.20127585530281067,
0.17585857212543488,
0.12080167979001999,
-0.2689872086048126,
0.051071520894765854,
0.12981419265270233,
-0.32732075452804565,
-0.11623650789260864,
-0.09072226285934448,
0.16864658892154694,
-0.2417733371257782,
0.21689783036708832,
-0.22839891910552979,
-0.4083265960216522,
-0.025647636502981186,
0.15923279523849487,
0.06202313303947449,
-0.18765901029109955,
-0.15326842665672302,
0.06460481882095337,
-0.03483390435576439,
-0.02786683477461338,
-0.44296014308929443,
0.24042704701423645,
0.1964086890220642,
-0.3576911985874176,
-0.3532307744026184,
-0.11436981707811356,
-0.08912105113267899,
0.12579868733882904,
0.25538134574890137,
0.13809865713119507,
0.2978561520576477,
-0.03227315843105316,
0.03874475136399269,
-0.16293197870254517,
-0.289506733417511,
-0.0009283609688282013,
0.014012830331921577,
0.20222823321819305,
0.3542096018791199,
0.21988382935523987,
-0.0077607110142707825,
-0.1645340472459793,
0.05147961899638176,
-0.08998984843492508,
-0.18502749502658844,
-0.13834646344184875,
-0.32116183638572693,
0.16280968487262726,
0.0595891959965229,
-0.01004289835691452,
-0.1895010620355606,
-0.23664458096027374,
0.20519383251667023,
0.38802942633628845,
-0.0627356767654419,
0.04797643423080444,
0.4984443783760071,
0.21490001678466797,
0.30646321177482605,
-0.04740914702415466,
-0.08976779878139496,
0.18281425535678864,
0.15821172297000885,
0.18500301241874695,
-0.19734351336956024,
-0.06761014461517334,
-0.43740785121917725,
0.22438476979732513,
0.2778782844543457,
-0.13506680727005005,
-0.6551008820533752,
-0.12846854329109192,
0.3377894461154938,
0.11640379577875137,
0.0376720167696476,
-0.003977827727794647,
0.2451883852481842,
-0.06494076550006866,
-0.08863580971956253,
0.26068320870399475,
0.14777515828609467,
-0.18358349800109863,
0.27346840500831604,
0.16181275248527527,
0.2633962035179138,
0.16286298632621765,
0.06547868996858597,
-0.313908189535141,
-0.515110433101654,
0.5116157531738281,
-0.18121269345283508,
0.3244655728340149,
0.051106251776218414,
0.01150442473590374,
-0.17367905378341675,
-0.07941058278083801,
-0.14757971465587616,
-0.3625270128250122,
-0.16341891884803772,
-0.4297346770763397,
-0.1363859474658966,
0.4061105251312256,
-0.49156516790390015,
-0.12367771565914154,
0.12861649692058563,
-0.2777228355407715,
-0.057973869144916534,
-0.14233604073524475,
-0.16632048785686493,
-0.35128822922706604,
0.020980732515454292,
0.004788165912032127,
0.07129324227571487,
0.29649388790130615,
-0.03583092987537384,
-0.08750662207603455,
-0.33169299364089966,
-0.09575635939836502,
0.5383746027946472,
0.08066077530384064,
0.16297917068004608,
0.09534980356693268,
-0.05113048851490021,
0.13551115989685059,
-0.08085113763809204,
0.6459012627601624,
-0.12331845611333847,
-0.3456727862358093,
-0.02347848378121853,
-0.25401678681373596,
-0.3617115616798401,
0.2884587347507477,
-0.32705923914909363,
-0.2602980136871338,
-0.42698726058006287,
0.3251616358757019,
-0.28817424178123474,
-0.01734074391424656,
0.24005970358848572,
-0.0350661464035511,
-0.012269489467144012,
0.024692397564649582,
0.06991702318191528,
-0.16881497204303741,
-0.19125601649284363,
0.027698300778865814,
0.4175002872943878,
0.17582744359970093,
-0.02696002461016178,
-0.055949822068214417,
-0.6725050806999207,
0.12821754813194275,
0.20417042076587677,
0.3388323485851288,
0.22247356176376343,
-0.06312879920005798,
-0.19091182947158813,
0.02451404742896557,
0.2618597745895386,
0.5738645195960999,
0.18527457118034363,
-0.10132917761802673,
-0.46744006872177124,
0.0072420500218868256,
0.42265841364860535,
0.15295325219631195,
0.050179801881313324,
-0.2456343024969101,
-0.1376194953918457,
0.03701014071702957,
-0.20529751479625702,
0.1243116557598114,
0.4288051426410675,
0.5045437812805176,
0.1930575668811798,
0.04686935618519783,
-0.3373718559741974,
0.6339285373687744,
0.2547770142555237,
-0.12914030253887177,
0.2570476531982422,
0.19070419669151306,
-0.29573407769203186,
0.45140451192855835,
0.4500490427017212,
0.6686402559280396,
-0.17409606277942657,
0.09976603090763092,
0.37966588139533997,
0.091038778424263,
0.5948116779327393,
0.4596240520477295,
-0.20997507870197296,
-0.082806795835495,
0.06911464780569077,
-0.1574781984090805,
0.008400004357099533,
0.02010003849864006,
0.3821980357170105,
-0.14337612688541412,
-0.23150494694709778,
-0.20885732769966125,
-0.38095706701278687,
0.2381807118654251,
0.07901006937026978,
-0.37253525853157043,
-0.04315172880887985,
-0.5383030772209167,
0.13809801638126373,
0.15097492933273315,
-0.1775209754705429,
-0.17128336429595947,
-0.12439802289009094,
-0.13664500415325165,
0.026140689849853516,
-0.10795135051012039,
0.09224347770214081,
-0.22818663716316223,
0.14881755411624908,
0.09637129306793213,
-0.10138760507106781,
-0.151093527674675,
0.49243098497390747,
0.07410193979740143,
-0.47283199429512024,
-0.137546569108963,
0.21054016053676605,
0.08543941378593445,
-0.12792940437793732,
0.05509408190846443,
-0.22311940789222717,
0.6388223767280579,
0.10766681283712387,
-0.11601632088422775,
0.0627657100558281,
0.1146741434931755,
-0.35612785816192627,
0.23055922985076904,
0.14960819482803345,
0.17573276162147522,
0.1910731941461563,
-0.4621497690677643,
-0.2958187460899353,
-0.21547284722328186,
0.10430540144443512,
0.09531465172767639,
0.17681995034217834,
0.052278783172369,
0.262949138879776,
0.23837804794311523,
-0.22001780569553375,
0.12119978666305542,
0.0292108952999115,
-0.08535300940275192,
0.15588201582431793,
0.274321973323822,
0.00980180874466896,
-0.02381099760532379,
-0.06696362048387527,
0.18836796283721924,
0.3776277005672455,
-0.39990365505218506,
0.21240173280239105,
0.25521937012672424,
-0.35475170612335205,
-0.2747567296028137,
0.21706543862819672,
0.21181438863277435,
-0.034384600818157196,
-0.2819332778453827,
-0.2585635483264923,
-0.2634275257587433,
0.5602298378944397,
-0.29903143644332886,
0.4136672019958496,
-0.0626772865653038,
0.20441552996635437,
-0.2140047401189804,
-0.35581934452056885,
-0.20118878781795502,
0.19354192912578583,
-0.15688933432102203,
0.24494756758213043,
0.06702485680580139,
0.20319771766662598,
0.23362448811531067,
-0.10830058157444,
0.08144905418157578,
0.15108859539031982,
0.11059361696243286,
-0.06446981430053711,
-0.08987896144390106,
0.15823125839233398,
0.21058154106140137,
-0.15350589156150818,
0.18498197197914124,
-0.12892818450927734,
-0.29655924439430237,
0.07080385833978653,
-0.15610364079475403,
0.20245063304901123,
-0.25782203674316406,
0.18099446594715118,
0.12504704296588898,
-0.03426826000213623,
-0.11735989898443222,
0.19071237742900848,
-0.026704810559749603,
0.19609996676445007,
-0.09085550159215927,
0.3193599283695221,
-0.13942496478557587,
-0.01722695678472519,
-0.026356689631938934,
0.2122255265712738,
-0.09163987636566162,
0.03938450291752815,
0.33011576533317566,
0.21257643401622772,
-0.08269305527210236,
-0.06538569182157516,
0.4043152630329132,
0.1284659057855606,
0.1867682784795761,
0.060722529888153076,
0.056369997560977936,
0.15545868873596191,
-0.31708112359046936,
0.41764166951179504,
-0.24043715000152588,
-0.19730713963508606,
0.16804665327072144,
0.3532341420650482,
-0.23618866503238678,
0.47871261835098267,
-0.11889977753162384,
-0.1439608484506607,
0.11598360538482666,
-0.10360455513000488,
0.18711455166339874,
0.5790964961051941,
-0.22760117053985596,
0.19186672568321228,
0.3912873864173889,
0.43170028924942017,
0.2668823003768921,
0.1456277072429657,
-0.2162235975265503,
0.01913268305361271,
-0.10781314224004745,
0.009291663765907288,
0.43967774510383606,
-0.23797553777694702,
0.23400622606277466,
0.16935519874095917,
0.08902610838413239,
0.22923392057418823,
0.1315631866455078,
0.40505513548851013,
-0.19688472151756287,
-0.15470944344997406,
-0.06453408300876617,
0.03526415675878525,
0.014608683064579964,
-0.12363533675670624,
-0.5980903506278992,
-0.08244334161281586,
-0.3349120020866394,
-0.2818748354911804,
-0.033175017684698105,
-0.3016486167907715,
0.1534557193517685,
0.1510569453239441,
0.06970229744911194,
-0.24159033596515656,
-0.08473073691129684,
-0.018523260951042175,
0.25258833169937134,
-0.10169953107833862,
0.058752723038196564,
-0.12712417542934418,
-0.00406821072101593,
0.4460202753543854,
0.5104315280914307,
0.26330864429473877,
0.33611270785331726,
0.09500543773174286,
-0.12320689111948013,
0.027008190751075745,
-0.18384039402008057,
-0.1322731226682663,
-0.24738478660583496,
0.22617556154727936,
0.14804907143115997,
0.20945550501346588,
0.17103831470012665,
-0.06931815296411514,
-0.09694167971611023,
-0.14531169831752777,
0.2615007162094116,
-0.41170772910118103,
0.40585076808929443,
-0.3145855665206909,
-0.006146781146526337,
-0.2778915762901306,
-0.01521521806716919,
-0.1411454975605011,
-0.17949806153774261,
-0.008811896666884422,
-0.4421006441116333,
0.10382464528083801,
0.20077168941497803,
0.05667810142040253,
-0.22705720365047455,
0.11560980975627899,
0.5379385948181152,
0.45130017399787903,
0.10534175485372543,
0.3116469979286194,
-0.6991228461265564,
0.08381634950637817,
0.2014361023902893,
-0.18346939980983734,
0.2444431334733963,
0.25531524419784546,
0.04600447788834572,
0.20040632784366608,
0.2524268925189972,
0.18162189424037933,
0.03199336305260658,
0.46951356530189514,
-0.10723099112510681,
-0.26794755458831787,
-0.1431715190410614,
0.0417824387550354,
-0.029172122478485107,
-0.41804179549217224,
0.11990220844745636,
-0.03867700323462486,
0.06114264577627182,
0.06668487191200256,
-0.3588615357875824,
-0.1718112826347351,
0.17866553366184235,
0.35897010564804077,
0.4033244550228119,
0.5174251198768616,
-0.06584952771663666,
0.0862538143992424,
0.1641952246427536,
-0.41794341802597046,
-0.5524773001670837,
0.200016051530838,
-0.2603655755519867,
0.35778748989105225,
0.0593402162194252,
-0.020089682191610336,
-0.013225802220404148,
0.052010420709848404,
-0.03168904781341553,
-0.3353428244590759,
-0.6403256058692932,
0.2843809127807617,
-0.5175276398658752,
-0.19972796738147736,
-0.03545265644788742,
0.11280542612075806,
0.001630045473575592,
-0.02259647659957409,
-0.2121719866991043,
-0.3329733908176422,
0.278405100107193,
-0.5062393546104431,
-0.335887610912323,
0.03408287093043327,
-0.21081915497779846,
0.01035868376493454,
-0.0884232223033905,
-0.11983984708786011,
-0.10609401017427444,
0.30214741826057434,
-0.09492835402488708,
0.025533583015203476,
-0.26609548926353455,
0.17899715900421143,
0.2108435481786728,
-0.332767516374588,
0.27881062030792236,
-0.03190874308347702,
0.09007323533296585,
-0.14194530248641968,
-0.20448064804077148
] |
https://github.com/huggingface/datasets/issues/6287
|
map() not recognizing "text"
|
There is no "text" column in the `amazon_reviews_multi`, hence the `KeyError`. You can get the column names by running `dataset.column_names`.
|
### Describe the bug
The [map() documentation](https://huggingface.co/docs/datasets/v2.14.5/en/package_reference/main_classes#datasets.Dataset.map) reads:
`
ds = ds.map(lambda x: tokenizer(x['text'], truncation=True, padding=True), batched=True)`
I have been trying to reproduce it in my code as:
`tokenizedDataset = dataset.map(lambda x: tokenizer(x['text']), batched=True)`
But it doesn't work as it throws the error:
> KeyError: 'text'
Can you please guide me on how to fix it?
### Steps to reproduce the bug
1. `from datasets import load_dataset
dataset = load_dataset("amazon_reviews_multi")`
2. Then this code: `from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")`
3. The line I quoted above (which I have been trying)
### Expected behavior
As mentioned in the documentation, it should run without any error and map the tokenization on the whole dataset.
### Environment info
Python 3.10.2
| 20
|
map() not recognizing "text"
### Describe the bug
The [map() documentation](https://huggingface.co/docs/datasets/v2.14.5/en/package_reference/main_classes#datasets.Dataset.map) reads:
`
ds = ds.map(lambda x: tokenizer(x['text'], truncation=True, padding=True), batched=True)`
I have been trying to reproduce it in my code as:
`tokenizedDataset = dataset.map(lambda x: tokenizer(x['text']), batched=True)`
But it doesn't work as it throws the error:
> KeyError: 'text'
Can you please guide me on how to fix it?
### Steps to reproduce the bug
1. `from datasets import load_dataset
dataset = load_dataset("amazon_reviews_multi")`
2. Then this code: `from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")`
3. The line I quoted above (which I have been trying)
### Expected behavior
As mentioned in the documentation, it should run without any error and map the tokenization on the whole dataset.
### Environment info
Python 3.10.2
There is no "text" column in the `amazon_reviews_multi`, hence the `KeyError`. You can get the column names by running `dataset.column_names`.
|
[
-0.03713569417595863,
-0.4495868980884552,
0.08712789416313171,
0.33627527952194214,
0.29069268703460693,
0.08487576991319656,
0.42338332533836365,
-0.010057713836431503,
-0.004521019756793976,
-0.03180064260959625,
-0.08329253643751144,
0.4743609130382538,
-0.07211458683013916,
0.1352459192276001,
0.014116756618022919,
0.01703627035021782,
0.24341443181037903,
0.12151683121919632,
0.16579297184944153,
0.05039164423942566,
-0.2870376706123352,
0.23959653079509735,
-0.41576874256134033,
0.37179917097091675,
-0.23562680184841156,
-0.13432058691978455,
-0.1311781108379364,
-0.3516356945037842,
-0.04025506228208542,
-0.42019230127334595,
0.014270385727286339,
0.05634039640426636,
0.2779387831687927,
0.5112387537956238,
-0.00013030121044721454,
-0.18267598748207092,
0.1977464258670807,
-0.014550607651472092,
0.02433866634964943,
-0.40775245428085327,
0.11290966719388962,
0.020291635766625404,
0.2362229824066162,
-0.2314130961894989,
0.03512578457593918,
-0.06930102407932281,
0.018210934475064278,
-0.15191316604614258,
0.3665221333503723,
0.06768098473548889,
0.08994811773300171,
0.26120486855506897,
0.3363809287548065,
0.21500645577907562,
0.0582038052380085,
0.2611314654350281,
-0.11031150072813034,
-0.004047922790050507,
0.3953897953033447,
-0.2693938910961151,
-0.14157113432884216,
0.3817102611064911,
-0.09455756843090057,
0.016807761043310165,
0.31293532252311707,
0.30030107498168945,
-0.07745545357465744,
-0.47563275694847107,
-0.03320132941007614,
0.02930658496916294,
0.5459918975830078,
-0.3913838267326355,
-0.3025131821632385,
-0.26348719000816345,
-0.2083008587360382,
-0.0273508932441473,
0.13632261753082275,
-0.32754963636398315,
-0.09678569436073303,
-0.07795056700706482,
-0.46237513422966003,
-0.18807624280452728,
0.05627015233039856,
0.3605167269706726,
-0.1703932136297226,
0.5313960313796997,
-0.18091632425785065,
0.27571386098861694,
0.09133090078830719,
-0.34440934658050537,
-0.2669917345046997,
0.004922078922390938,
0.215699702501297,
0.480674147605896,
-0.22428788244724274,
-0.41890716552734375,
-0.15870991349220276,
-0.1297684609889984,
0.13596278429031372,
-0.07939232885837555,
-0.36397138237953186,
0.28595876693725586,
-0.21162566542625427,
0.14145156741142273,
0.28660792112350464,
0.37594056129455566,
0.3884834051132202,
0.5486540198326111,
0.19689121842384338,
0.13575448095798492,
-0.16536574065685272,
-0.15385186672210693,
-0.10626966506242752,
0.021670378744602203,
0.23419900238513947,
-0.037746842950582504,
0.09125803411006927,
0.024260859936475754,
0.0554080531001091,
0.039103660732507706,
-0.4456447660923004,
0.04834657534956932,
0.05608434975147247,
0.3796400725841522,
0.21588127315044403,
-0.0663391724228859,
0.07420414686203003,
0.2583223581314087,
0.018074950203299522,
-0.10673368722200394,
-0.02303701639175415,
-0.14713363349437714,
-0.19682078063488007,
0.20394323766231537,
-0.07711580395698547,
0.009115207940340042,
0.2717686891555786,
-0.1039988324046135,
0.0592987984418869,
-0.17232844233512878,
-0.27572691440582275,
-0.17508551478385925,
-0.01750081032514572,
-0.05451281741261482,
-0.1499873399734497,
0.5281569361686707,
0.30349093675613403,
-0.22986482083797455,
-0.04018109664320946,
0.24332937598228455,
-0.32437148690223694,
0.0010989010334014893,
-0.05919112265110016,
-0.03063085302710533,
-0.06165403500199318,
-0.21354350447654724,
-0.45776286721229553,
0.22193683683872223,
0.4998723864555359,
-0.17925111949443817,
0.03819099813699722,
0.02416462078690529,
-0.12772195041179657,
-0.050592485815286636,
0.18752600252628326,
0.38526904582977295,
-0.1539144217967987,
-0.2106366902589798,
-0.28492259979248047,
0.1594293862581253,
0.2013339102268219,
0.2704232633113861,
-0.017864549532532692,
0.47916123270988464,
-0.11121352016925812,
0.5635281205177307,
0.1418982744216919,
-0.23578377068042755,
-0.32706692814826965,
0.17997495830059052,
-0.15893252193927765,
0.014865374192595482,
-0.34773191809654236,
-0.24595588445663452,
0.1900845170021057,
0.10777471214532852,
0.28975576162338257,
-0.1167273074388504,
0.08663026243448257,
0.21272283792495728,
-0.10078608244657516,
-0.08357969671487808,
0.376318097114563,
0.036203425377607346,
0.20888713002204895,
0.17360085248947144,
-0.12206148356199265,
0.12846779823303223,
0.11753244698047638,
0.14365015923976898,
0.2661376893520355,
0.16105589270591736,
0.32194623351097107,
0.28122031688690186,
0.0996026024222374,
-0.2548278570175171,
-0.07942991703748703,
-0.05870774760842323,
0.1744205504655838,
0.1576044261455536,
-0.5634720325469971,
-0.15623167157173157,
-0.28786134719848633,
0.07077997177839279,
-0.09777694940567017,
-0.11398771405220032,
-0.037765588611364365,
0.0746234580874443,
-0.1899268925189972,
0.15318532288074493,
-0.21689577400684357,
-0.20645521581172943,
0.06278388202190399,
0.4308304488658905,
-0.1525215357542038,
-0.11196114122867584,
-0.15357330441474915,
-0.11579658836126328,
-0.24709376692771912,
0.1511886715888977,
0.3081691563129425,
-0.07127491384744644,
-0.10080602765083313,
0.4121910631656647,
-0.12463268637657166,
0.11448229104280472,
-0.36799541115760803,
0.11285635083913803,
0.3122338354587555,
-0.08540135622024536,
-0.1496456116437912,
0.25678348541259766,
0.28295087814331055,
-0.14242997765541077,
0.07789136469364166,
0.1320045292377472,
0.1871146857738495,
0.24394220113754272,
-0.277008056640625,
0.35542601346969604,
0.06437095254659653,
0.11062481999397278,
-0.027039051055908203,
-0.3646669387817383,
-0.13544930517673492,
-0.4090154469013214,
0.19334731996059418,
-0.15239217877388,
0.07417717576026917,
-0.041259147226810455,
0.4307006597518921,
-0.09953039884567261,
0.26233604550361633,
0.18949460983276367,
-0.4801843762397766,
0.14417192339897156,
0.061277829110622406,
-0.03361859917640686,
0.26400184631347656,
0.02085241675376892,
0.03353477641940117,
0.025854988023638725,
0.007776332087814808,
0.11787210404872894,
0.1757442057132721,
0.21836403012275696,
-0.02669536881148815,
-0.10239558666944504,
0.04762957990169525,
0.146446093916893,
-0.1007814109325409,
-0.050809066742658615,
0.19806168973445892,
0.42702385783195496,
-0.5329683423042297,
-0.02117025852203369,
-0.17452280223369598,
-0.2026701271533966,
-0.19073787331581116,
-0.22572869062423706,
-0.10674454271793365,
-0.32562142610549927,
-0.0549115389585495,
0.14533323049545288,
0.0522780679166317,
0.2944316267967224,
0.33757075667381287,
0.08084112405776978,
0.06316336244344711,
-0.13259989023208618,
-0.19632035493850708,
-0.20505750179290771,
-0.26186758279800415,
-0.09860262274742126,
0.07703904062509537,
-0.21876581013202667,
-0.038666002452373505,
-0.10917171090841293,
0.0902755856513977,
-0.25863316655158997,
-0.5632900595664978,
0.12415258586406708,
-0.3979976773262024,
0.157351553440094,
0.07730043679475784,
0.09909076988697052,
-0.42228424549102783,
-0.25815850496292114,
0.2933345437049866,
-0.26720544695854187,
-0.3531816601753235,
0.05639002472162247,
0.16073842346668243,
-0.2494473159313202,
0.052073996514081955,
-0.26384374499320984,
0.054054856300354004,
-0.008294414728879929,
0.36269789934158325,
-0.22303172945976257,
0.03206269443035126,
0.01879991590976715,
-0.22252918779850006,
0.1877700388431549,
-0.27121442556381226,
-0.1105470061302185,
-0.14041076600551605,
-0.052861087024211884,
0.4526509940624237,
-0.10967618972063065,
-0.05742337182164192,
-0.08674784004688263,
0.15562768280506134,
-0.10375107824802399,
-0.0891803428530693,
-0.17044401168823242,
-0.08213821053504944,
-0.2349289506673813,
-0.08696185052394867,
0.12250836193561554,
0.20977471768856049,
0.42270898818969727,
0.17953191697597504,
0.16702863574028015,
0.02799488604068756,
-0.30495989322662354,
0.1569291353225708,
0.09298450499773026,
0.322081595659256,
0.08933969587087631,
0.4082029163837433,
0.05910151079297066,
0.6008362174034119,
0.22533297538757324,
-0.05619574710726738,
0.301361083984375,
-0.22005991637706757,
0.06854019314050674,
-0.1894969642162323,
-0.4640239477157593,
-0.21685147285461426,
-0.27051419019699097,
0.18912288546562195,
0.27017855644226074,
-0.11343807727098465,
-0.13568906486034393,
0.0850367397069931,
-0.14224494993686676,
-0.5891358852386475,
-0.2823353409767151,
-0.013961350545287132,
-0.3676395118236542,
0.10913548618555069,
0.013663135468959808,
0.13875812292099,
-0.13663966953754425,
-0.23902586102485657,
-0.0491502620279789,
0.0877239778637886,
0.17280565202236176,
-0.08534719794988632,
-0.6041382551193237,
-0.1015634760260582,
-0.35730087757110596,
0.3699025511741638,
-0.026844032108783722,
0.5058981776237488,
-0.1498904973268509,
-0.015353059396147728,
0.1546633392572403,
0.1765253096818924,
0.6075455546379089,
-0.22866249084472656,
-0.12904825806617737,
-0.13443121314048767,
-0.1905490607023239,
-0.3313711881637573,
0.11004258692264557,
-0.17670179903507233,
0.3401661813259125,
0.1200689971446991,
0.9002407789230347,
-0.35289254784584045,
0.049308206886053085,
-0.11873012781143188,
0.003107744734734297,
-0.04336926341056824,
-0.036991629749536514,
-0.01484881341457367,
0.020565614104270935,
-0.4326200783252716,
0.0860021710395813,
0.36540278792381287,
0.2763558328151703,
0.3554244041442871,
0.06814111769199371,
0.13558295369148254,
-0.12477536499500275,
0.09701067209243774,
0.10779233276844025,
0.2579974830150604,
-0.09803134202957153,
0.12117382884025574,
0.4803604781627655,
0.0040728859603405,
-0.08699200302362442,
0.22155122458934784,
0.10093411803245544,
-0.6630524396896362,
-0.048983134329319,
-0.12503622472286224,
0.4673382639884949,
0.20089170336723328,
0.055815890431404114,
0.31325510144233704,
-0.02181094139814377,
0.1477241963148117,
-0.262180894613266,
-0.023328633978962898,
0.39646080136299133,
0.31965333223342896,
-0.2979584038257599,
-0.12219703197479248,
0.16042134165763855,
-0.03011690080165863,
-0.18382084369659424,
0.34971481561660767,
0.40073519945144653,
-0.46381986141204834,
0.5766896605491638,
-0.019814930856227875,
1.1103074550628662,
-0.2353675812482834,
0.09045341610908508,
-0.25284940004348755,
0.15868452191352844,
0.4918242394924164,
-0.3600078225135803,
0.08101418614387512,
-0.4778299331665039,
0.10194528847932816,
-0.07652653008699417,
0.11511467397212982,
0.24061062932014465,
0.2652096748352051,
-0.28428852558135986,
0.17457793653011322,
0.09764516353607178,
0.5137391090393066,
0.012233139015734196,
-0.07382700592279434,
0.09887624531984329,
-0.3846406936645508,
0.0939159095287323,
-0.03833027184009552,
0.053937435150146484,
0.4135620594024658,
0.10320418328046799,
0.06949517875909805,
-0.13886898756027222,
-0.5697712898254395,
-0.4696301817893982,
-0.26298531889915466,
-0.23431900143623352,
0.022151947021484375,
0.5093724131584167,
-0.0015520155429840088,
0.436524361371994,
0.5955118536949158,
0.4495849013328552,
0.2719082534313202,
-0.2656644284725189,
-0.070248082280159,
0.00810977816581726,
0.155892014503479,
-0.042885828763246536,
-0.1340111941099167,
0.05981479212641716,
0.11920098215341568,
-0.21314078569412231,
-0.0429021492600441,
0.11756426095962524,
-0.31189584732055664,
-0.36875152587890625,
0.019275188446044922,
0.04728604480624199,
-0.45262840390205383,
-0.015342346392571926,
-0.11416247487068176,
0.16729949414730072,
-0.21853111684322357,
-0.018065594136714935,
-0.08864772319793701,
-0.2458745390176773,
0.20948100090026855,
-0.016782041639089584,
-0.04303852096199989,
0.10225017368793488,
0.5669657588005066,
-0.13417404890060425,
-0.11336018890142441,
0.5373241901397705,
0.036449652165174484,
-0.2375020682811737,
-0.11050159484148026,
0.4292534589767456,
0.4193187355995178,
-0.27958789467811584,
-0.06788980960845947,
-0.27072873711586,
-0.15416936576366425,
0.05750451982021332,
0.5278936624526978,
0.12001486867666245,
-0.021404005587100983,
-0.08946774154901505,
-0.47881993651390076,
-0.44850194454193115,
0.27336037158966064,
-0.0296604223549366,
0.0035942457616329193,
0.11891577392816544,
0.13691796362400055,
0.19335784018039703,
0.22471949458122253,
-0.13981707394123077,
0.1489381045103073,
-0.1487266719341278,
0.2869054675102234,
0.1693071871995926,
-0.0031997039914131165,
0.1304180771112442,
-0.20524942874908447,
-0.030783915892243385,
0.562297523021698,
0.2522885799407959,
-0.022415269166231155,
-0.2068614810705185,
0.20319108664989471,
0.26950061321258545,
-0.09853240102529526,
0.01927388831973076,
-0.04919306933879852,
-0.0437471978366375,
-0.41362810134887695,
0.07517513632774353,
0.2547765076160431,
0.1361461877822876,
0.34927284717559814,
0.12942105531692505,
0.14157342910766602,
-0.2721825838088989,
-0.33961308002471924,
-0.09936663508415222,
0.02182597666978836,
0.19687499105930328,
-0.076408252120018,
0.1483621448278427,
0.09128415584564209,
-0.05613625422120094,
0.19006440043449402,
0.1952337622642517,
0.00034094229340553284,
0.4621080160140991,
-0.20090942084789276,
0.02775656059384346,
0.11903159320354462,
0.2790423333644867,
0.16033092141151428,
-0.2992214560508728,
-0.1488061100244522,
0.617447018623352,
-0.0014408603310585022,
-0.33650022745132446,
-0.15923665463924408,
0.29007986187934875,
-0.191668301820755,
-0.016516268253326416,
0.18830811977386475,
-0.0049753449857234955,
0.12083856761455536,
-0.07611186802387238,
-0.1068391352891922,
0.636771559715271,
-0.11121128499507904,
0.14989382028579712,
0.34300100803375244,
-0.23671448230743408,
0.20920072495937347,
0.4825010895729065,
0.2512057423591614,
-0.02215798944234848,
0.410474956035614,
-0.11612547188997269,
0.17412149906158447,
-0.25959232449531555,
0.23562489449977875,
0.2581481337547302,
-0.2394792139530182,
0.2304282784461975,
0.0735512524843216,
0.14133352041244507,
0.117070272564888,
-0.09035457670688629,
0.4335247874259949,
-0.249631866812706,
0.009472688660025597,
-0.08323510736227036,
0.018401233479380608,
-0.35239270329475403,
-0.2815018892288208,
-0.08944930881261826,
-0.13710513710975647,
-0.12420125305652618,
-0.2427670806646347,
-0.15223798155784607,
-0.39890384674072266,
0.3818686306476593,
-0.2319626361131668,
-0.0718226432800293,
-0.4486721456050873,
-0.3540397882461548,
-0.004294998943805695,
0.3733350932598114,
-0.3112715780735016,
0.23800325393676758,
-0.3776758909225464,
0.0033166855573654175,
-0.011243768036365509,
0.2851540148258209,
0.3439446985721588,
0.22778140008449554,
-0.16611407697200775,
0.33954954147338867,
-0.41653329133987427,
-0.06563796103000641,
0.2044341266155243,
0.4131372570991516,
0.25368577241897583,
0.09783686697483063,
0.13719886541366577,
-0.09802190214395523,
-0.0025038067251443863,
0.019628359004855156,
0.33052223920822144,
0.3917157053947449,
0.16668476164340973,
0.27741891145706177,
-0.3970889449119568,
-0.2024509310722351,
-0.04980459064245224,
-0.11963561922311783,
-0.3071901798248291,
0.11719108372926712,
0.2156965732574463,
-0.04248247668147087,
0.17178118228912354,
-0.22594285011291504,
-0.0070960381999611855,
0.3500831425189972,
0.15673279762268066,
0.4681723117828369,
-0.3263452351093292,
-0.28729909658432007,
-0.12609124183654785,
-0.6474812626838684,
0.14961522817611694,
0.16035662591457367,
0.09684738516807556,
-0.07246848940849304,
-0.14910292625427246,
0.3298399746417999,
0.14418649673461914,
-0.09709946811199188,
-0.1814030259847641,
-0.3774394392967224,
0.3817862570285797,
-0.0005427300930023193,
-0.07873840630054474,
-0.05617796629667282,
0.23347893357276917,
0.050291284918785095,
0.046565644443035126,
0.3309541642665863,
0.1166297048330307,
-0.15177088975906372,
-0.30346477031707764,
0.2169637382030487,
-0.1562943160533905,
-0.35510164499282837,
0.28752362728118896,
0.09631673246622086,
0.3440539538860321,
-0.029571745544672012,
0.25129932165145874,
-0.06799545884132385,
-0.14257992804050446,
-0.24774791300296783,
0.3008624017238617,
0.09005551040172577,
0.38091036677360535,
-0.17662006616592407,
-0.13965971767902374,
-0.39091554284095764,
-0.31067728996276855,
0.05090392380952835,
-0.24216344952583313,
-0.44317227602005005,
0.1070583388209343,
-0.07454703748226166,
-0.22729042172431946,
0.10287250578403473,
0.3164568841457367,
-0.1441793143749237,
0.15999272465705872,
-0.1524312049150467,
-0.3818700611591339,
0.360311895608902,
-0.6803953647613525,
-0.48245352506637573,
0.04437631741166115,
0.03749290108680725,
0.36041513085365295,
-0.263468474149704,
-0.7928870320320129,
-0.1504667103290558,
0.33369097113609314,
0.10193758457899094,
-0.30720677971839905,
0.04923152178525925,
0.0252884142100811,
-0.07292833179235458,
-0.23983117938041687,
0.49827635288238525,
0.041069354861974716,
0.1662895232439041,
0.10966767370700836,
-0.2376105785369873
] |
https://github.com/huggingface/datasets/issues/6285
|
TypeError: expected str, bytes or os.PathLike object, not dict
|
You should be able to load the images by modifying the `load_dataset` call like this:
```python
dataset = load_dataset("imagefolder", data_dir="/content/datasets/PotholeDetectionYOLOv8-1")
```
The `imagefolder` builder expects the image files to be in `path/label/image_file` (e.g. .`.../train/dog/image_1.jpg`), so the solution for the labels in your case is to create metadata files (one for each split; as explained [here](https://huggingface.co/docs/datasets/image_dataset#imagefolder)) that map the images to their labels.
|
### Describe the bug
my dataset is in form : train- image /n -labels
and tried the code:
```
from datasets import load_dataset
data_files = {
"train": "/content/datasets/PotholeDetectionYOLOv8-1/train/",
"validation": "/content/datasets/PotholeDetectionYOLOv8-1/valid/",
"test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
}
dataset = load_dataset("imagefolder", data_dir=data_files)
dataset
```
got error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-29-2ef1926f73d9>](https://localhost:8080/#) in <cell line: 8>()
6 "test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
7 }
----> 8 dataset = load_dataset("imagefolder", data_dir=data_files)
9 dataset
6 frames
[/usr/lib/python3.10/pathlib.py](https://localhost:8080/#) in _parse_args(cls, args)
576 parts += a._parts
577 else:
--> 578 a = os.fspath(a)
579 if isinstance(a, str):
580 # Force-cast str subclasses to str (issue #21127)
TypeError: expected str, bytes or os.PathLike object, not dict
```
### Steps to reproduce the bug
as share above
### Expected behavior
load images and labels , but my dataset only uploads images
- https://huggingface.co/datasets/Andyrasika/potholes-dataset
### Environment info
colab pro
| 62
|
TypeError: expected str, bytes or os.PathLike object, not dict
### Describe the bug
my dataset is in form : train- image /n -labels
and tried the code:
```
from datasets import load_dataset
data_files = {
"train": "/content/datasets/PotholeDetectionYOLOv8-1/train/",
"validation": "/content/datasets/PotholeDetectionYOLOv8-1/valid/",
"test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
}
dataset = load_dataset("imagefolder", data_dir=data_files)
dataset
```
got error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-29-2ef1926f73d9>](https://localhost:8080/#) in <cell line: 8>()
6 "test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
7 }
----> 8 dataset = load_dataset("imagefolder", data_dir=data_files)
9 dataset
6 frames
[/usr/lib/python3.10/pathlib.py](https://localhost:8080/#) in _parse_args(cls, args)
576 parts += a._parts
577 else:
--> 578 a = os.fspath(a)
579 if isinstance(a, str):
580 # Force-cast str subclasses to str (issue #21127)
TypeError: expected str, bytes or os.PathLike object, not dict
```
### Steps to reproduce the bug
as share above
### Expected behavior
load images and labels , but my dataset only uploads images
- https://huggingface.co/datasets/Andyrasika/potholes-dataset
### Environment info
colab pro
You should be able to load the images by modifying the `load_dataset` call like this:
```python
dataset = load_dataset("imagefolder", data_dir="/content/datasets/PotholeDetectionYOLOv8-1")
```
The `imagefolder` builder expects the image files to be in `path/label/image_file` (e.g. .`.../train/dog/image_1.jpg`), so the solution for the labels in your case is to create metadata files (one for each split; as explained [here](https://huggingface.co/docs/datasets/image_dataset#imagefolder)) that map the images to their labels.
|
[
-0.08925792574882507,
-0.10927554965019226,
0.02457590028643608,
0.3565119504928589,
0.6146429181098938,
0.0515189990401268,
0.21652664244174957,
0.3238774836063385,
0.15098141133785248,
0.20537450909614563,
0.06611388176679611,
0.4783129096031189,
-0.4957769811153412,
0.12190315872430801,
-0.13280454277992249,
-0.4285094141960144,
0.0202605202794075,
0.0353810116648674,
-0.43395861983299255,
-0.0471978522837162,
-0.30277928709983826,
0.22335980832576752,
-0.06913004070520401,
0.15214192867279053,
-0.23757535219192505,
-0.10790269821882248,
-0.05413384735584259,
0.24454423785209656,
-0.35255080461502075,
-0.33117949962615967,
0.3368202745914459,
-0.15419231355190277,
0.5073306560516357,
0.4982547461986542,
-0.00011383784294594079,
0.2989267110824585,
0.09997859597206116,
0.05946213752031326,
-0.29639363288879395,
-0.5587992072105408,
-0.5509287118911743,
0.1397949457168579,
0.1921444684267044,
-0.3203241229057312,
0.11487884074449539,
-0.17419128119945526,
0.11200907081365585,
-0.3624354600906372,
0.3914717435836792,
0.5828683376312256,
0.18368646502494812,
0.14754711091518402,
-0.004095777869224548,
0.043486759066581726,
0.27999046444892883,
0.5245280861854553,
-0.12256591022014618,
0.0869813859462738,
-0.24650689959526062,
0.08320507407188416,
0.01803182065486908,
0.18997403979301453,
-0.09567301720380783,
-0.00904826819896698,
0.28123557567596436,
0.20907635986804962,
0.06294102221727371,
-0.2919440269470215,
-0.42493119835853577,
0.12835484743118286,
0.09079799056053162,
-0.27703431248664856,
-0.25207996368408203,
-0.08178029209375381,
-0.2763960361480713,
-0.2758418321609497,
0.17276525497436523,
0.22997114062309265,
-0.009320765733718872,
0.3348717987537384,
-0.2027914971113205,
0.4185909628868103,
-0.2346675843000412,
0.20726247131824493,
-0.08881216496229172,
0.19087323546409607,
0.0688580796122551,
0.026344716548919678,
0.008156884461641312,
0.03889532387256622,
0.01001391839236021,
-0.14882181584835052,
0.03815411403775215,
0.02286558412015438,
-0.03014775738120079,
-0.0014228522777557373,
0.052738748490810394,
-0.12361278384923935,
-0.09245876967906952,
-0.0700630471110344,
0.32948118448257446,
-0.021923821419477463,
-0.10315950214862823,
0.27018484473228455,
0.20366829633712769,
0.06959764659404755,
-0.09458912163972855,
0.5558083653450012,
0.13050946593284607,
0.3341989815235138,
-0.3716711699962616,
-0.07658160477876663,
-0.27116575837135315,
0.03696655109524727,
0.21801163256168365,
0.10747386515140533,
0.4971632957458496,
-0.05865602567791939,
-0.488050639629364,
0.0984347015619278,
-0.3220735490322113,
-0.061109405010938644,
0.18804305791854858,
0.2204420566558838,
0.01554934773594141,
0.32169094681739807,
0.21598653495311737,
0.021382462233304977,
0.04302516579627991,
0.017791807651519775,
-0.1784704178571701,
0.30614128708839417,
-0.11229106783866882,
-0.24131818115711212,
-0.11934635043144226,
0.14955909550189972,
0.03175552934408188,
0.04872861132025719,
-0.13431112468242645,
-0.2570668160915375,
0.061118945479393005,
-0.2717213034629822,
0.07028841972351074,
0.19236548244953156,
-0.2957468628883362,
0.07660127431154251,
0.25304606556892395,
-0.08879855275154114,
-0.11142053455114365,
0.3032885193824768,
-0.31739673018455505,
-0.2900363504886627,
-0.2524840533733368,
0.2699914276599884,
0.00001210719347000122,
-0.11569704115390778,
-0.32711103558540344,
-0.18388767540454865,
0.06994923204183578,
-0.06905299425125122,
0.0003895387053489685,
-0.5530569553375244,
-0.22994942963123322,
-0.1483551561832428,
0.24792981147766113,
0.1517224758863449,
-0.16274353861808777,
-0.18335366249084473,
-0.09922417253255844,
-0.0011466704308986664,
0.7191359400749207,
0.24418002367019653,
-0.03732095658779144,
0.37544700503349304,
-0.3040314018726349,
0.21806620061397552,
0.46670904755592346,
-0.3581661581993103,
-0.1487460434436798,
0.1764141321182251,
0.04817889630794525,
0.0843542069196701,
0.2895801067352295,
0.111025869846344,
0.2248344123363495,
0.08529327064752579,
-0.0274040549993515,
0.42044293880462646,
-0.012897288426756859,
0.1319810301065445,
-0.26338711380958557,
-0.017392681911587715,
0.2603670358657837,
0.32055893540382385,
0.1143178641796112,
0.09871131181716919,
0.013035118579864502,
0.06940055638551712,
0.3013342320919037,
-0.2674887478351593,
-0.07145661860704422,
0.11436527222394943,
0.41156500577926636,
-0.04643809050321579,
-0.006205702666193247,
-0.5620564222335815,
-0.10170524567365646,
-0.01679041050374508,
-0.05013798177242279,
0.19732734560966492,
-0.24442912638187408,
-0.11320630460977554,
-0.3061615824699402,
0.039145298302173615,
-0.4672468602657318,
0.04412384331226349,
0.14074920117855072,
0.0969509556889534,
-0.07639665901660919,
-0.14382486045360565,
-0.14070342481136322,
0.15626639127731323,
-0.3757578730583191,
0.2983134388923645,
0.10021670162677765,
0.43615761399269104,
-0.22959710657596588,
-0.11816762387752533,
-0.19543227553367615,
0.17774681746959686,
0.14283205568790436,
-0.1303776353597641,
-0.18382036685943604,
0.26006054878234863,
0.3931795060634613,
-0.14772045612335205,
-0.25565922260284424,
0.04141409695148468,
0.013508176431059837,
-0.04125955328345299,
-0.2599004805088043,
0.24102641642093658,
0.17162834107875824,
0.08481090515851974,
-0.09369631856679916,
0.250061571598053,
0.007754776626825333,
0.26239946484565735,
0.041417695581912994,
0.18381038308143616,
0.13097511231899261,
-0.12101049721240997,
-0.033602144569158554,
-0.20607450604438782,
0.1790245622396469,
-0.08402827382087708,
0.047528062015771866,
0.1130029708147049,
-0.2546994686126709,
-0.14029660820960999,
0.4825335443019867,
0.03505077585577965,
0.22449207305908203,
0.3179818391799927,
0.024528149515390396,
0.18668526411056519,
-0.037844568490982056,
0.42473965883255005,
0.27250683307647705,
0.1133701279759407,
-0.07181249558925629,
-0.01971830241382122,
-0.007047551684081554,
0.09703003615140915,
0.31633397936820984,
0.16617189347743988,
0.08381347358226776,
0.0014254525303840637,
0.19605983793735504,
0.222097247838974,
-0.24622133374214172,
-0.2870487868785858,
-0.12354495376348495,
0.2592175006866455,
-0.4398542046546936,
0.2105807512998581,
-0.42285314202308655,
-0.11886617541313171,
-0.4256538450717926,
-0.08448874950408936,
0.15739001333713531,
-0.26844078302383423,
-0.20100200176239014,
0.0052755363285541534,
-0.21109938621520996,
0.2973751425743103,
-0.15988124907016754,
-0.04141657054424286,
0.16354341804981232,
-0.29496118426322937,
-0.01432819664478302,
0.17732712626457214,
-0.21609848737716675,
0.04765390232205391,
0.3168340027332306,
-0.0514434389770031,
0.11987075954675674,
-0.33688464760780334,
-0.03217088058590889,
-0.18986567854881287,
-0.28440719842910767,
0.08420629799365997,
-0.15884530544281006,
0.15282690525054932,
0.36412253975868225,
0.18852531909942627,
-0.01587754674255848,
-0.3853817582130432,
0.3728761672973633,
-0.044763270765542984,
-0.30961740016937256,
0.2949204444885254,
0.11730997264385223,
0.09992675483226776,
-0.1945083737373352,
-0.319637268781662,
-0.43776893615722656,
-0.31482604146003723,
0.03949013352394104,
0.2991687059402466,
0.31164079904556274,
0.2796788811683655,
0.21884790062904358,
-0.008930317126214504,
-0.013877592980861664,
0.21975384652614594,
0.06790979951620102,
-0.18452416360378265,
0.3070008158683777,
0.0769771933555603,
-0.15405793488025665,
-0.3288123309612274,
-0.13576525449752808,
0.06419724225997925,
0.16469654440879822,
-0.5805148482322693,
-0.26792025566101074,
-0.4046955108642578,
0.2601160705089569,
-0.12116393446922302,
0.011230995878577232,
0.4093194305896759,
0.32183581590652466,
-0.09031021595001221,
-0.1094965711236,
0.037971172481775284,
0.10136983543634415,
0.1689980924129486,
0.09364546090364456,
0.07424101233482361,
0.653563380241394,
0.01111523061990738,
0.23663188517093658,
0.018394075334072113,
-0.268594354391098,
0.493804395198822,
-0.26651933789253235,
0.1265488564968109,
-0.16744700074195862,
-0.41175273060798645,
0.21298596262931824,
-0.15072035789489746,
-0.2721014618873596,
-0.013683266937732697,
-0.1272096037864685,
-0.04689980298280716,
-0.029273299500346184,
0.10186883807182312,
-0.07547642290592194,
-0.13986249268054962,
0.1835285872220993,
-0.025710463523864746,
0.12111739814281464,
-0.14834830164909363,
-0.0631544291973114,
-0.06773863732814789,
0.06377594918012619,
0.2582896947860718,
0.2537606358528137,
0.1858173906803131,
-0.09174378961324692,
-0.17888663709163666,
0.05334105342626572,
-0.1088678315281868,
0.1070970892906189,
0.18481555581092834,
0.2710372805595398,
-0.13829487562179565,
-0.1749715507030487,
-0.025859810411930084,
0.11599280685186386,
0.5174341201782227,
0.11181023716926575,
0.32132071256637573,
0.07609054446220398,
-0.05521338805556297,
-0.32569053769111633,
-0.2104935497045517,
-0.4642738997936249,
0.06080465763807297,
0.25770923495292664,
0.3593347370624542,
-0.2014428973197937,
-0.02851889654994011,
0.47791704535484314,
0.14366285502910614,
-0.0829901173710823,
-0.044608741998672485,
-0.28740763664245605,
-0.3573645353317261,
-0.18689782917499542,
-0.09402499347925186,
0.3395172953605652,
0.4082046449184418,
0.051155269145965576,
-0.20189644396305084,
-0.2904999852180481,
-0.19120916724205017,
0.2420227825641632,
-0.048779916018247604,
0.262935608625412,
-0.11595657467842102,
0.15802334249019623,
-0.21726101636886597,
0.3030555248260498,
0.35433685779571533,
0.5800003409385681,
-0.21955350041389465,
-0.4416278600692749,
0.0663791298866272,
0.09432483464479446,
0.1806195080280304,
-0.03294466435909271,
-0.21000570058822632,
-0.0016555637121200562,
0.11794299632310867,
0.1911502480506897,
-0.39491358399391174,
0.4615151584148407,
0.507697582244873,
0.2255125790834427,
-0.3360200524330139,
-0.4731597900390625,
0.2255261242389679,
0.36030036211013794,
-0.09042557328939438,
0.224757120013237,
-0.10619388520717621,
-0.49679654836654663,
0.4115877151489258,
0.21227900683879852,
0.8405227661132812,
0.13034315407276154,
0.3029686212539673,
0.36766645312309265,
-0.13159894943237305,
0.19007614254951477,
0.293410062789917,
0.014457006007432938,
-0.33607178926467896,
-0.18134498596191406,
-0.29034096002578735,
-0.20629839599132538,
0.12539894878864288,
0.06944101303815842,
-0.3335164785385132,
0.08965076506137848,
-0.22688929736614227,
0.4378233253955841,
0.07065585255622864,
0.08756718039512634,
-0.04241909086704254,
-0.1759917289018631,
-0.31430330872535706,
0.0758323222398758,
-0.2537301778793335,
-0.0026385821402072906,
0.09610024094581604,
-0.15397948026657104,
-0.16122815012931824,
-0.2966949939727783,
-0.14777526259422302,
0.009419243782758713,
-0.38106825947761536,
0.28483229875564575,
0.013831645250320435,
-0.34975963830947876,
0.09506058692932129,
0.29596006870269775,
0.008583076298236847,
0.13585810363292694,
0.08915489166975021,
0.04763012379407883,
-0.13265973329544067,
0.05890107527375221,
0.08614557981491089,
-0.061934683471918106,
0.3294556736946106,
0.05100710690021515,
0.00452839583158493,
-0.18941155076026917,
-0.13122349977493286,
-0.2643551826477051,
-0.03746483474969864,
-0.056305304169654846,
0.24215243756771088,
-0.5696209669113159,
-0.19001993536949158,
-0.38129910826683044,
-0.00390976294875145,
-0.34275001287460327,
0.15269188582897186,
-0.1751382052898407,
-0.05307795852422714,
0.2031044363975525,
0.30554723739624023,
-0.26841533184051514,
-0.042436856776475906,
0.18814027309417725,
0.057143740355968475,
0.39136651158332825,
0.6465760469436646,
0.048111092299222946,
-0.14451199769973755,
-0.2210882008075714,
0.4586595892906189,
0.23517614603042603,
-0.1741604506969452,
0.4281724989414215,
-0.06490404903888702,
-0.11688061058521271,
-0.23323048651218414,
0.3037760853767395,
0.14650344848632812,
0.23987537622451782,
-0.14669373631477356,
-0.5512102842330933,
-0.37433695793151855,
0.12507925927639008,
-0.2704543471336365,
0.26334553956985474,
-0.0958937406539917,
0.22987733781337738,
-0.21024397015571594,
-0.28278815746307373,
-0.3024807870388031,
-0.030960774049162865,
-0.38297760486602783,
0.00863531231880188,
0.07075012475252151,
-0.07782291620969772,
0.13679948449134827,
-0.02001502551138401,
0.19661371409893036,
0.05963651090860367,
0.0761837437748909,
-0.13887691497802734,
-0.3564701974391937,
0.11404252052307129,
0.06688569486141205,
-0.02558259665966034,
0.09069851040840149,
0.008889228105545044,
-0.2083437293767929,
-0.183839812874794,
-0.17914363741874695,
0.18819665908813477,
-0.1571175456047058,
0.28557002544403076,
0.14820632338523865,
-0.20188632607460022,
0.08214442431926727,
0.03408228978514671,
-0.27517828345298767,
0.10572604835033417,
0.1962941288948059,
0.14169636368751526,
0.022493476048111916,
-0.036003485321998596,
0.06693326681852341,
-0.01909305900335312,
0.08257652074098587,
0.05229827016592026,
0.3752167820930481,
-0.4467006325721741,
-0.008215382695198059,
0.20092123746871948,
0.5091619491577148,
0.2593771815299988,
-0.404074102640152,
-0.03874192386865616,
0.01747920736670494,
0.20097488164901733,
-0.25623124837875366,
-0.10656119883060455,
0.30808717012405396,
-0.12022276967763901,
0.014809798449277878,
0.362944632768631,
-0.31953859329223633,
0.03273440897464752,
-0.23854844272136688,
0.05028112977743149,
0.4950445592403412,
0.09179387986660004,
0.05864934250712395,
0.2602328360080719,
-0.17212823033332825,
-0.09718687832355499,
0.2525651752948761,
0.03744103014469147,
0.1332491785287857,
0.42005282640457153,
-0.16543924808502197,
0.19971179962158203,
0.10993561893701553,
-0.06947097182273865,
0.29207757115364075,
-0.13301274180412292,
0.09468606859445572,
0.19273841381072998,
-0.13999298214912415,
-0.017047591507434845,
-0.019043169915676117,
0.11872834712266922,
-0.33057379722595215,
-0.15843120217323303,
-0.030804725363850594,
0.08332672715187073,
-0.2047235071659088,
0.012350471690297127,
-0.5230590105056763,
-0.10604150593280792,
-0.21159350872039795,
-0.2621007561683655,
-0.07630220055580139,
-0.08213652670383453,
0.1726498007774353,
0.20827051997184753,
0.047270890325307846,
-0.22464047372341156,
-0.24332991242408752,
0.06350317597389221,
0.3196652829647064,
-0.4717787206172943,
0.37650731205940247,
0.3054500222206116,
-0.04836851358413696,
0.2128792107105255,
0.14981558918952942,
0.6432996988296509,
0.5598905086517334,
-0.07815718650817871,
-0.196492999792099,
-0.2063009887933731,
-0.14024566113948822,
0.014567293226718903,
0.21368111670017242,
-0.001741550862789154,
0.2622554898262024,
0.2587118446826935,
0.11945272982120514,
-0.1817447394132614,
0.05656948685646057,
0.12582924962043762,
0.050756487995386124,
-0.1613888442516327,
0.51556795835495,
0.07670986652374268,
-0.11430448293685913,
-0.040660060942173004,
-0.09815441817045212,
-0.43150463700294495,
-0.18069280683994293,
0.34635862708091736,
0.047724660485982895,
0.24332472681999207,
0.17345869541168213,
0.08215367048978806,
0.06097300350666046,
0.3687226176261902,
0.2239491045475006,
0.024411041289567947,
-0.3766193091869354,
-0.026621028780937195,
-0.3567885756492615,
0.09105286002159119,
-0.06276707351207733,
-0.4428917467594147,
0.0700843334197998,
-0.1327551156282425,
0.026513218879699707,
0.1322309970855713,
0.2841872572898865,
0.3326798379421234,
-0.06667843461036682,
0.06981212645769119,
-0.30757156014442444,
-0.16343137621879578,
0.12226007878780365,
0.09219975769519806,
-0.03208701312541962,
-0.40544769167900085,
0.10952307283878326,
0.010858678258955479,
0.10727574676275253,
0.06953532993793488,
-0.15590941905975342,
-0.19947737455368042,
-0.2170606553554535,
0.1244935393333435,
0.21569472551345825,
0.49318423867225647,
-0.13677968084812164,
-0.041231513023376465,
0.21740256249904633,
-0.4033984839916229,
-0.11899299919605255,
0.28804847598075867,
-0.09200593829154968,
0.6007338762283325,
0.037216752767562866,
-0.17075346410274506,
-0.5542503595352173,
0.15193022787570953,
-0.04507666081190109,
-0.27681371569633484,
-0.332802951335907,
0.31495600938796997,
-0.1541893482208252,
-0.07935231178998947,
-0.02616337686777115,
0.09795011579990387,
0.053281269967556,
0.11506593227386475,
-0.16898344457149506,
-0.832019567489624,
0.5784416794776917,
-0.5032222270965576,
-0.3025260865688324,
-0.002617583842948079,
-0.060332804918289185,
-0.0416954830288887,
0.16502374410629272,
-0.594344437122345,
-0.022433772683143616,
0.3838602602481842,
-0.05773851275444031,
-0.2173824906349182,
0.08587051928043365,
0.14890345931053162,
0.26576921343803406,
0.029644180089235306,
0.31109458208084106,
-0.14460286498069763,
-0.10509265214204788,
0.10545340180397034,
-0.2220734804868698
] |
https://github.com/huggingface/datasets/issues/6285
|
TypeError: expected str, bytes or os.PathLike object, not dict
|
> You should be able to load the images by modifying the `load_dataset` call like this:
>
> ```python
> dataset = load_dataset("imagefolder", data_dir="/content/datasets/PotholeDetectionYOLOv8-1")
> ```
>
> The `imagefolder` builder expects the image files to be in `path/label/image_file` (e.g. .`.../train/dog/image_1.jpg`), so the solution for the labels in your case is to create metadata files (one for each split; as explained [here](https://huggingface.co/docs/datasets/image_dataset#imagefolder)) that map the images to their labels.
I tried like this but only uploads images and not labels, Andyrasika/potholes-dataset
|
### Describe the bug
my dataset is in form : train- image /n -labels
and tried the code:
```
from datasets import load_dataset
data_files = {
"train": "/content/datasets/PotholeDetectionYOLOv8-1/train/",
"validation": "/content/datasets/PotholeDetectionYOLOv8-1/valid/",
"test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
}
dataset = load_dataset("imagefolder", data_dir=data_files)
dataset
```
got error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-29-2ef1926f73d9>](https://localhost:8080/#) in <cell line: 8>()
6 "test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
7 }
----> 8 dataset = load_dataset("imagefolder", data_dir=data_files)
9 dataset
6 frames
[/usr/lib/python3.10/pathlib.py](https://localhost:8080/#) in _parse_args(cls, args)
576 parts += a._parts
577 else:
--> 578 a = os.fspath(a)
579 if isinstance(a, str):
580 # Force-cast str subclasses to str (issue #21127)
TypeError: expected str, bytes or os.PathLike object, not dict
```
### Steps to reproduce the bug
as share above
### Expected behavior
load images and labels , but my dataset only uploads images
- https://huggingface.co/datasets/Andyrasika/potholes-dataset
### Environment info
colab pro
| 81
|
TypeError: expected str, bytes or os.PathLike object, not dict
### Describe the bug
my dataset is in form : train- image /n -labels
and tried the code:
```
from datasets import load_dataset
data_files = {
"train": "/content/datasets/PotholeDetectionYOLOv8-1/train/",
"validation": "/content/datasets/PotholeDetectionYOLOv8-1/valid/",
"test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
}
dataset = load_dataset("imagefolder", data_dir=data_files)
dataset
```
got error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-29-2ef1926f73d9>](https://localhost:8080/#) in <cell line: 8>()
6 "test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
7 }
----> 8 dataset = load_dataset("imagefolder", data_dir=data_files)
9 dataset
6 frames
[/usr/lib/python3.10/pathlib.py](https://localhost:8080/#) in _parse_args(cls, args)
576 parts += a._parts
577 else:
--> 578 a = os.fspath(a)
579 if isinstance(a, str):
580 # Force-cast str subclasses to str (issue #21127)
TypeError: expected str, bytes or os.PathLike object, not dict
```
### Steps to reproduce the bug
as share above
### Expected behavior
load images and labels , but my dataset only uploads images
- https://huggingface.co/datasets/Andyrasika/potholes-dataset
### Environment info
colab pro
> You should be able to load the images by modifying the `load_dataset` call like this:
>
> ```python
> dataset = load_dataset("imagefolder", data_dir="/content/datasets/PotholeDetectionYOLOv8-1")
> ```
>
> The `imagefolder` builder expects the image files to be in `path/label/image_file` (e.g. .`.../train/dog/image_1.jpg`), so the solution for the labels in your case is to create metadata files (one for each split; as explained [here](https://huggingface.co/docs/datasets/image_dataset#imagefolder)) that map the images to their labels.
I tried like this but only uploads images and not labels, Andyrasika/potholes-dataset
|
[
-0.08925792574882507,
-0.10927554965019226,
0.02457590028643608,
0.3565119504928589,
0.6146429181098938,
0.0515189990401268,
0.21652664244174957,
0.3238774836063385,
0.15098141133785248,
0.20537450909614563,
0.06611388176679611,
0.4783129096031189,
-0.4957769811153412,
0.12190315872430801,
-0.13280454277992249,
-0.4285094141960144,
0.0202605202794075,
0.0353810116648674,
-0.43395861983299255,
-0.0471978522837162,
-0.30277928709983826,
0.22335980832576752,
-0.06913004070520401,
0.15214192867279053,
-0.23757535219192505,
-0.10790269821882248,
-0.05413384735584259,
0.24454423785209656,
-0.35255080461502075,
-0.33117949962615967,
0.3368202745914459,
-0.15419231355190277,
0.5073306560516357,
0.4982547461986542,
-0.00011383784294594079,
0.2989267110824585,
0.09997859597206116,
0.05946213752031326,
-0.29639363288879395,
-0.5587992072105408,
-0.5509287118911743,
0.1397949457168579,
0.1921444684267044,
-0.3203241229057312,
0.11487884074449539,
-0.17419128119945526,
0.11200907081365585,
-0.3624354600906372,
0.3914717435836792,
0.5828683376312256,
0.18368646502494812,
0.14754711091518402,
-0.004095777869224548,
0.043486759066581726,
0.27999046444892883,
0.5245280861854553,
-0.12256591022014618,
0.0869813859462738,
-0.24650689959526062,
0.08320507407188416,
0.01803182065486908,
0.18997403979301453,
-0.09567301720380783,
-0.00904826819896698,
0.28123557567596436,
0.20907635986804962,
0.06294102221727371,
-0.2919440269470215,
-0.42493119835853577,
0.12835484743118286,
0.09079799056053162,
-0.27703431248664856,
-0.25207996368408203,
-0.08178029209375381,
-0.2763960361480713,
-0.2758418321609497,
0.17276525497436523,
0.22997114062309265,
-0.009320765733718872,
0.3348717987537384,
-0.2027914971113205,
0.4185909628868103,
-0.2346675843000412,
0.20726247131824493,
-0.08881216496229172,
0.19087323546409607,
0.0688580796122551,
0.026344716548919678,
0.008156884461641312,
0.03889532387256622,
0.01001391839236021,
-0.14882181584835052,
0.03815411403775215,
0.02286558412015438,
-0.03014775738120079,
-0.0014228522777557373,
0.052738748490810394,
-0.12361278384923935,
-0.09245876967906952,
-0.0700630471110344,
0.32948118448257446,
-0.021923821419477463,
-0.10315950214862823,
0.27018484473228455,
0.20366829633712769,
0.06959764659404755,
-0.09458912163972855,
0.5558083653450012,
0.13050946593284607,
0.3341989815235138,
-0.3716711699962616,
-0.07658160477876663,
-0.27116575837135315,
0.03696655109524727,
0.21801163256168365,
0.10747386515140533,
0.4971632957458496,
-0.05865602567791939,
-0.488050639629364,
0.0984347015619278,
-0.3220735490322113,
-0.061109405010938644,
0.18804305791854858,
0.2204420566558838,
0.01554934773594141,
0.32169094681739807,
0.21598653495311737,
0.021382462233304977,
0.04302516579627991,
0.017791807651519775,
-0.1784704178571701,
0.30614128708839417,
-0.11229106783866882,
-0.24131818115711212,
-0.11934635043144226,
0.14955909550189972,
0.03175552934408188,
0.04872861132025719,
-0.13431112468242645,
-0.2570668160915375,
0.061118945479393005,
-0.2717213034629822,
0.07028841972351074,
0.19236548244953156,
-0.2957468628883362,
0.07660127431154251,
0.25304606556892395,
-0.08879855275154114,
-0.11142053455114365,
0.3032885193824768,
-0.31739673018455505,
-0.2900363504886627,
-0.2524840533733368,
0.2699914276599884,
0.00001210719347000122,
-0.11569704115390778,
-0.32711103558540344,
-0.18388767540454865,
0.06994923204183578,
-0.06905299425125122,
0.0003895387053489685,
-0.5530569553375244,
-0.22994942963123322,
-0.1483551561832428,
0.24792981147766113,
0.1517224758863449,
-0.16274353861808777,
-0.18335366249084473,
-0.09922417253255844,
-0.0011466704308986664,
0.7191359400749207,
0.24418002367019653,
-0.03732095658779144,
0.37544700503349304,
-0.3040314018726349,
0.21806620061397552,
0.46670904755592346,
-0.3581661581993103,
-0.1487460434436798,
0.1764141321182251,
0.04817889630794525,
0.0843542069196701,
0.2895801067352295,
0.111025869846344,
0.2248344123363495,
0.08529327064752579,
-0.0274040549993515,
0.42044293880462646,
-0.012897288426756859,
0.1319810301065445,
-0.26338711380958557,
-0.017392681911587715,
0.2603670358657837,
0.32055893540382385,
0.1143178641796112,
0.09871131181716919,
0.013035118579864502,
0.06940055638551712,
0.3013342320919037,
-0.2674887478351593,
-0.07145661860704422,
0.11436527222394943,
0.41156500577926636,
-0.04643809050321579,
-0.006205702666193247,
-0.5620564222335815,
-0.10170524567365646,
-0.01679041050374508,
-0.05013798177242279,
0.19732734560966492,
-0.24442912638187408,
-0.11320630460977554,
-0.3061615824699402,
0.039145298302173615,
-0.4672468602657318,
0.04412384331226349,
0.14074920117855072,
0.0969509556889534,
-0.07639665901660919,
-0.14382486045360565,
-0.14070342481136322,
0.15626639127731323,
-0.3757578730583191,
0.2983134388923645,
0.10021670162677765,
0.43615761399269104,
-0.22959710657596588,
-0.11816762387752533,
-0.19543227553367615,
0.17774681746959686,
0.14283205568790436,
-0.1303776353597641,
-0.18382036685943604,
0.26006054878234863,
0.3931795060634613,
-0.14772045612335205,
-0.25565922260284424,
0.04141409695148468,
0.013508176431059837,
-0.04125955328345299,
-0.2599004805088043,
0.24102641642093658,
0.17162834107875824,
0.08481090515851974,
-0.09369631856679916,
0.250061571598053,
0.007754776626825333,
0.26239946484565735,
0.041417695581912994,
0.18381038308143616,
0.13097511231899261,
-0.12101049721240997,
-0.033602144569158554,
-0.20607450604438782,
0.1790245622396469,
-0.08402827382087708,
0.047528062015771866,
0.1130029708147049,
-0.2546994686126709,
-0.14029660820960999,
0.4825335443019867,
0.03505077585577965,
0.22449207305908203,
0.3179818391799927,
0.024528149515390396,
0.18668526411056519,
-0.037844568490982056,
0.42473965883255005,
0.27250683307647705,
0.1133701279759407,
-0.07181249558925629,
-0.01971830241382122,
-0.007047551684081554,
0.09703003615140915,
0.31633397936820984,
0.16617189347743988,
0.08381347358226776,
0.0014254525303840637,
0.19605983793735504,
0.222097247838974,
-0.24622133374214172,
-0.2870487868785858,
-0.12354495376348495,
0.2592175006866455,
-0.4398542046546936,
0.2105807512998581,
-0.42285314202308655,
-0.11886617541313171,
-0.4256538450717926,
-0.08448874950408936,
0.15739001333713531,
-0.26844078302383423,
-0.20100200176239014,
0.0052755363285541534,
-0.21109938621520996,
0.2973751425743103,
-0.15988124907016754,
-0.04141657054424286,
0.16354341804981232,
-0.29496118426322937,
-0.01432819664478302,
0.17732712626457214,
-0.21609848737716675,
0.04765390232205391,
0.3168340027332306,
-0.0514434389770031,
0.11987075954675674,
-0.33688464760780334,
-0.03217088058590889,
-0.18986567854881287,
-0.28440719842910767,
0.08420629799365997,
-0.15884530544281006,
0.15282690525054932,
0.36412253975868225,
0.18852531909942627,
-0.01587754674255848,
-0.3853817582130432,
0.3728761672973633,
-0.044763270765542984,
-0.30961740016937256,
0.2949204444885254,
0.11730997264385223,
0.09992675483226776,
-0.1945083737373352,
-0.319637268781662,
-0.43776893615722656,
-0.31482604146003723,
0.03949013352394104,
0.2991687059402466,
0.31164079904556274,
0.2796788811683655,
0.21884790062904358,
-0.008930317126214504,
-0.013877592980861664,
0.21975384652614594,
0.06790979951620102,
-0.18452416360378265,
0.3070008158683777,
0.0769771933555603,
-0.15405793488025665,
-0.3288123309612274,
-0.13576525449752808,
0.06419724225997925,
0.16469654440879822,
-0.5805148482322693,
-0.26792025566101074,
-0.4046955108642578,
0.2601160705089569,
-0.12116393446922302,
0.011230995878577232,
0.4093194305896759,
0.32183581590652466,
-0.09031021595001221,
-0.1094965711236,
0.037971172481775284,
0.10136983543634415,
0.1689980924129486,
0.09364546090364456,
0.07424101233482361,
0.653563380241394,
0.01111523061990738,
0.23663188517093658,
0.018394075334072113,
-0.268594354391098,
0.493804395198822,
-0.26651933789253235,
0.1265488564968109,
-0.16744700074195862,
-0.41175273060798645,
0.21298596262931824,
-0.15072035789489746,
-0.2721014618873596,
-0.013683266937732697,
-0.1272096037864685,
-0.04689980298280716,
-0.029273299500346184,
0.10186883807182312,
-0.07547642290592194,
-0.13986249268054962,
0.1835285872220993,
-0.025710463523864746,
0.12111739814281464,
-0.14834830164909363,
-0.0631544291973114,
-0.06773863732814789,
0.06377594918012619,
0.2582896947860718,
0.2537606358528137,
0.1858173906803131,
-0.09174378961324692,
-0.17888663709163666,
0.05334105342626572,
-0.1088678315281868,
0.1070970892906189,
0.18481555581092834,
0.2710372805595398,
-0.13829487562179565,
-0.1749715507030487,
-0.025859810411930084,
0.11599280685186386,
0.5174341201782227,
0.11181023716926575,
0.32132071256637573,
0.07609054446220398,
-0.05521338805556297,
-0.32569053769111633,
-0.2104935497045517,
-0.4642738997936249,
0.06080465763807297,
0.25770923495292664,
0.3593347370624542,
-0.2014428973197937,
-0.02851889654994011,
0.47791704535484314,
0.14366285502910614,
-0.0829901173710823,
-0.044608741998672485,
-0.28740763664245605,
-0.3573645353317261,
-0.18689782917499542,
-0.09402499347925186,
0.3395172953605652,
0.4082046449184418,
0.051155269145965576,
-0.20189644396305084,
-0.2904999852180481,
-0.19120916724205017,
0.2420227825641632,
-0.048779916018247604,
0.262935608625412,
-0.11595657467842102,
0.15802334249019623,
-0.21726101636886597,
0.3030555248260498,
0.35433685779571533,
0.5800003409385681,
-0.21955350041389465,
-0.4416278600692749,
0.0663791298866272,
0.09432483464479446,
0.1806195080280304,
-0.03294466435909271,
-0.21000570058822632,
-0.0016555637121200562,
0.11794299632310867,
0.1911502480506897,
-0.39491358399391174,
0.4615151584148407,
0.507697582244873,
0.2255125790834427,
-0.3360200524330139,
-0.4731597900390625,
0.2255261242389679,
0.36030036211013794,
-0.09042557328939438,
0.224757120013237,
-0.10619388520717621,
-0.49679654836654663,
0.4115877151489258,
0.21227900683879852,
0.8405227661132812,
0.13034315407276154,
0.3029686212539673,
0.36766645312309265,
-0.13159894943237305,
0.19007614254951477,
0.293410062789917,
0.014457006007432938,
-0.33607178926467896,
-0.18134498596191406,
-0.29034096002578735,
-0.20629839599132538,
0.12539894878864288,
0.06944101303815842,
-0.3335164785385132,
0.08965076506137848,
-0.22688929736614227,
0.4378233253955841,
0.07065585255622864,
0.08756718039512634,
-0.04241909086704254,
-0.1759917289018631,
-0.31430330872535706,
0.0758323222398758,
-0.2537301778793335,
-0.0026385821402072906,
0.09610024094581604,
-0.15397948026657104,
-0.16122815012931824,
-0.2966949939727783,
-0.14777526259422302,
0.009419243782758713,
-0.38106825947761536,
0.28483229875564575,
0.013831645250320435,
-0.34975963830947876,
0.09506058692932129,
0.29596006870269775,
0.008583076298236847,
0.13585810363292694,
0.08915489166975021,
0.04763012379407883,
-0.13265973329544067,
0.05890107527375221,
0.08614557981491089,
-0.061934683471918106,
0.3294556736946106,
0.05100710690021515,
0.00452839583158493,
-0.18941155076026917,
-0.13122349977493286,
-0.2643551826477051,
-0.03746483474969864,
-0.056305304169654846,
0.24215243756771088,
-0.5696209669113159,
-0.19001993536949158,
-0.38129910826683044,
-0.00390976294875145,
-0.34275001287460327,
0.15269188582897186,
-0.1751382052898407,
-0.05307795852422714,
0.2031044363975525,
0.30554723739624023,
-0.26841533184051514,
-0.042436856776475906,
0.18814027309417725,
0.057143740355968475,
0.39136651158332825,
0.6465760469436646,
0.048111092299222946,
-0.14451199769973755,
-0.2210882008075714,
0.4586595892906189,
0.23517614603042603,
-0.1741604506969452,
0.4281724989414215,
-0.06490404903888702,
-0.11688061058521271,
-0.23323048651218414,
0.3037760853767395,
0.14650344848632812,
0.23987537622451782,
-0.14669373631477356,
-0.5512102842330933,
-0.37433695793151855,
0.12507925927639008,
-0.2704543471336365,
0.26334553956985474,
-0.0958937406539917,
0.22987733781337738,
-0.21024397015571594,
-0.28278815746307373,
-0.3024807870388031,
-0.030960774049162865,
-0.38297760486602783,
0.00863531231880188,
0.07075012475252151,
-0.07782291620969772,
0.13679948449134827,
-0.02001502551138401,
0.19661371409893036,
0.05963651090860367,
0.0761837437748909,
-0.13887691497802734,
-0.3564701974391937,
0.11404252052307129,
0.06688569486141205,
-0.02558259665966034,
0.09069851040840149,
0.008889228105545044,
-0.2083437293767929,
-0.183839812874794,
-0.17914363741874695,
0.18819665908813477,
-0.1571175456047058,
0.28557002544403076,
0.14820632338523865,
-0.20188632607460022,
0.08214442431926727,
0.03408228978514671,
-0.27517828345298767,
0.10572604835033417,
0.1962941288948059,
0.14169636368751526,
0.022493476048111916,
-0.036003485321998596,
0.06693326681852341,
-0.01909305900335312,
0.08257652074098587,
0.05229827016592026,
0.3752167820930481,
-0.4467006325721741,
-0.008215382695198059,
0.20092123746871948,
0.5091619491577148,
0.2593771815299988,
-0.404074102640152,
-0.03874192386865616,
0.01747920736670494,
0.20097488164901733,
-0.25623124837875366,
-0.10656119883060455,
0.30808717012405396,
-0.12022276967763901,
0.014809798449277878,
0.362944632768631,
-0.31953859329223633,
0.03273440897464752,
-0.23854844272136688,
0.05028112977743149,
0.4950445592403412,
0.09179387986660004,
0.05864934250712395,
0.2602328360080719,
-0.17212823033332825,
-0.09718687832355499,
0.2525651752948761,
0.03744103014469147,
0.1332491785287857,
0.42005282640457153,
-0.16543924808502197,
0.19971179962158203,
0.10993561893701553,
-0.06947097182273865,
0.29207757115364075,
-0.13301274180412292,
0.09468606859445572,
0.19273841381072998,
-0.13999298214912415,
-0.017047591507434845,
-0.019043169915676117,
0.11872834712266922,
-0.33057379722595215,
-0.15843120217323303,
-0.030804725363850594,
0.08332672715187073,
-0.2047235071659088,
0.012350471690297127,
-0.5230590105056763,
-0.10604150593280792,
-0.21159350872039795,
-0.2621007561683655,
-0.07630220055580139,
-0.08213652670383453,
0.1726498007774353,
0.20827051997184753,
0.047270890325307846,
-0.22464047372341156,
-0.24332991242408752,
0.06350317597389221,
0.3196652829647064,
-0.4717787206172943,
0.37650731205940247,
0.3054500222206116,
-0.04836851358413696,
0.2128792107105255,
0.14981558918952942,
0.6432996988296509,
0.5598905086517334,
-0.07815718650817871,
-0.196492999792099,
-0.2063009887933731,
-0.14024566113948822,
0.014567293226718903,
0.21368111670017242,
-0.001741550862789154,
0.2622554898262024,
0.2587118446826935,
0.11945272982120514,
-0.1817447394132614,
0.05656948685646057,
0.12582924962043762,
0.050756487995386124,
-0.1613888442516327,
0.51556795835495,
0.07670986652374268,
-0.11430448293685913,
-0.040660060942173004,
-0.09815441817045212,
-0.43150463700294495,
-0.18069280683994293,
0.34635862708091736,
0.047724660485982895,
0.24332472681999207,
0.17345869541168213,
0.08215367048978806,
0.06097300350666046,
0.3687226176261902,
0.2239491045475006,
0.024411041289567947,
-0.3766193091869354,
-0.026621028780937195,
-0.3567885756492615,
0.09105286002159119,
-0.06276707351207733,
-0.4428917467594147,
0.0700843334197998,
-0.1327551156282425,
0.026513218879699707,
0.1322309970855713,
0.2841872572898865,
0.3326798379421234,
-0.06667843461036682,
0.06981212645769119,
-0.30757156014442444,
-0.16343137621879578,
0.12226007878780365,
0.09219975769519806,
-0.03208701312541962,
-0.40544769167900085,
0.10952307283878326,
0.010858678258955479,
0.10727574676275253,
0.06953532993793488,
-0.15590941905975342,
-0.19947737455368042,
-0.2170606553554535,
0.1244935393333435,
0.21569472551345825,
0.49318423867225647,
-0.13677968084812164,
-0.041231513023376465,
0.21740256249904633,
-0.4033984839916229,
-0.11899299919605255,
0.28804847598075867,
-0.09200593829154968,
0.6007338762283325,
0.037216752767562866,
-0.17075346410274506,
-0.5542503595352173,
0.15193022787570953,
-0.04507666081190109,
-0.27681371569633484,
-0.332802951335907,
0.31495600938796997,
-0.1541893482208252,
-0.07935231178998947,
-0.02616337686777115,
0.09795011579990387,
0.053281269967556,
0.11506593227386475,
-0.16898344457149506,
-0.832019567489624,
0.5784416794776917,
-0.5032222270965576,
-0.3025260865688324,
-0.002617583842948079,
-0.060332804918289185,
-0.0416954830288887,
0.16502374410629272,
-0.594344437122345,
-0.022433772683143616,
0.3838602602481842,
-0.05773851275444031,
-0.2173824906349182,
0.08587051928043365,
0.14890345931053162,
0.26576921343803406,
0.029644180089235306,
0.31109458208084106,
-0.14460286498069763,
-0.10509265214204788,
0.10545340180397034,
-0.2220734804868698
] |
https://github.com/huggingface/datasets/issues/6285
|
TypeError: expected str, bytes or os.PathLike object, not dict
|
As explained in my previous comment, you need to define metadata files to load the labels or update the paths to be in the format `train/label/image` (`train- image /n -labels` is not supported by the loader).
|
### Describe the bug
my dataset is in form : train- image /n -labels
and tried the code:
```
from datasets import load_dataset
data_files = {
"train": "/content/datasets/PotholeDetectionYOLOv8-1/train/",
"validation": "/content/datasets/PotholeDetectionYOLOv8-1/valid/",
"test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
}
dataset = load_dataset("imagefolder", data_dir=data_files)
dataset
```
got error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-29-2ef1926f73d9>](https://localhost:8080/#) in <cell line: 8>()
6 "test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
7 }
----> 8 dataset = load_dataset("imagefolder", data_dir=data_files)
9 dataset
6 frames
[/usr/lib/python3.10/pathlib.py](https://localhost:8080/#) in _parse_args(cls, args)
576 parts += a._parts
577 else:
--> 578 a = os.fspath(a)
579 if isinstance(a, str):
580 # Force-cast str subclasses to str (issue #21127)
TypeError: expected str, bytes or os.PathLike object, not dict
```
### Steps to reproduce the bug
as share above
### Expected behavior
load images and labels , but my dataset only uploads images
- https://huggingface.co/datasets/Andyrasika/potholes-dataset
### Environment info
colab pro
| 36
|
TypeError: expected str, bytes or os.PathLike object, not dict
### Describe the bug
my dataset is in form : train- image /n -labels
and tried the code:
```
from datasets import load_dataset
data_files = {
"train": "/content/datasets/PotholeDetectionYOLOv8-1/train/",
"validation": "/content/datasets/PotholeDetectionYOLOv8-1/valid/",
"test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
}
dataset = load_dataset("imagefolder", data_dir=data_files)
dataset
```
got error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-29-2ef1926f73d9>](https://localhost:8080/#) in <cell line: 8>()
6 "test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
7 }
----> 8 dataset = load_dataset("imagefolder", data_dir=data_files)
9 dataset
6 frames
[/usr/lib/python3.10/pathlib.py](https://localhost:8080/#) in _parse_args(cls, args)
576 parts += a._parts
577 else:
--> 578 a = os.fspath(a)
579 if isinstance(a, str):
580 # Force-cast str subclasses to str (issue #21127)
TypeError: expected str, bytes or os.PathLike object, not dict
```
### Steps to reproduce the bug
as share above
### Expected behavior
load images and labels , but my dataset only uploads images
- https://huggingface.co/datasets/Andyrasika/potholes-dataset
### Environment info
colab pro
As explained in my previous comment, you need to define metadata files to load the labels or update the paths to be in the format `train/label/image` (`train- image /n -labels` is not supported by the loader).
|
[
-0.08925792574882507,
-0.10927554965019226,
0.02457590028643608,
0.3565119504928589,
0.6146429181098938,
0.0515189990401268,
0.21652664244174957,
0.3238774836063385,
0.15098141133785248,
0.20537450909614563,
0.06611388176679611,
0.4783129096031189,
-0.4957769811153412,
0.12190315872430801,
-0.13280454277992249,
-0.4285094141960144,
0.0202605202794075,
0.0353810116648674,
-0.43395861983299255,
-0.0471978522837162,
-0.30277928709983826,
0.22335980832576752,
-0.06913004070520401,
0.15214192867279053,
-0.23757535219192505,
-0.10790269821882248,
-0.05413384735584259,
0.24454423785209656,
-0.35255080461502075,
-0.33117949962615967,
0.3368202745914459,
-0.15419231355190277,
0.5073306560516357,
0.4982547461986542,
-0.00011383784294594079,
0.2989267110824585,
0.09997859597206116,
0.05946213752031326,
-0.29639363288879395,
-0.5587992072105408,
-0.5509287118911743,
0.1397949457168579,
0.1921444684267044,
-0.3203241229057312,
0.11487884074449539,
-0.17419128119945526,
0.11200907081365585,
-0.3624354600906372,
0.3914717435836792,
0.5828683376312256,
0.18368646502494812,
0.14754711091518402,
-0.004095777869224548,
0.043486759066581726,
0.27999046444892883,
0.5245280861854553,
-0.12256591022014618,
0.0869813859462738,
-0.24650689959526062,
0.08320507407188416,
0.01803182065486908,
0.18997403979301453,
-0.09567301720380783,
-0.00904826819896698,
0.28123557567596436,
0.20907635986804962,
0.06294102221727371,
-0.2919440269470215,
-0.42493119835853577,
0.12835484743118286,
0.09079799056053162,
-0.27703431248664856,
-0.25207996368408203,
-0.08178029209375381,
-0.2763960361480713,
-0.2758418321609497,
0.17276525497436523,
0.22997114062309265,
-0.009320765733718872,
0.3348717987537384,
-0.2027914971113205,
0.4185909628868103,
-0.2346675843000412,
0.20726247131824493,
-0.08881216496229172,
0.19087323546409607,
0.0688580796122551,
0.026344716548919678,
0.008156884461641312,
0.03889532387256622,
0.01001391839236021,
-0.14882181584835052,
0.03815411403775215,
0.02286558412015438,
-0.03014775738120079,
-0.0014228522777557373,
0.052738748490810394,
-0.12361278384923935,
-0.09245876967906952,
-0.0700630471110344,
0.32948118448257446,
-0.021923821419477463,
-0.10315950214862823,
0.27018484473228455,
0.20366829633712769,
0.06959764659404755,
-0.09458912163972855,
0.5558083653450012,
0.13050946593284607,
0.3341989815235138,
-0.3716711699962616,
-0.07658160477876663,
-0.27116575837135315,
0.03696655109524727,
0.21801163256168365,
0.10747386515140533,
0.4971632957458496,
-0.05865602567791939,
-0.488050639629364,
0.0984347015619278,
-0.3220735490322113,
-0.061109405010938644,
0.18804305791854858,
0.2204420566558838,
0.01554934773594141,
0.32169094681739807,
0.21598653495311737,
0.021382462233304977,
0.04302516579627991,
0.017791807651519775,
-0.1784704178571701,
0.30614128708839417,
-0.11229106783866882,
-0.24131818115711212,
-0.11934635043144226,
0.14955909550189972,
0.03175552934408188,
0.04872861132025719,
-0.13431112468242645,
-0.2570668160915375,
0.061118945479393005,
-0.2717213034629822,
0.07028841972351074,
0.19236548244953156,
-0.2957468628883362,
0.07660127431154251,
0.25304606556892395,
-0.08879855275154114,
-0.11142053455114365,
0.3032885193824768,
-0.31739673018455505,
-0.2900363504886627,
-0.2524840533733368,
0.2699914276599884,
0.00001210719347000122,
-0.11569704115390778,
-0.32711103558540344,
-0.18388767540454865,
0.06994923204183578,
-0.06905299425125122,
0.0003895387053489685,
-0.5530569553375244,
-0.22994942963123322,
-0.1483551561832428,
0.24792981147766113,
0.1517224758863449,
-0.16274353861808777,
-0.18335366249084473,
-0.09922417253255844,
-0.0011466704308986664,
0.7191359400749207,
0.24418002367019653,
-0.03732095658779144,
0.37544700503349304,
-0.3040314018726349,
0.21806620061397552,
0.46670904755592346,
-0.3581661581993103,
-0.1487460434436798,
0.1764141321182251,
0.04817889630794525,
0.0843542069196701,
0.2895801067352295,
0.111025869846344,
0.2248344123363495,
0.08529327064752579,
-0.0274040549993515,
0.42044293880462646,
-0.012897288426756859,
0.1319810301065445,
-0.26338711380958557,
-0.017392681911587715,
0.2603670358657837,
0.32055893540382385,
0.1143178641796112,
0.09871131181716919,
0.013035118579864502,
0.06940055638551712,
0.3013342320919037,
-0.2674887478351593,
-0.07145661860704422,
0.11436527222394943,
0.41156500577926636,
-0.04643809050321579,
-0.006205702666193247,
-0.5620564222335815,
-0.10170524567365646,
-0.01679041050374508,
-0.05013798177242279,
0.19732734560966492,
-0.24442912638187408,
-0.11320630460977554,
-0.3061615824699402,
0.039145298302173615,
-0.4672468602657318,
0.04412384331226349,
0.14074920117855072,
0.0969509556889534,
-0.07639665901660919,
-0.14382486045360565,
-0.14070342481136322,
0.15626639127731323,
-0.3757578730583191,
0.2983134388923645,
0.10021670162677765,
0.43615761399269104,
-0.22959710657596588,
-0.11816762387752533,
-0.19543227553367615,
0.17774681746959686,
0.14283205568790436,
-0.1303776353597641,
-0.18382036685943604,
0.26006054878234863,
0.3931795060634613,
-0.14772045612335205,
-0.25565922260284424,
0.04141409695148468,
0.013508176431059837,
-0.04125955328345299,
-0.2599004805088043,
0.24102641642093658,
0.17162834107875824,
0.08481090515851974,
-0.09369631856679916,
0.250061571598053,
0.007754776626825333,
0.26239946484565735,
0.041417695581912994,
0.18381038308143616,
0.13097511231899261,
-0.12101049721240997,
-0.033602144569158554,
-0.20607450604438782,
0.1790245622396469,
-0.08402827382087708,
0.047528062015771866,
0.1130029708147049,
-0.2546994686126709,
-0.14029660820960999,
0.4825335443019867,
0.03505077585577965,
0.22449207305908203,
0.3179818391799927,
0.024528149515390396,
0.18668526411056519,
-0.037844568490982056,
0.42473965883255005,
0.27250683307647705,
0.1133701279759407,
-0.07181249558925629,
-0.01971830241382122,
-0.007047551684081554,
0.09703003615140915,
0.31633397936820984,
0.16617189347743988,
0.08381347358226776,
0.0014254525303840637,
0.19605983793735504,
0.222097247838974,
-0.24622133374214172,
-0.2870487868785858,
-0.12354495376348495,
0.2592175006866455,
-0.4398542046546936,
0.2105807512998581,
-0.42285314202308655,
-0.11886617541313171,
-0.4256538450717926,
-0.08448874950408936,
0.15739001333713531,
-0.26844078302383423,
-0.20100200176239014,
0.0052755363285541534,
-0.21109938621520996,
0.2973751425743103,
-0.15988124907016754,
-0.04141657054424286,
0.16354341804981232,
-0.29496118426322937,
-0.01432819664478302,
0.17732712626457214,
-0.21609848737716675,
0.04765390232205391,
0.3168340027332306,
-0.0514434389770031,
0.11987075954675674,
-0.33688464760780334,
-0.03217088058590889,
-0.18986567854881287,
-0.28440719842910767,
0.08420629799365997,
-0.15884530544281006,
0.15282690525054932,
0.36412253975868225,
0.18852531909942627,
-0.01587754674255848,
-0.3853817582130432,
0.3728761672973633,
-0.044763270765542984,
-0.30961740016937256,
0.2949204444885254,
0.11730997264385223,
0.09992675483226776,
-0.1945083737373352,
-0.319637268781662,
-0.43776893615722656,
-0.31482604146003723,
0.03949013352394104,
0.2991687059402466,
0.31164079904556274,
0.2796788811683655,
0.21884790062904358,
-0.008930317126214504,
-0.013877592980861664,
0.21975384652614594,
0.06790979951620102,
-0.18452416360378265,
0.3070008158683777,
0.0769771933555603,
-0.15405793488025665,
-0.3288123309612274,
-0.13576525449752808,
0.06419724225997925,
0.16469654440879822,
-0.5805148482322693,
-0.26792025566101074,
-0.4046955108642578,
0.2601160705089569,
-0.12116393446922302,
0.011230995878577232,
0.4093194305896759,
0.32183581590652466,
-0.09031021595001221,
-0.1094965711236,
0.037971172481775284,
0.10136983543634415,
0.1689980924129486,
0.09364546090364456,
0.07424101233482361,
0.653563380241394,
0.01111523061990738,
0.23663188517093658,
0.018394075334072113,
-0.268594354391098,
0.493804395198822,
-0.26651933789253235,
0.1265488564968109,
-0.16744700074195862,
-0.41175273060798645,
0.21298596262931824,
-0.15072035789489746,
-0.2721014618873596,
-0.013683266937732697,
-0.1272096037864685,
-0.04689980298280716,
-0.029273299500346184,
0.10186883807182312,
-0.07547642290592194,
-0.13986249268054962,
0.1835285872220993,
-0.025710463523864746,
0.12111739814281464,
-0.14834830164909363,
-0.0631544291973114,
-0.06773863732814789,
0.06377594918012619,
0.2582896947860718,
0.2537606358528137,
0.1858173906803131,
-0.09174378961324692,
-0.17888663709163666,
0.05334105342626572,
-0.1088678315281868,
0.1070970892906189,
0.18481555581092834,
0.2710372805595398,
-0.13829487562179565,
-0.1749715507030487,
-0.025859810411930084,
0.11599280685186386,
0.5174341201782227,
0.11181023716926575,
0.32132071256637573,
0.07609054446220398,
-0.05521338805556297,
-0.32569053769111633,
-0.2104935497045517,
-0.4642738997936249,
0.06080465763807297,
0.25770923495292664,
0.3593347370624542,
-0.2014428973197937,
-0.02851889654994011,
0.47791704535484314,
0.14366285502910614,
-0.0829901173710823,
-0.044608741998672485,
-0.28740763664245605,
-0.3573645353317261,
-0.18689782917499542,
-0.09402499347925186,
0.3395172953605652,
0.4082046449184418,
0.051155269145965576,
-0.20189644396305084,
-0.2904999852180481,
-0.19120916724205017,
0.2420227825641632,
-0.048779916018247604,
0.262935608625412,
-0.11595657467842102,
0.15802334249019623,
-0.21726101636886597,
0.3030555248260498,
0.35433685779571533,
0.5800003409385681,
-0.21955350041389465,
-0.4416278600692749,
0.0663791298866272,
0.09432483464479446,
0.1806195080280304,
-0.03294466435909271,
-0.21000570058822632,
-0.0016555637121200562,
0.11794299632310867,
0.1911502480506897,
-0.39491358399391174,
0.4615151584148407,
0.507697582244873,
0.2255125790834427,
-0.3360200524330139,
-0.4731597900390625,
0.2255261242389679,
0.36030036211013794,
-0.09042557328939438,
0.224757120013237,
-0.10619388520717621,
-0.49679654836654663,
0.4115877151489258,
0.21227900683879852,
0.8405227661132812,
0.13034315407276154,
0.3029686212539673,
0.36766645312309265,
-0.13159894943237305,
0.19007614254951477,
0.293410062789917,
0.014457006007432938,
-0.33607178926467896,
-0.18134498596191406,
-0.29034096002578735,
-0.20629839599132538,
0.12539894878864288,
0.06944101303815842,
-0.3335164785385132,
0.08965076506137848,
-0.22688929736614227,
0.4378233253955841,
0.07065585255622864,
0.08756718039512634,
-0.04241909086704254,
-0.1759917289018631,
-0.31430330872535706,
0.0758323222398758,
-0.2537301778793335,
-0.0026385821402072906,
0.09610024094581604,
-0.15397948026657104,
-0.16122815012931824,
-0.2966949939727783,
-0.14777526259422302,
0.009419243782758713,
-0.38106825947761536,
0.28483229875564575,
0.013831645250320435,
-0.34975963830947876,
0.09506058692932129,
0.29596006870269775,
0.008583076298236847,
0.13585810363292694,
0.08915489166975021,
0.04763012379407883,
-0.13265973329544067,
0.05890107527375221,
0.08614557981491089,
-0.061934683471918106,
0.3294556736946106,
0.05100710690021515,
0.00452839583158493,
-0.18941155076026917,
-0.13122349977493286,
-0.2643551826477051,
-0.03746483474969864,
-0.056305304169654846,
0.24215243756771088,
-0.5696209669113159,
-0.19001993536949158,
-0.38129910826683044,
-0.00390976294875145,
-0.34275001287460327,
0.15269188582897186,
-0.1751382052898407,
-0.05307795852422714,
0.2031044363975525,
0.30554723739624023,
-0.26841533184051514,
-0.042436856776475906,
0.18814027309417725,
0.057143740355968475,
0.39136651158332825,
0.6465760469436646,
0.048111092299222946,
-0.14451199769973755,
-0.2210882008075714,
0.4586595892906189,
0.23517614603042603,
-0.1741604506969452,
0.4281724989414215,
-0.06490404903888702,
-0.11688061058521271,
-0.23323048651218414,
0.3037760853767395,
0.14650344848632812,
0.23987537622451782,
-0.14669373631477356,
-0.5512102842330933,
-0.37433695793151855,
0.12507925927639008,
-0.2704543471336365,
0.26334553956985474,
-0.0958937406539917,
0.22987733781337738,
-0.21024397015571594,
-0.28278815746307373,
-0.3024807870388031,
-0.030960774049162865,
-0.38297760486602783,
0.00863531231880188,
0.07075012475252151,
-0.07782291620969772,
0.13679948449134827,
-0.02001502551138401,
0.19661371409893036,
0.05963651090860367,
0.0761837437748909,
-0.13887691497802734,
-0.3564701974391937,
0.11404252052307129,
0.06688569486141205,
-0.02558259665966034,
0.09069851040840149,
0.008889228105545044,
-0.2083437293767929,
-0.183839812874794,
-0.17914363741874695,
0.18819665908813477,
-0.1571175456047058,
0.28557002544403076,
0.14820632338523865,
-0.20188632607460022,
0.08214442431926727,
0.03408228978514671,
-0.27517828345298767,
0.10572604835033417,
0.1962941288948059,
0.14169636368751526,
0.022493476048111916,
-0.036003485321998596,
0.06693326681852341,
-0.01909305900335312,
0.08257652074098587,
0.05229827016592026,
0.3752167820930481,
-0.4467006325721741,
-0.008215382695198059,
0.20092123746871948,
0.5091619491577148,
0.2593771815299988,
-0.404074102640152,
-0.03874192386865616,
0.01747920736670494,
0.20097488164901733,
-0.25623124837875366,
-0.10656119883060455,
0.30808717012405396,
-0.12022276967763901,
0.014809798449277878,
0.362944632768631,
-0.31953859329223633,
0.03273440897464752,
-0.23854844272136688,
0.05028112977743149,
0.4950445592403412,
0.09179387986660004,
0.05864934250712395,
0.2602328360080719,
-0.17212823033332825,
-0.09718687832355499,
0.2525651752948761,
0.03744103014469147,
0.1332491785287857,
0.42005282640457153,
-0.16543924808502197,
0.19971179962158203,
0.10993561893701553,
-0.06947097182273865,
0.29207757115364075,
-0.13301274180412292,
0.09468606859445572,
0.19273841381072998,
-0.13999298214912415,
-0.017047591507434845,
-0.019043169915676117,
0.11872834712266922,
-0.33057379722595215,
-0.15843120217323303,
-0.030804725363850594,
0.08332672715187073,
-0.2047235071659088,
0.012350471690297127,
-0.5230590105056763,
-0.10604150593280792,
-0.21159350872039795,
-0.2621007561683655,
-0.07630220055580139,
-0.08213652670383453,
0.1726498007774353,
0.20827051997184753,
0.047270890325307846,
-0.22464047372341156,
-0.24332991242408752,
0.06350317597389221,
0.3196652829647064,
-0.4717787206172943,
0.37650731205940247,
0.3054500222206116,
-0.04836851358413696,
0.2128792107105255,
0.14981558918952942,
0.6432996988296509,
0.5598905086517334,
-0.07815718650817871,
-0.196492999792099,
-0.2063009887933731,
-0.14024566113948822,
0.014567293226718903,
0.21368111670017242,
-0.001741550862789154,
0.2622554898262024,
0.2587118446826935,
0.11945272982120514,
-0.1817447394132614,
0.05656948685646057,
0.12582924962043762,
0.050756487995386124,
-0.1613888442516327,
0.51556795835495,
0.07670986652374268,
-0.11430448293685913,
-0.040660060942173004,
-0.09815441817045212,
-0.43150463700294495,
-0.18069280683994293,
0.34635862708091736,
0.047724660485982895,
0.24332472681999207,
0.17345869541168213,
0.08215367048978806,
0.06097300350666046,
0.3687226176261902,
0.2239491045475006,
0.024411041289567947,
-0.3766193091869354,
-0.026621028780937195,
-0.3567885756492615,
0.09105286002159119,
-0.06276707351207733,
-0.4428917467594147,
0.0700843334197998,
-0.1327551156282425,
0.026513218879699707,
0.1322309970855713,
0.2841872572898865,
0.3326798379421234,
-0.06667843461036682,
0.06981212645769119,
-0.30757156014442444,
-0.16343137621879578,
0.12226007878780365,
0.09219975769519806,
-0.03208701312541962,
-0.40544769167900085,
0.10952307283878326,
0.010858678258955479,
0.10727574676275253,
0.06953532993793488,
-0.15590941905975342,
-0.19947737455368042,
-0.2170606553554535,
0.1244935393333435,
0.21569472551345825,
0.49318423867225647,
-0.13677968084812164,
-0.041231513023376465,
0.21740256249904633,
-0.4033984839916229,
-0.11899299919605255,
0.28804847598075867,
-0.09200593829154968,
0.6007338762283325,
0.037216752767562866,
-0.17075346410274506,
-0.5542503595352173,
0.15193022787570953,
-0.04507666081190109,
-0.27681371569633484,
-0.332802951335907,
0.31495600938796997,
-0.1541893482208252,
-0.07935231178998947,
-0.02616337686777115,
0.09795011579990387,
0.053281269967556,
0.11506593227386475,
-0.16898344457149506,
-0.832019567489624,
0.5784416794776917,
-0.5032222270965576,
-0.3025260865688324,
-0.002617583842948079,
-0.060332804918289185,
-0.0416954830288887,
0.16502374410629272,
-0.594344437122345,
-0.022433772683143616,
0.3838602602481842,
-0.05773851275444031,
-0.2173824906349182,
0.08587051928043365,
0.14890345931053162,
0.26576921343803406,
0.029644180089235306,
0.31109458208084106,
-0.14460286498069763,
-0.10509265214204788,
0.10545340180397034,
-0.2220734804868698
] |
https://github.com/huggingface/datasets/issues/6285
|
TypeError: expected str, bytes or os.PathLike object, not dict
|
I downloaded my file after annotating using roboflow . It gives train-
images, labels , test- images, labels , valid- images, labels . I hope it
gives you an idea of the dataset . Please advise on this dataset
On Tue, Oct 10, 2023 at 18:12 Mario Šaško ***@***.***> wrote:
> As explained in my previous comment, you need to define metadata files to
> load the labels or update the paths to be in the format train/label/image
> (train- image /n -labels is not supported by the loader).
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/6285#issuecomment-1755335215>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AE4LJNN56FWWTSBYTSTUWHLX6U7CVAVCNFSM6AAAAAA5YHCSTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJVGMZTKMRRGU>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
### Describe the bug
my dataset is in form : train- image /n -labels
and tried the code:
```
from datasets import load_dataset
data_files = {
"train": "/content/datasets/PotholeDetectionYOLOv8-1/train/",
"validation": "/content/datasets/PotholeDetectionYOLOv8-1/valid/",
"test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
}
dataset = load_dataset("imagefolder", data_dir=data_files)
dataset
```
got error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-29-2ef1926f73d9>](https://localhost:8080/#) in <cell line: 8>()
6 "test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
7 }
----> 8 dataset = load_dataset("imagefolder", data_dir=data_files)
9 dataset
6 frames
[/usr/lib/python3.10/pathlib.py](https://localhost:8080/#) in _parse_args(cls, args)
576 parts += a._parts
577 else:
--> 578 a = os.fspath(a)
579 if isinstance(a, str):
580 # Force-cast str subclasses to str (issue #21127)
TypeError: expected str, bytes or os.PathLike object, not dict
```
### Steps to reproduce the bug
as share above
### Expected behavior
load images and labels , but my dataset only uploads images
- https://huggingface.co/datasets/Andyrasika/potholes-dataset
### Environment info
colab pro
| 125
|
TypeError: expected str, bytes or os.PathLike object, not dict
### Describe the bug
my dataset is in form : train- image /n -labels
and tried the code:
```
from datasets import load_dataset
data_files = {
"train": "/content/datasets/PotholeDetectionYOLOv8-1/train/",
"validation": "/content/datasets/PotholeDetectionYOLOv8-1/valid/",
"test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
}
dataset = load_dataset("imagefolder", data_dir=data_files)
dataset
```
got error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-29-2ef1926f73d9>](https://localhost:8080/#) in <cell line: 8>()
6 "test": "/content/datasets/PotholeDetectionYOLOv8-1/test/"
7 }
----> 8 dataset = load_dataset("imagefolder", data_dir=data_files)
9 dataset
6 frames
[/usr/lib/python3.10/pathlib.py](https://localhost:8080/#) in _parse_args(cls, args)
576 parts += a._parts
577 else:
--> 578 a = os.fspath(a)
579 if isinstance(a, str):
580 # Force-cast str subclasses to str (issue #21127)
TypeError: expected str, bytes or os.PathLike object, not dict
```
### Steps to reproduce the bug
as share above
### Expected behavior
load images and labels , but my dataset only uploads images
- https://huggingface.co/datasets/Andyrasika/potholes-dataset
### Environment info
colab pro
I downloaded my file after annotating using roboflow . It gives train-
images, labels , test- images, labels , valid- images, labels . I hope it
gives you an idea of the dataset . Please advise on this dataset
On Tue, Oct 10, 2023 at 18:12 Mario Šaško ***@***.***> wrote:
> As explained in my previous comment, you need to define metadata files to
> load the labels or update the paths to be in the format train/label/image
> (train- image /n -labels is not supported by the loader).
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/6285#issuecomment-1755335215>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AE4LJNN56FWWTSBYTSTUWHLX6U7CVAVCNFSM6AAAAAA5YHCSTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJVGMZTKMRRGU>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
[
-0.08925792574882507,
-0.10927554965019226,
0.02457590028643608,
0.3565119504928589,
0.6146429181098938,
0.0515189990401268,
0.21652664244174957,
0.3238774836063385,
0.15098141133785248,
0.20537450909614563,
0.06611388176679611,
0.4783129096031189,
-0.4957769811153412,
0.12190315872430801,
-0.13280454277992249,
-0.4285094141960144,
0.0202605202794075,
0.0353810116648674,
-0.43395861983299255,
-0.0471978522837162,
-0.30277928709983826,
0.22335980832576752,
-0.06913004070520401,
0.15214192867279053,
-0.23757535219192505,
-0.10790269821882248,
-0.05413384735584259,
0.24454423785209656,
-0.35255080461502075,
-0.33117949962615967,
0.3368202745914459,
-0.15419231355190277,
0.5073306560516357,
0.4982547461986542,
-0.00011383784294594079,
0.2989267110824585,
0.09997859597206116,
0.05946213752031326,
-0.29639363288879395,
-0.5587992072105408,
-0.5509287118911743,
0.1397949457168579,
0.1921444684267044,
-0.3203241229057312,
0.11487884074449539,
-0.17419128119945526,
0.11200907081365585,
-0.3624354600906372,
0.3914717435836792,
0.5828683376312256,
0.18368646502494812,
0.14754711091518402,
-0.004095777869224548,
0.043486759066581726,
0.27999046444892883,
0.5245280861854553,
-0.12256591022014618,
0.0869813859462738,
-0.24650689959526062,
0.08320507407188416,
0.01803182065486908,
0.18997403979301453,
-0.09567301720380783,
-0.00904826819896698,
0.28123557567596436,
0.20907635986804962,
0.06294102221727371,
-0.2919440269470215,
-0.42493119835853577,
0.12835484743118286,
0.09079799056053162,
-0.27703431248664856,
-0.25207996368408203,
-0.08178029209375381,
-0.2763960361480713,
-0.2758418321609497,
0.17276525497436523,
0.22997114062309265,
-0.009320765733718872,
0.3348717987537384,
-0.2027914971113205,
0.4185909628868103,
-0.2346675843000412,
0.20726247131824493,
-0.08881216496229172,
0.19087323546409607,
0.0688580796122551,
0.026344716548919678,
0.008156884461641312,
0.03889532387256622,
0.01001391839236021,
-0.14882181584835052,
0.03815411403775215,
0.02286558412015438,
-0.03014775738120079,
-0.0014228522777557373,
0.052738748490810394,
-0.12361278384923935,
-0.09245876967906952,
-0.0700630471110344,
0.32948118448257446,
-0.021923821419477463,
-0.10315950214862823,
0.27018484473228455,
0.20366829633712769,
0.06959764659404755,
-0.09458912163972855,
0.5558083653450012,
0.13050946593284607,
0.3341989815235138,
-0.3716711699962616,
-0.07658160477876663,
-0.27116575837135315,
0.03696655109524727,
0.21801163256168365,
0.10747386515140533,
0.4971632957458496,
-0.05865602567791939,
-0.488050639629364,
0.0984347015619278,
-0.3220735490322113,
-0.061109405010938644,
0.18804305791854858,
0.2204420566558838,
0.01554934773594141,
0.32169094681739807,
0.21598653495311737,
0.021382462233304977,
0.04302516579627991,
0.017791807651519775,
-0.1784704178571701,
0.30614128708839417,
-0.11229106783866882,
-0.24131818115711212,
-0.11934635043144226,
0.14955909550189972,
0.03175552934408188,
0.04872861132025719,
-0.13431112468242645,
-0.2570668160915375,
0.061118945479393005,
-0.2717213034629822,
0.07028841972351074,
0.19236548244953156,
-0.2957468628883362,
0.07660127431154251,
0.25304606556892395,
-0.08879855275154114,
-0.11142053455114365,
0.3032885193824768,
-0.31739673018455505,
-0.2900363504886627,
-0.2524840533733368,
0.2699914276599884,
0.00001210719347000122,
-0.11569704115390778,
-0.32711103558540344,
-0.18388767540454865,
0.06994923204183578,
-0.06905299425125122,
0.0003895387053489685,
-0.5530569553375244,
-0.22994942963123322,
-0.1483551561832428,
0.24792981147766113,
0.1517224758863449,
-0.16274353861808777,
-0.18335366249084473,
-0.09922417253255844,
-0.0011466704308986664,
0.7191359400749207,
0.24418002367019653,
-0.03732095658779144,
0.37544700503349304,
-0.3040314018726349,
0.21806620061397552,
0.46670904755592346,
-0.3581661581993103,
-0.1487460434436798,
0.1764141321182251,
0.04817889630794525,
0.0843542069196701,
0.2895801067352295,
0.111025869846344,
0.2248344123363495,
0.08529327064752579,
-0.0274040549993515,
0.42044293880462646,
-0.012897288426756859,
0.1319810301065445,
-0.26338711380958557,
-0.017392681911587715,
0.2603670358657837,
0.32055893540382385,
0.1143178641796112,
0.09871131181716919,
0.013035118579864502,
0.06940055638551712,
0.3013342320919037,
-0.2674887478351593,
-0.07145661860704422,
0.11436527222394943,
0.41156500577926636,
-0.04643809050321579,
-0.006205702666193247,
-0.5620564222335815,
-0.10170524567365646,
-0.01679041050374508,
-0.05013798177242279,
0.19732734560966492,
-0.24442912638187408,
-0.11320630460977554,
-0.3061615824699402,
0.039145298302173615,
-0.4672468602657318,
0.04412384331226349,
0.14074920117855072,
0.0969509556889534,
-0.07639665901660919,
-0.14382486045360565,
-0.14070342481136322,
0.15626639127731323,
-0.3757578730583191,
0.2983134388923645,
0.10021670162677765,
0.43615761399269104,
-0.22959710657596588,
-0.11816762387752533,
-0.19543227553367615,
0.17774681746959686,
0.14283205568790436,
-0.1303776353597641,
-0.18382036685943604,
0.26006054878234863,
0.3931795060634613,
-0.14772045612335205,
-0.25565922260284424,
0.04141409695148468,
0.013508176431059837,
-0.04125955328345299,
-0.2599004805088043,
0.24102641642093658,
0.17162834107875824,
0.08481090515851974,
-0.09369631856679916,
0.250061571598053,
0.007754776626825333,
0.26239946484565735,
0.041417695581912994,
0.18381038308143616,
0.13097511231899261,
-0.12101049721240997,
-0.033602144569158554,
-0.20607450604438782,
0.1790245622396469,
-0.08402827382087708,
0.047528062015771866,
0.1130029708147049,
-0.2546994686126709,
-0.14029660820960999,
0.4825335443019867,
0.03505077585577965,
0.22449207305908203,
0.3179818391799927,
0.024528149515390396,
0.18668526411056519,
-0.037844568490982056,
0.42473965883255005,
0.27250683307647705,
0.1133701279759407,
-0.07181249558925629,
-0.01971830241382122,
-0.007047551684081554,
0.09703003615140915,
0.31633397936820984,
0.16617189347743988,
0.08381347358226776,
0.0014254525303840637,
0.19605983793735504,
0.222097247838974,
-0.24622133374214172,
-0.2870487868785858,
-0.12354495376348495,
0.2592175006866455,
-0.4398542046546936,
0.2105807512998581,
-0.42285314202308655,
-0.11886617541313171,
-0.4256538450717926,
-0.08448874950408936,
0.15739001333713531,
-0.26844078302383423,
-0.20100200176239014,
0.0052755363285541534,
-0.21109938621520996,
0.2973751425743103,
-0.15988124907016754,
-0.04141657054424286,
0.16354341804981232,
-0.29496118426322937,
-0.01432819664478302,
0.17732712626457214,
-0.21609848737716675,
0.04765390232205391,
0.3168340027332306,
-0.0514434389770031,
0.11987075954675674,
-0.33688464760780334,
-0.03217088058590889,
-0.18986567854881287,
-0.28440719842910767,
0.08420629799365997,
-0.15884530544281006,
0.15282690525054932,
0.36412253975868225,
0.18852531909942627,
-0.01587754674255848,
-0.3853817582130432,
0.3728761672973633,
-0.044763270765542984,
-0.30961740016937256,
0.2949204444885254,
0.11730997264385223,
0.09992675483226776,
-0.1945083737373352,
-0.319637268781662,
-0.43776893615722656,
-0.31482604146003723,
0.03949013352394104,
0.2991687059402466,
0.31164079904556274,
0.2796788811683655,
0.21884790062904358,
-0.008930317126214504,
-0.013877592980861664,
0.21975384652614594,
0.06790979951620102,
-0.18452416360378265,
0.3070008158683777,
0.0769771933555603,
-0.15405793488025665,
-0.3288123309612274,
-0.13576525449752808,
0.06419724225997925,
0.16469654440879822,
-0.5805148482322693,
-0.26792025566101074,
-0.4046955108642578,
0.2601160705089569,
-0.12116393446922302,
0.011230995878577232,
0.4093194305896759,
0.32183581590652466,
-0.09031021595001221,
-0.1094965711236,
0.037971172481775284,
0.10136983543634415,
0.1689980924129486,
0.09364546090364456,
0.07424101233482361,
0.653563380241394,
0.01111523061990738,
0.23663188517093658,
0.018394075334072113,
-0.268594354391098,
0.493804395198822,
-0.26651933789253235,
0.1265488564968109,
-0.16744700074195862,
-0.41175273060798645,
0.21298596262931824,
-0.15072035789489746,
-0.2721014618873596,
-0.013683266937732697,
-0.1272096037864685,
-0.04689980298280716,
-0.029273299500346184,
0.10186883807182312,
-0.07547642290592194,
-0.13986249268054962,
0.1835285872220993,
-0.025710463523864746,
0.12111739814281464,
-0.14834830164909363,
-0.0631544291973114,
-0.06773863732814789,
0.06377594918012619,
0.2582896947860718,
0.2537606358528137,
0.1858173906803131,
-0.09174378961324692,
-0.17888663709163666,
0.05334105342626572,
-0.1088678315281868,
0.1070970892906189,
0.18481555581092834,
0.2710372805595398,
-0.13829487562179565,
-0.1749715507030487,
-0.025859810411930084,
0.11599280685186386,
0.5174341201782227,
0.11181023716926575,
0.32132071256637573,
0.07609054446220398,
-0.05521338805556297,
-0.32569053769111633,
-0.2104935497045517,
-0.4642738997936249,
0.06080465763807297,
0.25770923495292664,
0.3593347370624542,
-0.2014428973197937,
-0.02851889654994011,
0.47791704535484314,
0.14366285502910614,
-0.0829901173710823,
-0.044608741998672485,
-0.28740763664245605,
-0.3573645353317261,
-0.18689782917499542,
-0.09402499347925186,
0.3395172953605652,
0.4082046449184418,
0.051155269145965576,
-0.20189644396305084,
-0.2904999852180481,
-0.19120916724205017,
0.2420227825641632,
-0.048779916018247604,
0.262935608625412,
-0.11595657467842102,
0.15802334249019623,
-0.21726101636886597,
0.3030555248260498,
0.35433685779571533,
0.5800003409385681,
-0.21955350041389465,
-0.4416278600692749,
0.0663791298866272,
0.09432483464479446,
0.1806195080280304,
-0.03294466435909271,
-0.21000570058822632,
-0.0016555637121200562,
0.11794299632310867,
0.1911502480506897,
-0.39491358399391174,
0.4615151584148407,
0.507697582244873,
0.2255125790834427,
-0.3360200524330139,
-0.4731597900390625,
0.2255261242389679,
0.36030036211013794,
-0.09042557328939438,
0.224757120013237,
-0.10619388520717621,
-0.49679654836654663,
0.4115877151489258,
0.21227900683879852,
0.8405227661132812,
0.13034315407276154,
0.3029686212539673,
0.36766645312309265,
-0.13159894943237305,
0.19007614254951477,
0.293410062789917,
0.014457006007432938,
-0.33607178926467896,
-0.18134498596191406,
-0.29034096002578735,
-0.20629839599132538,
0.12539894878864288,
0.06944101303815842,
-0.3335164785385132,
0.08965076506137848,
-0.22688929736614227,
0.4378233253955841,
0.07065585255622864,
0.08756718039512634,
-0.04241909086704254,
-0.1759917289018631,
-0.31430330872535706,
0.0758323222398758,
-0.2537301778793335,
-0.0026385821402072906,
0.09610024094581604,
-0.15397948026657104,
-0.16122815012931824,
-0.2966949939727783,
-0.14777526259422302,
0.009419243782758713,
-0.38106825947761536,
0.28483229875564575,
0.013831645250320435,
-0.34975963830947876,
0.09506058692932129,
0.29596006870269775,
0.008583076298236847,
0.13585810363292694,
0.08915489166975021,
0.04763012379407883,
-0.13265973329544067,
0.05890107527375221,
0.08614557981491089,
-0.061934683471918106,
0.3294556736946106,
0.05100710690021515,
0.00452839583158493,
-0.18941155076026917,
-0.13122349977493286,
-0.2643551826477051,
-0.03746483474969864,
-0.056305304169654846,
0.24215243756771088,
-0.5696209669113159,
-0.19001993536949158,
-0.38129910826683044,
-0.00390976294875145,
-0.34275001287460327,
0.15269188582897186,
-0.1751382052898407,
-0.05307795852422714,
0.2031044363975525,
0.30554723739624023,
-0.26841533184051514,
-0.042436856776475906,
0.18814027309417725,
0.057143740355968475,
0.39136651158332825,
0.6465760469436646,
0.048111092299222946,
-0.14451199769973755,
-0.2210882008075714,
0.4586595892906189,
0.23517614603042603,
-0.1741604506969452,
0.4281724989414215,
-0.06490404903888702,
-0.11688061058521271,
-0.23323048651218414,
0.3037760853767395,
0.14650344848632812,
0.23987537622451782,
-0.14669373631477356,
-0.5512102842330933,
-0.37433695793151855,
0.12507925927639008,
-0.2704543471336365,
0.26334553956985474,
-0.0958937406539917,
0.22987733781337738,
-0.21024397015571594,
-0.28278815746307373,
-0.3024807870388031,
-0.030960774049162865,
-0.38297760486602783,
0.00863531231880188,
0.07075012475252151,
-0.07782291620969772,
0.13679948449134827,
-0.02001502551138401,
0.19661371409893036,
0.05963651090860367,
0.0761837437748909,
-0.13887691497802734,
-0.3564701974391937,
0.11404252052307129,
0.06688569486141205,
-0.02558259665966034,
0.09069851040840149,
0.008889228105545044,
-0.2083437293767929,
-0.183839812874794,
-0.17914363741874695,
0.18819665908813477,
-0.1571175456047058,
0.28557002544403076,
0.14820632338523865,
-0.20188632607460022,
0.08214442431926727,
0.03408228978514671,
-0.27517828345298767,
0.10572604835033417,
0.1962941288948059,
0.14169636368751526,
0.022493476048111916,
-0.036003485321998596,
0.06693326681852341,
-0.01909305900335312,
0.08257652074098587,
0.05229827016592026,
0.3752167820930481,
-0.4467006325721741,
-0.008215382695198059,
0.20092123746871948,
0.5091619491577148,
0.2593771815299988,
-0.404074102640152,
-0.03874192386865616,
0.01747920736670494,
0.20097488164901733,
-0.25623124837875366,
-0.10656119883060455,
0.30808717012405396,
-0.12022276967763901,
0.014809798449277878,
0.362944632768631,
-0.31953859329223633,
0.03273440897464752,
-0.23854844272136688,
0.05028112977743149,
0.4950445592403412,
0.09179387986660004,
0.05864934250712395,
0.2602328360080719,
-0.17212823033332825,
-0.09718687832355499,
0.2525651752948761,
0.03744103014469147,
0.1332491785287857,
0.42005282640457153,
-0.16543924808502197,
0.19971179962158203,
0.10993561893701553,
-0.06947097182273865,
0.29207757115364075,
-0.13301274180412292,
0.09468606859445572,
0.19273841381072998,
-0.13999298214912415,
-0.017047591507434845,
-0.019043169915676117,
0.11872834712266922,
-0.33057379722595215,
-0.15843120217323303,
-0.030804725363850594,
0.08332672715187073,
-0.2047235071659088,
0.012350471690297127,
-0.5230590105056763,
-0.10604150593280792,
-0.21159350872039795,
-0.2621007561683655,
-0.07630220055580139,
-0.08213652670383453,
0.1726498007774353,
0.20827051997184753,
0.047270890325307846,
-0.22464047372341156,
-0.24332991242408752,
0.06350317597389221,
0.3196652829647064,
-0.4717787206172943,
0.37650731205940247,
0.3054500222206116,
-0.04836851358413696,
0.2128792107105255,
0.14981558918952942,
0.6432996988296509,
0.5598905086517334,
-0.07815718650817871,
-0.196492999792099,
-0.2063009887933731,
-0.14024566113948822,
0.014567293226718903,
0.21368111670017242,
-0.001741550862789154,
0.2622554898262024,
0.2587118446826935,
0.11945272982120514,
-0.1817447394132614,
0.05656948685646057,
0.12582924962043762,
0.050756487995386124,
-0.1613888442516327,
0.51556795835495,
0.07670986652374268,
-0.11430448293685913,
-0.040660060942173004,
-0.09815441817045212,
-0.43150463700294495,
-0.18069280683994293,
0.34635862708091736,
0.047724660485982895,
0.24332472681999207,
0.17345869541168213,
0.08215367048978806,
0.06097300350666046,
0.3687226176261902,
0.2239491045475006,
0.024411041289567947,
-0.3766193091869354,
-0.026621028780937195,
-0.3567885756492615,
0.09105286002159119,
-0.06276707351207733,
-0.4428917467594147,
0.0700843334197998,
-0.1327551156282425,
0.026513218879699707,
0.1322309970855713,
0.2841872572898865,
0.3326798379421234,
-0.06667843461036682,
0.06981212645769119,
-0.30757156014442444,
-0.16343137621879578,
0.12226007878780365,
0.09219975769519806,
-0.03208701312541962,
-0.40544769167900085,
0.10952307283878326,
0.010858678258955479,
0.10727574676275253,
0.06953532993793488,
-0.15590941905975342,
-0.19947737455368042,
-0.2170606553554535,
0.1244935393333435,
0.21569472551345825,
0.49318423867225647,
-0.13677968084812164,
-0.041231513023376465,
0.21740256249904633,
-0.4033984839916229,
-0.11899299919605255,
0.28804847598075867,
-0.09200593829154968,
0.6007338762283325,
0.037216752767562866,
-0.17075346410274506,
-0.5542503595352173,
0.15193022787570953,
-0.04507666081190109,
-0.27681371569633484,
-0.332802951335907,
0.31495600938796997,
-0.1541893482208252,
-0.07935231178998947,
-0.02616337686777115,
0.09795011579990387,
0.053281269967556,
0.11506593227386475,
-0.16898344457149506,
-0.832019567489624,
0.5784416794776917,
-0.5032222270965576,
-0.3025260865688324,
-0.002617583842948079,
-0.060332804918289185,
-0.0416954830288887,
0.16502374410629272,
-0.594344437122345,
-0.022433772683143616,
0.3838602602481842,
-0.05773851275444031,
-0.2173824906349182,
0.08587051928043365,
0.14890345931053162,
0.26576921343803406,
0.029644180089235306,
0.31109458208084106,
-0.14460286498069763,
-0.10509265214204788,
0.10545340180397034,
-0.2220734804868698
] |
https://github.com/huggingface/datasets/issues/6280
|
Couldn't cast array of type fixed_size_list to Sequence(Value(float64))
|
Thanks for the quick response @mariosasko! I just installed your branch via `poetry add 'git+https://github.com/huggingface/datasets#fix-array_values'` and I can confirm it works on the example provided.
Follow up question for you, should `None`s be supported in these types of features as they are in others?
For example, the following script:
```
from datasets import Features, Value, Sequence, ClassLabel, Dataset
dataset_features = Features({
'text': Value('string'),
'embedding': Sequence(Value('double'), length=2),
'categories': Sequence(ClassLabel(names=sorted([
'one',
'two',
'three'
]))),
})
dataset = Dataset.from_dict(
{
'text': ['A'] * 10000,
"embedding": [None] * 10000, # THIS LINE CHANGED
'categories': [[0]] * 10000,
},
features=dataset_features
)
def test_mapper(r):
r['text'] = list(map(lambda t: t + ' b', r['text']))
return r
dataset = dataset.map(test_mapper, batched=True, batch_size=10, features=dataset_features, num_proc=2)
```
fails with
```
Traceback (most recent call last):
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/multiprocess/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1354, in _write_generator_to_queue
for i, result in enumerate(func(**kwargs)):
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 3493, in _map_single
writer.write_batch(batch)
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/arrow_writer.py", line 549, in write_batch
array = cast_array_to_feature(col_values, col_type) if col_type is not None else col_values
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/table.py", line 2160, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
fixed_size_list<item: double>[2]
to
Sequence(feature=Value(dtype='float64', id=None), length=2, id=None)
```
Ideally we can have empty embedding columns as well!
|
### Describe the bug
I have a dataset with an embedding column, when I try to map that dataset I get the following exception:
```
Traceback (most recent call last):
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 3189, in map
for rank, done, content in iflatmap_unordered(
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in iflatmap_unordered
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in <listcomp>
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/multiprocess/pool.py", line 774, in get
raise self._value
TypeError: Couldn't cast array of type
fixed_size_list<item: float>[2]
to
Sequence(feature=Value(dtype='float32', id=None), length=2, id=None)
```
### Steps to reproduce the bug
Here's a simple repro script:
```
from datasets import Features, Value, Sequence, ClassLabel, Dataset
dataset_features = Features({
'text': Value('string'),
'embedding': Sequence(Value('double'), length=2),
'categories': Sequence(ClassLabel(names=sorted([
'one',
'two',
'three'
]))),
})
dataset = Dataset.from_dict(
{
'text': ['A'] * 10000,
'embedding': [[0.0, 0.1]] * 10000,
'categories': [[0]] * 10000,
},
features=dataset_features
)
def test_mapper(r):
r['text'] = list(map(lambda t: t + ' b', r['text']))
return r
dataset = dataset.map(test_mapper, batched=True, batch_size=10, features=dataset_features, num_proc=2)
```
Removing the embedding column fixes the issue!
### Expected behavior
The mapping completes successfully.
### Environment info
- `datasets` version: 2.14.4
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.17.1
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
| 234
|
Couldn't cast array of type fixed_size_list to Sequence(Value(float64))
### Describe the bug
I have a dataset with an embedding column, when I try to map that dataset I get the following exception:
```
Traceback (most recent call last):
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 3189, in map
for rank, done, content in iflatmap_unordered(
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in iflatmap_unordered
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in <listcomp>
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/multiprocess/pool.py", line 774, in get
raise self._value
TypeError: Couldn't cast array of type
fixed_size_list<item: float>[2]
to
Sequence(feature=Value(dtype='float32', id=None), length=2, id=None)
```
### Steps to reproduce the bug
Here's a simple repro script:
```
from datasets import Features, Value, Sequence, ClassLabel, Dataset
dataset_features = Features({
'text': Value('string'),
'embedding': Sequence(Value('double'), length=2),
'categories': Sequence(ClassLabel(names=sorted([
'one',
'two',
'three'
]))),
})
dataset = Dataset.from_dict(
{
'text': ['A'] * 10000,
'embedding': [[0.0, 0.1]] * 10000,
'categories': [[0]] * 10000,
},
features=dataset_features
)
def test_mapper(r):
r['text'] = list(map(lambda t: t + ' b', r['text']))
return r
dataset = dataset.map(test_mapper, batched=True, batch_size=10, features=dataset_features, num_proc=2)
```
Removing the embedding column fixes the issue!
### Expected behavior
The mapping completes successfully.
### Environment info
- `datasets` version: 2.14.4
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.17.1
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
Thanks for the quick response @mariosasko! I just installed your branch via `poetry add 'git+https://github.com/huggingface/datasets#fix-array_values'` and I can confirm it works on the example provided.
Follow up question for you, should `None`s be supported in these types of features as they are in others?
For example, the following script:
```
from datasets import Features, Value, Sequence, ClassLabel, Dataset
dataset_features = Features({
'text': Value('string'),
'embedding': Sequence(Value('double'), length=2),
'categories': Sequence(ClassLabel(names=sorted([
'one',
'two',
'three'
]))),
})
dataset = Dataset.from_dict(
{
'text': ['A'] * 10000,
"embedding": [None] * 10000, # THIS LINE CHANGED
'categories': [[0]] * 10000,
},
features=dataset_features
)
def test_mapper(r):
r['text'] = list(map(lambda t: t + ' b', r['text']))
return r
dataset = dataset.map(test_mapper, batched=True, batch_size=10, features=dataset_features, num_proc=2)
```
fails with
```
Traceback (most recent call last):
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/multiprocess/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1354, in _write_generator_to_queue
for i, result in enumerate(func(**kwargs)):
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 3493, in _map_single
writer.write_batch(batch)
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/arrow_writer.py", line 549, in write_batch
array = cast_array_to_feature(col_values, col_type) if col_type is not None else col_values
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/table.py", line 1831, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/table.py", line 1831, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/home/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/table.py", line 2160, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
fixed_size_list<item: double>[2]
to
Sequence(feature=Value(dtype='float64', id=None), length=2, id=None)
```
Ideally we can have empty embedding columns as well!
|
[
-0.014731254428625107,
-0.6136934757232666,
0.010602861642837524,
0.060643985867500305,
0.6919259428977966,
0.2248995304107666,
0.3206327557563782,
0.5348024964332581,
0.30549949407577515,
0.07003726065158844,
0.22057761251926422,
0.4219731390476227,
-0.24774019420146942,
-0.15707002580165863,
0.040505386888980865,
-0.23436951637268066,
0.07567325234413147,
0.010080613195896149,
0.03399958834052086,
-0.039406321942806244,
-0.35026606917381287,
0.081868477165699,
-0.29146671295166016,
-0.223444864153862,
0.314170777797699,
-0.03663519024848938,
-0.04373841732740402,
-0.38770854473114014,
0.0672561526298523,
-0.41619232296943665,
0.08449363708496094,
-0.43734341859817505,
0.16730180382728577,
0.004733182489871979,
-0.00011924300633836538,
0.08766749501228333,
0.1676965057849884,
-0.09879814088344574,
0.02603955939412117,
-0.1415693610906601,
-0.44053763151168823,
-0.2952098548412323,
0.04407917708158493,
-0.27701064944267273,
-0.24402880668640137,
-0.1467573344707489,
-0.019603131338953972,
-0.8098945617675781,
0.16758671402931213,
0.2371261566877365,
0.17189830541610718,
0.26110824942588806,
-0.002237774431705475,
-0.24377429485321045,
0.0686192661523819,
-0.14582908153533936,
-0.306617796421051,
0.1637088656425476,
0.33646076917648315,
0.12783774733543396,
0.027302615344524384,
0.23677019774913788,
-0.18265585601329803,
0.07607284188270569,
0.33680057525634766,
-0.03157587721943855,
0.059087492525577545,
-0.3182338774204254,
-0.08692563325166702,
0.15453344583511353,
0.27571219205856323,
-0.12381986528635025,
-0.022917384281754494,
-0.1624118685722351,
0.12460257112979889,
-0.14329135417938232,
0.12495503574609756,
0.010871196165680885,
0.2186485230922699,
0.10180330276489258,
-0.34641432762145996,
0.22441785037517548,
-0.014149140566587448,
0.2016618251800537,
-0.13140001893043518,
0.10976375639438629,
-0.06367358565330505,
0.16458913683891296,
-0.0018363334238529205,
-0.34815746545791626,
-0.13462938368320465,
-0.023986201733350754,
0.10293440520763397,
0.2969152331352234,
-0.11079572141170502,
-0.22814972698688507,
0.15590527653694153,
-0.07476057857275009,
-0.0267403032630682,
-0.08730249106884003,
0.20437750220298767,
0.12169849127531052,
0.22203926742076874,
0.06769654899835587,
0.07590343803167343,
0.4233967959880829,
-0.23275884985923767,
0.4559181332588196,
0.031482696533203125,
0.3156639039516449,
-0.07851402461528778,
0.06594815105199814,
0.17569071054458618,
-0.09294233471155167,
0.0568045936524868,
0.25875669717788696,
0.10352006554603577,
-0.15227945148944855,
-0.3773175776004791,
0.3860527575016022,
-0.5588683485984802,
0.2980159521102905,
0.23258087038993835,
0.3453669548034668,
-0.075035959482193,
0.22007650136947632,
0.2516762614250183,
0.3283337354660034,
-0.006437147036194801,
0.06088694557547569,
-0.10444401949644089,
0.025493958964943886,
-0.12618587911128998,
-0.2272551953792572,
0.1644238829612732,
0.21453356742858887,
0.052063122391700745,
0.03576003760099411,
0.011563260108232498,
-0.19041037559509277,
-0.19717581570148468,
-0.1387435495853424,
0.4365048408508301,
0.2039531022310257,
-0.1931491494178772,
0.11611463874578476,
0.3769577443599701,
0.2547811269760132,
-0.14981111884117126,
0.20504334568977356,
-0.24341967701911926,
-0.004278901964426041,
-0.02105838619172573,
0.19224265217781067,
-0.06360705196857452,
0.1272566020488739,
0.02363843470811844,
0.038367390632629395,
0.517370343208313,
-0.1922570765018463,
0.08188378810882568,
-0.4570688009262085,
-0.21382345259189606,
-0.2897445857524872,
0.038629643619060516,
-0.023143157362937927,
-0.33412596583366394,
0.12389516830444336,
-0.16948387026786804,
0.2823229134082794,
0.15590296685695648,
0.19294074177742004,
-0.019073262810707092,
-0.0010111629962921143,
-0.273718923330307,
0.41722583770751953,
0.25710970163345337,
0.07342933118343353,
-0.33514586091041565,
0.08937692642211914,
-0.030404288321733475,
0.02813819609582424,
-0.1609465777873993,
0.17232292890548706,
0.511756420135498,
-0.20068705081939697,
0.012177728116512299,
0.15608102083206177,
-0.12181662023067474,
0.17046454548835754,
-0.2511322796344757,
-0.12890224158763885,
0.09742219746112823,
-0.05638226866722107,
-0.06688974797725677,
0.2145354151725769,
0.08106424659490585,
0.33297863602638245,
0.06835461407899857,
-0.18985314667224884,
0.20308533310890198,
0.4013608694076538,
0.2455705851316452,
-0.14664584398269653,
0.0906299501657486,
-0.32335829734802246,
-0.40215003490448,
0.09285611659288406,
0.12403205037117004,
-0.12915384769439697,
-0.321072518825531,
-0.029538707807660103,
-0.2911266088485718,
0.14850841462612152,
-0.1402667760848999,
0.36151498556137085,
0.05155498534440994,
-0.05767011642456055,
0.028665341436862946,
-0.0801025778055191,
-0.08805305510759354,
-0.21238099038600922,
0.004450241103768349,
-0.07399310916662216,
-0.45723479986190796,
0.3407265245914459,
-0.07629784941673279,
-0.24156427383422852,
-0.0008802004158496857,
0.2977248430252075,
0.30894649028778076,
-0.2554757595062256,
-0.18545368313789368,
0.06781291961669922,
-0.041490379720926285,
0.009058274328708649,
-0.6232643723487854,
0.08500423282384872,
0.3012893497943878,
-0.6093754768371582,
0.0168144591152668,
0.34024304151535034,
0.06993896514177322,
-0.0998348742723465,
-0.2596210241317749,
0.5482124090194702,
-0.06192648038268089,
0.4062560200691223,
-0.254375696182251,
0.18351323902606964,
0.05256068706512451,
-0.07758843898773193,
-0.03234099596738815,
-0.5320142507553101,
0.17091244459152222,
0.3235912322998047,
-0.026322273537516594,
-0.20230349898338318,
-0.20841120183467865,
0.23279032111167908,
0.4859599769115448,
0.08558833599090576,
0.06190422549843788,
0.05000009387731552,
0.03772636875510216,
0.17520660161972046,
0.08930481970310211,
-0.1362791508436203,
0.3572753965854645,
-0.020418841391801834,
0.037889182567596436,
0.044603366404771805,
-0.21189165115356445,
-0.1099216490983963,
0.13665126264095306,
-0.005046911537647247,
0.3001748323440552,
0.2518046796321869,
0.3552766740322113,
0.037704288959503174,
-0.02445206791162491,
0.020741228014230728,
0.013128802180290222,
0.27624428272247314,
-0.3450794517993927,
0.05359078198671341,
-0.5258973240852356,
0.24876496195793152,
-0.12870873510837555,
0.11654915660619736,
0.007003577426075935,
-0.6322688460350037,
-0.11840598285198212,
0.14199504256248474,
-0.25710809230804443,
0.2757342755794525,
-0.16970205307006836,
-0.21960388123989105,
0.38201701641082764,
-0.05450312793254852,
-0.13876532018184662,
-0.03586271405220032,
0.013407217338681221,
0.017696376889944077,
0.09255871921777725,
-0.19849245250225067,
0.32177433371543884,
0.2787436246871948,
-0.2712053656578064,
-0.19101257622241974,
-0.39830735325813293,
0.06002841517329216,
-0.2003207504749298,
0.034060291945934296,
0.4108078181743622,
0.368058979511261,
-0.1473231315612793,
-0.04006454721093178,
0.3677602708339691,
0.01731688715517521,
-0.13774250447750092,
0.16080830991268158,
0.04575479030609131,
0.017598485574126244,
-0.28233015537261963,
-0.21304073929786682,
-0.12929195165634155,
-0.33388546109199524,
0.03561500087380409,
-0.06704629957675934,
0.07861742377281189,
-0.1859048455953598,
0.3129889965057373,
0.11443745344877243,
0.2848217487335205,
-0.2604103982448578,
-0.08840668946504593,
0.5659740567207336,
0.3640984892845154,
-0.17837156355381012,
-0.27980944514274597,
-0.11245757341384888,
-0.25646188855171204,
-0.08369927108287811,
0.11429792642593384,
-0.37483304738998413,
-0.10828264057636261,
-0.2324381023645401,
-0.022000916302204132,
-0.13607153296470642,
-0.153074711561203,
0.13478896021842957,
0.018365712836384773,
-0.004631455987691879,
-0.21979433298110962,
-0.0384475514292717,
0.08611489087343216,
0.24986928701400757,
0.11057387292385101,
0.16714122891426086,
0.7291284799575806,
0.20367127656936646,
0.15184161067008972,
0.42981451749801636,
-0.2774938941001892,
0.4726236164569855,
-0.13884826004505157,
-0.06110120192170143,
-0.27154892683029175,
-0.28269991278648376,
0.005534481257200241,
0.06626901030540466,
-0.0678483247756958,
0.018075570464134216,
-0.28966790437698364,
-0.35297852754592896,
0.2551819980144501,
0.24507054686546326,
0.3975539803504944,
-0.1749134063720703,
0.35078489780426025,
-0.16410009562969208,
0.12556758522987366,
0.07956588268280029,
0.08357102423906326,
-0.1891094297170639,
-0.3008703887462616,
-0.08740715682506561,
-0.2721714973449707,
-0.016251511871814728,
-0.12653054296970367,
-0.12958593666553497,
-0.4357060492038727,
-0.16920116543769836,
0.44904226064682007,
0.3664800822734833,
0.4590904116630554,
-0.16145332157611847,
-0.11302096396684647,
0.1483469009399414,
0.02531789056956768,
0.48168182373046875,
-0.44076696038246155,
0.1416146457195282,
0.14679060876369476,
0.3611714541912079,
-0.34385040402412415,
0.02483781799674034,
-0.18431422114372253,
0.19145742058753967,
0.08627581596374512,
0.5145983695983887,
-0.3198578953742981,
0.14650948345661163,
0.3520376682281494,
0.19267569482326508,
-0.010515138506889343,
-0.04954130947589874,
-0.18655376136302948,
-0.2341597080230713,
-0.21600282192230225,
0.16593456268310547,
0.318535715341568,
0.38874220848083496,
0.14403168857097626,
-0.137770414352417,
-0.0985770896077156,
-0.30513995885849,
-0.04257652163505554,
-0.027940183877944946,
0.2118229866027832,
0.13058529794216156,
0.27704164385795593,
-0.03830120712518692,
0.19252850115299225,
0.11668576300144196,
0.30294039845466614,
-0.15848545730113983,
0.0730135440826416,
0.2584688663482666,
0.06777668744325638,
0.1999226212501526,
0.31099793314933777,
0.02507631853222847,
0.008409805595874786,
0.09602686762809753,
0.2334127128124237,
-0.008836301974952221,
-0.3319243788719177,
0.17782384157180786,
-0.0005199071019887924,
-0.3283202648162842,
-0.3775213360786438,
0.22168946266174316,
-0.07062653452157974,
0.0008002743124961853,
0.07719878852367401,
-0.1445855051279068,
-0.32025593519210815,
0.4568318724632263,
0.3248539865016937,
0.9603628516197205,
-0.2047731727361679,
0.02288079261779785,
0.5515077710151672,
0.3343585729598999,
0.17023012042045593,
0.2516013979911804,
0.3475595712661743,
-0.4718741476535797,
-0.09217891097068787,
-0.14088481664657593,
-0.22969576716423035,
0.20192137360572815,
-0.02684551477432251,
-0.4110286235809326,
0.11839847266674042,
-0.14434385299682617,
0.3145963251590729,
-0.2338850200176239,
-0.3149002492427826,
-0.12918305397033691,
-0.2588275372982025,
-0.4706278145313263,
0.10391619801521301,
-0.12018059194087982,
-0.007411196827888489,
0.16514262557029724,
-0.2497253268957138,
-0.08119523525238037,
-0.2637503147125244,
-0.2773401141166687,
0.2063969373703003,
-0.40266144275665283,
0.21071308851242065,
-0.030320998281240463,
-0.11380746215581894,
0.23171356320381165,
0.25259751081466675,
-0.03134142607450485,
0.13201726973056793,
-0.17394696176052094,
0.027213312685489655,
0.15941426157951355,
0.029142776504158974,
0.14455176889896393,
0.015006993897259235,
0.20392748713493347,
0.09721524268388748,
0.006433568894863129,
0.021572332829236984,
-0.02257302962243557,
-0.15433038771152496,
-0.0015654116868972778,
0.32169607281684875,
0.2244216799736023,
-0.4313400387763977,
-0.47075942158699036,
-0.12498646974563599,
0.0014197751879692078,
-0.19886359572410583,
0.07521723210811615,
-0.18757109344005585,
-0.06013386324048042,
0.32163265347480774,
0.14607678353786469,
-0.14516662061214447,
0.06301237642765045,
0.6949047446250916,
0.14302784204483032,
0.16101840138435364,
0.535739541053772,
0.21658705174922943,
-0.35652947425842285,
-0.21636998653411865,
0.2627696394920349,
0.303381085395813,
-0.39714932441711426,
0.23438258469104767,
-0.3357691764831543,
-0.20188631117343903,
0.10831085592508316,
0.2811531722545624,
0.12000612169504166,
0.09035748243331909,
-0.15641163289546967,
-0.4122020900249481,
-0.4198310673236847,
0.17138665914535522,
0.1433969885110855,
0.09554971754550934,
-0.37674155831336975,
0.21484580636024475,
-0.2926468551158905,
-0.2060178518295288,
-0.23929058015346527,
0.021869022399187088,
-0.28355878591537476,
0.26698923110961914,
-0.1716674417257309,
-0.0945427343249321,
0.128823384642601,
0.07541845738887787,
0.1603909134864807,
0.4157888889312744,
-0.4120408296585083,
-0.12063505500555038,
-0.1501016914844513,
0.10505130141973495,
0.0056757815182209015,
-0.19133368134498596,
-0.2977764308452606,
-0.4542927145957947,
-0.023036308586597443,
-0.3262811005115509,
-0.11756104230880737,
0.020911473780870438,
0.1565631628036499,
-0.2932961583137512,
0.2651991546154022,
-0.20178428292274475,
0.35277557373046875,
0.024639133363962173,
-0.2498714029788971,
0.06711959838867188,
-0.06850150227546692,
0.09569365531206131,
-0.003563829930499196,
0.09637081623077393,
-0.1570788025856018,
0.05552922189235687,
0.059792887419462204,
-0.09794642776250839,
0.5834735035896301,
-0.08335354924201965,
-0.04375339299440384,
0.26198744773864746,
0.3545265197753906,
0.07417094707489014,
-0.48074907064437866,
-0.08932119607925415,
-0.13729193806648254,
0.11806204915046692,
-0.2300703376531601,
0.06830701977014542,
0.5966580510139465,
0.2387942671775818,
0.03169294819235802,
0.4573737680912018,
0.24162238836288452,
-0.08906068652868271,
0.3024299144744873,
-0.0347747877240181,
0.6359614133834839,
-0.48130494356155396,
0.02394823543727398,
0.40539684891700745,
0.0641903430223465,
0.07527177035808563,
0.09152354300022125,
-0.0739700049161911,
0.5663989782333374,
0.2666180729866028,
-0.26067915558815,
0.09365154057741165,
0.2743178606033325,
-0.07124277949333191,
0.20125532150268555,
-0.3061095178127289,
0.16772665083408356,
0.46194636821746826,
-0.09581689536571503,
0.4015984535217285,
0.17039495706558228,
-0.1540968120098114,
-0.3585001230239868,
-0.29676225781440735,
-0.11757595092058182,
0.31423184275627136,
-0.34046924114227295,
0.04077804461121559,
0.09888485074043274,
-0.020929671823978424,
-0.39980241656303406,
-0.10252979397773743,
-0.13894224166870117,
0.14168775081634521,
0.4023679494857788,
0.12681373953819275,
0.1546400487422943,
-0.23003169894218445,
-0.07246886938810349,
-0.05564209073781967,
0.30411869287490845,
-0.32778942584991455,
0.3997337818145752,
0.032093219459056854,
0.07267184555530548,
0.08473128825426102,
0.11954343318939209,
0.26450395584106445,
0.4432668089866638,
-0.05426914617419243,
0.01196684967726469,
0.1794651448726654,
-0.15627983212471008,
-0.11826841533184052,
0.037823386490345,
-0.08878102898597717,
0.23354828357696533,
0.1632390022277832,
0.06324822455644608,
-0.0790853351354599,
0.16571415960788727,
0.11084422469139099,
0.3270159661769867,
0.08240337669849396,
0.19042125344276428,
-0.2574003040790558,
-0.263277530670166,
-0.06235723942518234,
-0.16973993182182312,
-0.32033777236938477,
0.28411853313446045,
0.12293754518032074,
-0.14556515216827393,
0.3020994961261749,
0.2291959524154663,
0.06562316417694092,
-0.04220860078930855,
0.1746315211057663,
0.22794994711875916,
-0.5005800724029541,
-0.3009427487850189,
-0.04509379714727402,
-0.33657535910606384,
0.3680582642555237,
-0.0707581490278244,
-0.0937560498714447,
0.3466912806034088,
0.2315429300069809,
0.1099514588713646,
-0.15935027599334717,
0.15326231718063354,
-0.3929293155670166,
0.09611616283655167,
0.4355095624923706,
-0.0781363844871521,
-0.3405891954898834,
0.2894132733345032,
0.030585167929530144,
0.041440509259700775,
-0.416569322347641,
0.19930538535118103,
-0.07922019064426422,
0.061334460973739624,
-0.28360849618911743,
-0.014647897332906723,
-0.37415602803230286,
-0.00658663734793663,
0.21156024932861328,
0.10779246687889099,
0.0968162938952446,
-0.1502680778503418,
-0.21088950335979462,
-0.18099990487098694,
-0.33042576909065247,
0.021901406347751617,
0.5457661151885986,
-0.04952755942940712,
0.5184245109558105,
-0.1682015359401703,
-0.017938368022441864,
-0.19543398916721344,
-0.22923602163791656,
-0.06061059981584549,
0.1554708182811737,
-0.2987593114376068,
0.31591084599494934,
-0.501916766166687,
0.297531396150589,
-0.07939596474170685,
0.11475986987352371,
0.2229052484035492,
0.344891756772995,
-0.09962659329175949,
-0.5675573348999023,
0.5995525121688843,
-0.5153388977050781,
-0.4363289773464203,
0.4475153386592865,
-0.057756051421165466,
-0.18304815888404846,
-0.047150179743766785,
-0.5951937437057495,
-0.20688870549201965,
0.32949960231781006,
-0.21770107746124268,
-0.14683805406093597,
-0.03748283535242081,
0.1716471016407013,
-0.15810920298099518,
-0.2017887383699417,
0.17938965559005737,
0.0818757489323616,
-0.20784509181976318,
0.10925774276256561,
-0.24823953211307526
] |
https://github.com/huggingface/datasets/issues/6280
|
Couldn't cast array of type fixed_size_list to Sequence(Value(float64))
|
This part of PyArrow is buggy and inconsistent regarding features implemented across the types, so the only option is to operate on the Arrow buffer level to fix issues such as the above one.
|
### Describe the bug
I have a dataset with an embedding column, when I try to map that dataset I get the following exception:
```
Traceback (most recent call last):
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 3189, in map
for rank, done, content in iflatmap_unordered(
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in iflatmap_unordered
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in <listcomp>
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/multiprocess/pool.py", line 774, in get
raise self._value
TypeError: Couldn't cast array of type
fixed_size_list<item: float>[2]
to
Sequence(feature=Value(dtype='float32', id=None), length=2, id=None)
```
### Steps to reproduce the bug
Here's a simple repro script:
```
from datasets import Features, Value, Sequence, ClassLabel, Dataset
dataset_features = Features({
'text': Value('string'),
'embedding': Sequence(Value('double'), length=2),
'categories': Sequence(ClassLabel(names=sorted([
'one',
'two',
'three'
]))),
})
dataset = Dataset.from_dict(
{
'text': ['A'] * 10000,
'embedding': [[0.0, 0.1]] * 10000,
'categories': [[0]] * 10000,
},
features=dataset_features
)
def test_mapper(r):
r['text'] = list(map(lambda t: t + ' b', r['text']))
return r
dataset = dataset.map(test_mapper, batched=True, batch_size=10, features=dataset_features, num_proc=2)
```
Removing the embedding column fixes the issue!
### Expected behavior
The mapping completes successfully.
### Environment info
- `datasets` version: 2.14.4
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.17.1
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
| 34
|
Couldn't cast array of type fixed_size_list to Sequence(Value(float64))
### Describe the bug
I have a dataset with an embedding column, when I try to map that dataset I get the following exception:
```
Traceback (most recent call last):
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 3189, in map
for rank, done, content in iflatmap_unordered(
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in iflatmap_unordered
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in <listcomp>
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/multiprocess/pool.py", line 774, in get
raise self._value
TypeError: Couldn't cast array of type
fixed_size_list<item: float>[2]
to
Sequence(feature=Value(dtype='float32', id=None), length=2, id=None)
```
### Steps to reproduce the bug
Here's a simple repro script:
```
from datasets import Features, Value, Sequence, ClassLabel, Dataset
dataset_features = Features({
'text': Value('string'),
'embedding': Sequence(Value('double'), length=2),
'categories': Sequence(ClassLabel(names=sorted([
'one',
'two',
'three'
]))),
})
dataset = Dataset.from_dict(
{
'text': ['A'] * 10000,
'embedding': [[0.0, 0.1]] * 10000,
'categories': [[0]] * 10000,
},
features=dataset_features
)
def test_mapper(r):
r['text'] = list(map(lambda t: t + ' b', r['text']))
return r
dataset = dataset.map(test_mapper, batched=True, batch_size=10, features=dataset_features, num_proc=2)
```
Removing the embedding column fixes the issue!
### Expected behavior
The mapping completes successfully.
### Environment info
- `datasets` version: 2.14.4
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.17.1
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
This part of PyArrow is buggy and inconsistent regarding features implemented across the types, so the only option is to operate on the Arrow buffer level to fix issues such as the above one.
|
[
-0.014731254428625107,
-0.6136934757232666,
0.010602861642837524,
0.060643985867500305,
0.6919259428977966,
0.2248995304107666,
0.3206327557563782,
0.5348024964332581,
0.30549949407577515,
0.07003726065158844,
0.22057761251926422,
0.4219731390476227,
-0.24774019420146942,
-0.15707002580165863,
0.040505386888980865,
-0.23436951637268066,
0.07567325234413147,
0.010080613195896149,
0.03399958834052086,
-0.039406321942806244,
-0.35026606917381287,
0.081868477165699,
-0.29146671295166016,
-0.223444864153862,
0.314170777797699,
-0.03663519024848938,
-0.04373841732740402,
-0.38770854473114014,
0.0672561526298523,
-0.41619232296943665,
0.08449363708496094,
-0.43734341859817505,
0.16730180382728577,
0.004733182489871979,
-0.00011924300633836538,
0.08766749501228333,
0.1676965057849884,
-0.09879814088344574,
0.02603955939412117,
-0.1415693610906601,
-0.44053763151168823,
-0.2952098548412323,
0.04407917708158493,
-0.27701064944267273,
-0.24402880668640137,
-0.1467573344707489,
-0.019603131338953972,
-0.8098945617675781,
0.16758671402931213,
0.2371261566877365,
0.17189830541610718,
0.26110824942588806,
-0.002237774431705475,
-0.24377429485321045,
0.0686192661523819,
-0.14582908153533936,
-0.306617796421051,
0.1637088656425476,
0.33646076917648315,
0.12783774733543396,
0.027302615344524384,
0.23677019774913788,
-0.18265585601329803,
0.07607284188270569,
0.33680057525634766,
-0.03157587721943855,
0.059087492525577545,
-0.3182338774204254,
-0.08692563325166702,
0.15453344583511353,
0.27571219205856323,
-0.12381986528635025,
-0.022917384281754494,
-0.1624118685722351,
0.12460257112979889,
-0.14329135417938232,
0.12495503574609756,
0.010871196165680885,
0.2186485230922699,
0.10180330276489258,
-0.34641432762145996,
0.22441785037517548,
-0.014149140566587448,
0.2016618251800537,
-0.13140001893043518,
0.10976375639438629,
-0.06367358565330505,
0.16458913683891296,
-0.0018363334238529205,
-0.34815746545791626,
-0.13462938368320465,
-0.023986201733350754,
0.10293440520763397,
0.2969152331352234,
-0.11079572141170502,
-0.22814972698688507,
0.15590527653694153,
-0.07476057857275009,
-0.0267403032630682,
-0.08730249106884003,
0.20437750220298767,
0.12169849127531052,
0.22203926742076874,
0.06769654899835587,
0.07590343803167343,
0.4233967959880829,
-0.23275884985923767,
0.4559181332588196,
0.031482696533203125,
0.3156639039516449,
-0.07851402461528778,
0.06594815105199814,
0.17569071054458618,
-0.09294233471155167,
0.0568045936524868,
0.25875669717788696,
0.10352006554603577,
-0.15227945148944855,
-0.3773175776004791,
0.3860527575016022,
-0.5588683485984802,
0.2980159521102905,
0.23258087038993835,
0.3453669548034668,
-0.075035959482193,
0.22007650136947632,
0.2516762614250183,
0.3283337354660034,
-0.006437147036194801,
0.06088694557547569,
-0.10444401949644089,
0.025493958964943886,
-0.12618587911128998,
-0.2272551953792572,
0.1644238829612732,
0.21453356742858887,
0.052063122391700745,
0.03576003760099411,
0.011563260108232498,
-0.19041037559509277,
-0.19717581570148468,
-0.1387435495853424,
0.4365048408508301,
0.2039531022310257,
-0.1931491494178772,
0.11611463874578476,
0.3769577443599701,
0.2547811269760132,
-0.14981111884117126,
0.20504334568977356,
-0.24341967701911926,
-0.004278901964426041,
-0.02105838619172573,
0.19224265217781067,
-0.06360705196857452,
0.1272566020488739,
0.02363843470811844,
0.038367390632629395,
0.517370343208313,
-0.1922570765018463,
0.08188378810882568,
-0.4570688009262085,
-0.21382345259189606,
-0.2897445857524872,
0.038629643619060516,
-0.023143157362937927,
-0.33412596583366394,
0.12389516830444336,
-0.16948387026786804,
0.2823229134082794,
0.15590296685695648,
0.19294074177742004,
-0.019073262810707092,
-0.0010111629962921143,
-0.273718923330307,
0.41722583770751953,
0.25710970163345337,
0.07342933118343353,
-0.33514586091041565,
0.08937692642211914,
-0.030404288321733475,
0.02813819609582424,
-0.1609465777873993,
0.17232292890548706,
0.511756420135498,
-0.20068705081939697,
0.012177728116512299,
0.15608102083206177,
-0.12181662023067474,
0.17046454548835754,
-0.2511322796344757,
-0.12890224158763885,
0.09742219746112823,
-0.05638226866722107,
-0.06688974797725677,
0.2145354151725769,
0.08106424659490585,
0.33297863602638245,
0.06835461407899857,
-0.18985314667224884,
0.20308533310890198,
0.4013608694076538,
0.2455705851316452,
-0.14664584398269653,
0.0906299501657486,
-0.32335829734802246,
-0.40215003490448,
0.09285611659288406,
0.12403205037117004,
-0.12915384769439697,
-0.321072518825531,
-0.029538707807660103,
-0.2911266088485718,
0.14850841462612152,
-0.1402667760848999,
0.36151498556137085,
0.05155498534440994,
-0.05767011642456055,
0.028665341436862946,
-0.0801025778055191,
-0.08805305510759354,
-0.21238099038600922,
0.004450241103768349,
-0.07399310916662216,
-0.45723479986190796,
0.3407265245914459,
-0.07629784941673279,
-0.24156427383422852,
-0.0008802004158496857,
0.2977248430252075,
0.30894649028778076,
-0.2554757595062256,
-0.18545368313789368,
0.06781291961669922,
-0.041490379720926285,
0.009058274328708649,
-0.6232643723487854,
0.08500423282384872,
0.3012893497943878,
-0.6093754768371582,
0.0168144591152668,
0.34024304151535034,
0.06993896514177322,
-0.0998348742723465,
-0.2596210241317749,
0.5482124090194702,
-0.06192648038268089,
0.4062560200691223,
-0.254375696182251,
0.18351323902606964,
0.05256068706512451,
-0.07758843898773193,
-0.03234099596738815,
-0.5320142507553101,
0.17091244459152222,
0.3235912322998047,
-0.026322273537516594,
-0.20230349898338318,
-0.20841120183467865,
0.23279032111167908,
0.4859599769115448,
0.08558833599090576,
0.06190422549843788,
0.05000009387731552,
0.03772636875510216,
0.17520660161972046,
0.08930481970310211,
-0.1362791508436203,
0.3572753965854645,
-0.020418841391801834,
0.037889182567596436,
0.044603366404771805,
-0.21189165115356445,
-0.1099216490983963,
0.13665126264095306,
-0.005046911537647247,
0.3001748323440552,
0.2518046796321869,
0.3552766740322113,
0.037704288959503174,
-0.02445206791162491,
0.020741228014230728,
0.013128802180290222,
0.27624428272247314,
-0.3450794517993927,
0.05359078198671341,
-0.5258973240852356,
0.24876496195793152,
-0.12870873510837555,
0.11654915660619736,
0.007003577426075935,
-0.6322688460350037,
-0.11840598285198212,
0.14199504256248474,
-0.25710809230804443,
0.2757342755794525,
-0.16970205307006836,
-0.21960388123989105,
0.38201701641082764,
-0.05450312793254852,
-0.13876532018184662,
-0.03586271405220032,
0.013407217338681221,
0.017696376889944077,
0.09255871921777725,
-0.19849245250225067,
0.32177433371543884,
0.2787436246871948,
-0.2712053656578064,
-0.19101257622241974,
-0.39830735325813293,
0.06002841517329216,
-0.2003207504749298,
0.034060291945934296,
0.4108078181743622,
0.368058979511261,
-0.1473231315612793,
-0.04006454721093178,
0.3677602708339691,
0.01731688715517521,
-0.13774250447750092,
0.16080830991268158,
0.04575479030609131,
0.017598485574126244,
-0.28233015537261963,
-0.21304073929786682,
-0.12929195165634155,
-0.33388546109199524,
0.03561500087380409,
-0.06704629957675934,
0.07861742377281189,
-0.1859048455953598,
0.3129889965057373,
0.11443745344877243,
0.2848217487335205,
-0.2604103982448578,
-0.08840668946504593,
0.5659740567207336,
0.3640984892845154,
-0.17837156355381012,
-0.27980944514274597,
-0.11245757341384888,
-0.25646188855171204,
-0.08369927108287811,
0.11429792642593384,
-0.37483304738998413,
-0.10828264057636261,
-0.2324381023645401,
-0.022000916302204132,
-0.13607153296470642,
-0.153074711561203,
0.13478896021842957,
0.018365712836384773,
-0.004631455987691879,
-0.21979433298110962,
-0.0384475514292717,
0.08611489087343216,
0.24986928701400757,
0.11057387292385101,
0.16714122891426086,
0.7291284799575806,
0.20367127656936646,
0.15184161067008972,
0.42981451749801636,
-0.2774938941001892,
0.4726236164569855,
-0.13884826004505157,
-0.06110120192170143,
-0.27154892683029175,
-0.28269991278648376,
0.005534481257200241,
0.06626901030540466,
-0.0678483247756958,
0.018075570464134216,
-0.28966790437698364,
-0.35297852754592896,
0.2551819980144501,
0.24507054686546326,
0.3975539803504944,
-0.1749134063720703,
0.35078489780426025,
-0.16410009562969208,
0.12556758522987366,
0.07956588268280029,
0.08357102423906326,
-0.1891094297170639,
-0.3008703887462616,
-0.08740715682506561,
-0.2721714973449707,
-0.016251511871814728,
-0.12653054296970367,
-0.12958593666553497,
-0.4357060492038727,
-0.16920116543769836,
0.44904226064682007,
0.3664800822734833,
0.4590904116630554,
-0.16145332157611847,
-0.11302096396684647,
0.1483469009399414,
0.02531789056956768,
0.48168182373046875,
-0.44076696038246155,
0.1416146457195282,
0.14679060876369476,
0.3611714541912079,
-0.34385040402412415,
0.02483781799674034,
-0.18431422114372253,
0.19145742058753967,
0.08627581596374512,
0.5145983695983887,
-0.3198578953742981,
0.14650948345661163,
0.3520376682281494,
0.19267569482326508,
-0.010515138506889343,
-0.04954130947589874,
-0.18655376136302948,
-0.2341597080230713,
-0.21600282192230225,
0.16593456268310547,
0.318535715341568,
0.38874220848083496,
0.14403168857097626,
-0.137770414352417,
-0.0985770896077156,
-0.30513995885849,
-0.04257652163505554,
-0.027940183877944946,
0.2118229866027832,
0.13058529794216156,
0.27704164385795593,
-0.03830120712518692,
0.19252850115299225,
0.11668576300144196,
0.30294039845466614,
-0.15848545730113983,
0.0730135440826416,
0.2584688663482666,
0.06777668744325638,
0.1999226212501526,
0.31099793314933777,
0.02507631853222847,
0.008409805595874786,
0.09602686762809753,
0.2334127128124237,
-0.008836301974952221,
-0.3319243788719177,
0.17782384157180786,
-0.0005199071019887924,
-0.3283202648162842,
-0.3775213360786438,
0.22168946266174316,
-0.07062653452157974,
0.0008002743124961853,
0.07719878852367401,
-0.1445855051279068,
-0.32025593519210815,
0.4568318724632263,
0.3248539865016937,
0.9603628516197205,
-0.2047731727361679,
0.02288079261779785,
0.5515077710151672,
0.3343585729598999,
0.17023012042045593,
0.2516013979911804,
0.3475595712661743,
-0.4718741476535797,
-0.09217891097068787,
-0.14088481664657593,
-0.22969576716423035,
0.20192137360572815,
-0.02684551477432251,
-0.4110286235809326,
0.11839847266674042,
-0.14434385299682617,
0.3145963251590729,
-0.2338850200176239,
-0.3149002492427826,
-0.12918305397033691,
-0.2588275372982025,
-0.4706278145313263,
0.10391619801521301,
-0.12018059194087982,
-0.007411196827888489,
0.16514262557029724,
-0.2497253268957138,
-0.08119523525238037,
-0.2637503147125244,
-0.2773401141166687,
0.2063969373703003,
-0.40266144275665283,
0.21071308851242065,
-0.030320998281240463,
-0.11380746215581894,
0.23171356320381165,
0.25259751081466675,
-0.03134142607450485,
0.13201726973056793,
-0.17394696176052094,
0.027213312685489655,
0.15941426157951355,
0.029142776504158974,
0.14455176889896393,
0.015006993897259235,
0.20392748713493347,
0.09721524268388748,
0.006433568894863129,
0.021572332829236984,
-0.02257302962243557,
-0.15433038771152496,
-0.0015654116868972778,
0.32169607281684875,
0.2244216799736023,
-0.4313400387763977,
-0.47075942158699036,
-0.12498646974563599,
0.0014197751879692078,
-0.19886359572410583,
0.07521723210811615,
-0.18757109344005585,
-0.06013386324048042,
0.32163265347480774,
0.14607678353786469,
-0.14516662061214447,
0.06301237642765045,
0.6949047446250916,
0.14302784204483032,
0.16101840138435364,
0.535739541053772,
0.21658705174922943,
-0.35652947425842285,
-0.21636998653411865,
0.2627696394920349,
0.303381085395813,
-0.39714932441711426,
0.23438258469104767,
-0.3357691764831543,
-0.20188631117343903,
0.10831085592508316,
0.2811531722545624,
0.12000612169504166,
0.09035748243331909,
-0.15641163289546967,
-0.4122020900249481,
-0.4198310673236847,
0.17138665914535522,
0.1433969885110855,
0.09554971754550934,
-0.37674155831336975,
0.21484580636024475,
-0.2926468551158905,
-0.2060178518295288,
-0.23929058015346527,
0.021869022399187088,
-0.28355878591537476,
0.26698923110961914,
-0.1716674417257309,
-0.0945427343249321,
0.128823384642601,
0.07541845738887787,
0.1603909134864807,
0.4157888889312744,
-0.4120408296585083,
-0.12063505500555038,
-0.1501016914844513,
0.10505130141973495,
0.0056757815182209015,
-0.19133368134498596,
-0.2977764308452606,
-0.4542927145957947,
-0.023036308586597443,
-0.3262811005115509,
-0.11756104230880737,
0.020911473780870438,
0.1565631628036499,
-0.2932961583137512,
0.2651991546154022,
-0.20178428292274475,
0.35277557373046875,
0.024639133363962173,
-0.2498714029788971,
0.06711959838867188,
-0.06850150227546692,
0.09569365531206131,
-0.003563829930499196,
0.09637081623077393,
-0.1570788025856018,
0.05552922189235687,
0.059792887419462204,
-0.09794642776250839,
0.5834735035896301,
-0.08335354924201965,
-0.04375339299440384,
0.26198744773864746,
0.3545265197753906,
0.07417094707489014,
-0.48074907064437866,
-0.08932119607925415,
-0.13729193806648254,
0.11806204915046692,
-0.2300703376531601,
0.06830701977014542,
0.5966580510139465,
0.2387942671775818,
0.03169294819235802,
0.4573737680912018,
0.24162238836288452,
-0.08906068652868271,
0.3024299144744873,
-0.0347747877240181,
0.6359614133834839,
-0.48130494356155396,
0.02394823543727398,
0.40539684891700745,
0.0641903430223465,
0.07527177035808563,
0.09152354300022125,
-0.0739700049161911,
0.5663989782333374,
0.2666180729866028,
-0.26067915558815,
0.09365154057741165,
0.2743178606033325,
-0.07124277949333191,
0.20125532150268555,
-0.3061095178127289,
0.16772665083408356,
0.46194636821746826,
-0.09581689536571503,
0.4015984535217285,
0.17039495706558228,
-0.1540968120098114,
-0.3585001230239868,
-0.29676225781440735,
-0.11757595092058182,
0.31423184275627136,
-0.34046924114227295,
0.04077804461121559,
0.09888485074043274,
-0.020929671823978424,
-0.39980241656303406,
-0.10252979397773743,
-0.13894224166870117,
0.14168775081634521,
0.4023679494857788,
0.12681373953819275,
0.1546400487422943,
-0.23003169894218445,
-0.07246886938810349,
-0.05564209073781967,
0.30411869287490845,
-0.32778942584991455,
0.3997337818145752,
0.032093219459056854,
0.07267184555530548,
0.08473128825426102,
0.11954343318939209,
0.26450395584106445,
0.4432668089866638,
-0.05426914617419243,
0.01196684967726469,
0.1794651448726654,
-0.15627983212471008,
-0.11826841533184052,
0.037823386490345,
-0.08878102898597717,
0.23354828357696533,
0.1632390022277832,
0.06324822455644608,
-0.0790853351354599,
0.16571415960788727,
0.11084422469139099,
0.3270159661769867,
0.08240337669849396,
0.19042125344276428,
-0.2574003040790558,
-0.263277530670166,
-0.06235723942518234,
-0.16973993182182312,
-0.32033777236938477,
0.28411853313446045,
0.12293754518032074,
-0.14556515216827393,
0.3020994961261749,
0.2291959524154663,
0.06562316417694092,
-0.04220860078930855,
0.1746315211057663,
0.22794994711875916,
-0.5005800724029541,
-0.3009427487850189,
-0.04509379714727402,
-0.33657535910606384,
0.3680582642555237,
-0.0707581490278244,
-0.0937560498714447,
0.3466912806034088,
0.2315429300069809,
0.1099514588713646,
-0.15935027599334717,
0.15326231718063354,
-0.3929293155670166,
0.09611616283655167,
0.4355095624923706,
-0.0781363844871521,
-0.3405891954898834,
0.2894132733345032,
0.030585167929530144,
0.041440509259700775,
-0.416569322347641,
0.19930538535118103,
-0.07922019064426422,
0.061334460973739624,
-0.28360849618911743,
-0.014647897332906723,
-0.37415602803230286,
-0.00658663734793663,
0.21156024932861328,
0.10779246687889099,
0.0968162938952446,
-0.1502680778503418,
-0.21088950335979462,
-0.18099990487098694,
-0.33042576909065247,
0.021901406347751617,
0.5457661151885986,
-0.04952755942940712,
0.5184245109558105,
-0.1682015359401703,
-0.017938368022441864,
-0.19543398916721344,
-0.22923602163791656,
-0.06061059981584549,
0.1554708182811737,
-0.2987593114376068,
0.31591084599494934,
-0.501916766166687,
0.297531396150589,
-0.07939596474170685,
0.11475986987352371,
0.2229052484035492,
0.344891756772995,
-0.09962659329175949,
-0.5675573348999023,
0.5995525121688843,
-0.5153388977050781,
-0.4363289773464203,
0.4475153386592865,
-0.057756051421165466,
-0.18304815888404846,
-0.047150179743766785,
-0.5951937437057495,
-0.20688870549201965,
0.32949960231781006,
-0.21770107746124268,
-0.14683805406093597,
-0.03748283535242081,
0.1716471016407013,
-0.15810920298099518,
-0.2017887383699417,
0.17938965559005737,
0.0818757489323616,
-0.20784509181976318,
0.10925774276256561,
-0.24823953211307526
] |
https://github.com/huggingface/datasets/issues/6280
|
Couldn't cast array of type fixed_size_list to Sequence(Value(float64))
|
Ok - can you take the POC I did [here](https://github.com/huggingface/datasets/commit/15443098e9ce053943172f7ec6fce3769d7dff6e)? Happy to turn this into an actual PR but would appreciate feedback on the implementation before I take another pass!
|
### Describe the bug
I have a dataset with an embedding column, when I try to map that dataset I get the following exception:
```
Traceback (most recent call last):
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 3189, in map
for rank, done, content in iflatmap_unordered(
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in iflatmap_unordered
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in <listcomp>
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/multiprocess/pool.py", line 774, in get
raise self._value
TypeError: Couldn't cast array of type
fixed_size_list<item: float>[2]
to
Sequence(feature=Value(dtype='float32', id=None), length=2, id=None)
```
### Steps to reproduce the bug
Here's a simple repro script:
```
from datasets import Features, Value, Sequence, ClassLabel, Dataset
dataset_features = Features({
'text': Value('string'),
'embedding': Sequence(Value('double'), length=2),
'categories': Sequence(ClassLabel(names=sorted([
'one',
'two',
'three'
]))),
})
dataset = Dataset.from_dict(
{
'text': ['A'] * 10000,
'embedding': [[0.0, 0.1]] * 10000,
'categories': [[0]] * 10000,
},
features=dataset_features
)
def test_mapper(r):
r['text'] = list(map(lambda t: t + ' b', r['text']))
return r
dataset = dataset.map(test_mapper, batched=True, batch_size=10, features=dataset_features, num_proc=2)
```
Removing the embedding column fixes the issue!
### Expected behavior
The mapping completes successfully.
### Environment info
- `datasets` version: 2.14.4
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.17.1
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
| 30
|
Couldn't cast array of type fixed_size_list to Sequence(Value(float64))
### Describe the bug
I have a dataset with an embedding column, when I try to map that dataset I get the following exception:
```
Traceback (most recent call last):
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 3189, in map
for rank, done, content in iflatmap_unordered(
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in iflatmap_unordered
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1387, in <listcomp>
[async_result.get(timeout=0.05) for async_result in async_results]
File "/Users/jmif/.virtualenvs/llm-training/lib/python3.10/site-packages/multiprocess/pool.py", line 774, in get
raise self._value
TypeError: Couldn't cast array of type
fixed_size_list<item: float>[2]
to
Sequence(feature=Value(dtype='float32', id=None), length=2, id=None)
```
### Steps to reproduce the bug
Here's a simple repro script:
```
from datasets import Features, Value, Sequence, ClassLabel, Dataset
dataset_features = Features({
'text': Value('string'),
'embedding': Sequence(Value('double'), length=2),
'categories': Sequence(ClassLabel(names=sorted([
'one',
'two',
'three'
]))),
})
dataset = Dataset.from_dict(
{
'text': ['A'] * 10000,
'embedding': [[0.0, 0.1]] * 10000,
'categories': [[0]] * 10000,
},
features=dataset_features
)
def test_mapper(r):
r['text'] = list(map(lambda t: t + ' b', r['text']))
return r
dataset = dataset.map(test_mapper, batched=True, batch_size=10, features=dataset_features, num_proc=2)
```
Removing the embedding column fixes the issue!
### Expected behavior
The mapping completes successfully.
### Environment info
- `datasets` version: 2.14.4
- Platform: macOS-14.0-arm64-arm-64bit
- Python version: 3.10.12
- Huggingface_hub version: 0.17.1
- PyArrow version: 13.0.0
- Pandas version: 2.0.3
Ok - can you take the POC I did [here](https://github.com/huggingface/datasets/commit/15443098e9ce053943172f7ec6fce3769d7dff6e)? Happy to turn this into an actual PR but would appreciate feedback on the implementation before I take another pass!
|
[
-0.014731254428625107,
-0.6136934757232666,
0.010602861642837524,
0.060643985867500305,
0.6919259428977966,
0.2248995304107666,
0.3206327557563782,
0.5348024964332581,
0.30549949407577515,
0.07003726065158844,
0.22057761251926422,
0.4219731390476227,
-0.24774019420146942,
-0.15707002580165863,
0.040505386888980865,
-0.23436951637268066,
0.07567325234413147,
0.010080613195896149,
0.03399958834052086,
-0.039406321942806244,
-0.35026606917381287,
0.081868477165699,
-0.29146671295166016,
-0.223444864153862,
0.314170777797699,
-0.03663519024848938,
-0.04373841732740402,
-0.38770854473114014,
0.0672561526298523,
-0.41619232296943665,
0.08449363708496094,
-0.43734341859817505,
0.16730180382728577,
0.004733182489871979,
-0.00011924300633836538,
0.08766749501228333,
0.1676965057849884,
-0.09879814088344574,
0.02603955939412117,
-0.1415693610906601,
-0.44053763151168823,
-0.2952098548412323,
0.04407917708158493,
-0.27701064944267273,
-0.24402880668640137,
-0.1467573344707489,
-0.019603131338953972,
-0.8098945617675781,
0.16758671402931213,
0.2371261566877365,
0.17189830541610718,
0.26110824942588806,
-0.002237774431705475,
-0.24377429485321045,
0.0686192661523819,
-0.14582908153533936,
-0.306617796421051,
0.1637088656425476,
0.33646076917648315,
0.12783774733543396,
0.027302615344524384,
0.23677019774913788,
-0.18265585601329803,
0.07607284188270569,
0.33680057525634766,
-0.03157587721943855,
0.059087492525577545,
-0.3182338774204254,
-0.08692563325166702,
0.15453344583511353,
0.27571219205856323,
-0.12381986528635025,
-0.022917384281754494,
-0.1624118685722351,
0.12460257112979889,
-0.14329135417938232,
0.12495503574609756,
0.010871196165680885,
0.2186485230922699,
0.10180330276489258,
-0.34641432762145996,
0.22441785037517548,
-0.014149140566587448,
0.2016618251800537,
-0.13140001893043518,
0.10976375639438629,
-0.06367358565330505,
0.16458913683891296,
-0.0018363334238529205,
-0.34815746545791626,
-0.13462938368320465,
-0.023986201733350754,
0.10293440520763397,
0.2969152331352234,
-0.11079572141170502,
-0.22814972698688507,
0.15590527653694153,
-0.07476057857275009,
-0.0267403032630682,
-0.08730249106884003,
0.20437750220298767,
0.12169849127531052,
0.22203926742076874,
0.06769654899835587,
0.07590343803167343,
0.4233967959880829,
-0.23275884985923767,
0.4559181332588196,
0.031482696533203125,
0.3156639039516449,
-0.07851402461528778,
0.06594815105199814,
0.17569071054458618,
-0.09294233471155167,
0.0568045936524868,
0.25875669717788696,
0.10352006554603577,
-0.15227945148944855,
-0.3773175776004791,
0.3860527575016022,
-0.5588683485984802,
0.2980159521102905,
0.23258087038993835,
0.3453669548034668,
-0.075035959482193,
0.22007650136947632,
0.2516762614250183,
0.3283337354660034,
-0.006437147036194801,
0.06088694557547569,
-0.10444401949644089,
0.025493958964943886,
-0.12618587911128998,
-0.2272551953792572,
0.1644238829612732,
0.21453356742858887,
0.052063122391700745,
0.03576003760099411,
0.011563260108232498,
-0.19041037559509277,
-0.19717581570148468,
-0.1387435495853424,
0.4365048408508301,
0.2039531022310257,
-0.1931491494178772,
0.11611463874578476,
0.3769577443599701,
0.2547811269760132,
-0.14981111884117126,
0.20504334568977356,
-0.24341967701911926,
-0.004278901964426041,
-0.02105838619172573,
0.19224265217781067,
-0.06360705196857452,
0.1272566020488739,
0.02363843470811844,
0.038367390632629395,
0.517370343208313,
-0.1922570765018463,
0.08188378810882568,
-0.4570688009262085,
-0.21382345259189606,
-0.2897445857524872,
0.038629643619060516,
-0.023143157362937927,
-0.33412596583366394,
0.12389516830444336,
-0.16948387026786804,
0.2823229134082794,
0.15590296685695648,
0.19294074177742004,
-0.019073262810707092,
-0.0010111629962921143,
-0.273718923330307,
0.41722583770751953,
0.25710970163345337,
0.07342933118343353,
-0.33514586091041565,
0.08937692642211914,
-0.030404288321733475,
0.02813819609582424,
-0.1609465777873993,
0.17232292890548706,
0.511756420135498,
-0.20068705081939697,
0.012177728116512299,
0.15608102083206177,
-0.12181662023067474,
0.17046454548835754,
-0.2511322796344757,
-0.12890224158763885,
0.09742219746112823,
-0.05638226866722107,
-0.06688974797725677,
0.2145354151725769,
0.08106424659490585,
0.33297863602638245,
0.06835461407899857,
-0.18985314667224884,
0.20308533310890198,
0.4013608694076538,
0.2455705851316452,
-0.14664584398269653,
0.0906299501657486,
-0.32335829734802246,
-0.40215003490448,
0.09285611659288406,
0.12403205037117004,
-0.12915384769439697,
-0.321072518825531,
-0.029538707807660103,
-0.2911266088485718,
0.14850841462612152,
-0.1402667760848999,
0.36151498556137085,
0.05155498534440994,
-0.05767011642456055,
0.028665341436862946,
-0.0801025778055191,
-0.08805305510759354,
-0.21238099038600922,
0.004450241103768349,
-0.07399310916662216,
-0.45723479986190796,
0.3407265245914459,
-0.07629784941673279,
-0.24156427383422852,
-0.0008802004158496857,
0.2977248430252075,
0.30894649028778076,
-0.2554757595062256,
-0.18545368313789368,
0.06781291961669922,
-0.041490379720926285,
0.009058274328708649,
-0.6232643723487854,
0.08500423282384872,
0.3012893497943878,
-0.6093754768371582,
0.0168144591152668,
0.34024304151535034,
0.06993896514177322,
-0.0998348742723465,
-0.2596210241317749,
0.5482124090194702,
-0.06192648038268089,
0.4062560200691223,
-0.254375696182251,
0.18351323902606964,
0.05256068706512451,
-0.07758843898773193,
-0.03234099596738815,
-0.5320142507553101,
0.17091244459152222,
0.3235912322998047,
-0.026322273537516594,
-0.20230349898338318,
-0.20841120183467865,
0.23279032111167908,
0.4859599769115448,
0.08558833599090576,
0.06190422549843788,
0.05000009387731552,
0.03772636875510216,
0.17520660161972046,
0.08930481970310211,
-0.1362791508436203,
0.3572753965854645,
-0.020418841391801834,
0.037889182567596436,
0.044603366404771805,
-0.21189165115356445,
-0.1099216490983963,
0.13665126264095306,
-0.005046911537647247,
0.3001748323440552,
0.2518046796321869,
0.3552766740322113,
0.037704288959503174,
-0.02445206791162491,
0.020741228014230728,
0.013128802180290222,
0.27624428272247314,
-0.3450794517993927,
0.05359078198671341,
-0.5258973240852356,
0.24876496195793152,
-0.12870873510837555,
0.11654915660619736,
0.007003577426075935,
-0.6322688460350037,
-0.11840598285198212,
0.14199504256248474,
-0.25710809230804443,
0.2757342755794525,
-0.16970205307006836,
-0.21960388123989105,
0.38201701641082764,
-0.05450312793254852,
-0.13876532018184662,
-0.03586271405220032,
0.013407217338681221,
0.017696376889944077,
0.09255871921777725,
-0.19849245250225067,
0.32177433371543884,
0.2787436246871948,
-0.2712053656578064,
-0.19101257622241974,
-0.39830735325813293,
0.06002841517329216,
-0.2003207504749298,
0.034060291945934296,
0.4108078181743622,
0.368058979511261,
-0.1473231315612793,
-0.04006454721093178,
0.3677602708339691,
0.01731688715517521,
-0.13774250447750092,
0.16080830991268158,
0.04575479030609131,
0.017598485574126244,
-0.28233015537261963,
-0.21304073929786682,
-0.12929195165634155,
-0.33388546109199524,
0.03561500087380409,
-0.06704629957675934,
0.07861742377281189,
-0.1859048455953598,
0.3129889965057373,
0.11443745344877243,
0.2848217487335205,
-0.2604103982448578,
-0.08840668946504593,
0.5659740567207336,
0.3640984892845154,
-0.17837156355381012,
-0.27980944514274597,
-0.11245757341384888,
-0.25646188855171204,
-0.08369927108287811,
0.11429792642593384,
-0.37483304738998413,
-0.10828264057636261,
-0.2324381023645401,
-0.022000916302204132,
-0.13607153296470642,
-0.153074711561203,
0.13478896021842957,
0.018365712836384773,
-0.004631455987691879,
-0.21979433298110962,
-0.0384475514292717,
0.08611489087343216,
0.24986928701400757,
0.11057387292385101,
0.16714122891426086,
0.7291284799575806,
0.20367127656936646,
0.15184161067008972,
0.42981451749801636,
-0.2774938941001892,
0.4726236164569855,
-0.13884826004505157,
-0.06110120192170143,
-0.27154892683029175,
-0.28269991278648376,
0.005534481257200241,
0.06626901030540466,
-0.0678483247756958,
0.018075570464134216,
-0.28966790437698364,
-0.35297852754592896,
0.2551819980144501,
0.24507054686546326,
0.3975539803504944,
-0.1749134063720703,
0.35078489780426025,
-0.16410009562969208,
0.12556758522987366,
0.07956588268280029,
0.08357102423906326,
-0.1891094297170639,
-0.3008703887462616,
-0.08740715682506561,
-0.2721714973449707,
-0.016251511871814728,
-0.12653054296970367,
-0.12958593666553497,
-0.4357060492038727,
-0.16920116543769836,
0.44904226064682007,
0.3664800822734833,
0.4590904116630554,
-0.16145332157611847,
-0.11302096396684647,
0.1483469009399414,
0.02531789056956768,
0.48168182373046875,
-0.44076696038246155,
0.1416146457195282,
0.14679060876369476,
0.3611714541912079,
-0.34385040402412415,
0.02483781799674034,
-0.18431422114372253,
0.19145742058753967,
0.08627581596374512,
0.5145983695983887,
-0.3198578953742981,
0.14650948345661163,
0.3520376682281494,
0.19267569482326508,
-0.010515138506889343,
-0.04954130947589874,
-0.18655376136302948,
-0.2341597080230713,
-0.21600282192230225,
0.16593456268310547,
0.318535715341568,
0.38874220848083496,
0.14403168857097626,
-0.137770414352417,
-0.0985770896077156,
-0.30513995885849,
-0.04257652163505554,
-0.027940183877944946,
0.2118229866027832,
0.13058529794216156,
0.27704164385795593,
-0.03830120712518692,
0.19252850115299225,
0.11668576300144196,
0.30294039845466614,
-0.15848545730113983,
0.0730135440826416,
0.2584688663482666,
0.06777668744325638,
0.1999226212501526,
0.31099793314933777,
0.02507631853222847,
0.008409805595874786,
0.09602686762809753,
0.2334127128124237,
-0.008836301974952221,
-0.3319243788719177,
0.17782384157180786,
-0.0005199071019887924,
-0.3283202648162842,
-0.3775213360786438,
0.22168946266174316,
-0.07062653452157974,
0.0008002743124961853,
0.07719878852367401,
-0.1445855051279068,
-0.32025593519210815,
0.4568318724632263,
0.3248539865016937,
0.9603628516197205,
-0.2047731727361679,
0.02288079261779785,
0.5515077710151672,
0.3343585729598999,
0.17023012042045593,
0.2516013979911804,
0.3475595712661743,
-0.4718741476535797,
-0.09217891097068787,
-0.14088481664657593,
-0.22969576716423035,
0.20192137360572815,
-0.02684551477432251,
-0.4110286235809326,
0.11839847266674042,
-0.14434385299682617,
0.3145963251590729,
-0.2338850200176239,
-0.3149002492427826,
-0.12918305397033691,
-0.2588275372982025,
-0.4706278145313263,
0.10391619801521301,
-0.12018059194087982,
-0.007411196827888489,
0.16514262557029724,
-0.2497253268957138,
-0.08119523525238037,
-0.2637503147125244,
-0.2773401141166687,
0.2063969373703003,
-0.40266144275665283,
0.21071308851242065,
-0.030320998281240463,
-0.11380746215581894,
0.23171356320381165,
0.25259751081466675,
-0.03134142607450485,
0.13201726973056793,
-0.17394696176052094,
0.027213312685489655,
0.15941426157951355,
0.029142776504158974,
0.14455176889896393,
0.015006993897259235,
0.20392748713493347,
0.09721524268388748,
0.006433568894863129,
0.021572332829236984,
-0.02257302962243557,
-0.15433038771152496,
-0.0015654116868972778,
0.32169607281684875,
0.2244216799736023,
-0.4313400387763977,
-0.47075942158699036,
-0.12498646974563599,
0.0014197751879692078,
-0.19886359572410583,
0.07521723210811615,
-0.18757109344005585,
-0.06013386324048042,
0.32163265347480774,
0.14607678353786469,
-0.14516662061214447,
0.06301237642765045,
0.6949047446250916,
0.14302784204483032,
0.16101840138435364,
0.535739541053772,
0.21658705174922943,
-0.35652947425842285,
-0.21636998653411865,
0.2627696394920349,
0.303381085395813,
-0.39714932441711426,
0.23438258469104767,
-0.3357691764831543,
-0.20188631117343903,
0.10831085592508316,
0.2811531722545624,
0.12000612169504166,
0.09035748243331909,
-0.15641163289546967,
-0.4122020900249481,
-0.4198310673236847,
0.17138665914535522,
0.1433969885110855,
0.09554971754550934,
-0.37674155831336975,
0.21484580636024475,
-0.2926468551158905,
-0.2060178518295288,
-0.23929058015346527,
0.021869022399187088,
-0.28355878591537476,
0.26698923110961914,
-0.1716674417257309,
-0.0945427343249321,
0.128823384642601,
0.07541845738887787,
0.1603909134864807,
0.4157888889312744,
-0.4120408296585083,
-0.12063505500555038,
-0.1501016914844513,
0.10505130141973495,
0.0056757815182209015,
-0.19133368134498596,
-0.2977764308452606,
-0.4542927145957947,
-0.023036308586597443,
-0.3262811005115509,
-0.11756104230880737,
0.020911473780870438,
0.1565631628036499,
-0.2932961583137512,
0.2651991546154022,
-0.20178428292274475,
0.35277557373046875,
0.024639133363962173,
-0.2498714029788971,
0.06711959838867188,
-0.06850150227546692,
0.09569365531206131,
-0.003563829930499196,
0.09637081623077393,
-0.1570788025856018,
0.05552922189235687,
0.059792887419462204,
-0.09794642776250839,
0.5834735035896301,
-0.08335354924201965,
-0.04375339299440384,
0.26198744773864746,
0.3545265197753906,
0.07417094707489014,
-0.48074907064437866,
-0.08932119607925415,
-0.13729193806648254,
0.11806204915046692,
-0.2300703376531601,
0.06830701977014542,
0.5966580510139465,
0.2387942671775818,
0.03169294819235802,
0.4573737680912018,
0.24162238836288452,
-0.08906068652868271,
0.3024299144744873,
-0.0347747877240181,
0.6359614133834839,
-0.48130494356155396,
0.02394823543727398,
0.40539684891700745,
0.0641903430223465,
0.07527177035808563,
0.09152354300022125,
-0.0739700049161911,
0.5663989782333374,
0.2666180729866028,
-0.26067915558815,
0.09365154057741165,
0.2743178606033325,
-0.07124277949333191,
0.20125532150268555,
-0.3061095178127289,
0.16772665083408356,
0.46194636821746826,
-0.09581689536571503,
0.4015984535217285,
0.17039495706558228,
-0.1540968120098114,
-0.3585001230239868,
-0.29676225781440735,
-0.11757595092058182,
0.31423184275627136,
-0.34046924114227295,
0.04077804461121559,
0.09888485074043274,
-0.020929671823978424,
-0.39980241656303406,
-0.10252979397773743,
-0.13894224166870117,
0.14168775081634521,
0.4023679494857788,
0.12681373953819275,
0.1546400487422943,
-0.23003169894218445,
-0.07246886938810349,
-0.05564209073781967,
0.30411869287490845,
-0.32778942584991455,
0.3997337818145752,
0.032093219459056854,
0.07267184555530548,
0.08473128825426102,
0.11954343318939209,
0.26450395584106445,
0.4432668089866638,
-0.05426914617419243,
0.01196684967726469,
0.1794651448726654,
-0.15627983212471008,
-0.11826841533184052,
0.037823386490345,
-0.08878102898597717,
0.23354828357696533,
0.1632390022277832,
0.06324822455644608,
-0.0790853351354599,
0.16571415960788727,
0.11084422469139099,
0.3270159661769867,
0.08240337669849396,
0.19042125344276428,
-0.2574003040790558,
-0.263277530670166,
-0.06235723942518234,
-0.16973993182182312,
-0.32033777236938477,
0.28411853313446045,
0.12293754518032074,
-0.14556515216827393,
0.3020994961261749,
0.2291959524154663,
0.06562316417694092,
-0.04220860078930855,
0.1746315211057663,
0.22794994711875916,
-0.5005800724029541,
-0.3009427487850189,
-0.04509379714727402,
-0.33657535910606384,
0.3680582642555237,
-0.0707581490278244,
-0.0937560498714447,
0.3466912806034088,
0.2315429300069809,
0.1099514588713646,
-0.15935027599334717,
0.15326231718063354,
-0.3929293155670166,
0.09611616283655167,
0.4355095624923706,
-0.0781363844871521,
-0.3405891954898834,
0.2894132733345032,
0.030585167929530144,
0.041440509259700775,
-0.416569322347641,
0.19930538535118103,
-0.07922019064426422,
0.061334460973739624,
-0.28360849618911743,
-0.014647897332906723,
-0.37415602803230286,
-0.00658663734793663,
0.21156024932861328,
0.10779246687889099,
0.0968162938952446,
-0.1502680778503418,
-0.21088950335979462,
-0.18099990487098694,
-0.33042576909065247,
0.021901406347751617,
0.5457661151885986,
-0.04952755942940712,
0.5184245109558105,
-0.1682015359401703,
-0.017938368022441864,
-0.19543398916721344,
-0.22923602163791656,
-0.06061059981584549,
0.1554708182811737,
-0.2987593114376068,
0.31591084599494934,
-0.501916766166687,
0.297531396150589,
-0.07939596474170685,
0.11475986987352371,
0.2229052484035492,
0.344891756772995,
-0.09962659329175949,
-0.5675573348999023,
0.5995525121688843,
-0.5153388977050781,
-0.4363289773464203,
0.4475153386592865,
-0.057756051421165466,
-0.18304815888404846,
-0.047150179743766785,
-0.5951937437057495,
-0.20688870549201965,
0.32949960231781006,
-0.21770107746124268,
-0.14683805406093597,
-0.03748283535242081,
0.1716471016407013,
-0.15810920298099518,
-0.2017887383699417,
0.17938965559005737,
0.0818757489323616,
-0.20784509181976318,
0.10925774276256561,
-0.24823953211307526
] |
https://github.com/huggingface/datasets/issues/6279
|
Batched IterableDataset
|
This is exactly what I was looking for. It would also be very useful for me :-)
|
### Feature request
Hi,
could you add an implementation of a batched `IterableDataset`. It already support an option to do batch iteration via `.iter(batch_size=...)` but this cannot be used in combination with a torch `DataLoader` since it just returns an iterator.
### Motivation
The current implementation loads each element of a batch individually which can be very slow in cases of a big batch_size. I did some experiments [here](https://discuss.huggingface.co/t/slow-dataloader-with-big-batch-size/57224) and using a batched iteration would speed up data loading significantly.
### Your contribution
N/A
| 17
|
Batched IterableDataset
### Feature request
Hi,
could you add an implementation of a batched `IterableDataset`. It already support an option to do batch iteration via `.iter(batch_size=...)` but this cannot be used in combination with a torch `DataLoader` since it just returns an iterator.
### Motivation
The current implementation loads each element of a batch individually which can be very slow in cases of a big batch_size. I did some experiments [here](https://discuss.huggingface.co/t/slow-dataloader-with-big-batch-size/57224) and using a batched iteration would speed up data loading significantly.
### Your contribution
N/A
This is exactly what I was looking for. It would also be very useful for me :-)
|
[
-0.513129472732544,
-0.40810614824295044,
-0.14537034928798676,
-0.032330162823200226,
-0.21823559701442719,
0.07741650193929672,
0.5759503245353699,
0.15358036756515503,
0.10522647202014923,
0.22356858849525452,
-0.09468692541122437,
0.23621876537799835,
-0.41731104254722595,
0.10285545140504837,
0.1062648594379425,
-0.03626181185245514,
0.03244359791278839,
0.14595112204551697,
-0.07823595404624939,
0.22173969447612762,
-0.021309467032551765,
0.13774313032627106,
-0.09421773999929428,
-0.38459187746047974,
0.08171636611223221,
0.12042326480150223,
-0.21657611429691315,
-0.0013386048376560211,
0.025080498307943344,
-0.489952951669693,
0.32743361592292786,
0.27973324060440063,
0.37206509709358215,
0.6666459441184998,
-0.00010651787306414917,
-0.17137004435062408,
0.10324711352586746,
-0.18687155842781067,
-0.3871840834617615,
0.2441912591457367,
0.19723564386367798,
-0.26305636763572693,
-0.03523936867713928,
-0.09303272515535355,
-0.003616325557231903,
-0.282897412776947,
0.186017245054245,
-0.2817627191543579,
0.028737656772136688,
-0.2636896073818207,
0.20213419198989868,
0.12120313942432404,
-0.34006011486053467,
-0.12010888010263443,
0.0892644003033638,
0.2966045141220093,
-0.23300692439079285,
0.31781044602394104,
1.0204998254776,
0.08523669838905334,
-0.41682708263397217,
0.13229675590991974,
-0.006532799452543259,
0.09768281877040863,
0.15806420147418976,
-0.1755865216255188,
-0.3841184079647064,
-0.15864907205104828,
-0.05352078378200531,
0.16184887290000916,
0.6472148895263672,
-0.180128812789917,
-0.2798832058906555,
-0.471064954996109,
-0.005882578901946545,
-0.2938970625400543,
-0.06389669328927994,
-0.0531315878033638,
-0.18328098952770233,
-0.133132204413414,
-0.19827523827552795,
-0.006887352094054222,
-0.3086320757865906,
-0.06498010456562042,
0.07249431312084198,
0.2602000832557678,
-0.13360731303691864,
-0.05216784030199051,
0.18824853003025055,
-0.10926644504070282,
0.4767495393753052,
0.179378941655159,
-0.10930003225803375,
0.3600825071334839,
-0.3559931516647339,
-0.3082621693611145,
-0.04398493468761444,
-0.01263580471277237,
0.297304630279541,
0.15125802159309387,
0.24778573215007782,
-0.0028326287865638733,
-0.03961252048611641,
-0.06018940359354019,
0.1560843288898468,
0.11453349888324738,
0.0992220938205719,
-0.11014374345541,
0.1047167181968689,
0.0603349544107914,
0.27678969502449036,
0.060950763523578644,
-0.10488571971654892,
-0.1223267912864685,
0.37146127223968506,
0.019595127552747726,
-0.28719693422317505,
0.10128697752952576,
-0.13731227815151215,
-0.3246838450431824,
0.15330401062965393,
-0.2573390603065491,
-0.0691135972738266,
0.149882510304451,
0.023934215307235718,
-0.03416013717651367,
-0.1102573573589325,
-0.15676261484622955,
0.1572721153497696,
-0.26764780282974243,
0.041420429944992065,
-0.11259031295776367,
-0.08592294156551361,
0.22736386954784393,
0.270135760307312,
-0.3837733566761017,
0.15431943535804749,
-0.027203228324651718,
0.031934406608343124,
0.4736946225166321,
0.06053394824266434,
-0.12920670211315155,
0.26329854130744934,
-0.2396429032087326,
0.02269948646426201,
0.02984214387834072,
-0.19311578571796417,
0.35652267932891846,
-0.2438327670097351,
0.25624191761016846,
-0.2573891282081604,
-0.35536831617355347,
-0.21423175930976868,
0.1634608507156372,
-0.11798923462629318,
-0.20974525809288025,
-0.4356272518634796,
0.31394514441490173,
0.020535841584205627,
-0.04282134771347046,
0.14010056853294373,
-0.05548490583896637,
-0.06085283309221268,
-0.17849348485469818,
0.07179707288742065,
0.3294413685798645,
-0.40407347679138184,
-0.12919357419013977,
-0.008592040278017521,
-0.056012872606515884,
0.1016073226928711,
0.10992327332496643,
-0.1261533796787262,
0.4416668713092804,
-0.5329504609107971,
0.008591167628765106,
0.011951416730880737,
-0.10681505501270294,
-0.24573281407356262,
0.49601122736930847,
0.05758561193943024,
0.3771519064903259,
0.24556630849838257,
0.2818153500556946,
0.377567857503891,
-0.25548648834228516,
0.21869239211082458,
0.35415780544281006,
-0.30459389090538025,
0.042227812111377716,
0.0583198182284832,
-0.11279930174350739,
0.24235279858112335,
0.39687472581863403,
0.02979147620499134,
0.09157358109951019,
-0.01728973537683487,
-0.2721862494945526,
0.44689393043518066,
-0.26585468649864197,
0.10467930883169174,
0.16426032781600952,
-0.04325655475258827,
-0.030040353536605835,
0.24489636719226837,
-0.18249666690826416,
-0.5408229827880859,
0.23505863547325134,
-0.1789436638355255,
-0.16303744912147522,
0.17999276518821716,
-0.05739258974790573,
-0.037050262093544006,
0.14582042396068573,
-0.2415161281824112,
-0.36332419514656067,
0.05033491551876068,
0.24082405865192413,
-0.0072148460894823074,
-0.4573126435279846,
-0.41081860661506653,
0.12369421869516373,
-0.07928912341594696,
-0.269231379032135,
-0.2864548861980438,
-0.21453529596328735,
0.2755014896392822,
-0.13643139600753784,
0.04633873701095581,
0.011103976517915726,
-0.22923734784126282,
-0.3621354103088379,
0.09462562948465347,
0.3568781912326813,
-0.07942533493041992,
0.1294679045677185,
0.24367177486419678,
0.2375691682100296,
0.11072300374507904,
0.2626342177391052,
0.06172872334718704,
-0.01476706936955452,
0.022429756820201874,
-0.2710801064968109,
-0.0933789536356926,
0.47466719150543213,
-0.316981703042984,
0.3132684528827667,
-0.07796207070350647,
-0.19502297043800354,
0.15081475675106049,
0.23430335521697998,
-0.18606989085674286,
0.24608036875724792,
0.11842375993728638,
0.031006986275315285,
0.15733256936073303,
-0.22224928438663483,
-0.16422218084335327,
0.05271637812256813,
-0.048854146152734756,
0.11705401539802551,
-0.08271334320306778,
0.32715684175491333,
-0.17783355712890625,
0.09949401766061783,
0.0769243910908699,
-0.2606659531593323,
0.47465866804122925,
0.16975544393062592,
0.029359642416238785,
-0.273937851190567,
0.6311642527580261,
0.05343148857355118,
0.1585415005683899,
-0.04261936992406845,
0.13821448385715485,
0.22709766030311584,
0.13312408328056335,
-0.14803647994995117,
-0.14788435399532318,
-0.4927060604095459,
-0.13753731548786163,
0.04937809333205223,
0.056089166551828384,
0.030312934890389442,
0.21288011968135834,
-0.08085022866725922,
-0.15431860089302063,
-0.3124031126499176,
-0.11308571696281433,
-0.07892786711454391,
0.059167347848415375,
0.5585839748382568,
0.08493684232234955,
0.07206675410270691,
0.009336903691291809,
0.6042416095733643,
0.15109841525554657,
-0.11043772846460342,
-0.21438467502593994,
0.08226220309734344,
-0.06813987344503403,
0.15868420898914337,
0.07021695375442505,
-0.7184581160545349,
0.5152049660682678,
0.1182674989104271,
0.20169664919376373,
-0.48768579959869385,
0.040731579065322876,
0.11728239804506302,
-0.04486390948295593,
-0.07343056052923203,
0.36265668272972107,
0.08303532004356384,
0.1832241714000702,
-0.2505348026752472,
-0.09654288738965988,
-0.19317537546157837,
-0.09414836764335632,
-0.29024019837379456,
-0.21936650574207306,
0.10840636491775513,
0.11209158599376678,
-0.0019146129488945007,
-0.17135341465473175,
-0.26072654128074646,
0.37659192085266113,
0.15724332630634308,
0.29862546920776367,
0.06662077456712723,
-0.00793391652405262,
0.0647694319486618,
0.3183188736438751,
-0.28190213441848755,
0.04415254294872284,
-0.6033467650413513,
0.3918003439903259,
-0.4066386818885803,
-0.17978890240192413,
-0.19062569737434387,
-0.03219613805413246,
0.12408451735973358,
0.1704704314470291,
-0.32915163040161133,
0.0034284768626093864,
0.007524760439991951,
0.2758968770503998,
-0.19013844430446625,
0.0542307049036026,
0.09665665775537491,
-0.016263306140899658,
-0.06726831197738647,
-0.06469458341598511,
-0.07158181071281433,
0.05026721581816673,
-0.26453691720962524,
0.3582679033279419,
0.3741944432258606,
0.13912910223007202,
0.2157006561756134,
0.8286226987838745,
-0.05650930106639862,
-0.11849682033061981,
0.2542774975299835,
-0.08594071865081787,
-0.011770989745855331,
-0.20031645894050598,
-0.5253717303276062,
0.089919812977314,
-0.22175785899162292,
-0.1457766592502594,
0.2746615409851074,
-0.15740814805030823,
-0.2903677225112915,
-0.08430913090705872,
-0.25584375858306885,
0.22571507096290588,
0.06087329611182213,
0.4074190855026245,
-0.3645505905151367,
0.24865290522575378,
-0.40047454833984375,
-0.08931761234998703,
-0.435017853975296,
-0.18560466170310974,
0.27486464381217957,
-0.22786779701709747,
0.5101085901260376,
-0.20212548971176147,
-0.026885509490966797,
0.1244831383228302,
-0.5203244090080261,
0.16143794357776642,
0.2680443227291107,
0.24964188039302826,
0.09289871156215668,
-0.1782034933567047,
-0.06642772257328033,
-0.03944524750113487,
0.9014078974723816,
0.1922360211610794,
-0.10863085091114044,
-0.017362920567393303,
-0.23243489861488342,
-0.13673298060894012,
-0.20747268199920654,
-0.04018443450331688,
0.6298459768295288,
0.2748369574546814,
0.3392992913722992,
-0.115314781665802,
-0.09909798204898834,
0.28423792123794556,
0.10051167756319046,
-0.2035689502954483,
-0.4248756468296051,
-0.07608266174793243,
0.026692144572734833,
-0.035429053008556366,
0.1169624924659729,
0.14644524455070496,
0.11605799943208694,
0.13638052344322205,
-0.12759530544281006,
-0.23412765562534332,
-0.06348882615566254,
0.013732314109802246,
0.01114792563021183,
-0.051267530769109726,
0.09139911085367203,
0.3046548664569855,
0.11107247322797775,
0.2137943059206009,
0.19609098136425018,
0.15242883563041687,
-0.14900551736354828,
-0.1668577492237091,
0.27924418449401855,
-0.33138757944107056,
0.3359120190143585,
0.17782816290855408,
0.06623344868421555,
0.17165178060531616,
-0.18515163660049438,
-0.021327413618564606,
-0.398042768239975,
-0.3326467275619507,
0.035728320479393005,
0.0283590629696846,
-0.5424142479896545,
-0.404204398393631,
0.39357683062553406,
0.04155435785651207,
0.027342021465301514,
0.6752322316169739,
-0.30101490020751953,
-0.09220830351114273,
0.26974767446517944,
0.18969100713729858,
0.6713265180587769,
0.02695651352405548,
0.006822887808084488,
0.04680205136537552,
0.2837947607040405,
-0.2539767622947693,
-0.2656622529029846,
0.2842823266983032,
-0.34827354550361633,
-0.4051206707954407,
-0.05124619975686073,
-0.0673326626420021,
-0.05308227241039276,
0.18821166455745697,
0.03435250744223595,
0.11609301716089249,
0.05953913927078247,
0.180174320936203,
-0.19565346837043762,
0.17684422433376312,
-0.29750850796699524,
-0.44394588470458984,
0.03627040982246399,
0.15457485616207123,
0.08780461549758911,
0.16930146515369415,
-0.16796010732650757,
-0.11732874810695648,
0.33849403262138367,
0.21988187730312347,
-0.37376874685287476,
-0.11632318049669266,
-0.16663655638694763,
0.09882842004299164,
0.1039595901966095,
-0.3468022346496582,
0.07440978288650513,
0.2295045703649521,
0.14768490195274353,
-0.2916351854801178,
-0.12360389530658722,
0.13234685361385345,
0.09026458114385605,
0.1791219264268875,
-0.17724387347698212,
-0.13223904371261597,
0.23696190118789673,
-0.16249412298202515,
0.15151354670524597,
0.23505637049674988,
0.13988330960273743,
-0.6718796491622925,
-0.08037810772657394,
0.21140500903129578,
0.43590033054351807,
-0.3943105638027191,
-0.047648653388023376,
0.03127508610486984,
0.17472249269485474,
-0.15804675221443176,
0.09446126222610474,
0.2601134777069092,
-0.10092560201883316,
0.30433905124664307,
-0.21200735867023468,
0.0018026381731033325,
-0.050426069647073746,
0.4019981920719147,
0.21175739169120789,
-0.46682074666023254,
0.493476927280426,
0.2796962857246399,
-0.10333634167909622,
-0.18346336483955383,
0.10195811837911606,
0.33003512024879456,
-0.3506193459033966,
0.18576666712760925,
-0.19533881545066833,
0.18747712671756744,
0.06392550468444824,
0.36544808745384216,
0.09429258108139038,
-0.009054139256477356,
-0.1874738186597824,
-0.15764784812927246,
-0.398519903421402,
-0.21896497905254364,
-0.0488489530980587,
0.38325709104537964,
0.05487947165966034,
-0.328883558511734,
0.08651936054229736,
0.07038269937038422,
-0.3483654856681824,
-0.20532119274139404,
0.1149563267827034,
0.054842352867126465,
0.21204276382923126,
0.24612337350845337,
0.10283953696489334,
0.3633909821510315,
0.06476886570453644,
0.16870450973510742,
0.015811042860150337,
-0.22713783383369446,
-0.014641441404819489,
0.10252105444669724,
-0.20062801241874695,
0.12276630103588104,
-0.06446492671966553,
-0.036141518503427505,
-0.20333246886730194,
-0.3384292721748352,
0.25238314270973206,
-0.07227739691734314,
-0.1180592030286789,
0.04854947328567505,
0.39522305130958557,
-0.12498637288808823,
-0.0068551599979400635,
0.12179862707853317,
0.3512175977230072,
0.0552867092192173,
0.16043929755687714,
0.2682223320007324,
-0.12881679832935333,
-0.24308227002620697,
0.133402481675148,
0.3456811308860779,
0.5485477447509766,
0.1897726058959961,
0.11905042827129364,
-0.1683502346277237,
0.027780119329690933,
0.09313242882490158,
0.25489571690559387,
0.20555254817008972,
-0.09654554724693298,
-0.07571937888860703,
0.1520429253578186,
0.20287026464939117,
-0.1303226351737976,
-0.15784026682376862,
-0.13383041322231293,
-0.11632990092039108,
-0.017075933516025543,
0.19532185792922974,
0.19155120849609375,
0.08968538045883179,
0.32614201307296753,
0.008479217067360878,
0.2225264012813568,
-0.40468788146972656,
-0.12858164310455322,
0.09104691445827484,
0.08031919598579407,
-0.14385896921157837,
0.3092564046382904,
0.08308854699134827,
0.18648278713226318,
0.400674045085907,
-0.1388091742992401,
0.478065550327301,
0.39588692784309387,
-0.11216281354427338,
0.1963905692100525,
-0.48177993297576904,
-0.08747290074825287,
-0.18383637070655823,
0.27959883213043213,
0.26813948154449463,
0.31942594051361084,
0.3379378616809845,
0.03379225358366966,
-0.11164459586143494,
-0.1256020963191986,
0.007661841809749603,
0.01782342605292797,
-0.017222324386239052,
0.05560429394245148,
-0.2980421781539917,
-0.043373845517635345,
0.015364572405815125,
-0.0008231624960899353,
-0.23994414508342743,
0.12486467510461807,
0.08785460889339447,
0.11392394453287125,
-0.347874253988266,
0.14159494638442993,
0.20966854691505432,
0.40637609362602234,
-0.29279059171676636,
-0.14446713030338287,
0.05057276412844658,
0.05258531868457794,
0.07083471864461899,
0.4075981080532074,
0.15895457565784454,
0.3750762343406677,
0.06971995532512665,
0.26529473066329956,
-0.49024537205696106,
-0.031051820144057274,
-0.22790010273456573,
0.035054661333560944,
-0.42762890458106995,
-0.2320072203874588,
0.2897663712501526,
0.13031388819217682,
-0.0898117646574974,
0.15885743498802185,
0.2551136612892151,
-0.1634565144777298,
-0.13472381234169006,
-0.1556778848171234,
0.19841960072517395,
-0.22871282696723938,
-0.33453530073165894,
-0.04704233258962631,
-0.08018898963928223,
-0.33434322476387024,
0.17089709639549255,
-0.2817544937133789,
-0.023788586258888245,
0.06894277036190033,
0.11894463002681732,
-0.18582844734191895,
0.34070146083831787,
0.3536212146282196,
0.07913380861282349,
-0.0827409029006958,
-0.15167038142681122,
-0.009211745113134384,
-0.09747117012739182,
0.16861116886138916,
0.009962456300854683,
-0.08594318479299545,
0.33544644713401794,
0.013105213642120361,
0.04215029999613762,
0.18794919550418854,
-0.030804380774497986,
0.25291353464126587,
0.6883660554885864,
-0.32572999596595764,
-0.17221605777740479,
0.11180031299591064,
0.4377549886703491,
0.048862531781196594,
-0.1858859360218048,
0.0031933002173900604,
-0.07782053202390671,
0.10521704703569412,
-0.1447243094444275,
-0.3944818079471588,
0.26558879017829895,
-0.04785542190074921,
0.4943751394748688,
-0.15606853365898132,
-0.05496203899383545,
-0.15950238704681396,
0.02474682219326496,
-0.3445848226547241,
-0.0071363202296197414,
-0.05652054399251938,
0.08460840582847595,
0.37592220306396484,
-0.06704951822757721,
-0.14126984775066376,
-0.12865965068340302,
-0.3847838044166565,
0.4209021031856537,
-0.06802858412265778,
0.179649218916893,
-0.3230357766151428,
0.15841363370418549,
-0.16576866805553436,
0.16274051368236542,
-0.12604166567325592,
0.22140049934387207,
-0.008872203528881073,
0.08640187978744507,
-0.481783926486969,
0.012805933132767677,
0.16612595319747925,
-0.49958178400993347,
-0.3489314317703247,
0.008878735825419426,
0.023423954844474792,
0.1689271628856659,
0.12346461415290833,
-0.3501662611961365,
0.0406075194478035,
0.33694571256637573,
0.03848467394709587,
0.22095653414726257,
0.3135715425014496,
0.10115016996860504,
0.2154684215784073,
-0.20698793232440948,
0.3058740496635437,
0.20443090796470642,
-0.04808131232857704,
-0.17086246609687805,
-0.3140082359313965
] |
https://github.com/huggingface/datasets/issues/6279
|
Batched IterableDataset
|
This issue is really smashing the selling point of HF datasets... The only workaround I've found so far is to create a customized IterableDataloader which improves the loading speed to some extent.
For example I've a HF dataset `dt_train` with `len(dt_train) == 1M`. Using plain DataLoader is extremely slow:
```
%%time
dl_train = DataLoader(dt_train, batch_size=128, shuffle = True)
for batch in dl_train:
pass
```
```
CPU times: user 24min 35s, sys: 704 ms, total: 24min 36s
Wall time: 24min 37s
```
And DataLoader works even worse with HF's iterable_dataset:
```
%%time
dt_train_ = dt_train.with_format(None).to_iterable_dataset(num_shards=64).shuffle(buffer_size=10_000)
dl_train = DataLoader(dt_train_, batch_size=128)
for batch in dl_train:
pass
```
```
CPU times: user 1h 6min 2s, sys: 4.28 s, total: 1h 6min 6s
Wall time: 1h 7min 53s
```
Workaround by running a customized wrapper:
```
%%time
from torch.utils.data import DataLoader, IterableDataset
class Dataset2Iterable(IterableDataset):
"""
Wrapper to use a HF dataset as pytorch IterableDataset to speed up data loading.
"""
def __init__(self, dataset, batch_size=1, shuffle=True):
super(Dataset2Iterable).__init__()
self.dataset = dataset
self.batch_size = batch_size
self.shuffle = shuffle
def __iter__(self):
if self.shuffle: self.dataset.shuffle()
return self.dataset.iter(batch_size=self.batch_size)
dl_train = DataLoader(Dataset2Iterable(dt_train, batch_size = 128), batch_size=1, num_workers=0)
for n in range(2):
for batch in dl_train:
pass
```
The speed still is slower than using tensorflow's loader but improved a lot than previous code:
```
CPU times: user 4min 18s, sys: 0 ns, total: 4min 18s
Wall time: 4min 20s
```
Note that the way I implemented `Dataset2Iterable` will only work with `num_workers=0`.
|
### Feature request
Hi,
could you add an implementation of a batched `IterableDataset`. It already support an option to do batch iteration via `.iter(batch_size=...)` but this cannot be used in combination with a torch `DataLoader` since it just returns an iterator.
### Motivation
The current implementation loads each element of a batch individually which can be very slow in cases of a big batch_size. I did some experiments [here](https://discuss.huggingface.co/t/slow-dataloader-with-big-batch-size/57224) and using a batched iteration would speed up data loading significantly.
### Your contribution
N/A
| 240
|
Batched IterableDataset
### Feature request
Hi,
could you add an implementation of a batched `IterableDataset`. It already support an option to do batch iteration via `.iter(batch_size=...)` but this cannot be used in combination with a torch `DataLoader` since it just returns an iterator.
### Motivation
The current implementation loads each element of a batch individually which can be very slow in cases of a big batch_size. I did some experiments [here](https://discuss.huggingface.co/t/slow-dataloader-with-big-batch-size/57224) and using a batched iteration would speed up data loading significantly.
### Your contribution
N/A
This issue is really smashing the selling point of HF datasets... The only workaround I've found so far is to create a customized IterableDataloader which improves the loading speed to some extent.
For example I've a HF dataset `dt_train` with `len(dt_train) == 1M`. Using plain DataLoader is extremely slow:
```
%%time
dl_train = DataLoader(dt_train, batch_size=128, shuffle = True)
for batch in dl_train:
pass
```
```
CPU times: user 24min 35s, sys: 704 ms, total: 24min 36s
Wall time: 24min 37s
```
And DataLoader works even worse with HF's iterable_dataset:
```
%%time
dt_train_ = dt_train.with_format(None).to_iterable_dataset(num_shards=64).shuffle(buffer_size=10_000)
dl_train = DataLoader(dt_train_, batch_size=128)
for batch in dl_train:
pass
```
```
CPU times: user 1h 6min 2s, sys: 4.28 s, total: 1h 6min 6s
Wall time: 1h 7min 53s
```
Workaround by running a customized wrapper:
```
%%time
from torch.utils.data import DataLoader, IterableDataset
class Dataset2Iterable(IterableDataset):
"""
Wrapper to use a HF dataset as pytorch IterableDataset to speed up data loading.
"""
def __init__(self, dataset, batch_size=1, shuffle=True):
super(Dataset2Iterable).__init__()
self.dataset = dataset
self.batch_size = batch_size
self.shuffle = shuffle
def __iter__(self):
if self.shuffle: self.dataset.shuffle()
return self.dataset.iter(batch_size=self.batch_size)
dl_train = DataLoader(Dataset2Iterable(dt_train, batch_size = 128), batch_size=1, num_workers=0)
for n in range(2):
for batch in dl_train:
pass
```
The speed still is slower than using tensorflow's loader but improved a lot than previous code:
```
CPU times: user 4min 18s, sys: 0 ns, total: 4min 18s
Wall time: 4min 20s
```
Note that the way I implemented `Dataset2Iterable` will only work with `num_workers=0`.
|
[
-0.5315183997154236,
-0.20455409586429596,
-0.08869335055351257,
-0.10651478171348572,
-0.18674591183662415,
0.12562188506126404,
0.5776188373565674,
0.32193389534950256,
0.14985226094722748,
0.1092345267534256,
-0.3930847644805908,
0.13741210103034973,
-0.24423231184482574,
-0.117168128490448,
0.032119907438755035,
-0.05199805647134781,
-0.015868380665779114,
0.10773297399282455,
-0.20242667198181152,
-0.03968080133199692,
-0.03777379170060158,
0.0025602634996175766,
-0.07972484081983566,
-0.26907384395599365,
0.1267179548740387,
0.042686477303504944,
-0.1381354033946991,
0.036978207528591156,
0.20704762637615204,
-0.5132858753204346,
0.33610019087791443,
0.528447151184082,
0.4633912146091461,
0.6793175935745239,
-0.00010835441207746044,
-0.016400586813688278,
-0.04235275834798813,
-0.08457714319229126,
-0.46581658720970154,
0.183494433760643,
0.31139370799064636,
-0.12614962458610535,
-0.13341869413852692,
-0.02081918716430664,
-0.12266875058412552,
-0.3503958582878113,
0.013916686177253723,
-0.23553794622421265,
-0.10636720061302185,
-0.17223943769931793,
0.1912754476070404,
0.1687471568584442,
-0.3934091627597809,
-0.10549317300319672,
0.1762526035308838,
0.31079715490341187,
-0.11565865576267242,
0.3070280849933624,
0.5991231203079224,
-0.07968664169311523,
-0.5435894131660461,
0.18294638395309448,
0.03305017203092575,
0.3059651851654053,
0.32090049982070923,
-0.15390783548355103,
-0.3754861652851105,
0.026600003242492676,
-0.10669928044080734,
0.3983047604560852,
0.3799421489238739,
-0.1994633674621582,
-0.3526255786418915,
-0.43843019008636475,
-0.047324635088443756,
-0.29532381892204285,
-0.03067965805530548,
-0.012204945087432861,
-0.15072700381278992,
-0.204328253865242,
-0.00764934066683054,
0.05665716901421547,
-0.16777938604354858,
-0.0857873260974884,
0.1187656968832016,
0.27384495735168457,
-0.021805156022310257,
-0.0009315311908721924,
0.2599022686481476,
-0.11945034563541412,
0.5519798994064331,
-0.008733361959457397,
-0.042233821004629135,
0.35774800181388855,
-0.4261232614517212,
-0.1790332943201065,
0.030387453734874725,
-0.04772878438234329,
0.2804986834526062,
-0.061310507357120514,
0.047651126980781555,
0.06960815191268921,
-0.040966156870126724,
-0.055366627871990204,
0.17772504687309265,
-0.028426526114344597,
-0.09097481518983841,
0.015415486879646778,
0.0645105391740799,
0.16553352773189545,
0.06995487213134766,
0.033127475529909134,
-0.10201756656169891,
-0.23256172239780426,
0.30060940980911255,
-0.06985035538673401,
-0.4422872066497803,
0.049413714557886124,
-0.21804356575012207,
-0.2162875086069107,
-0.013830512762069702,
-0.24455280601978302,
0.06525282561779022,
0.37236499786376953,
-0.11860083788633347,
0.042139410972595215,
-0.06372098624706268,
-0.19254516065120697,
-0.08270244300365448,
-0.18505312502384186,
-0.03760964423418045,
-0.020941123366355896,
-0.10848484933376312,
0.22151052951812744,
0.24474002420902252,
-0.4095889925956726,
0.09980978071689606,
0.03453429788351059,
0.16942256689071655,
0.5035731792449951,
0.05012967437505722,
-0.2838827073574066,
0.3055412769317627,
-0.1591285616159439,
0.07178913056850433,
0.09470876306295395,
0.0754106342792511,
0.2506640553474426,
-0.25281238555908203,
0.09122510254383087,
-0.23134663701057434,
-0.2535562515258789,
-0.14579825103282928,
0.17537805438041687,
-0.07437080144882202,
-0.17558114230632782,
-0.48240426182746887,
0.22761170566082,
-0.052758507430553436,
0.007604196667671204,
0.14151546359062195,
-0.2674807906150818,
-0.09574342519044876,
-0.10304402559995651,
0.11434764415025711,
0.395180344581604,
-0.33227869868278503,
-0.15475359559059143,
0.10968153178691864,
-0.02115228772163391,
0.18535593152046204,
0.2563681900501251,
-0.29114121198654175,
0.4993458390235901,
-0.5653213262557983,
-0.049865879118442535,
0.0462612509727478,
-0.20905373990535736,
-0.2907758355140686,
0.598991870880127,
0.1828213781118393,
0.47594642639160156,
0.14538349211215973,
0.13988490402698517,
0.34414923191070557,
-0.3243522644042969,
0.22458472847938538,
0.339821457862854,
-0.21523740887641907,
-0.07069158554077148,
-0.05618550628423691,
-0.08687487989664078,
0.2404322326183319,
0.3743630051612854,
0.1753305196762085,
0.06696212291717529,
0.0015957877039909363,
-0.16702435910701752,
0.6314131617546082,
-0.312168151140213,
0.0634094700217247,
0.27309122681617737,
-0.06972633302211761,
0.29638463258743286,
0.24552763998508453,
-0.027575630694627762,
-0.33524101972579956,
0.2311735451221466,
-0.22896376252174377,
-0.07948952913284302,
0.338289737701416,
-0.18042805790901184,
0.05724576860666275,
0.07732401043176651,
-0.3744044601917267,
-0.3357734680175781,
0.058907970786094666,
0.1514863818883896,
-0.05453907325863838,
-0.42535600066185,
-0.27195948362350464,
0.41801995038986206,
-0.24413911998271942,
-0.22054077684879303,
-0.14797508716583252,
-0.013764876872301102,
0.3091694712638855,
-0.01446716021746397,
0.08696699142456055,
0.14887557923793793,
-0.1207105740904808,
-0.290688157081604,
-0.03333018347620964,
0.28294000029563904,
-0.12509237229824066,
-0.04312396049499512,
0.12605589628219604,
0.198516383767128,
0.07792405784130096,
0.17103849351406097,
0.03788255527615547,
-0.0483388714492321,
0.11807834357023239,
-0.17548507452011108,
-0.07467145472764969,
0.4886026978492737,
-0.23458175361156464,
0.37767380475997925,
0.05817493796348572,
-0.22597405314445496,
0.15424366295337677,
0.19140036404132843,
-0.07244390994310379,
0.2581644654273987,
0.23392502963542938,
-0.02897144854068756,
0.3240412473678589,
-0.17870131134986877,
-0.24463024735450745,
0.11417926102876663,
0.10736050456762314,
0.19023478031158447,
-0.20527905225753784,
0.30798986554145813,
-0.2708164155483246,
0.0410880520939827,
0.2794247269630432,
-0.2739611268043518,
0.38929682970046997,
0.22285090386867523,
0.019296467304229736,
-0.15256206691265106,
0.2997836768627167,
0.11780379712581635,
0.04876597970724106,
-0.04364369064569473,
0.24210375547409058,
0.1805959939956665,
0.1022767499089241,
0.01863161288201809,
-0.27449700236320496,
-0.6040778756141663,
-0.20838028192520142,
0.129590705037117,
-0.11305779218673706,
0.19050920009613037,
0.01026424951851368,
0.03782746195793152,
-0.10976766794919968,
-0.17413730919361115,
-0.10962101817131042,
-0.27888086438179016,
-0.06617888808250427,
0.6036363840103149,
0.15790826082229614,
0.019702333956956863,
-0.08697007596492767,
0.2515009343624115,
0.08762479573488235,
-0.2392173558473587,
-0.11750905215740204,
0.06943654268980026,
-0.1988067328929901,
0.1293920874595642,
0.0600413903594017,
-0.5338156223297119,
0.4764401316642761,
0.17475585639476776,
-0.014905683696269989,
-0.45839470624923706,
0.02678743749856949,
0.20577801764011383,
-0.10710909962654114,
-0.12547284364700317,
0.35545599460601807,
0.06687609851360321,
0.05092701315879822,
-0.18631906807422638,
0.019766585901379585,
-0.183147594332695,
0.0515410378575325,
-0.1908729374408722,
-0.36993950605392456,
0.12673744559288025,
0.2594718635082245,
-0.005612917244434357,
-0.1759171336889267,
-0.30384060740470886,
0.12370876967906952,
0.08168533444404602,
0.2760326564311981,
0.12617187201976776,
-0.05759267136454582,
0.101819708943367,
0.299957275390625,
-0.3590257465839386,
-0.0809001699090004,
-0.5298287272453308,
0.43844130635261536,
-0.3811403810977936,
-0.19462232291698456,
-0.21952268481254578,
-0.17561963200569153,
0.12270218133926392,
0.2271602302789688,
-0.49704819917678833,
0.10248660296201706,
-0.1184723824262619,
0.2818135619163513,
-0.28539639711380005,
0.09344242513179779,
-0.018684230744838715,
-0.08616705983877182,
-0.0866749957203865,
-0.0961572676897049,
0.0568159855902195,
0.06394756585359573,
-0.29194945096969604,
0.31324562430381775,
0.27545779943466187,
0.24097400903701782,
0.2722068130970001,
0.9223724007606506,
0.08393692970275879,
-0.10315614938735962,
0.3762226402759552,
-0.01578543893992901,
0.08632653206586838,
-0.19887235760688782,
-0.5047902464866638,
0.1162927970290184,
-0.2140761911869049,
0.046465516090393066,
0.24245531857013702,
-0.26186418533325195,
-0.24630670249462128,
0.11658042669296265,
-0.20278170704841614,
0.3545018136501312,
-0.08311355113983154,
0.43454334139823914,
-0.3722480237483978,
0.2036421298980713,
-0.3147469460964203,
0.04746078699827194,
-0.3900258541107178,
-0.2011967897415161,
0.3738362193107605,
-0.12474597990512848,
0.4461982250213623,
-0.03642493858933449,
-0.024698074907064438,
0.16113494336605072,
-0.48176467418670654,
0.143764927983284,
0.1706063449382782,
0.3428850471973419,
0.12216836214065552,
-0.07566988468170166,
-0.06632676720619202,
-0.1235855296254158,
0.76132732629776,
0.14529062807559967,
0.018009979277849197,
0.1357986330986023,
-0.36114272475242615,
-0.26233208179473877,
-0.16027730703353882,
-0.012617282569408417,
0.4040374457836151,
0.06970569491386414,
0.2229132056236267,
-0.21273848414421082,
-0.3561975359916687,
0.32137376070022583,
0.023862440139055252,
-0.18902601301670074,
-0.3715150058269501,
-0.04164769500494003,
-0.09517247974872589,
-0.04293988645076752,
0.07533414661884308,
0.037348248064517975,
0.17151257395744324,
0.028897393494844437,
-0.016410240903496742,
-0.31031855940818787,
0.01705465465784073,
0.2560490369796753,
0.07681748270988464,
-0.06951223313808441,
0.2231317013502121,
0.30650725960731506,
0.10663393139839172,
0.21496237814426422,
0.3212484121322632,
0.21270602941513062,
-0.13826660811901093,
-0.2116471827030182,
0.20020842552185059,
-0.1212560310959816,
0.1775529831647873,
0.27505257725715637,
0.009032484143972397,
0.22274744510650635,
-0.16531433165073395,
0.15565291047096252,
-0.41149333119392395,
-0.034068554639816284,
-0.018379531800746918,
-0.042328283190727234,
-0.5843359231948853,
-0.4894382357597351,
0.4199281632900238,
0.04255279526114464,
0.0384177565574646,
0.5971606373786926,
0.04714531451463699,
-0.059093549847602844,
0.34373611211776733,
0.23125526309013367,
0.5943970084190369,
-0.06971301138401031,
0.09737232327461243,
0.185712069272995,
0.13382212817668915,
-0.33964312076568604,
-0.47814279794692993,
0.11024907231330872,
-0.31415730714797974,
-0.4364546835422516,
-0.010404126718640327,
-0.026724664494395256,
0.07118824124336243,
0.23892967402935028,
0.20375636219978333,
0.2944558560848236,
0.03660466521978378,
0.08712497353553772,
-0.1699938327074051,
0.22265923023223877,
-0.22270920872688293,
-0.5854909420013428,
0.03362424671649933,
0.19368670880794525,
0.053402312099933624,
0.23546962440013885,
-0.11611660569906235,
-0.10236748307943344,
0.26515135169029236,
0.23439247906208038,
-0.3355635404586792,
-0.08991896361112595,
-0.26549264788627625,
0.07334457337856293,
0.05653352290391922,
-0.33358341455459595,
0.1663099229335785,
-0.01993662491440773,
0.24623307585716248,
-0.2397451251745224,
0.0013666767627000809,
0.18957461416721344,
0.07849977165460587,
0.18498428165912628,
-0.14736343920230865,
-0.16789937019348145,
0.29986223578453064,
-0.10185812413692474,
0.1049533262848854,
0.1975044310092926,
0.07606370002031326,
-0.6408636569976807,
0.03034120798110962,
0.10928846895694733,
0.35595017671585083,
-0.40398159623146057,
0.08054247498512268,
0.14808997511863708,
0.12061958014965057,
-0.16184568405151367,
0.09064479172229767,
0.15141451358795166,
-0.14272712171077728,
0.26135149598121643,
-0.08496987819671631,
-0.07154384255409241,
-0.13322846591472626,
0.3860672116279602,
0.12629106640815735,
-0.28168076276779175,
0.5080113410949707,
0.27100834250450134,
-0.2043069750070572,
-0.14209574460983276,
0.018143825232982635,
0.6337254047393799,
-0.46685710549354553,
0.13268741965293884,
-0.2249397188425064,
0.19998951256275177,
0.009200697764754295,
0.14634697139263153,
0.0020675547420978546,
-0.19902104139328003,
-0.17637349665164948,
-0.05612865835428238,
-0.3472917079925537,
-0.22491995990276337,
-0.1567414551973343,
0.2940797209739685,
0.11023794859647751,
-0.11907495558261871,
-0.08644664287567139,
0.18978199362754822,
-0.3339463472366333,
-0.2590189576148987,
0.15184186398983002,
-0.011006630957126617,
-0.02717825025320053,
0.19103142619132996,
0.16016893088817596,
0.2651854157447815,
0.12298794090747833,
0.1565685272216797,
-0.1342504769563675,
-0.25403517484664917,
-0.2873884439468384,
0.06054684519767761,
-0.1475537121295929,
0.03780045360326767,
0.0034507466480135918,
-0.06751352548599243,
-0.2822332978248596,
-0.39127954840660095,
0.39396366477012634,
0.0774715319275856,
-0.04755605012178421,
0.126748725771904,
0.41897013783454895,
-0.2662881314754486,
-0.06385212391614914,
0.04319443926215172,
0.43519800901412964,
0.13669505715370178,
0.10728428512811661,
0.12140069901943207,
-0.09997463971376419,
-0.264735609292984,
-0.016521994024515152,
0.33788543939590454,
0.5717732906341553,
0.006424758583307266,
0.1350981444120407,
-0.25890493392944336,
0.08800257742404938,
0.05904112756252289,
0.24762991070747375,
0.18662747740745544,
-0.032282643020153046,
-0.2161809653043747,
0.21425944566726685,
0.16625377535820007,
-0.15158718824386597,
-0.1385987550020218,
-0.20436479151248932,
-0.037666402757167816,
0.13921722769737244,
0.2997843623161316,
0.182024747133255,
0.17589467763900757,
0.26621711254119873,
-0.015007397159934044,
0.21491771936416626,
-0.3826834559440613,
-0.203538179397583,
0.16433368623256683,
0.12671026587486267,
-0.020132597535848618,
0.25736677646636963,
0.08427697420120239,
0.188547283411026,
0.5019196271896362,
-0.005815200507640839,
0.44242045283317566,
0.3317522704601288,
-0.03562824800610542,
0.1484491229057312,
-0.6311221718788147,
-0.2397453933954239,
-0.025561407208442688,
0.33576422929763794,
0.24056488275527954,
0.19415226578712463,
0.1857256293296814,
0.086995929479599,
-0.3086187541484833,
0.03886385262012482,
-0.029286395758390427,
-0.02425725758075714,
-0.0775136947631836,
0.08468836545944214,
-0.12682896852493286,
-0.2516666650772095,
0.0454256571829319,
-0.06710194051265717,
-0.30062806606292725,
0.04324711114168167,
0.05926362797617912,
0.18556950986385345,
-0.3755301535129547,
0.1504591554403305,
0.13001111149787903,
0.38190755248069763,
-0.1613413393497467,
-0.12890981137752533,
-0.02547110617160797,
0.07165978848934174,
0.0943422019481659,
0.26687392592430115,
0.1389479786157608,
0.24276210367679596,
0.003115982748568058,
0.09821221977472305,
-0.3942771255970001,
0.029349585995078087,
-0.09162960946559906,
-0.06491578370332718,
-0.4921880066394806,
-0.21213030815124512,
0.3972393572330475,
0.10422399640083313,
-0.10211004316806793,
0.047880612313747406,
0.04743341729044914,
-0.0816224068403244,
-0.20707572996616364,
0.06805907189846039,
0.23444834351539612,
0.006461374461650848,
-0.11547699570655823,
-0.005937471985816956,
-0.013016734272241592,
-0.25066807866096497,
0.3230128586292267,
-0.27619796991348267,
0.04400119557976723,
0.0035350536927580833,
0.1143096536397934,
-0.24056130647659302,
0.34794482588768005,
0.2711416184902191,
0.09169476479291916,
-0.19633081555366516,
-0.042445920407772064,
-0.06741718202829361,
-0.18689602613449097,
-0.18014706671237946,
-0.006456747651100159,
0.1311837136745453,
0.3464806377887726,
0.05498897656798363,
-0.0018172040581703186,
0.2947419285774231,
-0.12890444695949554,
0.29572004079818726,
0.6144446134567261,
-0.26588305830955505,
-0.14084501564502716,
-0.20148257911205292,
0.4381641745567322,
0.004776768386363983,
-0.4132176637649536,
-0.01167101040482521,
0.028612390160560608,
0.09158241003751755,
-0.13088978826999664,
-0.3655781149864197,
0.44462156295776367,
-0.2510974705219269,
0.4491736888885498,
-0.15124931931495667,
-0.06644178926944733,
-0.10174605250358582,
-0.004973689094185829,
-0.27915453910827637,
0.05660669878125191,
-0.14997848868370056,
-0.042721644043922424,
0.16061143577098846,
0.11576908826828003,
0.04690787196159363,
-0.29089727997779846,
-0.27725401520729065,
0.39334046840667725,
-0.005732007324695587,
0.20301909744739532,
-0.3704511225223541,
0.44871893525123596,
-0.16400684416294098,
0.3105695843696594,
-0.14968711137771606,
0.30248206853866577,
0.1299138069152832,
0.18846292793750763,
-0.42330634593963623,
-0.10860532522201538,
0.3206980228424072,
-0.5351778268814087,
-0.28867125511169434,
0.043494608253240585,
0.020289666950702667,
0.2121645212173462,
0.05595588684082031,
-0.34043702483177185,
0.009848296642303467,
0.30015724897384644,
0.03732696548104286,
0.15940062701702118,
0.20254802703857422,
0.05393856763839722,
0.22496141493320465,
-0.195120170712471,
0.2692301869392395,
0.018260208889842033,
-0.0910918116569519,
-0.11571803689002991,
-0.24628578126430511
] |
https://github.com/huggingface/datasets/issues/6279
|
Batched IterableDataset
|
I can confirm that @zhh210's solution works with `num_workers=0`. However, for my use case, this was still slower than tokenizing on the fly through a collator and leveraging multiple workers in the dataloder.
@lhoestq I think this is an important use case (e.g., streaming from a large dataset, online or stored on disk). What do you think might be the best solution to move forward?
|
### Feature request
Hi,
could you add an implementation of a batched `IterableDataset`. It already support an option to do batch iteration via `.iter(batch_size=...)` but this cannot be used in combination with a torch `DataLoader` since it just returns an iterator.
### Motivation
The current implementation loads each element of a batch individually which can be very slow in cases of a big batch_size. I did some experiments [here](https://discuss.huggingface.co/t/slow-dataloader-with-big-batch-size/57224) and using a batched iteration would speed up data loading significantly.
### Your contribution
N/A
| 65
|
Batched IterableDataset
### Feature request
Hi,
could you add an implementation of a batched `IterableDataset`. It already support an option to do batch iteration via `.iter(batch_size=...)` but this cannot be used in combination with a torch `DataLoader` since it just returns an iterator.
### Motivation
The current implementation loads each element of a batch individually which can be very slow in cases of a big batch_size. I did some experiments [here](https://discuss.huggingface.co/t/slow-dataloader-with-big-batch-size/57224) and using a batched iteration would speed up data loading significantly.
### Your contribution
N/A
I can confirm that @zhh210's solution works with `num_workers=0`. However, for my use case, this was still slower than tokenizing on the fly through a collator and leveraging multiple workers in the dataloder.
@lhoestq I think this is an important use case (e.g., streaming from a large dataset, online or stored on disk). What do you think might be the best solution to move forward?
|
[
-0.5507500767707825,
-0.18806041777133942,
-0.13860377669334412,
-0.16400682926177979,
-0.16954900324344635,
-0.11123514175415039,
0.7082952260971069,
0.14553016424179077,
0.08327986299991608,
0.20728567242622375,
-0.059562839567661285,
0.15164726972579956,
-0.38221803307533264,
0.10908728092908859,
0.054306209087371826,
0.08610560745000839,
0.024122707545757294,
0.24103271961212158,
-0.04857468605041504,
0.20891804993152618,
0.04676248878240585,
-0.04727292060852051,
-0.14728274941444397,
-0.42681461572647095,
-0.13251028954982758,
0.019271161407232285,
-0.12356933951377869,
-0.0446588397026062,
0.06582701206207275,
-0.471508651971817,
0.14375367760658264,
0.35034120082855225,
0.4114688038825989,
0.6814944744110107,
-0.00010639995889505371,
-0.16000694036483765,
0.05026049166917801,
-0.13482560217380524,
-0.48729363083839417,
0.22749276459217072,
0.13621211051940918,
-0.3582463264465332,
-0.14388233423233032,
-0.1345343291759491,
0.09033616632223129,
-0.33343592286109924,
0.282938152551651,
-0.3929285705089569,
0.09697914123535156,
-0.25068187713623047,
0.15260495245456696,
0.19526813924312592,
-0.3618372678756714,
0.0865267813205719,
-0.14538836479187012,
0.24635232985019684,
-0.12854254245758057,
0.30349382758140564,
0.9952167272567749,
0.029719477519392967,
-0.5506550669670105,
0.18623420596122742,
-0.059908755123615265,
0.09443853795528412,
0.19322484731674194,
-0.2245340645313263,
-0.3200516998767853,
-0.2134704887866974,
-0.02809794247150421,
0.23781511187553406,
0.4764026999473572,
-0.15663480758666992,
-0.3789442181587219,
-0.5327580571174622,
-0.0621306374669075,
-0.3246167302131653,
-0.06875082105398178,
0.004385038278996944,
-0.170265331864357,
-0.15300659835338593,
-0.24437586963176727,
0.008538708090782166,
-0.22751961648464203,
-0.08247306942939758,
-0.011583808809518814,
0.3520837426185608,
-0.054923173040151596,
0.05666689574718475,
0.14031431078910828,
-0.12833456695079803,
0.5889194011688232,
0.014210146851837635,
0.15628644824028015,
0.39449557662010193,
-0.42170509696006775,
-0.3021463453769684,
-0.03399340808391571,
-0.029693283140659332,
0.23145076632499695,
0.02386866882443428,
0.16480787098407745,
0.07657171785831451,
0.020270250737667084,
-0.030846476554870605,
0.24070337414741516,
0.07973365485668182,
0.009274855256080627,
-0.22676235437393188,
0.2154291421175003,
0.1334269940853119,
0.19546367228031158,
0.06418406963348389,
-0.18771681189537048,
-0.1275368481874466,
0.2972134053707123,
0.08374013751745224,
-0.23293353617191315,
0.21640679240226746,
-0.15168718993663788,
-0.28975817561149597,
0.00007849931716918945,
-0.21570667624473572,
0.011243383400142193,
0.0781392753124237,
-0.06017684191465378,
0.28270867466926575,
-0.2139320820569992,
-0.17219360172748566,
0.12180518358945847,
-0.39325153827667236,
0.025289520621299744,
-0.11723369359970093,
-0.02397511899471283,
0.20318347215652466,
0.3101227581501007,
-0.4012013375759125,
0.0868363156914711,
0.031760554760694504,
0.09729070961475372,
0.3519308567047119,
0.044597379863262177,
-0.23334075510501862,
0.1924729347229004,
-0.2843671441078186,
0.14612139761447906,
0.06818687170743942,
-0.12189684808254242,
0.11887773871421814,
-0.19536378979682922,
0.20355439186096191,
-0.12259859591722488,
-0.4211318790912628,
-0.13927052915096283,
0.1721886247396469,
-0.21326863765716553,
-0.05280814319849014,
-0.47765156626701355,
0.319008469581604,
-0.061161912977695465,
0.05582691356539726,
-0.03227374702692032,
-0.11448070406913757,
-0.09675254672765732,
-0.11725258827209473,
0.13439567387104034,
0.33444762229919434,
-0.42479997873306274,
-0.06740299612283707,
0.07554174214601517,
0.09611116349697113,
0.2395375669002533,
0.23193399608135223,
-0.2104761302471161,
0.33059999346733093,
-0.3535447418689728,
0.06425179541110992,
0.06972219049930573,
-0.1346224695444107,
-0.2408982813358307,
0.6758109927177429,
-0.018929239362478256,
0.32551172375679016,
0.3126598596572876,
0.27895107865333557,
0.5754880905151367,
-0.4223633110523224,
0.32628095149993896,
0.40519285202026367,
-0.29218217730522156,
0.14421698451042175,
-0.1328834742307663,
-0.13796135783195496,
0.15291303396224976,
0.44220975041389465,
-0.014414835721254349,
-0.0010222718119621277,
-0.08570706099271774,
-0.25820213556289673,
0.370652973651886,
-0.2742117643356323,
0.2562045753002167,
-0.0008760690689086914,
-0.04067876562476158,
0.0023680999875068665,
0.14981020987033844,
0.04073472321033478,
-0.5970506072044373,
0.21045300364494324,
-0.02091257832944393,
-0.18531665205955505,
0.2039877474308014,
-0.12316247820854187,
0.09187459200620651,
0.09327177703380585,
-0.19792313873767853,
-0.12804128229618073,
0.05271655321121216,
0.21667791903018951,
0.022413689643144608,
-0.3538128137588501,
-0.4902074933052063,
0.1408141553401947,
-0.15391361713409424,
-0.2502018213272095,
-0.1848428100347519,
-0.13726772367954254,
0.3125951886177063,
-0.0626942589879036,
0.04094976186752319,
0.08335068821907043,
-0.15683075785636902,
-0.28587472438812256,
0.14627230167388916,
0.31278806924819946,
-0.13408616185188293,
0.19462399184703827,
0.09052420407533646,
0.3473089635372162,
0.23718401789665222,
0.3040487766265869,
0.06333444267511368,
-0.01772226393222809,
0.11852534115314484,
-0.18343588709831238,
-0.06302773952484131,
0.399508535861969,
-0.29171639680862427,
0.3031570613384247,
0.021997764706611633,
-0.18416433036327362,
0.24568742513656616,
0.2720957398414612,
-0.2298005074262619,
0.3027134835720062,
0.13453450798988342,
-0.03620964288711548,
0.25523024797439575,
-0.03255327790975571,
-0.24834232032299042,
0.12524989247322083,
-0.06977395713329315,
0.07841849327087402,
-0.06535813957452774,
0.16076938807964325,
-0.2440931499004364,
-0.08372874557971954,
0.06835559755563736,
-0.07894174754619598,
0.4042920470237732,
0.20479276776313782,
0.11706094443798065,
-0.3309503197669983,
0.6353850960731506,
-0.015559292398393154,
0.20828986167907715,
0.03743141517043114,
0.14129406213760376,
0.23057034611701965,
0.08908814936876297,
-0.06733647733926773,
-0.1450643241405487,
-0.5562790036201477,
0.005641503259539604,
0.1224452331662178,
-0.018209464848041534,
0.03179021179676056,
0.1696128249168396,
-0.0978989452123642,
-0.205829456448555,
-0.22000740468502045,
-0.10338051617145538,
-0.13346128165721893,
0.06190809607505798,
0.5970569849014282,
0.05515517666935921,
0.0699094831943512,
-0.03843795508146286,
0.5812382102012634,
-0.03033479116857052,
0.011060774326324463,
-0.2689875364303589,
0.040115758776664734,
-0.09073834866285324,
0.10162250697612762,
0.27127721905708313,
-0.6274023652076721,
0.3882037401199341,
0.2671550214290619,
-0.0006784331053495407,
-0.47911831736564636,
0.0636429712176323,
0.018929075449705124,
0.01354607567191124,
-0.06176237761974335,
0.2767951190471649,
0.07655396312475204,
0.08729198575019836,
-0.2861103415489197,
-0.14650005102157593,
-0.2520054876804352,
0.03931279480457306,
-0.3259972333908081,
-0.22724545001983643,
0.11792924255132675,
0.16728146374225616,
0.08869075030088425,
-0.23013795912265778,
-0.3150162696838379,
0.2687777280807495,
0.009462118148803711,
0.3292253017425537,
-0.10628532618284225,
-0.13672290742397308,
-0.004789917264133692,
0.4208022952079773,
-0.3922834098339081,
0.018571002408862114,
-0.5992705225944519,
0.34614548087120056,
-0.23066942393779755,
-0.17581157386302948,
-0.1935214251279831,
-0.009541907347738743,
0.1372302621603012,
0.2871580719947815,
-0.25747203826904297,
0.05747518315911293,
-0.0022782348096370697,
0.12263529002666473,
-0.1738443523645401,
0.042660556733608246,
0.015409819781780243,
0.017672190442681313,
-0.038109954446554184,
-0.01687752828001976,
0.10473267734050751,
0.03043295443058014,
-0.20855295658111572,
0.17255553603172302,
0.43108999729156494,
0.2873302102088928,
0.3751102387905121,
0.8029816746711731,
0.0118027925491333,
-0.1486416757106781,
0.21328997611999512,
0.007810516282916069,
-0.030094381421804428,
-0.08207810670137405,
-0.42413315176963806,
0.22679361701011658,
-0.15298116207122803,
-0.07394015789031982,
0.35633450746536255,
-0.23323321342468262,
-0.38432490825653076,
-0.11684852093458176,
-0.14769576489925385,
0.14177051186561584,
0.046018194407224655,
0.5118726491928101,
-0.34109729528427124,
0.25055447220802307,
-0.3138865530490875,
-0.11446632444858551,
-0.3484840393066406,
-0.21119126677513123,
0.06709037721157074,
-0.3810323476791382,
0.5640641450881958,
-0.1356711983680725,
-0.009301010519266129,
0.2385566383600235,
-0.7262157797813416,
0.1851293444633484,
0.26277071237564087,
0.4328177571296692,
0.2742035984992981,
-0.24269545078277588,
-0.010648176074028015,
-0.0009258766658604145,
0.6825720071792603,
0.20065127313137054,
-0.010188881307840347,
-0.055374015122652054,
-0.25499671697616577,
-0.19612549245357513,
-0.12807121872901917,
-0.04383136332035065,
0.5494247674942017,
0.2826032340526581,
0.4074433445930481,
-0.2451728880405426,
-0.1680939942598343,
0.11813545972108841,
-0.006869264878332615,
-0.08571582287549973,
-0.34345880150794983,
-0.1094391793012619,
-0.006663791835308075,
-0.08109362423419952,
0.18708792328834534,
0.2123396396636963,
0.26417815685272217,
0.09437999874353409,
-0.10140974819660187,
-0.19299575686454773,
-0.054286763072013855,
0.0994214192032814,
0.019487634301185608,
-0.16769716143608093,
0.08772377669811249,
0.29938367009162903,
0.22278280556201935,
0.29447638988494873,
0.1844898909330368,
0.07763542979955673,
-0.029251139611005783,
-0.3077826499938965,
0.35013097524642944,
-0.15095078945159912,
0.4211297631263733,
0.29446762800216675,
0.12365984916687012,
0.09062637388706207,
-0.13879933953285217,
0.13155317306518555,
-0.3203442692756653,
-0.16213828325271606,
-0.07306179404258728,
0.04863410070538521,
-0.6262627840042114,
-0.386702299118042,
0.30583035945892334,
0.03156539052724838,
0.12369590997695923,
0.5853248834609985,
-0.25938498973846436,
-0.1001807227730751,
0.20236162841320038,
0.27801093459129333,
0.7249788045883179,
-0.09715405106544495,
0.0456356555223465,
0.003989774733781815,
0.21791423857212067,
-0.03800381347537041,
-0.46406716108322144,
0.2686677575111389,
-0.3507049083709717,
-0.41529110074043274,
-0.01879699155688286,
-0.043869443237781525,
-0.06439409404993057,
0.2852436602115631,
0.02362069860100746,
0.2074117362499237,
0.06917931139469147,
0.26670268177986145,
-0.1461150050163269,
0.2466220259666443,
-0.4112902283668518,
-0.5604018568992615,
-0.09699691832065582,
0.12312008440494537,
-0.07824385166168213,
0.05005340650677681,
-0.15864765644073486,
-0.05154841020703316,
0.36960771679878235,
0.15702997148036957,
-0.1931445598602295,
-0.13538937270641327,
-0.28691530227661133,
0.11369460076093674,
0.061469048261642456,
-0.23468369245529175,
0.09608776867389679,
0.2253723293542862,
0.0546695813536644,
-0.3322748839855194,
-0.005603615194559097,
0.10604506731033325,
0.09215801954269409,
0.28294190764427185,
0.06209917739033699,
-0.25886982679367065,
0.20735570788383484,
-0.16770541667938232,
0.1908935308456421,
0.19092997908592224,
0.18413756787776947,
-0.5921433568000793,
-0.12483534961938858,
0.22756999731063843,
0.4685054421424866,
-0.3294507563114166,
-0.05570804327726364,
0.1289626657962799,
0.13058851659297943,
-0.13870489597320557,
0.08410374820232391,
0.18340498208999634,
-0.22560682892799377,
0.3095671832561493,
-0.2729325592517853,
-0.015279620885848999,
0.003868795931339264,
0.36081674695014954,
0.13757890462875366,
-0.31055906414985657,
0.46449384093284607,
0.2334599643945694,
-0.17977483570575714,
-0.16012945771217346,
0.11803365498781204,
0.376929372549057,
-0.4480973482131958,
0.1887979805469513,
-0.15953108668327332,
0.11461113393306732,
0.0455315075814724,
0.2707752585411072,
-0.050335437059402466,
0.09373831003904343,
-0.1476992964744568,
-0.15290573239326477,
-0.2814766764640808,
-0.1394057422876358,
-0.02664683386683464,
0.1985490322113037,
0.15928685665130615,
-0.23225145041942596,
-0.03491637855768204,
0.156002014875412,
-0.3510993421077728,
-0.12577299773693085,
0.07094785571098328,
0.1366121768951416,
0.03314033895730972,
0.08693836629390717,
0.10736287385225296,
0.3490960896015167,
0.09531038999557495,
0.1634284108877182,
0.04003011807799339,
-0.25825580954551697,
0.013761136680841446,
0.10140912979841232,
-0.09009503573179245,
-0.061310701072216034,
-0.06796766817569733,
-0.07933035492897034,
-0.38803884387016296,
-0.3646950423717499,
0.26043304800987244,
-0.04419434443116188,
-0.22112159430980682,
-0.12917110323905945,
0.4482625424861908,
-0.019918449223041534,
-0.1141100749373436,
0.0993255004286766,
0.33630815148353577,
0.06102682650089264,
0.10855696350336075,
0.3857484459877014,
0.08326847106218338,
-0.24200133979320526,
0.13980157673358917,
0.3162233233451843,
0.6209929585456848,
0.14345601201057434,
0.15826988220214844,
-0.301980197429657,
0.06916406750679016,
0.13143591582775116,
0.31903740763664246,
0.2740579843521118,
-0.02594175934791565,
-0.2600187361240387,
0.2774564325809479,
0.19250236451625824,
-0.12535002827644348,
-0.20260700583457947,
-0.07789620757102966,
-0.01399382296949625,
0.04693963751196861,
0.24183706939220428,
0.21915176510810852,
-0.05333432927727699,
0.19662636518478394,
0.004952298477292061,
0.23641224205493927,
-0.553102433681488,
-0.0971498042345047,
0.11623974144458771,
0.07449440658092499,
-0.13926272094249725,
0.16611528396606445,
0.13537466526031494,
0.1901090145111084,
0.3704444169998169,
-0.2005932629108429,
0.4805009663105011,
0.4556930363178253,
-0.06091224029660225,
0.0845271646976471,
-0.5020607113838196,
-0.17601339519023895,
-0.0047328174114227295,
0.10489290207624435,
0.25880903005599976,
0.22321079671382904,
0.2073516547679901,
-0.04464912414550781,
-0.070155568420887,
-0.05946400761604309,
0.07337194681167603,
-0.01739300787448883,
-0.0030290386639535427,
-0.06855110824108124,
-0.20907175540924072,
-0.08146892488002777,
0.11404262483119965,
-0.10301491618156433,
-0.15612205862998962,
-0.018488124012947083,
0.19038298726081848,
0.11874064058065414,
-0.29944172501564026,
0.05656564235687256,
0.17965805530548096,
0.5233575105667114,
-0.28173378109931946,
-0.059220246970653534,
0.10542429238557816,
0.13740673661231995,
0.11084716022014618,
0.3193953037261963,
0.1839040368795395,
0.3422727882862091,
0.0852186530828476,
0.30142533779144287,
-0.5099060535430908,
0.03441754728555679,
-0.23537439107894897,
0.08747189491987228,
-0.2963601350784302,
-0.23609130084514618,
0.30223676562309265,
0.09050124883651733,
-0.0714561939239502,
0.04526626691222191,
0.22260621190071106,
-0.2635815143585205,
-0.07497833669185638,
-0.20302024483680725,
0.243134543299675,
-0.1689235270023346,
-0.2798945903778076,
-0.026157721877098083,
-0.09157563745975494,
-0.3460913300514221,
0.2160191684961319,
-0.3306730091571808,
0.033046212047338486,
-0.0019399302545934916,
0.12510913610458374,
-0.14393623173236847,
0.3664068877696991,
0.35801172256469727,
-0.015259385108947754,
-0.13967521488666534,
-0.17451274394989014,
-0.12087838351726532,
-0.08718112856149673,
0.1297445148229599,
0.009126702323555946,
-0.09751679003238678,
0.4410242736339569,
0.012428492307662964,
0.06061986833810806,
-0.05121442675590515,
0.05704358220100403,
0.12335202842950821,
0.5090661644935608,
-0.23614099621772766,
-0.048028748482465744,
0.018427949398756027,
0.406635046005249,
-0.033751022070646286,
-0.32289448380470276,
0.11913897097110748,
-0.08427826315164566,
0.08397269994020462,
-0.04249405860900879,
-0.24064737558364868,
0.17963051795959473,
-0.11073136329650879,
0.30737778544425964,
-0.07151593267917633,
-0.045806482434272766,
-0.004113353788852692,
0.13550350069999695,
-0.2666490077972412,
0.17691466212272644,
-0.2311548888683319,
0.08006227016448975,
0.41729915142059326,
-0.11505406349897385,
-0.1397952437400818,
-0.02024521306157112,
-0.3397881090641022,
0.3760562837123871,
-0.12723320722579956,
0.15973107516765594,
-0.2878098785877228,
0.04606877267360687,
-0.21000218391418457,
0.257881760597229,
-0.1710151582956314,
0.2523496448993683,
-0.02973991632461548,
0.06367015093564987,
-0.4895411729812622,
-0.022049980238080025,
0.12413143366575241,
-0.6209616661071777,
-0.3203307092189789,
-0.22020423412322998,
0.10855652391910553,
0.320712685585022,
0.2330833524465561,
-0.17353937029838562,
-0.008404985070228577,
0.28407153487205505,
-0.00877382606267929,
0.09702372550964355,
0.3174166977405548,
0.06144949421286583,
0.10075978934764862,
-0.2382824569940567,
0.055664509534835815,
0.1197221502661705,
-0.0668490082025528,
-0.15182670950889587,
-0.36160141229629517
] |
https://github.com/huggingface/datasets/issues/6279
|
Batched IterableDataset
|
I guess it can be implemented using a batched`.map()` under the hood that returns a single item containing the input batch.
In the meantime you can use this:
```python
def batch(unbatched: dict[str, list]) -> dict[str, list]:
return {k: [v] for k, v in unbatched}
batched_dataset = dataset.map(batch, batched=True, batch_size=batch_size)
```
Though it would be great to have a `.batch()` method indeed, I'd be happy to help with anyone wants to open a PR
|
### Feature request
Hi,
could you add an implementation of a batched `IterableDataset`. It already support an option to do batch iteration via `.iter(batch_size=...)` but this cannot be used in combination with a torch `DataLoader` since it just returns an iterator.
### Motivation
The current implementation loads each element of a batch individually which can be very slow in cases of a big batch_size. I did some experiments [here](https://discuss.huggingface.co/t/slow-dataloader-with-big-batch-size/57224) and using a batched iteration would speed up data loading significantly.
### Your contribution
N/A
| 73
|
Batched IterableDataset
### Feature request
Hi,
could you add an implementation of a batched `IterableDataset`. It already support an option to do batch iteration via `.iter(batch_size=...)` but this cannot be used in combination with a torch `DataLoader` since it just returns an iterator.
### Motivation
The current implementation loads each element of a batch individually which can be very slow in cases of a big batch_size. I did some experiments [here](https://discuss.huggingface.co/t/slow-dataloader-with-big-batch-size/57224) and using a batched iteration would speed up data loading significantly.
### Your contribution
N/A
I guess it can be implemented using a batched`.map()` under the hood that returns a single item containing the input batch.
In the meantime you can use this:
```python
def batch(unbatched: dict[str, list]) -> dict[str, list]:
return {k: [v] for k, v in unbatched}
batched_dataset = dataset.map(batch, batched=True, batch_size=batch_size)
```
Though it would be great to have a `.batch()` method indeed, I'd be happy to help with anyone wants to open a PR
|
[
-0.49269795417785645,
-0.3898637294769287,
-0.1762053668498993,
-0.1279391646385193,
-0.1045372486114502,
0.11119938641786575,
0.49365925788879395,
0.1932072788476944,
0.15270878374576569,
0.10424447059631348,
-0.1615661084651947,
0.3079584538936615,
-0.424785315990448,
0.1613137573003769,
0.04434895142912865,
-0.09974581003189087,
0.022444717586040497,
0.15515173971652985,
-0.00819242000579834,
0.1478090137243271,
-0.1447388231754303,
0.040556810796260834,
-0.17425097525119781,
-0.25947338342666626,
0.11995287239551544,
-0.08316009491682053,
-0.20958800613880157,
0.06618538498878479,
0.021418055519461632,
-0.592781126499176,
0.35306310653686523,
0.2375679761171341,
0.391137957572937,
0.6775081157684326,
-0.00010263497824780643,
-0.08896365016698837,
0.016042567789554596,
-0.21212483942508698,
-0.4346040189266205,
0.06674451380968094,
0.08331923931837082,
-0.27919575572013855,
-0.05997922271490097,
-0.13114160299301147,
-0.0623641200363636,
-0.4548663794994354,
0.07292652130126953,
-0.34357091784477234,
0.11016849428415298,
-0.047774847596883774,
0.2310909628868103,
0.2186615914106369,
-0.2137652039527893,
-0.11353036016225815,
0.010395534336566925,
0.15010377764701843,
-0.08434037864208221,
0.23142707347869873,
0.8889689445495605,
-0.09153915196657181,
-0.21738672256469727,
0.09277734160423279,
-0.16821591556072235,
0.1117301881313324,
0.038597412407398224,
-0.03785968944430351,
-0.14770790934562683,
-0.24030369520187378,
-0.11977279931306839,
0.1614711731672287,
0.429368793964386,
-0.3617717921733856,
-0.3992091715335846,
-0.4911707043647766,
-0.07467279583215714,
-0.41601133346557617,
-0.19775286316871643,
0.09200411289930344,
-0.32746225595474243,
-0.1624230295419693,
-0.08074519038200378,
0.11606882512569427,
-0.18201591074466705,
-0.10414828360080719,
0.007077738642692566,
0.3900390863418579,
-0.030645377933979034,
-0.044460050761699677,
0.22326694428920746,
-0.18089111149311066,
0.41832610964775085,
0.10183524340391159,
0.003076404333114624,
0.2923974096775055,
-0.30062440037727356,
-0.2622950077056885,
0.0031531527638435364,
-0.05548698455095291,
0.1859797239303589,
0.08726222813129425,
0.1134365126490593,
-0.10654289275407791,
-0.014037192799150944,
-0.048774316906929016,
0.36858734488487244,
0.04866797477006912,
-0.02603716403245926,
0.0898856520652771,
-0.029237136244773865,
0.07217124104499817,
0.14607301354408264,
0.036355964839458466,
-0.10755150765180588,
-0.21043865382671356,
0.42364850640296936,
0.047070346772670746,
-0.167251318693161,
0.20019930601119995,
-0.23673982918262482,
-0.26432132720947266,
0.05182131379842758,
-0.12054146826267242,
-0.09389399737119675,
0.2116563618183136,
-0.04592359811067581,
0.16583919525146484,
-0.0956222265958786,
-0.10945715010166168,
0.09501175582408905,
-0.0797797292470932,
-0.04118696227669716,
-0.008076922968029976,
-0.15201598405838013,
0.03604162484407425,
0.15207913517951965,
-0.2597687244415283,
0.08193787187337875,
-0.02399856597185135,
0.07121620327234268,
0.38460496068000793,
0.13287018239498138,
-0.14016306400299072,
0.3323049247264862,
-0.06413863599300385,
0.08004820346832275,
-0.016479583457112312,
-0.010939132422208786,
0.09108021855354309,
-0.29359492659568787,
0.22975876927375793,
-0.13499537110328674,
-0.29001927375793457,
-0.08658293634653091,
0.23694387078285217,
-0.12382952123880386,
-0.16251958906650543,
-0.39388757944107056,
0.28091365098953247,
-0.001474909484386444,
-0.008697550743818283,
0.07120104134082794,
-0.24242408573627472,
-0.031275674700737,
-0.27658984065055847,
0.18672941625118256,
0.3769529163837433,
-0.35065850615501404,
-0.05351656675338745,
0.07950757443904877,
-0.047001902014017105,
0.14037634432315826,
0.137296661734581,
-0.09292775392532349,
0.483378529548645,
-0.4382895827293396,
-0.06471318751573563,
0.04515533149242401,
-0.28574076294898987,
-0.3340644836425781,
0.4348078966140747,
0.036881640553474426,
0.42999139428138733,
0.18488186597824097,
0.232394278049469,
0.35671359300613403,
-0.279585063457489,
0.3576267659664154,
0.3801325559616089,
-0.45130568742752075,
0.14663752913475037,
0.021633382886648178,
-0.12732206284999847,
0.20117563009262085,
0.3192528188228607,
0.04025861993432045,
0.08879546821117401,
-0.13757824897766113,
-0.18327417969703674,
0.514044463634491,
-0.2164084017276764,
0.09229101985692978,
0.08512542396783829,
0.06980352103710175,
0.038392096757888794,
0.1968013346195221,
-0.3177609443664551,
-0.40607744455337524,
0.21064940094947815,
-0.07532598823308945,
-0.1465681940317154,
0.015293531119823456,
-0.13963952660560608,
-0.14943763613700867,
0.31600913405418396,
-0.3435559570789337,
-0.29314592480659485,
0.15095476806163788,
0.12261958420276642,
0.13729293644428253,
-0.3493318259716034,
-0.3688836693763733,
0.12037039548158646,
-0.03921886533498764,
-0.23861223459243774,
-0.17952097952365875,
-0.1630653589963913,
0.28905603289604187,
-0.11124282330274582,
0.07859919965267181,
0.1930890679359436,
-0.1765822172164917,
-0.22630541026592255,
0.1607760488986969,
0.15918013453483582,
0.016494084149599075,
0.06498229503631592,
0.16061988472938538,
0.23093059659004211,
0.05115492269396782,
0.22844034433364868,
-0.0038994010537862778,
0.057549215853214264,
0.1311798393726349,
-0.19966405630111694,
-0.11544058471918106,
0.561673641204834,
-0.255589097738266,
0.288472443819046,
0.027438312768936157,
0.021532325074076653,
0.1768130511045456,
0.1695113480091095,
-0.19584345817565918,
0.19030889868736267,
0.02137869969010353,
-0.018247783184051514,
0.3020011782646179,
-0.20741288363933563,
-0.17520730197429657,
0.06045791506767273,
-0.003757614642381668,
0.07992139458656311,
-0.01702764630317688,
0.17062494158744812,
-0.29034775495529175,
0.12913185358047485,
-0.04464298486709595,
-0.06451104581356049,
0.4286673665046692,
0.22542230784893036,
-0.0020169951021671295,
-0.19036298990249634,
0.5183529853820801,
0.10217367112636566,
0.1401861608028412,
0.0447283536195755,
0.12562082707881927,
0.1632513403892517,
0.14560092985630035,
-0.0733971893787384,
-0.07595756649971008,
-0.4434124231338501,
-0.22437067329883575,
0.1211223378777504,
0.09706884622573853,
0.062200918793678284,
0.26405635476112366,
-0.04738270863890648,
-0.16075456142425537,
-0.30106690526008606,
0.09330999851226807,
-0.1418735831975937,
-0.002947639673948288,
0.45719829201698303,
0.05652116611599922,
0.05168861150741577,
0.04538804665207863,
0.3744944930076599,
0.1386795938014984,
-0.3217831254005432,
-0.10319579392671585,
-0.0896371603012085,
-0.1055414155125618,
0.22508543729782104,
0.09317910671234131,
-0.5957006812095642,
0.6150690317153931,
0.15405330061912537,
0.038683921098709106,
-0.41953885555267334,
0.12635335326194763,
0.06362409144639969,
-0.09351669251918793,
-0.0008143037557601929,
0.3799612522125244,
0.19404244422912598,
0.0873054563999176,
-0.17813345789909363,
0.015083184465765953,
-0.14378346502780914,
-0.07254606485366821,
-0.23644445836544037,
-0.1402561366558075,
0.05595080927014351,
0.18399515748023987,
-0.1226390078663826,
-0.35319554805755615,
-0.2729780673980713,
0.3584938049316406,
0.21154603362083435,
0.3070007264614105,
0.09025540947914124,
0.0015208162367343903,
0.040494225919246674,
0.41571342945098877,
-0.287447988986969,
0.0860261619091034,
-0.3785819411277771,
0.27488788962364197,
-0.30932557582855225,
-0.21296899020671844,
-0.2126341164112091,
-0.14643670618534088,
0.07751840353012085,
0.2451522797346115,
-0.2570817768573761,
-0.08785472810268402,
-0.047385796904563904,
0.28923851251602173,
-0.08223168551921844,
0.11898829787969589,
0.1467423141002655,
0.11518006771802902,
-0.10798132419586182,
-0.03910673409700394,
0.009853880852460861,
0.011703096330165863,
-0.2498597502708435,
0.17555075883865356,
0.378187358379364,
0.07784231007099152,
0.2179463505744934,
0.8068330883979797,
0.1705743968486786,
-0.11880981922149658,
0.10478179156780243,
-0.21106597781181335,
-0.009211953729391098,
-0.1240333691239357,
-0.5158960819244385,
-0.10616731643676758,
-0.2200702428817749,
-0.19014057517051697,
0.15308424830436707,
-0.1316039264202118,
-0.21186012029647827,
-0.08790582418441772,
-0.11708103120326996,
0.11540765315294266,
-0.018030108883976936,
0.4032101333141327,
-0.42242947220802307,
0.2570076882839203,
-0.3329932987689972,
-0.06490517407655716,
-0.4811052083969116,
-0.13750746846199036,
0.10179716348648071,
-0.2807310223579407,
0.3562491834163666,
-0.18978632986545563,
-0.0408729650080204,
0.06435483694076538,
-0.562518835067749,
0.16463927924633026,
0.22315913438796997,
0.27518609166145325,
0.24559332430362701,
-0.2625696659088135,
-0.05818773806095123,
-0.06456185132265091,
0.8396007418632507,
0.07665054500102997,
-0.14495736360549927,
0.09906686842441559,
-0.20424023270606995,
-0.2336428463459015,
-0.08493480086326599,
-0.19355207681655884,
0.624506413936615,
0.23121511936187744,
0.23330087959766388,
-0.19464656710624695,
-0.14343401789665222,
0.21322079002857208,
0.16302572190761566,
-0.17216913402080536,
-0.22643014788627625,
-0.14395537972450256,
-0.12235201150178909,
-0.0995497927069664,
0.22724342346191406,
0.24875931441783905,
0.1706196367740631,
0.09459265321493149,
-0.04121217131614685,
-0.29267722368240356,
0.05901028960943222,
0.20991447567939758,
0.0665823370218277,
0.03809252381324768,
0.12170784175395966,
0.349621444940567,
0.07836136221885681,
0.21372683346271515,
0.25629571080207825,
0.2679682970046997,
-0.2405007779598236,
-0.31275084614753723,
0.10816916823387146,
-0.10366455465555191,
0.2511031925678253,
0.19425973296165466,
-0.013474773615598679,
0.10680818557739258,
-0.24577859044075012,
0.16461607813835144,
-0.37341514229774475,
-0.2583211064338684,
0.10784865915775299,
0.031786929816007614,
-0.6563299894332886,
-0.5776984095573425,
0.3174627423286438,
0.050214093178510666,
0.03434628248214722,
0.6412075757980347,
-0.2839418649673462,
-0.07777569442987442,
0.4511076807975769,
0.16160601377487183,
0.6682764887809753,
-0.12028777599334717,
0.13261155784130096,
0.19424352049827576,
0.3591380715370178,
-0.16489273309707642,
-0.16948992013931274,
0.230852410197258,
-0.31182339787483215,
-0.25402045249938965,
0.008579382672905922,
-0.08235388994216919,
-0.11854171007871628,
0.27399981021881104,
-0.06596149504184723,
0.15689335763454437,
-0.05529008060693741,
0.05476367101073265,
-0.058299869298934937,
0.16674724221229553,
-0.19151423871517181,
-0.40408363938331604,
-0.11911068856716156,
0.16187353432178497,
0.07130319625139236,
0.1441347450017929,
-0.13791269063949585,
-0.17471431195735931,
0.20304328203201294,
0.17565619945526123,
-0.49491697549819946,
-0.11103091388940811,
-0.21325205266475677,
0.14303043484687805,
0.13851630687713623,
-0.3819074034690857,
-0.022916056215763092,
0.43826404213905334,
0.149746835231781,
-0.28425222635269165,
-0.034933269023895264,
0.16137345135211945,
0.17831872403621674,
0.09903829544782639,
0.004827389493584633,
-0.1837170422077179,
0.3376334309577942,
-0.08635644614696503,
0.07923813909292221,
0.3138110935688019,
0.09147809445858002,
-0.49112468957901,
-0.14650629460811615,
0.3300497531890869,
0.5719888210296631,
-0.47221386432647705,
-0.11819399893283844,
0.07593880593776703,
0.01112467423081398,
-0.14553536474704742,
0.1467120349407196,
0.21623697876930237,
-0.05416925996541977,
0.40895816683769226,
-0.18275737762451172,
-0.05522257834672928,
-0.01739969104528427,
0.1843196302652359,
0.3012361228466034,
-0.43363091349601746,
0.5850168466567993,
0.23876912891864777,
-0.1160125732421875,
-0.26860904693603516,
0.07322148233652115,
0.21021807193756104,
-0.22816473245620728,
0.3699614405632019,
-0.05875806137919426,
0.2271239012479782,
0.0837719738483429,
0.3620457351207733,
0.1176472157239914,
-0.03568459302186966,
-0.14593930542469025,
-0.1961957812309265,
-0.3010405898094177,
-0.19398359954357147,
0.07195870578289032,
0.36687910556793213,
0.1289527714252472,
-0.14707279205322266,
0.025865858420729637,
0.10323075205087662,
-0.4056992530822754,
-0.17152631282806396,
-0.008726324886083603,
0.007628150284290314,
0.17283694446086884,
0.1652117818593979,
0.13405747711658478,
0.23767651617527008,
0.19800257682800293,
0.13949081301689148,
0.001963081769645214,
-0.320804238319397,
-0.05299941450357437,
0.05568535625934601,
-0.1977441906929016,
0.023858891800045967,
-0.0018567843362689018,
0.021599479019641876,
-0.2545914947986603,
-0.35134464502334595,
0.19371238350868225,
0.0897509977221489,
-0.08452728390693665,
0.009438919834792614,
0.4631600081920624,
-0.08078484982252121,
0.0026803351938724518,
0.06821827590465546,
0.18604624271392822,
0.045665234327316284,
0.16389679908752441,
0.25786226987838745,
0.0035939975641667843,
-0.24438580870628357,
0.13408571481704712,
0.24448862671852112,
0.5999654531478882,
0.079001784324646,
0.20992064476013184,
-0.21161727607250214,
-0.07190099358558655,
0.05270968750119209,
0.34658271074295044,
0.32193225622177124,
-0.17683686316013336,
0.04246680438518524,
0.2339608073234558,
0.2680741846561432,
-0.25345075130462646,
-0.04946808144450188,
-0.09793692827224731,
-0.08381977677345276,
0.04356422647833824,
0.25526100397109985,
0.060510482639074326,
0.06271317601203918,
0.2219981551170349,
0.004611862823367119,
0.29261407256126404,
-0.4336332082748413,
-0.035633232444524765,
0.0876602828502655,
0.2854193449020386,
-0.18842609226703644,
0.1398715376853943,
0.17882050573825836,
0.2521439790725708,
0.41014838218688965,
-0.12388084083795547,
0.4591413736343384,
0.27656251192092896,
-0.1939978301525116,
0.1417028307914734,
-0.4880155920982361,
0.06913530081510544,
-0.10657283663749695,
0.15345966815948486,
0.21931588649749756,
0.3021734356880188,
0.3154950439929962,
-0.0846690982580185,
-0.07369090616703033,
-0.05535878986120224,
0.016711339354515076,
-0.02618972584605217,
-0.06106003373861313,
0.07358169555664062,
-0.23334887623786926,
0.027938038110733032,
-0.03088958188891411,
0.002692941576242447,
-0.3415646553039551,
-0.013383850455284119,
0.07549270987510681,
0.22887460887432098,
-0.3243977427482605,
0.08187254518270493,
0.17387384176254272,
0.44576022028923035,
-0.31564176082611084,
-0.22614894807338715,
0.07061921060085297,
0.08680017292499542,
0.021129153668880463,
0.40216755867004395,
0.34454381465911865,
0.45665979385375977,
-0.13163578510284424,
0.33486834168434143,
-0.453612744808197,
-0.09087346494197845,
-0.2476595938205719,
-0.019406281411647797,
-0.3728702664375305,
-0.09576573967933655,
0.3229292035102844,
0.23951053619384766,
-0.15958602726459503,
-0.008283417671918869,
0.22678066790103912,
-0.251615434885025,
-0.23579396307468414,
-0.06107046455144882,
0.20829080045223236,
-0.2510262727737427,
-0.23312389850616455,
0.021738938987255096,
-0.1581893265247345,
-0.3602856695652008,
0.1871182769536972,
-0.19918297231197357,
0.06816381216049194,
0.056450437754392624,
0.1559896469116211,
-0.06740744411945343,
0.2869127094745636,
0.3597065210342407,
0.2875276207923889,
-0.15476368367671967,
-0.1415223628282547,
-0.12609604001045227,
-0.10972095280885696,
-0.07496654987335205,
-0.21748310327529907,
-0.07463760673999786,
0.2980055510997772,
0.020173117518424988,
0.20214945077896118,
-0.016373977065086365,
0.05276875197887421,
-0.014543775469064713,
0.6753048896789551,
-0.29905396699905396,
-0.19425836205482483,
0.035802826285362244,
0.42454755306243896,
0.1234128326177597,
-0.3314555585384369,
-0.0709964781999588,
-0.054187990725040436,
0.20440509915351868,
-0.20729495584964752,
-0.27124547958374023,
0.3360093832015991,
-0.006740383803844452,
0.37612107396125793,
-0.06959021836519241,
0.034121908247470856,
-0.1480998992919922,
-0.017093423753976822,
-0.2994486093521118,
0.03582180291414261,
-0.18063752353191376,
0.044511519372463226,
0.27658435702323914,
-0.04354482889175415,
-0.1615452766418457,
-0.23027585446834564,
-0.27998656034469604,
0.1379677653312683,
0.040739208459854126,
0.07431059330701828,
-0.2618440091609955,
0.14098645746707916,
-0.042574405670166016,
0.237590953707695,
-0.20011702179908752,
0.3385950028896332,
-0.11249344050884247,
0.09773004800081253,
-0.3547810912132263,
-0.14667542278766632,
0.21705041825771332,
-0.6638486385345459,
-0.3499077260494232,
0.0002869865857064724,
0.09933939576148987,
-0.07653895765542984,
0.14106951653957367,
-0.2626895308494568,
0.13376003503799438,
0.3598615527153015,
-0.0011174436658620834,
0.05965505167841911,
0.20604178309440613,
-0.0017121834680438042,
0.11635169386863708,
-0.2074570506811142,
0.2655971050262451,
0.011263128370046616,
-0.1683150976896286,
-0.12002220749855042,
-0.3681977391242981
] |
https://github.com/huggingface/datasets/issues/6279
|
Batched IterableDataset
|
If no one else is planning to work on this, I can take it on. I'll wait until next week, and if no one has started a PR by then, I'll go ahead and open one.
|
### Feature request
Hi,
could you add an implementation of a batched `IterableDataset`. It already support an option to do batch iteration via `.iter(batch_size=...)` but this cannot be used in combination with a torch `DataLoader` since it just returns an iterator.
### Motivation
The current implementation loads each element of a batch individually which can be very slow in cases of a big batch_size. I did some experiments [here](https://discuss.huggingface.co/t/slow-dataloader-with-big-batch-size/57224) and using a batched iteration would speed up data loading significantly.
### Your contribution
N/A
| 36
|
Batched IterableDataset
### Feature request
Hi,
could you add an implementation of a batched `IterableDataset`. It already support an option to do batch iteration via `.iter(batch_size=...)` but this cannot be used in combination with a torch `DataLoader` since it just returns an iterator.
### Motivation
The current implementation loads each element of a batch individually which can be very slow in cases of a big batch_size. I did some experiments [here](https://discuss.huggingface.co/t/slow-dataloader-with-big-batch-size/57224) and using a batched iteration would speed up data loading significantly.
### Your contribution
N/A
If no one else is planning to work on this, I can take it on. I'll wait until next week, and if no one has started a PR by then, I'll go ahead and open one.
|
[
-0.5193303823471069,
-0.3607630729675293,
-0.16439995169639587,
-0.029069118201732635,
-0.19876064360141754,
0.06552300602197647,
0.5762870907783508,
0.1743568480014801,
0.12109002470970154,
0.21001002192497253,
-0.11969920992851257,
0.23910537362098694,
-0.3752928078174591,
0.07635021209716797,
0.0680936649441719,
0.009979519993066788,
0.020162396132946014,
0.1419275999069214,
-0.08434489369392395,
0.1946241706609726,
-0.029919639229774475,
0.08637415617704391,
-0.0893724113702774,
-0.36553955078125,
0.06969563663005829,
0.07735739648342133,
-0.2056676596403122,
0.05130277946591377,
0.034433312714099884,
-0.4988015294075012,
0.28930893540382385,
0.2682513892650604,
0.3590753376483917,
0.6710304021835327,
-0.00010210570326307788,
-0.1622781902551651,
0.07787904888391495,
-0.1977962702512741,
-0.45721614360809326,
0.2765325605869293,
0.16557827591896057,
-0.24341315031051636,
-0.07522893697023392,
-0.12545540928840637,
-0.007907934486865997,
-0.28622621297836304,
0.1751878708600998,
-0.2871355712413788,
0.06775979697704315,
-0.2222050428390503,
0.24239739775657654,
0.11576484143733978,
-0.3660847544670105,
-0.16154474020004272,
0.08186038583517075,
0.28022244572639465,
-0.18591125309467316,
0.3153487741947174,
0.965661883354187,
0.0812685638666153,
-0.43833327293395996,
0.14013256132602692,
-0.05865214020013809,
0.12943631410598755,
0.17043264210224152,
-0.17557862401008606,
-0.33578580617904663,
-0.07505788654088974,
-0.04719247668981552,
0.17607969045639038,
0.6232886910438538,
-0.22127023339271545,
-0.25973886251449585,
-0.46369919180870056,
-0.046660128980875015,
-0.27430784702301025,
-0.07340770214796066,
-0.05473203957080841,
-0.1680280566215515,
-0.13293975591659546,
-0.14391249418258667,
0.021410033106803894,
-0.2608633041381836,
-0.06503425538539886,
0.07011744379997253,
0.2602832019329071,
-0.1290355622768402,
-0.04286940395832062,
0.18194396793842316,
-0.14375559985637665,
0.4702378809452057,
0.13084453344345093,
-0.06790104508399963,
0.3389527201652527,
-0.3318328559398651,
-0.30583661794662476,
-0.03346005082130432,
-0.027844741940498352,
0.2915295362472534,
0.10832283645868301,
0.23393212258815765,
-0.005481760948896408,
-0.03467504680156708,
-0.0518723800778389,
0.1719522625207901,
0.08691801130771637,
0.06103172153234482,
-0.10691232979297638,
0.07500431686639786,
0.05908442661166191,
0.24576041102409363,
0.06308108568191528,
-0.08757053315639496,
-0.12984664738178253,
0.33287855982780457,
0.007040549069643021,
-0.30024832487106323,
0.14017550647258759,
-0.1615380346775055,
-0.32001176476478577,
0.16812282800674438,
-0.2471482753753662,
-0.06167563423514366,
0.16767717897891998,
0.024817761033773422,
0.0037703458219766617,
-0.11750617623329163,
-0.16595056653022766,
0.14847925305366516,
-0.24949383735656738,
-0.023658759891986847,
-0.10910952091217041,
-0.08902561664581299,
0.2211860716342926,
0.26181453466415405,
-0.34219613671302795,
0.13969546556472778,
-0.014301041141152382,
0.015666518360376358,
0.46272480487823486,
0.06579729914665222,
-0.1491784155368805,
0.29479509592056274,
-0.2504485547542572,
0.019404731690883636,
0.03050330840051174,
-0.1477811336517334,
0.28384941816329956,
-0.26582127809524536,
0.2411024272441864,
-0.23006245493888855,
-0.3194253742694855,
-0.17368806898593903,
0.2137158215045929,
-0.13434651494026184,
-0.1685626059770584,
-0.37256231904029846,
0.2912624180316925,
0.017666898667812347,
-0.05487000197172165,
0.14512008428573608,
-0.07227366417646408,
-0.028859125450253487,
-0.18288040161132812,
0.06882742792367935,
0.3297818601131439,
-0.38699162006378174,
-0.10774046182632446,
-0.007610440719872713,
-0.04093294218182564,
0.09229565411806107,
0.13169991970062256,
-0.1326022744178772,
0.4027196764945984,
-0.5181167721748352,
0.039228394627571106,
0.012675084173679352,
-0.12227362394332886,
-0.2543536126613617,
0.5461274981498718,
0.00040934979915618896,
0.36251580715179443,
0.23820343613624573,
0.27113062143325806,
0.34077420830726624,
-0.3165254294872284,
0.242525115609169,
0.34867966175079346,
-0.31537672877311707,
0.024272693321108818,
0.010167334228754044,
-0.12275426834821701,
0.20814193785190582,
0.3900121748447418,
0.021186988800764084,
0.07943957298994064,
-0.041199855506420135,
-0.22932516038417816,
0.45153912901878357,
-0.2513423264026642,
0.1034431904554367,
0.15161757171154022,
-0.029559332877397537,
-0.04447386413812637,
0.23665271699428558,
-0.17063814401626587,
-0.5534246563911438,
0.2263427972793579,
-0.11815870553255081,
-0.2012549340724945,
0.21904343366622925,
-0.06686818599700928,
-0.07091289758682251,
0.1570376306772232,
-0.2161678820848465,
-0.29266130924224854,
0.10526049137115479,
0.25673723220825195,
-0.007249489426612854,
-0.43558162450790405,
-0.37970420718193054,
0.11694420129060745,
-0.08542121946811676,
-0.2873261868953705,
-0.2533818185329437,
-0.22225318849086761,
0.28706473112106323,
-0.14360274374485016,
0.02345946431159973,
0.016460958868265152,
-0.21408337354660034,
-0.33663082122802734,
0.10814739763736725,
0.3311993181705475,
-0.08385517448186874,
0.14742501080036163,
0.21966642141342163,
0.270541250705719,
0.07040855288505554,
0.24930086731910706,
0.05909587815403938,
-0.0012265648692846298,
0.04464637115597725,
-0.253974974155426,
-0.1387631595134735,
0.44994884729385376,
-0.3467360734939575,
0.3191584348678589,
-0.052723340690135956,
-0.18217018246650696,
0.1928364634513855,
0.20393997430801392,
-0.1698044091463089,
0.22995471954345703,
0.1301565170288086,
0.048264794051647186,
0.21285098791122437,
-0.15715950727462769,
-0.1460842341184616,
0.06072283908724785,
-0.014366600662469864,
0.12136481702327728,
-0.06834784895181656,
0.2937617003917694,
-0.22970163822174072,
0.08191007375717163,
0.0897478461265564,
-0.2283099740743637,
0.46106380224227905,
0.22071224451065063,
0.059013284742832184,
-0.28791937232017517,
0.6103577017784119,
0.021448180079460144,
0.14839424192905426,
-0.0381324365735054,
0.15462630987167358,
0.2175523042678833,
0.12839259207248688,
-0.13619986176490784,
-0.13703884184360504,
-0.4898582696914673,
-0.13635116815567017,
0.05005807429552078,
0.08118972182273865,
0.050414785742759705,
0.22740474343299866,
-0.07384854555130005,
-0.15137308835983276,
-0.3092477321624756,
-0.09462027251720428,
-0.09755846858024597,
0.09011512994766235,
0.5720287561416626,
0.04735318943858147,
0.06006355583667755,
-0.017833685502409935,
0.607594907283783,
0.13252763450145721,
-0.13489259779453278,
-0.24661372601985931,
0.05993686988949776,
-0.0860992968082428,
0.20748727023601532,
0.1268017441034317,
-0.6663995385169983,
0.5199397802352905,
0.12320847064256668,
0.17096099257469177,
-0.45484602451324463,
0.07062693685293198,
0.09548085927963257,
-0.03618042916059494,
-0.0887882262468338,
0.3373621702194214,
0.1036522388458252,
0.18331855535507202,
-0.23240575194358826,
-0.0686856210231781,
-0.19637738168239594,
-0.09439409524202347,
-0.25718367099761963,
-0.21242256462574005,
0.12275397777557373,
0.0925995260477066,
-0.027778945863246918,
-0.1424388289451599,
-0.2977309823036194,
0.3883005380630493,
0.1667758822441101,
0.2979373335838318,
0.09176342189311981,
-0.011925471015274525,
0.057930443435907364,
0.3584968149662018,
-0.2520254850387573,
0.000032809097319841385,
-0.554671585559845,
0.34579145908355713,
-0.3615128695964813,
-0.16204522550106049,
-0.21879695355892181,
-0.07110469043254852,
0.1205243468284607,
0.16835369169712067,
-0.327311635017395,
0.003964814357459545,
-0.01069832406938076,
0.257797509431839,
-0.1809852570295334,
0.05242008715867996,
0.08202631771564484,
-0.001818366814404726,
-0.1309783160686493,
-0.06535756587982178,
-0.03186389058828354,
0.06536939740180969,
-0.2745516300201416,
0.2775232493877411,
0.34749463200569153,
0.11845427006483078,
0.24376323819160461,
0.7992355227470398,
-0.011332028545439243,
-0.14080196619033813,
0.24580340087413788,
-0.08406660705804825,
0.006638064980506897,
-0.19541513919830322,
-0.510814368724823,
0.07919738441705704,
-0.1770000159740448,
-0.14147377014160156,
0.29379284381866455,
-0.17367762327194214,
-0.3040603995323181,
-0.05098417401313782,
-0.21065782010555267,
0.20729532837867737,
0.03089979663491249,
0.4409920275211334,
-0.35315725207328796,
0.20382502675056458,
-0.36149322986602783,
-0.08671196550130844,
-0.4456464350223541,
-0.17036166787147522,
0.22635111212730408,
-0.27758538722991943,
0.44903242588043213,
-0.22124339640140533,
-0.04048657417297363,
0.18760280311107635,
-0.5130085349082947,
0.16093981266021729,
0.23577822744846344,
0.2642579674720764,
0.09327992796897888,
-0.2587513327598572,
-0.09502936899662018,
-0.06469599902629852,
0.8498860597610474,
0.2079734057188034,
-0.07623343169689178,
0.03565892204642296,
-0.21856172382831573,
-0.15328249335289001,
-0.14445951581001282,
-0.07046795636415482,
0.5699650645256042,
0.2609920799732208,
0.3321179449558258,
-0.14733095467090607,
-0.11687830090522766,
0.22836671769618988,
0.12402613461017609,
-0.1939856857061386,
-0.4057678282260895,
-0.09311012923717499,
0.00036841630935668945,
-0.0614907443523407,
0.14789029955863953,
0.16571249067783356,
0.1289953589439392,
0.13499420881271362,
-0.09912582486867905,
-0.2529389262199402,
-0.0854673907160759,
0.03935502469539642,
0.011033447459340096,
-0.05072072893381119,
0.08773893862962723,
0.292588472366333,
0.11315540969371796,
0.23274393379688263,
0.21985095739364624,
0.16605433821678162,
-0.16419601440429688,
-0.16929489374160767,
0.27424120903015137,
-0.2800590395927429,
0.2764689028263092,
0.2231932431459427,
0.06903576850891113,
0.13901078701019287,
-0.17794404923915863,
0.027438119053840637,
-0.4189007580280304,
-0.2904384136199951,
0.009117056615650654,
-0.021252939477562904,
-0.5349497199058533,
-0.3794979751110077,
0.39277034997940063,
0.05148037150502205,
0.016890302300453186,
0.6408571004867554,
-0.2914799451828003,
-0.0804605558514595,
0.24884764850139618,
0.21508297324180603,
0.709657609462738,
-0.01653420180082321,
0.03176242113113403,
0.04090597853064537,
0.298003613948822,
-0.2428293079137802,
-0.2900678813457489,
0.2645176351070404,
-0.33851316571235657,
-0.4274885952472687,
-0.0017163213342428207,
-0.08088316023349762,
-0.09280594438314438,
0.2349540740251541,
0.03141624107956886,
0.09948164969682693,
0.0579695850610733,
0.19515447318553925,
-0.1630842685699463,
0.23255684971809387,
-0.33008843660354614,
-0.44766151905059814,
0.017245735973119736,
0.19863156974315643,
0.07605977356433868,
0.12859658896923065,
-0.15837320685386658,
-0.11334577947854996,
0.32676270604133606,
0.1658208668231964,
-0.33232176303863525,
-0.08309159427881241,
-0.1879899650812149,
0.0900551900267601,
0.07927349954843521,
-0.3437703251838684,
0.004317283630371094,
0.2205984890460968,
0.14658285677433014,
-0.2966689467430115,
-0.08918556571006775,
0.1382371038198471,
0.08875034004449844,
0.191037118434906,
-0.14372003078460693,
-0.15841947495937347,
0.25565212965011597,
-0.15101686120033264,
0.16709300875663757,
0.21592167019844055,
0.152937114238739,
-0.6465328335762024,
-0.053116366267204285,
0.21178944408893585,
0.44694727659225464,
-0.42366695404052734,
-0.034561142325401306,
0.05314057692885399,
0.12956644594669342,
-0.1537499725818634,
0.13913078606128693,
0.26040348410606384,
-0.09533504396677017,
0.2941839098930359,
-0.1894427388906479,
-0.01377423107624054,
-0.07075592875480652,
0.37865856289863586,
0.21138957142829895,
-0.4239640235900879,
0.4710983335971832,
0.24808119237422943,
-0.12553894519805908,
-0.22979557514190674,
0.1047235056757927,
0.35743170976638794,
-0.33969035744667053,
0.20238427817821503,
-0.18734192848205566,
0.1423674076795578,
0.06197065860033035,
0.35320109128952026,
0.127205029129982,
0.02942901849746704,
-0.1700584441423416,
-0.13316690921783447,
-0.3629727065563202,
-0.17565129697322845,
-0.02383636310696602,
0.3859193027019501,
0.07165634632110596,
-0.33651185035705566,
0.014019960537552834,
0.09227298945188522,
-0.40885135531425476,
-0.20272734761238098,
0.09512550383806229,
0.0479772724211216,
0.18152396380901337,
0.19368615746498108,
0.09547902643680573,
0.3405616581439972,
0.139607235789299,
0.16348546743392944,
-0.00269322469830513,
-0.2936917245388031,
0.014699574559926987,
0.0710483118891716,
-0.1962897777557373,
0.11459580808877945,
-0.06536900997161865,
-0.0431019589304924,
-0.21059787273406982,
-0.3671061098575592,
0.2347269356250763,
-0.10097860544919968,
-0.12968531250953674,
0.02959141507744789,
0.3882014751434326,
-0.08411984890699387,
-0.03434540331363678,
0.11634885519742966,
0.3250577449798584,
0.0441226065158844,
0.12958820164203644,
0.24911710619926453,
-0.10296203196048737,
-0.24827153980731964,
0.12912751734256744,
0.3502083718776703,
0.5844011902809143,
0.16416114568710327,
0.09299138188362122,
-0.17559747397899628,
0.01176169142127037,
0.11119204759597778,
0.25944697856903076,
0.2367566078901291,
-0.10159286856651306,
-0.09913276135921478,
0.19220608472824097,
0.25735607743263245,
-0.15573765337467194,
-0.14714296162128448,
-0.14349834620952606,
-0.10078299790620804,
0.048761408776044846,
0.22577139735221863,
0.15999484062194824,
0.0750725269317627,
0.32029789686203003,
0.005820494145154953,
0.2296128123998642,
-0.4064151644706726,
-0.12045294046401978,
0.11540104448795319,
0.10463155806064606,
-0.14372965693473816,
0.25244468450546265,
0.11990414559841156,
0.2031157910823822,
0.40693438053131104,
-0.15309005975723267,
0.49936622381210327,
0.35853803157806396,
-0.11992037296295166,
0.16736522316932678,
-0.48791998624801636,
-0.07431146502494812,
-0.1305253505706787,
0.25960129499435425,
0.2147386372089386,
0.2953249216079712,
0.28457868099212646,
-0.0036500515416264534,
-0.10600867867469788,
-0.1276693195104599,
-0.02888813242316246,
-0.0023635998368263245,
0.0007791509851813316,
0.042315274477005005,
-0.27683281898498535,
-0.05813506990671158,
-0.006079379469156265,
-0.03846834972500801,
-0.23104070127010345,
0.1410398781299591,
0.06984385848045349,
0.16431200504302979,
-0.3426710367202759,
0.16247722506523132,
0.20078521966934204,
0.3824830949306488,
-0.3087673485279083,
-0.11702366918325424,
0.07043468207120895,
0.054365284740924835,
0.06352820992469788,
0.3825652301311493,
0.15398471057415009,
0.36704155802726746,
0.0503593347966671,
0.2586647570133209,
-0.4918784201145172,
-0.039372026920318604,
-0.2535387873649597,
0.05211946368217468,
-0.41113290190696716,
-0.22757957875728607,
0.3082835078239441,
0.18362976610660553,
-0.13634152710437775,
0.13960067927837372,
0.2383611500263214,
-0.21553437411785126,
-0.1325952112674713,
-0.13616809248924255,
0.20534004271030426,
-0.21173575520515442,
-0.3099609613418579,
-0.036694519221782684,
-0.11597978323698044,
-0.36998113989830017,
0.15747389197349548,
-0.31196603178977966,
0.026875387877225876,
0.0573115348815918,
0.145560622215271,
-0.16493064165115356,
0.360256165266037,
0.32214710116386414,
0.10526168346405029,
-0.09765415638685226,
-0.13371111452579498,
-0.0250110886991024,
-0.058592356741428375,
0.09974229335784912,
0.007113436236977577,
-0.12325386703014374,
0.3526095449924469,
0.05927529186010361,
0.07250991463661194,
0.13341714441776276,
-0.015734201297163963,
0.1992558091878891,
0.6430344581604004,
-0.3184690773487091,
-0.15330591797828674,
0.1008865088224411,
0.3969039022922516,
0.06361836194992065,
-0.2406957447528839,
0.02173830196261406,
-0.10309049487113953,
0.16990116238594055,
-0.11913131177425385,
-0.3583346903324127,
0.29396992921829224,
-0.039026789367198944,
0.4631407558917999,
-0.1670791208744049,
-0.04968792200088501,
-0.1617465317249298,
-0.009503256529569626,
-0.3262392282485962,
0.014424951747059822,
-0.08357506990432739,
0.05233702436089516,
0.3778172433376312,
-0.10140392929315567,
-0.16669854521751404,
-0.110144704580307,
-0.3528408408164978,
0.36510270833969116,
-0.07837733626365662,
0.19085723161697388,
-0.33126598596572876,
0.15231244266033173,
-0.1622551828622818,
0.21218694746494293,
-0.14905132353305817,
0.22920027375221252,
-0.030472062528133392,
0.10276796668767929,
-0.46285372972488403,
-0.024379368871450424,
0.20069517195224762,
-0.5068429708480835,
-0.33655163645744324,
0.009079893119633198,
0.06391751766204834,
0.16693741083145142,
0.13763931393623352,
-0.265369713306427,
0.07486142963171005,
0.3376462757587433,
0.03853415697813034,
0.17837943136692047,
0.26750046014785767,
0.10029551386833191,
0.18168815970420837,
-0.2132285088300705,
0.2934386134147644,
0.16438233852386475,
-0.09280498325824738,
-0.1694597601890564,
-0.3280503749847412
] |
https://github.com/huggingface/datasets/issues/6277
|
FileNotFoundError: Couldn't find a module script at /content/paws-x/paws-x.py. Module 'paws-x' doesn't exist on the Hugging Face Hub either.
|
`evaluate.load("paws-x", "es")` throws the error because there is no such metric in the `evaluate` lib.
So, this is unrelated to our lib.
|
### Describe the bug
I'm encountering a "FileNotFoundError" while attempting to use the "paws-x" dataset to retrain the DistilRoBERTa-base model. The error message is as follows:
FileNotFoundError: Couldn't find a module script at /content/paws-x/paws-x.py. Module 'paws-x' doesn't exist on the Hugging Face Hub either.
### Steps to reproduce the bug
https://colab.research.google.com/drive/11xUUFxloClpmqLvDy_Xxfmo3oUzjY5nx#scrollTo=kUn74FigzhHm
### Expected behavior
The the trained model
### Environment info
colab, "paws-x" dataset , DistilRoBERTa-base model
| 22
|
FileNotFoundError: Couldn't find a module script at /content/paws-x/paws-x.py. Module 'paws-x' doesn't exist on the Hugging Face Hub either.
### Describe the bug
I'm encountering a "FileNotFoundError" while attempting to use the "paws-x" dataset to retrain the DistilRoBERTa-base model. The error message is as follows:
FileNotFoundError: Couldn't find a module script at /content/paws-x/paws-x.py. Module 'paws-x' doesn't exist on the Hugging Face Hub either.
### Steps to reproduce the bug
https://colab.research.google.com/drive/11xUUFxloClpmqLvDy_Xxfmo3oUzjY5nx#scrollTo=kUn74FigzhHm
### Expected behavior
The the trained model
### Environment info
colab, "paws-x" dataset , DistilRoBERTa-base model
`evaluate.load("paws-x", "es")` throws the error because there is no such metric in the `evaluate` lib.
So, this is unrelated to our lib.
|
[
-0.18073666095733643,
-0.12753760814666748,
0.06361949443817139,
0.07010312378406525,
0.42050766944885254,
0.13324666023254395,
0.19292797148227692,
0.4627462923526764,
0.15083874762058258,
0.3782460689544678,
-0.019545741379261017,
0.13660338521003723,
-0.07175438106060028,
0.09107085317373276,
0.12902656197547913,
0.14122602343559265,
0.15355245769023895,
0.3041869103908539,
0.05389653518795967,
-0.14200134575366974,
-0.17122876644134521,
0.29133230447769165,
-0.2816779613494873,
0.04713532328605652,
-0.6001802086830139,
0.12479154765605927,
-0.16273535788059235,
0.4340662956237793,
-0.2344300001859665,
-0.28796711564064026,
0.2947313189506531,
-0.17463667690753937,
0.1994239240884781,
0.345647394657135,
-0.00012282705574762076,
0.04042401164770126,
0.07868864387273788,
-0.11602724343538284,
-0.11920875310897827,
-0.3907235860824585,
0.2704835832118988,
-0.2675568759441376,
0.09029236435890198,
-0.2968129515647888,
-0.023443393409252167,
-0.12744291126728058,
0.3532218933105469,
0.2600748538970947,
0.3588050603866577,
0.40542489290237427,
0.100071981549263,
0.22084224224090576,
-0.032333653420209885,
-0.23815418779850006,
0.12093157321214676,
0.18398818373680115,
-0.17894324660301208,
0.4202114939689636,
0.13711687922477722,
-0.2585721015930176,
-0.022761858999729156,
0.21100002527236938,
0.03711327910423279,
-0.3602801561355591,
0.2937700152397156,
0.247478187084198,
0.7883005142211914,
-0.3046231269836426,
-0.04638465493917465,
0.376798152923584,
0.12115391343832016,
-0.3256625533103943,
-0.27310553193092346,
-0.1811043918132782,
0.11628708243370056,
-0.25111711025238037,
0.14871147274971008,
0.010488942265510559,
0.06716494262218475,
0.23294563591480255,
0.25843024253845215,
-0.12447651475667953,
-0.06072617322206497,
0.06723141670227051,
0.12215261161327362,
0.41772380471229553,
0.008297664113342762,
0.040699198842048645,
0.015187904238700867,
0.13185566663742065,
0.21173058450222015,
0.16155974566936493,
-0.0780574381351471,
0.19782716035842896,
-0.1713462471961975,
-0.13733838498592377,
0.11061389744281769,
0.32334405183792114,
0.037878818809986115,
0.2792823016643524,
0.2398102581501007,
-0.19810757040977478,
-0.192506343126297,
0.11434686928987503,
0.06092124432325363,
0.48670196533203125,
-0.010231256484985352,
0.18082082271575928,
0.3108483552932739,
0.5776768922805786,
-0.176339790225029,
-0.12248500436544418,
-0.02661225199699402,
-0.21572932600975037,
-0.3244814872741699,
0.20022794604301453,
0.3663668632507324,
-0.048215992748737335,
-0.6423630118370056,
0.0022898726165294647,
-0.14562325179576874,
-0.0045114848762750626,
0.3633202314376831,
0.43326279520988464,
-0.1687656193971634,
0.40160587430000305,
0.3055795431137085,
0.05019356310367584,
-0.308213472366333,
-0.055365171283483505,
-0.2889082729816437,
0.6403993368148804,
-0.638494610786438,
-0.004761707037687302,
-0.16015297174453735,
-0.13015809655189514,
0.3687167465686798,
-0.26508140563964844,
0.5571195483207703,
-0.13761752843856812,
-0.1721261888742447,
-0.06188373640179634,
0.00540904700756073,
0.26970189809799194,
-0.07618503272533417,
-0.3131786286830902,
0.1353824883699417,
-0.3752768635749817,
-0.21493211388587952,
0.14832371473312378,
-0.4676588773727417,
0.03509427234530449,
0.07083838433027267,
0.038040243089199066,
-0.5614885687828064,
0.09306995570659637,
0.09841012954711914,
0.03275608271360397,
-0.22610121965408325,
-0.31001847982406616,
0.2897067368030548,
-0.12710531055927277,
-0.23317335546016693,
-0.2531244158744812,
0.2766871154308319,
0.7350583076477051,
-0.16292913258075714,
-0.09526196867227554,
-0.0974850207567215,
-0.06530089676380157,
0.03892407938838005,
-0.11752553284168243,
0.10396011918783188,
0.48457786440849304,
-0.405586302280426,
0.21269996464252472,
0.6006090641021729,
-0.6484624743461609,
-0.27502933144569397,
-0.1515990048646927,
-0.20118902623653412,
-0.05464814975857735,
0.16901618242263794,
0.20217475295066833,
-0.1971430480480194,
-0.13838118314743042,
0.052789393812417984,
-0.058807678520679474,
0.033331211656332016,
-0.190181702375412,
-0.24132999777793884,
-0.33668577671051025,
0.13269588351249695,
0.16298630833625793,
0.3456985652446747,
-0.01418565958738327,
0.16181766986846924,
0.3786751329898834,
0.3234200179576874,
-0.21644702553749084,
-0.19534407556056976,
0.15977661311626434,
0.5169247984886169,
0.021930888295173645,
0.03328624740242958,
-0.3580445349216461,
0.18789641559123993,
0.25604698061943054,
-0.17679159343242645,
-0.005913197994232178,
0.2973332405090332,
-0.06323040276765823,
-0.26319023966789246,
0.04896517097949982,
-0.19942419230937958,
-0.24925673007965088,
0.05283993482589722,
-0.05153682827949524,
0.02123301476240158,
0.32819417119026184,
-0.45346325635910034,
0.5495991706848145,
-0.19736503064632416,
0.27490389347076416,
-0.36842697858810425,
0.32097405195236206,
-0.019823512062430382,
-0.3323153257369995,
-0.11275587975978851,
0.5085693597793579,
0.057331837713718414,
-0.06945141404867172,
0.08441141992807388,
0.34735924005508423,
-0.030960040166974068,
-0.08389970660209656,
0.38854238390922546,
-0.0879320353269577,
0.1007019579410553,
-0.06807424128055573,
0.03094186820089817,
0.08419714868068695,
0.22627848386764526,
0.03809186816215515,
0.2875911295413971,
0.3632087707519531,
-0.027508754283189774,
-0.056674711406230927,
0.06028708070516586,
0.07670170813798904,
-0.14526009559631348,
-0.2430284023284912,
-0.20638327300548553,
-0.26883822679519653,
0.4121688902378082,
0.30690598487854004,
0.18397139012813568,
-0.27402463555336,
-0.00719817727804184,
-0.17851313948631287,
0.5084851384162903,
-0.052235592156648636,
0.1598976105451584,
0.12804138660430908,
-0.01666145771741867,
0.052809812128543854,
-0.2178700715303421,
0.08269542455673218,
0.6177171468734741,
0.14300207793712616,
-0.25365835428237915,
0.4054495096206665,
-0.25496426224708557,
-0.20232197642326355,
-0.024870745837688446,
0.16658636927604675,
-0.3284972012042999,
0.24411675333976746,
-0.03946439176797867,
-0.09061087667942047,
-0.2550428807735443,
-0.2858835458755493,
-0.19120876491069794,
0.12945996224880219,
-0.3874721825122833,
0.0532725527882576,
-0.23567353188991547,
0.14516812562942505,
-0.047212742269039154,
-0.011529500596225262,
-0.1988813430070877,
-0.197922945022583,
0.1574162095785141,
-0.007973756641149521,
0.09396615624427795,
0.16525106132030487,
-0.3534853756427765,
0.17934080958366394,
-0.2163662165403366,
0.0367073193192482,
-0.026053138077259064,
-0.18492086231708527,
-0.27936792373657227,
-0.11471325159072876,
0.2694956958293915,
0.12120383977890015,
0.013300644233822823,
-0.5862399935722351,
0.16312159597873688,
-0.0961795225739479,
-0.458548903465271,
0.09390700608491898,
-0.010211974382400513,
0.4143245220184326,
0.2614890933036804,
-0.014718443155288696,
-0.25541990995407104,
-0.0009683789685368538,
0.14328373968601227,
-0.19424934685230255,
-0.16925403475761414,
-0.040234945714473724,
0.09701190888881683,
0.0020842074882239103,
-0.1829822063446045,
-0.326410710811615,
0.048589035868644714,
-0.23644518852233887,
-0.04182282090187073,
-0.04903365299105644,
-0.008632853627204895,
0.35053908824920654,
0.13621433079242706,
0.2786351144313812,
-0.2902522683143616,
-0.0008041327819228172,
-0.00026974640786647797,
-0.37946638464927673,
0.4556756913661957,
0.14155198633670807,
-0.23532508313655853,
0.398429811000824,
-0.19862444698810577,
-0.0270557664334774,
-0.0826292335987091,
-0.24843136966228485,
-0.752442479133606,
0.3185085654258728,
-0.14690768718719482,
-0.18358053267002106,
0.2107146829366684,
0.30792301893234253,
-0.19252909719944,
0.09101448953151703,
-0.24737167358398438,
-0.07993753999471664,
0.129039466381073,
0.37446343898773193,
0.48987677693367004,
-0.36032724380493164,
0.10045013576745987,
-0.21800778806209564,
0.20644845068454742,
-0.04473895579576492,
0.06633099168539047,
0.5074107050895691,
-0.09206073731184006,
0.6389978528022766,
0.022480878978967667,
-0.1088930144906044,
-0.13173052668571472,
0.20553722977638245,
-0.1175641119480133,
0.35346320271492004,
0.10499653965234756,
0.28273287415504456,
-0.3858374059200287,
-0.3428616523742676,
-0.30207476019859314,
-0.2868589162826538,
-0.06682021170854568,
-0.06202516704797745,
-0.14010736346244812,
0.0142238549888134,
0.23379763960838318,
-0.06128910928964615,
0.045484449714422226,
0.25833606719970703,
0.6264761090278625,
-0.08516960591077805,
0.05561847239732742,
0.10756833851337433,
-0.4615687131881714,
-0.08767520636320114,
0.2306009978055954,
0.007331861183047295,
-0.14365822076797485,
-0.10314321517944336,
-0.24094435572624207,
0.10545628517866135,
-0.20346471667289734,
0.6065689921379089,
-0.18006575107574463,
-0.11245684325695038,
0.10358349978923798,
-0.0931970477104187,
-0.08797839283943176,
-0.22018225491046906,
-0.07613862305879593,
0.011522313579916954,
-0.06814219057559967,
0.279817134141922,
-0.15202274918556213,
0.011870445683598518,
0.2935486435890198,
0.08328431844711304,
-0.16321709752082825,
0.07476059347391129,
-0.4843352138996124,
-0.553567111492157,
0.028481097891926765,
-0.1632714569568634,
-0.04387127608060837,
0.11435879021883011,
0.4521588087081909,
0.25165465474128723,
-0.07188865542411804,
-0.2630115747451782,
0.3994861841201782,
0.19298121333122253,
0.2890980839729309,
-0.13408713042736053,
0.14103449881076813,
0.10276518017053604,
0.1594487875699997,
0.1318567991256714,
0.2838224172592163,
-0.23786333203315735,
-0.33440491557121277,
-0.12928518652915955,
0.014772997237741947,
0.23181959986686707,
0.5163402557373047,
-0.21286779642105103,
-0.0764637365937233,
-0.09601928293704987,
0.11620780825614929,
0.08119895309209824,
0.21659627556800842,
0.23865197598934174,
0.05828592926263809,
-0.06709243357181549,
-0.2270795851945877,
0.2695342004299164,
0.14315350353717804,
0.13835012912750244,
0.13799390196800232,
0.21421517431735992,
-0.12663723528385162,
0.061347223818302155,
0.0212535560131073,
1.218565821647644,
0.15010149776935577,
0.20519042015075684,
0.42798423767089844,
-0.043444279581308365,
0.4600396156311035,
-0.30653494596481323,
0.23611561954021454,
-0.38936296105384827,
-0.32610562443733215,
-0.1284814029932022,
-0.11507295072078705,
0.34729352593421936,
-0.2733151316642761,
-0.12194427847862244,
0.5820465087890625,
0.0031218230724334717,
-0.04143083468079567,
0.01435107085853815,
-0.24189937114715576,
-0.3233433663845062,
0.12427899241447449,
-0.3403097987174988,
-0.06104240193963051,
0.03140148147940636,
0.3645331859588623,
-0.30559858679771423,
-0.32685673236846924,
-0.5066157579421997,
-0.2311590015888214,
-0.10859772562980652,
0.15185800194740295,
-0.2022114247083664,
-0.09280801564455032,
0.22162756323814392,
-0.27947527170181274,
-0.0276934877038002,
0.31706351041793823,
0.4258694648742676,
-0.1489885151386261,
-0.23995447158813477,
0.31734997034072876,
-0.3331030309200287,
-0.13204780220985413,
-0.10198494046926498,
-0.00521975988522172,
0.42259225249290466,
-0.1452004611492157,
-0.2908409535884857,
-0.11944755166769028,
0.07397899031639099,
0.0815238356590271,
0.07133321464061737,
0.227492094039917,
0.07901821285486221,
-0.06671270728111267,
-0.24048736691474915,
0.100795678794384,
0.08678282797336578,
-0.08233153820037842,
0.02752310410141945,
0.09877496212720871,
-0.3172317147254944,
0.12234437465667725,
-0.024038221687078476,
-0.3126218020915985,
-0.011513680219650269,
0.2644289433956146,
0.006122732535004616,
0.04465538263320923,
0.31993380188941956,
-0.24048660695552826,
-0.07066294550895691,
-0.06685534119606018,
-0.09333867579698563,
0.22969141602516174,
-0.5472054481506348,
0.2695322036743164,
0.01617422141134739,
0.013380870223045349,
-0.04708073288202286,
0.06851884722709656,
0.14149513840675354,
-0.22600558400154114,
-0.2064255177974701,
-0.38588979840278625,
-0.16686460375785828,
0.34054839611053467,
0.18992851674556732,
0.05307973921298981,
-0.16881659626960754,
0.4285825192928314,
0.04784069210290909,
-0.5475866198539734,
-0.17189881205558777,
0.1172117292881012,
-0.2647596299648285,
-0.030080921947956085,
-0.15157149732112885,
-0.07242173701524734,
0.38744455575942993,
0.03311268985271454,
-0.014352220110595226,
0.1760675460100174,
-0.1994336098432541,
-0.04851238429546356,
-0.064285509288311,
0.18799899518489838,
-0.046182237565517426,
0.14164601266384125,
0.2620067596435547,
0.08210683614015579,
-0.1361539214849472,
-0.155608668923378,
-0.05975693091750145,
0.33312809467315674,
0.007078573107719421,
0.07220553606748581,
0.14577844738960266,
0.20282238721847534,
0.04298722743988037,
0.060098592191934586,
0.1132403016090393,
0.27545854449272156,
0.09023714065551758,
0.10965020954608917,
-0.26393619179725647,
0.07732267677783966,
0.05372202768921852,
0.19185343384742737,
-0.1574663668870926,
-0.046303339302539825,
0.16486772894859314,
0.10928422212600708,
-0.10045820474624634,
0.11344840377569199,
0.08932428061962128,
0.4632965922355652,
-0.11421675980091095,
0.06235092133283615,
0.2743319272994995,
-0.04006241261959076,
-0.5051219463348389,
0.25604626536369324,
0.4481305480003357,
0.03316498547792435,
0.05287902429699898,
0.410469651222229,
-0.07319104671478271,
0.10564281046390533,
-0.06649535894393921,
0.15224024653434753,
0.4149746894836426,
0.1337321549654007,
0.1474030315876007,
0.5252832174301147,
-0.000967465341091156,
0.42390695214271545,
0.10518679022789001,
-0.06114349886775017,
0.25295206904411316,
0.39351987838745117,
-0.2629529535770416,
0.47975197434425354,
-0.2503543198108673,
0.07805503159761429,
-0.21266642212867737,
-0.1658497452735901,
0.03814641386270523,
0.1509012132883072,
0.3978423774242401,
-0.078916035592556,
-0.27303335070610046,
0.6054705381393433,
-0.1119426041841507,
0.31566113233566284,
-0.22891493141651154,
0.17023035883903503,
-0.14124539494514465,
0.10891954600811005,
0.08082107454538345,
-0.1844942271709442,
-0.3620290160179138,
-0.11702360212802887,
0.3209167420864105,
0.06508956104516983,
-0.13406427204608917,
0.00350942462682724,
-0.3407280445098877,
0.41248974204063416,
-0.20543599128723145,
0.2919887900352478,
0.26047930121421814,
-0.2514961361885071,
-0.03496594727039337,
0.26620662212371826,
-0.0399646982550621,
0.2022344321012497,
0.2741190493106842,
0.3929588496685028,
0.18062368035316467,
-0.18548929691314697,
-0.2014819085597992,
0.039721548557281494,
0.05169496685266495,
0.07761532068252563,
0.1149255558848381,
0.059407059103250504,
0.6536502242088318,
0.06231527402997017,
0.04352510720491409,
-0.12432770431041718,
0.3570939600467682,
-0.21893467009067535,
0.3137544095516205,
-0.33309492468833923,
0.4520667493343353,
-0.19033366441726685,
0.07144730538129807,
-0.518355131149292,
0.009101726114749908,
-0.4999698996543884,
-0.007180526852607727,
0.03889249265193939,
0.16129586100578308,
-0.05082816630601883,
-0.13035175204277039,
-0.006937473081052303,
-0.19865484535694122,
0.09129416942596436,
0.49208009243011475,
-0.34721270203590393,
-0.17180700600147247,
0.11321209371089935,
-0.6473734378814697,
0.14779578149318695,
-0.133291557431221,
-0.19517530500888824,
-0.20670254528522491,
-0.16311371326446533,
-0.29264581203460693,
-0.189454585313797,
0.5793605446815491,
0.20917370915412903,
-0.025700651109218597,
-0.05438202619552612,
-0.13020411133766174,
-0.38635146617889404,
-0.37686288356781006,
-0.21775083243846893,
0.12082117795944214,
-0.23698380589485168,
-0.18833962082862854,
-0.04093508422374725,
-0.17524850368499756,
0.22169649600982666,
-0.3372870683670044,
-0.2017761468887329,
-0.128627747297287,
0.4231768548488617,
-0.14619866013526917,
0.34958696365356445,
-0.017404861748218536,
0.0534171536564827,
-0.19360199570655823,
-0.18924744427204132,
0.04195132479071617,
-0.004658006131649017,
0.1536039561033249,
0.32372310757637024,
-0.49820446968078613,
-0.07679931819438934,
-0.19203978776931763,
0.3015980124473572,
0.21705062687397003,
-0.33282041549682617,
-0.32082220911979675,
0.09587224572896957,
-0.014643553644418716,
-0.012966351583600044,
0.0909024178981781,
0.14233198761940002,
-0.2503562569618225,
0.031103381887078285,
-0.18942901492118835,
-0.22053071856498718,
0.6417372226715088,
-0.17743606865406036,
-0.18003679811954498,
-0.20736625790596008,
0.3504880964756012,
0.07378526777029037,
-0.19158461689949036,
-0.6018127202987671,
0.09755513817071915,
0.08370254933834076,
0.33842188119888306,
-0.33410391211509705,
0.3262271583080292,
-0.3750477135181427,
-0.11670160293579102,
0.21832233667373657,
-0.5230611562728882,
-0.03419080376625061,
0.04100976884365082,
0.3404304087162018,
-0.1352757066488266
] |
https://github.com/huggingface/datasets/issues/6276
|
I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error
|
Since you are using Windows, maybe moving the `map` call inside `if __name__ == "__main__"` can fix the issue:
```python
if __name__ == "__main__":
common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)
```
Otherwise, the only solution is to set `num_proc=1`.
|
### Describe the bug
I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error, i'm following the steps in this blog post
https://huggingface.co/blog/fine-tune-whisper
I tried google collab and it works but because I'm on the free version the training doesn't complete
the error comes in jupyter notebook when i run this line
`common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)`
here is the error message
```
Map (num_proc=4): 0% 0/2506 [00:52<?, ? examples/s]
The above exception was the direct cause of the following exception:
NameError Traceback (most recent call last) Cell In[19], line 1 ----> 1 common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)
File ~\anaconda\Lib\site-packages\datasets\dataset_dict.py:853, in DatasetDict.map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 850 if cache_file_names is None: 851 cache_file_names = {k: None for k in self} 852 return DatasetDict( --> 853 { 854 k: dataset.map( 855 function=function, 856 with_indices=with_indices, 857 with_rank=with_rank, 858 input_columns=input_columns, 859 batched=batched, 860 batch_size=batch_size, 861 drop_last_batch=drop_last_batch, 862 remove_columns=remove_columns, 863 keep_in_memory=keep_in_memory, 864 load_from_cache_file=load_from_cache_file, 865 cache_file_name=cache_file_names[k], 866 writer_batch_size=writer_batch_size, 867 features=features, 868 disable_nullable=disable_nullable, 869 fn_kwargs=fn_kwargs, 870 num_proc=num_proc, 871 desc=desc, 872 ) 873 for k, dataset in self.items() 874 } 875 )
File ~\anaconda\Lib\site-packages\datasets\dataset_dict.py:854, in <dictcomp>(.0) 850 if cache_file_names is None: 851 cache_file_names = {k: None for k in self} 852 return DatasetDict( 853 { --> 854 k: dataset.map( 855 function=function, 856 with_indices=with_indices, 857 with_rank=with_rank, 858 input_columns=input_columns, 859 batched=batched, 860 batch_size=batch_size, 861 drop_last_batch=drop_last_batch, 862 remove_columns=remove_columns, 863 keep_in_memory=keep_in_memory, 864 load_from_cache_file=load_from_cache_file, 865 cache_file_name=cache_file_names[k], 866 writer_batch_size=writer_batch_size, 867 features=features, 868 disable_nullable=disable_nullable, 869 fn_kwargs=fn_kwargs, 870 num_proc=num_proc, 871 desc=desc, 872 ) 873 for k, dataset in self.items() 874 } 875 )
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:592, in transmit_tasks.<locals>.wrapper(*args, **kwargs) 590 self: "Dataset" = kwargs.pop("self") 591 # apply actual function --> 592 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 593 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 594 for dataset in datasets: 595 # Remove task templates if a column mapping of the template is no longer valid
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs) 550 self_format = { 551 "type": self._format_type, 552 "format_kwargs": self._format_kwargs, 553 "columns": self._format_columns, 554 "output_all_columns": self._output_all_columns, 555 } 556 # apply actual function --> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 559 # re-apply format to the output
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:3189, in Dataset.map(self, function, with_indices, with_rank, 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) 3182 logger.info(f"Spawning {num_proc} processes") 3183 with logging.tqdm( 3184 disable=not logging.is_progress_bar_enabled(), 3185 unit=" examples", 3186 total=pbar_total, 3187 desc=(desc or "Map") + f" (num_proc={num_proc})", 3188 ) as pbar: -> 3189 for rank, done, content in iflatmap_unordered( 3190 pool, Dataset._map_single, kwargs_iterable=kwargs_per_job 3191 ): 3192 if done: 3193 shards_done += 1
File ~\anaconda\Lib\site-packages\datasets\utils\py_utils.py:1394, in iflatmap_unordered(pool, func, kwargs_iterable) 1391 finally: 1392 if not pool_changed: 1393 # we get the result in case there's an error to raise -> 1394 [async_result.get(timeout=0.05) for async_result in async_results]
File ~\anaconda\Lib\site-packages\datasets\utils\py_utils.py:1394, in <listcomp>(.0) 1391 finally: 1392 if not pool_changed: 1393 # we get the result in case there's an error to raise -> 1394 [async_result.get(timeout=0.05) for async_result in async_results]
File ~\anaconda\Lib\site-packages\multiprocess\pool.py:774, in ApplyResult.get(self, timeout) 772 return self._value 773 else: --> 774 raise self._value
NameError: name 'feature_extractor' is not defined
```
### Steps to reproduce the bug
1. follow the steps in this blog post
https://huggingface.co/blog/fine-tune-whisper
2. run this line of code
`common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)`
3. I'm using jupyter notebook from anaconda
### Expected behavior
No error message
### Environment info
datasets version: 2.8.0
Python version: 3.11
Windows 10
| 38
|
I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error
### Describe the bug
I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error, i'm following the steps in this blog post
https://huggingface.co/blog/fine-tune-whisper
I tried google collab and it works but because I'm on the free version the training doesn't complete
the error comes in jupyter notebook when i run this line
`common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)`
here is the error message
```
Map (num_proc=4): 0% 0/2506 [00:52<?, ? examples/s]
The above exception was the direct cause of the following exception:
NameError Traceback (most recent call last) Cell In[19], line 1 ----> 1 common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)
File ~\anaconda\Lib\site-packages\datasets\dataset_dict.py:853, in DatasetDict.map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 850 if cache_file_names is None: 851 cache_file_names = {k: None for k in self} 852 return DatasetDict( --> 853 { 854 k: dataset.map( 855 function=function, 856 with_indices=with_indices, 857 with_rank=with_rank, 858 input_columns=input_columns, 859 batched=batched, 860 batch_size=batch_size, 861 drop_last_batch=drop_last_batch, 862 remove_columns=remove_columns, 863 keep_in_memory=keep_in_memory, 864 load_from_cache_file=load_from_cache_file, 865 cache_file_name=cache_file_names[k], 866 writer_batch_size=writer_batch_size, 867 features=features, 868 disable_nullable=disable_nullable, 869 fn_kwargs=fn_kwargs, 870 num_proc=num_proc, 871 desc=desc, 872 ) 873 for k, dataset in self.items() 874 } 875 )
File ~\anaconda\Lib\site-packages\datasets\dataset_dict.py:854, in <dictcomp>(.0) 850 if cache_file_names is None: 851 cache_file_names = {k: None for k in self} 852 return DatasetDict( 853 { --> 854 k: dataset.map( 855 function=function, 856 with_indices=with_indices, 857 with_rank=with_rank, 858 input_columns=input_columns, 859 batched=batched, 860 batch_size=batch_size, 861 drop_last_batch=drop_last_batch, 862 remove_columns=remove_columns, 863 keep_in_memory=keep_in_memory, 864 load_from_cache_file=load_from_cache_file, 865 cache_file_name=cache_file_names[k], 866 writer_batch_size=writer_batch_size, 867 features=features, 868 disable_nullable=disable_nullable, 869 fn_kwargs=fn_kwargs, 870 num_proc=num_proc, 871 desc=desc, 872 ) 873 for k, dataset in self.items() 874 } 875 )
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:592, in transmit_tasks.<locals>.wrapper(*args, **kwargs) 590 self: "Dataset" = kwargs.pop("self") 591 # apply actual function --> 592 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 593 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 594 for dataset in datasets: 595 # Remove task templates if a column mapping of the template is no longer valid
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs) 550 self_format = { 551 "type": self._format_type, 552 "format_kwargs": self._format_kwargs, 553 "columns": self._format_columns, 554 "output_all_columns": self._output_all_columns, 555 } 556 # apply actual function --> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 559 # re-apply format to the output
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:3189, in Dataset.map(self, function, with_indices, with_rank, 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) 3182 logger.info(f"Spawning {num_proc} processes") 3183 with logging.tqdm( 3184 disable=not logging.is_progress_bar_enabled(), 3185 unit=" examples", 3186 total=pbar_total, 3187 desc=(desc or "Map") + f" (num_proc={num_proc})", 3188 ) as pbar: -> 3189 for rank, done, content in iflatmap_unordered( 3190 pool, Dataset._map_single, kwargs_iterable=kwargs_per_job 3191 ): 3192 if done: 3193 shards_done += 1
File ~\anaconda\Lib\site-packages\datasets\utils\py_utils.py:1394, in iflatmap_unordered(pool, func, kwargs_iterable) 1391 finally: 1392 if not pool_changed: 1393 # we get the result in case there's an error to raise -> 1394 [async_result.get(timeout=0.05) for async_result in async_results]
File ~\anaconda\Lib\site-packages\datasets\utils\py_utils.py:1394, in <listcomp>(.0) 1391 finally: 1392 if not pool_changed: 1393 # we get the result in case there's an error to raise -> 1394 [async_result.get(timeout=0.05) for async_result in async_results]
File ~\anaconda\Lib\site-packages\multiprocess\pool.py:774, in ApplyResult.get(self, timeout) 772 return self._value 773 else: --> 774 raise self._value
NameError: name 'feature_extractor' is not defined
```
### Steps to reproduce the bug
1. follow the steps in this blog post
https://huggingface.co/blog/fine-tune-whisper
2. run this line of code
`common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)`
3. I'm using jupyter notebook from anaconda
### Expected behavior
No error message
### Environment info
datasets version: 2.8.0
Python version: 3.11
Windows 10
Since you are using Windows, maybe moving the `map` call inside `if __name__ == "__main__"` can fix the issue:
```python
if __name__ == "__main__":
common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)
```
Otherwise, the only solution is to set `num_proc=1`.
|
[
-0.051130261272192,
-0.2417573183774948,
0.10620422661304474,
0.22932501137256622,
0.3709268569946289,
0.16901478171348572,
0.17301952838897705,
0.3357461094856262,
0.06762860715389252,
0.22165203094482422,
-0.40414491295814514,
0.15247990190982819,
-0.10573375225067139,
0.2656455636024475,
-0.2897332012653351,
-0.4169068932533264,
-0.002166338264942169,
0.08255651593208313,
0.06501727551221848,
0.13238275051116943,
-0.2948532700538635,
0.1670731008052826,
-0.43309664726257324,
0.4375014901161194,
-0.005591395776718855,
-0.4366741478443146,
0.03192780911922455,
-0.09617223590612411,
-0.3312341570854187,
-0.1603332757949829,
0.052873678505420685,
-0.13992606103420258,
0.06624707579612732,
0.5462730526924133,
-0.00012111193063901737,
0.05394349247217178,
0.31844913959503174,
-0.1722903549671173,
0.04955603554844856,
-0.3014638423919678,
0.3061152398586273,
0.250429630279541,
-0.0966886505484581,
-0.15007756650447845,
-0.16167211532592773,
0.09519565850496292,
-0.09089106321334839,
-0.26678040623664856,
0.4583679437637329,
0.41465604305267334,
0.0964403972029686,
0.42291805148124695,
0.6261516213417053,
-0.042179033160209656,
-0.013494119048118591,
-0.30958282947540283,
-0.2559337019920349,
0.4373675584793091,
-0.09002210199832916,
-0.36809730529785156,
0.12284240871667862,
0.44915178418159485,
-0.12700152397155762,
0.1168522834777832,
0.19262662529945374,
0.15015152096748352,
0.1979396641254425,
-0.5410192012786865,
-0.0079532191157341,
0.37970471382141113,
-0.0439743772149086,
-0.1858237385749817,
-0.26984286308288574,
-0.14821049571037292,
0.10640040040016174,
-0.24192145466804504,
0.009629987180233002,
0.042558759450912476,
-0.17558394372463226,
0.1100238561630249,
0.04081835225224495,
-0.04746521636843681,
-0.040848508477211,
0.027916129678487778,
0.12017719447612762,
0.21676233410835266,
-0.08889636397361755,
0.23710164427757263,
0.3657585382461548,
-0.2833494544029236,
-0.1417585015296936,
0.03499219939112663,
0.0265191663056612,
0.3177751898765564,
-0.6121677160263062,
-0.05237341299653053,
0.0057938918471336365,
-0.13743847608566284,
0.16335579752922058,
-0.26971280574798584,
0.43674811720848083,
-0.17850255966186523,
0.12113596498966217,
0.19875377416610718,
0.10312683880329132,
0.13188660144805908,
0.2248275876045227,
0.2376135289669037,
0.3819815516471863,
0.5106897950172424,
0.2819630205631256,
-0.08697627484798431,
-0.007815191522240639,
-0.13742317259311676,
-0.458943247795105,
-0.09096813201904297,
0.29894137382507324,
-0.13472449779510498,
-0.5112472772598267,
0.23295271396636963,
-0.030948515981435776,
-0.044569093734025955,
0.19276171922683716,
0.1329490840435028,
-0.08867856860160828,
-0.13495954871177673,
0.29641759395599365,
0.2305644303560257,
-0.05036351829767227,
-0.21375897526741028,
-0.046971116214990616,
0.19015191495418549,
-0.15778698027133942,
0.12915243208408356,
-0.07596765458583832,
0.1349668651819229,
0.42981141805648804,
-0.32332661747932434,
0.4203883409500122,
-0.07696852833032608,
-0.07220307737588882,
-0.13352128863334656,
-0.2094736099243164,
0.24027609825134277,
-0.18461953103542328,
-0.1771864891052246,
0.3021963834762573,
-0.5056798458099365,
-0.1676313281059265,
-0.2155112624168396,
-0.3334268033504486,
-0.3298192322254181,
0.09261056780815125,
0.006914346478879452,
-0.013074024580419064,
0.4123537540435791,
-0.18864792585372925,
-0.09936761856079102,
0.2433212399482727,
0.013317763805389404,
0.019540466368198395,
-0.04263603687286377,
-0.30844295024871826,
-0.09384491294622421,
0.40289461612701416,
0.31477439403533936,
-0.10397635400295258,
-0.2810896635055542,
0.1359005868434906,
0.07775101065635681,
0.2755470871925354,
0.49672532081604004,
0.11556008458137512,
-0.04285721480846405,
-0.04962296038866043,
0.23273302614688873,
0.08125096559524536,
-0.4104410707950592,
-0.32728075981140137,
-0.055334072560071945,
-0.33842718601226807,
-0.04218420758843422,
0.17412081360816956,
-0.1824379861354828,
-0.06632567197084427,
0.07338535785675049,
0.5861653089523315,
0.09490720182657242,
-0.1965743750333786,
-0.25364381074905396,
-0.23577097058296204,
0.08214695006608963,
0.1725248545408249,
0.2378072589635849,
-0.28232383728027344,
-0.01884009689092636,
-0.13284412026405334,
-0.09600428491830826,
0.2748395800590515,
-0.0547044463455677,
-0.09230337291955948,
-0.01571986824274063,
0.1529240608215332,
-0.15804262459278107,
0.034824568778276443,
0.23692482709884644,
-0.04972264915704727,
0.16222533583641052,
-0.07402987033128738,
0.37641483545303345,
-0.09708894789218903,
0.15175192058086395,
-0.019949249923229218,
0.06809864938259125,
-0.16097497940063477,
-0.3654439151287079,
-0.004146367311477661,
-0.12600122392177582,
0.17789755761623383,
-0.16574811935424805,
-0.20779061317443848,
0.2291182279586792,
-0.5212485194206238,
0.24230161309242249,
-0.6958335638046265,
0.17721962928771973,
-0.2777905762195587,
-0.2161145955324173,
0.23268693685531616,
0.25558027625083923,
0.001819700002670288,
0.0542122907936573,
-0.027854088693857193,
0.5456064343452454,
-0.09776417911052704,
-0.3795401453971863,
-0.2211664319038391,
0.08659394085407257,
-0.012103000655770302,
-0.10347580909729004,
-0.14661695063114166,
0.013364046812057495,
-0.01794164627790451,
-0.03644692897796631,
0.2241268754005432,
0.510931134223938,
0.31747671961784363,
0.20634010434150696,
-0.1260506510734558,
0.22942689061164856,
-0.024162014946341515,
-0.04759739339351654,
-0.1969449818134308,
-0.1442221999168396,
0.48516809940338135,
-0.4792439043521881,
0.229256734251976,
-0.251433402299881,
-0.10088422149419785,
-0.5365921854972839,
0.1708374321460724,
-0.06563051044940948,
0.25382545590400696,
-0.013331066817045212,
-0.11124435812234879,
0.1556152105331421,
-0.22508181631565094,
0.05881841853260994,
0.3417336642742157,
-0.02627066895365715,
-0.2910478115081787,
0.2218429148197174,
0.14502045512199402,
0.009110089391469955,
0.05236689746379852,
0.22620384395122528,
0.49862632155418396,
0.16628950834274292,
-0.05856490880250931,
0.1408156007528305,
-0.09529227018356323,
-0.3056315779685974,
-0.23190516233444214,
0.38656947016716003,
-0.2727615535259247,
-0.27203330397605896,
0.0731094628572464,
0.19181066751480103,
0.10142266005277634,
0.31268036365509033,
-0.3799886107444763,
-0.03611605614423752,
-0.0881122425198555,
-0.00453520193696022,
-0.0329722985625267,
0.30589088797569275,
0.16627971827983856,
0.37627920508384705,
0.21780923008918762,
0.3235440254211426,
-0.06855162978172302,
-0.15491722524166107,
-0.06220805644989014,
-0.06706266105175018,
0.12729144096374512,
-0.44672146439552307,
-0.11188217997550964,
-0.14942431449890137,
-0.1012268140912056,
0.0636877790093422,
-0.1898735761642456,
0.06181681901216507,
-0.28894609212875366,
0.43151819705963135,
0.3488644063472748,
0.35225623846054077,
-0.020079517737030983,
-0.3190135955810547,
0.35101082921028137,
-0.18072977662086487,
-0.3512137532234192,
0.07935118675231934,
0.07303617894649506,
-0.12372075766324997,
-0.032618701457977295,
-0.031055621802806854,
-0.40634655952453613,
-0.3318442702293396,
0.6025372743606567,
-0.22767427563667297,
0.036238424479961395,
0.05414288491010666,
-0.15379367768764496,
0.21800526976585388,
-0.315547913312912,
0.259346067905426,
-0.10953476279973984,
-0.385819673538208,
0.40893468260765076,
-0.11531054973602295,
-0.1938164383172989,
-0.19884836673736572,
0.20120090246200562,
0.36363711953163147,
-0.46764737367630005,
-0.3136030435562134,
-0.1023779809474945,
-0.09024353325366974,
0.11697529256343842,
-0.14949607849121094,
-0.04006614536046982,
0.1485530436038971,
-0.03049412928521633,
0.05094912648200989,
-0.18679460883140564,
-0.42132067680358887,
0.24406754970550537,
0.09518194943666458,
0.4098586440086365,
0.2252514660358429,
0.6043638586997986,
-0.10735397040843964,
0.03831329941749573,
0.27544349431991577,
-0.008049849420785904,
0.24371464550495148,
0.12448588013648987,
-0.018343951553106308,
-0.012771688401699066,
-0.20380789041519165,
0.33008211851119995,
0.10970672965049744,
-0.09808757156133652,
0.13277015089988708,
-0.07223595678806305,
-0.06086523085832596,
-0.5553121566772461,
-0.29234689474105835,
-0.057655420154333115,
-0.12253782153129578,
-0.21829019486904144,
0.08105627447366714,
0.19803473353385925,
-0.1955210566520691,
0.07564032822847366,
0.08358435332775116,
0.046217769384384155,
0.35897600650787354,
0.016065947711467743,
0.11576160788536072,
-0.1439080834388733,
-0.31170979142189026,
-0.3608173727989197,
-0.5071966648101807,
0.40660160779953003,
-0.13000674545764923,
0.4522319734096527,
-0.01632237434387207,
0.001865483820438385,
-0.21563605964183807,
0.17040309309959412,
0.7178689241409302,
-0.007806377485394478,
-0.021000169217586517,
-0.0973653495311737,
0.22667786478996277,
-0.14307932555675507,
-0.09847216308116913,
-0.019475536420941353,
0.007628952618688345,
0.3079599440097809,
0.4845382571220398,
-0.3119177222251892,
0.15737426280975342,
0.45010852813720703,
-0.11397092789411545,
0.03388155624270439,
0.05490225926041603,
-0.4120844006538391,
-0.1322910189628601,
-0.12613439559936523,
0.045791443437337875,
-0.007569201290607452,
0.33727288246154785,
0.23936396837234497,
0.4687533676624298,
0.32136672735214233,
-0.21365287899971008,
0.17868280410766602,
0.20716674625873566,
0.2854419946670532,
0.19556070864200592,
0.1786348968744278,
0.34606263041496277,
0.1915528029203415,
0.43223837018013,
0.2851257920265198,
-0.17636480927467346,
-0.4160136580467224,
0.21115809679031372,
0.12654204666614532,
0.3590262234210968,
0.1281028687953949,
-0.013191775418817997,
0.16230317950248718,
0.16314563155174255,
0.5982353091239929,
0.06658340990543365,
-0.05922187492251396,
0.4557575285434723,
0.11522163450717926,
-0.40409740805625916,
-0.044363945722579956,
0.3678681254386902,
0.155633345246315,
0.05580666661262512,
0.08012080192565918,
0.15140795707702637,
-0.07185675203800201,
0.41554969549179077,
0.20205633342266083,
0.9475745558738708,
0.05321317911148071,
-0.04255649074912071,
0.08859322965145111,
-0.13639628887176514,
0.31552964448928833,
-0.19161061942577362,
0.08139266818761826,
0.013080891221761703,
-0.30369606614112854,
0.029069116339087486,
-0.05959725379943848,
0.28401893377304077,
-0.0580948069691658,
-0.1449231654405594,
0.23109595477581024,
0.036218561232089996,
-0.18642622232437134,
0.03902548551559448,
-0.09001551568508148,
0.0812608003616333,
-0.08801059424877167,
-0.0005310457199811935,
-0.09006348252296448,
-0.22564943134784698,
0.2257876843214035,
0.2040712535381317,
-0.04011134058237076,
-0.2518458962440491,
-0.2814370095729828,
-0.2166673243045807,
-0.03584019094705582,
-0.5318973064422607,
-0.005507161840796471,
0.4824450612068176,
-0.15242935717105865,
0.1785392165184021,
0.2817760109901428,
0.4356312155723572,
0.34000852704048157,
-0.28115102648735046,
0.1921406090259552,
0.4501972794532776,
-0.24046196043491364,
0.10981761664152145,
0.03981522098183632,
0.19135449826717377,
-0.07983492314815521,
0.035463981330394745,
0.023134421557188034,
-0.17328284680843353,
-0.08250267058610916,
-0.3889465928077698,
-0.11668655276298523,
0.4380972981452942,
-0.06932450085878372,
0.12378832697868347,
-0.1997479498386383,
0.07072901725769043,
-0.3176354467868805,
0.07133276760578156,
0.2060489058494568,
-0.43837854266166687,
-0.20390048623085022,
-0.13189242780208588,
-0.3664608597755432,
-0.04276422783732414,
0.27462711930274963,
0.014677776023745537,
0.020540736615657806,
0.48319923877716064,
0.10798612236976624,
-0.07259164750576019,
0.008172675967216492,
0.08968827873468399,
0.5692208409309387,
-0.22703856229782104,
0.22446231544017792,
0.20038902759552002,
-0.05196662247180939,
-0.30924734473228455,
0.2761435806751251,
0.42185455560684204,
-0.01438121497631073,
0.2513889968395233,
-0.33418339490890503,
-0.6526588201522827,
0.295097678899765,
-0.1557500660419464,
0.07152247428894043,
-0.13178303837776184,
0.35162967443466187,
-0.1126374751329422,
0.11191072314977646,
-0.17199307680130005,
-0.18585677444934845,
-0.45352742075920105,
0.05169801414012909,
0.6117978096008301,
0.005676858127117157,
0.0498427078127861,
-0.07264703512191772,
0.06944930553436279,
0.11732733249664307,
-0.08274884521961212,
-0.0341031551361084,
-0.14535954594612122,
0.15357035398483276,
-0.06344036012887955,
-0.1849220246076584,
0.2088429033756256,
0.004302356392145157,
-0.26396316289901733,
-0.08174010366201401,
-0.1082150936126709,
0.10540667921304703,
0.17891788482666016,
-0.019247697666287422,
0.11884181946516037,
0.020462002605199814,
0.13739824295043945,
-0.00864868238568306,
-0.18674898147583008,
0.12677867710590363,
0.17663419246673584,
-0.009986601769924164,
-0.2692561149597168,
-0.15194448828697205,
0.1149875670671463,
-0.02919919788837433,
-0.41262054443359375,
-0.06649529188871384,
0.16334345936775208,
-0.45800191164016724,
-0.30800938606262207,
-0.00928630493581295,
0.4242594540119171,
0.15613511204719543,
-0.20616981387138367,
-0.05955294519662857,
0.36507946252822876,
0.0055497679859399796,
-0.30935314297676086,
-0.1635877788066864,
0.14967641234397888,
-0.014666764996945858,
-0.012069538235664368,
0.2686302661895752,
-0.24325253069400787,
0.12736523151397705,
-0.46382761001586914,
-0.020513329654932022,
-0.08817300200462341,
0.053695760667324066,
0.1867164820432663,
0.41884681582450867,
0.117155060172081,
0.0029185153543949127,
0.2850874066352844,
-0.10704758763313293,
0.15411464869976044,
0.12707069516181946,
-0.2615264058113098,
0.23163536190986633,
-0.0130537711083889,
0.10919713973999023,
0.026693642139434814,
-0.3937639594078064,
-0.09838651120662689,
0.06133020669221878,
-0.23068088293075562,
0.2599996328353882,
-0.34106341004371643,
0.4878440201282501,
-0.11580345779657364,
-0.2529906630516052,
0.13550923764705658,
0.2182619720697403,
-0.20943623781204224,
-0.3045281767845154,
-0.26053351163864136,
-0.2631784975528717,
-0.29103899002075195,
0.14484193921089172,
0.11984670162200928,
0.14194157719612122,
0.3390422463417053,
-0.015640921890735626,
-0.2616037130355835,
0.06397167593240738,
-0.5474545955657959,
0.4225045442581177,
0.27595388889312744,
-0.45271429419517517,
0.12678107619285583,
0.08666761219501495,
-0.2171511948108673,
-0.07895328104496002,
0.360307902097702,
0.483277827501297,
0.15224632620811462,
-0.16785277426242828,
-0.054453831166028976,
0.15132935345172882,
-0.1569134145975113,
0.2661082446575165,
0.19834858179092407,
0.5461711883544922,
-0.011607863008975983,
0.2772137522697449,
-0.034456342458724976,
-0.10218184441328049,
0.12582942843437195,
-0.09534570574760437,
0.3726418614387512,
-0.15344120562076569,
0.02772696316242218,
-0.29387152194976807,
-0.32358217239379883,
-0.24252599477767944,
0.07156211137771606,
-0.47456079721450806,
0.22222338616847992,
0.020824216306209564,
-0.041099704802036285,
-0.09610525518655777,
-0.1968192607164383,
0.017879314720630646,
-0.06595852971076965,
0.6050191521644592,
0.39574354887008667,
0.19243848323822021,
-0.541763424873352,
-0.332275927066803,
-0.23209573328495026,
0.03479105979204178,
-0.08931930363178253,
-0.06550967693328857,
-0.12510913610458374,
-0.19320297241210938,
0.28478220105171204,
0.023161277174949646,
0.06806227564811707,
-0.3659858703613281,
-0.39966028928756714,
0.13607537746429443,
-0.3842678964138031,
-0.1593453586101532,
-0.10734540224075317,
0.14105553925037384,
0.3953363001346588,
-0.08614583313465118,
0.15852363407611847,
0.04806368052959442,
-0.1391516625881195,
0.022885648533701897,
0.13170063495635986,
-0.1102878749370575,
0.11560696363449097,
0.2501504123210907,
0.18847350776195526,
0.16025573015213013,
-0.016874520108103752,
-0.23449838161468506,
-0.034696001559495926,
0.016606686636805534,
-0.21265113353729248,
0.09201613068580627,
0.13925966620445251,
0.43952301144599915,
0.0032477276399731636,
-0.35938796401023865,
-0.4415512979030609,
0.2621133327484131,
0.018809661269187927,
-0.24307496845722198,
-0.19780275225639343,
0.19374790787696838,
0.3535231053829193,
-0.0100955069065094,
0.24177078902721405,
0.013922389596700668,
0.02604859322309494,
0.0006711501628160477,
-0.4054226279258728,
-0.3462916612625122,
0.8914777040481567,
-0.20117485523223877,
0.02973989024758339,
-0.01307431235909462,
0.2509537637233734,
-0.009426340460777283,
-0.24016296863555908,
-0.6903420686721802,
-0.03350892290472984,
0.15631990134716034,
0.15949738025665283,
-0.5399848818778992,
0.1339568793773651,
0.028643149882555008,
0.03278821334242821,
0.10895657539367676,
0.46238699555397034,
-0.04632662236690521,
-0.377921462059021,
0.20957595109939575,
-0.22979316115379333
] |
https://github.com/huggingface/datasets/issues/6276
|
I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error
|
> Since you are using Windows, maybe moving the `map` call inside `if __name__ == "__main__"` can fix the issue:
>
> ```python
> if __name__ == "__main__":
> common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)
> ```
>
> Otherwise, the only solution is to set `num_proc=1`.
Thank you very much for the response, i eventually tried setting `num_proc=1` and now the jupyter notebook kernel keers dying after running the command, what do you think the issue could be, could it be that my system is not capable of running the command "i'm using a Lenovo Thinkpad T440 with no GPU"
|
### Describe the bug
I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error, i'm following the steps in this blog post
https://huggingface.co/blog/fine-tune-whisper
I tried google collab and it works but because I'm on the free version the training doesn't complete
the error comes in jupyter notebook when i run this line
`common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)`
here is the error message
```
Map (num_proc=4): 0% 0/2506 [00:52<?, ? examples/s]
The above exception was the direct cause of the following exception:
NameError Traceback (most recent call last) Cell In[19], line 1 ----> 1 common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)
File ~\anaconda\Lib\site-packages\datasets\dataset_dict.py:853, in DatasetDict.map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 850 if cache_file_names is None: 851 cache_file_names = {k: None for k in self} 852 return DatasetDict( --> 853 { 854 k: dataset.map( 855 function=function, 856 with_indices=with_indices, 857 with_rank=with_rank, 858 input_columns=input_columns, 859 batched=batched, 860 batch_size=batch_size, 861 drop_last_batch=drop_last_batch, 862 remove_columns=remove_columns, 863 keep_in_memory=keep_in_memory, 864 load_from_cache_file=load_from_cache_file, 865 cache_file_name=cache_file_names[k], 866 writer_batch_size=writer_batch_size, 867 features=features, 868 disable_nullable=disable_nullable, 869 fn_kwargs=fn_kwargs, 870 num_proc=num_proc, 871 desc=desc, 872 ) 873 for k, dataset in self.items() 874 } 875 )
File ~\anaconda\Lib\site-packages\datasets\dataset_dict.py:854, in <dictcomp>(.0) 850 if cache_file_names is None: 851 cache_file_names = {k: None for k in self} 852 return DatasetDict( 853 { --> 854 k: dataset.map( 855 function=function, 856 with_indices=with_indices, 857 with_rank=with_rank, 858 input_columns=input_columns, 859 batched=batched, 860 batch_size=batch_size, 861 drop_last_batch=drop_last_batch, 862 remove_columns=remove_columns, 863 keep_in_memory=keep_in_memory, 864 load_from_cache_file=load_from_cache_file, 865 cache_file_name=cache_file_names[k], 866 writer_batch_size=writer_batch_size, 867 features=features, 868 disable_nullable=disable_nullable, 869 fn_kwargs=fn_kwargs, 870 num_proc=num_proc, 871 desc=desc, 872 ) 873 for k, dataset in self.items() 874 } 875 )
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:592, in transmit_tasks.<locals>.wrapper(*args, **kwargs) 590 self: "Dataset" = kwargs.pop("self") 591 # apply actual function --> 592 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 593 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 594 for dataset in datasets: 595 # Remove task templates if a column mapping of the template is no longer valid
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs) 550 self_format = { 551 "type": self._format_type, 552 "format_kwargs": self._format_kwargs, 553 "columns": self._format_columns, 554 "output_all_columns": self._output_all_columns, 555 } 556 # apply actual function --> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 559 # re-apply format to the output
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:3189, in Dataset.map(self, function, with_indices, with_rank, 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) 3182 logger.info(f"Spawning {num_proc} processes") 3183 with logging.tqdm( 3184 disable=not logging.is_progress_bar_enabled(), 3185 unit=" examples", 3186 total=pbar_total, 3187 desc=(desc or "Map") + f" (num_proc={num_proc})", 3188 ) as pbar: -> 3189 for rank, done, content in iflatmap_unordered( 3190 pool, Dataset._map_single, kwargs_iterable=kwargs_per_job 3191 ): 3192 if done: 3193 shards_done += 1
File ~\anaconda\Lib\site-packages\datasets\utils\py_utils.py:1394, in iflatmap_unordered(pool, func, kwargs_iterable) 1391 finally: 1392 if not pool_changed: 1393 # we get the result in case there's an error to raise -> 1394 [async_result.get(timeout=0.05) for async_result in async_results]
File ~\anaconda\Lib\site-packages\datasets\utils\py_utils.py:1394, in <listcomp>(.0) 1391 finally: 1392 if not pool_changed: 1393 # we get the result in case there's an error to raise -> 1394 [async_result.get(timeout=0.05) for async_result in async_results]
File ~\anaconda\Lib\site-packages\multiprocess\pool.py:774, in ApplyResult.get(self, timeout) 772 return self._value 773 else: --> 774 raise self._value
NameError: name 'feature_extractor' is not defined
```
### Steps to reproduce the bug
1. follow the steps in this blog post
https://huggingface.co/blog/fine-tune-whisper
2. run this line of code
`common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)`
3. I'm using jupyter notebook from anaconda
### Expected behavior
No error message
### Environment info
datasets version: 2.8.0
Python version: 3.11
Windows 10
| 100
|
I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error
### Describe the bug
I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error, i'm following the steps in this blog post
https://huggingface.co/blog/fine-tune-whisper
I tried google collab and it works but because I'm on the free version the training doesn't complete
the error comes in jupyter notebook when i run this line
`common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)`
here is the error message
```
Map (num_proc=4): 0% 0/2506 [00:52<?, ? examples/s]
The above exception was the direct cause of the following exception:
NameError Traceback (most recent call last) Cell In[19], line 1 ----> 1 common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)
File ~\anaconda\Lib\site-packages\datasets\dataset_dict.py:853, in DatasetDict.map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc) 850 if cache_file_names is None: 851 cache_file_names = {k: None for k in self} 852 return DatasetDict( --> 853 { 854 k: dataset.map( 855 function=function, 856 with_indices=with_indices, 857 with_rank=with_rank, 858 input_columns=input_columns, 859 batched=batched, 860 batch_size=batch_size, 861 drop_last_batch=drop_last_batch, 862 remove_columns=remove_columns, 863 keep_in_memory=keep_in_memory, 864 load_from_cache_file=load_from_cache_file, 865 cache_file_name=cache_file_names[k], 866 writer_batch_size=writer_batch_size, 867 features=features, 868 disable_nullable=disable_nullable, 869 fn_kwargs=fn_kwargs, 870 num_proc=num_proc, 871 desc=desc, 872 ) 873 for k, dataset in self.items() 874 } 875 )
File ~\anaconda\Lib\site-packages\datasets\dataset_dict.py:854, in <dictcomp>(.0) 850 if cache_file_names is None: 851 cache_file_names = {k: None for k in self} 852 return DatasetDict( 853 { --> 854 k: dataset.map( 855 function=function, 856 with_indices=with_indices, 857 with_rank=with_rank, 858 input_columns=input_columns, 859 batched=batched, 860 batch_size=batch_size, 861 drop_last_batch=drop_last_batch, 862 remove_columns=remove_columns, 863 keep_in_memory=keep_in_memory, 864 load_from_cache_file=load_from_cache_file, 865 cache_file_name=cache_file_names[k], 866 writer_batch_size=writer_batch_size, 867 features=features, 868 disable_nullable=disable_nullable, 869 fn_kwargs=fn_kwargs, 870 num_proc=num_proc, 871 desc=desc, 872 ) 873 for k, dataset in self.items() 874 } 875 )
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:592, in transmit_tasks.<locals>.wrapper(*args, **kwargs) 590 self: "Dataset" = kwargs.pop("self") 591 # apply actual function --> 592 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 593 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 594 for dataset in datasets: 595 # Remove task templates if a column mapping of the template is no longer valid
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs) 550 self_format = { 551 "type": self._format_type, 552 "format_kwargs": self._format_kwargs, 553 "columns": self._format_columns, 554 "output_all_columns": self._output_all_columns, 555 } 556 # apply actual function --> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 559 # re-apply format to the output
File ~\anaconda\Lib\site-packages\datasets\arrow_dataset.py:3189, in Dataset.map(self, function, with_indices, with_rank, 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) 3182 logger.info(f"Spawning {num_proc} processes") 3183 with logging.tqdm( 3184 disable=not logging.is_progress_bar_enabled(), 3185 unit=" examples", 3186 total=pbar_total, 3187 desc=(desc or "Map") + f" (num_proc={num_proc})", 3188 ) as pbar: -> 3189 for rank, done, content in iflatmap_unordered( 3190 pool, Dataset._map_single, kwargs_iterable=kwargs_per_job 3191 ): 3192 if done: 3193 shards_done += 1
File ~\anaconda\Lib\site-packages\datasets\utils\py_utils.py:1394, in iflatmap_unordered(pool, func, kwargs_iterable) 1391 finally: 1392 if not pool_changed: 1393 # we get the result in case there's an error to raise -> 1394 [async_result.get(timeout=0.05) for async_result in async_results]
File ~\anaconda\Lib\site-packages\datasets\utils\py_utils.py:1394, in <listcomp>(.0) 1391 finally: 1392 if not pool_changed: 1393 # we get the result in case there's an error to raise -> 1394 [async_result.get(timeout=0.05) for async_result in async_results]
File ~\anaconda\Lib\site-packages\multiprocess\pool.py:774, in ApplyResult.get(self, timeout) 772 return self._value 773 else: --> 774 raise self._value
NameError: name 'feature_extractor' is not defined
```
### Steps to reproduce the bug
1. follow the steps in this blog post
https://huggingface.co/blog/fine-tune-whisper
2. run this line of code
`common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)`
3. I'm using jupyter notebook from anaconda
### Expected behavior
No error message
### Environment info
datasets version: 2.8.0
Python version: 3.11
Windows 10
> Since you are using Windows, maybe moving the `map` call inside `if __name__ == "__main__"` can fix the issue:
>
> ```python
> if __name__ == "__main__":
> common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=4)
> ```
>
> Otherwise, the only solution is to set `num_proc=1`.
Thank you very much for the response, i eventually tried setting `num_proc=1` and now the jupyter notebook kernel keers dying after running the command, what do you think the issue could be, could it be that my system is not capable of running the command "i'm using a Lenovo Thinkpad T440 with no GPU"
|
[
-0.051130261272192,
-0.2417573183774948,
0.10620422661304474,
0.22932501137256622,
0.3709268569946289,
0.16901478171348572,
0.17301952838897705,
0.3357461094856262,
0.06762860715389252,
0.22165203094482422,
-0.40414491295814514,
0.15247990190982819,
-0.10573375225067139,
0.2656455636024475,
-0.2897332012653351,
-0.4169068932533264,
-0.002166338264942169,
0.08255651593208313,
0.06501727551221848,
0.13238275051116943,
-0.2948532700538635,
0.1670731008052826,
-0.43309664726257324,
0.4375014901161194,
-0.005591395776718855,
-0.4366741478443146,
0.03192780911922455,
-0.09617223590612411,
-0.3312341570854187,
-0.1603332757949829,
0.052873678505420685,
-0.13992606103420258,
0.06624707579612732,
0.5462730526924133,
-0.00012111193063901737,
0.05394349247217178,
0.31844913959503174,
-0.1722903549671173,
0.04955603554844856,
-0.3014638423919678,
0.3061152398586273,
0.250429630279541,
-0.0966886505484581,
-0.15007756650447845,
-0.16167211532592773,
0.09519565850496292,
-0.09089106321334839,
-0.26678040623664856,
0.4583679437637329,
0.41465604305267334,
0.0964403972029686,
0.42291805148124695,
0.6261516213417053,
-0.042179033160209656,
-0.013494119048118591,
-0.30958282947540283,
-0.2559337019920349,
0.4373675584793091,
-0.09002210199832916,
-0.36809730529785156,
0.12284240871667862,
0.44915178418159485,
-0.12700152397155762,
0.1168522834777832,
0.19262662529945374,
0.15015152096748352,
0.1979396641254425,
-0.5410192012786865,
-0.0079532191157341,
0.37970471382141113,
-0.0439743772149086,
-0.1858237385749817,
-0.26984286308288574,
-0.14821049571037292,
0.10640040040016174,
-0.24192145466804504,
0.009629987180233002,
0.042558759450912476,
-0.17558394372463226,
0.1100238561630249,
0.04081835225224495,
-0.04746521636843681,
-0.040848508477211,
0.027916129678487778,
0.12017719447612762,
0.21676233410835266,
-0.08889636397361755,
0.23710164427757263,
0.3657585382461548,
-0.2833494544029236,
-0.1417585015296936,
0.03499219939112663,
0.0265191663056612,
0.3177751898765564,
-0.6121677160263062,
-0.05237341299653053,
0.0057938918471336365,
-0.13743847608566284,
0.16335579752922058,
-0.26971280574798584,
0.43674811720848083,
-0.17850255966186523,
0.12113596498966217,
0.19875377416610718,
0.10312683880329132,
0.13188660144805908,
0.2248275876045227,
0.2376135289669037,
0.3819815516471863,
0.5106897950172424,
0.2819630205631256,
-0.08697627484798431,
-0.007815191522240639,
-0.13742317259311676,
-0.458943247795105,
-0.09096813201904297,
0.29894137382507324,
-0.13472449779510498,
-0.5112472772598267,
0.23295271396636963,
-0.030948515981435776,
-0.044569093734025955,
0.19276171922683716,
0.1329490840435028,
-0.08867856860160828,
-0.13495954871177673,
0.29641759395599365,
0.2305644303560257,
-0.05036351829767227,
-0.21375897526741028,
-0.046971116214990616,
0.19015191495418549,
-0.15778698027133942,
0.12915243208408356,
-0.07596765458583832,
0.1349668651819229,
0.42981141805648804,
-0.32332661747932434,
0.4203883409500122,
-0.07696852833032608,
-0.07220307737588882,
-0.13352128863334656,
-0.2094736099243164,
0.24027609825134277,
-0.18461953103542328,
-0.1771864891052246,
0.3021963834762573,
-0.5056798458099365,
-0.1676313281059265,
-0.2155112624168396,
-0.3334268033504486,
-0.3298192322254181,
0.09261056780815125,
0.006914346478879452,
-0.013074024580419064,
0.4123537540435791,
-0.18864792585372925,
-0.09936761856079102,
0.2433212399482727,
0.013317763805389404,
0.019540466368198395,
-0.04263603687286377,
-0.30844295024871826,
-0.09384491294622421,
0.40289461612701416,
0.31477439403533936,
-0.10397635400295258,
-0.2810896635055542,
0.1359005868434906,
0.07775101065635681,
0.2755470871925354,
0.49672532081604004,
0.11556008458137512,
-0.04285721480846405,
-0.04962296038866043,
0.23273302614688873,
0.08125096559524536,
-0.4104410707950592,
-0.32728075981140137,
-0.055334072560071945,
-0.33842718601226807,
-0.04218420758843422,
0.17412081360816956,
-0.1824379861354828,
-0.06632567197084427,
0.07338535785675049,
0.5861653089523315,
0.09490720182657242,
-0.1965743750333786,
-0.25364381074905396,
-0.23577097058296204,
0.08214695006608963,
0.1725248545408249,
0.2378072589635849,
-0.28232383728027344,
-0.01884009689092636,
-0.13284412026405334,
-0.09600428491830826,
0.2748395800590515,
-0.0547044463455677,
-0.09230337291955948,
-0.01571986824274063,
0.1529240608215332,
-0.15804262459278107,
0.034824568778276443,
0.23692482709884644,
-0.04972264915704727,
0.16222533583641052,
-0.07402987033128738,
0.37641483545303345,
-0.09708894789218903,
0.15175192058086395,
-0.019949249923229218,
0.06809864938259125,
-0.16097497940063477,
-0.3654439151287079,
-0.004146367311477661,
-0.12600122392177582,
0.17789755761623383,
-0.16574811935424805,
-0.20779061317443848,
0.2291182279586792,
-0.5212485194206238,
0.24230161309242249,
-0.6958335638046265,
0.17721962928771973,
-0.2777905762195587,
-0.2161145955324173,
0.23268693685531616,
0.25558027625083923,
0.001819700002670288,
0.0542122907936573,
-0.027854088693857193,
0.5456064343452454,
-0.09776417911052704,
-0.3795401453971863,
-0.2211664319038391,
0.08659394085407257,
-0.012103000655770302,
-0.10347580909729004,
-0.14661695063114166,
0.013364046812057495,
-0.01794164627790451,
-0.03644692897796631,
0.2241268754005432,
0.510931134223938,
0.31747671961784363,
0.20634010434150696,
-0.1260506510734558,
0.22942689061164856,
-0.024162014946341515,
-0.04759739339351654,
-0.1969449818134308,
-0.1442221999168396,
0.48516809940338135,
-0.4792439043521881,
0.229256734251976,
-0.251433402299881,
-0.10088422149419785,
-0.5365921854972839,
0.1708374321460724,
-0.06563051044940948,
0.25382545590400696,
-0.013331066817045212,
-0.11124435812234879,
0.1556152105331421,
-0.22508181631565094,
0.05881841853260994,
0.3417336642742157,
-0.02627066895365715,
-0.2910478115081787,
0.2218429148197174,
0.14502045512199402,
0.009110089391469955,
0.05236689746379852,
0.22620384395122528,
0.49862632155418396,
0.16628950834274292,
-0.05856490880250931,
0.1408156007528305,
-0.09529227018356323,
-0.3056315779685974,
-0.23190516233444214,
0.38656947016716003,
-0.2727615535259247,
-0.27203330397605896,
0.0731094628572464,
0.19181066751480103,
0.10142266005277634,
0.31268036365509033,
-0.3799886107444763,
-0.03611605614423752,
-0.0881122425198555,
-0.00453520193696022,
-0.0329722985625267,
0.30589088797569275,
0.16627971827983856,
0.37627920508384705,
0.21780923008918762,
0.3235440254211426,
-0.06855162978172302,
-0.15491722524166107,
-0.06220805644989014,
-0.06706266105175018,
0.12729144096374512,
-0.44672146439552307,
-0.11188217997550964,
-0.14942431449890137,
-0.1012268140912056,
0.0636877790093422,
-0.1898735761642456,
0.06181681901216507,
-0.28894609212875366,
0.43151819705963135,
0.3488644063472748,
0.35225623846054077,
-0.020079517737030983,
-0.3190135955810547,
0.35101082921028137,
-0.18072977662086487,
-0.3512137532234192,
0.07935118675231934,
0.07303617894649506,
-0.12372075766324997,
-0.032618701457977295,
-0.031055621802806854,
-0.40634655952453613,
-0.3318442702293396,
0.6025372743606567,
-0.22767427563667297,
0.036238424479961395,
0.05414288491010666,
-0.15379367768764496,
0.21800526976585388,
-0.315547913312912,
0.259346067905426,
-0.10953476279973984,
-0.385819673538208,
0.40893468260765076,
-0.11531054973602295,
-0.1938164383172989,
-0.19884836673736572,
0.20120090246200562,
0.36363711953163147,
-0.46764737367630005,
-0.3136030435562134,
-0.1023779809474945,
-0.09024353325366974,
0.11697529256343842,
-0.14949607849121094,
-0.04006614536046982,
0.1485530436038971,
-0.03049412928521633,
0.05094912648200989,
-0.18679460883140564,
-0.42132067680358887,
0.24406754970550537,
0.09518194943666458,
0.4098586440086365,
0.2252514660358429,
0.6043638586997986,
-0.10735397040843964,
0.03831329941749573,
0.27544349431991577,
-0.008049849420785904,
0.24371464550495148,
0.12448588013648987,
-0.018343951553106308,
-0.012771688401699066,
-0.20380789041519165,
0.33008211851119995,
0.10970672965049744,
-0.09808757156133652,
0.13277015089988708,
-0.07223595678806305,
-0.06086523085832596,
-0.5553121566772461,
-0.29234689474105835,
-0.057655420154333115,
-0.12253782153129578,
-0.21829019486904144,
0.08105627447366714,
0.19803473353385925,
-0.1955210566520691,
0.07564032822847366,
0.08358435332775116,
0.046217769384384155,
0.35897600650787354,
0.016065947711467743,
0.11576160788536072,
-0.1439080834388733,
-0.31170979142189026,
-0.3608173727989197,
-0.5071966648101807,
0.40660160779953003,
-0.13000674545764923,
0.4522319734096527,
-0.01632237434387207,
0.001865483820438385,
-0.21563605964183807,
0.17040309309959412,
0.7178689241409302,
-0.007806377485394478,
-0.021000169217586517,
-0.0973653495311737,
0.22667786478996277,
-0.14307932555675507,
-0.09847216308116913,
-0.019475536420941353,
0.007628952618688345,
0.3079599440097809,
0.4845382571220398,
-0.3119177222251892,
0.15737426280975342,
0.45010852813720703,
-0.11397092789411545,
0.03388155624270439,
0.05490225926041603,
-0.4120844006538391,
-0.1322910189628601,
-0.12613439559936523,
0.045791443437337875,
-0.007569201290607452,
0.33727288246154785,
0.23936396837234497,
0.4687533676624298,
0.32136672735214233,
-0.21365287899971008,
0.17868280410766602,
0.20716674625873566,
0.2854419946670532,
0.19556070864200592,
0.1786348968744278,
0.34606263041496277,
0.1915528029203415,
0.43223837018013,
0.2851257920265198,
-0.17636480927467346,
-0.4160136580467224,
0.21115809679031372,
0.12654204666614532,
0.3590262234210968,
0.1281028687953949,
-0.013191775418817997,
0.16230317950248718,
0.16314563155174255,
0.5982353091239929,
0.06658340990543365,
-0.05922187492251396,
0.4557575285434723,
0.11522163450717926,
-0.40409740805625916,
-0.044363945722579956,
0.3678681254386902,
0.155633345246315,
0.05580666661262512,
0.08012080192565918,
0.15140795707702637,
-0.07185675203800201,
0.41554969549179077,
0.20205633342266083,
0.9475745558738708,
0.05321317911148071,
-0.04255649074912071,
0.08859322965145111,
-0.13639628887176514,
0.31552964448928833,
-0.19161061942577362,
0.08139266818761826,
0.013080891221761703,
-0.30369606614112854,
0.029069116339087486,
-0.05959725379943848,
0.28401893377304077,
-0.0580948069691658,
-0.1449231654405594,
0.23109595477581024,
0.036218561232089996,
-0.18642622232437134,
0.03902548551559448,
-0.09001551568508148,
0.0812608003616333,
-0.08801059424877167,
-0.0005310457199811935,
-0.09006348252296448,
-0.22564943134784698,
0.2257876843214035,
0.2040712535381317,
-0.04011134058237076,
-0.2518458962440491,
-0.2814370095729828,
-0.2166673243045807,
-0.03584019094705582,
-0.5318973064422607,
-0.005507161840796471,
0.4824450612068176,
-0.15242935717105865,
0.1785392165184021,
0.2817760109901428,
0.4356312155723572,
0.34000852704048157,
-0.28115102648735046,
0.1921406090259552,
0.4501972794532776,
-0.24046196043491364,
0.10981761664152145,
0.03981522098183632,
0.19135449826717377,
-0.07983492314815521,
0.035463981330394745,
0.023134421557188034,
-0.17328284680843353,
-0.08250267058610916,
-0.3889465928077698,
-0.11668655276298523,
0.4380972981452942,
-0.06932450085878372,
0.12378832697868347,
-0.1997479498386383,
0.07072901725769043,
-0.3176354467868805,
0.07133276760578156,
0.2060489058494568,
-0.43837854266166687,
-0.20390048623085022,
-0.13189242780208588,
-0.3664608597755432,
-0.04276422783732414,
0.27462711930274963,
0.014677776023745537,
0.020540736615657806,
0.48319923877716064,
0.10798612236976624,
-0.07259164750576019,
0.008172675967216492,
0.08968827873468399,
0.5692208409309387,
-0.22703856229782104,
0.22446231544017792,
0.20038902759552002,
-0.05196662247180939,
-0.30924734473228455,
0.2761435806751251,
0.42185455560684204,
-0.01438121497631073,
0.2513889968395233,
-0.33418339490890503,
-0.6526588201522827,
0.295097678899765,
-0.1557500660419464,
0.07152247428894043,
-0.13178303837776184,
0.35162967443466187,
-0.1126374751329422,
0.11191072314977646,
-0.17199307680130005,
-0.18585677444934845,
-0.45352742075920105,
0.05169801414012909,
0.6117978096008301,
0.005676858127117157,
0.0498427078127861,
-0.07264703512191772,
0.06944930553436279,
0.11732733249664307,
-0.08274884521961212,
-0.0341031551361084,
-0.14535954594612122,
0.15357035398483276,
-0.06344036012887955,
-0.1849220246076584,
0.2088429033756256,
0.004302356392145157,
-0.26396316289901733,
-0.08174010366201401,
-0.1082150936126709,
0.10540667921304703,
0.17891788482666016,
-0.019247697666287422,
0.11884181946516037,
0.020462002605199814,
0.13739824295043945,
-0.00864868238568306,
-0.18674898147583008,
0.12677867710590363,
0.17663419246673584,
-0.009986601769924164,
-0.2692561149597168,
-0.15194448828697205,
0.1149875670671463,
-0.02919919788837433,
-0.41262054443359375,
-0.06649529188871384,
0.16334345936775208,
-0.45800191164016724,
-0.30800938606262207,
-0.00928630493581295,
0.4242594540119171,
0.15613511204719543,
-0.20616981387138367,
-0.05955294519662857,
0.36507946252822876,
0.0055497679859399796,
-0.30935314297676086,
-0.1635877788066864,
0.14967641234397888,
-0.014666764996945858,
-0.012069538235664368,
0.2686302661895752,
-0.24325253069400787,
0.12736523151397705,
-0.46382761001586914,
-0.020513329654932022,
-0.08817300200462341,
0.053695760667324066,
0.1867164820432663,
0.41884681582450867,
0.117155060172081,
0.0029185153543949127,
0.2850874066352844,
-0.10704758763313293,
0.15411464869976044,
0.12707069516181946,
-0.2615264058113098,
0.23163536190986633,
-0.0130537711083889,
0.10919713973999023,
0.026693642139434814,
-0.3937639594078064,
-0.09838651120662689,
0.06133020669221878,
-0.23068088293075562,
0.2599996328353882,
-0.34106341004371643,
0.4878440201282501,
-0.11580345779657364,
-0.2529906630516052,
0.13550923764705658,
0.2182619720697403,
-0.20943623781204224,
-0.3045281767845154,
-0.26053351163864136,
-0.2631784975528717,
-0.29103899002075195,
0.14484193921089172,
0.11984670162200928,
0.14194157719612122,
0.3390422463417053,
-0.015640921890735626,
-0.2616037130355835,
0.06397167593240738,
-0.5474545955657959,
0.4225045442581177,
0.27595388889312744,
-0.45271429419517517,
0.12678107619285583,
0.08666761219501495,
-0.2171511948108673,
-0.07895328104496002,
0.360307902097702,
0.483277827501297,
0.15224632620811462,
-0.16785277426242828,
-0.054453831166028976,
0.15132935345172882,
-0.1569134145975113,
0.2661082446575165,
0.19834858179092407,
0.5461711883544922,
-0.011607863008975983,
0.2772137522697449,
-0.034456342458724976,
-0.10218184441328049,
0.12582942843437195,
-0.09534570574760437,
0.3726418614387512,
-0.15344120562076569,
0.02772696316242218,
-0.29387152194976807,
-0.32358217239379883,
-0.24252599477767944,
0.07156211137771606,
-0.47456079721450806,
0.22222338616847992,
0.020824216306209564,
-0.041099704802036285,
-0.09610525518655777,
-0.1968192607164383,
0.017879314720630646,
-0.06595852971076965,
0.6050191521644592,
0.39574354887008667,
0.19243848323822021,
-0.541763424873352,
-0.332275927066803,
-0.23209573328495026,
0.03479105979204178,
-0.08931930363178253,
-0.06550967693328857,
-0.12510913610458374,
-0.19320297241210938,
0.28478220105171204,
0.023161277174949646,
0.06806227564811707,
-0.3659858703613281,
-0.39966028928756714,
0.13607537746429443,
-0.3842678964138031,
-0.1593453586101532,
-0.10734540224075317,
0.14105553925037384,
0.3953363001346588,
-0.08614583313465118,
0.15852363407611847,
0.04806368052959442,
-0.1391516625881195,
0.022885648533701897,
0.13170063495635986,
-0.1102878749370575,
0.11560696363449097,
0.2501504123210907,
0.18847350776195526,
0.16025573015213013,
-0.016874520108103752,
-0.23449838161468506,
-0.034696001559495926,
0.016606686636805534,
-0.21265113353729248,
0.09201613068580627,
0.13925966620445251,
0.43952301144599915,
0.0032477276399731636,
-0.35938796401023865,
-0.4415512979030609,
0.2621133327484131,
0.018809661269187927,
-0.24307496845722198,
-0.19780275225639343,
0.19374790787696838,
0.3535231053829193,
-0.0100955069065094,
0.24177078902721405,
0.013922389596700668,
0.02604859322309494,
0.0006711501628160477,
-0.4054226279258728,
-0.3462916612625122,
0.8914777040481567,
-0.20117485523223877,
0.02973989024758339,
-0.01307431235909462,
0.2509537637233734,
-0.009426340460777283,
-0.24016296863555908,
-0.6903420686721802,
-0.03350892290472984,
0.15631990134716034,
0.15949738025665283,
-0.5399848818778992,
0.1339568793773651,
0.028643149882555008,
0.03278821334242821,
0.10895657539367676,
0.46238699555397034,
-0.04632662236690521,
-0.377921462059021,
0.20957595109939575,
-0.22979316115379333
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.