nuwandavek commited on
Commit
d8e3372
·
1 Parent(s): 13f2b77

remove dataset builder, sstream is incompatible

Browse files
Files changed (1) hide show
  1. commaSteeringControl.py +0 -65
commaSteeringControl.py DELETED
@@ -1,65 +0,0 @@
1
- import datasets
2
- import pandas as pd
3
- import pyarrow as pa
4
-
5
- PLATFORMS = ["ACURA_RDX_2020", "AUDI_A3_3RD_GEN"]
6
-
7
- _URLS = [f'https://huggingface.co/datasets/commaai/commaSteeringControl/resolve/main/data/{platform}.zip' for platform in PLATFORMS]
8
-
9
- _DESCRIPTION = "Steering controls dataset from cars running openpilot"
10
- N = 600
11
-
12
-
13
- class CommaSteeringControl(datasets.ArrowBasedBuilder):
14
-
15
- def _info(self):
16
- return datasets.DatasetInfo(
17
- description=_DESCRIPTION,
18
- features=datasets.Features(
19
- {
20
- "t": datasets.Array2D(shape=(1, N), dtype='float'),
21
- "latActive": datasets.Array2D(shape=(1, N), dtype='bool'),
22
- "steeringPressed": datasets.Array2D(shape=(1, N), dtype='bool'),
23
- "vEgo": datasets.Array2D(shape=(1, N), dtype='float'),
24
- "aEgo": datasets.Array2D(shape=(1, N), dtype='float'),
25
- "steeringAngleDeg": datasets.Array2D(shape=(1, N), dtype='float'),
26
- "steer": datasets.Array2D(shape=(1, N), dtype='float'),
27
- "steerFiltered": datasets.Array2D(shape=(1, N), dtype='float'),
28
- "roll": datasets.Array2D(shape=(1, N), dtype='float'),
29
- "latAccelSteeringAngle": datasets.Array2D(shape=(1, N), dtype='float'),
30
- "latAccelDesired": datasets.Array2D(shape=(1, N), dtype='float'),
31
- "latAccelLocalizer": datasets.Array2D(shape=(1, N), dtype='float'),
32
- "epsFwVersion": datasets.Array2D(shape=(1, N), dtype='string'),
33
- }
34
- )
35
- )
36
-
37
- def _split_generators(self, dl_manager):
38
- downloaded_files = dl_manager.download(_URLS)
39
- return [
40
- datasets.SplitGenerator(
41
- name=PLATFORMS[i],
42
- gen_kwargs={
43
- "files": dl_manager.iter_archive(downloaded_files[i])
44
- }
45
- ) for i in range(len(downloaded_files))
46
- ]
47
-
48
- def _generate_tables(self, files):
49
- for path in files:
50
- df = pd.read_csv(path[1])
51
- pa_table = pa.Table.from_pandas(df)
52
- # print(pa_table)
53
- yield path[0], pa_table
54
-
55
- # def _get_examples_iterable_for_split(self, split_generator):
56
- # for path in split_generator.gen_kwargs['files']:
57
- # df = pandas.read_csv(path[1])
58
- # yield path[0], df
59
-
60
-
61
- # ds = CommaSteeringControl(use_auth_token=True)
62
- # dp = ds.as_streaming_dataset(split="AUDI_A3_3RD_GEN")
63
- # for p in dp:
64
- # print(p)
65
- # break