Yassine
commited on
Commit
•
cebd506
1
Parent(s):
8bb2277
just another split
Browse files- commavq.py +5 -13
commavq.py
CHANGED
@@ -5,12 +5,9 @@ import numpy as np
|
|
5 |
|
6 |
SHARD_SIZE = 2500
|
7 |
NUM_SHARDS = 40
|
8 |
-
_URLS =
|
9 |
-
'train': [
|
10 |
f'https://huggingface.co/datasets/commaai/commavq/resolve/main/data_{i*SHARD_SIZE}_to_{(i+1)*SHARD_SIZE}.zip' for i in range(NUM_SHARDS)
|
11 |
-
]
|
12 |
-
'val': f'https://huggingface.co/datasets/commaai/commavq/resolve/main/val.zip'
|
13 |
-
}
|
14 |
|
15 |
_DESCRIPTION = """\
|
16 |
TODO
|
@@ -33,14 +30,9 @@ class CommaVQ(datasets.GeneratorBasedBuilder):
|
|
33 |
local_extracted_archive = dl_manager.extract(downloaded_files) if not dl_manager.is_streaming else None
|
34 |
return [
|
35 |
datasets.SplitGenerator(
|
36 |
-
name=
|
37 |
-
gen_kwargs={"local_extracted_archive":local_extracted_archive[
|
38 |
-
) for i in range(len(downloaded_files
|
39 |
-
datasets.SplitGenerator(
|
40 |
-
name='val',
|
41 |
-
gen_kwargs={"local_extracted_archive":local_extracted_archive['val'], "files": dl_manager.iter_archive(downloaded_files['val'])}
|
42 |
-
)
|
43 |
-
]
|
44 |
|
45 |
def _generate_examples(self, local_extracted_archive, files):
|
46 |
files = glob.glob(os.path.join(local_extracted_archive, '*.npy'))
|
|
|
5 |
|
6 |
SHARD_SIZE = 2500
|
7 |
NUM_SHARDS = 40
|
8 |
+
_URLS = [
|
|
|
9 |
f'https://huggingface.co/datasets/commaai/commavq/resolve/main/data_{i*SHARD_SIZE}_to_{(i+1)*SHARD_SIZE}.zip' for i in range(NUM_SHARDS)
|
10 |
+
] + [ f'https://huggingface.co/datasets/commaai/commavq/resolve/main/val.zip']
|
|
|
|
|
11 |
|
12 |
_DESCRIPTION = """\
|
13 |
TODO
|
|
|
30 |
local_extracted_archive = dl_manager.extract(downloaded_files) if not dl_manager.is_streaming else None
|
31 |
return [
|
32 |
datasets.SplitGenerator(
|
33 |
+
name=str(i),
|
34 |
+
gen_kwargs={"local_extracted_archive":local_extracted_archive[i], "files": dl_manager.iter_archive(downloaded_files[i])}
|
35 |
+
) for i in range(len(downloaded_files))]
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
def _generate_examples(self, local_extracted_archive, files):
|
38 |
files = glob.glob(os.path.join(local_extracted_archive, '*.npy'))
|