Yassine commited on
Commit
e0b0bad
1 Parent(s): 12ad0bf
Files changed (2) hide show
  1. commavq.py +13 -5
  2. val.zip +3 -0
commavq.py CHANGED
@@ -5,9 +5,12 @@ import numpy as np
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
- ]
 
 
 
11
 
12
  _DESCRIPTION = """\
13
  TODO
@@ -31,8 +34,13 @@ class CommaVQ(datasets.GeneratorBasedBuilder):
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'))
 
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
 
34
  return [
35
  datasets.SplitGenerator(
36
  name=str(i),
37
+ gen_kwargs={"local_extracted_archive":local_extracted_archive['train'][i], "files": dl_manager.iter_archive(downloaded_files['train'][i])}
38
+ ) for i in range(len(downloaded_files['train']))] + [
39
+ datasets.SplitGenerator(
40
+ name=str(i),
41
+ gen_kwargs={"local_extracted_archive":local_extracted_archive['val'][i], "files": dl_manager.iter_archive(downloaded_files['val'][i])}
42
+ ) for i in range(len(downloaded_files['val']))
43
+ ]
44
 
45
  def _generate_examples(self, local_extracted_archive, files):
46
  files = glob.glob(os.path.join(local_extracted_archive, '*.npy'))
val.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c3a293a1c1bd5e1170df7d37f15f8a8c0efb80e2e8fc206470e07aef2775394
3
+ size 179921715